FROM : Glen Low
DATE : Mon Oct 18 18:19:02 2004
On 18/10/2004, at 2:23 AM, gabe taubman wrote:
> Thanks for the links! I was also wondering if anyone knows if this
> would be a useful way of utilizing AltiVec. For instance, the
> programs people write with this library are most likely not
> multiplying thousands of matrices in a row. However, it being a
> graphics package, they will be multiplying LOTS of vectors by matrices
> one by one, just not all in a bunch.
>
> On the Vector Libraries page, I read the stuff about cBLAS and it
> seems to have Matrix*Vector and stuff like that. So let's say that i
> comment out the function overload for Matrix * Vector and I replace it
> with one that uses the cBLAS version (gemv I think it is) and they do
> it just once. Will there be any significant speed up or is it just
> not worth it?
>
> Thanks!
> gabe
>
>
I'm the miscreant responsible for macstl, listed on the HPC page.
One of the advantages of macstl is minimal overhead and maximal
flexibility when calling functions, since all functions are inlined as
opposed to being in a code library. You can also use valarrays
transparently and portably and not have to touch Altivec code unless
you want to, e.g. you can use the slice arrays to step through a
valarray and it will still use Altivec to optimally fetch the data. You
can write your own functions in C++ to call through to macstl and if
they inline, they will be very fast e.g.
valarray <float> v1, v2;
valarray <float> v3 = v1 [slice (2, 3, 5)] * v2 [slice (1, 3, 7)]; //
optimally fetches data from slices of v1 and v2, and multiplies, all
within Altivec
Here's a direct link:
http://www.pixelglow.com/macstl/
I'm going to break one of the cardinal rules of software marketing --
"promise less, deliver more" :-) ... version 0.2 is on the way and it
will work portably on SSE2 as well. It will also have fast integer and
accurate division and square root algorithms, complex number
arithmetic, transparent constant generation, fused multiply-add
optimizations, alias safety etc. Licensing will likely change to
open-source RPL + a paid-up proprietary license for those who don't
want to reciprocate their code.
Cheers, Glen Low
---
pixelglow software | simply brilliant stuff
www.pixelglow.com
DATE : Mon Oct 18 18:19:02 2004
On 18/10/2004, at 2:23 AM, gabe taubman wrote:
> Thanks for the links! I was also wondering if anyone knows if this
> would be a useful way of utilizing AltiVec. For instance, the
> programs people write with this library are most likely not
> multiplying thousands of matrices in a row. However, it being a
> graphics package, they will be multiplying LOTS of vectors by matrices
> one by one, just not all in a bunch.
>
> On the Vector Libraries page, I read the stuff about cBLAS and it
> seems to have Matrix*Vector and stuff like that. So let's say that i
> comment out the function overload for Matrix * Vector and I replace it
> with one that uses the cBLAS version (gemv I think it is) and they do
> it just once. Will there be any significant speed up or is it just
> not worth it?
>
> Thanks!
> gabe
>
>
I'm the miscreant responsible for macstl, listed on the HPC page.
One of the advantages of macstl is minimal overhead and maximal
flexibility when calling functions, since all functions are inlined as
opposed to being in a code library. You can also use valarrays
transparently and portably and not have to touch Altivec code unless
you want to, e.g. you can use the slice arrays to step through a
valarray and it will still use Altivec to optimally fetch the data. You
can write your own functions in C++ to call through to macstl and if
they inline, they will be very fast e.g.
valarray <float> v1, v2;
valarray <float> v3 = v1 [slice (2, 3, 5)] * v2 [slice (1, 3, 7)]; //
optimally fetches data from slices of v1 and v2, and multiplies, all
within Altivec
Here's a direct link:
http://www.pixelglow.com/macstl/
I'm going to break one of the cardinal rules of software marketing --
"promise less, deliver more" :-) ... version 0.2 is on the way and it
will work portably on SSE2 as well. It will also have fast integer and
accurate division and square root algorithms, complex number
arithmetic, transparent constant generation, fused multiply-add
optimizations, alias safety etc. Licensing will likely change to
open-source RPL + a paid-up proprietary license for those who don't
want to reciprocate their code.
Cheers, Glen Low
---
pixelglow software | simply brilliant stuff
www.pixelglow.com
| Related mails | Author | Date |
|---|---|---|
| gabe taubman | Oct 17, 06:38 | |
| Steven Marcus | Oct 17, 08:52 | |
| gabe taubman | Oct 17, 20:23 | |
| Richard Cameron | Oct 17, 20:49 | |
| Glen Low | Oct 18, 18:19 |






Cocoa mail archive

