コード例 #1
0
 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);
     }
 }
コード例 #2
0
ファイル: OpenClBufferManager.cpp プロジェクト: m0x72/pothos
 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);
     }
 }