Boost logo

Boost Users :

Subject: Re: [Boost-users] NT2 and Boost.SIMD beta 2 available
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2013-10-16 07:47:16


On 15/10/13 10:36, Olivier Tristan wrote:

> Looks great.
>
> However, using the simple Tutorial Hello World from the documentation on
> VS 2012 (update 3) with boost 1.54 and this beta 2
>
> #include <iostream>
> #include <boost/simd/sdk/simd/io.hpp>
> #include <boost/simd/sdk/simd/pack.hpp>
> #include <boost/simd/include/functions/plus.hpp>
> #include <boost/simd/include/functions/multiplies.hpp>
>
> int main(int argc, const char *argv[])
> {
> boost::simd::pack<float> res;
> boost::simd::pack<float> u(10);
> boost::simd::pack<float> r(11,11,11,11);
>
> res = (u + r) * 2;
>
> std::cout << res << std::endl;
>
> return 0;
> }

Hi, there was a breaking change in the beta 2 and the tutorial wasn't
updated, not sure if we mentioned it in the changelog.

Boost.SIMD moved to stronger typing rules, so since (u + r) is logically
a pack<float> you cannot multiply it by an int (2), you must multiply it
by a float too (2.f).

So you must write
     res = (u + r) * 2.f;

The fix has been pushed to the master branch.

>
> leads to this issue:
>
> Error 3 error C4430: missing type specifier - int assumed. Note:
> C++ does not support default-int
> c:\users\otristan\code\boost\boost\simd\operator\functions\simd\common\preprocessed\map.hpp
> 59 1 test
> Error 9 error C4430: missing type specifier - int assumed. Note:
> C++ does not support default-int
> c:\users\otristan\code\boost\boost\simd\operator\specific\preprocessed\common.hpp
> 88 1 test
> Error 6 error C2955: 'boost::simd::meta::vector_of' : use of class
> template requires template argument list
> c:\users\otristan\code\boost\boost\simd\operator\functions\simd\common\preprocessed\map.hpp
> 64 1 test
> Error 5 error C2923: 'boost::simd::meta::vector_of' : 'rtype' is
> not a valid template type argument for parameter 'T'
> c:\users\otristan\code\boost\boost\simd\operator\functions\simd\common\preprocessed\map.hpp
> 64 1 test
> Error 11 error C2868:
> 'boost::simd::ext::implement<Sig,Site,Enable>::splat_or_map<B>::type' :
> illegal syntax for using-declaration; expected qualified-name
> c:\users\otristan\code\boost\boost\simd\operator\specific\preprocessed\common.hpp
> 88 1 test
> Error 10 error C2602:
> 'boost::simd::ext::implement<Sig,Site,Enable>::splat_or_map<B>::type' is
> not a member of a base class of
> 'boost::simd::ext::implement<Sig,Site,Enable>::splat_or_map<B>'
> c:\users\otristan\code\boost\boost\simd\operator\specific\preprocessed\common.hpp
> 88 1 test
> Error 8 error C2146: syntax error : missing ';' before identifier
> 'type'
> c:\users\otristan\code\boost\boost\simd\operator\specific\preprocessed\common.hpp
> 88 1 test
> Error 2 error C2146: syntax error : missing ';' before identifier
> 'rtype'
> c:\users\otristan\code\boost\boost\simd\operator\functions\simd\common\preprocessed\map.hpp
> 59 1 test
> Error 4 error C2065: 'rtype' : undeclared identifier
> c:\users\otristan\code\boost\boost\simd\operator\functions\simd\common\preprocessed\map.hpp
> 63 1 test
> Error 1 error C2039: 'type' : is not a member of
> 'boost::dispatch::meta::result_of<Sig>'
> c:\users\otristan\code\boost\boost\simd\operator\functions\simd\common\preprocessed\map.hpp
> 58 1 test
> Error 7 error C2039: 'type' : is not a member of
> 'boost::dispatch::meta::call<Sig>'
> c:\users\otristan\code\boost\boost\simd\operator\specific\preprocessed\common.hpp
> 87 1 test
>

Is that the full error message? It's not very explicit.
Making error messages better is something we've been working on, and
apparently we still have some way to go.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net