This iteration of the transformation is rather basic, with functions broken down into bare essentials. They may be transformed into slightly more complicated functions as time goes on. For now, here is what their equivalents are, using example code: err = clGetDeviceIDs(NULL, gpu ? CL_DEVICE_TYPE_GPU : CL_DEVICE_TYPE_CPU, 1, &device_id, NULL); This function in openCL will query for devices then put their ID into the pointer &device_id. In the transformation it puts in arbitrary numbers for ID. This only takes up the 3rd and 4th parameter, the 3rd for the number of devices, but also uses the name of the pointer in the 4th place. {{{ int device_id[NUM_DEVICES]; //put device_ids for(int i = 0; i < NUM_DEVICES; i++) { device_id[i] = i; } }}} kernel = clCreateKernel(program, "square", &err); Creates the kernel using data from the program, and the name of the function. In the transformation it chooses which function to use. Currently unimplemented. input = clCreateBuffer(context, CL_MEM_READ_ONLY, sizeof(float) * count, NULL, NULL); clCreateBuffer creates a buffer object with certain types of information attached to it. In the .cvl it only uses the right side with the third parameter, and mallocs space for it {{{ input = (int *) malloc(sizeof(int) * count); }}} err = clEnqueueWriteBuffer(commands, input, CL_TRUE, 0, sizeof(float) * count, data, 0, NULL, NULL); clEnqueueWriteBuffer writes to a buffer with extra data. In the transformation it is currently a memcpy. {{{ memcpy(input, data, sizeof(int) * count); }}}