8 using namespace pocketfft;
9 using namespace pocketfft::detail;
15 template<
typename _Scalar>
18 typedef _Scalar Scalar;
19 typedef std::complex<Scalar> Complex;
21 inline void clear() {}
23 inline void fwd(Complex* dst,
const Scalar* src,
int nfft){
24 const shape_t shape_{
static_cast<size_t>(nfft) };
25 const shape_t axes_{ 0 };
26 const stride_t stride_in{
sizeof(Scalar) };
27 const stride_t stride_out{
sizeof(Complex) };
28 r2c(shape_, stride_in, stride_out, axes_, FORWARD, src, dst,
static_cast<Scalar
>(1));
31 inline void fwd(Complex* dst,
const Complex* src,
int nfft){
32 const shape_t shape_{
static_cast<size_t>(nfft) };
33 const shape_t axes_{ 0 };
34 const stride_t stride_{
sizeof(Complex) };
35 c2c(shape_, stride_, stride_, axes_, FORWARD, src, dst,
static_cast<Scalar
>(1));
38 inline void inv(Scalar* dst,
const Complex* src,
int nfft){
39 const shape_t shape_{
static_cast<size_t>(nfft) };
40 const shape_t axes_{ 0 };
41 const stride_t stride_in{
sizeof(Complex) };
42 const stride_t stride_out{
sizeof(Scalar) };
43 c2r(shape_, stride_in, stride_out, axes_, BACKWARD, src, dst,
static_cast<Scalar
>(1));
46 inline void inv(Complex* dst,
const Complex* src,
int nfft){
47 const shape_t shape_{
static_cast<size_t>(nfft) };
48 const shape_t axes_{ 0 };
49 const stride_t stride_{
sizeof(Complex) };
50 c2c(shape_, stride_, stride_, axes_, BACKWARD, src, dst,
static_cast<Scalar
>(1));
53 inline void fwd2(Complex* dst,
const Complex* src,
int nfft0,
int nfft1){
54 const shape_t shape_{
static_cast<size_t>(nfft0),
static_cast<size_t>(nfft1) };
55 const shape_t axes_{ 0, 1 };
56 const stride_t stride_{
static_cast<ptrdiff_t
>(
sizeof(Complex)*nfft1),
static_cast<ptrdiff_t
>(
sizeof(Complex)) };
57 c2c(shape_, stride_, stride_, axes_, FORWARD, src, dst,
static_cast<Scalar
>(1));
60 inline void inv2(Complex* dst,
const Complex* src,
int nfft0,
int nfft1){
61 const shape_t shape_{
static_cast<size_t>(nfft0),
static_cast<size_t>(nfft1) };
62 const shape_t axes_{ 0, 1 };
63 const stride_t stride_{
static_cast<ptrdiff_t
>(
sizeof(Complex)*nfft1),
static_cast<ptrdiff_t
>(
sizeof(Complex)) };
64 c2c(shape_, stride_, stride_, axes_, BACKWARD, src, dst,
static_cast<Scalar
>(1));
: TensorContractionSycl.h, provides various tensor contraction kernel for SYCL backend