#include "fastHoughGPU_kernel.cuh" //__constant__ float* clusterPos_d; //TODO: make clusterPos (paramPos, outp of riemannTransform) CONSTANT __constant__ float globalMins_d[5]; __constant__ float globalMaxs_d[5]; __global__ void riemannTransform(float* clPos, float* paramPos, int nClusters, float SCALING) { //can we make something SHARED here? int tID = blockIdx.x * blockDim.x + threadIdx.x; if(tID 0); } } //has to be tested if this is good or bad for performance if(signs1 == 0 || signs1 == 4) continue; //test for interesection in (phi, theta, c) ------------ float phi1 = proj0[n*2]*(_maxs[0] - _mins[0]) + 90; float phi2 = proj0[n*2+1]*(_maxs[0] - _mins[0]) + 90; float phiCoords[2] = {phi1, phi2}; float theta1 = (proj1[n*2] + 0.5)* (_maxs[1] - _mins[1]) +_mins[1]; float theta2 = (proj1[n*2+1] + 0.5)* (_maxs[1] - _mins[1]) +_mins[1]; float thetaCoords[2] = {theta1, theta2}; float c1 = proj2[n*2] * (_maxs[2] - _mins[2]); float c2 = proj2[n*2+1] * (_maxs[2] - _mins[2]) ; int sign=0; for(int p=0; p<2; p++) for(int t=0; t<2; t++) { float n1 = __sinf(thetaCoords[t]*PI_180)*__cosf(phiCoords[p]*PI_180); float n2 = __sinf(thetaCoords[t]*PI_180)*__sinf(phiCoords[p]*PI_180); float n3 = __cosf(thetaCoords[t]*PI_180); float c = x_R*n1 + y_R*n2 + z_R*n3; sign+=(int)(c1-c > 0); sign+=(int)(c2-c > 0); } if(sign == 32 || sign==0) continue; atomicAdd(&(votes[n]),(uint)1); } } }