Closed GillesDuvert closed 5 months ago
Attention: Patch coverage is 78.04054%
with 65 lines
in your changes are missing coverage. Please review.
Project coverage is 43.73%. Comparing base (
2980154
) to head (eb9e313
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
The test_indepth_basic_functions.pro
brutally explores 95 different operators defined in files basic_op_xxx.pro
, for a combination of the following cases:
c= a + b
), the code is not the same when a
is smaller of greater than b.
c = a + temporary(b)
Because each of these cases need a special code, for speed and memory optimization (this was written by Marc in the very first version of GDL, at least for 90% of the operators), the number of combinations explored is around 11000 cases.
The result of the procedure is a ~24000 lines text file that can be compared with an equivalent IDL output. The present PR introduces a number of code patches or additions to insure even obscure operator+operand combination give the same result as IDL. The GDL and IDL produced files are identical, with the exception of the signedness of a few NaN or Inf results in case or zero division of complex values.
As each operator is also optimized to use parallel processing on operands as soon as the number of elements is greater than !CPU.TPOOL_MIN_ELTS
, the test_indepth_basic_functions.pro procedure can also be used to check that the parallelized results are identical to the single cpu ones (*). This has been checked too. _Note that testing the equivalence of results between single and many cpu as performed in the test_indepth_basic_functions.pro
procedure with IDL will... crash IDL on some complex values, so this part of procedure is deactivated with IDL._
(*) TPOOL (Thread Pool) using functions cannot in general be expected to provide exactly the same result in parallell or not parallell mode: TOTAL() is an example. But operators do.
added test_indepth_basic_functions.pro and modified code to insure ~1200 tests on OPERATORS are similar to IDL.