| View previous topic :: View next topic |
| Author |
Message |
skistovel

Joined: 17 Jul 2006 Posts: 14
|
Posted: Sat Sep 02, 2006 7:43 am Post subject: Cross, Dot GUm functions |
|
|
| A quick question, are the gumCrossProduct & gumDotProduct functions from the pspgum library, hardware accelerated? |
|
| Back to top |
|
 |
ReKleSS

Joined: 18 Jun 2005 Posts: 73 Location: Melbourne, Australia
|
Posted: Sat Sep 02, 2006 3:05 pm Post subject: |
|
|
| There's no definition of gumCrossProduct in pspgum_vfpu.c, so no, it's not accelerated. The time to load your figures onto the VFPU would probably negate any speed advantage, anyway. |
|
| Back to top |
|
 |
Raphael

Joined: 17 Jan 2006 Posts: 646 Location: Germany
|
Posted: Sat Sep 02, 2006 8:04 pm Post subject: |
|
|
If you need the speed, write your own batch-processor in vfpu. I could speed up the audio analysis filter of my demo by a factor of 7-8.
Avoid using single function-calls for single operations though, the function calling and parameter loading/storing overhead kills the performance gain. _________________ <Don't push the river, it flows.>
http://wordpress.fx-world.org - my devblog
http://wiki.fx-world.org - VFPU documentation wiki
Alexander Berl |
|
| Back to top |
|
 |
chp
Joined: 23 Jun 2004 Posts: 313
|
Posted: Sun Sep 03, 2006 5:13 am Post subject: |
|
|
gumCrossProduct() and gumDotProduct() are there for convenience, if you intend to use them in a larger set of data I recommend that you use vdot.p/t/q or vcrs.t directly. If all you're looking for is a way of rotating a point, vtfm2/3/4.p/t/q is also in the vfpu instruction set. _________________ GE Dominator |
|
| Back to top |
|
 |
skistovel

Joined: 17 Jul 2006 Posts: 14
|
Posted: Mon Sep 04, 2006 11:37 am Post subject: |
|
|
Actually, I was just looking at my vec3 class and was thinking if those functions were hardware accelarated, switch my own with them.
| Quote: |
gumCrossProduct() and gumDotProduct() are there for convenience, if you intend to use them in a larger set of data I recommend that you use vdot.p/t/q or vcrs.t directly. If all you're looking for is a way of rotating a point, vtfm2/3/4.p/t/q is also in the vfpu instruction set. |
| Quote: | If you need the speed, write your own batch-processor in vfpu. I could speed up the audio analysis filter of my demo by a factor of 7-8.
Avoid using single function-calls for single operations though, the function calling and parameter loading/storing overhead kills the performance gain. |
I seriously suck at assembly.. really bad! :-( |
|
| Back to top |
|
 |
Raphael

Joined: 17 Jan 2006 Posts: 646 Location: Germany
|
Posted: Mon Sep 04, 2006 12:13 pm Post subject: |
|
|
| skistovel wrote: | | Actually, I was just looking at my vec3 class and was thinking if those functions were hardware accelarated, switch my own with them. |
Even if they were, as said using function calls for every operation (dot,cross,etc) will kill the performance gain and will keep you far behind the real potential of the vfpu. vfpu isn't meant for a vector class, but rather for large data processing (you could write your vector class so it can handle operations on batches of data though).
| Quote: | | I seriously suck at assembly.. really bad! :-( |
just some vfpu assembly is really easier than you might think. I learned it in 2-3 days (though I still have big problems with general MIPS asm). Taking a look at gum will already give you a good overview of how it works in general, and a list of the most important vfpu ops is found here: http://hitmen.c02.at/files/yapspd/psp_doc/chap4.html _________________ <Don't push the river, it flows.>
http://wordpress.fx-world.org - my devblog
http://wiki.fx-world.org - VFPU documentation wiki
Alexander Berl |
|
| Back to top |
|
 |
skistovel

Joined: 17 Jul 2006 Posts: 14
|
Posted: Tue Sep 05, 2006 3:29 pm Post subject: |
|
|
| Quote: | | you could write your vector class so it can handle operations on batches of data though |
I don't know about the vector class, but will be useful for the matrix class, but on the other hand doesn't the gum library has that already (multiplication of matrices, etc)?
Anyway. thanks for the quick replys guys, much appreciated! |
|
| Back to top |
|
 |
|