libpnicore
Data Structures | Functions
Internal classes

Data Structures

class  pni::core::add_op< OP1T, OP2T >
 addition expression template More...
 
class  pni::core::div_op< OP1T, OP2T >
 Division expression template. More...
 
struct  pni::core::inplace_arithmetics
 single threaded inplace arithmetics More...
 
class  pni::core::mult_op< OP1T, OP2T >
 Multiplication expression template. More...
 
struct  pni::core::op_trait< OT >
 operator reference trait More...
 
struct  pni::core::op_trait< scalar< T > >
 operator trait for scalars More...
 
struct  pni::core::array_trait< OP1, OPT2 >
 array trait for expression templates More...
 
struct  pni::core::array_trait< OP1, scalar< T > >
 array trait for expression templates More...
 
struct  pni::core::array_trait< scalar< T >, OP1 >
 array trait for expression templates More...
 
class  pni::core::sub_op< OP1T, OP2T >
 subtraction expression template More...
 
struct  pni::core::array_factory< ATYPE >
 array factory More...
 
class  pni::core::array_selection
 selection from a multidimensional array More...
 
struct  pni::core::is_index_type< T >
 check if an index type is a valid index type More...
 
struct  pni::core::is_index_types< ITYPES >
 check a set of types for index More...
 
struct  pni::core::is_index_types< ITYPES >::is_index_type_pred< T >
 predicate type for count_if More...
 
struct  pni::core::is_view_index< ITYPES >
 checks for view index More...
 
struct  pni::core::is_valid_index< ITYPES >
 check if valid index More...
 
struct  pni::core::is_view_cont< CTYPE >
 check if view index More...
 
struct  pni::core::is_view_cont< std::vector< T > >
 check if view index More...
 
struct  pni::core::is_view_cont< std::array< T, N > >
 check if view index More...
 
struct  pni::core::array_view_trait< ATYPE, is_view >
 view trait More...
 
struct  pni::core::array_view_trait< ATYPE, true >
 view trait for views More...
 
struct  pni::core::array_view_trait< ATYPE, false >
 trait for single elements More...
 
struct  pni::core::view_provider< RTYPE, is_view >
 
struct  pni::core::view_provider< ATYPE, false >
 single value view_provider More...
 
struct  pni::core::view_provider< ATYPE, true >
 array view view_provider More...
 
class  pni::core::index_iterator< INDEXT, IMT >
 index iterator More...
 
class  pni::core::scalar_iterator< ITERABLE >
 scalar iterator More...
 

Functions

template<typename MAPT , typename CTYPE >
size_t pni::core::offset (const MAPT &map, const array_selection &s, const CTYPE &index)
 compute offset More...
 
template<typename MAPT >
size_t pni::core::start_offset (const MAPT &map, const array_selection &s)
 compute first element offset More...
 
template<typename MAPT >
size_t pni::core::last_offset (const MAPT &map, const array_selection &s)
 compute last element offset More...
 
template<typename MAPT >
bool pni::core::is_contiguous (const MAPT &map, const array_selection &s)
 check continuity of a selection More...
 
template<typename ITERABLE >
scalar_iterator< ITERABLE > pni::core::operator+ (const scalar_iterator< ITERABLE > &a, ssize_t b)
 add scalar to iterator More...
 
template<typename ITERABLE >
scalar_iterator< ITERABLE > pni::core::operator+ (ssize_t a, const scalar_iterator< ITERABLE > &b)
 add offset to iterator More...
 
template<typename ITERABLE >
scalar_iterator< ITERABLE > pni::core::operator- (const scalar_iterator< ITERABLE > &a, ssize_t b)
 subtract offset from iterator More...
 
template<typename ITERABLE >
ssize_t pni::core::operator- (const scalar_iterator< ITERABLE > &a, const scalar_iterator< ITERABLE > &b)
 subtract two iterators More...
 

Detailed Description

Internal classes used for the implementation of multidimensional arrays.

Function Documentation

template<typename MAPT >
bool pni::core::is_contiguous ( const MAPT &  map,
const array_selection &  s 
)

This function returns true if a selection is continuous within a index map. A selection is considered as contiguous if the number of it spans in the original array is equal to the size of the selection.

Template Parameters
MAPTindex map type
Parameters
mapreference to the index mape
sreerence to the selection.
Returns
true if contiguous, false otherwise
template<typename MAPT >
size_t pni::core::last_offset ( const MAPT &  map,
const array_selection &  s 
)

Compute the linear offset in the original array for the last element in a selection.

Template Parameters
MAPTindex map type of the original array
INDEXTindex type of the array selection
Parameters
mapreference to the original index map
sreference to the selection object
Returns
offset of the last element
template<typename MAPT , typename CTYPE >
size_t pni::core::offset ( const MAPT &  map,
const array_selection &  s,
const CTYPE &  index 
)

Compute the offset of a selection element in the original array. The original array is not required but only its index map. The index is expected to have the effective size of the selection. This means that its rank can be smaller than that of the map.

Template Parameters
MAPTmap type of the original array
CTYPEindex type for the selection index
Parameters
mapreference to the original index map
sreference to the selection object
indexreference to the selection index
Returns
linear offset of the element in the original array
template<typename ITERABLE >
scalar_iterator<ITERABLE> pni::core::operator+ ( const scalar_iterator< ITERABLE > &  a,
ssize_t  b 
)

Add an offset to the iterator and thus increment its internal state by this offset.

Iteartor<...> iter = ...'
Iteartor<...> iter2 = iter+2;

!

Parameters
aoriginal iterator
boffset to add
Returns
new iterator
template<typename ITERABLE >
scalar_iterator<ITERABLE> pni::core::operator+ ( ssize_t  a,
const scalar_iterator< ITERABLE > &  b 
)

Add an offset to the iterator and thus increment its internal state by this offset.

Parameters
aoffset to add
boriginal iterator
Returns
new iterator
template<typename ITERABLE >
scalar_iterator<ITERABLE> pni::core::operator- ( const scalar_iterator< ITERABLE > &  a,
ssize_t  b 
)

Subtract an integer offset from the iterator and thus decrement the internal state of the iterator by this value.

Parameters
aoriginal iterator
boffset
Returns
new iterator to new position
template<typename ITERABLE >
ssize_t pni::core::operator- ( const scalar_iterator< ITERABLE > &  a,
const scalar_iterator< ITERABLE > &  b 
)

Subtract to iterators and return the offset difference between this two iterators.

Parameters
afirst iterator
bsecond iterator
Returns
offset difference
template<typename MAPT >
size_t pni::core::start_offset ( const MAPT &  map,
const array_selection &  s 
)

Compute the offset in the original array of the first element in the selection.

Template Parameters
MAPToriginal index map type
INDEXTindex type of the selection
Parameters
mapreference to the original index map
sreference to the selection
Returns
offset of the first selection element