22 class BufferAccumulator;
108 size_t elements(
void)
const;
115 void setElements(
const size_t numElements);
132 size_t getAlias(
void)
const;
139 size_t getEnd(
void)
const;
149 template <
typename ElementType>
150 ElementType as(
void)
const;
161 template <
typename ElementType>
162 operator ElementType(
void)
const;
168 bool unique(
void)
const;
174 size_t useCount(
void)
const;
180 explicit operator bool(
void)
const;
189 template<
class Archive>
190 void serialize(Archive & ar,
const unsigned int version);
220 std::pair<BufferChunk, BufferChunk> convertComplex(
const DType &dtype,
const size_t numElems = 0)
const;
231 size_t convert(
const BufferChunk &outBuff,
const size_t numElems = 0)
const;
243 size_t convertComplex(
const BufferChunk &outBuffRe,
const BufferChunk &outBuffIm,
const size_t numElems = 0)
const;
248 void _incrNextBuffers(
void);
249 void _decrNextBuffers(
void);
285 length(dtype.size()*numElems),
295 length(buffer.getLength()),
296 _managedBuffer(buffer),
305 _managedBuffer(buffer),
315 _managedBuffer(other._managedBuffer)
321 address(std::move(other.address)),
322 length(std::move(other.length)),
323 dtype(std::move(other.dtype)),
324 _managedBuffer(std::move(other._managedBuffer)),
325 _nextBuffers(std::move(other._nextBuffers))
329 other._nextBuffers = 0;
343 _managedBuffer = other._managedBuffer;
351 address = std::move(other.address);
352 length = std::move(other.length);
353 dtype = std::move(other.dtype);
354 _managedBuffer = std::move(other._managedBuffer);
355 _nextBuffers = std::move(other._nextBuffers);
358 other._nextBuffers = 0;
368 _managedBuffer.
reset();
389 return _managedBuffer;
395 if (buffer.getAlias() == 0)
return 0;
396 if (
address > buffer.getAlias())
return address - buffer.getLength();
397 else return address + buffer.getLength();
405 template <
typename ElementType>
408 return reinterpret_cast<ElementType
>(
address);
411 template <
typename ElementType>
412 Pothos::BufferChunk::operator ElementType(
void)
const 414 return reinterpret_cast<ElementType
>(
address);
417 inline Pothos::BufferChunk::operator bool(
void)
const 419 return bool(_managedBuffer);
424 return _managedBuffer.
unique();
Definition: BufferAccumulator.hpp:31
bool unique(void) const
Definition: BufferChunk.hpp:422
bool unique(void) const
Definition: ManagedBuffer.hpp:241
#define POTHOS_API
Definition: Config.hpp:41
POTHOS_API bool operator==(const Callable &lhs, const Callable &rhs)
size_t elements(void) const
Definition: BufferChunk.hpp:372
const ManagedBuffer & getManagedBuffer(void) const
Definition: BufferChunk.hpp:387
size_t size(void) const
Get the size of this DType in bytes.
Definition: DType.hpp:198
const SharedBuffer & getBuffer(void) const
Definition: BufferChunk.hpp:382
ElementType as(void) const
Definition: BufferChunk.hpp:406
size_t getEnd(void) const
Definition: BufferChunk.hpp:400
Definition: ArchiveEntry.hpp:20
void reset(void)
Definition: ManagedBuffer.hpp:179
size_t getAddress(void) const
Get the address of the first byte of the buffer.
Definition: SharedBuffer.hpp:132
Definition: ManagedBuffer.hpp:31
BufferChunk(void)
Definition: BufferChunk.hpp:266
void serialize(Archive &ar, std::complex< T > &t, const unsigned int ver)
Definition: Complex.hpp:37
size_t useCount(void) const
Definition: ManagedBuffer.hpp:247
void setElements(const size_t numElements)
Definition: BufferChunk.hpp:377
void clear(void)
Definition: BufferChunk.hpp:362
BufferChunk & operator=(const BufferChunk &other)
BufferChunk copy assignment operator.
Definition: BufferChunk.hpp:337
~BufferChunk(void)
BufferChunk destructor.
Definition: BufferChunk.hpp:332
const SharedBuffer & getBuffer(void) const
Definition: ManagedBuffer.hpp:185
size_t getAlias(void) const
Definition: BufferChunk.hpp:392
Definition: SharedBuffer.hpp:21
DType dtype
Definition: BufferChunk.hpp:102
Definition: BufferChunk.hpp:30
size_t useCount(void) const
Definition: BufferChunk.hpp:427
size_t length
Definition: BufferChunk.hpp:97
size_t address
Definition: BufferChunk.hpp:92