Add old version of energies and only generate code for doubles
This commit is contained in:
@@ -38,6 +38,8 @@ namespace acc {
|
||||
__MAYBE_DEVICE__ __MAYBE_HOST__ __INLINE__
|
||||
F maybeConjugateScalar(const F &a) { return a; }
|
||||
|
||||
// TODO: instantiate for std::complex<double>
|
||||
|
||||
#if defined(HAVE_CUDA)
|
||||
template <>
|
||||
__MAYBE_DEVICE__ __MAYBE_HOST__ __INLINE__
|
||||
|
||||
@@ -573,12 +573,15 @@ template <typename F=double>
|
||||
// TODO: do it through the slice class
|
||||
slice.info.state = Slice<F>::Dispatched;
|
||||
#if defined(HAVE_CUDA) && defined(ATRIP_SOURCES_IN_GPU)
|
||||
# if !defined(ATRIP_CUDA_AWARE_MPI)
|
||||
# if !defined(ATRIP_CUDA_AWARE_MPI)
|
||||
# error "You need CUDA aware MPI to have slices on the GPU"
|
||||
# endif
|
||||
MPI_Irecv((void*)slice.data,
|
||||
#elif defined(HAVE_CUDA) && !defined(ATRIP_SOURCES_IN_GPU)
|
||||
slice.mpi_data = (F*)malloc(sizeof(F) * slice.size);
|
||||
MPI_Irecv(slice.mpi_data,
|
||||
#else
|
||||
MPI_Irecv(slice.data,
|
||||
MPI_Irecv((void*)slice.data,
|
||||
#endif
|
||||
slice.size,
|
||||
traits::mpi::datatypeOf<F>(),
|
||||
|
||||
Reference in New Issue
Block a user