There currently is no support for char or short data types in the Brook+ language, see brookspec-v1.pdf section 3.1 and 3.2 for available primitive types. If you wish to have 8bit or 16bit data types you would have to do the manual packing into the int data type, do your calculations, and mask off the upper 16/24 bits when you repack your data.
Thank for your comment.
I want to inplement Video encoder (input is yuv that each parameter is 8bit) on the brook+. It's slower than cpu that I use your idea.
Please tell me that How to describe on the brook+.
Why would it be slower on the GPU to use ints than on the CPU using chars??
The precision via conversion wouldn't be a problem I would imagine.
I found out a reason why it's slower, because "streamRead" and "streamWrite" are slow.
I described follow like that codes. Is it the specification about proccesing speed for "streamRead/Write" ?
int *a, *b, *c;
int out_c<1088, 480 >;
int in_a< 1088, 480 >;
int in_b< 1088, 480 >;
a = (int*)malloc(sizeof(int)*1088*480);
b = (int*)malloc(sizeof(int)*1088*480);
c = (int*)malloc(sizeof(int)*1088*480);
// CPU -> GPU
streamRead( in_a, a);
streamRead( in_b, b);
// involving kernel
StartKernel(in_a, in_b, out_c);
// GPU -> CPU
streamWrite( out_c, c);