libscran / qdtsne

Quick-and-dirty t-SNE in C++
https://libscran.github.io/qdtsne/
MIT License
9 stars 2 forks source link

MSVC compilation error #10

Closed avburpee closed 4 days ago

avburpee commented 1 month ago

In initialize.hpp the templated initialise function on line 118 is incorrectly expanded in MSVC such that the code will compile and run correctly if Float_ is a double but fails to compile if it is a float. I am presuming this is not an issue in gcc.

To correct this issue I have patched the code using staticcast<Float> for the "options.perplexity" variable, this enables MSVC to correctly expand the template for double and float types.

LTLA commented 1 month ago

It probably is an issue on GCC, actually, I just never tested any other floating-point types - oops. If you would be so kind as to submit a PR, I'll merge in your fix.

LTLA commented 4 days ago

Fixed by 864e9ecf934520e4217a2cfe525bd0f9230963fc, thanks for the report.