Brick Library 0.1
Performance-portable stencil datalayout & codegen
Loading...
Searching...
No Matches
Functions
multiarray.cpp File Reference
#include "multiarray.h"
#include "cmpconst.h"
#include <iostream>
#include <random>
Include dependency graph for multiarray.cpp:

Functions

bElemuninitArray (const std::vector< long > &list, long &size)
 Create an uninitialized multidimensional array.
 
bElemrandomArray (const std::vector< long > &list)
 Create an multidimensional array initialized with random values.
 
bElemzeroArray (const std::vector< long > &list)
 Create an multidimensional array initialized with zeros.
 
bool compareArray (const std::vector< long > &list, bElem *arrA, bElem *arrB)
 Compare the value in two multidimensional arrays (within tolerance)
 

Function Documentation

◆ compareArray()

bool compareArray ( const std::vector< long > &  list,
bElem arrA,
bElem arrB 
)

Compare the value in two multidimensional arrays (within tolerance)

Parameters
[in]listdimensions
arrA
arrB
Returns
False when not equal

◆ randomArray()

bElem * randomArray ( const std::vector< long > &  list)

Create an multidimensional array initialized with random values.

Parameters
[in]listdimensions
Returns
pointer to the newly created array
Here is the call graph for this function:

◆ uninitArray()

bElem * uninitArray ( const std::vector< long > &  list,
long &  size 
)

Create an uninitialized multidimensional array.

Parameters
[in]listdimensions
[out]sizethe total size of the array in number of bElem
Returns
pointer to the newly created array

◆ zeroArray()

bElem * zeroArray ( const std::vector< long > &  list)

Create an multidimensional array initialized with zeros.

Parameters
[in]listdimensions
Returns
pointer to the newly created array
Here is the call graph for this function: