https://github.com/juliagpu/clfft.jl
Julia bindings for AMD's clFFT library
https://github.com/juliagpu/clfft.jl
clfft julia opencl
Last synced: 5 months ago
JSON representation
Julia bindings for AMD's clFFT library
- Host: GitHub
- URL: https://github.com/juliagpu/clfft.jl
- Owner: JuliaGPU
- License: other
- Created: 2013-11-15T23:57:55.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2023-08-22T15:04:39.000Z (almost 2 years ago)
- Last Synced: 2025-02-01T09:11:14.589Z (5 months ago)
- Topics: clfft, julia, opencl
- Language: Julia
- Homepage:
- Size: 95.7 KB
- Stars: 16
- Watchers: 10
- Forks: 16
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# CLFFT.jl
Julia bindings to clFFT library.
## Example
```julia
import OpenCL
import CLFFT
import FFTW
using LinearAlgebraconst cl = OpenCL.cl
const clfft = CLFFT_, ctx, queue = cl.create_compute_context()
N = 100
X = ones(ComplexF64, N)
bufX = cl.Buffer(ComplexF64, ctx, :copy, hostbuf=X)p = clfft.Plan(ComplexF64, ctx, size(X))
clfft.set_layout!(p, :interleaved, :interleaved)
clfft.set_result!(p, :inplace)
clfft.bake!(p, queue)clfft.enqueue_transform(p, :forward, [queue], bufX, nothing)
result = cl.read(queue, bufX)@assert isapprox(norm(result - FFTW.fft(X)), zero(Float32))
```