-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider adding supporting for building with MSVC #3
Comments
Happy to provide a fix here, if one is welcome. |
A few files, such as |
Likewise, |
#define POLY_EVAL_3(r, c1, c2, c3, c4) ({ \
__typeof(r) t1, t2, r2, q; \
t1 = c1 + c2*r; \
t2 = c3 + c4*r; \
r2 = r * r; \
q = t1 + r2 * t2; \
q; \
}) Blocks like this aren't supported in MSVC and so it could be changed to be something like: #define _POLY_EVAL_3(type, name) \
inline type name(type r, type c1, type c2, type c3, type c4) \
{ \
type r t1, t2, r2, q; \
t1 = c1 + c2*r; \
t2 = c3 + c4*r; \
r2 = r * r; \
q = t1 + r2 * t2; \
return q; \
}
_POLY_EVAL_3(double, POLY_EVAL_5)
_POLY_EVAL_3(float, POLY_EVAL_5F) or to something like: #define POLY_EVAL_3(type, q, r, c1, c2, c3, c4) \
{ \
type r t1, t2, r2; \
t1 = c1 + c2*r; \
t2 = c3 + c4*r; \
r2 = r * r; \
q = t1 + r2 * t2; \
} |
A few places also use It would be better to just use |
|
|
https://github.com/amd/aocl-libm-ose/blob/master/src/optmized/pow.c#L355 uses |
It is not currently possible to build the repo using MSVC and so building on Windows is not easy.
Using
cmake
(rather thanscons
) might simplify the process of resolving tools and passing options down to the relevant compilers in a cross-platform manner.Otherwise, it seems like
--compiler
should be extended to supportmsvc
as one of the options and the variousSConscript
files should be modified to switch on this variable plus potentiallyosname == 'nt'
to determine what the correct defaults are.The text was updated successfully, but these errors were encountered: