Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29230 Discussions

OpenGL Fortran on Windows - Matrix Math

tiddles
Beginner
861 Views
Is there anyone who knows whether matrix calculations could be executed faster using OpenGL routines (e.g.,glMultMatrixf, glRotatef) rather than the intrinsic matmul? We have already checked out Visual Basic and found that even if VB applied DirectX math routines (e.g., D3DXMatrixMultiply), it is still more than twice as slow as optimised Fortran with intrinsic math functions.
An example would be helpful to illustrate any reply. Thanks in advance for any assistance.
0 Kudos
2 Replies
TimP
Honored Contributor III
861 Views
You don't present enough information to answer. Intel MKL is likely to be the fastest, if your matrix dimensions are appropriate (large enough). CVF 6.6 does an excellent job expanding MATMUL() with small fixed dimensions in line.
0 Kudos
Intel_C_Intel
Employee
861 Views
In general you are better off using the GL/D3D transform calls. On machines with accelerated graphics, the matrix calculations will be performed on the adapter which should be faster than using the host cpu. Also using 3D routines results in less data that needs to be sent to the adapter. e.g. glRotatef sends 4 floats to the pipe vs glLoadMatrixf with 16 floats.

John
0 Kudos
Reply