MCPcopy Create free account
hub / github.com/catboost/catboost / FastExpInplace

Function FastExpInplace

library/cpp/fast_exp/fast_exp.cpp:51–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49}
50
51void FastExpInplace(double* x, size_t count) {
52#if defined(_x86_64_) || defined(_i386_)
53 if (NX86::CachedHaveAVX() && NX86::CachedHaveAVX2()) {
54 FastExpInplaceAvx2(x, count);
55 } else if (NX86::CachedHaveSSE2()) {
56 FastExpInplaceSse2(x, count);
57 } else
58#endif
59 {
60 for (size_t i = 0; i < count; ++i) {
61 x[i] = fast_exp(x[i]);
62 }
63 }
64}

Callers

nothing calls this directly

Calls 4

FastExpInplaceAvx2Function · 0.85
CachedHaveSSE2Function · 0.85
FastExpInplaceSse2Function · 0.85
fast_expFunction · 0.85

Tested by

no test coverage detected