CMSIS-DSP: Added distance functions for clustering algorithms
parent
cf71ff01a7
commit
7a07cecef1
@ -0,0 +1,20 @@
|
||||
cmake_minimum_required (VERSION 3.6)
|
||||
|
||||
project(CMSISDSPDistance)
|
||||
|
||||
include(config)
|
||||
include(configDsp)
|
||||
|
||||
file(GLOB SRC "./*_*.c")
|
||||
|
||||
add_library(CMSISDSPDistance STATIC ${SRC})
|
||||
|
||||
configLib(CMSISDSPDistance ${ROOT})
|
||||
configDsp(CMSISDSPDistance ${ROOT})
|
||||
|
||||
### Includes
|
||||
target_include_directories(CMSISDSPDistance PUBLIC "${DSP}/Include")
|
||||
target_include_directories(CMSISDSPDistance PRIVATE ".")
|
||||
|
||||
|
||||
|
||||
@ -0,0 +1,106 @@
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
* Project: CMSIS DSP Library
|
||||
* Title: arm_svm_linear_init_f32.c
|
||||
* Description: SVM Linear Instance Initialization
|
||||
*
|
||||
*
|
||||
* Target Processor: Cortex-M cores
|
||||
* -------------------------------------------------------------------- */
|
||||
/*
|
||||
* Copyright (C) 2010-2019 ARM Limited or its affiliates. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "arm_math.h"
|
||||
#include <limits.h>
|
||||
#include <math.h>
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @addtogroup groupDistance
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @brief Elements of boolean distances
|
||||
*
|
||||
* Different values which are used to compute boolean distances
|
||||
*
|
||||
* @param[in] pA First vector of packed booleans
|
||||
* @param[in] pB Second vector of packed booleans
|
||||
* @param[in] numberOfBools Number of booleans
|
||||
* @param[out] cTT cTT value
|
||||
* @param[out] cTF cTF value
|
||||
* @param[out] cFT cFT value
|
||||
* @return None
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#if defined(ARM_MATH_NEON)
|
||||
|
||||
#include "NEMath.h"
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#define TT
|
||||
#define TF
|
||||
#define FT
|
||||
#define EXT _TT_TF_FT
|
||||
#include "arm_boolean_distance_template.h"
|
||||
|
||||
#undef TT
|
||||
#undef FF
|
||||
#undef TF
|
||||
#undef FT
|
||||
#undef EXT
|
||||
#define TF
|
||||
#define FT
|
||||
#define EXT _TF_FT
|
||||
#include "arm_boolean_distance_template.h"
|
||||
|
||||
#undef TT
|
||||
#undef FF
|
||||
#undef TF
|
||||
#undef FT
|
||||
#undef EXT
|
||||
#define TT
|
||||
#define FF
|
||||
#define TF
|
||||
#define FT
|
||||
#define EXT _TT_FF_TF_FT
|
||||
#include "arm_boolean_distance_template.h"
|
||||
|
||||
#undef TT
|
||||
#undef FF
|
||||
#undef TF
|
||||
#undef FT
|
||||
#undef EXT
|
||||
#define TT
|
||||
#define EXT _TT
|
||||
#include "arm_boolean_distance_template.h"
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @} end of groupDistance group
|
||||
*/
|
||||
@ -0,0 +1,396 @@
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
* Project: CMSIS DSP Library
|
||||
* Title: arm_boolean_distance.c
|
||||
* Description: Templates for boolean distances
|
||||
*
|
||||
*
|
||||
* Target Processor: Cortex-M cores
|
||||
* -------------------------------------------------------------------- */
|
||||
/*
|
||||
* Copyright (C) 2010-2019 ARM Limited or its affiliates. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @defgroup DISTANCEF Distance Functions
|
||||
*
|
||||
* Computes Distances between vectors.
|
||||
*
|
||||
* Distance functions are useful in a lot of algorithms.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @addtogroup DISTANCEF
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @brief Elements of boolean distances
|
||||
*
|
||||
* Different values which are used to compute boolean distances
|
||||
*
|
||||
* @param[in] pA First vector of packed booleans
|
||||
* @param[in] pB Second vector of packed booleans
|
||||
* @param[in] numberOfBools Number of booleans
|
||||
* @param[out] cTT cTT value
|
||||
* @param[out] cTF cTF value
|
||||
* @param[out] cFT cFT value
|
||||
* @return None
|
||||
*
|
||||
*/
|
||||
|
||||
#define _FUNC(A,B) A##B
|
||||
|
||||
#define FUNC(EXT) _FUNC(arm_boolean_distance, EXT)
|
||||
|
||||
#if defined(ARM_MATH_NEON)
|
||||
|
||||
|
||||
void FUNC(EXT)(const uint32_t *pA
|
||||
, const uint32_t *pB
|
||||
, uint32_t numberOfBools
|
||||
#ifdef TT
|
||||
, uint32_t *cTT
|
||||
#endif
|
||||
#ifdef FF
|
||||
, uint32_t *cFF
|
||||
#endif
|
||||
#ifdef TF
|
||||
, uint32_t *cTF
|
||||
#endif
|
||||
#ifdef FT
|
||||
, uint32_t *cFT
|
||||
#endif
|
||||
)
|
||||
{
|
||||
#ifdef TT
|
||||
uint32_t _ctt=0;
|
||||
#endif
|
||||
#ifdef FF
|
||||
uint32_t _cff=0;
|
||||
#endif
|
||||
#ifdef TF
|
||||
uint32_t _ctf=0;
|
||||
#endif
|
||||
#ifdef FT
|
||||
uint32_t _cft=0;
|
||||
#endif
|
||||
uint32_t nbBoolBlock;
|
||||
uint32_t a,b,ba,bb,cc=1;
|
||||
int shift;
|
||||
uint32x4_t aV, bV;
|
||||
#ifdef TT
|
||||
uint32x4_t cttV;
|
||||
#endif
|
||||
#ifdef FF
|
||||
uint32x4_t cffV;
|
||||
#endif
|
||||
#ifdef TF
|
||||
uint32x4_t ctfV;
|
||||
#endif
|
||||
#ifdef FT
|
||||
uint32x4_t cftV;
|
||||
#endif
|
||||
uint8x16_t tmp;
|
||||
uint16x8_t tmp2;
|
||||
uint32x4_t tmp3;
|
||||
uint64x2_t tmp4;
|
||||
#ifdef TT
|
||||
uint64x2_t tmp4tt;
|
||||
#endif
|
||||
#ifdef FF
|
||||
uint64x2_t tmp4ff;
|
||||
#endif
|
||||
#ifdef TF
|
||||
uint64x2_t tmp4tf;
|
||||
#endif
|
||||
#ifdef FT
|
||||
uint64x2_t tmp4ft;
|
||||
#endif
|
||||
|
||||
#ifdef TT
|
||||
tmp4tt = vdupq_n_u64(0);
|
||||
#endif
|
||||
#ifdef FF
|
||||
tmp4ff = vdupq_n_u64(0);
|
||||
#endif
|
||||
#ifdef TF
|
||||
tmp4tf = vdupq_n_u64(0);
|
||||
#endif
|
||||
#ifdef FT
|
||||
tmp4ft = vdupq_n_u64(0);
|
||||
#endif
|
||||
|
||||
nbBoolBlock = numberOfBools >> 7;
|
||||
while(nbBoolBlock > 0)
|
||||
{
|
||||
aV = vld1q_u32(pA);
|
||||
bV = vld1q_u32(pB);
|
||||
pA += 4;
|
||||
pB += 4;
|
||||
|
||||
#ifdef TT
|
||||
cttV = vandq_u32(aV,bV);
|
||||
#endif
|
||||
#ifdef FF
|
||||
cffV = vandq_u32(vmvnq_u32(aV),vmvnq_u32(bV));
|
||||
#endif
|
||||
#ifdef TF
|
||||
ctfV = vandq_u32(aV,vmvnq_u32(bV));
|
||||
#endif
|
||||
#ifdef FT
|
||||
cftV = vandq_u32(vmvnq_u32(aV),bV);
|
||||
#endif
|
||||
|
||||
#ifdef TT
|
||||
tmp = vcntq_u8(vreinterpretq_u8_u32(cttV));
|
||||
tmp2 = vpaddlq_u8(tmp);
|
||||
tmp3 = vpaddlq_u16(tmp2);
|
||||
tmp4 = vpaddlq_u32(tmp3);
|
||||
tmp4tt = vaddq_u64(tmp4tt, tmp4);
|
||||
#endif
|
||||
|
||||
#ifdef FF
|
||||
tmp = vcntq_u8(vreinterpretq_u8_u32(cffV));
|
||||
tmp2 = vpaddlq_u8(tmp);
|
||||
tmp3 = vpaddlq_u16(tmp2);
|
||||
tmp4 = vpaddlq_u32(tmp3);
|
||||
tmp4ff = vaddq_u64(tmp4ff, tmp4);
|
||||
#endif
|
||||
|
||||
#ifdef TF
|
||||
tmp = vcntq_u8(vreinterpretq_u8_u32(ctfV));
|
||||
tmp2 = vpaddlq_u8(tmp);
|
||||
tmp3 = vpaddlq_u16(tmp2);
|
||||
tmp4 = vpaddlq_u32(tmp3);
|
||||
tmp4tf = vaddq_u64(tmp4tf, tmp4);
|
||||
#endif
|
||||
|
||||
#ifdef FT
|
||||
tmp = vcntq_u8(vreinterpretq_u8_u32(cftV));
|
||||
tmp2 = vpaddlq_u8(tmp);
|
||||
tmp3 = vpaddlq_u16(tmp2);
|
||||
tmp4 = vpaddlq_u32(tmp3);
|
||||
tmp4ft = vaddq_u64(tmp4ft, tmp4);
|
||||
#endif
|
||||
|
||||
|
||||
nbBoolBlock --;
|
||||
}
|
||||
|
||||
#ifdef TT
|
||||
_ctt += tmp4tt[0] + tmp4tt[1];
|
||||
#endif
|
||||
#ifdef FF
|
||||
_cff += tmp4ff[0] + tmp4ff[1];
|
||||
#endif
|
||||
#ifdef TF
|
||||
_ctf += tmp4tf[0] + tmp4tf[1];
|
||||
#endif
|
||||
#ifdef FT
|
||||
_cft += tmp4ft[0] + tmp4ft[1];
|
||||
#endif
|
||||
|
||||
nbBoolBlock = numberOfBools & 0x7F;
|
||||
while(nbBoolBlock >= 32)
|
||||
{
|
||||
a = *pA++;
|
||||
b = *pB++;
|
||||
shift = 0;
|
||||
while(shift < 32)
|
||||
{
|
||||
ba = a & 1;
|
||||
bb = b & 1;
|
||||
a = a >> 1;
|
||||
b = b >> 1;
|
||||
|
||||
#ifdef TT
|
||||
_ctt += (ba && bb);
|
||||
#endif
|
||||
#ifdef FF
|
||||
_cff += ((1 ^ ba) && (1 ^ bb));
|
||||
#endif
|
||||
#ifdef TF
|
||||
_ctf += (ba && (1 ^ bb));
|
||||
#endif
|
||||
#ifdef FT
|
||||
_cft += ((1 ^ ba) && bb);
|
||||
#endif
|
||||
shift ++;
|
||||
}
|
||||
|
||||
nbBoolBlock -= 32;
|
||||
}
|
||||
|
||||
a = *pA++;
|
||||
b = *pB++;
|
||||
|
||||
a = a >> (32 - nbBoolBlock);
|
||||
b = b >> (32 - nbBoolBlock);
|
||||
|
||||
while(nbBoolBlock > 0)
|
||||
{
|
||||
ba = a & 1;
|
||||
bb = b & 1;
|
||||
a = a >> 1;
|
||||
|
||||
b = b >> 1;
|
||||
#ifdef TT
|
||||
_ctt += (ba && bb);
|
||||
#endif
|
||||
#ifdef FF
|
||||
_cff += ((1 ^ ba) && (1 ^ bb));
|
||||
#endif
|
||||
#ifdef TF
|
||||
_ctf += (ba && (1 ^ bb));
|
||||
#endif
|
||||
#ifdef FT
|
||||
_cft += ((1 ^ ba) && bb);
|
||||
#endif
|
||||
nbBoolBlock --;
|
||||
}
|
||||
|
||||
#ifdef TT
|
||||
*cTT = _ctt;
|
||||
#endif
|
||||
#ifdef FF
|
||||
*cFF = _cff;
|
||||
#endif
|
||||
#ifdef TF
|
||||
*cTF = _ctf;
|
||||
#endif
|
||||
#ifdef FT
|
||||
*cFT = _cft;
|
||||
#endif
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
void FUNC(EXT)(const uint32_t *pA
|
||||
, const uint32_t *pB
|
||||
, uint32_t numberOfBools
|
||||
#ifdef TT
|
||||
, uint32_t *cTT
|
||||
#endif
|
||||
#ifdef FF
|
||||
, uint32_t *cFF
|
||||
#endif
|
||||
#ifdef TF
|
||||
, uint32_t *cTF
|
||||
#endif
|
||||
#ifdef FT
|
||||
, uint32_t *cFT
|
||||
#endif
|
||||
)
|
||||
{
|
||||
#ifdef TT
|
||||
uint32_t _ctt=0;
|
||||
#endif
|
||||
#ifdef FF
|
||||
uint32_t _cff=0;
|
||||
#endif
|
||||
#ifdef TF
|
||||
uint32_t _ctf=0;
|
||||
#endif
|
||||
#ifdef FT
|
||||
uint32_t _cft=0;
|
||||
#endif
|
||||
uint32_t a,b,ba,bb,cc=1;
|
||||
int shift;
|
||||
|
||||
while(numberOfBools >= 32)
|
||||
{
|
||||
a = *pA++;
|
||||
b = *pB++;
|
||||
shift = 0;
|
||||
while(shift < 32)
|
||||
{
|
||||
ba = a & 1;
|
||||
bb = b & 1;
|
||||
a = a >> 1;
|
||||
b = b >> 1;
|
||||
#ifdef TT
|
||||
_ctt += (ba && bb);
|
||||
#endif
|
||||
#ifdef FF
|
||||
_cff += ((1 ^ ba) && (1 ^ bb));
|
||||
#endif
|
||||
#ifdef TF
|
||||
_ctf += (ba && (1 ^ bb));
|
||||
#endif
|
||||
#ifdef FT
|
||||
_cft += ((1 ^ ba) && bb);
|
||||
#endif
|
||||
shift ++;
|
||||
}
|
||||
|
||||
numberOfBools -= 32;
|
||||
}
|
||||
|
||||
a = *pA++;
|
||||
b = *pB++;
|
||||
|
||||
a = a >> (32 - numberOfBools);
|
||||
b = b >> (32 - numberOfBools);
|
||||
|
||||
while(numberOfBools > 0)
|
||||
{
|
||||
ba = a & 1;
|
||||
bb = b & 1;
|
||||
a = a >> 1;
|
||||
b = b >> 1;
|
||||
|
||||
#ifdef TT
|
||||
_ctt += (ba && bb);
|
||||
#endif
|
||||
#ifdef FF
|
||||
_cff += ((1 ^ ba) && (1 ^ bb));
|
||||
#endif
|
||||
#ifdef TF
|
||||
_ctf += (ba && (1 ^ bb));
|
||||
#endif
|
||||
#ifdef FT
|
||||
_cft += ((1 ^ ba) && bb);
|
||||
#endif
|
||||
numberOfBools --;
|
||||
}
|
||||
|
||||
#ifdef TT
|
||||
*cTT = _ctt;
|
||||
#endif
|
||||
#ifdef FF
|
||||
*cFF = _cff;
|
||||
#endif
|
||||
#ifdef TF
|
||||
*cTF = _ctf;
|
||||
#endif
|
||||
#ifdef FT
|
||||
*cFT = _cft;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* @} end of DISTANCEF group
|
||||
*/
|
||||
@ -0,0 +1,129 @@
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
* Project: CMSIS DSP Library
|
||||
* Title: arm_braycurtis_distance_f32.c
|
||||
* Description: Bray-Curtis distance between two vectors
|
||||
*
|
||||
*
|
||||
* Target Processor: Cortex-M cores
|
||||
* -------------------------------------------------------------------- */
|
||||
/*
|
||||
* Copyright (C) 2010-2019 ARM Limited or its affiliates. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "arm_math.h"
|
||||
#include <limits.h>
|
||||
#include <math.h>
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @addtogroup groupDistance
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @brief Bray-Curtis distance between two vectors
|
||||
* @param[in] pA First vector
|
||||
* @param[in] pB Second vector
|
||||
* @param[in] blockSize vector length
|
||||
* @return distance
|
||||
*
|
||||
*/
|
||||
|
||||
#if defined(ARM_MATH_NEON)
|
||||
|
||||
#include "NEMath.h"
|
||||
|
||||
float32_t arm_braycurtis_distance_f32(const float32_t *pA,const float32_t *pB, uint32_t blockSize)
|
||||
{
|
||||
float32_t accumDiff=0.0, accumSum=0.0, tmp;
|
||||
uint32_t i,blkCnt;
|
||||
float32x4_t a,b,c,accumDiffV, accumSumV;
|
||||
float32x2_t accumV2;
|
||||
|
||||
accumDiffV = vdupq_n_f32(0.0);
|
||||
accumSumV = vdupq_n_f32(0.0);
|
||||
|
||||
blkCnt = blockSize >> 2;
|
||||
while(blkCnt > 0)
|
||||
{
|
||||
a = vld1q_f32(pA);
|
||||
b = vld1q_f32(pB);
|
||||
|
||||
c = vabdq_f32(a,b);
|
||||
accumDiffV = vaddq_f32(accumDiffV,c);
|
||||
|
||||
c = vaddq_f32(a,b);
|
||||
c = vabsq_f32(c);
|
||||
accumSumV = vaddq_f32(accumSumV,c);
|
||||
|
||||
pA += 4;
|
||||
pB += 4;
|
||||
blkCnt --;
|
||||
}
|
||||
accumV2 = vpadd_f32(vget_low_f32(accumDiffV),vget_high_f32(accumDiffV));
|
||||
accumDiff = accumV2[0] + accumV2[1];
|
||||
|
||||
accumV2 = vpadd_f32(vget_low_f32(accumSumV),vget_high_f32(accumSumV));
|
||||
accumSum = accumV2[0] + accumV2[1];
|
||||
|
||||
blkCnt = blockSize & 3;
|
||||
while(blkCnt > 0)
|
||||
{
|
||||
accumDiff += fabs(*pA - *pB);
|
||||
accumSum += fabs(*pA++ + *pB++);
|
||||
blkCnt --;
|
||||
}
|
||||
/*
|
||||
|
||||
It is assumed that accumSum is not zero. Since it is the sum of several absolute
|
||||
values it would imply that all of them are zero. It is very unlikely for long vectors.
|
||||
|
||||
*/
|
||||
return(accumDiff / accumSum);
|
||||
}
|
||||
|
||||
#else
|
||||
float32_t arm_braycurtis_distance_f32(const float32_t *pA,const float32_t *pB, uint32_t blockSize)
|
||||
{
|
||||
float32_t accumDiff=0.0, accumSum=0.0, tmpA, tmpB;
|
||||
uint32_t i;
|
||||
|
||||
while(blockSize > 0)
|
||||
{
|
||||
tmpA = *pA++;
|
||||
tmpB = *pB++;
|
||||
accumDiff += fabs(tmpA - tmpB);
|
||||
accumSum += fabs(tmpA + tmpB);
|
||||
blockSize --;
|
||||
}
|
||||
/*
|
||||
|
||||
It is assumed that accumSum is not zero. Since it is the sum of several absolute
|
||||
values it would imply that all of them are zero. It is very unlikely for long vectors.
|
||||
|
||||
*/
|
||||
return(accumDiff / accumSum);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* @} end of groupDistance group
|
||||
*/
|
||||
@ -0,0 +1,144 @@
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
* Project: CMSIS DSP Library
|
||||
* Title: arm_canberra_distance_f32.c
|
||||
* Description: Canberra distance between two vectors
|
||||
*
|
||||
*
|
||||
* Target Processor: Cortex-M cores
|
||||
* -------------------------------------------------------------------- */
|
||||
/*
|
||||
* Copyright (C) 2010-2019 ARM Limited or its affiliates. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "arm_math.h"
|
||||
#include <limits.h>
|
||||
#include <math.h>
|
||||
|
||||
|
||||
/**
|
||||
* @addtogroup groupDistance
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @brief Canberra distance between two vectors
|
||||
*
|
||||
* This function may divide by zero when samples pA[i] and pB[i] are both zero.
|
||||
* The result of the computation will be correct. So the division per zero may be
|
||||
* ignored.
|
||||
*
|
||||
* @param[in] pA First vector
|
||||
* @param[in] pB Second vector
|
||||
* @param[in] blockSize vector length
|
||||
* @return distance
|
||||
*
|
||||
*/
|
||||
|
||||
#if defined(ARM_MATH_NEON)
|
||||
|
||||
#include "NEMath.h"
|
||||
|
||||
float32_t arm_canberra_distance_f32(const float32_t *pA,const float32_t *pB, uint32_t blockSize)
|
||||
{
|
||||
float32_t accum=0.0, tmpA, tmpB,diff,sum;
|
||||
uint32_t i,blkCnt;
|
||||
float32x4_t a,b,c,d,accumV;
|
||||
float32x2_t accumV2;
|
||||
int32x4_t isZeroV;
|
||||
float32x4_t zeroV = vdupq_n_f32(0.0);
|
||||
|
||||
accumV = vdupq_n_f32(0.0);
|
||||
|
||||
blkCnt = blockSize >> 2;
|
||||
while(blkCnt > 0)
|
||||
{
|
||||
a = vld1q_f32(pA);
|
||||
b = vld1q_f32(pB);
|
||||
|
||||
c = vabdq_f32(a,b);
|
||||
|
||||
a = vabsq_f32(a);
|
||||
b = vabsq_f32(b);
|
||||
a = vaddq_f32(a,b);
|
||||
isZeroV = vceqq_f32(a,zeroV);
|
||||
|
||||
/*
|
||||
* May divide by zero when a and b have both the same lane at zero.
|
||||
*/
|
||||
a = vinvq_f32(a);
|
||||
|
||||
/*
|
||||
* Force result of a division by 0 to 0. It the behavior of the
|
||||
* sklearn canberra function.
|
||||
*/
|
||||
a = vbicq_s32(a,isZeroV);
|
||||
c = vmulq_f32(c,a);
|
||||
accumV = vaddq_f32(accumV,c);
|
||||
|
||||
pA += 4;
|
||||
pB += 4;
|
||||
blkCnt --;
|
||||
}
|
||||
accumV2 = vpadd_f32(vget_low_f32(accumV),vget_high_f32(accumV));
|
||||
accum = accumV2[0] + accumV2[1];
|
||||
|
||||
|
||||
blkCnt = blockSize & 3;
|
||||
while(blkCnt > 0)
|
||||
{
|
||||
tmpA = *pA++;
|
||||
tmpB = *pB++;
|
||||
|
||||
diff = fabs(tmpA - tmpB);
|
||||
sum = fabs(tmpA) + fabs(tmpB);
|
||||
if ((tmpA != 0.0) || (tmpB != 0.0))
|
||||
{
|
||||
accum += (diff / sum);
|
||||
}
|
||||
blkCnt --;
|
||||
}
|
||||
return(accum);
|
||||
}
|
||||
|
||||
#else
|
||||
float32_t arm_canberra_distance_f32(const float32_t *pA,const float32_t *pB, uint32_t blockSize)
|
||||
{
|
||||
float32_t accum=0.0, tmpA, tmpB,diff,sum;
|
||||
|
||||
while(blockSize > 0)
|
||||
{
|
||||
tmpA = *pA++;
|
||||
tmpB = *pB++;
|
||||
|
||||
diff = fabs(tmpA - tmpB);
|
||||
sum = fabs(tmpA) + fabs(tmpB);
|
||||
if ((tmpA != 0.0) || (tmpB != 0.0))
|
||||
{
|
||||
accum += (diff / sum);
|
||||
}
|
||||
blockSize --;
|
||||
}
|
||||
return(accum);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* @} end of groupDistance group
|
||||
*/
|
||||
@ -0,0 +1,159 @@
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
* Project: CMSIS DSP Library
|
||||
* Title: arm_chebyshev_distance_f32.c
|
||||
* Description: Chebyshev distance between two vectors
|
||||
*
|
||||
*
|
||||
* Target Processor: Cortex-M cores
|
||||
* -------------------------------------------------------------------- */
|
||||
/*
|
||||
* Copyright (C) 2010-2019 ARM Limited or its affiliates. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "arm_math.h"
|
||||
#include <limits.h>
|
||||
#include <math.h>
|
||||
|
||||
|
||||
/**
|
||||
* @addtogroup groupDistance
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @brief Chebyshev distance between two vectors
|
||||
* @param[in] pA First vector
|
||||
* @param[in] pB Second vector
|
||||
* @param[in] blockSize vector length
|
||||
* @return distance
|
||||
*
|
||||
*/
|
||||
|
||||
#if defined(ARM_MATH_NEON)
|
||||
|
||||
#include "NEMath.h"
|
||||
|
||||
float32_t arm_chebyshev_distance_f32(const float32_t *pA,const float32_t *pB, uint32_t blockSize)
|
||||
{
|
||||
float32_t diff=0.0, maxVal=0.0, tmpA, tmpB;
|
||||
uint32_t i,blkCnt;
|
||||
float32x4_t a,b,diffV, maxValV;
|
||||
float32x2_t maxValV2;
|
||||
|
||||
if (blockSize <= 3)
|
||||
{
|
||||
tmpA = *pA++;
|
||||
tmpB = *pB++;
|
||||
diff = fabs(tmpA - tmpB);
|
||||
maxVal = diff;
|
||||
blockSize--;
|
||||
|
||||
while(blockSize > 0)
|
||||
{
|
||||
tmpA = *pA++;
|
||||
tmpB = *pB++;
|
||||
diff = fabs(tmpA - tmpB);
|
||||
if (diff > maxVal)
|
||||
{
|
||||
maxVal = diff;
|
||||
}
|
||||
blockSize --;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
a = vld1q_f32(pA);
|
||||
b = vld1q_f32(pB);
|
||||
pA += 4;
|
||||
pB += 4;
|
||||
|
||||
diffV = vabdq_f32(a,b);
|
||||
|
||||
blockSize -= 4;
|
||||
|
||||
maxValV = diffV;
|
||||
|
||||
|
||||
blkCnt = blockSize >> 2;
|
||||
while(blkCnt > 0)
|
||||
{
|
||||
a = vld1q_f32(pA);
|
||||
b = vld1q_f32(pB);
|
||||
|
||||
diffV = vabdq_f32(a,b);
|
||||
maxValV = vmaxq_f32(maxValV, diffV);
|
||||
|
||||
pA += 4;
|
||||
pB += 4;
|
||||
blkCnt --;
|
||||
}
|
||||
maxValV2 = vpmax_f32(vget_low_f32(maxValV),vget_high_f32(maxValV));
|
||||
maxValV2 = vpmax_f32(maxValV2,maxValV2);
|
||||
maxVal = maxValV2[0];
|
||||
|
||||
|
||||
blkCnt = blockSize & 3;
|
||||
while(blkCnt > 0)
|
||||
{
|
||||
tmpA = *pA++;
|
||||
tmpB = *pB++;
|
||||
diff = fabs(tmpA - tmpB);
|
||||
if (diff > maxVal)
|
||||
{
|
||||
maxVal = diff;
|
||||
}
|
||||
blkCnt --;
|
||||
}
|
||||
}
|
||||
return(maxVal);
|
||||
}
|
||||
|
||||
#else
|
||||
float32_t arm_chebyshev_distance_f32(const float32_t *pA,const float32_t *pB, uint32_t blockSize)
|
||||
{
|
||||
float32_t diff=0.0, maxVal,tmpA, tmpB;
|
||||
uint32_t i;
|
||||
|
||||
tmpA = *pA++;
|
||||
tmpB = *pB++;
|
||||
diff = fabs(tmpA - tmpB);
|
||||
maxVal = diff;
|
||||
blockSize--;
|
||||
|
||||
while(blockSize > 0)
|
||||
{
|
||||
tmpA = *pA++;
|
||||
tmpB = *pB++;
|
||||
diff = fabs(tmpA - tmpB);
|
||||
if (diff > maxVal)
|
||||
{
|
||||
maxVal = diff;
|
||||
}
|
||||
blockSize --;
|
||||
}
|
||||
|
||||
return(maxVal);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* @} end of groupDistance group
|
||||
*/
|
||||
@ -0,0 +1,113 @@
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
* Project: CMSIS DSP Library
|
||||
* Title: arm_cityblock_distance_f32.c
|
||||
* Description: Cityblock (Manhattan) distance between two vectors
|
||||
*
|
||||
*
|
||||
* Target Processor: Cortex-M cores
|
||||
* -------------------------------------------------------------------- */
|
||||
/*
|
||||
* Copyright (C) 2010-2019 ARM Limited or its affiliates. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "arm_math.h"
|
||||
#include <limits.h>
|
||||
#include <math.h>
|
||||
|
||||
/**
|
||||
* @addtogroup groupDistance
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @brief Cityblock (Manhattan) distance between two vectors
|
||||
* @param[in] pA First vector
|
||||
* @param[in] pB Second vector
|
||||
* @param[in] blockSize vector length
|
||||
* @return distance
|
||||
*
|
||||
*/
|
||||
|
||||
#if defined(ARM_MATH_NEON)
|
||||
|
||||
#include "NEMath.h"
|
||||
|
||||
float32_t arm_cityblock_distance_f32(const float32_t *pA,const float32_t *pB, uint32_t blockSize)
|
||||
{
|
||||
float32_t diff=0.0, accum=0.0, tmpA, tmpB;
|
||||
uint32_t i,blkCnt;
|
||||
float32x4_t a,b,accumV, tempV;
|
||||
float32x2_t accumV2;
|
||||
|
||||
accumV = vdupq_n_f32(0.0);
|
||||
|
||||
blkCnt = blockSize >> 2;
|
||||
while(blkCnt > 0)
|
||||
{
|
||||
a = vld1q_f32(pA);
|
||||
b = vld1q_f32(pB);
|
||||
|
||||
tempV = vabdq_f32(a,b);
|
||||
accumV = vaddq_f32(accumV, tempV);
|
||||
|
||||
pA += 4;
|
||||
pB += 4;
|
||||
blkCnt --;
|
||||
}
|
||||
accumV2 = vpadd_f32(vget_low_f32(accumV),vget_high_f32(accumV));
|
||||
accumV2 = vpadd_f32(accumV2,accumV2);
|
||||
accum = accumV2[0];
|
||||
|
||||
|
||||
blkCnt = blockSize & 3;
|
||||
while(blkCnt > 0)
|
||||
{
|
||||
tmpA = *pA++;
|
||||
tmpB = *pB++;
|
||||
accum += fabs(tmpA - tmpB);
|
||||
|
||||
blkCnt --;
|
||||
}
|
||||
return(accum);
|
||||
}
|
||||
|
||||
#else
|
||||
float32_t arm_cityblock_distance_f32(const float32_t *pA,const float32_t *pB, uint32_t blockSize)
|
||||
{
|
||||
float32_t diff=0.0, accum,tmpA, tmpB;
|
||||
uint32_t i;
|
||||
|
||||
accum = 0.0;
|
||||
while(blockSize > 0)
|
||||
{
|
||||
tmpA = *pA++;
|
||||
tmpB = *pB++;
|
||||
accum += fabs(tmpA - tmpB);
|
||||
|
||||
blockSize --;
|
||||
}
|
||||
|
||||
return(accum);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* @} end of groupDistance group
|
||||
*/
|
||||
@ -0,0 +1,83 @@
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
* Project: CMSIS DSP Library
|
||||
* Title: arm_correlation_distance_f32.c
|
||||
* Description: Correlation distance between two vectors
|
||||
*
|
||||
*
|
||||
* Target Processor: Cortex-M cores
|
||||
* -------------------------------------------------------------------- */
|
||||
/*
|
||||
* Copyright (C) 2010-2019 ARM Limited or its affiliates. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "arm_math.h"
|
||||
#include <limits.h>
|
||||
#include <math.h>
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @addtogroup groupDistance
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @brief Correlation distance between two vectors
|
||||
*
|
||||
* The input vectors are modified in place !
|
||||
*
|
||||
* @param[in] pA First vector
|
||||
* @param[in] pB Second vector
|
||||
* @param[in] blockSize vector length
|
||||
* @return distance
|
||||
*
|
||||
*/
|
||||
|
||||
float32_t arm_correlation_distance_f32(float32_t *pA,float32_t *pB, uint32_t blockSize)
|
||||
{
|
||||
float32_t ma,mb,pwra,pwrb,dot,tmp;
|
||||
uint32_t i;
|
||||
|
||||
arm_mean_f32(pA, blockSize, &ma);
|
||||
arm_mean_f32(pB, blockSize, &mb);
|
||||
|
||||
arm_offset_f32(pA, -ma, pA, blockSize);
|
||||
arm_offset_f32(pB, -mb, pB, blockSize);
|
||||
|
||||
arm_power_f32(pA, blockSize, &pwra);
|
||||
arm_power_f32(pB, blockSize, &pwrb);
|
||||
|
||||
arm_dot_prod_f32(pA,pB,blockSize,&dot);
|
||||
|
||||
dot = dot / blockSize;
|
||||
pwra = pwra / blockSize;
|
||||
pwrb = pwrb / blockSize;
|
||||
|
||||
arm_sqrt_f32(pwra * pwrb,&tmp);
|
||||
|
||||
return(1.0 - dot / tmp);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @} end of groupDistance group
|
||||
*/
|
||||
@ -0,0 +1,68 @@
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
* Project: CMSIS DSP Library
|
||||
* Title: arm_cosine_distance_f32.c
|
||||
* Description: Cosine distance between two vectors
|
||||
*
|
||||
*
|
||||
* Target Processor: Cortex-M cores
|
||||
* -------------------------------------------------------------------- */
|
||||
/*
|
||||
* Copyright (C) 2010-2019 ARM Limited or its affiliates. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "arm_math.h"
|
||||
#include <limits.h>
|
||||
#include <math.h>
|
||||
|
||||
|
||||
/**
|
||||
* @addtogroup groupDistance
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @brief Cosine distance between two vectors
|
||||
*
|
||||
* @param[in] pA First vector
|
||||
* @param[in] pB Second vector
|
||||
* @param[in] blockSize vector length
|
||||
* @return distance
|
||||
*
|
||||
*/
|
||||
|
||||
float32_t arm_cosine_distance_f32(const float32_t *pA,const float32_t *pB, uint32_t blockSize)
|
||||
{
|
||||
float32_t pwra,pwrb,dot,tmp;
|
||||
uint32_t i;
|
||||
|
||||
arm_power_f32(pA, blockSize, &pwra);
|
||||
arm_power_f32(pB, blockSize, &pwrb);
|
||||
|
||||
arm_dot_prod_f32(pA,pB,blockSize,&dot);
|
||||
|
||||
arm_sqrt_f32(pwra * pwrb, &tmp);
|
||||
return(1.0 - dot / tmp);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @} end of groupDistance group
|
||||
*/
|
||||
@ -0,0 +1,69 @@
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
* Project: CMSIS DSP Library
|
||||
* Title: arm_dice_distance.c
|
||||
* Description: Dice distance between two vectors
|
||||
*
|
||||
*
|
||||
* Target Processor: Cortex-M cores
|
||||
* -------------------------------------------------------------------- */
|
||||
/*
|
||||
* Copyright (C) 2010-2019 ARM Limited or its affiliates. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "arm_math.h"
|
||||
#include <limits.h>
|
||||
#include <math.h>
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @addtogroup groupDistance
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @brief Dice distance between two vectors
|
||||
*
|
||||
* @param[in] pA First vector of packed booleans
|
||||
* @param[in] pB Second vector of packed booleans
|
||||
* @param[in] numberOfBools Number of booleans
|
||||
* @return distance
|
||||
*
|
||||
*/
|
||||
extern void arm_boolean_distance_TT_TF_FT(const uint32_t *pA
|
||||
, const uint32_t *pB
|
||||
, uint32_t numberOfBools
|
||||
, uint32_t *cTT
|
||||
, uint32_t *cTF
|
||||
, uint32_t *cFT
|
||||
);
|
||||
|
||||
float32_t arm_dice_distance(const uint32_t *pA, const uint32_t *pB, uint32_t numberOfBools)
|
||||
{
|
||||
uint32_t ctt=0,ctf=0,cft=0;
|
||||
|
||||
arm_boolean_distance_TT_TF_FT(pA, pB, numberOfBools, &ctt, &ctf, &cft);
|
||||
|
||||
return(1.0*(ctf + cft) / (2.0*ctt + cft + ctf));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @} end of groupDistance group
|
||||
*/
|
||||
@ -0,0 +1,107 @@
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
* Project: CMSIS DSP Library
|
||||
* Title: arm_euclidean_distance_f32.c
|
||||
* Description: Euclidean distance between two vectors
|
||||
*
|
||||
*
|
||||
* Target Processor: Cortex-M cores
|
||||
* -------------------------------------------------------------------- */
|
||||
/*
|
||||
* Copyright (C) 2010-2019 ARM Limited or its affiliates. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "arm_math.h"
|
||||
#include <limits.h>
|
||||
#include <math.h>
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @addtogroup groupDistance
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @brief Euclidean distance between two vectors
|
||||
* @param[in] pA First vector
|
||||
* @param[in] pB Second vector
|
||||
* @param[in] blockSize vector length
|
||||
* @return distance
|
||||
*
|
||||
*/
|
||||
|
||||
#if defined(ARM_MATH_NEON)
|
||||
|
||||
#include "NEMath.h"
|
||||
|
||||
float32_t arm_euclidean_distance_f32(const float32_t *pA,const float32_t *pB, uint32_t blockSize)
|
||||
{
|
||||
float32_t accum=0.0,tmp;
|
||||
uint32_t i,blkCnt;
|
||||
float32x4_t a,b,accumV;
|
||||
float32x2_t accumV2;
|
||||
|
||||
accumV = vdupq_n_f32(0.0);
|
||||
blkCnt = blockSize >> 2;
|
||||
while(blkCnt > 0)
|
||||
{
|
||||
a = vld1q_f32(pA);
|
||||
b = vld1q_f32(pB);
|
||||
|
||||
a = vsubq_f32(a,b);
|
||||
accumV = vmlaq_f32(accumV,a,a);
|
||||
pA += 4;
|
||||
pB += 4;
|
||||
blkCnt --;
|
||||
}
|
||||
accumV2 = vpadd_f32(vget_low_f32(accumV),vget_high_f32(accumV));
|
||||
accum = accumV2[0] + accumV2[1];
|
||||
|
||||
blkCnt = blockSize & 3;
|
||||
while(blkCnt > 0)
|
||||
{
|
||||
tmp = *pA++ - *pB++;
|
||||
accum += SQ(tmp);
|
||||
blkCnt --;
|
||||
}
|
||||
arm_sqrt_f32(accum,&tmp);
|
||||
return(tmp);
|
||||
}
|
||||
|
||||
#else
|
||||
float32_t arm_euclidean_distance_f32(const float32_t *pA,const float32_t *pB, uint32_t blockSize)
|
||||
{
|
||||
float32_t accum=0.0,tmp;
|
||||
uint32_t i;
|
||||
|
||||
while(blockSize > 0)
|
||||
{
|
||||
tmp = *pA++ - *pB++;
|
||||
accum += SQ(tmp);
|
||||
blockSize --;
|
||||
}
|
||||
arm_sqrt_f32(accum,&tmp);
|
||||
return(tmp);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* @} end of groupDistance group
|
||||
*/
|
||||
@ -0,0 +1,68 @@
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
* Project: CMSIS DSP Library
|
||||
* Title: arm_hamming_distance.c
|
||||
* Description: Hamming distance between two vectors
|
||||
*
|
||||
*
|
||||
* Target Processor: Cortex-M cores
|
||||
* -------------------------------------------------------------------- */
|
||||
/*
|
||||
* Copyright (C) 2010-2019 ARM Limited or its affiliates. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "arm_math.h"
|
||||
#include <limits.h>
|
||||
#include <math.h>
|
||||
|
||||
|
||||
extern void arm_boolean_distance_TF_FT(const uint32_t *pA
|
||||
, const uint32_t *pB
|
||||
, uint32_t numberOfBools
|
||||
, uint32_t *cTF
|
||||
, uint32_t *cFT
|
||||
);
|
||||
|
||||
/**
|
||||
* @addtogroup groupDistance
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @brief Hamming distance between two vectors
|
||||
*
|
||||
* @param[in] pA First vector of packed booleans
|
||||
* @param[in] pB Second vector of packed booleans
|
||||
* @param[in] numberOfBools Number of booleans
|
||||
* @return distance
|
||||
*
|
||||
*/
|
||||
|
||||
float32_t arm_hamming_distance(const uint32_t *pA, const uint32_t *pB, uint32_t numberOfBools)
|
||||
{
|
||||
uint32_t ctf=0,cft=0;
|
||||
|
||||
arm_boolean_distance_TF_FT(pA, pB, numberOfBools, &ctf, &cft);
|
||||
|
||||
return(1.0*(ctf + cft) / numberOfBools);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @} end of groupDistance group
|
||||
*/
|
||||
@ -0,0 +1,71 @@
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
* Project: CMSIS DSP Library
|
||||
* Title: arm_jaccard_distance.c
|
||||
* Description: Jaccard distance between two vectors
|
||||
*
|
||||
*
|
||||
* Target Processor: Cortex-M cores
|
||||
* -------------------------------------------------------------------- */
|
||||
/*
|
||||
* Copyright (C) 2010-2019 ARM Limited or its affiliates. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "arm_math.h"
|
||||
#include <limits.h>
|
||||
#include <math.h>
|
||||
|
||||
|
||||
|
||||
extern void arm_boolean_distance_TT_TF_FT(const uint32_t *pA
|
||||
, const uint32_t *pB
|
||||
, uint32_t numberOfBools
|
||||
, uint32_t *cTT
|
||||
, uint32_t *cTF
|
||||
, uint32_t *cFT
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
* @addtogroup groupDistance
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @brief Jaccard distance between two vectors
|
||||
*
|
||||
* @param[in] pA First vector of packed booleans
|
||||
* @param[in] pB Second vector of packed booleans
|
||||
* @param[in] numberOfBools Number of booleans
|
||||
* @return distance
|
||||
*
|
||||
*/
|
||||
|
||||
float32_t arm_jaccard_distance(const uint32_t *pA, const uint32_t *pB, uint32_t numberOfBools)
|
||||
{
|
||||
uint32_t ctt=0,ctf=0,cft=0;
|
||||
|
||||
arm_boolean_distance_TT_TF_FT(pA, pB, numberOfBools, &ctt, &ctf, &cft);
|
||||
|
||||
return(1.0*(ctf + cft) / (ctt + cft + ctf));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @} end of groupDistance group
|
||||
*/
|
||||
@ -0,0 +1,155 @@
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
* Project: CMSIS DSP Library
|
||||
* Title: arm_jensenshannon_distance_f32.c
|
||||
* Description: Jensen-Shannon distance between two vectors
|
||||
*
|
||||
*
|
||||
* Target Processor: Cortex-M cores
|
||||
* -------------------------------------------------------------------- */
|
||||
/*
|
||||
* Copyright (C) 2010-2019 ARM Limited or its affiliates. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "arm_math.h"
|
||||
#include <limits.h>
|
||||
#include <math.h>
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @addtogroup groupDistance
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @brief Jensen-Shannon distance between two vectors
|
||||
*
|
||||
* This function is assuming that elements of second vector are > 0
|
||||
* and 0 only when the corresponding element of first vector is 0.
|
||||
* Otherwise the result of the computation does not make sense
|
||||
* and for speed reasons, the cases returning NaN or Infinity are not
|
||||
* managed.
|
||||
*
|
||||
* When the function is computing x log (x / y) with x == 0 and y == 0,
|
||||
* it will compute the right result (0) but a division by zero will occur
|
||||
* and should be ignored in client code.
|
||||
*
|
||||
* @param[in] pA First vector
|
||||
* @param[in] pB Second vector
|
||||
* @param[in] blockSize vector length
|
||||
* @return distance
|
||||
*
|
||||
*/
|
||||
|
||||
static inline double rel_entr(double x, double y)
|
||||
{
|
||||
return (x * log(x / y));
|
||||
}
|
||||
|
||||
#if defined(ARM_MATH_NEON)
|
||||
|
||||
#include "NEMath.h"
|
||||
|
||||
float32_t arm_jensenshannon_distance_f32(const float32_t *pA,const float32_t *pB, uint32_t blockSize)
|
||||
{
|
||||
float32_t accum, result, tmp,a,b;
|
||||
uint32_t i, blkCnt;
|
||||
float32x4_t aV,bV,t, tmpV, accumV;
|
||||
float32x2_t accumV2;
|
||||
|
||||
accum = 0.0;
|
||||
accumV = vdupq_n_f32(0.0);
|
||||
|
||||
blkCnt = blockSize >> 2;
|
||||
while(blkCnt > 0)
|
||||
{
|
||||
aV = vld1q_f32(pA);
|
||||
bV = vld1q_f32(pB);
|
||||
t = vaddq_f32(aV,bV);
|
||||
t = vmulq_n_f32(t, 0.5);
|
||||
|
||||
tmpV = vmulq_f32(aV, vinvq_f32(t));
|
||||
tmpV = vlogq_f32(tmpV);
|
||||
accumV = vmlaq_f32(accumV, aV, tmpV);
|
||||
|
||||
|
||||
tmpV = vmulq_f32(bV, vinvq_f32(t));
|
||||
tmpV = vlogq_f32(tmpV);
|
||||
accumV = vmlaq_f32(accumV, bV, tmpV);
|
||||
|
||||
pA += 4;
|
||||
pB += 4;
|
||||
|
||||
|
||||
blkCnt --;
|
||||
}
|
||||
|
||||
accumV2 = vpadd_f32(vget_low_f32(accumV),vget_high_f32(accumV));
|
||||
accum = accumV2[0] + accumV2[1];
|
||||
|
||||
blkCnt = blockSize & 3;
|
||||
while(blkCnt > 0)
|
||||
{
|
||||
a = *pA;
|
||||
b = *pB;
|
||||
tmp = (a + b) / 2.0;
|
||||
accum += rel_entr(a, tmp);
|
||||
accum += rel_entr(b, tmp);
|
||||
|
||||
pA++;
|
||||
pB++;
|
||||
|
||||
blkCnt --;
|
||||
}
|
||||
|
||||
|
||||
arm_sqrt_f32(accum/2.0, &result);
|
||||
return(result);
|
||||
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
|
||||
float32_t arm_jensenshannon_distance_f32(const float32_t *pA,const float32_t *pB, uint32_t blockSize)
|
||||
{
|
||||
float32_t left, right,sum, result, tmp;
|
||||
uint32_t i;
|
||||
|
||||
left = 0.0;
|
||||
right = 0.0;
|
||||
for(i=0; i < blockSize; i++)
|
||||
{
|
||||
tmp = (pA[i] + pB[i]) / 2.0;
|
||||
left += rel_entr(pA[i], tmp);
|
||||
right += rel_entr(pB[i], tmp);
|
||||
}
|
||||
|
||||
|
||||
sum = left + right;
|
||||
arm_sqrt_f32(sum/2.0, &result);
|
||||
return(result);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @} end of groupDistance group
|
||||
*/
|
||||
@ -0,0 +1,71 @@
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
* Project: CMSIS DSP Library
|
||||
* Title: arm_kulsinski_distance.c
|
||||
* Description: Kulsinski distance between two vectors
|
||||
*
|
||||
*
|
||||
* Target Processor: Cortex-M cores
|
||||
* -------------------------------------------------------------------- */
|
||||
/*
|
||||
* Copyright (C) 2010-2019 ARM Limited or its affiliates. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "arm_math.h"
|
||||
#include <limits.h>
|
||||
#include <math.h>
|
||||
|
||||
|
||||
|
||||
extern void arm_boolean_distance_TT_TF_FT(const uint32_t *pA
|
||||
, const uint32_t *pB
|
||||
, uint32_t numberOfBools
|
||||
, uint32_t *cTT
|
||||
, uint32_t *cTF
|
||||
, uint32_t *cFT
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
* @addtogroup groupDistance
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @brief Kulsinski distance between two vectors
|
||||
*
|
||||
* @param[in] pA First vector of packed booleans
|
||||
* @param[in] pB Second vector of packed booleans
|
||||
* @param[in] numberOfBools Number of booleans
|
||||
* @return distance
|
||||
*
|
||||
*/
|
||||
|
||||
float32_t arm_kulsinski_distance(const uint32_t *pA, const uint32_t *pB, uint32_t numberOfBools)
|
||||
{
|
||||
uint32_t ctt=0,ctf=0,cft=0;
|
||||
|
||||
arm_boolean_distance_TT_TF_FT(pA, pB, numberOfBools, &ctt, &ctf, &cft);
|
||||
|
||||
return(1.0*(ctf + cft - ctt + numberOfBools) / (cft + ctf + numberOfBools));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @} end of groupDistance group
|
||||
*/
|
||||
@ -0,0 +1,120 @@
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
* Project: CMSIS DSP Library
|
||||
* Title: arm_minkowski_distance_f32.c
|
||||
* Description: Minkowski distance between two vectors
|
||||
*
|
||||
*
|
||||
* Target Processor: Cortex-M cores
|
||||
* -------------------------------------------------------------------- */
|
||||
/*
|
||||
* Copyright (C) 2010-2019 ARM Limited or its affiliates. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "arm_math.h"
|
||||
#include <limits.h>
|
||||
#include <math.h>
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @addtogroup groupDistance
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @brief Minkowski distance between two vectors
|
||||
*
|
||||
* @param[in] pA First vector
|
||||
* @param[in] pB Second vector
|
||||
* @param[in] n Norm order (>= 2)
|
||||
* @param[in] blockSize vector length
|
||||
* @return distance
|
||||
*
|
||||
*/
|
||||
#if defined(ARM_MATH_NEON)
|
||||
|
||||
#include "NEMath.h"
|
||||
|
||||
float32_t arm_minkowski_distance_f32(const float32_t *pA,const float32_t *pB, int order, uint32_t blockSize)
|
||||
{
|
||||
float32_t sum,diff;
|
||||
uint32_t i, blkCnt;
|
||||
float32x4_t sumV,aV,bV, tmpV, n;
|
||||
float32x2_t sumV2;
|
||||
|
||||
sum = 0.0;
|
||||
sumV = vdupq_n_f32(0.0);
|
||||
n = vdupq_n_f32(order);
|
||||
|
||||
blkCnt = blockSize >> 2;
|
||||
while(blkCnt > 0)
|
||||
{
|
||||
aV = vld1q_f32(pA);
|
||||
bV = vld1q_f32(pB);
|
||||
pA += 4;
|
||||
pB += 4;
|
||||
|
||||
tmpV = vabdq_f32(aV,bV);
|
||||
tmpV = vpowq_f32(tmpV,n);
|
||||
sumV = vaddq_f32(sumV, tmpV);
|
||||
|
||||
|
||||
blkCnt --;
|
||||
}
|
||||
|
||||
sumV2 = vpadd_f32(vget_low_f32(sumV),vget_high_f32(sumV));
|
||||
sum = sumV2[0] + sumV2[1];
|
||||
|
||||
blkCnt = blockSize & 3;
|
||||
while(blkCnt > 0)
|
||||
{
|
||||
sum += pow(fabs(*pA++ - *pB++),order);
|
||||
|
||||
blkCnt --;
|
||||
}
|
||||
|
||||
|
||||
return(pow(sum,(1.0/order)));
|
||||
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
|
||||
float32_t arm_minkowski_distance_f32(const float32_t *pA,const float32_t *pB, int order, uint32_t blockSize)
|
||||
{
|
||||
float32_t sum,diff;
|
||||
uint32_t i;
|
||||
|
||||
sum = 0.0;
|
||||
for(i=0; i < blockSize; i++)
|
||||
{
|
||||
sum += pow(fabs(pA[i] - pB[i]),order);
|
||||
}
|
||||
|
||||
|
||||
return(pow(sum,(1.0/order)));
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* @} end of groupDistance group
|
||||
*/
|
||||
@ -0,0 +1,74 @@
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
* Project: CMSIS DSP Library
|
||||
* Title: arm_rogerstanimoto_distance.c
|
||||
* Description: Roger Stanimoto distance between two vectors
|
||||
*
|
||||
*
|
||||
* Target Processor: Cortex-M cores
|
||||
* -------------------------------------------------------------------- */
|
||||
/*
|
||||
* Copyright (C) 2010-2019 ARM Limited or its affiliates. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "arm_math.h"
|
||||
#include <limits.h>
|
||||
#include <math.h>
|
||||
|
||||
|
||||
|
||||
extern void arm_boolean_distance_TT_FF_TF_FT(const uint32_t *pA
|
||||
, const uint32_t *pB
|
||||
, uint32_t numberOfBools
|
||||
, uint32_t *cTT
|
||||
, uint32_t *cFF
|
||||
, uint32_t *cTF
|
||||
, uint32_t *cFT
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
* @addtogroup groupDistance
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @brief Roger Stanimoto distance between two vectors
|
||||
*
|
||||
* @param[in] pA First vector of packed booleans
|
||||
* @param[in] pB Second vector of packed booleans
|
||||
* @param[in] numberOfBools Number of booleans
|
||||
* @return distance
|
||||
*
|
||||
*/
|
||||
|
||||
float32_t arm_rogerstanimoto_distance(const uint32_t *pA, const uint32_t *pB, uint32_t numberOfBools)
|
||||
{
|
||||
uint32_t ctt=0,cff=0,ctf=0,cft=0,r;
|
||||
|
||||
arm_boolean_distance_TT_FF_TF_FT(pA, pB, numberOfBools, &ctt,&cff, &ctf, &cft);
|
||||
|
||||
r = 2*(ctf + cft);
|
||||
|
||||
return(1.0*r / (r + ctt + cff));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @} end of groupDistance group
|
||||
*/
|
||||
@ -0,0 +1,71 @@
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
* Project: CMSIS DSP Library
|
||||
* Title: arm_russellrao_distance.c
|
||||
* Description: Russell-Rao distance between two vectors
|
||||
*
|
||||
*
|
||||
* Target Processor: Cortex-M cores
|
||||
* -------------------------------------------------------------------- */
|
||||
/*
|
||||
* Copyright (C) 2010-2019 ARM Limited or its affiliates. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "arm_math.h"
|
||||
#include <limits.h>
|
||||
#include <math.h>
|
||||
|
||||
|
||||
|
||||
extern void arm_boolean_distance_TT(const uint32_t *pA
|
||||
, const uint32_t *pB
|
||||
, uint32_t numberOfBools
|
||||
, uint32_t *cTT
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
* @addtogroup groupDistance
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @brief Russell-Rao distance between two vectors
|
||||
*
|
||||
* @param[in] pA First vector of packed booleans
|
||||
* @param[in] pB Second vector of packed booleans
|
||||
* @param[in] numberOfBools Number of booleans
|
||||
* @return distance
|
||||
*
|
||||
*/
|
||||
|
||||
float32_t arm_russellrao_distance(const uint32_t *pA, const uint32_t *pB, uint32_t numberOfBools)
|
||||
{
|
||||
uint32_t ctt=0;
|
||||
|
||||
|
||||
arm_boolean_distance_TT(pA, pB, numberOfBools, &ctt);
|
||||
|
||||
|
||||
return(1.0*(numberOfBools - ctt) / ((float32_t)numberOfBools));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @} end of groupDistance group
|
||||
*/
|
||||
@ -0,0 +1,75 @@
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
* Project: CMSIS DSP Library
|
||||
* Title: arm_sokalmichener_distance.c
|
||||
* Description: Sokal-Michener distance between two vectors
|
||||
*
|
||||
*
|
||||
* Target Processor: Cortex-M cores
|
||||
* -------------------------------------------------------------------- */
|
||||
/*
|
||||
* Copyright (C) 2010-2019 ARM Limited or its affiliates. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "arm_math.h"
|
||||
#include <limits.h>
|
||||
#include <math.h>
|
||||
|
||||
|
||||
extern void arm_boolean_distance_TT_FF_TF_FT(const uint32_t *pA
|
||||
, const uint32_t *pB
|
||||
, uint32_t numberOfBools
|
||||
, uint32_t *cTT
|
||||
, uint32_t *cFF
|
||||
, uint32_t *cTF
|
||||
, uint32_t *cFT
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
* @addtogroup groupDistance
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @brief Sokal-Michener distance between two vectors
|
||||
*
|
||||
* @param[in] pA First vector of packed booleans
|
||||
* @param[in] pB Second vector of packed booleans
|
||||
* @param[in] numberOfBools Number of booleans
|
||||
* @return distance
|
||||
*
|
||||
*/
|
||||
|
||||
float32_t arm_sokalmichener_distance(const uint32_t *pA, const uint32_t *pB, uint32_t numberOfBools)
|
||||
{
|
||||
uint32_t ctt=0,cff=0,cft=0,ctf=0;
|
||||
float32_t r,s;
|
||||
|
||||
arm_boolean_distance_TT_FF_TF_FT(pA, pB, numberOfBools, &ctt, &cff, &ctf, &cft);
|
||||
|
||||
r = 2.0*(ctf + cft);
|
||||
s = 1.0*(cff + ctt);
|
||||
|
||||
return(r / (s+r));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @} end of groupDistance group
|
||||
*/
|
||||
@ -0,0 +1,73 @@
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
* Project: CMSIS DSP Library
|
||||
* Title: arm_sokalsneath_distance.c
|
||||
* Description: Sokal-Sneath distance between two vectors
|
||||
*
|
||||
*
|
||||
* Target Processor: Cortex-M cores
|
||||
* -------------------------------------------------------------------- */
|
||||
/*
|
||||
* Copyright (C) 2010-2019 ARM Limited or its affiliates. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "arm_math.h"
|
||||
#include <limits.h>
|
||||
#include <math.h>
|
||||
|
||||
|
||||
extern void arm_boolean_distance_TT_TF_FT(const uint32_t *pA
|
||||
, const uint32_t *pB
|
||||
, uint32_t numberOfBools
|
||||
, uint32_t *cTT
|
||||
, uint32_t *cTF
|
||||
, uint32_t *cFT
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
* @addtogroup groupDistance
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @brief Sokal-Sneath distance between two vectors
|
||||
*
|
||||
* @param[in] pA First vector of packed booleans
|
||||
* @param[in] pB Second vector of packed booleans
|
||||
* @param[in] numberOfBools Number of booleans
|
||||
* @return distance
|
||||
*
|
||||
*/
|
||||
|
||||
float32_t arm_sokalsneath_distance(const uint32_t *pA, const uint32_t *pB, uint32_t numberOfBools)
|
||||
{
|
||||
uint32_t ctt=0,cft=0,ctf=0;
|
||||
float32_t r;
|
||||
|
||||
arm_boolean_distance_TT_TF_FT(pA, pB, numberOfBools, &ctt, &ctf, &cft);
|
||||
|
||||
r = 2.0*(ctf + cft);
|
||||
|
||||
return(r / (r + ctt));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @} end of groupDistance group
|
||||
*/
|
||||
@ -0,0 +1,73 @@
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
* Project: CMSIS DSP Library
|
||||
* Title: arm_yule_distance.c
|
||||
* Description: Yule distance between two vectors
|
||||
*
|
||||
*
|
||||
* Target Processor: Cortex-M cores
|
||||
* -------------------------------------------------------------------- */
|
||||
/*
|
||||
* Copyright (C) 2010-2019 ARM Limited or its affiliates. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the License); you may
|
||||
* not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an AS IS BASIS, WITHOUT
|
||||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "arm_math.h"
|
||||
#include <limits.h>
|
||||
#include <math.h>
|
||||
|
||||
|
||||
extern void arm_boolean_distance_TT_FF_TF_FT(const uint32_t *pA
|
||||
, const uint32_t *pB
|
||||
, uint32_t numberOfBools
|
||||
, uint32_t *cTT
|
||||
, uint32_t *cFF
|
||||
, uint32_t *cTF
|
||||
, uint32_t *cFT
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
* @addtogroup groupDistance
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @brief Yule distance between two vectors
|
||||
*
|
||||
* @param[in] pA First vector of packed booleans
|
||||
* @param[in] pB Second vector of packed booleans
|
||||
* @param[in] numberOfBools Number of booleans
|
||||
* @return distance
|
||||
*
|
||||
*/
|
||||
|
||||
float32_t arm_yule_distance(const uint32_t *pA, const uint32_t *pB, uint32_t numberOfBools)
|
||||
{
|
||||
uint32_t ctt=0,cff=0,ctf=0,cft=0,r;
|
||||
|
||||
arm_boolean_distance_TT_FF_TF_FT(pA, pB, numberOfBools, &ctt,&cff, &ctf, &cft);
|
||||
|
||||
r = 2*(ctf * cft);
|
||||
|
||||
return(1.0*r / (r/2.0 + ctt * cff));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @} end of groupDistance group
|
||||
*/
|
||||
@ -1,41 +1,41 @@
|
||||
CATEGORY,NAME,ID,OLDID,NB,CYCLES,OPTIMIZED,HARDFP,FASTMATH,NEON,UNROLL,ROUNDING,PLATFORM,CORE,COMPILER,VERSION
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_mult_f32",1,"0",16,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_mult_f32",1,"0",32,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_mult_f32",1,"0",64,2528,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_mult_f32",1,"0",128,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_mult_f32",1,"0",256,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_add_f32",2,"5",16,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_add_f32",2,"5",32,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_add_f32",2,"5",64,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_add_f32",2,"5",128,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_add_f32",2,"5",256,2518,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_sub_f32",3,"10",16,2510,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_sub_f32",3,"10",32,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_sub_f32",3,"10",64,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_sub_f32",3,"10",128,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_sub_f32",3,"10",256,2554,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_abs_f32",4,"15",16,2457,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_abs_f32",4,"15",32,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_abs_f32",4,"15",64,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_abs_f32",4,"15",128,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_abs_f32",4,"15",256,2499,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_negate_f32",5,"20",16,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_negate_f32",5,"20",32,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_negate_f32",5,"20",64,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_negate_f32",5,"20",128,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_negate_f32",5,"20",256,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_offset_f32",6,"25",16,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_offset_f32",6,"25",32,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_offset_f32",6,"25",64,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_offset_f32",6,"25",128,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_offset_f32",6,"25",256,2518,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_scale_f32",7,"30",16,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_scale_f32",7,"30",32,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_scale_f32",7,"30",64,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_scale_f32",7,"30",128,2518,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_scale_f32",7,"30",256,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_dot_f32",8,"38",16,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_dot_f32",8,"38",32,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_dot_f32",8,"38",64,2510,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_dot_f32",8,"38",128,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_dot_f32",8,"38",256,2538,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_mult_f32",1,"0",16,237,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_mult_f32",1,"0",32,261,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_mult_f32",1,"0",64,309,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_mult_f32",1,"0",128,405,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_mult_f32",1,"0",256,597,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_add_f32",2,"5",16,237,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_add_f32",2,"5",32,261,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_add_f32",2,"5",64,309,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_add_f32",2,"5",128,405,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_add_f32",2,"5",256,597,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_sub_f32",3,"10",16,237,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_sub_f32",3,"10",32,261,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_sub_f32",3,"10",64,309,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_sub_f32",3,"10",128,405,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_sub_f32",3,"10",256,597,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_abs_f32",4,"15",16,232,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_abs_f32",4,"15",32,252,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_abs_f32",4,"15",64,292,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_abs_f32",4,"15",128,372,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_abs_f32",4,"15",256,532,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_negate_f32",5,"20",16,187,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_negate_f32",5,"20",32,197,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_negate_f32",5,"20",64,217,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_negate_f32",5,"20",128,257,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_negate_f32",5,"20",256,337,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_offset_f32",6,"25",16,248,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_offset_f32",6,"25",32,258,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_offset_f32",6,"25",64,278,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_offset_f32",6,"25",128,318,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_offset_f32",6,"25",256,398,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_scale_f32",7,"30",16,248,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_scale_f32",7,"30",32,258,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_scale_f32",7,"30",64,278,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_scale_f32",7,"30",128,318,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_scale_f32",7,"30",256,398,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_dot_f32",8,"38",16,196,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_dot_f32",8,"38",32,220,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_dot_f32",8,"38",64,268,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_dot_f32",8,"38",128,364,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsF32","vec_dot_f32",8,"38",256,556,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
|
||||
|
@ -1,41 +1,41 @@
|
||||
CATEGORY,NAME,ID,OLDID,NB,CYCLES,OPTIMIZED,HARDFP,FASTMATH,NEON,UNROLL,ROUNDING,PLATFORM,CORE,COMPILER,VERSION
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_mult_q15",1,"3",16,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_mult_q15",1,"3",32,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_mult_q15",1,"3",64,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_mult_q15",1,"3",128,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_mult_q15",1,"3",256,2518,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_add_q15",2,"8",16,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_add_q15",2,"8",32,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_add_q15",2,"8",64,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_add_q15",2,"8",128,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_add_q15",2,"8",256,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_sub_q15",3,"13",16,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_sub_q15",3,"13",32,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_sub_q15",3,"13",64,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_sub_q15",3,"13",128,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_sub_q15",3,"13",256,2514,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_abs_q15",4,"18",16,2503,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_abs_q15",4,"18",32,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_abs_q15",4,"18",64,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_abs_q15",4,"18",128,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_abs_q15",4,"18",256,2493,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_negate_q15",5,"23",16,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_negate_q15",5,"23",32,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_negate_q15",5,"23",64,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_negate_q15",5,"23",128,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_negate_q15",5,"23",256,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_offset_q15",6,"28",16,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_offset_q15",6,"28",32,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_offset_q15",6,"28",64,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_offset_q15",6,"28",128,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_offset_q15",6,"28",256,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_scale_q15",7,"33",16,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_scale_q15",7,"33",32,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_scale_q15",7,"33",64,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_scale_q15",7,"33",128,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_scale_q15",7,"33",256,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_dot_q15",8,"41",16,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_dot_q15",8,"41",32,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_dot_q15",8,"41",64,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_dot_q15",8,"41",128,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_dot_q15",8,"41",256,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_mult_q15",1,"3",16,315,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_mult_q15",1,"3",32,415,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_mult_q15",1,"3",64,615,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_mult_q15",1,"3",128,1015,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_mult_q15",1,"3",256,1815,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_add_q15",2,"8",16,267,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_add_q15",2,"8",32,319,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_add_q15",2,"8",64,423,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_add_q15",2,"8",128,631,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_add_q15",2,"8",256,1047,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_sub_q15",3,"13",16,267,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_sub_q15",3,"13",32,319,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_sub_q15",3,"13",64,423,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_sub_q15",3,"13",128,631,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_sub_q15",3,"13",256,1047,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_abs_q15",4,"18",16,315,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_abs_q15",4,"18",32,415,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_abs_q15",4,"18",64,615,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_abs_q15",4,"18",128,1015,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_abs_q15",4,"18",256,1815,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_negate_q15",5,"23",16,200,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_negate_q15",5,"23",32,240,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_negate_q15",5,"23",64,320,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_negate_q15",5,"23",128,480,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_negate_q15",5,"23",256,800,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_offset_q15",6,"28",16,255,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_offset_q15",6,"28",32,295,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_offset_q15",6,"28",64,375,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_offset_q15",6,"28",128,535,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_offset_q15",6,"28",256,855,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_scale_q15",7,"33",16,309,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_scale_q15",7,"33",32,397,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_scale_q15",7,"33",64,573,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_scale_q15",7,"33",128,925,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_scale_q15",7,"33",256,1629,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_dot_q15",8,"41",16,210,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_dot_q15",8,"41",32,250,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_dot_q15",8,"41",64,330,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_dot_q15",8,"41",128,490,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ15","vec_dot_q15",8,"41",256,810,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
|
||||
|
@ -1,41 +1,41 @@
|
||||
CATEGORY,NAME,ID,OLDID,NB,CYCLES,OPTIMIZED,HARDFP,FASTMATH,NEON,UNROLL,ROUNDING,PLATFORM,CORE,COMPILER,VERSION
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_mult_q31",1,"2",16,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_mult_q31",1,"2",32,2494,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_mult_q31",1,"2",64,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_mult_q31",1,"2",128,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_mult_q31",1,"2",256,2592,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_add_q31",2,"7",16,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_add_q31",2,"7",32,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_add_q31",2,"7",64,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_add_q31",2,"7",128,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_add_q31",2,"7",256,2537,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_sub_q31",3,"12",16,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_sub_q31",3,"12",32,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_sub_q31",3,"12",64,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_sub_q31",3,"12",128,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_sub_q31",3,"12",256,2519,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_abs_q31",4,"17",16,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_abs_q31",4,"17",32,2520,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_abs_q31",4,"17",64,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_abs_q31",4,"17",128,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_abs_q31",4,"17",256,2505,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_negate_q31",5,"22",16,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_negate_q31",5,"22",32,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_negate_q31",5,"22",64,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_negate_q31",5,"22",128,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_negate_q31",5,"22",256,2518,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_offset_q31",6,"27",16,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_offset_q31",6,"27",32,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_offset_q31",6,"27",64,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_offset_q31",6,"27",128,2483,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_offset_q31",6,"27",256,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_scale_q31",7,"32",16,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_scale_q31",7,"32",32,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_scale_q31",7,"32",64,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_scale_q31",7,"32",128,2548,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_scale_q31",7,"32",256,2520,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_dot_q31",8,"40",16,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_dot_q31",8,"40",32,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_dot_q31",8,"40",64,2639,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_dot_q31",8,"40",128,2527,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_dot_q31",8,"40",256,2573,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_mult_q31",1,"2",16,330,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_mult_q31",1,"2",32,446,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_mult_q31",1,"2",64,678,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_mult_q31",1,"2",128,1142,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_mult_q31",1,"2",256,2070,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_add_q31",2,"7",16,298,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_add_q31",2,"7",32,382,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_add_q31",2,"7",64,550,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_add_q31",2,"7",128,886,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_add_q31",2,"7",256,1558,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_sub_q31",3,"12",16,298,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_sub_q31",3,"12",32,382,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_sub_q31",3,"12",64,550,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_sub_q31",3,"12",128,886,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_sub_q31",3,"12",256,1558,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_abs_q31",4,"17",16,305,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_abs_q31",4,"17",32,401,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_abs_q31",4,"17",64,585,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_abs_q31",4,"17",128,953,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_abs_q31",4,"17",256,1692,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_negate_q31",5,"22",16,224,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_negate_q31",5,"22",32,288,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_negate_q31",5,"22",64,416,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_negate_q31",5,"22",128,672,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_negate_q31",5,"22",256,1184,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_offset_q31",6,"27",16,279,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_offset_q31",6,"27",32,343,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_offset_q31",6,"27",64,471,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_offset_q31",6,"27",128,727,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_offset_q31",6,"27",256,1239,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_scale_q31",7,"32",16,458,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_scale_q31",7,"32",32,652,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_scale_q31",7,"32",64,1040,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_scale_q31",7,"32",128,1816,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_scale_q31",7,"32",256,3368,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_dot_q31",8,"40",16,216,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_dot_q31",8,"40",32,240,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_dot_q31",8,"40",64,288,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_dot_q31",8,"40",128,384,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ31","vec_dot_q31",8,"40",256,576,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
|
||||
|
@ -1,41 +1,41 @@
|
||||
CATEGORY,NAME,ID,OLDID,NB,CYCLES,OPTIMIZED,HARDFP,FASTMATH,NEON,UNROLL,ROUNDING,PLATFORM,CORE,COMPILER,VERSION
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_mult_q7",1,"4",16,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_mult_q7",1,"4",32,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_mult_q7",1,"4",64,2491,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_mult_q7",1,"4",128,2556,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_mult_q7",1,"4",256,2499,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_add_q7",2,"9",16,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_add_q7",2,"9",32,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_add_q7",2,"9",64,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_add_q7",2,"9",128,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_add_q7",2,"9",256,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_sub_q7",3,"14",16,2498,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_sub_q7",3,"14",32,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_sub_q7",3,"14",64,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_sub_q7",3,"14",128,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_sub_q7",3,"14",256,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_abs_q7",4,"19",16,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_abs_q7",4,"19",32,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_abs_q7",4,"19",64,2515,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_abs_q7",4,"19",128,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_abs_q7",4,"19",256,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_negate_q7",5,"24",16,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_negate_q7",5,"24",32,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_negate_q7",5,"24",64,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_negate_q7",5,"24",128,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_negate_q7",5,"24",256,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_offset_q7",6,"29",16,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_offset_q7",6,"29",32,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_offset_q7",6,"29",64,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_offset_q7",6,"29",128,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_offset_q7",6,"29",256,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_scale_q7",7,"34",16,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_scale_q7",7,"34",32,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_scale_q7",7,"34",64,2508,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_scale_q7",7,"34",128,2534,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_scale_q7",7,"34",256,2522,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_dot_q7",8,"42",16,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_dot_q7",8,"42",32,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_dot_q7",8,"42",64,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_dot_q7",8,"42",128,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_dot_q7",8,"42",256,0,1,1,1,0,1,0,FVP,ARMCM7_DP,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_mult_q7",1,"4",16,335,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_mult_q7",1,"4",32,455,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_mult_q7",1,"4",64,695,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_mult_q7",1,"4",128,1175,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_mult_q7",1,"4",256,2135,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_add_q7",2,"9",16,238,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_add_q7",2,"9",32,262,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_add_q7",2,"9",64,310,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_add_q7",2,"9",128,406,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_add_q7",2,"9",256,598,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_sub_q7",3,"14",16,238,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_sub_q7",3,"14",32,262,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_sub_q7",3,"14",64,310,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_sub_q7",3,"14",128,406,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_sub_q7",3,"14",256,598,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_abs_q7",4,"19",16,313,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_abs_q7",4,"19",32,405,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_abs_q7",4,"19",64,603,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_abs_q7",4,"19",128,1007,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_abs_q7",4,"19",256,1801,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_negate_q7",5,"24",16,179,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_negate_q7",5,"24",32,199,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_negate_q7",5,"24",64,239,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_negate_q7",5,"24",128,319,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_negate_q7",5,"24",256,479,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_offset_q7",6,"29",16,240,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_offset_q7",6,"29",32,260,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_offset_q7",6,"29",64,300,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_offset_q7",6,"29",128,380,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_offset_q7",6,"29",256,540,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_scale_q7",7,"34",16,321,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_scale_q7",7,"34",32,421,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_scale_q7",7,"34",64,621,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_scale_q7",7,"34",128,1021,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_scale_q7",7,"34",256,1821,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_dot_q7",8,"42",16,208,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_dot_q7",8,"42",32,248,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_dot_q7",8,"42",64,328,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_dot_q7",8,"42",128,488,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
"DSP:BasicMaths:BasicMathsQ7","vec_dot_q7",8,"42",256,808,1,1,1,1,1,0,FVP,ARMCA5,AC6,6120001
|
||||
|
||||
|
@ -0,0 +1,42 @@
|
||||
void test_braycurtis_distance_f32();
|
||||
void test_canberra_distance_f32();
|
||||
void test_chebyshev_distance_f32();
|
||||
void test_cityblock_distance_f32();
|
||||
void test_correlation_distance_f32();
|
||||
void test_cosine_distance_f32();
|
||||
void test_euclidean_distance_f32();
|
||||
void test_jensenshannon_distance_f32();
|
||||
void test_minkowski_distance_f32();
|
||||
|
||||
// Pattern IDs
|
||||
static const int DIMS_S16_ID=0;
|
||||
static const int DIMS_MINKOWSKI_S16_ID=1;
|
||||
static const int INPUTA_F32_ID=2;
|
||||
static const int INPUTB_F32_ID=3;
|
||||
static const int INPUTA_JEN_F32_ID=4;
|
||||
static const int INPUTB_JEN_F32_ID=5;
|
||||
static const int REF1_F32_ID=6;
|
||||
static const int REF2_F32_ID=7;
|
||||
static const int REF3_F32_ID=8;
|
||||
static const int REF4_F32_ID=9;
|
||||
static const int REF5_F32_ID=10;
|
||||
static const int REF6_F32_ID=11;
|
||||
static const int REF7_F32_ID=12;
|
||||
static const int REF8_F32_ID=13;
|
||||
static const int REF9_F32_ID=14;
|
||||
|
||||
// Output IDs
|
||||
static const int OUT_F32_ID=0;
|
||||
static const int TMPA_F32_ID=1;
|
||||
static const int TMPB_F32_ID=2;
|
||||
|
||||
// Test IDs
|
||||
static const int TEST_BRAYCURTIS_DISTANCE_F32_1=1;
|
||||
static const int TEST_CANBERRA_DISTANCE_F32_2=2;
|
||||
static const int TEST_CHEBYSHEV_DISTANCE_F32_3=3;
|
||||
static const int TEST_CITYBLOCK_DISTANCE_F32_4=4;
|
||||
static const int TEST_CORRELATION_DISTANCE_F32_5=5;
|
||||
static const int TEST_COSINE_DISTANCE_F32_6=6;
|
||||
static const int TEST_EUCLIDEAN_DISTANCE_F32_7=7;
|
||||
static const int TEST_JENSENSHANNON_DISTANCE_F32_8=8;
|
||||
static const int TEST_MINKOWSKI_DISTANCE_F32_9=9;
|
||||
@ -0,0 +1,37 @@
|
||||
void test_dice_distance();
|
||||
void test_hamming_distance();
|
||||
void test_jaccard_distance();
|
||||
void test_kulsinski_distance();
|
||||
void test_rogerstanimoto_distance();
|
||||
void test_russellrao_distance();
|
||||
void test_sokalmichener_distance();
|
||||
void test_sokalsneath_distance();
|
||||
void test_yule_distance();
|
||||
|
||||
// Pattern IDs
|
||||
static const int DIMS_S16_ID=0;
|
||||
static const int INPUTA_U32_ID=1;
|
||||
static const int INPUTB_U32_ID=2;
|
||||
static const int REF1_F32_ID=3;
|
||||
static const int REF2_F32_ID=4;
|
||||
static const int REF3_F32_ID=5;
|
||||
static const int REF4_F32_ID=6;
|
||||
static const int REF5_F32_ID=7;
|
||||
static const int REF6_F32_ID=8;
|
||||
static const int REF7_F32_ID=9;
|
||||
static const int REF8_F32_ID=10;
|
||||
static const int REF9_F32_ID=11;
|
||||
|
||||
// Output IDs
|
||||
static const int OUT_F32_ID=0;
|
||||
|
||||
// Test IDs
|
||||
static const int TEST_DICE_DISTANCE_1=1;
|
||||
static const int TEST_HAMMING_DISTANCE_2=2;
|
||||
static const int TEST_JACCARD_DISTANCE_3=3;
|
||||
static const int TEST_KULSINSKI_DISTANCE_4=4;
|
||||
static const int TEST_ROGERSTANIMOTO_DISTANCE_5=5;
|
||||
static const int TEST_RUSSELLRAO_DISTANCE_6=6;
|
||||
static const int TEST_SOKALMICHENER_DISTANCE_7=7;
|
||||
static const int TEST_SOKALSNEATH_DISTANCE_8=8;
|
||||
static const int TEST_YULE_DISTANCE_9=9;
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,27 @@
|
||||
#include "Test.h"
|
||||
#include "Pattern.h"
|
||||
class DistanceTestsF32:public Client::Suite
|
||||
{
|
||||
public:
|
||||
DistanceTestsF32(Testing::testID_t id);
|
||||
void setUp(Testing::testID_t,std::vector<Testing::param_t>& paramsArgs,Client::PatternMgr *mgr);
|
||||
void tearDown(Testing::testID_t,Client::PatternMgr *mgr);
|
||||
private:
|
||||
#include "DistanceTestsF32_decl.h"
|
||||
|
||||
Client::Pattern<float32_t> inputA;
|
||||
Client::Pattern<float32_t> inputB;
|
||||
Client::Pattern<int16_t> dims;
|
||||
|
||||
Client::LocalPattern<float32_t> output;
|
||||
Client::LocalPattern<float32_t> tmpA;
|
||||
Client::LocalPattern<float32_t> tmpB;
|
||||
|
||||
// Reference patterns are not loaded when we are in dump mode
|
||||
Client::RefPattern<float32_t> ref;
|
||||
|
||||
int vecDim;
|
||||
int nbPatterns;
|
||||
|
||||
|
||||
};
|
||||
@ -0,0 +1,25 @@
|
||||
#include "Test.h"
|
||||
#include "Pattern.h"
|
||||
class DistanceTestsU32:public Client::Suite
|
||||
{
|
||||
public:
|
||||
DistanceTestsU32(Testing::testID_t id);
|
||||
void setUp(Testing::testID_t,std::vector<Testing::param_t>& paramsArgs,Client::PatternMgr *mgr);
|
||||
void tearDown(Testing::testID_t,Client::PatternMgr *mgr);
|
||||
private:
|
||||
#include "DistanceTestsU32_decl.h"
|
||||
|
||||
Client::Pattern<uint32_t> inputA;
|
||||
Client::Pattern<uint32_t> inputB;
|
||||
Client::Pattern<int16_t> dims;
|
||||
|
||||
Client::LocalPattern<float32_t> output;
|
||||
|
||||
// Reference patterns are not loaded when we are in dump mode
|
||||
Client::RefPattern<float32_t> ref;
|
||||
|
||||
int vecDim;
|
||||
int bitVecDim;
|
||||
int nbPatterns;
|
||||
|
||||
};
|
||||
@ -0,0 +1,10 @@
|
||||
0x3f8686fa
|
||||
0x3f454585
|
||||
0x3faf00b2
|
||||
0x3ff1f63b
|
||||
0x3f7c3d9c
|
||||
0x3f72d302
|
||||
0x3fcb0f1a
|
||||
0x3f0faf1e
|
||||
0x3f80c998
|
||||
0x3f8776bc
|
||||
@ -0,0 +1,10 @@
|
||||
0x40fc0b48
|
||||
0x40de7924
|
||||
0x411c1b4d
|
||||
0x411d171a
|
||||
0x41064df4
|
||||
0x41087542
|
||||
0x411607aa
|
||||
0x40d50375
|
||||
0x4103f1e3
|
||||
0x411b2f4f
|
||||
@ -0,0 +1,10 @@
|
||||
0x406b275c
|
||||
0x400840d1
|
||||
0x4026b06a
|
||||
0x4099d6f0
|
||||
0x407e432a
|
||||
0x4000b5d8
|
||||
0x4034963b
|
||||
0x3fdae203
|
||||
0x4057bb0c
|
||||
0x4028d17b
|
||||
@ -0,0 +1,10 @@
|
||||
0x4161f7b0
|
||||
0x41063859
|
||||
0x415ef1f6
|
||||
0x41964efc
|
||||
0x416ddede
|
||||
0x414833a7
|
||||
0x41643195
|
||||
0x4101bf3b
|
||||
0x415300e0
|
||||
0x416d19d0
|
||||
@ -0,0 +1,10 @@
|
||||
0x3f85655d
|
||||
0x3f3a91f0
|
||||
0x3f92df5b
|
||||
0x3fc43088
|
||||
0x3f8e20d0
|
||||
0x3f733aa3
|
||||
0x3fa52602
|
||||
0x3f0496a5
|
||||
0x3f85bd5b
|
||||
0x3f84bf6c
|
||||
@ -0,0 +1,10 @@
|
||||
0x3f958fd3
|
||||
0x3f4be7a8
|
||||
0x3f953263
|
||||
0x3fd0d3b8
|
||||
0x3f8d47c0
|
||||
0x3f7a2964
|
||||
0x3fa5e499
|
||||
0x3f0abfd6
|
||||
0x3f8373b4
|
||||
0x3f848764
|
||||
@ -0,0 +1,10 @@
|
||||
0x40a940cc
|
||||
0x405a6230
|
||||
0x40938e69
|
||||
0x40e371f8
|
||||
0x40b53f97
|
||||
0x40879207
|
||||
0x40a03983
|
||||
0x403c4bf3
|
||||
0x409ae4e2
|
||||
0x40a31251
|
||||
@ -0,0 +1,10 @@
|
||||
0x3e94c12c
|
||||
0x3e8ded1a
|
||||
0x3eadb603
|
||||
0x3ec1da22
|
||||
0x3ec4e5f2
|
||||
0x3ebb1cf3
|
||||
0x3e8f9730
|
||||
0x3ec29bb2
|
||||
0x3e8974e2
|
||||
0x3ec334d7
|
||||
@ -0,0 +1,10 @@
|
||||
0x4085fede
|
||||
0x4021139b
|
||||
0x40938e65
|
||||
0x40a523cf
|
||||
0x4084cd9b
|
||||
0x4044d53f
|
||||
0x40533b19
|
||||
0x403c4bf1
|
||||
0x407430f5
|
||||
0x40529258
|
||||
@ -0,0 +1,10 @@
|
||||
0x3f0e38e4
|
||||
0x3f19999a
|
||||
0x3f09d89e
|
||||
0x3eeeeeef
|
||||
0x3f313b14
|
||||
0x3f36db6e
|
||||
0x3f000000
|
||||
0x3ecccccd
|
||||
0x3e924925
|
||||
0x3eeeeeef
|
||||
@ -0,0 +1,10 @@
|
||||
0x3ed55555
|
||||
0x3f000000
|
||||
0x3f155555
|
||||
0x3f155555
|
||||
0x3f400000
|
||||
0x3f555555
|
||||
0x3f000000
|
||||
0x3eaaaaab
|
||||
0x3eaaaaab
|
||||
0x3f155555
|
||||
@ -0,0 +1,10 @@
|
||||
0x3f36db6e
|
||||
0x3f400000
|
||||
0x3f333333
|
||||
0x3f22e8ba
|
||||
0x3f51745d
|
||||
0x3f555555
|
||||
0x3f2aaaab
|
||||
0x3f124925
|
||||
0x3ee38e39
|
||||
0x3f22e8ba
|
||||
@ -0,0 +1,10 @@
|
||||
0x3f61e1e2
|
||||
0x3f638e39
|
||||
0x3f579436
|
||||
0x3f4a1af3
|
||||
0x3f679e7a
|
||||
0x3f68ba2f
|
||||
0x3f555555
|
||||
0x3f500000
|
||||
0x3f300000
|
||||
0x3f4a1af3
|
||||
@ -0,0 +1,10 @@
|
||||
0x3f169697
|
||||
0x3f2aaaab
|
||||
0x3f3ca1af
|
||||
0x3f3ca1af
|
||||
0x3f5b6db7
|
||||
0x3f68ba2f
|
||||
0x3f2aaaab
|
||||
0x3f000000
|
||||
0x3f000000
|
||||
0x3f3ca1af
|
||||
@ -0,0 +1,10 @@
|
||||
0x3f555555
|
||||
0x3f555555
|
||||
0x3f400000
|
||||
0x3f2aaaab
|
||||
0x3f555555
|
||||
0x3f555555
|
||||
0x3f400000
|
||||
0x3f400000
|
||||
0x3f155555
|
||||
0x3f2aaaab
|
||||
@ -0,0 +1,10 @@
|
||||
0x3f169697
|
||||
0x3f2aaaab
|
||||
0x3f3ca1af
|
||||
0x3f3ca1af
|
||||
0x3f5b6db7
|
||||
0x3f68ba2f
|
||||
0x3f2aaaab
|
||||
0x3f000000
|
||||
0x3f000000
|
||||
0x3f3ca1af
|
||||
@ -0,0 +1,10 @@
|
||||
0x3f555555
|
||||
0x3f5b6db7
|
||||
0x3f52d2d3
|
||||
0x3f471c72
|
||||
0x3f666666
|
||||
0x3f68ba2f
|
||||
0x3f4ccccd
|
||||
0x3f3a2e8c
|
||||
0x3f1d89d9
|
||||
0x3f471c72
|
||||
@ -0,0 +1,10 @@
|
||||
0x3f124925
|
||||
0x3f800000
|
||||
0x3faaaaab
|
||||
0x3fb6db6e
|
||||
0x3fe8ba2f
|
||||
0x40000000
|
||||
0x3f800000
|
||||
0x3ed79436
|
||||
0x00000000
|
||||
0x3fb6db6e
|
||||
@ -0,0 +1,203 @@
|
||||
import os.path
|
||||
import itertools
|
||||
import Tools
|
||||
import random
|
||||
import numpy as np
|
||||
import scipy.spatial
|
||||
|
||||
NBTESTSAMPLES = 10
|
||||
|
||||
VECDIM = [12,14,20]
|
||||
|
||||
def euclidean(xa,xb):
|
||||
r = scipy.spatial.distance.euclidean(xa,xb)
|
||||
return(r)
|
||||
|
||||
def braycurtis(xa,xb):
|
||||
r = scipy.spatial.distance.braycurtis(xa,xb)
|
||||
return(r)
|
||||
|
||||
def canberra(xa,xb):
|
||||
r = scipy.spatial.distance.canberra(xa,xb)
|
||||
return(r)
|
||||
|
||||
def chebyshev(xa,xb):
|
||||
r = scipy.spatial.distance.chebyshev(xa,xb)
|
||||
return(r)
|
||||
|
||||
def cityblock(xa,xb):
|
||||
r = scipy.spatial.distance.cityblock(xa,xb)
|
||||
return(r)
|
||||
|
||||
def correlation(xa,xb):
|
||||
r = scipy.spatial.distance.correlation (xa,xb)
|
||||
return(r)
|
||||
|
||||
def cosine(xa,xb):
|
||||
r = scipy.spatial.distance.cosine (xa,xb)
|
||||
return(r)
|
||||
|
||||
def jensenshannon(xa,xb):
|
||||
r = scipy.spatial.distance.jensenshannon (xa,xb)
|
||||
return(r)
|
||||
|
||||
def minkowski (xa,xb,dim):
|
||||
r = scipy.spatial.distance.minkowski(xa,xb,p=dim)
|
||||
return(r)
|
||||
|
||||
def dice(xa,xb):
|
||||
r = scipy.spatial.distance.dice (xa,xb)
|
||||
return(r)
|
||||
|
||||
def hamming(xa,xb):
|
||||
r = scipy.spatial.distance.hamming (xa,xb)
|
||||
return(r)
|
||||
|
||||
def jaccard(xa,xb):
|
||||
r = scipy.spatial.distance.jaccard (xa,xb)
|
||||
return(r)
|
||||
|
||||
def kulsinski(xa,xb):
|
||||
r = scipy.spatial.distance.kulsinski (xa,xb)
|
||||
return(r)
|
||||
|
||||
def rogerstanimoto(xa,xb):
|
||||
r = scipy.spatial.distance.rogerstanimoto (xa,xb)
|
||||
return(r)
|
||||
|
||||
def russellrao(xa,xb):
|
||||
r = scipy.spatial.distance.russellrao (xa,xb)
|
||||
return(r)
|
||||
|
||||
def sokalmichener(xa,xb):
|
||||
r = scipy.spatial.distance.sokalmichener (xa,xb)
|
||||
return(r)
|
||||
|
||||
def sokalsneath(xa,xb):
|
||||
r = scipy.spatial.distance.sokalsneath (xa,xb)
|
||||
return(r)
|
||||
|
||||
def yule(xa,xb):
|
||||
r = scipy.spatial.distance.yule (xa,xb)
|
||||
return(r)
|
||||
|
||||
def writeFTest(config,funcList):
|
||||
dims=[]
|
||||
dimsM=[]
|
||||
inputsA=[]
|
||||
inputsB=[]
|
||||
inputsAJ=[]
|
||||
inputsBJ=[]
|
||||
outputs=[]
|
||||
outputMin=[]
|
||||
outputJen=[]
|
||||
for i in range(0,len(funcList)):
|
||||
outputs.append([])
|
||||
|
||||
vecDim = VECDIM[0]
|
||||
|
||||
dims.append(NBTESTSAMPLES)
|
||||
dims.append(vecDim)
|
||||
|
||||
dimsM.append(NBTESTSAMPLES)
|
||||
dimsM.append(vecDim)
|
||||
|
||||
for _ in range(0,NBTESTSAMPLES):
|
||||
normDim = np.random.choice([2,3,4])
|
||||
dimsM.append(normDim)
|
||||
va = np.random.randn(vecDim)
|
||||
# Normalization for distance assuming probability distribution in entry
|
||||
vb = np.random.randn(vecDim)
|
||||
for i in range(0,len(funcList)):
|
||||
func = funcList[i]
|
||||
outputs[i].append(func(va,vb))
|
||||
outputMin.append(minkowski(va,vb,normDim))
|
||||
|
||||
inputsA += list(va)
|
||||
inputsB += list(vb)
|
||||
|
||||
va = np.abs(va)
|
||||
va = va / np.sum(va)
|
||||
|
||||
vb = np.abs(vb)
|
||||
vb = vb / np.sum(vb)
|
||||
|
||||
inputsAJ += list(va)
|
||||
inputsBJ += list(vb)
|
||||
outputJen.append(jensenshannon(va,vb))
|
||||
|
||||
|
||||
inputsA=np.array(inputsA)
|
||||
inputsB=np.array(inputsB)
|
||||
for i in range(0,len(funcList)):
|
||||
outputs[i]=np.array(outputs[i])
|
||||
|
||||
config.writeInput(1, inputsA,"InputA")
|
||||
config.writeInput(1, inputsB,"InputB")
|
||||
config.writeInput(8, inputsAJ,"InputA")
|
||||
config.writeInput(8, inputsBJ,"InputB")
|
||||
config.writeInputS16(1, dims,"Dims")
|
||||
config.writeInputS16(9, dimsM,"Dims")
|
||||
|
||||
for i in range(0,len(funcList)):
|
||||
config.writeReference(i+1, outputs[i],"Ref")
|
||||
|
||||
config.writeReference(8, outputJen,"Ref")
|
||||
config.writeReference(9, outputMin,"Ref")
|
||||
|
||||
def writeBTest(config,funcList):
|
||||
dims=[]
|
||||
inputsA=[]
|
||||
inputsB=[]
|
||||
outputs=[]
|
||||
for i in range(0,len(funcList)):
|
||||
outputs.append([])
|
||||
|
||||
vecDim = VECDIM[0]
|
||||
|
||||
dims.append(NBTESTSAMPLES)
|
||||
dims.append(vecDim)
|
||||
va = np.random.choice([0,1],vecDim)
|
||||
# Number of word32 containing all of our bits
|
||||
pva = Tools.packset(va)
|
||||
dims.append(len(pva))
|
||||
|
||||
for _ in range(0,NBTESTSAMPLES):
|
||||
va = np.random.choice([0,1],vecDim)
|
||||
vb = np.random.choice([0,1],vecDim)
|
||||
# Boolean arrays are packed for the C code
|
||||
pva = Tools.packset(va)
|
||||
pvb = Tools.packset(vb)
|
||||
for i in range(0,len(funcList)):
|
||||
func = funcList[i]
|
||||
outputs[i].append(func(va,vb))
|
||||
|
||||
inputsA += pva
|
||||
inputsB += pvb
|
||||
|
||||
inputsA=np.array(inputsA)
|
||||
inputsB=np.array(inputsB)
|
||||
for i in range(0,len(funcList)):
|
||||
outputs[i]=np.array(outputs[i])
|
||||
|
||||
config.writeInput(1, inputsA,"InputA")
|
||||
config.writeInput(1, inputsB,"InputB")
|
||||
config.writeInputS16(1, dims,"Dims")
|
||||
|
||||
for i in range(0,len(funcList)):
|
||||
config.writeReferenceF32(i+1, outputs[i],"Ref")
|
||||
|
||||
def writeFTests(config):
|
||||
writeFTest(config,[braycurtis,canberra,chebyshev,cityblock,correlation,cosine,euclidean])
|
||||
|
||||
def writeBTests(config):
|
||||
writeBTest(config,[dice,hamming,jaccard,kulsinski,rogerstanimoto,russellrao,sokalmichener,sokalsneath,yule])
|
||||
|
||||
PATTERNDIR = os.path.join("Patterns","DSP","Distance","Distance")
|
||||
PARAMDIR = os.path.join("Parameters","DSP","Distance","Distance")
|
||||
|
||||
configf32=Tools.Config(PATTERNDIR,PARAMDIR,"f32")
|
||||
configu32=Tools.Config(PATTERNDIR,PARAMDIR,"u32")
|
||||
|
||||
writeFTests(configf32)
|
||||
writeBTests(configu32)
|
||||
@ -0,0 +1,6 @@
|
||||
H
|
||||
2
|
||||
// 10
|
||||
0x000A
|
||||
// 12
|
||||
0x000C
|
||||
@ -0,0 +1,26 @@
|
||||
H
|
||||
12
|
||||
// 10
|
||||
0x000A
|
||||
// 12
|
||||
0x000C
|
||||
// 3
|
||||
0x0003
|
||||
// 4
|
||||
0x0004
|
||||
// 2
|
||||
0x0002
|
||||
// 4
|
||||
0x0004
|
||||
// 4
|
||||
0x0004
|
||||
// 3
|
||||
0x0003
|
||||
// 4
|
||||
0x0004
|
||||
// 2
|
||||
0x0002
|
||||
// 3
|
||||
0x0003
|
||||
// 4
|
||||
0x0004
|
||||
@ -0,0 +1,242 @@
|
||||
W
|
||||
120
|
||||
// -0.178487
|
||||
0xbe36c55b
|
||||
// 0.482719
|
||||
0x3ef726ff
|
||||
// 0.128451
|
||||
0x3e0388ca
|
||||
// 0.866186
|
||||
0x3f5dbe58
|
||||
// -1.523149
|
||||
0xbfc2f68b
|
||||
// 0.605613
|
||||
0x3f1b0973
|
||||
// -1.227975
|
||||
0xbf9d2e4d
|
||||
// -0.591868
|
||||
0xbf1784ac
|
||||
// -1.497882
|
||||
0xbfbfba97
|
||||
// -0.282963
|
||||
0xbe90e093
|
||||
// -0.706497
|
||||
0xbf34dcfa
|
||||
// -0.755151
|
||||
0xbf415192
|
||||
// -0.558170
|
||||
0xbf0ee435
|
||||
// -1.027751
|
||||
0xbf838d59
|
||||
// 0.998202
|
||||
0x3f7f8a2b
|
||||
// 0.206976
|
||||
0x3e53f16b
|
||||
// 0.656722
|
||||
0x3f281ef3
|
||||
// 0.426181
|
||||
0x3eda345f
|
||||
// -1.456604
|
||||
0xbfba71fc
|
||||
// 0.008399
|
||||
0x3c099be7
|
||||
// -1.641694
|
||||
0xbfd2230b
|
||||
// -0.404196
|
||||
0xbecef2d1
|
||||
// -0.031733
|
||||
0xbd01fa33
|
||||
// -0.307805
|
||||
0xbe9d98ac
|
||||
// 0.955540
|
||||
0x3f749e40
|
||||
// 0.007134
|
||||
0x3be9c275
|
||||
// -0.446252
|
||||
0xbee47b14
|
||||
// -1.106664
|
||||
0xbf8da729
|
||||
// 0.307716
|
||||
0x3e9d8ce8
|
||||
// -1.823099
|
||||
0xbfe95b51
|
||||
// 0.889152
|
||||
0x3f639f7e
|
||||
// -0.164237
|
||||
0xbe282dc3
|
||||
// 0.568792
|
||||
0x3f119c53
|
||||
// 1.149142
|
||||
0x3f931719
|
||||
// -0.114768
|
||||
0xbdeb0b53
|
||||
// 0.560862
|
||||
0x3f0f94aa
|
||||
// 1.364221
|
||||
0x3fae9ecb
|
||||
// -0.033868
|
||||
0xbd0ab97b
|
||||
// 1.955365
|
||||
0x3ffa4964
|
||||
// -1.071076
|
||||
0xbf891906
|
||||
// -0.080529
|
||||
0xbda4ec98
|
||||
// 0.119819
|
||||
0x3df563d2
|
||||
// 2.041473
|
||||
0x4002a77d
|
||||
// 0.144665
|
||||
0x3e142326
|
||||
// 0.402286
|
||||
0x3ecdf878
|
||||
// 0.558718
|
||||
0x3f0f081f
|
||||
// 0.838104
|
||||
0x3f568dfb
|
||||
// 1.100654
|
||||
0x3f8ce23e
|
||||
// 1.341633
|
||||
0x3fabbaa0
|
||||
// -2.521938
|
||||
0xc021676d
|
||||
// -0.384021
|
||||
0xbec49e5c
|
||||
// -0.333633
|
||||
0xbeaad1f6
|
||||
// 0.295935
|
||||
0x3e9784d6
|
||||
// 0.035576
|
||||
0x3d11b88b
|
||||
// 0.923338
|
||||
0x3f6c5fdc
|
||||
// 2.130540
|
||||
0x40085ac6
|
||||
// 0.200980
|
||||
0x3e4dcdbe
|
||||
// 1.345594
|
||||
0x3fac3c6f
|
||||
// 0.851886
|
||||
0x3f5a1532
|
||||
// 0.833798
|
||||
0x3f5573c7
|
||||
// -0.882113
|
||||
0xbf61d223
|
||||
// 0.715873
|
||||
0x3f37436f
|
||||
// -0.527723
|
||||
0xbf0718df
|
||||
// 0.916126
|
||||
0x3f6a8738
|
||||
// 0.552950
|
||||
0x3f0d8e24
|
||||
// -0.812670
|
||||
0xbf500b27
|
||||
// 0.263209
|
||||
0x3e86c34a
|
||||
// 0.655730
|
||||
0x3f27dde6
|
||||
// -0.100891
|
||||
0xbdcea002
|
||||
// 0.622843
|
||||
0x3f1f72a8
|
||||
// -0.011502
|
||||
0xbc3c733b
|
||||
// -0.748668
|
||||
0xbf3fa8bb
|
||||
// -0.635873
|
||||
0xbf22c894
|
||||
// 0.559467
|
||||
0x3f0f393d
|
||||
// -0.009196
|
||||
0xbc16abfd
|
||||
// 1.304398
|
||||
0x3fa6f683
|
||||
// 0.992219
|
||||
0x3f7e0217
|
||||
// -1.385024
|
||||
0xbfb14875
|
||||
// 1.137760
|
||||
0x3f91a21c
|
||||
// 0.475164
|
||||
0x3ef348ba
|
||||
// -0.788306
|
||||
0xbf49ce74
|
||||
// -0.979564
|
||||
0xbf7ac4b3
|
||||
// -0.701340
|
||||
0xbf338b0b
|
||||
// -0.659470
|
||||
0xbf28d307
|
||||
// -0.959309
|
||||
0xbf75954a
|
||||
// -0.931897
|
||||
0xbf6e90cd
|
||||
// -0.118577
|
||||
0xbdf2d850
|
||||
// 0.172273
|
||||
0x3e306868
|
||||
// -0.915819
|
||||
0xbf6a731f
|
||||
// -0.234015
|
||||
0xbe6fa1b7
|
||||
// 0.536514
|
||||
0x3f0958fc
|
||||
// -0.522399
|
||||
0xbf05bbf5
|
||||
// -0.042109
|
||||
0xbd2c7a8f
|
||||
// 1.030601
|
||||
0x3f83eabc
|
||||
// 0.073388
|
||||
0x3d964c81
|
||||
// 1.004056
|
||||
0x3f8084e7
|
||||
// 0.424424
|
||||
0x3ed94e18
|
||||
// -1.192672
|
||||
0xbf98a97c
|
||||
// -0.667152
|
||||
0xbf2aca76
|
||||
// 0.704874
|
||||
0x3f34729b
|
||||
// -0.428180
|
||||
0xbedb3a74
|
||||
// -0.411661
|
||||
0xbed2c538
|
||||
// 0.377093
|
||||
0x3ec11263
|
||||
// 2.336006
|
||||
0x40158120
|
||||
// 0.282322
|
||||
0x3e908c7b
|
||||
// -2.082379
|
||||
0xc00545b2
|
||||
// 0.590898
|
||||
0x3f174510
|
||||
// -0.700579
|
||||
0xbf335928
|
||||
// -2.064212
|
||||
0xc0041c0e
|
||||
// -0.482730
|
||||
0xbef72861
|
||||
// -0.850502
|
||||
0xbf59ba7a
|
||||
// 2.296297
|
||||
0x4012f688
|
||||
// 0.552692
|
||||
0x3f0d7d34
|
||||
// 1.610890
|
||||
0x3fce31a1
|
||||
// -1.047689
|
||||
0xbf861ab0
|
||||
// -0.525026
|
||||
0xbf066816
|
||||
// 0.064286
|
||||
0x3d83a859
|
||||
// 0.472272
|
||||
0x3ef1cd9d
|
||||
// -0.279714
|
||||
0xbe8f36b4
|
||||
// 0.495461
|
||||
0x3efdad15
|
||||
@ -0,0 +1,242 @@
|
||||
W
|
||||
120
|
||||
// 0.020175
|
||||
0x3ca54615
|
||||
// 0.054563
|
||||
0x3d5f7de3
|
||||
// 0.014519
|
||||
0x3c6de266
|
||||
// 0.097908
|
||||
0x3dc883f2
|
||||
// 0.172167
|
||||
0x3e304c78
|
||||
// 0.068454
|
||||
0x3d8c31de
|
||||
// 0.138802
|
||||
0x3e0e222d
|
||||
// 0.066901
|
||||
0x3d890353
|
||||
// 0.169311
|
||||
0x3e2d5fc8
|
||||
// 0.031984
|
||||
0x3d0301fb
|
||||
// 0.079858
|
||||
0x3da38c75
|
||||
// 0.085357
|
||||
0x3daecfcd
|
||||
// 0.072260
|
||||
0x3d93fd33
|
||||
// 0.133052
|
||||
0x3e083ec7
|
||||
// 0.129227
|
||||
0x3e0453f9
|
||||
// 0.026795
|
||||
0x3cdb810a
|
||||
// 0.085019
|
||||
0x3dae1e5a
|
||||
// 0.055173
|
||||
0x3d61fd2c
|
||||
// 0.188571
|
||||
0x3e4118bd
|
||||
// 0.001087
|
||||
0x3a8e84a6
|
||||
// 0.212533
|
||||
0x3e59a22b
|
||||
// 0.052327
|
||||
0x3d5654d2
|
||||
// 0.004108
|
||||
0x3b869d3f
|
||||
// 0.039848
|
||||
0x3d2337f5
|
||||
// 0.118065
|
||||
0x3df1cbe7
|
||||
// 0.000881
|
||||
0x3a67102d
|
||||
// 0.055138
|
||||
0x3d61d861
|
||||
// 0.136737
|
||||
0x3e0c04dd
|
||||
// 0.038021
|
||||
0x3d1bbbaa
|
||||
// 0.225259
|
||||
0x3e66aa39
|
||||
// 0.109862
|
||||
0x3de0ff55
|
||||
// 0.020293
|
||||
0x3ca63d23
|
||||
// 0.070279
|
||||
0x3d8fee57
|
||||
// 0.141986
|
||||
0x3e1164bf
|
||||
// 0.014180
|
||||
0x3c68553f
|
||||
// 0.069299
|
||||
0x3d8decad
|
||||
// 0.140485
|
||||
0x3e0fdb5c
|
||||
// 0.003488
|
||||
0x3b6491e9
|
||||
// 0.201360
|
||||
0x3e4e3160
|
||||
// 0.110298
|
||||
0x3de1e3bc
|
||||
// 0.008293
|
||||
0x3c07de75
|
||||
// 0.012339
|
||||
0x3c4a28a7
|
||||
// 0.210227
|
||||
0x3e5745df
|
||||
// 0.014897
|
||||
0x3c741436
|
||||
// 0.041427
|
||||
0x3d29af21
|
||||
// 0.057536
|
||||
0x3d6baaaf
|
||||
// 0.086307
|
||||
0x3db0c17e
|
||||
// 0.113344
|
||||
0x3de820ac
|
||||
// 0.119801
|
||||
0x3df55a12
|
||||
// 0.225196
|
||||
0x3e6699b2
|
||||
// 0.034291
|
||||
0x3d0c74bc
|
||||
// 0.029792
|
||||
0x3cf40daa
|
||||
// 0.026425
|
||||
0x3cd87a35
|
||||
// 0.003177
|
||||
0x3b503192
|
||||
// 0.082449
|
||||
0x3da8db1c
|
||||
// 0.190246
|
||||
0x3e42cfd7
|
||||
// 0.017946
|
||||
0x3c930476
|
||||
// 0.120154
|
||||
0x3df61388
|
||||
// 0.076069
|
||||
0x3d9bca03
|
||||
// 0.074454
|
||||
0x3d987b33
|
||||
// 0.129526
|
||||
0x3e04a28b
|
||||
// 0.105116
|
||||
0x3dd7472b
|
||||
// 0.077489
|
||||
0x3d9eb28f
|
||||
// 0.134521
|
||||
0x3e09bfc9
|
||||
// 0.081193
|
||||
0x3da648a4
|
||||
// 0.119330
|
||||
0x3df46315
|
||||
// 0.038649
|
||||
0x3d1e4e06
|
||||
// 0.096285
|
||||
0x3dc53114
|
||||
// 0.014814
|
||||
0x3c72b880
|
||||
// 0.091456
|
||||
0x3dbb4d56
|
||||
// 0.001689
|
||||
0x3add5eec
|
||||
// 0.109932
|
||||
0x3de123ee
|
||||
// 0.066046
|
||||
0x3d8742f1
|
||||
// 0.058110
|
||||
0x3d6e0464
|
||||
// 0.000955
|
||||
0x3a7a6523
|
||||
// 0.135483
|
||||
0x3e0abbfa
|
||||
// 0.103058
|
||||
0x3dd3100a
|
||||
// 0.143857
|
||||
0x3e134f3f
|
||||
// 0.118175
|
||||
0x3df2058b
|
||||
// 0.049353
|
||||
0x3d4a26d7
|
||||
// 0.081878
|
||||
0x3da7afd0
|
||||
// 0.101743
|
||||
0x3dd05ee0
|
||||
// 0.072845
|
||||
0x3d953002
|
||||
// 0.068497
|
||||
0x3d8c47ee
|
||||
// 0.146662
|
||||
0x3e162e88
|
||||
// 0.142471
|
||||
0x3e11e3ec
|
||||
// 0.018128
|
||||
0x3c9481dd
|
||||
// 0.026338
|
||||
0x3cd7c200
|
||||
// 0.140013
|
||||
0x3e0f5f91
|
||||
// 0.035777
|
||||
0x3d128ad2
|
||||
// 0.082024
|
||||
0x3da7fc14
|
||||
// 0.079866
|
||||
0x3da390b7
|
||||
// 0.006438
|
||||
0x3bd2f3c9
|
||||
// 0.157561
|
||||
0x3e2157b8
|
||||
// 0.011220
|
||||
0x3c37d32b
|
||||
// 0.153503
|
||||
0x3e1d2fdc
|
||||
// 0.041617
|
||||
0x3d2a76fa
|
||||
// 0.116949
|
||||
0x3def82df
|
||||
// 0.065418
|
||||
0x3d85fa0b
|
||||
// 0.069117
|
||||
0x3d8d8d51
|
||||
// 0.041986
|
||||
0x3d2bf935
|
||||
// 0.040366
|
||||
0x3d2556b1
|
||||
// 0.036976
|
||||
0x3d17747c
|
||||
// 0.229060
|
||||
0x3e6a8ea3
|
||||
// 0.027683
|
||||
0x3ce2c844
|
||||
// 0.204190
|
||||
0x3e511730
|
||||
// 0.057941
|
||||
0x3d6d53ae
|
||||
// 0.068696
|
||||
0x3d8cb089
|
||||
// 0.192167
|
||||
0x3e44c763
|
||||
// 0.044940
|
||||
0x3d38127f
|
||||
// 0.079177
|
||||
0x3da22793
|
||||
// 0.213773
|
||||
0x3e5ae73a
|
||||
// 0.051453
|
||||
0x3d52bfef
|
||||
// 0.149965
|
||||
0x3e19906d
|
||||
// 0.097534
|
||||
0x3dc7bffc
|
||||
// 0.048877
|
||||
0x3d483345
|
||||
// 0.005985
|
||||
0x3bc41b0c
|
||||
// 0.043966
|
||||
0x3d34159c
|
||||
// 0.026040
|
||||
0x3cd5518c
|
||||
// 0.046125
|
||||
0x3d3ced46
|
||||
@ -0,0 +1,242 @@
|
||||
W
|
||||
120
|
||||
// -0.828562
|
||||
0xbf541c9c
|
||||
// 2.004161
|
||||
0x4000442d
|
||||
// 0.735416
|
||||
0x3f3c443d
|
||||
// 1.458402
|
||||
0x3fbaacec
|
||||
// 0.698616
|
||||
0x3f32d884
|
||||
// -1.003043
|
||||
0xbf8063b3
|
||||
// 0.226180
|
||||
0x3e679bb8
|
||||
// -0.389370
|
||||
0xbec75b7c
|
||||
// 2.176395
|
||||
0x400b4a10
|
||||
// -0.550549
|
||||
0xbf0cf0cf
|
||||
// -0.925676
|
||||
0xbf6cf916
|
||||
// 0.349005
|
||||
0x3eb2b0d4
|
||||
// 1.570787
|
||||
0x3fc90f88
|
||||
// 1.019942
|
||||
0x3f828d76
|
||||
// 0.916706
|
||||
0x3f6aad3d
|
||||
// 0.182143
|
||||
0x3e3a83b4
|
||||
// 0.067746
|
||||
0x3d8abe32
|
||||
// -0.555449
|
||||
0xbf0e31ed
|
||||
// -0.552240
|
||||
0xbf0d5fa1
|
||||
// 0.133172
|
||||
0x3e085e4d
|
||||
// -0.946715
|
||||
0xbf725bea
|
||||
// -0.302952
|
||||
0xbe9b1c90
|
||||
// 0.426966
|
||||
0x3eda9b58
|
||||
// -0.558919
|
||||
0xbf0f1549
|
||||
// -0.467335
|
||||
0xbeef4690
|
||||
// -0.723536
|
||||
0xbf3939ae
|
||||
// -0.093326
|
||||
0xbdbf21a3
|
||||
// -1.745742
|
||||
0xbfdf7478
|
||||
// 1.046713
|
||||
0x3f85faaf
|
||||
// 0.781418
|
||||
0x3f480b04
|
||||
// -0.985286
|
||||
0xbf7c3bb4
|
||||
// -0.471733
|
||||
0xbef1870a
|
||||
// -0.374430
|
||||
0xbebfb543
|
||||
// -0.577605
|
||||
0xbf13dde4
|
||||
// -1.409534
|
||||
0xbfb46b9d
|
||||
// -0.737478
|
||||
0xbf3ccb58
|
||||
// -1.680687
|
||||
0xbfd720c4
|
||||
// -0.617566
|
||||
0xbf1e18c6
|
||||
// -2.852123
|
||||
0xc036892d
|
||||
// -0.133018
|
||||
0xbe0835d3
|
||||
// 0.710461
|
||||
0x3f35e0c4
|
||||
// 1.106881
|
||||
0x3f8dae47
|
||||
// 0.019177
|
||||
0x3c9d19f5
|
||||
// 0.208392
|
||||
0x3e5564b0
|
||||
// -0.635991
|
||||
0xbf22d04f
|
||||
// -0.863174
|
||||
0xbf5cf8f2
|
||||
// 0.586601
|
||||
0x3f162b83
|
||||
// -1.738018
|
||||
0xbfde775f
|
||||
// 1.051694
|
||||
0x3f869de5
|
||||
// 1.450912
|
||||
0x3fb9b77a
|
||||
// 0.168458
|
||||
0x3e2c8020
|
||||
// -0.217289
|
||||
0xbe5e80e9
|
||||
// -1.407255
|
||||
0xbfb420ee
|
||||
// -1.815471
|
||||
0xbfe86159
|
||||
// 1.098959
|
||||
0x3f8caab3
|
||||
// 0.188220
|
||||
0x3e40bca1
|
||||
// -0.647777
|
||||
0xbf25d4bf
|
||||
// -0.314524
|
||||
0xbea10947
|
||||
// -0.637166
|
||||
0xbf231d4e
|
||||
// 1.098990
|
||||
0x3f8cabb6
|
||||
// -0.099688
|
||||
0xbdcc2931
|
||||
// 0.604458
|
||||
0x3f1abdcb
|
||||
// 1.483376
|
||||
0x3fbddf40
|
||||
// 0.080634
|
||||
0x3da52334
|
||||
// -1.293237
|
||||
0xbfa588c8
|
||||
// -1.531264
|
||||
0xbfc40077
|
||||
// 0.916514
|
||||
0x3f6aa0a9
|
||||
// -0.833330
|
||||
0xbf55551e
|
||||
// -1.782696
|
||||
0xbfe42f65
|
||||
// -1.045796
|
||||
0xbf85dca6
|
||||
// 0.614467
|
||||
0x3f1d4db0
|
||||
// -0.837290
|
||||
0xbf56589d
|
||||
// -0.030267
|
||||
0xbcf7f2c2
|
||||
// 0.697974
|
||||
0x3f32ae6b
|
||||
// -0.253202
|
||||
0xbe81a3ba
|
||||
// 0.185480
|
||||
0x3e3dee79
|
||||
// -1.107341
|
||||
0xbf8dbd58
|
||||
// 1.436646
|
||||
0x3fb7e401
|
||||
// 1.617052
|
||||
0x3fcefb8c
|
||||
// -1.258732
|
||||
0xbfa11e21
|
||||
// 0.243038
|
||||
0x3e78defd
|
||||
// 1.121516
|
||||
0x3f8f8dd5
|
||||
// 0.745664
|
||||
0x3f3ee3d0
|
||||
// -0.218248
|
||||
0xbe5f7c70
|
||||
// -1.296925
|
||||
0xbfa601a8
|
||||
// 0.313480
|
||||
0x3ea08083
|
||||
// 1.367711
|
||||
0x3faf1126
|
||||
// 0.456621
|
||||
0x3ee9ca48
|
||||
// -0.681353
|
||||
0xbf2e6d25
|
||||
// -0.235936
|
||||
0xbe719956
|
||||
// 1.364807
|
||||
0x3faeb203
|
||||
// 0.129441
|
||||
0x3e048c19
|
||||
// 0.515201
|
||||
0x3f03e43e
|
||||
// 0.607140
|
||||
0x3f1b6d89
|
||||
// -1.636634
|
||||
0xbfd17d3b
|
||||
// 0.655813
|
||||
0x3f27e358
|
||||
// -0.175897
|
||||
0xbe341e71
|
||||
// -0.716399
|
||||
0xbf3765f0
|
||||
// -0.608448
|
||||
0xbf1bc344
|
||||
// 1.456762
|
||||
0x3fba772c
|
||||
// 0.941742
|
||||
0x3f7115fe
|
||||
// -0.975837
|
||||
0xbf79d06e
|
||||
// 0.072625
|
||||
0x3d94bc56
|
||||
// -1.034785
|
||||
0xbf8473d7
|
||||
// -0.597662
|
||||
0xbf190068
|
||||
// -0.658336
|
||||
0xbf2888bb
|
||||
// -1.309196
|
||||
0xbfa793b9
|
||||
// 0.786471
|
||||
0x3f495622
|
||||
// 0.409138
|
||||
0x3ed17a89
|
||||
// 1.519091
|
||||
0x3fc2718f
|
||||
// 0.185946
|
||||
0x3e3e68ad
|
||||
// -0.341489
|
||||
0xbeaed799
|
||||
// -0.954036
|
||||
0xbf743bb8
|
||||
// 1.565450
|
||||
0x3fc860aa
|
||||
// 0.427405
|
||||
0x3edad4cf
|
||||
// -1.080225
|
||||
0xbf8a44d0
|
||||
// -0.910396
|
||||
0xbf690fbc
|
||||
// 0.956431
|
||||
0x3f74d8a6
|
||||
// 0.011845
|
||||
0x3c421151
|
||||
// -0.841074
|
||||
0xbf57509c
|
||||
@ -0,0 +1,242 @@
|
||||
W
|
||||
120
|
||||
// 0.073031
|
||||
0x3d959128
|
||||
// 0.176650
|
||||
0x3e34e3c0
|
||||
// 0.064821
|
||||
0x3d84c0c4
|
||||
// 0.128546
|
||||
0x3e03a18d
|
||||
// 0.061577
|
||||
0x3d7c385b
|
||||
// 0.088410
|
||||
0x3db51034
|
||||
// 0.019936
|
||||
0x3ca3508e
|
||||
// 0.034320
|
||||
0x3d0c92d0
|
||||
// 0.191831
|
||||
0x3e446f5c
|
||||
// 0.048526
|
||||
0x3d46c38c
|
||||
// 0.081591
|
||||
0x3da718f6
|
||||
// 0.030762
|
||||
0x3cfc0062
|
||||
// 0.217147
|
||||
0x3e5e5bdd
|
||||
// 0.140998
|
||||
0x3e1061c3
|
||||
// 0.126726
|
||||
0x3e01c495
|
||||
// 0.025180
|
||||
0x3cce4592
|
||||
// 0.009365
|
||||
0x3c19709a
|
||||
// 0.076786
|
||||
0x3d9d41f2
|
||||
// 0.076342
|
||||
0x3d9c595f
|
||||
// 0.018410
|
||||
0x3c96d050
|
||||
// 0.130875
|
||||
0x3e060415
|
||||
// 0.041880
|
||||
0x3d2b8ada
|
||||
// 0.059024
|
||||
0x3d71c37d
|
||||
// 0.077266
|
||||
0x3d9e3d64
|
||||
// 0.049642
|
||||
0x3d4b5544
|
||||
// 0.076856
|
||||
0x3d9d66e1
|
||||
// 0.009913
|
||||
0x3c226bb7
|
||||
// 0.185438
|
||||
0x3e3de38d
|
||||
// 0.111185
|
||||
0x3de3b514
|
||||
// 0.083005
|
||||
0x3da9fe66
|
||||
// 0.104660
|
||||
0x3dd65820
|
||||
// 0.050109
|
||||
0x3d4d3f26
|
||||
// 0.039773
|
||||
0x3d22e92b
|
||||
// 0.061355
|
||||
0x3d7b4f68
|
||||
// 0.149725
|
||||
0x3e195195
|
||||
// 0.078337
|
||||
0x3da06f4b
|
||||
// 0.150706
|
||||
0x3e1a52b1
|
||||
// 0.055377
|
||||
0x3d62d2a5
|
||||
// 0.255748
|
||||
0x3e82f161
|
||||
// 0.011928
|
||||
0x3c436c0c
|
||||
// 0.063707
|
||||
0x3d827892
|
||||
// 0.099253
|
||||
0x3dcb454a
|
||||
// 0.001720
|
||||
0x3ae1650e
|
||||
// 0.018686
|
||||
0x3c991422
|
||||
// 0.057029
|
||||
0x3d69971b
|
||||
// 0.077400
|
||||
0x3d9e83fc
|
||||
// 0.052600
|
||||
0x3d57733f
|
||||
// 0.155847
|
||||
0x3e1f9652
|
||||
// 0.104162
|
||||
0x3dd552de
|
||||
// 0.143701
|
||||
0x3e132675
|
||||
// 0.016684
|
||||
0x3c88adb4
|
||||
// 0.021521
|
||||
0x3cb04c3d
|
||||
// 0.139378
|
||||
0x3e0eb8fb
|
||||
// 0.179808
|
||||
0x3e381f9d
|
||||
// 0.108843
|
||||
0x3ddee938
|
||||
// 0.018642
|
||||
0x3c98b668
|
||||
// 0.064157
|
||||
0x3d8364e2
|
||||
// 0.031151
|
||||
0x3cff30a1
|
||||
// 0.063106
|
||||
0x3d813ddc
|
||||
// 0.108846
|
||||
0x3ddeead3
|
||||
// 0.008963
|
||||
0x3c12d790
|
||||
// 0.054344
|
||||
0x3d5e982c
|
||||
// 0.133364
|
||||
0x3e08909a
|
||||
// 0.007249
|
||||
0x3bed8c99
|
||||
// 0.116270
|
||||
0x3dee1eb7
|
||||
// 0.137670
|
||||
0x3e0cf941
|
||||
// 0.082400
|
||||
0x3da8c14e
|
||||
// 0.074921
|
||||
0x3d99704d
|
||||
// 0.160275
|
||||
0x3e241f14
|
||||
// 0.094023
|
||||
0x3dc08f38
|
||||
// 0.055244
|
||||
0x3d6247ad
|
||||
// 0.075277
|
||||
0x3d9a2af1
|
||||
// 0.003395
|
||||
0x3b5e7ef2
|
||||
// 0.078291
|
||||
0x3da056de
|
||||
// 0.028401
|
||||
0x3ce8a9e2
|
||||
// 0.020805
|
||||
0x3caa6f47
|
||||
// 0.124209
|
||||
0x3dfe612a
|
||||
// 0.161146
|
||||
0x3e25038e
|
||||
// 0.181382
|
||||
0x3e39bc45
|
||||
// 0.141190
|
||||
0x3e109421
|
||||
// 0.027261
|
||||
0x3cdf52ed
|
||||
// 0.125799
|
||||
0x3e00d163
|
||||
// 0.083640
|
||||
0x3dab4b6f
|
||||
// 0.024481
|
||||
0x3cc88b77
|
||||
// 0.140041
|
||||
0x3e0f66d1
|
||||
// 0.033849
|
||||
0x3d0aa58e
|
||||
// 0.147684
|
||||
0x3e173a78
|
||||
// 0.049306
|
||||
0x3d49f490
|
||||
// 0.073572
|
||||
0x3d96accc
|
||||
// 0.025476
|
||||
0x3cd0b369
|
||||
// 0.147370
|
||||
0x3e16e849
|
||||
// 0.013977
|
||||
0x3c64ff3d
|
||||
// 0.055631
|
||||
0x3d63dd3d
|
||||
// 0.065558
|
||||
0x3d864375
|
||||
// 0.176722
|
||||
0x3e34f6a0
|
||||
// 0.070814
|
||||
0x3d9106ea
|
||||
// 0.018844
|
||||
0x3c9a5fbc
|
||||
// 0.076750
|
||||
0x3d9d2f3d
|
||||
// 0.065185
|
||||
0x3d857fc5
|
||||
// 0.156068
|
||||
0x3e1fd03d
|
||||
// 0.100892
|
||||
0x3dcea073
|
||||
// 0.104545
|
||||
0x3dd61b83
|
||||
// 0.007781
|
||||
0x3bfef3f0
|
||||
// 0.110860
|
||||
0x3de30a94
|
||||
// 0.064030
|
||||
0x3d8321f2
|
||||
// 0.070530
|
||||
0x3d9071ec
|
||||
// 0.140259
|
||||
0x3e0f9fef
|
||||
// 0.084257
|
||||
0x3dac8f0f
|
||||
// 0.044459
|
||||
0x3d361af9
|
||||
// 0.165073
|
||||
0x3e2908f5
|
||||
// 0.020206
|
||||
0x3ca5870c
|
||||
// 0.037108
|
||||
0x3d17feb6
|
||||
// 0.103671
|
||||
0x3dd45188
|
||||
// 0.170111
|
||||
0x3e2e318e
|
||||
// 0.046444
|
||||
0x3d3e3c61
|
||||
// 0.117384
|
||||
0x3df066c7
|
||||
// 0.098929
|
||||
0x3dca9b46
|
||||
// 0.103931
|
||||
0x3dd4d9f5
|
||||
// 0.001287
|
||||
0x3aa8b54a
|
||||
// 0.091396
|
||||
0x3dbb2dd0
|
||||
@ -0,0 +1,22 @@
|
||||
W
|
||||
10
|
||||
// 1.050994
|
||||
0x3f8686fa
|
||||
// 0.770592
|
||||
0x3f454585
|
||||
// 1.367209
|
||||
0x3faf00b2
|
||||
// 1.890327
|
||||
0x3ff1f63e
|
||||
// 0.985315
|
||||
0x3f7c3d9c
|
||||
// 0.948532
|
||||
0x3f72d302
|
||||
// 1.586398
|
||||
0x3fcb0f1a
|
||||
// 0.561266
|
||||
0x3f0faf1e
|
||||
// 1.006152
|
||||
0x3f80c998
|
||||
// 1.058311
|
||||
0x3f8776bb
|
||||
@ -0,0 +1,22 @@
|
||||
W
|
||||
10
|
||||
// 7.876377
|
||||
0x40fc0b49
|
||||
// 6.952287
|
||||
0x40de7923
|
||||
// 9.756665
|
||||
0x411c1b4d
|
||||
// 9.818140
|
||||
0x411d171a
|
||||
// 8.394031
|
||||
0x41064df4
|
||||
// 8.528627
|
||||
0x41087542
|
||||
// 9.376871
|
||||
0x411607aa
|
||||
// 6.656672
|
||||
0x40d50375
|
||||
// 8.246555
|
||||
0x4103f1e3
|
||||
// 9.699050
|
||||
0x411b2f4f
|
||||
@ -0,0 +1,22 @@
|
||||
W
|
||||
10
|
||||
// 3.674277
|
||||
0x406b275c
|
||||
// 2.128956
|
||||
0x400840d2
|
||||
// 2.604517
|
||||
0x4026b06a
|
||||
// 4.807487
|
||||
0x4099d6ef
|
||||
// 3.972849
|
||||
0x407e432a
|
||||
// 2.011099
|
||||
0x4000b5d8
|
||||
// 2.821669
|
||||
0x4034963b
|
||||
// 1.710022
|
||||
0x3fdae203
|
||||
// 3.370791
|
||||
0x4057bb0c
|
||||
// 2.637786
|
||||
0x4028d17b
|
||||
@ -0,0 +1,22 @@
|
||||
W
|
||||
10
|
||||
// 14.122970
|
||||
0x4161f7b0
|
||||
// 8.388757
|
||||
0x41063859
|
||||
// 13.934073
|
||||
0x415ef1f6
|
||||
// 18.788568
|
||||
0x41964efd
|
||||
// 14.866911
|
||||
0x416ddede
|
||||
// 12.512610
|
||||
0x414833a7
|
||||
// 14.262105
|
||||
0x41643195
|
||||
// 8.109187
|
||||
0x4101bf3b
|
||||
// 13.187713
|
||||
0x415300e0
|
||||
// 14.818801
|
||||
0x416d19cf
|
||||
@ -0,0 +1,22 @@
|
||||
W
|
||||
10
|
||||
// 1.042156
|
||||
0x3f85655d
|
||||
// 0.728789
|
||||
0x3f3a91f0
|
||||
// 1.147441
|
||||
0x3f92df5b
|
||||
// 1.532731
|
||||
0x3fc43088
|
||||
// 1.110376
|
||||
0x3f8e20d0
|
||||
// 0.950113
|
||||
0x3f733aa3
|
||||
// 1.290222
|
||||
0x3fa52601
|
||||
// 0.517924
|
||||
0x3f0496a5
|
||||
// 1.044841
|
||||
0x3f85bd5c
|
||||
// 1.037092
|
||||
0x3f84bf6c
|
||||
@ -0,0 +1,22 @@
|
||||
W
|
||||
10
|
||||
// 1.168452
|
||||
0x3f958fd3
|
||||
// 0.796504
|
||||
0x3f4be7a9
|
||||
// 1.165600
|
||||
0x3f953263
|
||||
// 1.631461
|
||||
0x3fd0d3b9
|
||||
// 1.103752
|
||||
0x3f8d47c0
|
||||
// 0.977194
|
||||
0x3f7a2964
|
||||
// 1.296039
|
||||
0x3fa5e499
|
||||
// 0.541990
|
||||
0x3f0abfd6
|
||||
// 1.026969
|
||||
0x3f8373b4
|
||||
// 1.035382
|
||||
0x3f848764
|
||||
@ -0,0 +1,22 @@
|
||||
W
|
||||
10
|
||||
// 5.289160
|
||||
0x40a940cc
|
||||
// 3.412243
|
||||
0x405a6230
|
||||
// 4.611134
|
||||
0x40938e69
|
||||
// 7.107662
|
||||
0x40e371f8
|
||||
// 5.664012
|
||||
0x40b53f97
|
||||
// 4.236576
|
||||
0x40879207
|
||||
// 5.007020
|
||||
0x40a03983
|
||||
// 2.942135
|
||||
0x403c4bf3
|
||||
// 4.840440
|
||||
0x409ae4e2
|
||||
// 5.095986
|
||||
0x40a31252
|
||||
@ -0,0 +1,22 @@
|
||||
W
|
||||
10
|
||||
// 0.290537
|
||||
0x3e94c137
|
||||
// 0.277200
|
||||
0x3e8ded1c
|
||||
// 0.339279
|
||||
0x3eadb5f6
|
||||
// 0.378618
|
||||
0x3ec1da33
|
||||
// 0.384567
|
||||
0x3ec4e5f9
|
||||
// 0.365455
|
||||
0x3ebb1cf2
|
||||
// 0.280450
|
||||
0x3e8f972a
|
||||
// 0.380094
|
||||
0x3ec29ba8
|
||||
// 0.268470
|
||||
0x3e8974dc
|
||||
// 0.381263
|
||||
0x3ec334e3
|
||||
@ -0,0 +1,22 @@
|
||||
W
|
||||
10
|
||||
// 4.187354
|
||||
0x4085fece
|
||||
// 2.516821
|
||||
0x40211399
|
||||
// 4.611134
|
||||
0x40938e69
|
||||
// 5.160622
|
||||
0x40a523d0
|
||||
// 4.150105
|
||||
0x4084cda9
|
||||
// 3.075515
|
||||
0x4044d53c
|
||||
// 3.300479
|
||||
0x40533b0b
|
||||
// 2.942135
|
||||
0x403c4bf3
|
||||
// 3.815488
|
||||
0x407430f5
|
||||
// 3.290184
|
||||
0x40529260
|
||||
@ -0,0 +1,8 @@
|
||||
H
|
||||
3
|
||||
// 10
|
||||
0x000A
|
||||
// 12
|
||||
0x000C
|
||||
// 1
|
||||
0x0001
|
||||
@ -0,0 +1,22 @@
|
||||
W
|
||||
10
|
||||
// 0x43000000
|
||||
0x43000000
|
||||
// 0xC8E00000
|
||||
0xC8E00000
|
||||
// 0x6C700000
|
||||
0x6C700000
|
||||
// 0xF8200000
|
||||
0xF8200000
|
||||
// 0x38D00000
|
||||
0x38D00000
|
||||
// 0xD8F00000
|
||||
0xD8F00000
|
||||
// 0x4B300000
|
||||
0x4B300000
|
||||
// 0x90E00000
|
||||
0x90E00000
|
||||
// 0x69400000
|
||||
0x69400000
|
||||
// 0xFEC00000
|
||||
0xFEC00000
|
||||
@ -0,0 +1,22 @@
|
||||
W
|
||||
10
|
||||
// 0x46D00000
|
||||
0x46D00000
|
||||
// 0xA1200000
|
||||
0xA1200000
|
||||
// 0xAB400000
|
||||
0xAB400000
|
||||
// 0xDDD00000
|
||||
0xDDD00000
|
||||
// 0xDF000000
|
||||
0xDF000000
|
||||
// 0x37400000
|
||||
0x37400000
|
||||
// 0xC0F00000
|
||||
0xC0F00000
|
||||
// 0x03E00000
|
||||
0x03E00000
|
||||
// 0xEF500000
|
||||
0xEF500000
|
||||
// 0x67100000
|
||||
0x67100000
|
||||
@ -0,0 +1,22 @@
|
||||
W
|
||||
10
|
||||
// 0.555556
|
||||
0x3f0e38e4
|
||||
// 0.600000
|
||||
0x3f19999a
|
||||
// 0.538462
|
||||
0x3f09d89e
|
||||
// 0.466667
|
||||
0x3eeeeeef
|
||||
// 0.692308
|
||||
0x3f313b14
|
||||
// 0.714286
|
||||
0x3f36db6e
|
||||
// 0.500000
|
||||
0x3f000000
|
||||
// 0.400000
|
||||
0x3ecccccd
|
||||
// 0.285714
|
||||
0x3e924925
|
||||
// 0.466667
|
||||
0x3eeeeeef
|
||||
@ -0,0 +1,22 @@
|
||||
W
|
||||
10
|
||||
// 0.416667
|
||||
0x3ed55555
|
||||
// 0.500000
|
||||
0x3f000000
|
||||
// 0.583333
|
||||
0x3f155555
|
||||
// 0.583333
|
||||
0x3f155555
|
||||
// 0.750000
|
||||
0x3f400000
|
||||
// 0.833333
|
||||
0x3f555555
|
||||
// 0.500000
|
||||
0x3f000000
|
||||
// 0.333333
|
||||
0x3eaaaaab
|
||||
// 0.333333
|
||||
0x3eaaaaab
|
||||
// 0.583333
|
||||
0x3f155555
|
||||
@ -0,0 +1,22 @@
|
||||
W
|
||||
10
|
||||
// 0.714286
|
||||
0x3f36db6e
|
||||
// 0.750000
|
||||
0x3f400000
|
||||
// 0.700000
|
||||
0x3f333333
|
||||
// 0.636364
|
||||
0x3f22e8ba
|
||||
// 0.818182
|
||||
0x3f51745d
|
||||
// 0.833333
|
||||
0x3f555555
|
||||
// 0.666667
|
||||
0x3f2aaaab
|
||||
// 0.571429
|
||||
0x3f124925
|
||||
// 0.444444
|
||||
0x3ee38e39
|
||||
// 0.636364
|
||||
0x3f22e8ba
|
||||
@ -0,0 +1,22 @@
|
||||
W
|
||||
10
|
||||
// 0.882353
|
||||
0x3f61e1e2
|
||||
// 0.888889
|
||||
0x3f638e39
|
||||
// 0.842105
|
||||
0x3f579436
|
||||
// 0.789474
|
||||
0x3f4a1af3
|
||||
// 0.904762
|
||||
0x3f679e7a
|
||||
// 0.909091
|
||||
0x3f68ba2f
|
||||
// 0.833333
|
||||
0x3f555555
|
||||
// 0.812500
|
||||
0x3f500000
|
||||
// 0.687500
|
||||
0x3f300000
|
||||
// 0.789474
|
||||
0x3f4a1af3
|
||||
@ -0,0 +1,22 @@
|
||||
W
|
||||
10
|
||||
// 0.588235
|
||||
0x3f169697
|
||||
// 0.666667
|
||||
0x3f2aaaab
|
||||
// 0.736842
|
||||
0x3f3ca1af
|
||||
// 0.736842
|
||||
0x3f3ca1af
|
||||
// 0.857143
|
||||
0x3f5b6db7
|
||||
// 0.909091
|
||||
0x3f68ba2f
|
||||
// 0.666667
|
||||
0x3f2aaaab
|
||||
// 0.500000
|
||||
0x3f000000
|
||||
// 0.500000
|
||||
0x3f000000
|
||||
// 0.736842
|
||||
0x3f3ca1af
|
||||
@ -0,0 +1,22 @@
|
||||
W
|
||||
10
|
||||
// 0.833333
|
||||
0x3f555555
|
||||
// 0.833333
|
||||
0x3f555555
|
||||
// 0.750000
|
||||
0x3f400000
|
||||
// 0.666667
|
||||
0x3f2aaaab
|
||||
// 0.833333
|
||||
0x3f555555
|
||||
// 0.833333
|
||||
0x3f555555
|
||||
// 0.750000
|
||||
0x3f400000
|
||||
// 0.750000
|
||||
0x3f400000
|
||||
// 0.583333
|
||||
0x3f155555
|
||||
// 0.666667
|
||||
0x3f2aaaab
|
||||
@ -0,0 +1,22 @@
|
||||
W
|
||||
10
|
||||
// 0.588235
|
||||
0x3f169697
|
||||
// 0.666667
|
||||
0x3f2aaaab
|
||||
// 0.736842
|
||||
0x3f3ca1af
|
||||
// 0.736842
|
||||
0x3f3ca1af
|
||||
// 0.857143
|
||||
0x3f5b6db7
|
||||
// 0.909091
|
||||
0x3f68ba2f
|
||||
// 0.666667
|
||||
0x3f2aaaab
|
||||
// 0.500000
|
||||
0x3f000000
|
||||
// 0.500000
|
||||
0x3f000000
|
||||
// 0.736842
|
||||
0x3f3ca1af
|
||||
@ -0,0 +1,22 @@
|
||||
W
|
||||
10
|
||||
// 0.833333
|
||||
0x3f555555
|
||||
// 0.857143
|
||||
0x3f5b6db7
|
||||
// 0.823529
|
||||
0x3f52d2d3
|
||||
// 0.777778
|
||||
0x3f471c72
|
||||
// 0.900000
|
||||
0x3f666666
|
||||
// 0.909091
|
||||
0x3f68ba2f
|
||||
// 0.800000
|
||||
0x3f4ccccd
|
||||
// 0.727273
|
||||
0x3f3a2e8c
|
||||
// 0.615385
|
||||
0x3f1d89d9
|
||||
// 0.777778
|
||||
0x3f471c72
|
||||
@ -0,0 +1,22 @@
|
||||
W
|
||||
10
|
||||
// 0.571429
|
||||
0x3f124925
|
||||
// 1.000000
|
||||
0x3f800000
|
||||
// 1.333333
|
||||
0x3faaaaab
|
||||
// 1.428571
|
||||
0x3fb6db6e
|
||||
// 1.818182
|
||||
0x3fe8ba2f
|
||||
// 2.000000
|
||||
0x40000000
|
||||
// 1.000000
|
||||
0x3f800000
|
||||
// 0.421053
|
||||
0x3ed79436
|
||||
// 0.000000
|
||||
0x0
|
||||
// 1.428571
|
||||
0x3fb6db6e
|
||||
@ -0,0 +1,297 @@
|
||||
#include "DistanceTestsF32.h"
|
||||
#include "Error.h"
|
||||
#include "arm_math.h"
|
||||
#include "Test.h"
|
||||
|
||||
#include <cstdio>
|
||||
|
||||
|
||||
void DistanceTestsF32::test_braycurtis_distance_f32()
|
||||
{
|
||||
const float32_t *inpA = inputA.ptr();
|
||||
const float32_t *inpB = inputB.ptr();
|
||||
|
||||
float32_t *outp = output.ptr();
|
||||
|
||||
for(int i=0; i < this->nbPatterns ; i ++)
|
||||
{
|
||||
*outp = arm_braycurtis_distance_f32(inpA, inpB, this->vecDim);
|
||||
|
||||
inpA += this->vecDim;
|
||||
inpB += this->vecDim;
|
||||
outp ++;
|
||||
}
|
||||
|
||||
ASSERT_NEAR_EQ(output,ref,(float32_t)1e-3);
|
||||
}
|
||||
|
||||
void DistanceTestsF32::test_canberra_distance_f32()
|
||||
{
|
||||
const float32_t *inpA = inputA.ptr();
|
||||
const float32_t *inpB = inputB.ptr();
|
||||
|
||||
float32_t *outp = output.ptr();
|
||||
|
||||
for(int i=0; i < this->nbPatterns ; i ++)
|
||||
{
|
||||
*outp = arm_canberra_distance_f32(inpA, inpB, this->vecDim);
|
||||
|
||||
inpA += this->vecDim;
|
||||
inpB += this->vecDim;
|
||||
outp ++;
|
||||
}
|
||||
|
||||
ASSERT_NEAR_EQ(output,ref,(float32_t)1e-3);
|
||||
}
|
||||
|
||||
void DistanceTestsF32::test_chebyshev_distance_f32()
|
||||
{
|
||||
const float32_t *inpA = inputA.ptr();
|
||||
const float32_t *inpB = inputB.ptr();
|
||||
|
||||
float32_t *outp = output.ptr();
|
||||
|
||||
for(int i=0; i < this->nbPatterns ; i ++)
|
||||
{
|
||||
*outp = arm_chebyshev_distance_f32(inpA, inpB, this->vecDim);
|
||||
|
||||
inpA += this->vecDim;
|
||||
inpB += this->vecDim;
|
||||
outp ++;
|
||||
}
|
||||
|
||||
ASSERT_NEAR_EQ(output,ref,(float32_t)1e-3);
|
||||
}
|
||||
|
||||
void DistanceTestsF32::test_cityblock_distance_f32()
|
||||
{
|
||||
const float32_t *inpA = inputA.ptr();
|
||||
const float32_t *inpB = inputB.ptr();
|
||||
|
||||
float32_t *outp = output.ptr();
|
||||
|
||||
for(int i=0; i < this->nbPatterns ; i ++)
|
||||
{
|
||||
*outp = arm_cityblock_distance_f32(inpA, inpB, this->vecDim);
|
||||
|
||||
inpA += this->vecDim;
|
||||
inpB += this->vecDim;
|
||||
outp ++;
|
||||
}
|
||||
|
||||
ASSERT_NEAR_EQ(output,ref,(float32_t)1e-3);
|
||||
}
|
||||
|
||||
void DistanceTestsF32::test_correlation_distance_f32()
|
||||
{
|
||||
const float32_t *inpA = inputA.ptr();
|
||||
const float32_t *inpB = inputB.ptr();
|
||||
|
||||
float32_t *tmpap = tmpA.ptr();
|
||||
float32_t *tmpbp = tmpB.ptr();
|
||||
|
||||
float32_t *outp = output.ptr();
|
||||
|
||||
for(int i=0; i < this->nbPatterns ; i ++)
|
||||
{
|
||||
memcpy(tmpap, inpA, sizeof(float32_t) * this->vecDim);
|
||||
memcpy(tmpbp, inpB, sizeof(float32_t) * this->vecDim);
|
||||
|
||||
*outp = arm_correlation_distance_f32(tmpap, tmpbp, this->vecDim);
|
||||
|
||||
inpA += this->vecDim;
|
||||
inpB += this->vecDim;
|
||||
outp ++;
|
||||
}
|
||||
|
||||
ASSERT_NEAR_EQ(output,ref,(float32_t)1e-3);
|
||||
}
|
||||
|
||||
void DistanceTestsF32::test_cosine_distance_f32()
|
||||
{
|
||||
const float32_t *inpA = inputA.ptr();
|
||||
const float32_t *inpB = inputB.ptr();
|
||||
|
||||
float32_t *outp = output.ptr();
|
||||
|
||||
for(int i=0; i < this->nbPatterns ; i ++)
|
||||
{
|
||||
*outp = arm_cosine_distance_f32(inpA, inpB, this->vecDim);
|
||||
|
||||
inpA += this->vecDim;
|
||||
inpB += this->vecDim;
|
||||
outp ++;
|
||||
}
|
||||
|
||||
ASSERT_NEAR_EQ(output,ref,(float32_t)1e-3);
|
||||
}
|
||||
|
||||
void DistanceTestsF32::test_euclidean_distance_f32()
|
||||
{
|
||||
const float32_t *inpA = inputA.ptr();
|
||||
const float32_t *inpB = inputB.ptr();
|
||||
|
||||
float32_t *outp = output.ptr();
|
||||
|
||||
for(int i=0; i < this->nbPatterns ; i ++)
|
||||
{
|
||||
*outp = arm_euclidean_distance_f32(inpA, inpB, this->vecDim);
|
||||
|
||||
inpA += this->vecDim;
|
||||
inpB += this->vecDim;
|
||||
outp ++;
|
||||
}
|
||||
|
||||
ASSERT_NEAR_EQ(output,ref,(float32_t)1e-3);
|
||||
}
|
||||
|
||||
void DistanceTestsF32::test_jensenshannon_distance_f32()
|
||||
{
|
||||
const float32_t *inpA = inputA.ptr();
|
||||
const float32_t *inpB = inputB.ptr();
|
||||
|
||||
float32_t *outp = output.ptr();
|
||||
|
||||
|
||||
|
||||
for(int i=0; i < this->nbPatterns ; i ++)
|
||||
{
|
||||
*outp = arm_jensenshannon_distance_f32(inpA, inpB, this->vecDim);
|
||||
|
||||
inpA += this->vecDim;
|
||||
inpB += this->vecDim;
|
||||
outp ++;
|
||||
}
|
||||
|
||||
ASSERT_NEAR_EQ(output,ref,(float32_t)1e-3);
|
||||
}
|
||||
|
||||
void DistanceTestsF32::test_minkowski_distance_f32()
|
||||
{
|
||||
const float32_t *inpA = inputA.ptr();
|
||||
const float32_t *inpB = inputB.ptr();
|
||||
const int16_t *dimsp= dims.ptr();
|
||||
dimsp += 2;
|
||||
|
||||
float32_t *outp = output.ptr();
|
||||
|
||||
for(int i=0; i < this->nbPatterns ; i ++)
|
||||
{
|
||||
*outp = arm_minkowski_distance_f32(inpA, inpB, *dimsp,this->vecDim);
|
||||
|
||||
inpA += this->vecDim;
|
||||
inpB += this->vecDim;
|
||||
outp ++;
|
||||
dimsp ++;
|
||||
}
|
||||
|
||||
ASSERT_NEAR_EQ(output,ref,(float32_t)1e-3);
|
||||
}
|
||||
|
||||
|
||||
void DistanceTestsF32::setUp(Testing::testID_t id,std::vector<Testing::param_t>& paramsArgs,Client::PatternMgr *mgr)
|
||||
{
|
||||
|
||||
if ((id != DistanceTestsF32::TEST_MINKOWSKI_DISTANCE_F32_9) && (id != DistanceTestsF32::TEST_JENSENSHANNON_DISTANCE_F32_8))
|
||||
{
|
||||
inputA.reload(DistanceTestsF32::INPUTA_F32_ID,mgr);
|
||||
inputB.reload(DistanceTestsF32::INPUTB_F32_ID,mgr);
|
||||
dims.reload(DistanceTestsF32::DIMS_S16_ID,mgr);
|
||||
|
||||
const int16_t *dimsp = dims.ptr();
|
||||
|
||||
this->nbPatterns=dimsp[0];
|
||||
this->vecDim=dimsp[1];
|
||||
output.create(this->nbPatterns,DistanceTestsF32::OUT_F32_ID,mgr);
|
||||
}
|
||||
|
||||
switch(id)
|
||||
{
|
||||
case DistanceTestsF32::TEST_BRAYCURTIS_DISTANCE_F32_1:
|
||||
{
|
||||
ref.reload(DistanceTestsF32::REF1_F32_ID,mgr);
|
||||
}
|
||||
break;
|
||||
|
||||
case DistanceTestsF32::TEST_CANBERRA_DISTANCE_F32_2:
|
||||
{
|
||||
ref.reload(DistanceTestsF32::REF2_F32_ID,mgr);
|
||||
}
|
||||
break;
|
||||
|
||||
case DistanceTestsF32::TEST_CHEBYSHEV_DISTANCE_F32_3:
|
||||
{
|
||||
ref.reload(DistanceTestsF32::REF3_F32_ID,mgr);
|
||||
}
|
||||
break;
|
||||
|
||||
case DistanceTestsF32::TEST_CITYBLOCK_DISTANCE_F32_4:
|
||||
{
|
||||
ref.reload(DistanceTestsF32::REF4_F32_ID,mgr);
|
||||
}
|
||||
break;
|
||||
|
||||
case DistanceTestsF32::TEST_CORRELATION_DISTANCE_F32_5:
|
||||
{
|
||||
ref.reload(DistanceTestsF32::REF5_F32_ID,mgr);
|
||||
tmpA.create(this->vecDim,DistanceTestsF32::TMPA_F32_ID,mgr);
|
||||
tmpB.create(this->vecDim,DistanceTestsF32::TMPB_F32_ID,mgr);
|
||||
}
|
||||
break;
|
||||
|
||||
case DistanceTestsF32::TEST_COSINE_DISTANCE_F32_6:
|
||||
{
|
||||
ref.reload(DistanceTestsF32::REF6_F32_ID,mgr);
|
||||
}
|
||||
break;
|
||||
|
||||
case DistanceTestsF32::TEST_EUCLIDEAN_DISTANCE_F32_7:
|
||||
{
|
||||
ref.reload(DistanceTestsF32::REF7_F32_ID,mgr);
|
||||
}
|
||||
break;
|
||||
|
||||
case DistanceTestsF32::TEST_JENSENSHANNON_DISTANCE_F32_8:
|
||||
{
|
||||
inputA.reload(DistanceTestsF32::INPUTA_JEN_F32_ID,mgr);
|
||||
inputB.reload(DistanceTestsF32::INPUTB_JEN_F32_ID,mgr);
|
||||
dims.reload(DistanceTestsF32::DIMS_S16_ID,mgr);
|
||||
|
||||
const int16_t *dimsp = dims.ptr();
|
||||
|
||||
this->nbPatterns=dimsp[0];
|
||||
this->vecDim=dimsp[1];
|
||||
output.create(this->nbPatterns,DistanceTestsF32::OUT_F32_ID,mgr);
|
||||
|
||||
ref.reload(DistanceTestsF32::REF8_F32_ID,mgr);
|
||||
}
|
||||
break;
|
||||
|
||||
case DistanceTestsF32::TEST_MINKOWSKI_DISTANCE_F32_9:
|
||||
{
|
||||
inputA.reload(DistanceTestsF32::INPUTA_F32_ID,mgr);
|
||||
inputB.reload(DistanceTestsF32::INPUTB_F32_ID,mgr);
|
||||
dims.reload(DistanceTestsF32::DIMS_MINKOWSKI_S16_ID,mgr);
|
||||
|
||||
const int16_t *dimsp = dims.ptr();
|
||||
|
||||
this->nbPatterns=dimsp[0];
|
||||
this->vecDim=dimsp[1];
|
||||
output.create(this->nbPatterns,DistanceTestsF32::OUT_F32_ID,mgr);
|
||||
|
||||
ref.reload(DistanceTestsF32::REF9_F32_ID,mgr);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
void DistanceTestsF32::tearDown(Testing::testID_t id,Client::PatternMgr *mgr)
|
||||
{
|
||||
output.dump(mgr);
|
||||
}
|
||||
@ -0,0 +1,263 @@
|
||||
#include "DistanceTestsU32.h"
|
||||
#include "Error.h"
|
||||
#include "arm_math.h"
|
||||
#include "Test.h"
|
||||
|
||||
#include <cstdio>
|
||||
|
||||
#define ERROR_THRESHOLD 1e-5
|
||||
|
||||
void DistanceTestsU32::test_dice_distance()
|
||||
{
|
||||
const uint32_t *inpA = inputA.ptr();
|
||||
const uint32_t *inpB = inputB.ptr();
|
||||
|
||||
float32_t *outp = output.ptr();
|
||||
|
||||
for(int i=0; i < this->nbPatterns ; i ++)
|
||||
{
|
||||
*outp = arm_dice_distance(inpA, inpB,this->vecDim);
|
||||
|
||||
inpA += this->bitVecDim ;
|
||||
inpB += this->bitVecDim ;
|
||||
outp ++;
|
||||
}
|
||||
|
||||
ASSERT_NEAR_EQ(output,ref,(float32_t)ERROR_THRESHOLD);
|
||||
}
|
||||
|
||||
void DistanceTestsU32::test_hamming_distance()
|
||||
{
|
||||
const uint32_t *inpA = inputA.ptr();
|
||||
const uint32_t *inpB = inputB.ptr();
|
||||
|
||||
float32_t *outp = output.ptr();
|
||||
|
||||
for(int i=0; i < this->nbPatterns ; i ++)
|
||||
{
|
||||
*outp = arm_hamming_distance(inpA, inpB,this->vecDim);
|
||||
|
||||
inpA += this->bitVecDim ;
|
||||
inpB += this->bitVecDim ;
|
||||
outp ++;
|
||||
}
|
||||
|
||||
ASSERT_NEAR_EQ(output,ref,(float32_t)ERROR_THRESHOLD);
|
||||
}
|
||||
|
||||
void DistanceTestsU32::test_jaccard_distance()
|
||||
{
|
||||
const uint32_t *inpA = inputA.ptr();
|
||||
const uint32_t *inpB = inputB.ptr();
|
||||
|
||||
float32_t *outp = output.ptr();
|
||||
|
||||
for(int i=0; i < this->nbPatterns ; i ++)
|
||||
{
|
||||
*outp = arm_jaccard_distance(inpA, inpB,this->vecDim);
|
||||
|
||||
inpA += this->bitVecDim ;
|
||||
inpB += this->bitVecDim ;
|
||||
outp ++;
|
||||
}
|
||||
|
||||
ASSERT_NEAR_EQ(output,ref,(float32_t)ERROR_THRESHOLD);
|
||||
}
|
||||
|
||||
void DistanceTestsU32::test_kulsinski_distance()
|
||||
{
|
||||
const uint32_t *inpA = inputA.ptr();
|
||||
const uint32_t *inpB = inputB.ptr();
|
||||
|
||||
float32_t *outp = output.ptr();
|
||||
|
||||
for(int i=0; i < this->nbPatterns ; i ++)
|
||||
{
|
||||
*outp = arm_kulsinski_distance(inpA, inpB,this->vecDim);
|
||||
|
||||
inpA += this->bitVecDim ;
|
||||
inpB += this->bitVecDim ;
|
||||
outp ++;
|
||||
}
|
||||
|
||||
ASSERT_NEAR_EQ(output,ref,(float32_t)ERROR_THRESHOLD);
|
||||
}
|
||||
|
||||
void DistanceTestsU32::test_rogerstanimoto_distance()
|
||||
{
|
||||
const uint32_t *inpA = inputA.ptr();
|
||||
const uint32_t *inpB = inputB.ptr();
|
||||
|
||||
float32_t *outp = output.ptr();
|
||||
|
||||
for(int i=0; i < this->nbPatterns ; i ++)
|
||||
{
|
||||
*outp = arm_rogerstanimoto_distance(inpA, inpB,this->vecDim);
|
||||
|
||||
inpA += this->bitVecDim ;
|
||||
inpB += this->bitVecDim ;
|
||||
outp ++;
|
||||
}
|
||||
|
||||
ASSERT_NEAR_EQ(output,ref,(float32_t)ERROR_THRESHOLD);
|
||||
}
|
||||
|
||||
void DistanceTestsU32::test_russellrao_distance()
|
||||
{
|
||||
const uint32_t *inpA = inputA.ptr();
|
||||
const uint32_t *inpB = inputB.ptr();
|
||||
|
||||
float32_t *outp = output.ptr();
|
||||
|
||||
for(int i=0; i < this->nbPatterns ; i ++)
|
||||
{
|
||||
*outp = arm_russellrao_distance(inpA, inpB,this->vecDim);
|
||||
|
||||
inpA += this->bitVecDim ;
|
||||
inpB += this->bitVecDim ;
|
||||
outp ++;
|
||||
}
|
||||
|
||||
ASSERT_NEAR_EQ(output,ref,(float32_t)ERROR_THRESHOLD);
|
||||
}
|
||||
|
||||
void DistanceTestsU32::test_sokalmichener_distance()
|
||||
{
|
||||
const uint32_t *inpA = inputA.ptr();
|
||||
const uint32_t *inpB = inputB.ptr();
|
||||
|
||||
float32_t *outp = output.ptr();
|
||||
|
||||
for(int i=0; i < this->nbPatterns ; i ++)
|
||||
{
|
||||
*outp = arm_sokalmichener_distance(inpA, inpB,this->vecDim);
|
||||
|
||||
inpA += this->bitVecDim ;
|
||||
inpB += this->bitVecDim ;
|
||||
outp ++;
|
||||
}
|
||||
|
||||
ASSERT_NEAR_EQ(output,ref,(float32_t)ERROR_THRESHOLD);
|
||||
}
|
||||
|
||||
void DistanceTestsU32::test_sokalsneath_distance()
|
||||
{
|
||||
const uint32_t *inpA = inputA.ptr();
|
||||
const uint32_t *inpB = inputB.ptr();
|
||||
|
||||
float32_t *outp = output.ptr();
|
||||
|
||||
for(int i=0; i < this->nbPatterns ; i ++)
|
||||
{
|
||||
*outp = arm_sokalsneath_distance(inpA, inpB,this->vecDim);
|
||||
|
||||
inpA += this->bitVecDim ;
|
||||
inpB += this->bitVecDim ;
|
||||
outp ++;
|
||||
}
|
||||
|
||||
ASSERT_NEAR_EQ(output,ref,(float32_t)ERROR_THRESHOLD);
|
||||
}
|
||||
|
||||
void DistanceTestsU32::test_yule_distance()
|
||||
{
|
||||
const uint32_t *inpA = inputA.ptr();
|
||||
const uint32_t *inpB = inputB.ptr();
|
||||
|
||||
float32_t *outp = output.ptr();
|
||||
|
||||
for(int i=0; i < this->nbPatterns ; i ++)
|
||||
{
|
||||
*outp = arm_yule_distance(inpA, inpB,this->vecDim);
|
||||
|
||||
inpA += this->bitVecDim ;
|
||||
inpB += this->bitVecDim ;
|
||||
outp ++;
|
||||
}
|
||||
|
||||
ASSERT_NEAR_EQ(output,ref,(float32_t)ERROR_THRESHOLD);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
void DistanceTestsU32::setUp(Testing::testID_t id,std::vector<Testing::param_t>& paramsArgs,Client::PatternMgr *mgr)
|
||||
{
|
||||
|
||||
inputA.reload(DistanceTestsU32::INPUTA_U32_ID,mgr);
|
||||
inputB.reload(DistanceTestsU32::INPUTB_U32_ID,mgr);
|
||||
dims.reload(DistanceTestsU32::DIMS_S16_ID,mgr);
|
||||
|
||||
const int16_t *dimsp = dims.ptr();
|
||||
|
||||
this->nbPatterns=dimsp[0];
|
||||
this->vecDim=dimsp[1];
|
||||
this->bitVecDim=dimsp[2];
|
||||
//printf("%d %d %d\n",dimsp[0],dimsp[1],dimsp[2]);
|
||||
output.create(this->nbPatterns,DistanceTestsU32::OUT_F32_ID,mgr);
|
||||
|
||||
switch(id)
|
||||
{
|
||||
case DistanceTestsU32::TEST_DICE_DISTANCE_1:
|
||||
{
|
||||
ref.reload(DistanceTestsU32::REF1_F32_ID,mgr);
|
||||
}
|
||||
break;
|
||||
|
||||
case DistanceTestsU32::TEST_HAMMING_DISTANCE_2:
|
||||
{
|
||||
ref.reload(DistanceTestsU32::REF2_F32_ID,mgr);
|
||||
}
|
||||
break;
|
||||
|
||||
case DistanceTestsU32::TEST_JACCARD_DISTANCE_3:
|
||||
{
|
||||
ref.reload(DistanceTestsU32::REF3_F32_ID,mgr);
|
||||
}
|
||||
break;
|
||||
|
||||
case DistanceTestsU32::TEST_KULSINSKI_DISTANCE_4:
|
||||
{
|
||||
ref.reload(DistanceTestsU32::REF4_F32_ID,mgr);
|
||||
}
|
||||
break;
|
||||
|
||||
case DistanceTestsU32::TEST_ROGERSTANIMOTO_DISTANCE_5:
|
||||
{
|
||||
ref.reload(DistanceTestsU32::REF5_F32_ID,mgr);
|
||||
}
|
||||
break;
|
||||
|
||||
case DistanceTestsU32::TEST_RUSSELLRAO_DISTANCE_6:
|
||||
{
|
||||
ref.reload(DistanceTestsU32::REF6_F32_ID,mgr);
|
||||
}
|
||||
break;
|
||||
|
||||
case DistanceTestsU32::TEST_SOKALMICHENER_DISTANCE_7:
|
||||
{
|
||||
ref.reload(DistanceTestsU32::REF7_F32_ID,mgr);
|
||||
}
|
||||
break;
|
||||
|
||||
case DistanceTestsU32::TEST_SOKALSNEATH_DISTANCE_8:
|
||||
{
|
||||
ref.reload(DistanceTestsU32::REF8_F32_ID,mgr);
|
||||
}
|
||||
break;
|
||||
|
||||
case DistanceTestsU32::TEST_YULE_DISTANCE_9:
|
||||
{
|
||||
ref.reload(DistanceTestsU32::REF9_F32_ID,mgr);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
void DistanceTestsU32::tearDown(Testing::testID_t id,Client::PatternMgr *mgr)
|
||||
{
|
||||
output.dump(mgr);
|
||||
}
|
||||
Loading…
Reference in New Issue