CMSIS-DSP Correction to some f16 definitions

pull/19/head
Christophe Favergeon 5 years ago
parent 69d56b1a31
commit 9d7dc65c3b

@ -134,13 +134,13 @@ won't be built.
#if defined(ARM_FLOAT16_SUPPORTED)
#define F16_MAX ((float16_t)FLT_MAX)
#define F16_MIN (-(float16_t)FLT_MAX)
#define F16_MAX ((float16_t)__FLT16_MAX__)
#define F16_MIN (-(float16_t)__FLT16_MAX__)
#define F16_ABSMAX ((float16_t)FLT_MAX)
#define F16_ABSMIN ((float16_t)0.0)
#define F16_ABSMAX ((float16_t)__FLT16_MAX__)
#define F16_ABSMIN ((float16_t)0.0f16)
#define F16INFINITY ((float16_t)0x07c00)
#define F16INFINITY ((float16_t)__builtin_inf())
#endif /* ARM_FLOAT16_SUPPORTED*/
#endif /* !defined( __CC_ARM ) */

@ -0,0 +1,42 @@
/******************************************************************************
* @file svm_defines.h
* @brief Public header file for CMSIS DSP Library
******************************************************************************/
/*
* Copyright (c) 2010-2020 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.
*/
#ifndef _SVM_DEFINES_H_
#define _SVM_DEFINES_H_
/**
* @brief Struct for specifying SVM Kernel
*/
typedef enum
{
ARM_ML_KERNEL_LINEAR = 0,
/**< Linear kernel */
ARM_ML_KERNEL_POLYNOMIAL = 1,
/**< Polynomial kernel */
ARM_ML_KERNEL_RBF = 2,
/**< Radial Basis Function kernel */
ARM_ML_KERNEL_SIGMOID = 3
/**< Sigmoid kernel */
} arm_ml_kernel_type;
#endif

@ -31,6 +31,7 @@
#include "dsp/none.h"
#include "dsp/utils.h"
#include "dsp/svm_defines.h"
#ifdef __cplusplus
extern "C"
@ -73,20 +74,7 @@ __STATIC_INLINE float32_t arm_exponent_f32(float32_t x, int32_t nb)
}
/**
* @brief Struct for specifying SVM Kernel
*/
typedef enum
{
ARM_ML_KERNEL_LINEAR = 0,
/**< Linear kernel */
ARM_ML_KERNEL_POLYNOMIAL = 1,
/**< Polynomial kernel */
ARM_ML_KERNEL_RBF = 2,
/**< Radial Basis Function kernel */
ARM_ML_KERNEL_SIGMOID = 3
/**< Sigmoid kernel */
} arm_ml_kernel_type;
/**

@ -31,6 +31,7 @@
#include "dsp/none.h"
#include "dsp/utils.h"
#include "dsp/svm_defines.h"
#ifdef __cplusplus
extern "C"
@ -75,22 +76,6 @@ __STATIC_INLINE float16_t arm_exponent_f16(float16_t x, int32_t nb)
}
/**
* @brief Struct for specifying SVM Kernel
*/
typedef enum
{
ARM_ML_KERNEL_LINEAR = 0,
/**< Linear kernel */
ARM_ML_KERNEL_POLYNOMIAL = 1,
/**< Polynomial kernel */
ARM_ML_KERNEL_RBF = 2,
/**< Radial Basis Function kernel */
ARM_ML_KERNEL_SIGMOID = 3
/**< Sigmoid kernel */
} arm_ml_kernel_type;
/**
* @brief Instance structure for linear SVM prediction function.
*/

Loading…
Cancel
Save