clMathLibraries / clFFT

a software library containing FFT functions written in OpenCL
Apache License 2.0
620 stars 192 forks source link

clFFT offset in cl_mem #221

Open JishinMaster opened 6 years ago

JishinMaster commented 6 years ago

Hi, clBLAS, clBLAST, and standards kernels can take an offset parameter. I have seen no such thing in the clFFT documentation. Whenever I want to do an FFT which does not starts at the beginning of an array, I have to copy the cl_mem into another cl_mem, and then back into the first one at the end.

Is there a way to do FFTs with offset?

Many thanks.

preda commented 6 years ago

Maybe you can use clCreateSubBuffer

hajokirchhoff commented 3 years ago

clCreateSubBuffer is not possible here. It has alignment requirements that make it impossible to start at an exact location.

@JishinMaster Your patch would be exactly what I need, but the patch itself is way to big and overly complex. You can clang-tidy over the entire source which really obfuscated your changes. Any chance you can create another patch with just your additions?