MCPcopy Create free account
hub / github.com/apache/madlib / resize

Method resize

src/dbal/DynamicStruct_impl.hpp:365–382  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

363
364template <class Derived, class Container>
365inline
366void
367DynamicStruct<Derived, Container, Mutable>::resize() {
368 size_t begin = this->begin();
369 ByteStream_type& stream = this->byteStream();
370 stream.seek(begin, std::ios_base::beg);
371
372 // We use an RAII object here that ensure that dry mode will also be
373 // left in case of exceptions
374 typename ByteStream_type::DryRun dryRun(stream);
375 stream >> static_cast<Derived&>(*this);
376 dryRun.leave();
377
378 stream.template seek<ByteStream_type::maximumAlignment>(0,
379 std::ios_base::cur);
380 size_t newEnd = stream.tell();
381 this->setSize(newEnd - begin);
382}
383
384template <class Derived, class Container>
385template <class OtherDerived>

Callers 15

runMethod · 0.45
runMethod · 0.45
runMethod · 0.45
clustered_compute_statsFunction · 0.45
runMethod · 0.45
runMethod · 0.45
prepareSampleFunction · 0.45
runMethod · 0.45

Calls 5

beginMethod · 0.95
leaveMethod · 0.80
setSizeMethod · 0.80
seekMethod · 0.45
tellMethod · 0.45

Tested by

no test coverage detected