Module: Ignis::FFT::CuFFTBindings
- Extended by:
- FFI::Library
- Defined in:
- lib/nvruby/fft/cufft_bindings.rb
Overview
cuFFT library FFI bindings
Constant Summary collapse
- CUFFT_R2C =
FFT transform types
0x2a- CUFFT_C2R =
Real to Complex (float)
0x2c- CUFFT_C2C =
Complex to Real (float)
0x29- CUFFT_D2Z =
Complex to Complex (float)
0x6a- CUFFT_Z2D =
Real to Complex (double)
0x6c- CUFFT_Z2Z =
Complex to Real (double)
0x69- CUFFT_FORWARD =
FFT directions
-1
- CUFFT_INVERSE =
1- CUFFT_CB_LD_COMPLEX =
Callback types
0- CUFFT_CB_LD_COMPLEX_DOUBLE =
1- CUFFT_CB_LD_REAL =
2- CUFFT_CB_LD_REAL_DOUBLE =
3- CUFFT_CB_ST_COMPLEX =
4- CUFFT_CB_ST_COMPLEX_DOUBLE =
5- CUFFT_CB_ST_REAL =
6- CUFFT_CB_ST_REAL_DOUBLE =
7
Class Method Summary collapse
-
.check_status!(status, context = "cuFFT operation") ⇒ void
Check cuFFT status and raise error if not success.
-
.ensure_loaded! ⇒ void
Ensure cuFFT is loaded.
Class Method Details
.check_status!(status, context = "cuFFT operation") ⇒ void
This method returns an undefined value.
Check cuFFT status and raise error if not success
127 128 129 130 131 |
# File 'lib/nvruby/fft/cufft_bindings.rb', line 127 def self.check_status!(status, context = "cuFFT operation") return if status.zero? raise CuFFTError, status end |
.ensure_loaded! ⇒ void
This method returns an undefined value.
Ensure cuFFT is loaded
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/nvruby/fft/cufft_bindings.rb', line 38 def ensure_loaded! return if @loaded CUDA::LibraryLoader.load_library(:cufft) cuda_bin = Ignis.configuration.cuda_bin_path if cuda_bin ffi_lib Dir.glob(File.join(cuda_bin, "cufft64_*.dll")).max else ffi_lib "cufft64_11" end attach_cufft_functions! @loaded = true end |