Commit c00c33bf authored by Nathanaël Schaeffer's avatar Nathanaël Schaeffer
Browse files

cuda: float support for gpu transforms, contributed by Zekun Ni, see...

cuda: float support for gpu transforms, contributed by Zekun Ni, see https://bitbucket.org/nschaeff/shtns/issues/44/float-single-precision-support
parent 2880305d
This diff is collapsed.
This diff is collapsed.
......@@ -181,6 +181,9 @@ struct shtns_info { // MUST start with "int nlm;"
unsigned layout; // requested data layout
double Y00_1, Y10_ct, Y11_st;
shtns_cfg next; // pointer to next sht_setup or NULL (records a chained list of SHT setup).
float* d_alm_f;
float* d_ct_f;
cufftHandle cufft_plan_f; // the cufft Handle
// the end should be aligned on the size of int, to allow the storage of small arrays.
};
......
......@@ -22,9 +22,11 @@
#ifdef __cplusplus
#include <complex>
typedef std::complex<double> cplx; ///< double precision complex number data type
typedef std::complex<float> cplx_f; ///< double precision complex number data type
#else
#include <complex.h>
typedef complex double cplx; ///< double precision complex number data type
typedef complex float cplx_f; ///< double precision complex number data type
#endif
#ifdef __cplusplus
......
......@@ -36,8 +36,10 @@ extern "C" {
//@{
/// Same as \ref spat_to_SH, but working on data residing on the GPU.
void cu_spat_to_SH(shtns_cfg shtns, double *Vr, cplx *Qlm, int ltr);
void cu_spat_to_SH_f(shtns_cfg shtns, float *Vr, cplx_f *Qlm, int ltr);
/// Same as \ref SH_to_spat, but working on data residing on the GPU.
void cu_SH_to_spat(shtns_cfg shtns, cplx *Qlm, double *Vr, int ltr);
void cu_SH_to_spat_f(shtns_cfg shtns, cplx_f *Qlm, float *Vr, int ltr);
/// Same as \ref spat_to_SHsphtor, but working on data residing on the GPU.
void cu_spat_to_SHsphtor(shtns_cfg, double *Vt, double *Vp, cplx *Slm, cplx *Tlm, int ltr);
/// Same as \ref SHsphtor_to_spat, but working on data residing on the GPU.
......
Supports Markdown
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