29 #ifndef __MATH_SIMD_H__
30 #define __MATH_SIMD_H__
45 static void Init(
void );
46 static void InitProcessor(
const char *module,
bool forceGeneric );
61 #define VPCALL __fastcall
104 virtual void VPCALL Add(
float *
dst,
const float constant,
const float *
src,
const int count ) = 0;
105 virtual void VPCALL Add(
float *
dst,
const float *src0,
const float *src1,
const int count ) = 0;
106 virtual void VPCALL Sub(
float *
dst,
const float constant,
const float *
src,
const int count ) = 0;
107 virtual void VPCALL Sub(
float *
dst,
const float *src0,
const float *src1,
const int count ) = 0;
108 virtual void VPCALL Mul(
float *
dst,
const float constant,
const float *
src,
const int count ) = 0;
109 virtual void VPCALL Mul(
float *
dst,
const float *src0,
const float *src1,
const int count ) = 0;
110 virtual void VPCALL Div(
float *
dst,
const float constant,
const float *
src,
const int count ) = 0;
111 virtual void VPCALL Div(
float *
dst,
const float *src0,
const float *src1,
const int count ) = 0;
113 virtual void VPCALL MulAdd(
float *
dst,
const float *src0,
const float *src1,
const int count ) = 0;
115 virtual void VPCALL MulSub(
float *
dst,
const float *src0,
const float *src1,
const int count ) = 0;
124 virtual void VPCALL Dot(
float &
dot,
const float *src1,
const float *src2,
const int count ) = 0;
152 virtual void VPCALL Add16(
float *
dst,
const float *src1,
const float *src2,
const int count ) = 0;
153 virtual void VPCALL Sub16(
float *
dst,
const float *src1,
const float *src2,
const int count ) = 0;
154 virtual void VPCALL Mul16(
float *
dst,
const float *src1,
const float constant,
const int count ) = 0;
192 virtual void VPCALL UpSamplePCMTo44kHz(
float *dest,
const short *pcm,
const int numSamples,
const int kHz,
const int numChannels ) = 0;
193 virtual void VPCALL UpSampleOGGTo44kHz(
float *dest,
const float *
const *ogg,
const int numSamples,
const int kHz,
const int numChannels ) = 0;
194 virtual void VPCALL MixSoundTwoSpeakerMono(
float *mixBuffer,
const float *samples,
const int numSamples,
const float lastV[2],
const float currentV[2] ) = 0;
195 virtual void VPCALL MixSoundTwoSpeakerStereo(
float *mixBuffer,
const float *samples,
const int numSamples,
const float lastV[2],
const float currentV[2] ) = 0;
196 virtual void VPCALL MixSoundSixSpeakerMono(
float *mixBuffer,
const float *samples,
const int numSamples,
const float lastV[6],
const float currentV[6] ) = 0;
197 virtual void VPCALL MixSoundSixSpeakerStereo(
float *mixBuffer,
const float *samples,
const int numSamples,
const float lastV[6],
const float currentV[6] ) = 0;
virtual void VPCALL ConvertJointQuatsToJointMats(idJointMat *jointMats, const idJointQuat *jointQuats, const int numJoints)=0
virtual void VPCALL MatX_TransposeMultiplyAddVecX(idVecX &dst, const idMatX &mat, const idVecX &vec)=0
virtual void VPCALL Sub16(float *dst, const float *src1, const float *src2, const int count)=0
virtual void VPCALL SubAssign16(float *dst, const float *src, const int count)=0
virtual void VPCALL Sub(float *dst, const float constant, const float *src, const int count)=0
virtual void VPCALL UpSamplePCMTo44kHz(float *dest, const short *pcm, const int numSamples, const int kHz, const int numChannels)=0
virtual void VPCALL DeriveTangents(idPlane *planes, idDrawVert *verts, const int numVerts, const int *indexes, const int numIndexes)=0
const int MIXBUFFER_SAMPLES
static void Test_f(const class idCmdArgs &args)
virtual void VPCALL MatX_TransposeMultiplyMatX(idMatX &dst, const idMatX &m1, const idMatX &m2)=0
virtual const char *VPCALL GetName(void) const =0
virtual void VPCALL CreateTextureSpaceLightVectors(idVec3 *lightVectors, const idVec3 &lightOrigin, const idDrawVert *verts, const int numVerts, const int *indexes, const int numIndexes)=0
virtual void VPCALL Div(float *dst, const float constant, const float *src, const int count)=0
virtual void VPCALL Clamp(float *dst, const float *src, const float min, const float max, const int count)=0
virtual void VPCALL CmpGE(byte *dst, const float *src0, const float constant, const int count)=0
virtual void VPCALL MixSoundTwoSpeakerMono(float *mixBuffer, const float *samples, const int numSamples, const float lastV[2], const float currentV[2])=0
virtual void VPCALL MatX_MultiplyMatX(idMatX &dst, const idMatX &m1, const idMatX &m2)=0
virtual void VPCALL OverlayPointCull(byte *cullBits, idVec2 *texCoords, const idPlane *planes, const idDrawVert *verts, const int numVerts)=0
virtual void VPCALL Memset(void *dst, const int val, const int count)=0
virtual void VPCALL MatX_LowerTriangularSolveTranspose(const idMatX &L, float *x, const float *b, const int n)=0
virtual void VPCALL MatX_TransposeMultiplyVecX(idVecX &dst, const idMatX &mat, const idVecX &vec)=0
virtual void VPCALL Zero16(float *dst, const int count)=0
virtual void VPCALL ConvertJointMatsToJointQuats(idJointQuat *jointQuats, const idJointMat *jointMats, const int numJoints)=0
static void Shutdown(void)
virtual void VPCALL CmpLE(byte *dst, const float *src0, const float constant, const int count)=0
virtual void VPCALL CreateSpecularTextureCoords(idVec4 *texCoords, const idVec3 &lightOrigin, const idVec3 &viewOrigin, const idDrawVert *verts, const int numVerts, const int *indexes, const int numIndexes)=0
GLuint GLuint GLsizei count
virtual void VPCALL MinMax(float &min, float &max, const float *src, const int count)=0
virtual void VPCALL CmpLT(byte *dst, const float *src0, const float constant, const int count)=0
virtual void VPCALL AddAssign16(float *dst, const float *src, const int count)=0
virtual void VPCALL MatX_MultiplySubVecX(idVecX &dst, const idMatX &mat, const idVecX &vec)=0
virtual void VPCALL BlendJoints(idJointQuat *joints, const idJointQuat *blendJoints, const float lerp, const int *index, const int numJoints)=0
virtual void VPCALL TransformVerts(idDrawVert *verts, const int numVerts, const idJointMat *joints, const idVec4 *weights, const int *index, const int numWeights)=0
virtual void VPCALL MatX_MultiplyVecX(idVecX &dst, const idMatX &mat, const idVecX &vec)=0
virtual void VPCALL UpSampleOGGTo44kHz(float *dest, const float *const *ogg, const int numSamples, const int kHz, const int numChannels)=0
virtual void VPCALL MulAdd(float *dst, const float constant, const float *src, const int count)=0
virtual void VPCALL DeriveTriPlanes(idPlane *planes, const idDrawVert *verts, const int numVerts, const int *indexes, const int numIndexes)=0
virtual void VPCALL Add(float *dst, const float constant, const float *src, const int count)=0
virtual void VPCALL MixSoundSixSpeakerStereo(float *mixBuffer, const float *samples, const int numSamples, const float lastV[6], const float currentV[6])=0
virtual void VPCALL MixSoundSixSpeakerMono(float *mixBuffer, const float *samples, const int numSamples, const float lastV[6], const float currentV[6])=0
virtual void VPCALL MatX_LowerTriangularSolve(const idMatX &L, float *x, const float *b, const int n, int skip=0)=0
virtual void VPCALL MulAssign16(float *dst, const float constant, const int count)=0
virtual void VPCALL Mul16(float *dst, const float *src1, const float constant, const int count)=0
virtual void VPCALL Dot(float *dst, const idVec3 &constant, const idVec3 *src, const int count)=0
virtual void VPCALL MixSoundTwoSpeakerStereo(float *mixBuffer, const float *samples, const int numSamples, const float lastV[2], const float currentV[2])=0
static void InitProcessor(const char *module, bool forceGeneric)
idSIMDProcessor * SIMDProcessor
virtual void VPCALL Mul(float *dst, const float constant, const float *src, const int count)=0
virtual void VPCALL Add16(float *dst, const float *src1, const float *src2, const int count)=0
virtual void VPCALL Copy16(float *dst, const float *src, const int count)=0
virtual void VPCALL MatX_TransposeMultiplySubVecX(idVecX &dst, const idMatX &mat, const idVecX &vec)=0
virtual bool VPCALL MatX_LDLTFactor(idMatX &mat, idVecX &invDiag, const int n)=0
virtual void VPCALL DeriveUnsmoothedTangents(idDrawVert *verts, const dominantTri_s *dominantTris, const int numVerts)=0
virtual void VPCALL Memcpy(void *dst, const void *src, const int count)=0
virtual void VPCALL UntransformJoints(idJointMat *jointMats, const int *parents, const int firstJoint, const int lastJoint)=0
virtual void VPCALL TransformJoints(idJointMat *jointMats, const int *parents, const int firstJoint, const int lastJoint)=0
virtual void VPCALL TracePointCull(byte *cullBits, byte &totalOr, const float radius, const idPlane *planes, const idDrawVert *verts, const int numVerts)=0
virtual void VPCALL MatX_MultiplyAddVecX(idVecX &dst, const idMatX &mat, const idVecX &vec)=0
virtual void VPCALL MulSub(float *dst, const float constant, const float *src, const int count)=0
virtual void VPCALL NormalizeTangents(idDrawVert *verts, const int numVerts)=0
virtual void VPCALL MixedSoundToSamples(short *samples, const float *mixBuffer, const int numSamples)=0
idVertexCache vertexCache
virtual void VPCALL CmpGT(byte *dst, const float *src0, const float constant, const int count)=0
float dot(float a[], float b[])
virtual void VPCALL Negate16(float *dst, const int count)=0
virtual void VPCALL ClampMin(float *dst, const float *src, const float min, const int count)=0
virtual void VPCALL ClampMax(float *dst, const float *src, const float max, const int count)=0
virtual void VPCALL DecalPointCull(byte *cullBits, const idPlane *planes, const idDrawVert *verts, const int numVerts)=0
virtual int VPCALL CreateShadowCache(idVec4 *vertexCache, int *vertRemap, const idVec3 &lightOrigin, const idDrawVert *verts, const int numVerts)=0
virtual int VPCALL CreateVertexProgramShadowCache(idVec4 *vertexCache, const idDrawVert *verts, const int numVerts)=0