Skip to content

Commit

Permalink
Fix TGETLOOKAHEADSIZE
Browse files Browse the repository at this point in the history
  • Loading branch information
AdventureT committed Jan 28, 2024
1 parent 4a63d3a commit 28e4706
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Toshi/Include/TKernel/TFileLexer.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
#else
#define TLEXERGETCHAR m_pFile->GetCChar
#endif
#define TGETLOOKAHEADSIZE(size) 1 << (((size * 2 - 1) >> 0x17) + 0x81U & 0x1f)
// This only works with WIN32! Basically floorpow2
// https://github.com/deeplearning4j/deeplearning4j/blob/f9c1faaaf968d6f0e5a5add2627908f7a2565f96/libnd4j/include/loops/type_conversions.h#L97
#define TGETLOOKAHEADSIZE(size) static_cast<TINT>(1 << static_cast<TINT>(logb(static_cast<TFLOAT>(2 * size - 1))));

TOSHI_NAMESPACE_BEGIN

Expand Down

0 comments on commit 28e4706

Please sign in to comment.