| June 18, 2009 12:00 AM PDT | |
Implement Intel® Graphics Performance Primitives (Intel® GPP) to provide basic vector operations. These include operations such as addition, subtraction, dot-product, cross-product, scaling, length, normalization, and transformation.
Use the functions in the Intel GPP Vector Module. These functions operate on operands represented in Qm.n and Q16.16 format. This module uses two data structures: GPP_VEC3D and GPP_VEC4D.
GPP_VEC3D, used to store the geometric position of a three-dimensional vector, is defined as follows:
typedef struct{
|
GPP_VEC4D
typedef struct{
|
GPP_VEC3DGPP_VEC3DQm.n
v->x = 327680 ( 5.0000f) |
Q16.16
gppVec3DLength_16_32s(v1, &len1); |
Qm.nQ22.10
v->x = 5120 ( 5.0000f) |
Q22.10
GPP_MATRIX4X4
GppStatus gppVec3DTransform_16_32s |
GppStatus gppVec3DTransform_n_32s |
This item is part of a series about optimizing 3D graphics engines using Intel GPP; the series is introduced in the separate item "How to Optimize 3D Graphics on the Intel® XScale® Microarchitecture."
Intel® GPP for Intel® PCA Application Processors - Vector, Matrix and Raster Modules
For more complete information about compiler optimizations, see our Optimization Notice.

