[vsipl++] [patch] Fix stride for CBE float vmul

Don McCoy don at codesourcery.com
Wed Dec 24 19:24:06 UTC 2008


Jules Bergmann wrote:
> Stride is passed down in elements, not bytes!
>
>
This looks good, but I had a couple of minor questions/comments.


> Index: tests/regressions/large_vmul.cpp
> ===================================================================
> --- tests/regressions/large_vmul.cpp	(revision 230289)
> +++ tests/regressions/large_vmul.cpp	(working copy)
> @@ -46,8 +46,8 @@
>    Vector<T, block_type> Z(size);
>  
>    Rand<T> gen(0, 0);
> -  A = gen.randu(size);
> -  B = gen.randu(size);
> +//  A = gen.randu(size);
> +//  B = gen.randu(size);
>   
Did you mean to leave this commented out?

>  
> @@ -61,7 +61,7 @@
>        std::cout << "A(i) * B(i) = " << A(i) * B(i) << std::endl;
>      }
>  #endif
> -    test_assert(almost_equal(Z(i), A(i) * B(i)));
> +    test_assert(almost_equal(Z.get(i), A(i) * B(i)));
>   
For consistency, should we use .get for all accesses (or drop it)?  I 
guess for tests we ought to always use it, in my opinion.

-- 
Don McCoy
don (at) CodeSourcery
(888) 776-0262 / (650) 331-3385, x712




More information about the vsipl++ mailing list