define fixed point arithmetic constants
gitignore clion files
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -24,3 +24,5 @@
|
||||
*.nav
|
||||
*.toc
|
||||
|
||||
#ignore files from CLion IDE
|
||||
.idea
|
||||
9
src/threads/fixed-point.h
Normal file
9
src/threads/fixed-point.h
Normal file
@@ -0,0 +1,9 @@
|
||||
#ifndef FIXED_POINT_H
|
||||
#define FIXED_POINT_H
|
||||
|
||||
/* Fixed Point Arithmetic bit count constants */
|
||||
#define NUM_INT_BITS 11
|
||||
#define NUM_FRAC_BITS 20
|
||||
#define CONVERSION_CONST 1 << NUM_FRAC_BITS /* f = 2^q, (2^20) */
|
||||
|
||||
#endif //FIXED_POINT_H
|
||||
Reference in New Issue
Block a user