6#ifndef BRICK_BRICKCOMPARE_H
7#define BRICK_BRICKCOMPARE_H
16#pragma omp threadprivate(compareBrick_b)
30template<
unsigned dims,
typename T>
32compareBrick(
const std::vector<long> &dimlist,
const std::vector<long> &padding,
const std::vector<long> &ghost,
36 double diff = std::abs(
brick - *arr);
41#pragma omp parallel default(none)
46 iter_grid<dims>(dimlist, padding, ghost, arr, grid_ptr,
brick, f);
48#pragma omp parallel default(none) shared(ret)
71template<
unsigned dims,
typename T>
75 std::vector<long> padding(dimlist.size(), 0);
76 std::vector<long> ghost(dimlist.size(), 0);
78 return compareBrick<dims, T>(dimlist, padding, ghost, arr, grid_ptr,
brick);
bool compareBrick_b
Thread-private comparison accumulator.
Definition: brickcompare.cpp:3
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.
Definition: brickcompare.h:32
Brick iterator and setup code.
Tolerance for comparison.
#define BRICK_TOLERANCE
Definition: cmpconst.h:9
#define bElem
Basic datatype for all brick elements.
Definition: vecscatter.h:13
#define brick(...)
Inject stencil code for brick datalayout.
Definition: vecscatter.h:62