Loading [MathJax]/extensions/TeX/AMSsymbols.js
LALPulsar 7.1.1.1-ea7c608
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
vectormath.h File Reference

Prototypes

alignedREAL8VectorcreateAlignedREAL8Vector (UINT4 length, const size_t align)
 
void destroyAlignedREAL8Vector (alignedREAL8Vector *vector)
 
alignedREAL8VectorArraycreateAlignedREAL8VectorArray (const UINT4 length, const UINT4 vectorLength, const size_t align)
 
void destroyAlignedREAL8VectorArray (alignedREAL8VectorArray *array)
 
REAL4VectorAlignedArraycreateREAL4VectorAlignedArray (const UINT4 length, const UINT4 vectorLength, const size_t align)
 
void destroyREAL4VectorAlignedArray (REAL4VectorAlignedArray *array)
 
INT4 DirichletRatioVector (COMPLEX8Vector *output, alignedREAL8Vector *delta0, alignedREAL8Vector *delta1, alignedREAL8Vector *scaling, const UserInput_t *params)
 
INT4 VectorArraySum (REAL4VectorAlignedArray *output, REAL4VectorAlignedArray *input1, REAL4VectorAlignedArray *input2, INT4 vectorpos1, INT4 vectorpos2, INT4 outputvectorpos, INT4 numvectors)
 Sum vectors from REAL4VectorAlignedArrays into an output REAL4VectorAlignedArray using SIMD. More...
 
INT4 sse_exp_REAL8Vector (alignedREAL8Vector *output, alignedREAL8Vector *input)
 Exponential of input vector is computed using SSE, based on the Cephes library. More...
 
INT4 fastSSVectorMultiply_with_stride_and_offset (REAL4VectorAligned *output, const REAL4VectorAligned *input1, const REAL4VectorAligned *input2, const INT4 stride1, const INT4 stride2, const INT4 offset1, const INT4 offset2)
 Computes a multiplication of two vectors with a stride and initial offset. More...
 
INT4 VectorSubtractREAL4 (REAL4VectorAligned *output, REAL4VectorAligned *input1, REAL4VectorAligned *input2, INT4 vectorMath)
 
INT4 VectorScaleREAL8 (alignedREAL8Vector *output, alignedREAL8Vector *input, REAL8 scale, INT4 vectorMath)
 
INT4 VectorShiftREAL8 (alignedREAL8Vector *output, alignedREAL8Vector *input, REAL8 shift, INT4 vectorMath)
 
INT4 VectorAddREAL8 (alignedREAL8Vector *output, alignedREAL8Vector *input1, alignedREAL8Vector *input2, INT4 vectorMath)
 
INT4 VectorSubtractREAL8 (alignedREAL8Vector *output, alignedREAL8Vector *input1, alignedREAL8Vector *input2, INT4 vectorMath)
 
INT4 VectorMultiplyREAL8 (alignedREAL8Vector *output, alignedREAL8Vector *input1, alignedREAL8Vector *input2, INT4 vectorMath)
 
INT4 VectorInvertREAL8 (alignedREAL8Vector *output, alignedREAL8Vector *input, INT4 vectorMath)
 
INT4 VectorFloorREAL8 (alignedREAL8Vector *output, alignedREAL8Vector *input, INT4 vectorMath)
 
INT4 VectorRoundREAL4 (REAL4VectorAligned *output, REAL4VectorAligned *input, INT4 vectorMath)
 
INT4 VectorRoundREAL8 (alignedREAL8Vector *output, alignedREAL8Vector *input, INT4 vectorMath)
 
INT4 VectorAbsREAL4 (REAL4VectorAligned *output, REAL4VectorAligned *input, INT4 vectorMath)
 
INT4 VectorAbsREAL8 (alignedREAL8Vector *output, alignedREAL8Vector *input, INT4 vectorMath)
 
INT4 VectorCabsfCOMPLEX8 (REAL4VectorAligned *output, COMPLEX8Vector *input, INT4 vectorMath)
 
INT4 VectorCabsCOMPLEX8 (alignedREAL8Vector *output, COMPLEX8Vector *input, INT4 vectorMath)
 
INT4 sseSSVectorSubtract (REAL4VectorAligned *output, REAL4VectorAligned *input1, REAL4VectorAligned *input2)
 Subtract two REAL4VectorAligned using SSE. More...
 
INT4 avxSSVectorSubtract (REAL4VectorAligned *output, REAL4VectorAligned *input1, REAL4VectorAligned *input2)
 Subtract two REAL4VectorAligned using AVX. More...
 
INT4 sseAddScalarToREAL8Vector (alignedREAL8Vector *output, alignedREAL8Vector *input, REAL8 scalar)
 Add a REAL8 scalar value to the elements of a alignedREAL8Vector using SSE. More...
 
INT4 avxAddScalarToREAL8Vector (alignedREAL8Vector *output, alignedREAL8Vector *input, REAL8 scalar)
 Add a REAL8 scalar value to the elements of a alignedREAL8Vector using AVX. More...
 
INT4 sseScaleREAL8Vector (alignedREAL8Vector *output, alignedREAL8Vector *input, REAL8 scale)
 Scale the elements of a alignedREAL8Vector by a REAL8 value using SSE. More...
 
INT4 avxScaleREAL8Vector (alignedREAL8Vector *output, alignedREAL8Vector *input, REAL8 scale)
 Scale the elements of a alignedREAL8Vector by a REAL8 value using AVX. More...
 
INT4 sseDDVectorSum (alignedREAL8Vector *output, alignedREAL8Vector *input1, alignedREAL8Vector *input2)
 Sum two alignedREAL8Vector using SSE2. More...
 
INT4 avxDDVectorSum (alignedREAL8Vector *output, alignedREAL8Vector *input1, alignedREAL8Vector *input2)
 Sum two alignedREAL8Vector using AVX. More...
 
INT4 sseDDVectorSubtract (alignedREAL8Vector *output, alignedREAL8Vector *input1, alignedREAL8Vector *input2)
 Subtract two alignedREAL8Vector using SSE. More...
 
INT4 avxDDVectorSubtract (alignedREAL8Vector *output, alignedREAL8Vector *input1, alignedREAL8Vector *input2)
 Subtract two alignedREAL8Vector using AVX. More...
 
INT4 sseDDVectorMultiply (alignedREAL8Vector *output, alignedREAL8Vector *input1, alignedREAL8Vector *input2)
 Multiply two alignedREAL8Vector using SSE. More...
 
INT4 avxDDVectorMultiply (alignedREAL8Vector *output, alignedREAL8Vector *input1, alignedREAL8Vector *input2)
 Multiply two alignedREAL8Vector using AVX. More...
 
INT4 sseInvertREAL8Vector (alignedREAL8Vector *output, alignedREAL8Vector *input)
 Invert a alignedREAL8Vector using SSE. More...
 
INT4 avxInvertREAL8Vector (alignedREAL8Vector *output, alignedREAL8Vector *input)
 Invert a alignedREAL8Vector using AVX. More...
 

Go to the source code of this file.

Function Documentation

◆ createAlignedREAL8Vector()

alignedREAL8Vector * createAlignedREAL8Vector ( UINT4  length,
const size_t  align 
)

Definition at line 55 of file vectormath.c.

◆ destroyAlignedREAL8Vector()

void destroyAlignedREAL8Vector ( alignedREAL8Vector vector)

Definition at line 67 of file vectormath.c.

◆ createAlignedREAL8VectorArray()

alignedREAL8VectorArray * createAlignedREAL8VectorArray ( const UINT4  length,
const UINT4  vectorLength,
const size_t  align 
)

Definition at line 77 of file vectormath.c.

◆ destroyAlignedREAL8VectorArray()

void destroyAlignedREAL8VectorArray ( alignedREAL8VectorArray array)

Definition at line 88 of file vectormath.c.

◆ createREAL4VectorAlignedArray()

REAL4VectorAlignedArray * createREAL4VectorAlignedArray ( const UINT4  length,
const UINT4  vectorLength,
const size_t  align 
)

Definition at line 99 of file vectormath.c.

◆ destroyREAL4VectorAlignedArray()

void destroyREAL4VectorAlignedArray ( REAL4VectorAlignedArray array)

Definition at line 110 of file vectormath.c.

◆ DirichletRatioVector()

INT4 DirichletRatioVector ( COMPLEX8Vector output,
alignedREAL8Vector delta0,
alignedREAL8Vector delta1,
alignedREAL8Vector scaling,
const UserInput_t params 
)

Definition at line 122 of file vectormath.c.

◆ VectorArraySum()

INT4 VectorArraySum ( REAL4VectorAlignedArray output,
REAL4VectorAlignedArray input1,
REAL4VectorAlignedArray input2,
INT4  vectorpos1,
INT4  vectorpos2,
INT4  outputvectorpos,
INT4  numvectors 
)

Sum vectors from REAL4VectorAlignedArrays into an output REAL4VectorAlignedArray using SIMD.

Parameters
[out]outputPointer to REAL4VectorAlignedArray
[in]input1Pointer to REAL4VectorAlignedArray
[in]input2Pointer to REAL4VectorAlignedArray
[in]vectorpos1Starting vector index for input1
[in]vectorpos2Starting vector index for input2
[in]outputvectorposStarting vector index for output
[in]numvectorsNumber of vectors to sum, incrementing vectorpos1, vectorpos2, and outputvectorpos by 1 each time
Returns
Status value

Definition at line 1292 of file vectormath.c.

◆ sse_exp_REAL8Vector()

INT4 sse_exp_REAL8Vector ( alignedREAL8Vector output,
alignedREAL8Vector input 
)

Exponential of input vector is computed using SSE, based on the Cephes library.

Parameters
[out]outputPointer to alignedREAL8Vector
[in]inputPointer to alignedREAL8Vector
Returns
Status value

Definition at line 1609 of file vectormath.c.

◆ fastSSVectorMultiply_with_stride_and_offset()

INT4 fastSSVectorMultiply_with_stride_and_offset ( REAL4VectorAligned output,
const REAL4VectorAligned input1,
const REAL4VectorAligned input2,
const INT4  stride1,
const INT4  stride2,
const INT4  offset1,
const INT4  offset2 
)

Computes a multiplication of two vectors with a stride and initial offset.

Be sure you know what you are doing or this could go wrong (no error checking for speed!)

Parameters
[out]outputPointer to REAL4VectorAligned output
[in]input1Pointer to first REAL4VectorAligned input
[in]input2Pointer to second REAL4VectorAligned input
[in]stride1Skip stride1 number of elements in input1
[in]stride2Skip stride2 number of elements in input2
[in]offset1Start at offset1 number of elements from the beginning of input1
[in]offset2Start at offset2 number of elements from the beginning of input2
Returns
Status value

Definition at line 221 of file vectormath.c.

◆ VectorSubtractREAL4()

INT4 VectorSubtractREAL4 ( REAL4VectorAligned output,
REAL4VectorAligned input1,
REAL4VectorAligned input2,
INT4  vectorMath 
)

Definition at line 243 of file vectormath.c.

◆ VectorScaleREAL8()

INT4 VectorScaleREAL8 ( alignedREAL8Vector output,
alignedREAL8Vector input,
REAL8  scale,
INT4  vectorMath 
)

Definition at line 256 of file vectormath.c.

◆ VectorShiftREAL8()

INT4 VectorShiftREAL8 ( alignedREAL8Vector output,
alignedREAL8Vector input,
REAL8  shift,
INT4  vectorMath 
)

Definition at line 269 of file vectormath.c.

◆ VectorAddREAL8()

INT4 VectorAddREAL8 ( alignedREAL8Vector output,
alignedREAL8Vector input1,
alignedREAL8Vector input2,
INT4  vectorMath 
)

Definition at line 282 of file vectormath.c.

◆ VectorSubtractREAL8()

INT4 VectorSubtractREAL8 ( alignedREAL8Vector output,
alignedREAL8Vector input1,
alignedREAL8Vector input2,
INT4  vectorMath 
)

Definition at line 295 of file vectormath.c.

◆ VectorMultiplyREAL8()

INT4 VectorMultiplyREAL8 ( alignedREAL8Vector output,
alignedREAL8Vector input1,
alignedREAL8Vector input2,
INT4  vectorMath 
)

Definition at line 308 of file vectormath.c.

◆ VectorInvertREAL8()

INT4 VectorInvertREAL8 ( alignedREAL8Vector output,
alignedREAL8Vector input,
INT4  vectorMath 
)

Definition at line 321 of file vectormath.c.

◆ VectorFloorREAL8()

INT4 VectorFloorREAL8 ( alignedREAL8Vector output,
alignedREAL8Vector input,
INT4  vectorMath 
)

Definition at line 334 of file vectormath.c.

◆ VectorRoundREAL4()

INT4 VectorRoundREAL4 ( REAL4VectorAligned output,
REAL4VectorAligned input,
INT4  vectorMath 
)

Definition at line 365 of file vectormath.c.

◆ VectorRoundREAL8()

INT4 VectorRoundREAL8 ( alignedREAL8Vector output,
alignedREAL8Vector input,
INT4  vectorMath 
)

Definition at line 396 of file vectormath.c.

◆ VectorAbsREAL4()

INT4 VectorAbsREAL4 ( REAL4VectorAligned output,
REAL4VectorAligned input,
INT4  vectorMath 
)

Definition at line 427 of file vectormath.c.

◆ VectorAbsREAL8()

INT4 VectorAbsREAL8 ( alignedREAL8Vector output,
alignedREAL8Vector input,
INT4  vectorMath 
)

Definition at line 480 of file vectormath.c.

◆ VectorCabsfCOMPLEX8()

INT4 VectorCabsfCOMPLEX8 ( REAL4VectorAligned output,
COMPLEX8Vector input,
INT4  vectorMath 
)

Definition at line 533 of file vectormath.c.

◆ VectorCabsCOMPLEX8()

INT4 VectorCabsCOMPLEX8 ( alignedREAL8Vector output,
COMPLEX8Vector input,
INT4  vectorMath 
)

Definition at line 591 of file vectormath.c.

◆ sseSSVectorSubtract()

INT4 sseSSVectorSubtract ( REAL4VectorAligned output,
REAL4VectorAligned input1,
REAL4VectorAligned input2 
)

Subtract two REAL4VectorAligned using SSE.

Parameters
[out]outputPointer to a REAL4VectorAligned
[in]input1Pointer to a REAL4VectorAligned
[in]input2Pointer to a REAL4VectorAligned
Returns
Status value

Definition at line 748 of file vectormath.c.

◆ avxSSVectorSubtract()

INT4 avxSSVectorSubtract ( REAL4VectorAligned output,
REAL4VectorAligned input1,
REAL4VectorAligned input2 
)

Subtract two REAL4VectorAligned using AVX.

Parameters
[out]outputPointer to a REAL4VectorAligned
[in]input1Pointer to a REAL4VectorAligned
[in]input2Pointer to a REAL4VectorAligned
Returns
Status value

Definition at line 790 of file vectormath.c.

◆ sseAddScalarToREAL8Vector()

INT4 sseAddScalarToREAL8Vector ( alignedREAL8Vector output,
alignedREAL8Vector input,
REAL8  scalar 
)

Add a REAL8 scalar value to the elements of a alignedREAL8Vector using SSE.

Parameters
[out]outputPointer to a alignedREAL8Vector
[in]inputPointer to a alignedREAL8Vector
[in]scalarValue to add to the elements of input
Returns
Status value

Definition at line 1106 of file vectormath.c.

◆ avxAddScalarToREAL8Vector()

INT4 avxAddScalarToREAL8Vector ( alignedREAL8Vector output,
alignedREAL8Vector input,
REAL8  scalar 
)

Add a REAL8 scalar value to the elements of a alignedREAL8Vector using AVX.

Parameters
[out]outputPointer to a alignedREAL8Vector
[in]inputPointer to a alignedREAL8Vector
[in]scalarValue to add to the elements of input
Returns
Status value

Definition at line 1149 of file vectormath.c.

◆ sseScaleREAL8Vector()

INT4 sseScaleREAL8Vector ( alignedREAL8Vector output,
alignedREAL8Vector input,
REAL8  scale 
)

Scale the elements of a alignedREAL8Vector by a REAL8 value using SSE.

Parameters
[out]outputPointer to a alignedREAL8Vector
[in]inputPointer to a alignedREAL8Vector
[in]scaleValue to scale the elements of input
Returns
Status value

Definition at line 1197 of file vectormath.c.

◆ avxScaleREAL8Vector()

INT4 avxScaleREAL8Vector ( alignedREAL8Vector output,
alignedREAL8Vector input,
REAL8  scale 
)

Scale the elements of a alignedREAL8Vector by a REAL8 value using AVX.

Parameters
[out]outputPointer to a alignedREAL8Vector
[in]inputPointer to a alignedREAL8Vector
[in]scaleValue to scale the elements of input
Returns
Status value

Definition at line 1240 of file vectormath.c.

◆ sseDDVectorSum()

INT4 sseDDVectorSum ( alignedREAL8Vector output,
alignedREAL8Vector input1,
alignedREAL8Vector input2 
)

Sum two alignedREAL8Vector using SSE2.

Parameters
[out]outputPointer to a alignedREAL8Vector
[in]input1Pointer to a alignedREAL8Vector
[in]input2Pointer to a alignedREAL8Vector
Returns
Status value

Definition at line 657 of file vectormath.c.

◆ avxDDVectorSum()

INT4 avxDDVectorSum ( alignedREAL8Vector output,
alignedREAL8Vector input1,
alignedREAL8Vector input2 
)

Sum two alignedREAL8Vector using AVX.

Parameters
[out]outputPointer to a alignedREAL8Vector
[in]input1Pointer to a alignedREAL8Vector
[in]input2Pointer to a alignedREAL8Vector
Returns
Status value

Definition at line 700 of file vectormath.c.

◆ sseDDVectorSubtract()

INT4 sseDDVectorSubtract ( alignedREAL8Vector output,
alignedREAL8Vector input1,
alignedREAL8Vector input2 
)

Subtract two alignedREAL8Vector using SSE.

Parameters
[out]outputPointer to a alignedREAL8Vector
[in]input1Pointer to a alignedREAL8Vector
[in]input2Pointer to a alignedREAL8Vector
Returns
Status value

Definition at line 838 of file vectormath.c.

◆ avxDDVectorSubtract()

INT4 avxDDVectorSubtract ( alignedREAL8Vector output,
alignedREAL8Vector input1,
alignedREAL8Vector input2 
)

Subtract two alignedREAL8Vector using AVX.

Parameters
[out]outputPointer to a alignedREAL8Vector
[in]input1Pointer to a alignedREAL8Vector
[in]input2Pointer to a alignedREAL8Vector
Returns
Status value

Definition at line 880 of file vectormath.c.

◆ sseDDVectorMultiply()

INT4 sseDDVectorMultiply ( alignedREAL8Vector output,
alignedREAL8Vector input1,
alignedREAL8Vector input2 
)

Multiply two alignedREAL8Vector using SSE.

Parameters
[out]outputPointer to a alignedREAL8Vector
[in]input1Pointer to a alignedREAL8Vector
[in]input2Pointer to a alignedREAL8Vector
Returns
Status value

Definition at line 928 of file vectormath.c.

◆ avxDDVectorMultiply()

INT4 avxDDVectorMultiply ( alignedREAL8Vector output,
alignedREAL8Vector input1,
alignedREAL8Vector input2 
)

Multiply two alignedREAL8Vector using AVX.

Parameters
[out]outputPointer to a alignedREAL8Vector
[in]input1Pointer to a alignedREAL8Vector
[in]input2Pointer to a alignedREAL8Vector
Returns
Status value

Definition at line 971 of file vectormath.c.

◆ sseInvertREAL8Vector()

INT4 sseInvertREAL8Vector ( alignedREAL8Vector output,
alignedREAL8Vector input1 
)

Invert a alignedREAL8Vector using SSE.

Parameters
[out]outputPointer to a alignedREAL8Vector
[in]input1Pointer to a alignedREAL8Vector
Returns
Status value

Definition at line 1018 of file vectormath.c.

◆ avxInvertREAL8Vector()

INT4 avxInvertREAL8Vector ( alignedREAL8Vector output,
alignedREAL8Vector input1 
)

Invert a alignedREAL8Vector using AVX.

Parameters
[out]outputPointer to a alignedREAL8Vector
[in]input1Pointer to a alignedREAL8Vector
Returns
Status value

Definition at line 1059 of file vectormath.c.