inline void convertgeno(int genoindex, int threadindex,int chunk,int packedstride, __global const packedgeno_t * packedgeno_matrix, __local packedgeno_t * geno, __local float * subset_geno, __local float * mapping ){ geno[threadindex] = packedgeno_matrix[genoindex*packedstride+chunk*SMALL_BLOCK_WIDTH+threadindex]; int t = 0; for(int b=0;b<4;++b){ for(int c=0;c<4;++c){ //subset_geno[threadindex * 16 + t] = 1; subset_geno[threadindex * 16 + t] = c2g(geno[threadindex].geno[b],c,mapping); ++t; } } }
static gboolean process (GeglOperation *operation, GeglBuffer *input, GeglBuffer *output, const GeglRectangle *result) { GeglChantO *o = GEGL_CHANT_PROPERTIES (operation); GeglRectangle compute; compute = gegl_operation_get_required_for_output (operation, "input",result); c2g (input, &compute, output, result, o->radius, o->samples, o->iterations, /*o->rgamma*/RGAMMA); return TRUE; }
void matrix_div(gsl_matrix_complex *V,unsigned l, unsigned c, double _Complex a){ double _Complex T1; T1=matrix_get(V,l,c); gsl_matrix_complex_set(V,l,c,c2g(T1/a)); }
void matrix_acc(gsl_matrix_complex *V,unsigned l, unsigned c, double _Complex a){ gsl_complex T1; T1=gsl_matrix_complex_get(V,l,c); gsl_matrix_complex_set(V,l,c,gsl_complex_add(T1,c2g(a))); }
void matrix_set(gsl_matrix_complex *V,unsigned l, unsigned c, double _Complex a){ gsl_matrix_complex_set(V,l,c,c2g(a)); }
void vector_acc(gsl_vector_complex *V,unsigned n, double _Complex a){ gsl_complex T1; T1=gsl_vector_complex_get(V,n); gsl_vector_complex_set(V,n,gsl_complex_add(T1,c2g(a))); }
void vector_set(gsl_vector_complex *V,unsigned n, double _Complex a){ gsl_vector_complex_set(V,n,c2g(a)); }
bool Matrix_Scale(gsl_matrix_complex *A, double _Complex s){ gsl_matrix_complex_scale(A, c2g(s)); return true; }
gsl_complex besselk(double nu, gsl_complex z){ return c2g(besselk(nu,g2c(z))); }