Is it possible to use custom types in OpenCL kernel like gmp types (mpz_t, mpq_t, …) ?
To have something like this (this kernel doesn't build just because of #include <gmp.h>
) :
#include <gmp.h> __kernel square( __global mpz_t* input, __global mpz_t number, __global int* output, const unsigned int count) { int i = get_global_id(0); if(i < count) output[i] = mpz_divisible_p(number,input[i]); }
Maybe by adding different arguments to the fourth parameter (options) of clBuildProgram
?
Or does OpenCL already have types that can handle large numbers ?