I am new in OpenCL. I want to tranfer a type int parameter in the kernel to do the operations, but I don't know how to do this. I have only worked with vectors and matrix, but I have never transfer an atribute.
If I have this code example below:
typedef struct{
int fila;
int columna;
int value;
}Matrix;
int main(){
Matrix matrix;
matrix.row = 56;
matrix.column = 64;
matrix.value = 0;
float A[matrix.fila][matrix.columna];
}
In the kernel:
__kernel void matrix(__global int vue) {
value = value + 10; //it is only an example
}
Can I do that operation above of "matrix.valor" (value + 10) in the kernel?? Or it is only for vectors and matrix operations? Do I need cl_mem or it is not necessary? I'am currently lost with this.