Closed llaniewski closed 1 year ago
Base: 32.44% // Head: 32.46% // Increases project coverage by +0.02%
:tada:
Coverage data is based on head (
f41fa45
) compared to base (7d42765
). Patch coverage: 53.33% of modified lines in pull request are covered.
:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
Description
This PR introduces the way to select a type for storing fields. This way TCLB can (for example) compute in double precision, but store only half precision floats.
Usage
One can select the storage type through
./configure
script with:The avaliable options are:
half
,half-shift
,float
,float-shift
,double
. Theshift
options makes TCLB save a shifted value of the field.Shift
The implementation allows one to store in the memory only the difference between the value of field and some constant. The constant is defined in the
Dynamics.R
with theshift=
argument:This, compiled with 'half-shift' causes the following behavior:
tmp
is loaded from memoryf[1]
is set to double precisiontmp+2/18
tmp
is calculated asf[1]-2/18
tmp
is stored in memoryHalf-precision
Half precision is currently only supported on the GPU architecture.
Tests
This PR also introduces compilation tests for all combination of storage types.