#ifndef LINEAR_H
#define LINEAR_H
 
#ifdef __cplusplus
extern "C" {
#endif
 
/* For DLL using these function :*/
#include "cpa_expt.h" 
 
#include "vertex.h"
 
extern CPA_EXPORT void GLI_xSerialLinearOp( long lNbOfVertex , MTH3D_tdstVector *p_stSource , struct GLI_tdstAligned3DVector_ *p_stDest , POS_tdstCompletePosition *p_stMatrix) ; 
extern CPA_EXPORT void GLI_xSerialDotProductAligned ( long lNbOfVertex, struct GLI_tdstAligned3DVector_ *p_stSource , float *p_stDest  , MTH3D_tdstVector  *p_stMultiplicator, long lIncrement) ;
 
/**********************************************************************************************/
/* Name: GLI_xSerialDotProduct*/
/* Goal: Compute (input 3d vector table)(a 3d Vector) -> (Dest scalar table)*/
/* Code: Philippe Vimont / 1.0*/
/**********************************************************************************************/
/* C function*/
#ifdef NO_ASSEMBLY_IN_GLI

    extern CPA_EXPORT void GLI_xSerialDotProduct ( long lNbOfVertex, MTH3D_tdstVector *p_stSource , float *p_stDest, MTH3D_tdstVector *p_stMultiplicator, long lIncrement);

#else  /*NO_ASSEMBLY_IN_GLI*/

    #define GLI_xSerialDotProduct _GLI_xSerialDotProduct
    CALLING_ASM_5_0(GLI_xSerialDotProduct, ecx, esi, edi, eax ,ebx );

#ifdef WATCOM
    #pragma aux _GLI_xSerialDotProduct parm [ecx] [esi] [edi] [eax] [ebx] [edx]\
          modify [ecx esi edi eax ebx edx];
#endif

/**********************************************************************************************/
/* Name: GLI_xSerialTouch*/
/* Goal: Read for cache (test)*/
/* Code: Philippe Vimont / 1.0*/
/* OPTIMMIZED : Assembly (serial.msm)*/
/**********************************************************************************************/
#define GLI_xSerialTouch _GLI_xSerialTouch

    CALLING_ASM_2_0(GLI_xSerialTouch, ecx, edi);

#ifdef WATCOM
    #pragma aux _GLI_xSerialTouch parm [ecx]  [edi] \
          modify [ecx edi];
#endif

/**********************************************************************************************/
/* Name: GLI_xSerialMula9MatrixVertex_*/
/* Goal: Read for cache (test)*/
/* Code: Philippe Vimont / 1.0*/
/* OPTIMMIZED : Assembly (serial.msm)*/
/**********************************************************************************************/
#define GLI_xSerialMula9MatrixVertex _GLI_xSerialMula9MatrixVertex

    CALLING_ASM_5_0(GLI_xSerialMula9MatrixVertex, ecx, esi, edi, edx, eax );

#ifdef WATCOM

    #pragma aux _GLI_xSerialMula9MatrixVertex parm [ecx] [esi] [edi] [edx] [eax] \
          modify [ecx esi edi eax ebx edx];

#endif

/**********************************************************************************************/
/* Name: GLI_xSerialAddVertex */
/* Goal: Compute (Dest 3d vector table) + (a 3d Vector) -> (Dest 3d vector table)*/
/* Code: Philippe Vimont / 1.0*/
/* OPTIMMIZED : Assembly (serial.msm)*/
/**********************************************************************************************/
#define GLI_xSerialAdd3DVertex _GLI_xSerialAdd3DVertex

    CALLING_ASM_3_0(GLI_xSerialAdd3DVertex, ecx, edi, eax );

#ifdef WATCOM
    
    #pragma aux _GLI_xSerialAdd3DVertex parm [ecx] [edi] [eax] modify [ecx edi eax];

#endif /* WATCOM */ 

#endif /* NO_ASSEMBLY_IN_GLI */


 
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#ifdef __cplusplus
}; /* extern"c"*/
#endif
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
 
#endif /* LINEAR_H*/
