Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
- Join Date
- May 2012
How to use a floating point by using Fixed Point Alogrithm?
I ask this because when I am compiling the Kernel I get an error when I use float/double in the tcp_vegas.c file.
In Linux Kernel you cannot use floating point numbers for some reason, but you can do it. I know what I said just bare with me lol. I know you could use these functions:
include<asm/i387.h> kernel_fpu_begin(); kernel_fpu_end();
ERROR: "__addsf3" [net/ipv4/tcp_vegas.ko] undefined ERROR: "__muldf3" [net/ipv4/tcp_vegas.ko] undefined ERROR: "__fixunsdfsi" [net/ipv4/tcp_vegas.ko] undefined ERROR: "__floatsidf" [net/ipv4/tcp_vegas.ko] undefined To see full details build your kernel with: 'make CONFIG_DEBUG_SECTION_MISMATCH=y'
My next idea would be making a Fixed Point function, but I don't have a really clear idea on how to create that function.
I understand thatCode:
yi+1 = a.xi + b.yi
If you could give me links of examples c code of fixed point function or anything related to that would be great. Also your knowledge/explanation too.
- Join Date
- Apr 2009
- I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
GCC currently has fixed point support built in, at least since about 2008 or 2009. Try a google search on the terms "gcc fixed point".Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!