Skip to content

Commit

Permalink
Document with warnings on 'regularity', CPU/GPU availability of inter…
Browse files Browse the repository at this point in the history
…p methods
  • Loading branch information
willend committed Feb 9, 2024
1 parent b7231b8 commit 82da9fa
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
18 changes: 18 additions & 0 deletions common/lib/share/interpolation-lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,24 @@
* Data file format:
* file is a list of rows [x,y,z... field_x, field_y, ... ]
* | space ... | field ... |
*
* ---------------------------------------------------------------------------------
* !! Important notes on table dimensionality etc: !!
* ---------------------------------------------------------------------------------
* 1. On GPU's (NVIDIA/OpenACC) only the 'regular' interpolation method is available
* and us hence the 'default'. A GPU-compiled instrument will exit with an error
* if you decide to force 'kdtree' mode.
* ('kdtree' needs the macro R_SWAP which works node connectivity/placement in
* the loaded dataset structure - is thus not thread-safe. And difficult to
* make 'atomic' / would require 'one file content pr. neutron'... :-( )
*
* 2. On CPU's the default is 'NULL'/0, meaning that the library will itself try to
* evaluate if a dataset is suitable for 'regular' or 'kdtree'. You may still
* request one of the method explicitly if this makes sense in your case.
*
* 3. 'regular' means 'quite regular indeed'... Voxels in the volume MUST be of
* uniform size AND dimensions of the volume MUST be equal on all spatial axes.
* ---------------------------------------------------------------------------------
*/

/*******************************************************************************
Expand Down
18 changes: 18 additions & 0 deletions common/lib/share/interpolation-lib.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,24 @@
* Data file format:
* file is a list of rows [x,y,z... field_x, field_y, ... ]
* | space ... | field ... |
*
* ---------------------------------------------------------------------------------
* !! Important notes on table dimensionality etc: !!
* ---------------------------------------------------------------------------------
* 1. On GPU's (NVIDIA/OpenACC) only the 'regular' interpolation method is available
* and us hence the 'default'. A GPU-compiled instrument will exit with an error
* if you decide to force 'kdtree' mode.
* ('kdtree' needs the macro R_SWAP which works node connectivity/placement in
* the loaded dataset structure - is thus not thread-safe. And difficult to
* make 'atomic' / would require 'one file content pr. neutron'... :-( )
*
* 2. On CPU's the default is 'NULL'/0, meaning that the library will itself try to
* evaluate if a dataset is suitable for 'regular' or 'kdtree'. You may still
* request one of the method explicitly if this makes sense in your case.
*
* 3. 'regular' means 'quite regular indeed'... Voxels in the volume MUST be of
* uniform size AND dimensions of the volume MUST be equal on all spatial axes.
* ---------------------------------------------------------------------------------
*/

/*******************************************************************************
Expand Down

0 comments on commit 82da9fa

Please sign in to comment.