Closed patwretchedsuspect closed 4 years ago
Sorry for the late reply. This project is not under active development and I don't receive notifications when issues are opened. You are right that the code referenced in the comments appears to be GPL'd. I did not base my implementation on that code, but on Nicholas Chapman's, so I wasn't aware there was a GPL predecessor. The Rand48 class is not even used in this project and can be removed easily.
The nvidia-mesh-tools/src/nvmath/Random.h (line 279) has a notice that reads:
GNU GSL is licensed under GNU GPL, which places more restrictions on the code use than MIT/BSD licenses. The text of any of GNU GPL licenses is not present.
I am not a lawyer and I can't say how much the code is similar in a copyright sense - whether it is a derivative work requiring to comply with GPL or not - but looking at this (this is an older version from another project) they share the same commentaries. Some code logic/naming scheme is the same, compared to, for example, FreeBSD's implementation of rand48 here and there. But a lot of the names come from the formula for linear congruential generator.
I'm unable to tell whether the code is a derivative work of GSL or not (the biggest hooks are commentaries and copyright notice) and whether this is an actual issue or not.
I can suggest a rewrite/removal of the code "just in case". I've rewritten Rand48 class (see the end of the issue). The class was tested with 32-bit MinGW (MSYS2) g++ 7.4.0 on Windows 7 (after some modifications to allow the project to compile) on different seeds (0, a few random ones, 2^32-1) and on the range [0; 2^32) of seeds for the first 4 random generator outputs for every seed. It requires support for 64-bit arithmetic (uses posh library to disable the code if there is none). The license is the same as for nvidia-mesh-tools, no additional copyright notices needed. The file Random.cpp might require removal of some static variables.
The same problem with the same code exists in thekla_atlas.