Cross, Dot GUm functions
Cross, Dot GUm functions
A quick question, are the gumCrossProduct & gumDotProduct functions from the pspgum library, hardware accelerated?
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.
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
http://wordpress.fx-world.org - my devblog
http://wiki.fx-world.org - VFPU documentation wiki
Alexander Berl
Actually, I was just looking at my vec3 class and was thinking if those functions were hardware accelarated, switch my own with them.
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.
I seriously suck at assembly.. really bad! :-(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.
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).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.
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.htmlI seriously suck at assembly.. really bad! :-(
<Don't push the river, it flows.>
http://wordpress.fx-world.org - my devblog
http://wiki.fx-world.org - VFPU documentation wiki
Alexander Berl
http://wordpress.fx-world.org - my devblog
http://wiki.fx-world.org - VFPU documentation wiki
Alexander Berl
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)?you could write your vector class so it can handle operations on batches of data though
Anyway. thanks for the quick replys guys, much appreciated!