-
Notifications
You must be signed in to change notification settings - Fork 69
SSE Math
Bruce Mitchener edited this page May 14, 2013
·
1 revision
We'd like to support SSE math operations on vectors of floats, etc.
Some places to look at for inspiration:
One of the first steps to take will be to add a new 128 raw data type.
This will involve code in:
sources/dfmc/back-end/raw-type-descriptors.dylan
sources/dfmc/modeling/objects.dylan
sources/dfmc/modeling/primitives.dylan
sources/dfmc/modeling/raw-types.dylan
Other work will have to done in the backends, such as:
sources/dfmc/llvm-back-end/llvm-back-end-types.dylan
sources/dfmc/llvm-back-end/llvm-emit-object.dylan
sources/dfmc/llvm-back-end/llvm-primitives-alloc.dylan
sources/dfmc/llvm-back-end/llvm-primitives-float.dylan
You'll probably also want to update the C-FFI:
sources/lib/c-ffi/pointer-ref.dylan
You can take guidance from the <raw-single-float>
and <raw-double-float>
types.
It is best to just do this for the LLVM and C backends initially. If it is done for HARP, it can be done in a slow way by compiling some C code into the run-time. HARP isn't important as we hope to phase it out entirely soon in favor of using LLVM.