Skip to content
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

Support for double precision math functions #83

Open
vlovero opened this issue Apr 23, 2021 · 0 comments
Open

Support for double precision math functions #83

vlovero opened this issue Apr 23, 2021 · 0 comments

Comments

@vlovero
Copy link

vlovero commented Apr 23, 2021

Using double precision version of functions from standard math library fails to compile with the following error,

The code

// does not compile
ExecutionBuffer codeAllocator(8192);
Allocator allocator(8192);
FunctionBuffer code(codeAllocator, 8192);
Function<double, double> scalers(allocator, code);
auto & sinFunction = scalers.Immediate(sin);

causes the compiler error

func.cpp:25:34: error: no matching member function for call to 'Immediate'
    auto & sinFunction = scalers.Immediate(sin);
./jit/Include/NativeJIT/ExpressionNodeFactory.h:67:46: note: candidate template ignored: couldn't
      infer template argument 'T'
    ImmediateNode<T>& ExpressionNodeFactory::Immediate(T value)

meanwhile the code,

// works perfectly fine
Function<float, float> scalers(allocator, code);
auto & sinFunction = scalers.Immediate(sinf);

works entirely as expected. I am compiling with Apple clang 11.0.3 on x86_64
Is there a workaround for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant