
alfC wrote:
thank you, where I can find Boost.SIMD, is functor defined there? Boost.SIMD is currently under work and will be released to the vault "soon"
is this "plus" the same as "std::plus"? If so how can x, y be of different type?
no, this plus is a tag defined by the library. x and y are from different type and i use a tag dispatching method to discriminate the actual semantic of plus to use. Basically, I scan the argument list and try to find non trivial types, if i do i ask for a specific properties called tag_of on those types and select the implementation to use to perform the operation. Currently we support arithmetic types and SIMD types but we provide an extension mecanism so you can define your own type set and give them proper implementation (for ex., complex number, matrix etc). All those variation are called by the same functor call anyway, making it a pure generic tag-dispatched computation facility.