# vecmath question

Hi

I am wondering if it would be possible to build up a vecmath package which uses the graphics hardware to perform the calculations? Or is there any such vecmath library that makes use of the graphics hardware?

Thanks for all the responses.

Ihave found a project on dev.java.net that supports vecmath through java on BLAS and LAPACK.

It's possible, but it won't give you no advantage. The overhead of JNI calls to the native libraries (wrappers for the graphics hardware) for each vecmath operation kills any advantage you may get.

I've tried with the simple task of multiplying 2 transform matrices (4 x 4 floats), on the hardware P4 HT 2.8 GHz, with nVidia GeForce 4 Ti 4600 AGP 4x, and after the HotSpot compiler kicked in, the all java multiplication was slightly faster than java call -> C wrapper -> GPU.

Cheers,

Florin

-----UrsprÃ¼ngliche Nachricht-----

Von: java3d-interest@javadesktop.org

[mailto:java3d-interest@javadesktop.org]

Gesendet: Montag, 15. November 2004 09:01

An: interest@java3d.dev.java.net

Betreff: [JAVA3D-INTEREST] vecmath question

Hi

I am wondering if it would be possible to build up a vecmath package which uses the graphics hardware to perform the calculations? Or is there any such vecmath library that makes use of the graphics hardware?

---

[Message sent by forum member 'nitro' (nitro)]

http://www.javadesktop.org/forums/thread.jspa?messageID=38295閗

---------------------------------------------------------------------

To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net

For additional commands, e-mail: interest-help@java3d.dev.java.net

---------------------------------------------------------------------

To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net

For additional commands, e-mail: interest-help@java3d.dev.java.net

But this may change if you have to do calculations with big matrices. It was not though for use in 3d but for calculations in statics where one has to solve one big matrix system. Therefore you only would have one JNI call. Would it be possible for you to hand me the example you have already done?

The GPU is dedicated to 3d operations, so it's exposing only operations on 4 x 4 matices or 4 x 1 vectors, and it's quite limited on what you can do (multiply, invert, transpose). It's not a generic math VPU. For that one you have the CPU itself ! I'm pretty sure there are hundreds of libraries available dedicated to what you want. Get a plain C or Fortran library and access it over JNI.

Cheers,

Florin

-----UrsprÃ¼ngliche Nachricht-----

Von: java3d-interest@javadesktop.org

[mailto:java3d-interest@javadesktop.org]

Gesendet: Montag, 15. November 2004 12:24

An: interest@java3d.dev.java.net

Betreff: Re: AW: [JAVA3D-INTEREST] vecmath question

But this may change if you have to do calculations with big matrices. It was not though for use in 3d but for calculations in statics where one has to solve one big matrix system. Therefore you only would have one JNI call. Would it be possible for you to hand me the example you have already done?

---

[Message sent by forum member 'nitro' (nitro)]

http://www.javadesktop.org/forums/thread.jspa?messageID=38321閱

To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net

For additional commands, e-mail: interest-help@java3d.dev.java.net

To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net

For additional commands, e-mail: interest-help@java3d.dev.java.net

There is a very interesting lib to help JNI calls

http://www.excelsior-usa.com/xfunction.html (Windows & Linux)

It is not free, but you can test your ideia using the trial version. If

results matches your needs you can develop you own JNI interface or licence

xFunction.

Alessandro

--- java3d-interest@javadesktop.org escreveu:

> But this may change if you have to do calculations with big matrices. It was

> not though for use in 3d but for calculations in statics where one has to

> solve one big matrix system. Therefore you only would have one JNI call.

> Would it be possible for you to hand me the example you have already done?

> ---

> [Message sent by forum member 'nitro' (nitro)]

>

> http://www.javadesktop.org/forums/thread.jspa?messageID=38321閱

>

> ---------------------------------------------------------------------

> To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net

> For additional commands, e-mail: interest-help@java3d.dev.java.net

>

>

_______________________________________________________

Yahoo! Acesso GrÃ¡tis - Internet rÃ¡pida e grÃ¡tis. Instale o discador agora! http://br.acesso.yahoo.com/

---------------------------------------------------------------------

To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net

For additional commands, e-mail: interest-help@java3d.dev.java.net