Commit 58122acc authored by David Rohr's avatar David Rohr

Fix Line Endings

parent 4f312113
......@@ -37,12 +37,12 @@ ostream& operator<<(ostream& os, const vector<T>& v)
bioem::bioem()
{
}
bioem::~bioem()
{
}
int bioem::configure(int ac, char* av[])
......@@ -119,18 +119,18 @@ int bioem::configure(int ac, char* av[])
cout << "Reading model file in PDB format.\n";
Model.readPDB=true;
}
if (vm.count("DumpMaps"))
{
cout << "Dumping Maps after reading from file.\n";
RefMap.dumpMap = true;
}
if (vm.count("LoadMapDump"))
{
cout << "Loading Map dump.\n";
RefMap.loadMap = true;
}
}
if (vm.count("Particlesfile"))
{
......@@ -163,11 +163,11 @@ int bioem::configure(int ac, char* av[])
/****************** Precalculating Necessary Stuff *********************/
precalculate();
param.nTotGridAngles = 10;
param.nTotCTFs = 10;
//param.param_device.maxDisplaceCenter = 0;
deviceInit();
return(0);
......@@ -231,7 +231,7 @@ int bioem::run()
deviceStartRun();
/******************************** MAIN CYCLE ******************************************/
/*** Declaring Private variables for each thread *****/
mycomplex_t* proj_mapFFT;
bioem_map conv_map;
......@@ -280,7 +280,7 @@ int bioem::run()
}
//deallocating fftw_complex vector
fftw_free(proj_mapFFT);
deviceFinishRun();
/************* Writing Out Probabilities ***************/
......@@ -324,7 +324,6 @@ int bioem::run()
}
}
}
angProbfile.close();
......
......@@ -32,7 +32,7 @@ __device__ static inline void compareRefMap(const int iRefMap, const int iOrient
#endif
/****** Loop over Pixels to calculate dot product and cross-correlations of displaced Ref Conv. Map***/
myfloat_t logpro;
if (GPUAlgo != 2 || threadActive)
if (GPUAlgo != 2 || threadActive)
{
int iStart, jStart, iEnd, jEnd;
if (cent_x < 0)
......@@ -97,7 +97,7 @@ __device__ static inline void compareRefMap(const int iRefMap, const int iOrient
sumsquare = _mm_cvtss_f32(sumsquare_v);
crossproMapConv = _mm_cvtss_f32(cross_v);
#endif
/********** Calculating elements in BioEM Probability formula ********/
// Related to Reference calculated Projection
const myfloat_t ForLogProb = (sumsquare * param.Ntotpi - sum * sum);
......@@ -122,20 +122,20 @@ __device__ static inline void compareRefMap(const int iRefMap, const int iOrient
myfloat_t* buf2 = &buf[myBlockDimX];
myfloat_t* buf3 = &buf2[myBlockDimX + 4 * myRef];
int* bufint = (int*) buf3;
buf[myThreadIdxX] = logpro;
if (myShift == 0)
{
bufint[0] = 0;
}
__syncthreads();
if (nShifts2 == CUDA_MAX_SHIFT_REDUCE) // 1024
{
if (myShift < 512) if (buf[myThreadIdxX + 512] > buf[myThreadIdxX]) buf[myThreadIdxX] = buf[myThreadIdxX + 512];
__syncthreads();
}
if (nShifts2 >= 512)
{
if (myShift < 256) if (buf[myThreadIdxX + 256] > buf[myThreadIdxX]) buf[myThreadIdxX] = buf[myThreadIdxX + 256];
......@@ -186,23 +186,23 @@ __device__ static inline void compareRefMap(const int iRefMap, const int iOrient
}
}
}
__syncthreads();
if (bufint[0] == 1 && buf3[1] == logpro && iRefMap < RefMap.ntotRefMap && atomicAdd(&bufint[0], 1) == 1)
{
pProb[iRefMap].max_prob_cent_x = cent_x;
pProb[iRefMap].max_prob_cent_y = cent_y;
}
__syncthreads();
if (iRefMap < RefMap.ntotRefMap)
{
buf[myThreadIdxX] = exp(logpro - pProb[iRefMap].Constoadd);
buf2[myThreadIdxX] = exp(logpro - pProb[iRefMap].ConstAngle[iOrient]);
}
__syncthreads();
if (nShifts2 == CUDA_MAX_SHIFT_REDUCE) // 1024
{
if (myShift < 512)
......@@ -212,7 +212,7 @@ __device__ static inline void compareRefMap(const int iRefMap, const int iOrient
}
__syncthreads();
}
if (nShifts2 >= 512)
{
if (myShift < 256)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment