void init(const Pothos::BufferManagerArgs &args) { _readyBuffs.set_capacity(args.numBuffers); for (size_t i = 0; i < args.numBuffers; i++) { auto sharedBuff = Pothos::SharedBuffer::make( args.bufferSize, args.nodeAffinity); Pothos::ManagedBuffer buffer; buffer.reset(this->shared_from_this(), sharedBuff); } }
void init(const Pothos::BufferManagerArgs &args) { Pothos::BufferManager::init(args); _readyBuffs.set_capacity(args.numBuffers); for (size_t i = 0; i < args.numBuffers; i++) { auto container = std::make_shared<OpenClBufferContainer>(_clArgs, args.bufferSize); auto sharedBuff = Pothos::SharedBuffer(size_t(container->mapped_ptr), args.bufferSize, container); Pothos::ManagedBuffer buffer; buffer.reset(this->shared_from_this(), sharedBuff); } }