[vsipl++] [patch] scalar-complex multiply-add user-defined kernel
Stefan Seefeld
stefan at codesourcery.com
Tue Sep 2 10:40:46 UTC 2008
Don McCoy wrote:
> This patch extends the Cell/BE user-defined kernel framework to allow
> passing of views with different data types down to the kernels. The
> scalar-complex multiply add (where A in A * B + C is a scalar and the
> rest are complex) is used as a test case.
>
> Ok to commit?
> // Helper functor, converts void buffer pointer to appropriate type.
> +//
> +// The 'off' parameter is a byte offset, while 'size' is in elements.
> +// This is necessary because the first is calculated from the amount
> +// data previously allocated, which may or may not have the same data
> +// type. Conversely, the second parameter refers to the amount of
> +// data for the current segment and it is therefore easier to use
> +// pointer arithmetic since the type is known.
>
> template <typename T>
> struct To_ptr
As just discussed in another mail, please use '//.' here, and omit the
empty line between the comment and the declaration, so this becomes
visible documentation in the API reference.
(There are multiple such comments in the patch.)
I was also reminded that we use iostreams and stdio interchangably. I
think we should try to be more vigilant and slowly phase out the use of
printf in favor of std::ostream (or, if there are strong arguments for
printf, do the inverse).
Thanks,
Stefan
--
Stefan Seefeld
CodeSourcery
stefan at codesourcery.com
(650) 331-3385 x718
More information about the vsipl++
mailing list