blitz Version 1.0.2
Loading...
Searching...
No Matches
blitz::MemoryBlock< P_type > Class Template Reference

#include <memblock.h>

Inheritance diagram for blitz::MemoryBlock< P_type >:
Inheritance graph
Collaboration diagram for blitz::MemoryBlock< P_type >:
Collaboration graph

Public Types

typedef P_type T_type
 

Protected Member Functions

 MemoryBlock (sizeType items)
 
 MemoryBlock (sizeType length, T_type *data)
 Constructor for a preallocated block that should be deleted when we are done?
 
virtual ~MemoryBlock ()
 
bool doLock (bool lockingPolicy)
 
void addReference ()
 
T_type *restrict data ()
 
const T_type *restrict data () const
 
T_type *& dataBlockAddress ()
 
sizeType length () const
 
int removeReference ()
 
int references () const
 
void allocate (sizeType length)
 
void deallocate ()
 

Private Member Functions

 MemoryBlock (const MemoryBlock< T_type > &)
 
void operator= (const MemoryBlock< T_type > &)
 
 MemoryBlock ()
 The default constructor is needed for serialization.
 

Private Attributes

bool allocatedByUs_
 Keeps track of whether the block was preallocated or not.
 
union { 
 
   T_type *restrict   data_ 
 
   simdTypes< T_type >::vecType *restrict   data_tv_ 
 
   char *restrict   data_char_ 
 
};  
 
union { 
 
   T_type *   dataBlockAddress_ 
 
   simdTypes< T_type >::vecType *restrict   dBA_tv_ 
 
   char *   dBA_char_ 
 
};  
 
sizeType length_
 

Friends

class MemoryBlockReference< P_type >
 

Member Typedef Documentation

◆ T_type

Constructor & Destructor Documentation

◆ MemoryBlock() [1/4]

◆ MemoryBlock() [2/4]

◆ ~MemoryBlock()

◆ MemoryBlock() [3/4]

template<typename P_type >
blitz::MemoryBlock< P_type >::MemoryBlock ( const MemoryBlock< T_type > & )
inlineprivate

◆ MemoryBlock() [4/4]

template<typename P_type >
blitz::MemoryBlock< P_type >::MemoryBlock ( )
inlineprivate

The default constructor is needed for serialization.

Member Function Documentation

◆ addReference()

◆ allocate()

template<typename P_type >
void blitz::MemoryBlock< P_type >::allocate ( sizeType length)
inlineprotected

◆ data() [1/2]

◆ data() [2/2]

template<typename P_type >
const T_type *restrict blitz::MemoryBlock< P_type >::data ( ) const
inlineprotected

◆ dataBlockAddress()

template<typename P_type >
T_type *& blitz::MemoryBlock< P_type >::dataBlockAddress ( )
inlineprotected

◆ deallocate()

template<typename P_type >
void blitz::MemoryBlock< P_type >::deallocate ( )
protected

◆ doLock()

template<typename P_type >
bool blitz::MemoryBlock< P_type >::doLock ( bool lockingPolicy)
inlineprotected

◆ length()

◆ operator=()

template<typename P_type >
void blitz::MemoryBlock< P_type >::operator= ( const MemoryBlock< T_type > & )
inlineprivate

◆ references()

template<typename P_type >
int blitz::MemoryBlock< P_type >::references ( ) const
inlineprotected

◆ removeReference()

Friends And Related Symbol Documentation

◆ MemoryBlockReference< P_type >

Member Data Documentation

◆ [union]

union { ... } blitz::MemoryBlock< P_type >

◆ [union]

union { ... } blitz::MemoryBlock< P_type >

◆ allocatedByUs_

template<typename P_type >
bool blitz::MemoryBlock< P_type >::allocatedByUs_
private

Keeps track of whether the block was preallocated or not.

This affects potential alignment so must be taken into account when we delete.

Referenced by blitz::MemoryBlock< P_type >::MemoryBlock().

◆ data_

◆ data_char_

template<typename P_type >
char* restrict blitz::MemoryBlock< P_type >::data_char_

◆ data_tv_

template<typename P_type >
simdTypes<T_type>::vecType* restrict blitz::MemoryBlock< P_type >::data_tv_

◆ dataBlockAddress_

◆ dBA_char_

template<typename P_type >
char* blitz::MemoryBlock< P_type >::dBA_char_

◆ dBA_tv_

template<typename P_type >
simdTypes<T_type>::vecType* restrict blitz::MemoryBlock< P_type >::dBA_tv_

◆ length_


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