Compile for many targets
Caio S. Souza
[please enable javascript to see the address]
Sun Apr 17 00:21:00 CEST 2016
Hi!
I'm a bit confused on how to make a program work on all available
implementations. I implemented a simple function (foo) that uses Vc in
a separate .cpp file. I then successfully compiled it using the macro
vc_compile_for_all_implementations within cmake. Now I would like to
select at runtime which version of foo to call based on the result of
Vc::bestImplementationSupported. After looking at the trigonometric
functions implementation I tried to use template specialization when
defining foo and call each foo specialization inside an ugly
switch-case. But I don't know how to specialize/call foo when there
are extra instructions. How is the best way to proceed? Is a
switch-case the best strategy in this context?
Thanks in advance
--
Caio S. Souza
Laboratório de Biologia Teórica e Computacional
Universidade de Brasília
www.lbtc.unb.br
More information about the Vc
mailing list