Category : opencl

I wrote the following kernel code, but it gave me the following warning. I have tried different solutions but failed. plz any suggestion would help `26:48: warning: incompatible integer to pointer conversion passing ‘__global int’ to parameter of type ‘int *’ array_dist[i] = Euclidean_distance(X_train[i], data_point[j]); my kernel code: inline float Euclidean_distance(int * array_point_A, int * ..

Read more

I am asked to implement the following code into OpenCL, as you notice the function accepts 1D and 2D std::array types. Below is my attempt to write the kernel function. My question is: Is this a correct start? The original function: int KNN_classifier(array<array<int, 20>, 4344>& array_X_train, array<int, 4344>& array_Y_train, int k, array<int, 20>& data_point) { ..

Read more

I am new to OpenCL and I am asked to implement a kerenl (device code) for the attached c++ code. I tried to start writing kernel but not sure if this is correct try or not. Can you please read my c++ code and my kernel to check if this is how I should write ..

Read more