IPhone matrix multiplication and inversion

I'm trying to apply a Kalman filter to data coming out of an iPhone’s accelerometer. I needed to perform matrix multiplication and inversion as quickly as possible, so I was interested to learn how to use the GPU to complete these two tasks. At the moment, I have found only one link for matrix multiplication:

float mBone01[16] = { ... }
float mBone02[16] = { ... }
float mResult[16];

glMatrixMode  ( GL_MODELVIEW );
glLoadIdentity( );
glLoadMatrix  ( mBone01 );
glMultMatrix  ( mBone02 );
glGetMatrix   ( GL_MODELVIEW, mResult );

even a tough user is not sure that this multiplication is done inside the GPU. Do you have any hint on how to do (if possible) the same for inversion?

Thanks everyone!

+3
source share
3 answers

Kornel ( OpenGL FAQ) , OpenGL .
++, iPhone SDK.
, API OpenGL, .
iPhone, OpenGL ES 2.0, :

  • iPhone 3GS
  • iPod touch 32GB
  • iPod touch 64GB

Apple , OpenGL ES 2.0 : http://developer.apple.com/iphone/library/samplecode/GLES2Sample/index.html

+5

- shaders.

, OpenGL, GLSL , .

+2

The vfpmathlibrary in Google code contains a quick vfp build for several matrix operations, including inversion. This will probably win the use of shaders simply because of the overhead that entails.

0
source

Source: https://habr.com/ru/post/1727946/


All Articles