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

Fix Line Endings

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