Fast vector operations on a Sun?

Fast vector operations on a Sun?

Post by David Jelin » Fri, 10 Sep 1999 04:00:00



Is there a library that does hardware accelerated vectors operations
on a Sun?  My loops in C just don't cut it.

Thanks,
David Jelinek

 
 
 

Fast vector operations on a Sun?

Post by Alan Stang » Fri, 10 Sep 1999 04:00:00



> Is there a library that does hardware accelerated vectors operations
> on a Sun?  My loops in C just don't cut it.

There is/are libraries that "vectorize" some trig functions, and other
wise provide hand-coded math libraries.  The Sun Performance library has
many routines also.  You didn't provide any details, so I can't help you
too much.

The Sun Performance library is nice for folks doing any mathematical
work.  On a single cpu, the 1000x1000 DP Linpack yield 460 Mflops.  By
then setting PARALLEL=xx, one can get some nice speedups.  I just tried
this on a 16 cpu system and obtained 1003 MFlops/s (400 Mhz cpus + 8MB
L2 caches).  Of course, 1000x1000 is too small of a problem.  On a
4000x4000 problem, one gets 3.1 GFlops, for example.

--


 
 
 

Fast vector operations on a Sun?

Post by Roland Main » Fri, 10 Sep 1999 04:00:00


Hi !

----



> > Is there a library that does hardware accelerated vectors operations
> > on a Sun?  My loops in C just don't cut it.

> There is/are libraries that "vectorize" some trig functions, and other
> wise provide hand-coded math libraries.  The Sun Performance library has
> many routines also.  You didn't provide any details, so I can't help you
> too much.

Sun Performance library - Solaris 7 SPArc version available from ??

----

Bye,
Roland

--
  __ .  . __
 (o.\ \/ /.o) Roland Mainz                               C/JAVA programmer


 (;O/ \/ \O;) TEL +49 (0) 641/99-13193  FAX +49 (0) 641/99-41359

 
 
 

Fast vector operations on a Sun?

Post by David Jelin » Fri, 10 Sep 1999 04:00:00


I aprreciate your help.

Here are the details:  I need to do basic operations such as
subtracting two vectors and taking magnitudes of vectors.  I'm doing
this many many times, so that's why speed is such an issue.

I'm working on a Sun Ultra 30.

Need to know anything else?

David Jelinek

: > Is there a library that does hardware accelerated vectors operations
: > on a Sun?  My loops in C just don't cut it.

: There is/are libraries that "vectorize" some trig functions, and other
: wise provide hand-coded math libraries.  The Sun Performance library has
: many routines also.  You didn't provide any details, so I can't help you
: too much.

: The Sun Performance library is nice for folks doing any mathematical
: work.  On a single cpu, the 1000x1000 DP Linpack yield 460 Mflops.  By
: then setting PARALLEL=xx, one can get some nice speedups.  I just tried
: this on a 16 cpu system and obtained 1003 MFlops/s (400 Mhz cpus + 8MB
: L2 caches).  Of course, 1000x1000 is too small of a problem.  On a
: 4000x4000 problem, one gets 3.1 GFlops, for example.

: --

--

 
 
 

Fast vector operations on a Sun?

Post by Alan Stang » Sat, 11 Sep 1999 04:00:00



> I aprreciate your help.

> Here are the details:  I need to do basic operations such as
> subtracting two vectors and taking magnitudes of vectors.  I'm doing
> this many many times, so that's why speed is such an issue.

> I'm working on a Sun Ultra 30.

> Need to know anything else?

The Sun Performance Library does have a routine for taking dot products of
vectors.  I imagine it should do better than a basic C code.  I didn't see a
library routine that does just addition and/or subtraction on vectors.  The
routines usually also include a scaling of one of the vectors.  The extra
multiplication probably wouldn't help much.  The manual is on
http://docs.sun.com/

ie   X + a Y.    if a = -1, you can do the subtraction...but this seems like
extra overhead.

Be sure to also check the High Performance Computing O'Reilly text by Dowd.
There are things that can be done to make sure the vectors aren't "aligned"
in memory, etc.

How big are your vectors?

--