#include "utest_helper.hpp" typedef unsigned int uint; const int W = 16, H = 16; const int SIZE = W * H; uint in_1[SIZE]; uint disp_map[SIZE]; uint out_1[SIZE]; uint cpu(const int cx, const int cy, const uint *in, const uint *disp_map, int w, int h) { uint c = disp_map[cy * w + cx]; int x_pos = cx + c; int y_pos = cy + c; if(0 <= x_pos && x_pos < w && 0 <= y_pos && y_pos < h) return in[y_pos * w + x_pos]; else return 0; } void test() { OCL_MAP_BUFFER(2); for(int y=0; y