89 size_t elements(
void)
const;
106 size_t getAlias(
void)
const;
113 size_t getEnd(
void)
const;
119 template <
typename ElementType>
120 ElementType as(
void)
const;
126 bool unique(
void)
const;
132 size_t useCount(
void)
const;
141 template<
class Archive>
142 void serialize(Archive & ar,
const unsigned int version);
172 std::pair<BufferChunk, BufferChunk> convertComplex(
const DType &dtype,
const size_t numElems = 0)
const;
203 return this->length/this->dtype.size();
213 return _managedBuffer;
218 if (_buffer.getAlias() == 0)
return 0;
219 if (address > _buffer.getAlias())
return address - _buffer.getLength();
220 else return address + _buffer.getLength();
225 return address + length;
228 template <
typename ElementType>
231 return reinterpret_cast<ElementType
>(address);
234 inline Pothos::BufferChunk::operator bool(
void)
const
236 return (address != 0) or bool(_buffer);
241 return this->useCount() == 1;
249 assert(_buffer.useCount() >= 2);
250 return _buffer.useCount() - 1;
252 return _buffer.useCount();
size_t elements(void) const
Definition: BufferChunk.hpp:201
const SharedBuffer & getBuffer(void) const
Definition: BufferChunk.hpp:206
#define pothos_explicit
Definition: Config.hpp:85
#define POTHOS_API
Definition: Config.hpp:41
ElementType as(void) const
Definition: BufferChunk.hpp:229
size_t getEnd(void) const
Definition: BufferChunk.hpp:223
size_t getAlias(void) const
Definition: BufferChunk.hpp:216
POTHOS_API bool operator==(const Callable &lhs, const Callable &rhs)
bool unique(void) const
Definition: BufferChunk.hpp:239
Definition: ManagedBuffer.hpp:27
size_t useCount(void) const
Definition: BufferChunk.hpp:244
BufferChunk(void)
Definition: BufferChunk.hpp:194
void serialize(Archive &, Pothos::Detail::ObjectContainer &, const unsigned int)
Definition: Serialize.hpp:46
Definition: SharedBuffer.hpp:21
const ManagedBuffer & getManagedBuffer(void) const
Definition: BufferChunk.hpp:211
DType dtype
Definition: BufferChunk.hpp:83
Definition: BufferChunk.hpp:26
size_t length
Definition: BufferChunk.hpp:78
size_t address
Definition: BufferChunk.hpp:73