Skip to content

Commit e86eeab

Browse files
committed
Merge branch 'master' of https://github.com/vortexgpgpu/vortex
2 parents 7cdfac8 + 32497e1 commit e86eeab

File tree

1 file changed

+10
-20
lines changed

1 file changed

+10
-20
lines changed

tests/regression/stencil3d/main.cpp

+10-20
Original file line numberDiff line numberDiff line change
@@ -120,29 +120,19 @@ static void stencil_cpu(TYPE *out, const TYPE *in, uint32_t width, uint32_t heig
120120

121121
// Check bounds and replicate the boundary values
122122
if (nx < 0)
123-
{
124-
nx = 0;
125-
}
123+
{nx = 0;}
126124
else if (nx >= (int)width)
127-
{
128-
nx = width - 1;
129-
}
125+
{nx = width - 1;}
126+
130127
if (ny < 0)
131-
{
132-
ny = 0;
133-
}
128+
{ny = 0;}
134129
else if (ny >= (int)height)
135-
{
136-
ny = height - 1;
137-
}
130+
{ny = height - 1;}
131+
138132
if (nz < 0)
139-
{
140-
nz = 0;
141-
}
133+
{nz = 0;}
142134
else if (nz >= (int)depth)
143-
{
144-
nz = depth - 1;
145-
}
135+
{nz = depth - 1;}
146136

147137
// Sum up the values
148138
sum += in[nz * width * height + ny * width + nx];
@@ -238,8 +228,8 @@ int main(int argc, char *argv[])
238228
uint32_t buf_size = size_cubed * sizeof(TYPE);
239229

240230
std::cout << "data type: " << Comparator<TYPE>::type_str() << std::endl;
241-
std::cout << "matrix size: " << size << "x" << size << std::endl;
242-
std::cout << "block size: " << block_size << "x" << block_size << std::endl;
231+
std::cout << "matrix size: " << size << "x" << size << "x" << size << std::endl;
232+
std::cout << "block size: " << block_size << "x" << block_size << "x" << block_size << std::endl;
243233

244234
kernel_arg.grid_dim[0] = size / block_size;
245235
kernel_arg.grid_dim[1] = size / block_size;

0 commit comments

Comments
 (0)