blob: 84e6fb9423158e362250e007af3936b7b038ca8e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
#include <stdio.h>
#include <stdlib.h>
#include <CL/cl.h>
#include "util.h"
int main(int argc, char ** argv)
{
cl_int error;
struct cltest_context context;
unsigned i;
int out_data[10];
size_t global_work_size = 10;
clTestSimpleInit(&context, "global_id");
clTestSetOutputBuffer(&context, sizeof(out_data));
clTestEnqueueNDRangeKernel(context.command_queue,
context.kernel,
1, &global_work_size, &global_work_size);
clTestReadOutput(&context, out_data, sizeof(out_data));
for (i = 0; i < 10; i++) {
fprintf(stderr, "id %u = %u\n", i, out_data[i]);
}
}
|