class MemBlock

Memblock<T> is a 1D-block of memory container

Public

[more]T_value value_t
define typedef value_t
[more] this_t
define typedef this_t
[more] Explanation
[more] Example
[more] access to the pointer
[more] set/get and op on datas
[more] constructor(s), destructor
[more] memory management

Private Fields

[more]slrestrict my_base
base pointer to allocated memory
[more]const my_o
owner of the data (this)

Private Methods

[more]this_t& operator=( this_t const& rhs )
disable operator=
[more]void newBlock(unsigned int const n)
allocate a block of memory


Documentation

Memblock<T> is a 1D-block of memory container
oT_value value_t
define typedef value_t

o this_t
define typedef this_t

o Explanation
1D-container

o Example
see \verb| sl++/test/debug/memory.cc|

o access to the pointer

ovalue_t* base() const
get a pointer to the base of storage

oconst* const_base() const
get a const pointer to the base of storage

o set/get and op on datas

ovoid set( unsigned int const n, T2_value const x )
set a value

ovoid set( unsigned int const n, value_t const* t )
set values from a value_t *

ovoid add( unsigned int const n, T2_value const t )
add a constant value

ovoid add( unsigned int const n, T2_value const* t )
add value by value from a value_t *

ovoid sub( unsigned int const n, T2_value const t )
substract a value_t

ovoid sub( unsigned int const n, T2_value const* t )
substract value by value from a value_t *

ovoid mul( unsigned int const n, T2_value const t )
multiply by a constant value

ovoid mul( unsigned int const n, T2_value const* t )
mul value by value from a value_t *

ovoid div( unsigned int const n, T2_value const t )
divide by a constant value

ovoid div( unsigned int const n, T2_value const* t )
divide value by value from a value_t *

ovoid power2( unsigned int const n )
power 2

o constructor(s), destructor

oexplicit MemBlock()
default constructor

oexplicit MemBlock(unsigned int const n)
constructor with size

oexplicit MemBlock(T_value * memzone)
constructor with given preallocated memory via a pointer

o ~MemBlock()
destructor

o memory management

ovoid resize(unsigned int const n)
resize to values

ovoid reshape(unsigned int const old_n, unsigned int const new_n)

obool isOwner() const

othis_t& operator=( this_t const& rhs )
disable operator=

oslrestrict my_base
base pointer to allocated memory

oconst my_o
owner of the data (this)

ovoid newBlock(unsigned int const n)
allocate a block of memory


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.