Skip to content

Commit 449cf6e

Browse files
committed
Fix non CUDA build
1 parent ac23eaa commit 449cf6e

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

src/phasing.c

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,12 @@ int sp_phaser_set_support_algorithm(SpPhaser * ph, SpSupportArray * alg) {
605605

606606
int sp_phaser_init_model(SpPhaser * ph, const Image * user_model, int flags){
607607
if(ph->engine == SpEngineCUDA && !(flags & SpModelMaskedOutZeroed)){
608+
#ifdef _USE_CUDA
608609
return sp_phaser_init_model_cuda(ph, user_model, flags);
610+
#else
611+
/* Cannot be reached! */
612+
return -3;
613+
#endif
609614
}
610615
if(!ph){
611616
return -1;
@@ -797,7 +802,12 @@ const Image * sp_phaser_support(SpPhaser * ph){
797802

798803
real sp_phaser_ereal(SpPhaser *ph) {
799804
if(ph->engine == SpEngineCUDA){
805+
#ifdef _USE_CUDA
800806
return sp_phaser_ereal_cuda(ph);
807+
#else
808+
/* Cannot be reached! */
809+
return -3;
810+
#endif
801811
}
802812
const Image *real_space = sp_phaser_model_before_projection(ph);
803813
const Image *support = sp_phaser_support(ph);
@@ -824,7 +834,12 @@ real sp_phaser_ereal(SpPhaser *ph) {
824834

825835
real sp_phaser_support_fraction(SpPhaser *ph){
826836
if(ph->engine == SpEngineCUDA){
837+
#ifdef _USE_CUDA
827838
return sp_phaser_support_fraction_cuda(ph);
839+
#else
840+
/* Cannot be reached! */
841+
return -3;
842+
#endif
828843
}
829844
int sup_size = 0;
830845
const Image *support = sp_phaser_support(ph);
@@ -839,7 +854,12 @@ real sp_phaser_support_fraction(SpPhaser *ph){
839854

840855
real sp_phaser_efourier(SpPhaser *ph, real * FcFo) {
841856
if(ph->engine == SpEngineCUDA){
857+
#ifdef _USE_CUDA
842858
return sp_phaser_efourier_cuda(ph, FcFo);
859+
#else
860+
/* Cannot be reached! */
861+
return -3;
862+
#endif
843863
}
844864
const Image *fourier_space = sp_phaser_fmodel(ph);
845865
const Image *amplitudes = sp_phaser_amplitudes(ph);

0 commit comments

Comments
 (0)