1234567891011121314151617181920212223242526272829303132333435 |
- #ifndef CUDA_FFT_H
- #define CUDA_FFT_H
- #include <cuda.h>
- #include <cuda_runtime.h>
- #include <cuda_runtime_api.h>
- #include <cufft.h>
- #include "utilities.h"
- #define CUDA_SAFE_CALL( call) do { \
- cudaError_t err = call; \
- if (cudaSuccess != err) { \
- fprintf(stderr, "Cuda error in file '%s' in line %i : %s.\n", \
- __FILE__, __LINE__, cudaGetErrorString( err) ); \
- exit(EXIT_FAILURE); \
- } \
- } while (0)
- #define CUFFT_SAFE_CALL( call) do { \
- cufftResult err = call; \
- if (err != CUFFT_SUCCESS) { \
- fprintf(stderr, "Cufft error in file '%s' in line %i : %s.\n", \
- __FILE__, __LINE__, "error" ); \
- exit(EXIT_FAILURE); \
- } \
- } while (0)
- typedef bool (*CudaBenchmarkFunc) (cufftComplex *dev_mem, cufftComplex *dev_out_mem, int n_dims, size_t *dims, int n_runs, Timer *timer);
- void loop_data_cuda (const char *vendor, CudaBenchmarkFunc func, int n_devices, OutputType outputType, TimeEntry *time_entries);
- bool compute_cuda_fft (cufftComplex *dev_mem, cufftComplex *out_mem, int n_dims, size_t *dims, int n_runs, Timer *timer);
- double sum_of_absolute_differences_complex (cufftComplex *a, cufftComplex *b, int n, bool scale);
- #endif
|