CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Attributes
TritonMemResource< IO > Class Template Reference

#include <TritonData.h>

Inheritance diagram for TritonMemResource< IO >:
TritonCpuShmResource< IO > TritonHeapResource< IO >

Public Member Functions

uint8_t * addr ()
 
virtual void close ()
 
virtual void copyInput (const void *values, size_t offset)
 
virtual const uint8_t * copyOutput ()
 
virtual void set ()
 
size_t size () const
 
 TritonMemResource (TritonData< IO > *data, const std::string &name, size_t size)
 
virtual ~TritonMemResource ()
 

Protected Attributes

uint8_t * addr_
 
bool closed_
 
TritonData< IO > * data_
 
std::string name_
 
size_t size_
 

Detailed Description

template<typename IO>
class TritonMemResource< IO >

Definition at line 21 of file TritonData.h.

Constructor & Destructor Documentation

◆ TritonMemResource()

template<typename IO >
TritonMemResource< IO >::TritonMemResource ( TritonData< IO > *  data,
const std::string &  name,
size_t  size 
)

Definition at line 15 of file TritonMemResource.cc.

16  : data_(data), name_(name), size_(size), addr_(nullptr), closed_(false) {}

◆ ~TritonMemResource()

template<typename IO >
virtual TritonMemResource< IO >::~TritonMemResource ( )
inlinevirtual

Definition at line 18 of file TritonMemResource.h.

18 {}

Member Function Documentation

◆ addr()

template<typename IO >
uint8_t* TritonMemResource< IO >::addr ( )
inline

Definition at line 19 of file TritonMemResource.h.

19 { return addr_; }

References TritonMemResource< IO >::addr_.

◆ close()

template<typename IO >
virtual void TritonMemResource< IO >::close ( void  )
inlinevirtual

◆ copyInput()

template<typename IO >
virtual void TritonMemResource< IO >::copyInput ( const void *  values,
size_t  offset 
)
inlinevirtual

Reimplemented in TritonCpuShmResource< IO >, and TritonHeapResource< IO >.

Definition at line 23 of file TritonMemResource.h.

23 {}

◆ copyOutput()

template<typename IO >
virtual const uint8_t* TritonMemResource< IO >::copyOutput ( )
inlinevirtual

Reimplemented in TritonCpuShmResource< IO >, and TritonHeapResource< IO >.

Definition at line 25 of file TritonMemResource.h.

25 { return nullptr; }

◆ set()

template<typename IO >
void TritonMemResource< IO >::set ( )
virtual

Reimplemented in TritonHeapResource< IO >.

Definition at line 19 of file TritonMemResource.cc.

19  {
20  triton_utils::throwIfError(data_->data_->SetSharedMemory(name_, data_->totalByteSize_, 0),
21  "unable to set shared memory (" + name_ + ")");
22 }

References triton_utils::throwIfError().

◆ size()

template<typename IO >
size_t TritonMemResource< IO >::size ( void  ) const
inline

Member Data Documentation

◆ addr_

template<typename IO >
uint8_t* TritonMemResource< IO >::addr_
protected

◆ closed_

template<typename IO >
bool TritonMemResource< IO >::closed_
protected

Definition at line 34 of file TritonMemResource.h.

◆ data_

template<typename IO >
TritonData<IO>* TritonMemResource< IO >::data_
protected

◆ name_

template<typename IO >
std::string TritonMemResource< IO >::name_
protected

◆ size_

template<typename IO >
size_t TritonMemResource< IO >::size_
protected
TritonMemResource::data_
TritonData< IO > * data_
Definition: TritonMemResource.h:30
TritonMemResource::size
size_t size() const
Definition: TritonMemResource.h:20
TritonMemResource::size_
size_t size_
Definition: TritonMemResource.h:32
TritonMemResource::addr_
uint8_t * addr_
Definition: TritonMemResource.h:33
triton_utils::throwIfError
void throwIfError(const Error &err, std::string_view msg)
Definition: triton_utils.cc:21
TritonMemResource::closed_
bool closed_
Definition: TritonMemResource.h:34
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
TritonMemResource::name_
std::string name_
Definition: TritonMemResource.h:31