How to Implement the Intel® GPP Vector Module


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{

I32 x;

I32 y;

I32 z;




typedef struct{

I32 x;

I32 y;

I32 z;

I32 w;


gppVec3DLength _n_32s(GPP_VEC3D* v, U32* pDst, U32 n);



v->x = 327680 ( 5.0000f)

v->y = 327680 ( 5.0000f)

v->z = 327680 ( 5.0000f)



gppVec3DLength_16_32s(v1, &len1);

*len1 = 567542



v->x = 5120 ( 5.0000f)

v->y = 5120 ( 5.0000f)

v->z = 5120 ( 5.0000f)

gppVec3DLength_n_32s(v1, &len2, 10);

*len2 = 8864

FEM: 5.0000f, 5.0000f, 5.0000f = 8.6602 = 8.6602

Len_16: 327680, 327680 , 327680 = 567542 = 8.6600

Len_n(n=10): 5120, 5120, 5120 = 8864 = 8.6563




GppStatus gppVec3DTransform_16_32s 

(GPP_VEC3D* sv, GPP_VEC4D* dv, GPP_MATRIX4X4 m);



GppStatus gppVec3DTransform_n_32s 

(GPP_VEC3D* sv, GPP_VEC4D* dv GPP_MATRIX4X4 m, U32 n);


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

Para obter informações mais completas sobre otimizações do compilador, consulte nosso aviso de otimização.