Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disk transforms on higher order tensors? #81

Open
dlfivefifty opened this issue Nov 22, 2023 · 2 comments
Open

Disk transforms on higher order tensors? #81

dlfivefifty opened this issue Nov 22, 2023 · 2 comments

Comments

@dlfivefifty
Copy link
Contributor

In preparation for Cylinder solves, in FastTransforms.jl I'm planning to add support for disk2cxf(A::Array{T,3}, α, β, 1) in analogy to fft(A::Matrix, 1), etc. I can do this all in Julia via views (I assume strided array views are compatible with FastTransforms) but perhaps doing this in C there's potential for better parallelisation?

Note the interface needs some thought. Way back, when I wrote the previous paragraph, I was thinking disk2cxf(A::Array{T,3}, α, β, 1) would act on the first two dimensions of the array but what if we want to act on the first and third? Or if we have tensor products of two disks do we want to write the transform that transforms both as disk2cxf(A::Array{T,4}, α, β, 1:2)? Perhaps a better interface is

disk2cxf(A::Array{T,3}, α, β, (1,2)) # single disk transform on first two dimensions
disk2cxf(A::Array{T,3}, α, β, (1,3)) # single disk transform on first and last dimension
disk2cxf(A::Array{T,4}, α, β, ((1,2), (3,4)) # tensor disk transform on first and second followed by 3rd and 4th dimension
disk2cxf(A::Array{T,4}, α, β) # same as above
disk2cxf(A::Array{T,3}, α, β, ((1,2), (2,3)) # Get lost!

You might wonder why not leave it to the "user" of FastTransforms.jl. There won't likely be any speedup and multithreading is a pipe-dream. I guess the argument is (1) consistent interface (2) consistent allocation-free behaviour in higher dimensions (3) preparation for MPIFastTransforms.jl or similar for distributed memory parallelisation (which we pretty much need for Cylinders or Cubes to do anything fun)

@ioannisPApapadopoulos

@MikaelSlevinsky
Copy link
Owner

To coordinate this best, I propose that we make a new file in FastTransforms.jl called libfasttransforms_experimental.jl that works as a sort of sandbox to include and determine what is needed. Then the appropriate interface (and how much it resembles BLAS or FFTW's) for translation in C can be built concurrently to potentially offer improvement. The advantage here is that the first user is supported in the first cycle.

@dlfivefifty
Copy link
Contributor Author

Agreed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants