15 height_bound_col :
for(j=0; j<
col_size; j++) {
16 height_bound_row :
for(k=0; k<
row_size; k++) {
17 sol[
INDX(row_size, col_size, k, j, 0)] = orig[
INDX(row_size, col_size, k, j, 0)];
22 col_bound_row :
for(k=0; k<
row_size; k++) {
23 sol[
INDX(row_size, col_size, k, 0, i)] = orig[
INDX(row_size, col_size, k, 0, i)];
24 sol[
INDX(row_size, col_size, k, col_size-1, i)] = orig[
INDX(row_size, col_size, k, col_size-1, i)];
27 row_bound_height :
for(i=1; i<height_size-1; i++) {
28 row_bound_col :
for(j=1; j<col_size-1; j++) {
36 loop_height :
for(i = 1; i < height_size - 1; i++){
37 loop_col :
for(j = 1; j < col_size - 1; j++){
38 loop_row :
for(k = 1; k <
row_size - 1; k++){
39 sum0 = orig[
INDX(row_size, col_size, k, j, i)];
40 sum1 = orig[
INDX(row_size, col_size, k, j, i + 1)] +
41 orig[
INDX(row_size, col_size, k, j, i - 1)] +
42 orig[
INDX(row_size, col_size, k, j + 1, i)] +
43 orig[
INDX(row_size, col_size, k, j - 1, i)] +
44 orig[
INDX(row_size, col_size, k + 1, j, i)] +
45 orig[
INDX(row_size, col_size, k - 1, j, i)];
48 sol[
INDX(row_size, col_size, k, j, i)] = mul0 +
mul1;
static const uint32_t k[]
void stencil3d(TYPE C[2], TYPE orig[SIZE], TYPE sol[SIZE])
#define INDX(_row_size, _col_size, _i, _j, _k)