Commit 8d57662b authored by myron's avatar myron

cleaning

parent 5001afe6
......@@ -3784,7 +3784,7 @@ void CCspace_Sino_2_Slice( CCspace * self, float * dataA, int nslices, int ns
//---
if (self->params.DO_PRECONDITION*0) {
if (false && self->params.DO_PRECONDITION) {
fftwf_free(dumfftwf);
fftwf_free(drings_fourier);
fftwf_free(ramp_filter_fourier);
......@@ -4900,7 +4900,7 @@ void CCspace_tranpose_chunk (CCspace * self , int sn, int ntoktreated, int
tot=0;
float SUM=0.0;
for(jproc=0; jproc<self->nprocs; jproc++) {
sdispls[jproc]=tot;
......@@ -4917,7 +4917,7 @@ void CCspace_tranpose_chunk (CCspace * self , int sn, int ntoktreated, int
int myid = omp_get_thread_num();
long int mytot = tot;
for(int iproj=0 ;iproj<num_my_proj; iproj++) {
int k;
if(iproj%npbunches == myid ) {
memcpy( transmit_buffer+mytot*size1, Tptr + iproj*size0*size1 + (start_slice)*size1 ,(top_slice-start_slice)* size1*sizeof(float) );
}
......@@ -7218,7 +7218,7 @@ int roundfft(const long int N) {
const long int FA=2,FB=3,FC=5,FD=7,FE=11,FFF=13;
long int DIFF=9999999999;
long int RES=1;
long int R0=1;
long int AA=1;
long int BB,CC,DD,EE,FF;
int A,B,C,D,E,F;
......@@ -9010,9 +9010,8 @@ float rec_driver(CCspace *self, float **WORK,float *WORKbis,float *SLICEcalc, i
float * fptr = NULL;
if(do_2by2) {
int nseg = self->params.nprojs_span * dim_fft ;
fptr =malloc( sizeof(float)*2* nseg ) ;
fptr =(float*)malloc( sizeof(float)*2* nseg ) ;
float *wptr = WORK[0];
float tmp1=0, tmp2=0 ;
{
int i=0;
for( i=0; i< nseg; i++) {
......@@ -9230,7 +9229,7 @@ float rec_driver(CCspace *self, float **WORK,float *WORKbis,float *SLICEcalc, i
if(do_2by2) {
long int size = blockslice ;
float *tmp = malloc( sizeof(float)*size*2 ) ;
float *tmp = (float *)malloc( sizeof(float)*size*2 ) ;
{
long int i=0;
for(i=0; i< size; i++) {
......
......@@ -1052,7 +1052,7 @@ Cspace_configure_readings(PyObject *self_a, PyObject *args)
assert(dumint == dim1 );
// target = cpyutils_PyArray2D_as_array(Otmp, &dumint2, &dumint, pyarraytype ); \
// target = cpyutils_PyArray2D_as_array(Otmp, &dumint2, &dumint, pyarraytype );
......
......@@ -442,7 +442,9 @@ void read_data_from_h5( char * filename,
status = H5Sselect_hyperslab(dataspace, H5S_SELECT_SET, offset, NULL,
count, NULL);
assert(status>=0);
/*
* descrive la memoria su cui scrivo
*/
......@@ -462,6 +464,7 @@ void read_data_from_h5( char * filename,
count_out[2] = size1;
status = H5Sselect_hyperslab(memspace, H5S_SELECT_SET, offset_out, NULL,
count_out, NULL);
assert(status>=0);
/*
* Read data from hyperslab in the file into the hyperslab in
......@@ -477,8 +480,7 @@ void read_data_from_h5( char * filename,
status = H5Dread(dataset, H5T_NATIVE_FLOAT, memspace, dataspace,
H5P_DEFAULT, mytarget);
status=status;
assert(status>=0);
if(v_span > 1) {
......@@ -557,8 +559,8 @@ void read_data_from_h5_eli( char * filename,
pos0 = pos0 -ishift ;
int pos0_ = pos0-1;
int pos0_clipped=pos0;
if(pos0<0) pos0_clipped=0;
// int pos0_clipped=pos0;
// if(pos0<0) pos0_clipped=0;
int pos0_clipped_ = pos0_;
if(pos0_<0) pos0_clipped_=0;
......@@ -602,6 +604,7 @@ void read_data_from_h5_eli( char * filename,
status = H5Sselect_hyperslab(dataspace, H5S_SELECT_SET, offset, NULL,
count, NULL);
assert(status>=0);
/*
* descrive la memoria su cui scrivo
......@@ -624,7 +627,8 @@ void read_data_from_h5_eli( char * filename,
count_out[2] = size1;
status = H5Sselect_hyperslab(memspace, H5S_SELECT_SET, offset_out, NULL,
count_out, NULL);
assert(status>=0);
/*
* Read data from hyperslab in the file into the hyperslab in
* memory and display.
......@@ -635,7 +639,8 @@ void read_data_from_h5_eli( char * filename,
status = H5Dread(*dataset, H5T_NATIVE_FLOAT, memspace, dataspace,
H5P_DEFAULT, mytarget +(pos0_clipped_-pos0_)*size1 );
assert(status>=0);
H5Sclose(dataspace);
H5Sclose(memspace);
......@@ -763,7 +768,8 @@ void read_projSequence_from_h5( char * filename,
status = H5Sselect_hyperslab(dataspace, H5S_SELECT_SET, offset, NULL,
count, NULL);
assert(status>=0);
/*
* descrive la memoria su cui scrivo
*/
......@@ -783,7 +789,8 @@ void read_projSequence_from_h5( char * filename,
count_out[2] = size1;
status = H5Sselect_hyperslab(memspace, H5S_SELECT_SET, offset_out, NULL,
count_out, NULL);
assert(status>=0);
/*
* Read data from hyperslab in the file into the hyperslab in
* memory and display.
......@@ -793,7 +800,7 @@ void read_projSequence_from_h5( char * filename,
status = H5Dread(*dataset, H5T_NATIVE_FLOAT, memspace, dataspace,
H5P_DEFAULT, target + Ntot*size0*size1 );
status=status;
assert(status>=0);
}
......
......@@ -7393,7 +7393,7 @@ __global__ static void gputomo_conicity_kernel(float *d_SLICE, // da allocare
float magni, px, pz;
float magnicenter = (source_distance+detector_distance)/ (source_distance ) ;
float axis_position_v = (axis_position-SOURCE_X)/(magnicenter*v2x) ;
// float axis_position_v = (axis_position-SOURCE_X)/(magnicenter*v2x) ;
// gpu_offset_x -= SOURCE_X;
// gpu_offset_y -= SOURCE_X;
......
......@@ -16,7 +16,7 @@
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif
#define myfread( a,b,c ,d ) {int res=fread(a,b,c,d); if(res<-1) printf(" gcc casse les pieds\n");}
......
......@@ -442,7 +442,7 @@ def do_pyhst():
library_dirs= mpilibs_dirs,
libraries=["fftw3f_threads", "fftw3f",hdf5_lib, "mpi"],
extra_link_args=['-fopenmp'] ,
extra_compile_args={'gcc': ["-fPIC",'-fopenmp',"-g" ,"-std=c99"]},
extra_compile_args={'gcc': ["-fPIC",'-fopenmp',"-g" ,"-std=c99","-Wall"]},
define_macros=define_macros,
include_dirs=[ CUDA['include'], numpy.get_include()] + mpi_dirs + hdf5_dirs )
return module
......@@ -470,7 +470,7 @@ def do_pyhst():
# this syntax is specific to this build system
# we're only going to use certain compiler args with nvcc and not with gcc
# the implementation of this trick is in customize_compiler() below
extra_compile_args={'gcc': ["-std=c99", "-g","-fPIC", "-O3"],
extra_compile_args={'gcc': ["-std=c99", "-g","-fPIC", "-O3","-Wall"],
'nvcc': CUDA["arch"] + [ "--compiler-options", "-fPIC", "-O3", "-g","-D_FORCE_INLINES" ]},
include_dirs=[numpy.get_include(), CUDA['include'], 'PyHST/Cspace'] + hdf5_dirs)
return module
......@@ -495,7 +495,7 @@ def do_pyhst():
runtime_library_dirs=[CUDA['lib']],
extra_compile_args={'gcc': ["-std=c99","-g","-fPIC", "-O3"],
extra_compile_args={'gcc': ["-std=c99","-g","-fPIC", "-O3","-Wall"],
'nvcc': CUDA["arch"] + [ "--compiler-options", "-fPIC", "-O3", "-g","-D_FORCE_INLINES" ]},
include_dirs=[numpy.get_include(), CUDA['include'], 'PyHST/Cspace',"/usr/include/qt4"] )
......
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