All Projects → johnmcfarlane → Fixed_point

johnmcfarlane / Fixed_point

Licence: bsl-1.0
C++ Binary Fixed-Point Arithmetic

Projects that are alternatives of or similar to Fixed point

Cmake Scripts
A selection of useful scripts for use in CMake projects, include code coverage, sanitizers, and dependency graph generation.
Stars: ✭ 202 (+1.51%)
Mutual labels:  cmake, clang, gcc
Moderncppci
This is an example of doing a Modern C++ project with CI
Stars: ✭ 109 (-45.23%)
Mutual labels:  cmake, clang, gcc
Cmakepchcompiler
CMake precompiled header support via custom PCH compiler extension
Stars: ✭ 105 (-47.24%)
Mutual labels:  cmake, clang, gcc
Boomerang
Boomerang Decompiler - Fighting the code-rot :)
Stars: ✭ 265 (+33.17%)
Mutual labels:  cmake, clang, gcc
Arm Cmake Toolchains
CMake toolchain configurations for ARM
Stars: ✭ 148 (-25.63%)
Mutual labels:  cmake, clang, gcc
Pfr
std::tuple like methods for user defined types without any macro or boilerplate code
Stars: ✭ 896 (+350.25%)
Mutual labels:  clang, gcc, boost
Cmake Examples
Useful CMake Examples
Stars: ✭ 7,220 (+3528.14%)
Mutual labels:  cmake, clang, boost
Polymcu
An open framework for micro-controller software
Stars: ✭ 173 (-13.07%)
Mutual labels:  cmake, clang, gcc
Ccache
ccache – a fast compiler cache
Stars: ✭ 1,128 (+466.83%)
Mutual labels:  clang, gcc
Hazelcast Cpp Client
Hazelcast IMDG C++ Client
Stars: ✭ 67 (-66.33%)
Mutual labels:  cmake, boost
Burst
То, чего нет в Бусте
Stars: ✭ 72 (-63.82%)
Mutual labels:  cmake, boost
Avalonstudio
Cross platform IDE and Shell
Stars: ✭ 1,132 (+468.84%)
Mutual labels:  clang, gcc
Clang Blueprint
🏰 Example C++11 CMake project that incorporates awesome Clang tooling 🐉
Stars: ✭ 63 (-68.34%)
Mutual labels:  cmake, clang
Ncnn Benchmark
The benchmark of ncnn that is a high-performance neural network inference framework optimized for the mobile platform
Stars: ✭ 70 (-64.82%)
Mutual labels:  cmake, benchmark
Cxxctp
DEPRECATED. USE INSTEAD github.com/blockspacer/flextool
Stars: ✭ 58 (-70.85%)
Mutual labels:  cmake, clang
C2goasm
C to Go Assembly
Stars: ✭ 1,072 (+438.69%)
Mutual labels:  clang, gcc
Cvise
Super-parallel Python port of the C-Reduce
Stars: ✭ 77 (-61.31%)
Mutual labels:  clang, gcc
Vector
➿ A supercharged std::vector implementation (minus Allocator)
Stars: ✭ 118 (-40.7%)
Mutual labels:  clang, gcc
Setup
Setup a new machine without sudo!
Stars: ✭ 130 (-34.67%)
Mutual labels:  gcc, boost
Metabench
A simple framework for compile-time benchmarks
Stars: ✭ 146 (-26.63%)
Mutual labels:  cmake, benchmark

fixed_point Numerics Library

Build Status Build status

Notice: This library is deprecated. Please consider switching to CNL, the successor to fixed_point for many new features and improvements.

Description

The fixed_point library provides a header-only C++11 API for approximating real numbers using binary fixed-point arithmetic. It forms the reference implementation of a standard library proposal presented in paper, P0037 and is developed as part of study groups, SG14 and SG6.

Download

The library is hosted on GitHub:

$ git clone https://github.com/johnmcfarlane/fixed_point.git

The API is exposed through headers in the include directory. Add this to your system header list and include, e.g.:

#include <sg14/fixed_point>

Tests and Benchmarks

Linux

Tested on Travis (Ubuntu 14.04) using GCC 5.4 and Clang 3.5 and Debian GNU/Linux 8.3 using GCC 5.4 and Clang 3.5.0.

Requires:

Optional:

  • Boost - facilitates multiprecision support
  • Doxygen - generates documentation in the doc/gh-pages directory
  • pandoc - generates proposal papers

For a list of configuration options:

$ cmake -LH

To build everything:

$ cmake -DCMAKE_BUILD_TYPE=Release
$ make

To disable exception handling (incompatible with Boost 1.55 or lower), add -DEXCEPTIONS=OFF to the cmake command:

$ cmake -DCMAKE_BUILD_TYPE=Release -DEXCEPTIONS=OFF
$ make

To run tests:

$ cmake -DCMAKE_BUILD_TYPE=Release
$ make fp_test
$ ./fp_test

To run benchmarks:

$ cmake -DCMAKE_BUILD_TYPE=Release
$ make fp_benchmark
$ ./fp_benchmark

To profile benchmarks:

  1. Build with frame pointers included:

    $ cmake -DCMAKE_BUILD_TYPE=Release -DPROFILE=ON
    $ make fp_benchmark
    $ ./fp_benchmark
    
  2. then run:

    $ perf record -g ./fp_benchmark
    $ perf report -g 'graph,0.5,caller'
    

To install:

$ cmake -DCMAKE_BUILD_TYPE=Release
$ make
$ sudo make install

Windows

Tested on AppVeyor and on Windows 10 Professional with CMake 3.8.0. Requires:

  • MSBuild 15.0 (VS 2017)
  • CMake 3.8.0

To build vs/Release/fp_test.exe and vs/Release/fp_benchmark.exe:

cmake -G "Visual Studio 15 2017" .
MSBuild.exe /m fixed_point.sln /p:Configuration=Release

For 64-bit builds, append Win64 to the -G option above:

cmake -G "Visual Studio 15 2017 Win64" .

Note that fp_benchmark is unlikely to produce valid results due to missing escape and clobber functions.

Cleaning

To clean the project files:

git clean -Xdff .

(Use with caution!)

Further Reading

Contact Information

All feedback greatly appreciated.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].