forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Cross, Dot GUm functions

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
skistovel



Joined: 17 Jul 2006
Posts: 14

PostPosted: Sat Sep 02, 2006 7:43 am    Post subject: Cross, Dot GUm functions Reply with quote

A quick question, are the gumCrossProduct & gumDotProduct functions from the pspgum library, hardware accelerated?
Back to top
View user's profile Send private message
ReKleSS



Joined: 18 Jun 2005
Posts: 73
Location: Melbourne, Australia

PostPosted: Sat Sep 02, 2006 3:05 pm    Post subject: Reply with quote

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
View user's profile Send private message
Raphael



Joined: 17 Jan 2006
Posts: 646
Location: Germany

PostPosted: Sat Sep 02, 2006 8:04 pm    Post subject: Reply with 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.
_________________
<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
View user's profile Send private message Visit poster's website
chp



Joined: 23 Jun 2004
Posts: 313

PostPosted: Sun Sep 03, 2006 5:13 am    Post subject: Reply with 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.
_________________
GE Dominator
Back to top
View user's profile Send private message
skistovel



Joined: 17 Jul 2006
Posts: 14

PostPosted: Mon Sep 04, 2006 11:37 am    Post subject: Reply with quote

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
View user's profile Send private message
Raphael



Joined: 17 Jan 2006
Posts: 646
Location: Germany

PostPosted: Mon Sep 04, 2006 12:13 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
skistovel



Joined: 17 Jul 2006
Posts: 14

PostPosted: Tue Sep 05, 2006 3:29 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group