hfinkel / llvm-project-cxxjit

Clang with JIT extensions
https://github.com/hfinkel/llvm-project-cxxjit/wiki
229 stars 23 forks source link

Does [[clang::jit]] Attribute force a template to be JITted? #14

Open CaoZhongZ opened 5 years ago

CaoZhongZ commented 5 years ago

I mean if I want a template to be hybrid, specialize it when I have decisive parameters and JIT it when I haven't.

do_something(...); // This is JIT, OK. do_something<3>(...); // normal C++ behavior or JIT?

hfinkel commented 5 years ago

Yes, although I'm going to work soon on implementing a new interface for this which should allow for this level of control (see http://wg21.link/p1609, section "3. Updated Proposal" - feedback welcome). In the mean time, you can use a wrapper template for the cases that you'd like to JIT.