GEOSX
Namespaces | Classes | Typedefs | Functions | Variables
LvArray Namespace Reference

The top level namespace. More...

Namespaces

 arrayManipulation
 Contains functions for operating on a contiguous array of values.
 
 bufferManipulation
 Contains template functions for performing common operations on buffers.
 
 indexing
 Contains functions to aid in multidimensional indexing.
 
 input
 Contains functions for filling array objects from strings.
 
 math
 Contains protable wrappers around cmath functions and some cuda specific functions.
 
 python
 Contains all the Python code.
 
 sortedArrayManipulation
 Contains functions for operating on a contiguous sorted unique array of values.
 
 system
 Contains functions that interact with the system or runtime environment.
 
 tensorOps
 Contains operations for operating on compile time sized vectors and matrices.
 
 typeManipulation
 Contains templates for manipulating types.
 

Classes

class  Array
 This class provides a fixed dimensional resizeable array interface in addition to an interface similar to std::vector for a 1D array. More...
 
class  ArrayOfArrays
 This class implements an array of arrays like object with contiguous storage. More...
 
class  ArrayOfArraysView
 This class provides a view into an array of arrays like object. More...
 
class  ArrayOfSets
 This class implements an array of sets like object with contiguous storage. More...
 
class  ArrayOfSetsView
 This class provides a view into an array of sets like object. More...
 
class  ArraySlice
 This class serves to provide a sliced multidimensional interface to the family of LvArray classes. More...
 
class  ArrayView
 This class serves to provide a "view" of a multidimensional array. More...
 
class  ChaiBuffer
 Implements the Buffer interface using CHAI. More...
 
class  CRSMatrix
 This class implements a compressed row storage matrix. More...
 
class  CRSMatrixView
 This class provides a view into a compressed row storage matrix. More...
 
class  MallocBuffer
 Implements the Buffer interface using malloc and free. More...
 
struct  NumericLimits
 A wrapper for the std::numeric_limits< T > member functions, this allows their values to be used on device. More...
 
struct  NumericLimitsNC
 The same as NumericLimits except the entries are not static or constexpr. More...
 
class  SortedArray
 This class provides an interface similar to an std::set. More...
 
class  SortedArrayView
 This class provides a view into a SortedArray. More...
 
class  SparsityPattern
 This class implements a compressed row storage sparsity pattern. More...
 
class  SparsityPatternView
 This class provides a view into a compressed row storage sparsity pattern. More...
 
class  StackBuffer
 This class implements the Buffer interface using a c-array. More...
 

Typedefs

template<typename T , int NDIM, typename PERMUTATION , typename INDEX_TYPE , int LENGTH>
using StackArray = typename internal::StackArrayHelper< T, NDIM, PERMUTATION, INDEX_TYPE, LENGTH >::type
 An alias for a Array backed by a StackBuffer. More...
 
using MemorySpace = camp::resources::Platform
 an alias for camp::resources::Platform.
 

Functions

std::ostream & operator<< (std::ostream &os, MemorySpace const space)
 Output a Platform enum to a stream. More...
 
template<typename OUTPUT , typename INPUT >
std::enable_if_t< internal::canEasilyConvert< INPUT, OUTPUT >, OUTPUT > constexpr integerConversion (INPUT input)
 
template<typename OUTPUT , typename INPUT >
std::enable_if_t< !internal::canEasilyConvert< INPUT, OUTPUT > &&std::is_unsigned< INPUT >::value, OUTPUT > integerConversion (INPUT input)
 
template<typename OUTPUT , typename INPUT >
std::enable_if_t< !internal::canEasilyConvert< INPUT, OUTPUT > &&!std::is_unsigned< INPUT >::value, OUTPUT > integerConversion (INPUT input)
 
template<typename T , int NDIM, int USD, typename DST_INDEX_TYPE , typename SRC_INDEX_TYPE >
void memcpy (ArraySlice< T, NDIM, USD, DST_INDEX_TYPE > const dst, ArraySlice< T const, NDIM, USD, SRC_INDEX_TYPE > const src)
 Use memcpy to copy src in to dst. More...
 
template<typename T , int NDIM, int USD, typename DST_INDEX_TYPE , typename SRC_INDEX_TYPE >
camp::resources::Event memcpy (camp::resources::Resource &resource, ArraySlice< T, NDIM, USD, DST_INDEX_TYPE > const dst, ArraySlice< T const, NDIM, USD, SRC_INDEX_TYPE > const src)
 Use memcpy to (maybe asynchronously) copy src in to dst. More...
 
template<std::size_t N_DST_INDICES, std::size_t N_SRC_INDICES, typename T , int DST_NDIM, int DST_USD, typename DST_INDEX_TYPE , template< typename > class DST_BUFFER, int SRC_NDIM, int SRC_USD, typename SRC_INDEX_TYPE , template< typename > class SRC_BUFFER>
void memcpy (ArrayView< T, DST_NDIM, DST_USD, DST_INDEX_TYPE, DST_BUFFER > const &dst, std::array< DST_INDEX_TYPE, N_DST_INDICES > const &dstIndices, ArrayView< T const, SRC_NDIM, SRC_USD, SRC_INDEX_TYPE, SRC_BUFFER > const &src, std::array< SRC_INDEX_TYPE, N_SRC_INDICES > const &srcIndices)
 Copy the values from a slice of src into a slice of dst. More...
 
template<std::size_t N_DST_INDICES, std::size_t N_SRC_INDICES, typename T , int DST_NDIM, int DST_USD, typename DST_INDEX_TYPE , template< typename > class DST_BUFFER, int SRC_NDIM, int SRC_USD, typename SRC_INDEX_TYPE , template< typename > class SRC_BUFFER>
camp::resources::Event memcpy (camp::resources::Resource &resource, ArrayView< T, DST_NDIM, DST_USD, DST_INDEX_TYPE, DST_BUFFER > const &dst, std::array< DST_INDEX_TYPE, N_DST_INDICES > const &dstIndices, ArrayView< T const, SRC_NDIM, SRC_USD, SRC_INDEX_TYPE, SRC_BUFFER > const &src, std::array< SRC_INDEX_TYPE, N_SRC_INDICES > const &srcIndices)
 Copy the values from a slice of src into a slice of dst using resource (may be asynchronous). More...
 
template<typename T , int NDIM, int USD, typename INDEX_TYPE >
std::ostream & operator<< (std::ostream &stream, ::LvArray::ArraySlice< T, NDIM, USD, INDEX_TYPE > const slice)
 This function outputs the contents of an array slice to an output stream. More...
 
template<typename T , int NDIM, int USD, typename INDEX_TYPE , template< typename > class BUFFER_TYPE>
std::ostream & operator<< (std::ostream &stream, ::LvArray::ArrayView< T, NDIM, USD, INDEX_TYPE, BUFFER_TYPE > const &view)
 This function outputs the contents of an ArrayView to an output stream. More...
 
template<typename T , typename INDEX_TYPE , template< typename > class BUFFER_TYPE>
std::ostream & operator<< (std::ostream &stream, SortedArrayView< T const, INDEX_TYPE, BUFFER_TYPE > const &view)
 This function outputs the contents of view to an output stream. More...
 
template<typename T , typename INDEX_TYPE , template< typename > class BUFFER_TYPE>
std::ostream & operator<< (std::ostream &stream, SortedArray< T, INDEX_TYPE, BUFFER_TYPE > const &array)
 This function outputs the contents of array to an output stream. More...
 
template<typename T , typename INDEX_TYPE , template< typename > class BUFFER_TYPE>
std::ostream & operator<< (std::ostream &stream, ArrayOfArraysView< T const, INDEX_TYPE const, true, BUFFER_TYPE > const &view)
 This function outputs the contents of view to an output stream. More...
 
template<typename T , typename INDEX_TYPE , template< typename > class BUFFER_TYPE>
std::ostream & operator<< (std::ostream &stream, ArrayOfArrays< T, INDEX_TYPE, BUFFER_TYPE > const &array)
 This function outputs the contents of array to an output stream. More...
 
template<typename T , typename COL_TYPE , typename INDEX_TYPE , template< typename > class BUFFER_TYPE>
std::ostream & operator<< (std::ostream &stream, CRSMatrixView< T const, COL_TYPE const, INDEX_TYPE const, BUFFER_TYPE > const &view)
 This function outputs the contents of view to an output stream. More...
 
template<typename POLICY , typename T , typename COL_TYPE , typename INDEX_TYPE , template< typename > class BUFFER_TYPE>
void print (CRSMatrixView< T const, COL_TYPE const, INDEX_TYPE const, BUFFER_TYPE > const &view)
 Print a CRSMatrixView in a format that can be easily xxdiff'ed on the console. More...
 
template<typename T , int N>
std::enable_if_t< !std::is_same< T, char >::value, std::ostream &> operator<< (std::ostream &stream, T const (&array)[N])
 Output a c-array to a stream. More...
 
template<typename T , int M, int N>
std::ostream & operator<< (std::ostream &stream, T const (&array)[M][N])
 Output a 2D c-array to a stream. More...
 
template<typename T , typename LAMBDA >
void forValuesInSlice (T &value, LAMBDA &&f)
 Apply the given function to the given value. More...
 
template<typename T , int NDIM, int USD, typename INDEX_TYPE , typename LAMBDA >
void forValuesInSlice (ArraySlice< T, NDIM, USD, INDEX_TYPE > const slice, LAMBDA &&f)
 Iterate over the values in the slice in lexicographic order. More...
 
template<typename T , typename LAMBDA , typename ... INDICES>
void forValuesInSliceWithIndices (T &value, LAMBDA &&f, INDICES const ... indices)
 Apply the function f to the value value also passing f any indices used to reach value. More...
 
template<typename T , int NDIM, int USD, typename INDEX_TYPE , typename LAMBDA , typename ... INDICES>
void forValuesInSliceWithIndices (ArraySlice< T, NDIM, USD, INDEX_TYPE > const slice, LAMBDA &&f, INDICES const ... indices)
 Iterate over the values in the slice in lexicographic order, passing the indices as well as the value to the lambda. More...
 
template<typename T , int USD_SRC, typename INDEX_TYPE >
void sumOverFirstDimension (ArraySlice< T const, 1, USD_SRC, INDEX_TYPE > const src, T &dst)
 Add the values in src to dst. More...
 
template<typename T , int NDIM, int USD_SRC, int USD_DST, typename INDEX_TYPE >
void sumOverFirstDimension (ArraySlice< T const, NDIM, USD_SRC, INDEX_TYPE > const src, ArraySlice< T, NDIM - 1, USD_DST, INDEX_TYPE > const dst)
 Sum over the first dimension of src adding the results to dst. More...
 

Variables

template<typename >
constexpr bool isArray = false
 True if the template type is an Array.
 
template<typename T , int NDIM, typename PERMUTATION , typename INDEX_TYPE , template< typename > class BUFFER_TYPE>
constexpr bool isArray< Array< T, NDIM, PERMUTATION, INDEX_TYPE, BUFFER_TYPE > > = true
 Specialization of isArray for the Array class. More...
 
template<class >
constexpr bool isArrayView = false
 True if the template type is a ArrayView.
 
template<typename T , int NDIM, int USD, typename INDEX_TYPE , template< typename > class BUFFER_TYPE>
constexpr bool isArrayView< ArrayView< T, NDIM, USD, INDEX_TYPE, BUFFER_TYPE > > = true
 Specialization of isArrayView for the ArrayView class. More...
 
template<class >
constexpr bool isSortedArray = false
 True if the template type is a SortedArray.
 
template<class T , class INDEX_TYPE , template< typename > class BUFFER_TYPE>
constexpr bool isSortedArray< SortedArray< T, INDEX_TYPE, BUFFER_TYPE > > = true
 Specialization of isSortedArrayView for the SortedArray class. More...
 
template<class >
constexpr bool isSortedArrayView = false
 True if the template type is a SortedArrayView.
 
template<class T , class INDEX_TYPE , template< typename > class BUFFER_TYPE>
constexpr bool isSortedArrayView< SortedArrayView< T, INDEX_TYPE, BUFFER_TYPE > > = true
 Specialization of isSortedArrayView for the SortedArrayView class. More...
 

Detailed Description

The top level namespace.

Typedef Documentation

◆ StackArray

template<typename T , int NDIM, typename PERMUTATION , typename INDEX_TYPE , int LENGTH>
using LvArray::StackArray = typedef typename internal::StackArrayHelper< T, NDIM, PERMUTATION, INDEX_TYPE, LENGTH >::type

An alias for a Array backed by a StackBuffer.

Template Parameters
TThe type of the values stored in the Array.
NDIMThe number of dimensions in the Array.
PERMUTATIONThe layout of the data in memory.
INDEX_TYPEThe integer used for indexing.
LENGTHThe capacity of the backing c-array.

Definition at line 752 of file Array.hpp.

Function Documentation

◆ forValuesInSlice() [1/2]

template<typename T , typename LAMBDA >
void LvArray::forValuesInSlice ( T &  value,
LAMBDA &&  f 
)

Apply the given function to the given value.

Template Parameters
TThe type of value.
LAMBDAthe type of the function f to apply.
Parameters
valuethe value to pass to the function.
fthe function to apply to the value.

Definition at line 31 of file sliceHelpers.hpp.

◆ forValuesInSlice() [2/2]

template<typename T , int NDIM, int USD, typename INDEX_TYPE , typename LAMBDA >
void LvArray::forValuesInSlice ( ArraySlice< T, NDIM, USD, INDEX_TYPE > const  slice,
LAMBDA &&  f 
)

Iterate over the values in the slice in lexicographic order.

Template Parameters
TThe type of values stored in slice.
NDIMthe dimension of slice.
USDthe unit stride dimension of slice.
INDEX_TYPEthe integer used to index into slice.
LAMBDAthe type of the function f to apply.
Parameters
slicethe slice to iterate over.
fthe function to apply to each value.

Definition at line 47 of file sliceHelpers.hpp.

◆ forValuesInSliceWithIndices() [1/2]

template<typename T , typename LAMBDA , typename ... INDICES>
void LvArray::forValuesInSliceWithIndices ( T &  value,
LAMBDA &&  f,
INDICES const ...  indices 
)

Apply the function f to the value value also passing f any indices used to reach value.

Template Parameters
TThe type of value.
INDICESvariadic pack of indices.
LAMBDAthe type of the function f to apply.
Parameters
valueThe value to apply f to.
fThe function to apply to each value.
indicesThe previous sliced off indices.

Definition at line 68 of file sliceHelpers.hpp.

◆ forValuesInSliceWithIndices() [2/2]

template<typename T , int NDIM, int USD, typename INDEX_TYPE , typename LAMBDA , typename ... INDICES>
void LvArray::forValuesInSliceWithIndices ( ArraySlice< T, NDIM, USD, INDEX_TYPE > const  slice,
LAMBDA &&  f,
INDICES const ...  indices 
)

Iterate over the values in the slice in lexicographic order, passing the indices as well as the value to the lambda.

Template Parameters
TThe type of values stored in slice.
NDIMthe dimension of slice.
USDthe unit stride dimension of slice.
INDEX_TYPEthe integer used to index into slice.
INDICESvariadic pack of indices.
LAMBDAthe type of the function f to apply.
Parameters
sliceThe slice to iterate over.
fThe lambda to apply to each value.
indicesThe previous sliced off indices.

Definition at line 87 of file sliceHelpers.hpp.

◆ integerConversion() [1/3]

template<typename OUTPUT , typename INPUT >
std::enable_if_t< internal::canEasilyConvert< INPUT, OUTPUT >, OUTPUT > constexpr LvArray::integerConversion ( INPUT  input)
inline
Template Parameters
INPUTThe input integer type.
OUTPUTThe output integer type.
Returns
Return input to type
Template Parameters
OUTPUT,abortingexecution if the conversion can't be performed.
Parameters
inputThe value to convert.

Definition at line 137 of file limits.hpp.

◆ integerConversion() [2/3]

template<typename OUTPUT , typename INPUT >
std::enable_if_t< !internal::canEasilyConvert< INPUT, OUTPUT > && std::is_unsigned< INPUT >::value, OUTPUT > LvArray::integerConversion ( INPUT  input)
inline
Template Parameters
INPUTThe input integer type.
OUTPUTThe output integer type.
Returns
Return input to type
Template Parameters
OUTPUT,abortingexecution if the conversion can't be performed.
Parameters
inputThe value to convert.

Definition at line 157 of file limits.hpp.

◆ integerConversion() [3/3]

template<typename OUTPUT , typename INPUT >
std::enable_if_t< !internal::canEasilyConvert< INPUT, OUTPUT > && !std::is_unsigned< INPUT >::value, OUTPUT > LvArray::integerConversion ( INPUT  input)
inline
Template Parameters
INPUTThe input integer type.
OUTPUTThe output integer type.
Returns
Return input to type
Template Parameters
OUTPUT,abortingexecution if the conversion can't be performed.
Parameters
inputThe value to convert.

Definition at line 178 of file limits.hpp.

◆ memcpy() [1/4]

template<typename T , int NDIM, int USD, typename DST_INDEX_TYPE , typename SRC_INDEX_TYPE >
void LvArray::memcpy ( ArraySlice< T, NDIM, USD, DST_INDEX_TYPE > const  dst,
ArraySlice< T const, NDIM, USD, SRC_INDEX_TYPE > const  src 
)

Use memcpy to copy src in to dst.

Template Parameters
TThe type contined by dst and src.
NDIMThe number of dimensions in dst and src.
DST_USDThe unit stride dimension of dst and src.
DST_INDEX_TYPEThe index type of dst.
SRC_INDEX_TYPEThe index type of src.
Parameters
dstThe destination slice.
srcThe source slice.

If both src and dst were allocated with Umpire then the Umpire ResouceManager is used to perform the copy, otherwise std::memcpy is used.

Definition at line 74 of file memcpy.hpp.

◆ memcpy() [2/4]

template<typename T , int NDIM, int USD, typename DST_INDEX_TYPE , typename SRC_INDEX_TYPE >
camp::resources::Event LvArray::memcpy ( camp::resources::Resource &  resource,
ArraySlice< T, NDIM, USD, DST_INDEX_TYPE > const  dst,
ArraySlice< T const, NDIM, USD, SRC_INDEX_TYPE > const  src 
)

Use memcpy to (maybe asynchronously) copy src in to dst.

Template Parameters
TThe type contined by dst and src.
NDIMThe number of dimensions in dst and src.
DST_USDThe unit stride dimension of dst and src.
DST_INDEX_TYPEThe index type of dst.
SRC_INDEX_TYPEThe index type of src.
Parameters
resourceThe resource to use.
dstThe destination slice.
srcThe source slice.
Returns
An event corresponding to the copy.

If both src and dst were allocated with Umpire then the Umpire ResouceManager is used to perform the copy, otherwise std::memcpy is used. Umpire does not currently support asynchronous copying with host resources, in fact it does not even support synchronous copying with host resources. As such if a resource wraps a resource of type camp::resouces::Host the method that doesn't take a resource is used.

Definition at line 108 of file memcpy.hpp.

◆ memcpy() [3/4]

template<std::size_t N_DST_INDICES, std::size_t N_SRC_INDICES, typename T , int DST_NDIM, int DST_USD, typename DST_INDEX_TYPE , template< typename > class DST_BUFFER, int SRC_NDIM, int SRC_USD, typename SRC_INDEX_TYPE , template< typename > class SRC_BUFFER>
void LvArray::memcpy ( ArrayView< T, DST_NDIM, DST_USD, DST_INDEX_TYPE, DST_BUFFER > const &  dst,
std::array< DST_INDEX_TYPE, N_DST_INDICES > const &  dstIndices,
ArrayView< T const, SRC_NDIM, SRC_USD, SRC_INDEX_TYPE, SRC_BUFFER > const &  src,
std::array< SRC_INDEX_TYPE, N_SRC_INDICES > const &  srcIndices 
)

Copy the values from a slice of src into a slice of dst.

Template Parameters
N_DST_INDICESThe number of indices used to slice dst.
N_DST_INDICESThe number of indices used to slice src.
TThe type of the values contained by dst and src.
DST_NDIMThe number of dimensions in dst.
DST_USDThe unit stride dimension of dst.
DST_INDEX_TYPEThe index type of dst.
DST_BUFFERThe buffer type of dst.
SRC_NDIMThe number of dimensions in src.
SRC_USDThe unit stride dimension of src.
SRC_INDEX_TYPEThe index type of src.
SRC_BUFFERThe buffer type of src.
Parameters
dstThe destination array.
dstIndicesThe indices used to slice dst.
srcThe source array.
srcIndicesThe indices used to slice src.

The copy occurs from the current space of src to the current space of dst. Each array is moved to their current space.

Array2d< T > x( 10, 10 );
Array1d< T > y( 10 );
// Set x[ 5 ][ : ] = y[ : ]
memcpy< 1, 0 >( x, { 5 }, y, {} );

Definition at line 155 of file memcpy.hpp.

◆ memcpy() [4/4]

template<std::size_t N_DST_INDICES, std::size_t N_SRC_INDICES, typename T , int DST_NDIM, int DST_USD, typename DST_INDEX_TYPE , template< typename > class DST_BUFFER, int SRC_NDIM, int SRC_USD, typename SRC_INDEX_TYPE , template< typename > class SRC_BUFFER>
camp::resources::Event LvArray::memcpy ( camp::resources::Resource &  resource,
ArrayView< T, DST_NDIM, DST_USD, DST_INDEX_TYPE, DST_BUFFER > const &  dst,
std::array< DST_INDEX_TYPE, N_DST_INDICES > const &  dstIndices,
ArrayView< T const, SRC_NDIM, SRC_USD, SRC_INDEX_TYPE, SRC_BUFFER > const &  src,
std::array< SRC_INDEX_TYPE, N_SRC_INDICES > const &  srcIndices 
)

Copy the values from a slice of src into a slice of dst using resource (may be asynchronous).

Template Parameters
N_DST_INDICESThe number of indices used to slice dst.
N_DST_INDICESThe number of indices used to slice src.
TThe type of the values contained by dst and src.
DST_NDIMThe number of dimensions in dst.
DST_USDThe unit stride dimension of dst.
DST_INDEX_TYPEThe index type of dst.
DST_BUFFERThe buffer type of dst.
SRC_NDIMThe number of dimensions in src.
SRC_USDThe unit stride dimension of src.
SRC_INDEX_TYPEThe index type of src.
SRC_BUFFERThe buffer type of src.
Parameters
resourceThe resource to use.
dstThe destination array.
dstIndicesThe indices used to slice dst.
srcThe source array.
srcIndicesThe indices used to slice src.
Returns
An event corresponding to the copy.

The copy occurs from the current space of src to the current space of dst. Each array is moved to their current space.

Definition at line 202 of file memcpy.hpp.

◆ operator<<() [1/10]

std::ostream& LvArray::operator<< ( std::ostream &  os,
MemorySpace const  space 
)
inline

Output a Platform enum to a stream.

Parameters
osThe output stream to write to.
spaceThe MemorySpace to output.
Returns
os.

Definition at line 39 of file bufferManipulation.hpp.

◆ operator<<() [2/10]

template<typename T , int NDIM, int USD, typename INDEX_TYPE >
std::ostream& LvArray::operator<< ( std::ostream &  stream,
::LvArray::ArraySlice< T, NDIM, USD, INDEX_TYPE > const  slice 
)

This function outputs the contents of an array slice to an output stream.

Template Parameters
TThe type of the values in slice.
NDIMThe number of dimensions of slice.
USDThe unit stride dimension of slice.
INDEX_TYPEThe integer used by slice.
Parameters
streamThe output stream to write to.
sliceThe slice to output.
Returns
stream .

Definition at line 49 of file output.hpp.

◆ operator<<() [3/10]

template<typename T , int NDIM, int USD, typename INDEX_TYPE , template< typename > class BUFFER_TYPE>
std::ostream& LvArray::operator<< ( std::ostream &  stream,
::LvArray::ArrayView< T, NDIM, USD, INDEX_TYPE, BUFFER_TYPE > const &  view 
)

This function outputs the contents of an ArrayView to an output stream.

Template Parameters
TThe type of the values in view.
NDIMThe number of dimensions of view.
USDThe unit stride dimension of view.
INDEX_TYPEThe integer used by view.
BUFFER_TYPEThe buffer type used by view.
Parameters
streamThe output stream to write to.
viewThe view to output.
Returns
stream .

Definition at line 86 of file output.hpp.

◆ operator<<() [4/10]

template<typename T , typename INDEX_TYPE , template< typename > class BUFFER_TYPE>
std::ostream& LvArray::operator<< ( std::ostream &  stream,
SortedArrayView< T const, INDEX_TYPE, BUFFER_TYPE > const &  view 
)

This function outputs the contents of view to an output stream.

Template Parameters
TThe type of the values in view.
INDEX_TYPEThe integer used by view.
Parameters
streamThe output stream to write to.
viewThe SortedArrayView to output.
Returns
stream .

Definition at line 99 of file output.hpp.

◆ operator<<() [5/10]

template<typename T , typename INDEX_TYPE , template< typename > class BUFFER_TYPE>
std::ostream& LvArray::operator<< ( std::ostream &  stream,
SortedArray< T, INDEX_TYPE, BUFFER_TYPE > const &  array 
)

This function outputs the contents of array to an output stream.

Template Parameters
TThe type of the values in array.
INDEX_TYPEThe integer used by array.
Parameters
streamThe output stream to write to.
arrayThe SortedArray to output.
Returns
stream .

Definition at line 133 of file output.hpp.

◆ operator<<() [6/10]

template<typename T , typename INDEX_TYPE , template< typename > class BUFFER_TYPE>
std::ostream& LvArray::operator<< ( std::ostream &  stream,
ArrayOfArraysView< T const, INDEX_TYPE const, true, BUFFER_TYPE > const &  view 
)

This function outputs the contents of view to an output stream.

Template Parameters
TThe type of the values in view.
INDEX_TYPEThe integer used by view.
Parameters
streamThe output stream to write to.
viewThe ArrayOfArraysView to output.
Returns
stream .

Definition at line 146 of file output.hpp.

◆ operator<<() [7/10]

template<typename T , typename INDEX_TYPE , template< typename > class BUFFER_TYPE>
std::ostream& LvArray::operator<< ( std::ostream &  stream,
ArrayOfArrays< T, INDEX_TYPE, BUFFER_TYPE > const &  array 
)

This function outputs the contents of array to an output stream.

Template Parameters
TThe type of the values in array.
INDEX_TYPEThe integer used by array.
Parameters
streamThe output stream to write to.
arrayThe ArrayOfArrays to output.
Returns
stream .

Definition at line 175 of file output.hpp.

◆ operator<<() [8/10]

template<typename T , typename COL_TYPE , typename INDEX_TYPE , template< typename > class BUFFER_TYPE>
std::ostream& LvArray::operator<< ( std::ostream &  stream,
CRSMatrixView< T const, COL_TYPE const, INDEX_TYPE const, BUFFER_TYPE > const &  view 
)

This function outputs the contents of view to an output stream.

Template Parameters
TThe type of the values in view.
INDEX_TYPEThe integer used by view.
Parameters
streamThe output stream to write to.
viewThe ArrayOfArraysView to output.
Returns
stream .

Definition at line 188 of file output.hpp.

◆ operator<<() [9/10]

template<typename T , int N>
std::enable_if_t< !std::is_same< T, char >::value, std::ostream & > LvArray::operator<< ( std::ostream &  stream,
T const (&)  array[N] 
)

Output a c-array to a stream.

Template Parameters
TThe type contained in the array.
NThe size of the array.
Parameters
streamThe output stream to write to.
arrayThe c-array to output.
Returns
stream.

Definition at line 268 of file output.hpp.

◆ operator<<() [10/10]

template<typename T , int M, int N>
std::ostream& LvArray::operator<< ( std::ostream &  stream,
T const (&)  array[M][N] 
)

Output a 2D c-array to a stream.

Template Parameters
TThe type contained in the array.
MThe size of the first dimension.
NThe size of the second dimension.
Parameters
streamThe output stream to write to.
arrayThe 2D c-array to output.
Returns
stream.

Definition at line 289 of file output.hpp.

◆ print()

template<typename POLICY , typename T , typename COL_TYPE , typename INDEX_TYPE , template< typename > class BUFFER_TYPE>
void LvArray::print ( CRSMatrixView< T const, COL_TYPE const, INDEX_TYPE const, BUFFER_TYPE > const &  view)

Print a CRSMatrixView in a format that can be easily xxdiff'ed on the console.

Template Parameters
POLICYThe policy for the kernel launch.
TThe value type in view.
TThe column type in view.
TThe index type in view.
BUFFER_TYPEThe type of buffer used by view.
Parameters
viewThe matrix view object to print.

Definition at line 214 of file output.hpp.

◆ sumOverFirstDimension() [1/2]

template<typename T , int USD_SRC, typename INDEX_TYPE >
void LvArray::sumOverFirstDimension ( ArraySlice< T const, 1, USD_SRC, INDEX_TYPE > const  src,
T &  dst 
)

Add the values in src to dst.

Template Parameters
TThe type of values stored in src.
NDIMthe dimension of src.
USD_SRCthe unit stride dimension of src.
INDEX_TYPEthe integer used to index into src.
Parameters
srcThe array slice to sum over.
dstThe value to add the sum to.

Definition at line 108 of file sliceHelpers.hpp.

◆ sumOverFirstDimension() [2/2]

template<typename T , int NDIM, int USD_SRC, int USD_DST, typename INDEX_TYPE >
void LvArray::sumOverFirstDimension ( ArraySlice< T const, NDIM, USD_SRC, INDEX_TYPE > const  src,
ArraySlice< T, NDIM - 1, USD_DST, INDEX_TYPE > const  dst 
)

Sum over the first dimension of src adding the results to dst.

Template Parameters
TThe type of values stored in src.
NDIMthe dimension of src.
USD_SRCthe unit stride dimension of src.
USD_DSTthe unit stride dimension of dst.
INDEX_TYPEthe integer used to index into src and dst.
Parameters
srcThe slice to sum over.
dstThe slice to add to.

Definition at line 129 of file sliceHelpers.hpp.

Variable Documentation

◆ isArray< Array< T, NDIM, PERMUTATION, INDEX_TYPE, BUFFER_TYPE > >

template<typename T , int NDIM, typename PERMUTATION , typename INDEX_TYPE , template< typename > class BUFFER_TYPE>
constexpr bool LvArray::isArray< Array< T, NDIM, PERMUTATION, INDEX_TYPE, BUFFER_TYPE > > = true

Specialization of isArray for the Array class.

Template Parameters
TThe type contained in the Array.
NDIMThe number of dimensions in the Array.
PERMUTATIONThe way that the data is layed out in memory.
INDEX_TYPEThe integral type used as an index.
BUFFER_TYPEThe type used to manage the underlying allocation.

Definition at line 704 of file Array.hpp.

◆ isArrayView< ArrayView< T, NDIM, USD, INDEX_TYPE, BUFFER_TYPE > >

template<typename T , int NDIM, int USD, typename INDEX_TYPE , template< typename > class BUFFER_TYPE>
constexpr bool LvArray::isArrayView< ArrayView< T, NDIM, USD, INDEX_TYPE, BUFFER_TYPE > > = true

Specialization of isArrayView for the ArrayView class.

Template Parameters
TThe type contained in the ArrayView.
NDIMThe number of dimensions in the ArrayView.
USDThe unit stride dimension.
INDEX_TYPEThe integral type used as an index.
BUFFER_TYPEThe type used to manager the underlying allocation.

Definition at line 780 of file ArrayView.hpp.

◆ isSortedArray< SortedArray< T, INDEX_TYPE, BUFFER_TYPE > >

template<class T , class INDEX_TYPE , template< typename > class BUFFER_TYPE>
constexpr bool LvArray::isSortedArray< SortedArray< T, INDEX_TYPE, BUFFER_TYPE > > = true

Specialization of isSortedArrayView for the SortedArray class.

Template Parameters
TThe type contained in the SortedArray.
INDEX_TYPEThe integral type used as an index.
BUFFER_TYPEThe type used to manager the underlying allocation.

Definition at line 406 of file SortedArray.hpp.

◆ isSortedArrayView< SortedArrayView< T, INDEX_TYPE, BUFFER_TYPE > >

template<class T , class INDEX_TYPE , template< typename > class BUFFER_TYPE>
constexpr bool LvArray::isSortedArrayView< SortedArrayView< T, INDEX_TYPE, BUFFER_TYPE > > = true

Specialization of isSortedArrayView for the SortedArrayView class.

Template Parameters
TThe type contained in the SortedArrayView.
INDEX_TYPEThe integral type used as an index.
BUFFER_TYPEThe type used to manager the underlying allocation.

Definition at line 316 of file SortedArrayView.hpp.