Loading .gitignore +1 −0 Original line number Diff line number Diff line Loading @@ -9,3 +9,4 @@ w-stackingCfftw_serial w-stackingfftw_serial inverse-imaging .* *.tar Makefile +10 −3 Original line number Diff line number Diff line Loading @@ -42,12 +42,18 @@ ifeq (FITSIO,$(findstring FITSIO,$(OPT))) endif DEPS = w-stacking.h w-stacking-fftw.c w-stacking.cu phase_correction.cu COBJ = w-stacking.o w-stacking-fftw.o phase_correction.o DEPS = w-stacking.h w-stacking-fftw.c w-stacking.cu phase_correction.cu degrid.cu convkernels.cu COBJ = w-stacking.o w-stacking-fftw.o phase_correction.o degrid.o convkernels.o convkernels.c: convkernels.cu cp convkernels.cu convkernels.c w-stacking.c: w-stacking.cu cp w-stacking.cu w-stacking.c degrid.c: degrid.cu cp degrid.cu degrid.c phase_correction.c: phase_correction.cu cp phase_correction.cu phase_correction.c Loading Loading @@ -78,7 +84,7 @@ serial_cuda: mpi: $(COBJ) $(MPICC) $(OPTIMIZE) $(OPT) -o w-stackingCfftw $^ $(CFLAGS) $(LIBS) $(MPICC) $(OPTIMIZE) $(OPT) -o inverse-imaging inverse-imaging.c w-stacking.c $(CFLAGS) $(LIBS) $(MPICC) $(OPTIMIZE) $(OPT) -o inverse-imaging inverse-imaging.c degrid.c convkernels.c $(CFLAGS) $(LIBS) mpi_cuda: $(NVCC) $(NVFLAGS) -c w-stacking.cu phase_correction.cu $(NVLIB) Loading @@ -89,3 +95,4 @@ clean: rm *.o rm w-stacking.c rm phase_correction.c rm degrid.c convkernels.c 0 → 100644 +20 −0 Original line number Diff line number Diff line #include "convkernels.h" #include <math.h> #include <stdlib.h> #include <stdio.h> #ifdef ACCOMP #pragma omp declare target #endif #ifdef __CUDACC__ double __device__ #else double #endif gauss_kernel_norm(double norm, double std22, double u_dist, double v_dist) { double conv_weight; conv_weight = norm * exp(-((u_dist*u_dist)+(v_dist*v_dist))*std22); return conv_weight; } convkernels.cu 0 → 100644 +20 −0 Original line number Diff line number Diff line #include "convkernels.h" #include <math.h> #include <stdlib.h> #include <stdio.h> #ifdef ACCOMP #pragma omp declare target #endif #ifdef __CUDACC__ double __device__ #else double #endif gauss_kernel_norm(double norm, double std22, double u_dist, double v_dist) { double conv_weight; conv_weight = norm * exp(-((u_dist*u_dist)+(v_dist*v_dist))*std22); return conv_weight; } convkernels.h 0 → 100644 +13 −0 Original line number Diff line number Diff line #ifndef W_KERNELS #define W_KERNELS #ifdef ACCOMP #pragma omp declare target #endif #ifdef __CUDACC__ double __device__ #else double #endif gauss_kernel_norm(double, double, double, double); #endif Loading
.gitignore +1 −0 Original line number Diff line number Diff line Loading @@ -9,3 +9,4 @@ w-stackingCfftw_serial w-stackingfftw_serial inverse-imaging .* *.tar
Makefile +10 −3 Original line number Diff line number Diff line Loading @@ -42,12 +42,18 @@ ifeq (FITSIO,$(findstring FITSIO,$(OPT))) endif DEPS = w-stacking.h w-stacking-fftw.c w-stacking.cu phase_correction.cu COBJ = w-stacking.o w-stacking-fftw.o phase_correction.o DEPS = w-stacking.h w-stacking-fftw.c w-stacking.cu phase_correction.cu degrid.cu convkernels.cu COBJ = w-stacking.o w-stacking-fftw.o phase_correction.o degrid.o convkernels.o convkernels.c: convkernels.cu cp convkernels.cu convkernels.c w-stacking.c: w-stacking.cu cp w-stacking.cu w-stacking.c degrid.c: degrid.cu cp degrid.cu degrid.c phase_correction.c: phase_correction.cu cp phase_correction.cu phase_correction.c Loading Loading @@ -78,7 +84,7 @@ serial_cuda: mpi: $(COBJ) $(MPICC) $(OPTIMIZE) $(OPT) -o w-stackingCfftw $^ $(CFLAGS) $(LIBS) $(MPICC) $(OPTIMIZE) $(OPT) -o inverse-imaging inverse-imaging.c w-stacking.c $(CFLAGS) $(LIBS) $(MPICC) $(OPTIMIZE) $(OPT) -o inverse-imaging inverse-imaging.c degrid.c convkernels.c $(CFLAGS) $(LIBS) mpi_cuda: $(NVCC) $(NVFLAGS) -c w-stacking.cu phase_correction.cu $(NVLIB) Loading @@ -89,3 +95,4 @@ clean: rm *.o rm w-stacking.c rm phase_correction.c rm degrid.c
convkernels.c 0 → 100644 +20 −0 Original line number Diff line number Diff line #include "convkernels.h" #include <math.h> #include <stdlib.h> #include <stdio.h> #ifdef ACCOMP #pragma omp declare target #endif #ifdef __CUDACC__ double __device__ #else double #endif gauss_kernel_norm(double norm, double std22, double u_dist, double v_dist) { double conv_weight; conv_weight = norm * exp(-((u_dist*u_dist)+(v_dist*v_dist))*std22); return conv_weight; }
convkernels.cu 0 → 100644 +20 −0 Original line number Diff line number Diff line #include "convkernels.h" #include <math.h> #include <stdlib.h> #include <stdio.h> #ifdef ACCOMP #pragma omp declare target #endif #ifdef __CUDACC__ double __device__ #else double #endif gauss_kernel_norm(double norm, double std22, double u_dist, double v_dist) { double conv_weight; conv_weight = norm * exp(-((u_dist*u_dist)+(v_dist*v_dist))*std22); return conv_weight; }
convkernels.h 0 → 100644 +13 −0 Original line number Diff line number Diff line #ifndef W_KERNELS #define W_KERNELS #ifdef ACCOMP #pragma omp declare target #endif #ifdef __CUDACC__ double __device__ #else double #endif gauss_kernel_norm(double, double, double, double); #endif