FIAS . Impressum . Privacy

boost::simd

Giordano Khouri [please enable javascript to see the address]
Tue Apr 1 18:21:50 CEST 2014


I tried using Boost::SIMD, but the MS compilers (VS2012, VS2013 and Nov2013 CTP) all had an Internal Compiler Error (ICE) which is never supposed to happen. I submitted an issue report, so maybe it will be fixed in the next release. If you are using clang or gcc, you will not have this issue.

I like Boost::SIMD for its partial extensibility. Since everything is a template class, you can catch a group of calls by writing one template specialization. Any function can be implemented as a scalar function and the framework will call it for each element of a SIMD type. If you then write an SSE implementation, it will be used for SSE data. The SSE implementation will also be used for AVX data by working on it in halves.

Compiling with Boost::SIMD is must slower than with VC. It relies on argument dependent lookup to select the correct template specialization and the compiler must wade through the huge number of potential matches. Debugging Boost::SIMD can be a pain because if the compiler doesn't end up calling the particular implementation of the function you wanted, this is a template class specialization issue and there's very little help from the compiler to figure out what went wrong.

Currently, compilers don't have any way to debug the compilation of a program. We are only able to debug the execution. There is a tool in development looking to fix this omission called Templight http://plc.inf.elte.hu/templight/ It is a patch to clang, so you have to build clang from patched source code.

Boost::SIMD has another layer that could potentially offer optimization improvements, but I only saw it making things difficult to debug. Instead of executing operations like add, multiply, etc. it will accumulate these operations and references to their operands. When you assign this amalgam to storage, it is then executed. This provides the opportunity for the framework to examine the operations at compile time to eliminate or combine operations. I never saw this happening for what I was experimenting with, so maybe it's something for future expansion.

Also, keep in mind that Boost::SIMD is the open source side of a closed source project. They provide the Altivec and Intel SIMD implementations and OpenMP and TBB execution models. Their commercial license has ARM NEON and a GPU execution model.


Khouri  Giordano
Software Technology Researcher

Nikon Inc.
1300 Walt Whitman Road
Melville NY 11747-3064

Office: 631-547-4335    Fax: 631-547-0361

[please enable javascript to see the address]     www.nikonusa.com


CONFIDENTIAL:
This e-mail including any attachments is intended only for the party or parties to whom it is addressed and may contain information which is privileged and/or confidential. If you are not the intended recipient, you are hereby notified that any use, disclosure, dissemination, distribution, copying, or printing of any information contained in or attached to this e-mail is STRICTLY PROHIBITED and may constitute a breach of confidentiality and/or privilege. If you have received this e-mail in error, please notify immediately the sender by reply e-mail and then delete this e-mail and any attachments in their entirety from your system. Thank you. This e-mail message including any attachments is believed to be free of any viruses; however, it is the sole responsibility of the recipient to ensure that it is virus free, and Nikon does not accept any responsibility for any loss, disruption or damage to your data or computer system which may occur in connection with this e-mail including any attachments.



More information about the Vc mailing list
FIAS . Impressum . Privacy