libref, libavx: logit_softcap calls std::tanh on a float, not std::tanhf

std::tanhf is in <cmath> only from libstdc++ 14; against 13 (Ubuntu 24.04's) the host build stops
at libref and all four libavx levels. std::tanh's float overload is tanhf, so the arithmetic is
the same to the bit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
AshlynandClaude Opus 5.5 committed 2026-10-12 14:40:04 -05:00
1 parent d59e0bb003
commit c37f47cc78
2 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -708,7 +708,7 @@ int ref_logit_softcap(const RadArgs* a, RadStream) {
#pragma omp parallel for schedule(static)
for (int64_t i = 0; i < nel; ++i) {
const float v = ldt(x, offlin(x, i));
stt(y, offlin(y, i), cap * std::tanhf(v / cap));
stt(y, offlin(y, i), cap * std::tanh(v / cap));
}
return RAD_OK;
}