On Thursday, 3 October 2013 at 22:30:24 UTC, David Nadlinger
wrote:
On Thursday, 3 October 2013 at 22:25:27 UTC, Joseph Cassman
wrote:
Are there plans to eventually support the use of asm blocks in
CTFE?
No.
Any ideas on how to implement isAVXPossible() and its related
functionality without using a runtime test are appreciated.
What would you even want the function to return in the first
place? The CPU features you can use obviously depend on the
specific CPU the executable will run on, so the answer can't
generally by known at compile time.
Do you want to base your decision on the CPU of the build host?
Or are you looking for an efficient way to implement the
runtime check?
David
And if decision is based on build host it makes much more sense
to incorporate check into the build process and supply results to
main program in a form of manual version. At least in that way it
will be perfectly clear that this is intended behavior.