Project
Loading...
Searching...
No Matches
o2::pmr Namespace Reference

O2 memory allocators and interfaces related to managing memory via the trasport layer. More...

Classes

class  MessageResource
 
class  NoConstructAllocator
 
class  OwningMessageSpectatorAllocator
 
class  SpectatorAllocator
 
class  SpectatorMemoryResource
 
struct  testData
 

Typedefs

using FairMQMemoryResource = fair::mq::MemoryResource
 
using ChannelResource = fair::mq::ChannelResource
 
using ByteSpectatorAllocator = SpectatorAllocator< std::byte >
 
using BytePmrAllocator = boost::container::pmr::polymorphic_allocator< std::byte >
 
template<class T >
using vector = std::vector< T, o2::pmr::polymorphic_allocator< T > >
 

Functions

template<typename ContainerT >
fair::mq::MessagePtr getMessage (ContainerT &&container, FairMQMemoryResource *targetResource=nullptr)
 
template<typename ElemT >
auto adoptVector (size_t nelem, fair::mq::MessagePtr message)
 Return a std::vector spanned over the contents of the message, takes ownership of the message.
 
 BOOST_AUTO_TEST_CASE (transportallocatormap_test)
 
 BOOST_AUTO_TEST_CASE (allocator_test)
 
 BOOST_AUTO_TEST_CASE (getMessage_test)
 
 BOOST_AUTO_TEST_CASE (adoptVector_test)
 
 BOOST_AUTO_TEST_CASE (test_SpectatorMemoryResource)
 

Detailed Description

O2 memory allocators and interfaces related to managing memory via the trasport layer.

License text in a separate file.

In applying this license, CERN does not waive the privileges and immunities granted to it by virtue of its status as an Intergovernmental Organization or submit itself to any jurisdiction.

Author
Mikolaj Krzewicki, mkrze.nosp@m.wic@.nosp@m.cern..nosp@m.ch

Typedef Documentation

◆ BytePmrAllocator

using o2::pmr::BytePmrAllocator = typedef boost::container::pmr::polymorphic_allocator<std::byte>

Definition at line 305 of file MemoryResources.h.

◆ ByteSpectatorAllocator

Definition at line 304 of file MemoryResources.h.

◆ ChannelResource

using o2::pmr::ChannelResource = typedef fair::mq::ChannelResource

Definition at line 49 of file MemoryResources.h.

◆ FairMQMemoryResource

using o2::pmr::FairMQMemoryResource = typedef fair::mq::MemoryResource

Definition at line 48 of file MemoryResources.h.

◆ vector

template<class T >
using o2::pmr::vector = typedef std::vector<T, o2::pmr::polymorphic_allocator<T> >

Definition at line 307 of file MemoryResources.h.

Function Documentation

◆ adoptVector()

template<typename ElemT >
auto o2::pmr::adoptVector ( size_t  nelem,
fair::mq::MessagePtr  message 
)

Return a std::vector spanned over the contents of the message, takes ownership of the message.

Definition at line 312 of file MemoryResources.h.

◆ BOOST_AUTO_TEST_CASE() [1/5]

o2::pmr::BOOST_AUTO_TEST_CASE ( adoptVector_test  )

Definition at line 155 of file testMemoryResources.cxx.

◆ BOOST_AUTO_TEST_CASE() [2/5]

o2::pmr::BOOST_AUTO_TEST_CASE ( allocator_test  )

Definition at line 65 of file testMemoryResources.cxx.

◆ BOOST_AUTO_TEST_CASE() [3/5]

o2::pmr::BOOST_AUTO_TEST_CASE ( getMessage_test  )

Definition at line 103 of file testMemoryResources.cxx.

◆ BOOST_AUTO_TEST_CASE() [4/5]

o2::pmr::BOOST_AUTO_TEST_CASE ( test_SpectatorMemoryResource  )

Definition at line 193 of file testMemoryResources.cxx.

◆ BOOST_AUTO_TEST_CASE() [5/5]

o2::pmr::BOOST_AUTO_TEST_CASE ( transportallocatormap_test  )

Definition at line 48 of file testMemoryResources.cxx.

◆ getMessage()

template<typename ContainerT >
fair::mq::MessagePtr o2::pmr::getMessage ( ContainerT &&  container,
FairMQMemoryResource targetResource = nullptr 
)

Definition at line 53 of file MemoryResources.h.