Brick Library 0.1
Performance-portable stencil datalayout & codegen
Loading...
Searching...
No Matches
Functions | Variables
brickcompare.h File Reference

Compare content from bricks with arrays. More...

#include <iostream>
#include <cmath>
#include "bricksetup.h"
#include "cmpconst.h"
Include dependency graph for brickcompare.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

template<unsigned dims, typename T >
bool compareBrick (const std::vector< long > &dimlist, const std::vector< long > &padding, const std::vector< long > &ghost, bElem *arr, unsigned *grid_ptr, T &brick)
 Compare values between bricks and an array.
 
template<unsigned dims, typename T >
bool compareBrick (const std::vector< long > &dimlist, bElem *arr, unsigned *grid_ptr, T &brick)
 Compare all values between bricks and an array without ghost or padding.
 

Variables

bool compareBrick_b
 Thread-private comparison accumulator.
 

Detailed Description

Compare content from bricks with arrays.

Function Documentation

◆ compareBrick() [1/2]

template<unsigned dims, typename T >
bool compareBrick ( const std::vector< long > &  dimlist,
bElem arr,
unsigned *  grid_ptr,
T &  brick 
)
inline

Compare all values between bricks and an array without ghost or padding.

Template Parameters
dims
T
Parameters
dimlist
arr
grid_ptr
brick
Returns

For parameters see compareBrick(const std::vector<long> &dimlist, const std::vector<long> &padding, const std::vector<long> &ghost, bElem *arr, unsigned *grid_ptr, T &brick)

◆ compareBrick() [2/2]

template<unsigned dims, typename T >
bool compareBrick ( const std::vector< long > &  dimlist,
const std::vector< long > &  padding,
const std::vector< long > &  ghost,
bElem arr,
unsigned *  grid_ptr,
T &  brick 
)
inline

Compare values between bricks and an array.

Template Parameters
dimsnumber of dimensions
Ttype for brick
Parameters
dimlistdimensions, contiguous first
paddingpadding applied to array format (skipped)
ghostpadding applied to array and brick (skipped)
arrarray input
grid_ptrthe grid array contains indices of bricks
brickthe brick data structure
Returns
False when not equal (with tolerance)

Variable Documentation

◆ compareBrick_b

bool compareBrick_b
extern

Thread-private comparison accumulator.