Custom types in OpenCL kernel
Posted
by Studer
on Stack Overflow
See other posts from Stack Overflow
or by Studer
Published on 2010-03-11T09:30:20Z
Indexed on
2010/03/11
18:19 UTC
Read the original article
Hit count: 656
Is it possible to use custom types in OpenCL kernel like gmp types (mpz_t, mpq_t, …) ?
To have something like that (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]);
}
Or maybe does OpenCL already have types that can handle large numbers ?
© Stack Overflow or respective owner