from init to kernel compilation. Next will be getting buffer handling, executing, and reading done. Changed the kernel to a more minimal example. Added a jump table for error codes and an assert function for error checking. Added a routine to compare all the available cl devices and platforms, chooses the high clock of either the GPU or CPU.
17 lines
305 B
Plaintext
17 lines
305 B
Plaintext
__kernel void hello(__global char* string)
|
|
{
|
|
string[0] = 'H';
|
|
string[1] = 'e';
|
|
string[2] = 'l';
|
|
string[3] = 'l';
|
|
string[4] = 'o';
|
|
string[5] = ',';
|
|
string[6] = ' ';
|
|
string[7] = 'W';
|
|
string[8] = 'o';
|
|
string[9] = 'r';
|
|
string[10] = 'l';
|
|
string[11] = 'd';
|
|
string[12] = '!';
|
|
string[13] = '\0';
|
|
} |