[PATCH] D36895: Add a class for fixed point arithmetic

Evgeny Stupachenko via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 18 13:42:41 PDT 2017


evstupac created this revision.
Herald added a subscriber: mgorny.

The patch add FixedPoint64 class for unsigned fixed point arithmetic and corresponding tests.
The new class will be used to update https://reviews.llvm.org/D30527.
I've skipped signed arithmetic, because the class is supposed to be used to work with probabilities and costs.
For now point is fixed in the middle [32 bits].[32 bits], which makes calculations simple and fast.


Repository:
  rL LLVM

https://reviews.llvm.org/D36895

Files:
  include/llvm/ADT/FixedPoint.h
  unittests/ADT/CMakeLists.txt
  unittests/ADT/FixedPoint.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D36895.111732.patch
Type: text/x-patch
Size: 4959 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170818/4f6a2d44/attachment.bin>


More information about the llvm-commits mailing list