OpenFPM_pdata  1.1.0
Project that contain the implementation of distributed structures
 All Data Structures Namespaces Functions Variables Typedefs Enumerations Friends Pages
memory_array< T > Class Template Reference

This class give a representation to a chunk or memory. More...

Detailed Description

template<typename T>
class memory_array< T >

This class give a representation to a chunk or memory.

This class give a representation to a chunk of memory as an array of T objects

Parameters
TThis is the object type

Definition at line 25 of file memory_array.hpp.

#include <memory_array.hpp>

Public Member Functions

void set_pointer (void *ptr_)
 Set the internal pointer to the indicated chunk of memory.
 
void * get_pointer ()
 Return the pointer.
 
T & operator[] (mem_id i)
 operator[]
 
 memory_array ()
 Default constructor.
 
 memory_array (void *ptr, size_t sz, bool init)
 Memory array constructor. More...
 
 ~memory_array ()
 Destructor. More...
 

Private Member Functions

get (mem_id i)
 return the i element
 

Private Attributes

T * ptr
 
size_t sz
 

Constructor & Destructor Documentation

template<typename T >
memory_array< T >::memory_array ( void *  ptr,
size_t  sz,
bool  init 
)
inline

Memory array constructor.

Parameters
ptrMemory pointer
szsize
initspecify if the pointer is initialized

Definition at line 78 of file memory_array.hpp.

template<typename T >
memory_array< T >::~memory_array ( )
inline

Destructor.

Definition at line 98 of file memory_array.hpp.


The documentation for this class was generated from the following file: