SkillAgentSearch skills...

CLFFT.jl

Julia bindings for AMD's clFFT library

Install / Use

/learn @JuliaGPU/CLFFT.jl
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

CLFFT.jl

Julia bindings to clFFT library.

Example

import OpenCL
import CLFFT
import FFTW
using LinearAlgebra

const 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))
View on GitHub
GitHub Stars16
CategoryDevelopment
Updated3y ago
Forks13

Languages

Julia

Security Score

65/100

Audited on Mar 5, 2023

No findings