dfdx icon indicating copy to clipboard operation
dfdx copied to clipboard

Add complex numbers

Open opfromthestart opened this issue 1 year ago • 3 comments

Closes #821. I had to use a proxy object to implement cuda traits. It built with cargo build -F complex,cuda,nightly,f16

opfromthestart avatar Aug 13 '23 20:08 opfromthestart

How does this interact with cuda kernels?

coreylowman avatar Aug 14 '23 18:08 coreylowman

I don't think it would work at all with cuda kernels atm. Not familiar with how cuda types work, can you overload operators for a custom complex struct?

opfromthestart avatar Aug 15 '23 10:08 opfromthestart

I don't think it would work at all with cuda kernels atm. Not familiar with how cuda types work, can you overload operators for a custom complex struct?

We could potentially just merge this for Cpu and make sure we get compile errors for cuda.

You can overload operators in c++, but I'm not sure that's sufficient to make the kernels work in the same way as they do in rust land.

coreylowman avatar Aug 17 '23 13:08 coreylowman