Open willend opened 1 year ago
(An easy start would be to allow to define the base type of the DArray's to be float rather than double, requires very little code.)
https://github.com/McStasMcXtrace/McCode/tree/mccode-3-USEFLOATS is a prototype that allows to create histograms (for monitors) and particle array data in single precision (e.g. for use on GPU's). -DUSEFLOATS
enables it.
A few consequence-edits are pending in e.g. read_table-lib:
"./WOFSANS_v2_gpu.c", line 7327: warning: argument of type "double *" is incompatible with parameter of type "float *"
NULL, Table.data, NULL,
^
"./WOFSANS_v2_gpu.c", line 7334: warning: argument of type "double *" is incompatible with parameter of type "float *"
NULL, Table.data, NULL,
^
MPI merging is not fully functional https://github.com/McStasMcXtrace/McCode/commit/190af8e2c4f6cca8f401b54e7cb6c96e674dbcad
With the last commit 649536dcd4b72dfc69542d100f67c47c793435db merge is functional.
Some consequence-edits must be done in Monitor_nD-lib (base type is double everywhere, needs the darrbase define).
With MCNUM in place "everywhere" in the code (with a default of double) we could easily allow to replace with single-precision.
This could allow certain demeaning problems to also run on smaller system, e.g. "gamer"-GPU's with a few Gigs of VRAM.