andrewm@379: /* andrewm@379: * Copyright 2011-15 ARM Limited and Contributors. andrewm@379: * All rights reserved. andrewm@379: * andrewm@379: * Redistribution and use in source and binary forms, with or without andrewm@379: * modification, are permitted provided that the following conditions are met: andrewm@379: * * Redistributions of source code must retain the above copyright andrewm@379: * notice, this list of conditions and the following disclaimer. andrewm@379: * * Redistributions in binary form must reproduce the above copyright andrewm@379: * notice, this list of conditions and the following disclaimer in the andrewm@379: * documentation and/or other materials provided with the distribution. andrewm@379: * * Neither the name of ARM Limited nor the andrewm@379: * names of its contributors may be used to endorse or promote products andrewm@379: * derived from this software without specific prior written permission. andrewm@379: * andrewm@379: * THIS SOFTWARE IS PROVIDED BY ARM LIMITED AND CONTRIBUTORS "AS IS" AND andrewm@379: * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED andrewm@379: * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE andrewm@379: * DISCLAIMED. IN NO EVENT SHALL ARM LIMITED AND CONTRIBUTORS BE LIABLE FOR ANY andrewm@379: * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES andrewm@379: * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; andrewm@379: * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND andrewm@379: * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT andrewm@379: * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS andrewm@379: * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. andrewm@379: */ andrewm@379: andrewm@379: /* andrewm@379: * NE10 Library : inc/NE10_math.h andrewm@379: */ andrewm@379: andrewm@379: andrewm@379: #include "NE10_types.h" andrewm@379: andrewm@379: #ifndef NE10_MATH_H andrewm@379: #define NE10_MATH_H andrewm@379: andrewm@379: #ifdef __cplusplus andrewm@379: extern "C" { andrewm@379: #endif andrewm@379: andrewm@379: /////////////////////////// andrewm@379: // function prototypes: andrewm@379: /////////////////////////// andrewm@379: andrewm@379: andrewm@379: // ## Vector-Constant Arithmetic ## andrewm@379: andrewm@379: /** andrewm@379: * @ingroup groupMaths andrewm@379: */ andrewm@379: andrewm@379: /** andrewm@379: * @defgroup ADD_VEC Vector Add andrewm@379: * andrewm@379: * \par andrewm@379: * These functions implement the vector add operation for float data type. andrewm@379: */ andrewm@379: andrewm@379: /** andrewm@379: * @addtogroup ADD_VEC andrewm@379: * @{ andrewm@379: */ andrewm@379: andrewm@379: /** andrewm@379: * Adds a constant scalar value to all the elements of an input array and stores the results in an output array. andrewm@379: * This function point could be pointed to one of ne10_addc_float_c, ne10_addc_float_neon and ne10_addc_float_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src Pointer to the source array andrewm@379: * @param[in] cst The constant scalar added to the input values andrewm@379: * @param[in] count The number of items in the input array andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_addc_float) (ne10_float32_t * dst, ne10_float32_t * src, const ne10_float32_t cst, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_addc_float_c (ne10_float32_t * dst, ne10_float32_t * src, const ne10_float32_t cst, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_addc_float_neon (ne10_float32_t * dst, ne10_float32_t * src, const ne10_float32_t cst, ne10_uint32_t count) asm ("ne10_addc_float_neon"); andrewm@379: extern ne10_result_t ne10_addc_float_asm (ne10_float32_t * dst, ne10_float32_t * src, const ne10_float32_t cst, ne10_uint32_t count); andrewm@379: /** andrewm@379: * Adds a constant 2D vector to all of the vectors in an input array and stores the results in an output array. andrewm@379: * This function point could be pointed to one of ne10_addc_vec2f_c, ne10_addc_vec2f_neon and ne10_addc_vec2f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src Pointer to the source array andrewm@379: * @param[in] cst Pointer to the 2D vector added to the input values andrewm@379: * @param[in] count The number of items in the input array andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_addc_vec2f) (ne10_vec2f_t * dst, ne10_vec2f_t * src, const ne10_vec2f_t * cst, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_addc_vec2f_c (ne10_vec2f_t * dst, ne10_vec2f_t * src, const ne10_vec2f_t * cst, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_addc_vec2f_neon (ne10_vec2f_t * dst, ne10_vec2f_t * src, const ne10_vec2f_t * cst, ne10_uint32_t count) asm ("ne10_addc_vec2f_neon"); andrewm@379: extern ne10_result_t ne10_addc_vec2f_asm (ne10_vec2f_t * dst, ne10_vec2f_t * src, const ne10_vec2f_t * cst, ne10_uint32_t count); andrewm@379: /** andrewm@379: * Adds a constant 3D vector to all of the vectors in an input array and stores the results in an output array. andrewm@379: * This function point could be pointed to one of ne10_addc_vec3f_c, ne10_addc_vec3f_neon and ne10_addc_vec3f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src Pointer to the source array andrewm@379: * @param[in] cst Pointer to the 3D vector added to the input values andrewm@379: * @param[in] count The number of items in the input array andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_addc_vec3f) (ne10_vec3f_t * dst, ne10_vec3f_t * src, const ne10_vec3f_t * cst, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_addc_vec3f_c (ne10_vec3f_t * dst, ne10_vec3f_t * src, const ne10_vec3f_t * cst, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_addc_vec3f_neon (ne10_vec3f_t * dst, ne10_vec3f_t * src, const ne10_vec3f_t * cst, ne10_uint32_t count) asm ("ne10_addc_vec3f_neon"); andrewm@379: extern ne10_result_t ne10_addc_vec3f_asm (ne10_vec3f_t * dst, ne10_vec3f_t * src, const ne10_vec3f_t * cst, ne10_uint32_t count); andrewm@379: /** andrewm@379: * Adds a constant 4D vector to all of the vectors in an input array and stores the results in an output array. andrewm@379: * This function point could be pointed to one of ne10_addc_vec4f_c, ne10_addc_vec4f_neon and ne10_addc_vec4f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src Pointer to the source array andrewm@379: * @param[in] cst Pointer to the 4D vector added to the input values andrewm@379: * @param[in] count The number of items in the input array andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_addc_vec4f) (ne10_vec4f_t * dst, ne10_vec4f_t * src, const ne10_vec4f_t * cst, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_addc_vec4f_c (ne10_vec4f_t * dst, ne10_vec4f_t * src, const ne10_vec4f_t * cst, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_addc_vec4f_neon (ne10_vec4f_t * dst, ne10_vec4f_t * src, const ne10_vec4f_t * cst, ne10_uint32_t count) asm ("ne10_addc_vec4f_neon"); andrewm@379: extern ne10_result_t ne10_addc_vec4f_asm (ne10_vec4f_t * dst, ne10_vec4f_t * src, const ne10_vec4f_t * cst, ne10_uint32_t count); andrewm@379: andrewm@379: andrewm@379: /** andrewm@379: * Adds the elements of src1 to the elements of src2 and stores the results in the dst. andrewm@379: * This function point could be pointed to one of ne10_add_float_c, ne10_add_float_neon and ne10_add_float_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src1 The first array to use as the input array andrewm@379: * @param[in] src2 The second array to use as the input array andrewm@379: * @param[in] count The number of items in the two input arrays andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_add_float) (ne10_float32_t * dst, ne10_float32_t * src1, ne10_float32_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_add_float_c (ne10_float32_t * dst, ne10_float32_t * src1, ne10_float32_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_add_float_neon (ne10_float32_t * dst, ne10_float32_t * src1, ne10_float32_t * src2, ne10_uint32_t count) asm ("ne10_add_float_neon"); andrewm@379: extern ne10_result_t ne10_add_float_asm (ne10_float32_t * dst, ne10_float32_t * src1, ne10_float32_t * src2, ne10_uint32_t count); andrewm@379: /** andrewm@379: * Vector addition of two 2D vectors. andrewm@379: * This function point could be pointed to one of ne10_add_vec2f_c, ne10_add_vec2f_neon and ne10_add_vec2f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src1 Pointer to the first source array andrewm@379: * @param[in] src2 Pointer to the second source array andrewm@379: * @param[in] count The number of items in the input arrays andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_add_vec2f) (ne10_vec2f_t * dst, ne10_vec2f_t * src1, ne10_vec2f_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_add_vec2f_c (ne10_vec2f_t * dst, ne10_vec2f_t * src1, ne10_vec2f_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_add_vec2f_neon (ne10_vec2f_t * dst, ne10_vec2f_t * src1, ne10_vec2f_t * src2, ne10_uint32_t count) asm ("ne10_add_vec2f_neon"); andrewm@379: extern ne10_result_t ne10_add_vec2f_asm (ne10_vec2f_t * dst, ne10_vec2f_t * src1, ne10_vec2f_t * src2, ne10_uint32_t count); andrewm@379: /** andrewm@379: * Vector addition of two 3D vectors. andrewm@379: * This function point could be pointed to one of ne10_add_vec3f_c, ne10_add_vec3f_neon and ne10_add_vec3f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src1 Pointer to the first source array andrewm@379: * @param[in] src2 Pointer to the second source array andrewm@379: * @param[in] count The number of items in the input arrays andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_add_vec3f) (ne10_vec3f_t * dst, ne10_vec3f_t * src1, ne10_vec3f_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_add_vec3f_c (ne10_vec3f_t * dst, ne10_vec3f_t * src1, ne10_vec3f_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_add_vec3f_neon (ne10_vec3f_t * dst, ne10_vec3f_t * src1, ne10_vec3f_t * src2, ne10_uint32_t count) asm ("ne10_add_vec3f_neon"); andrewm@379: extern ne10_result_t ne10_add_vec3f_asm (ne10_vec3f_t * dst, ne10_vec3f_t * src1, ne10_vec3f_t * src2, ne10_uint32_t count); andrewm@379: /** andrewm@379: * Vector addition of two 4D vectors. andrewm@379: * This function point could be pointed to one of ne10_add_vec4f_c, ne10_add_vec4f_neon and ne10_add_vec4f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src1 Pointer to the first source array andrewm@379: * @param[in] src2 Pointer to the second source array andrewm@379: * @param[in] count The number of items in the input arrays andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_add_vec4f) (ne10_vec4f_t * dst, ne10_vec4f_t * src1, ne10_vec4f_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_add_vec4f_c (ne10_vec4f_t * dst, ne10_vec4f_t * src1, ne10_vec4f_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_add_vec4f_neon (ne10_vec4f_t * dst, ne10_vec4f_t * src1, ne10_vec4f_t * src2, ne10_uint32_t count) asm ("ne10_add_vec4f_neon"); andrewm@379: extern ne10_result_t ne10_add_vec4f_asm (ne10_vec4f_t * dst, ne10_vec4f_t * src1, ne10_vec4f_t * src2, ne10_uint32_t count); andrewm@379: /** @} */ //end of Vector Add group andrewm@379: andrewm@379: /** andrewm@379: * @ingroup groupMaths andrewm@379: */ andrewm@379: andrewm@379: /** andrewm@379: * @defgroup ADD_MAT Matrix Add andrewm@379: * andrewm@379: * \par andrewm@379: * These functions implement the matrix add operation for float data type. andrewm@379: */ andrewm@379: andrewm@379: /** andrewm@379: * @addtogroup ADD_MAT andrewm@379: * @{ andrewm@379: */ andrewm@379: andrewm@379: /** andrewm@379: * Vector addition of two 4x4 matrixs. andrewm@379: * This function point could be pointed to one of ne10_addmat_4x4f_c, ne10_addmat_4x4f_neon and ne10_addmat_4x4f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src1 Pointer to the first source array andrewm@379: * @param[in] src2 Pointer to the second source array andrewm@379: * @param[in] count The number of items in the input arrays andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_addmat_4x4f) (ne10_mat4x4f_t * dst, ne10_mat4x4f_t * src1, ne10_mat4x4f_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_addmat_4x4f_c (ne10_mat4x4f_t * dst, ne10_mat4x4f_t * src1, ne10_mat4x4f_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_addmat_4x4f_neon (ne10_mat4x4f_t * dst, ne10_mat4x4f_t * src1, ne10_mat4x4f_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_addmat_4x4f_asm (ne10_mat4x4f_t * dst, ne10_mat4x4f_t * src1, ne10_mat4x4f_t * src2, ne10_uint32_t count); andrewm@379: /** andrewm@379: * Vector addition of two 3x3 matrixs. andrewm@379: * This function point could be pointed to one of ne10_addmat_3x3f_c, ne10_addmat_3x3f_neon and ne10_addmat_3x3f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src1 Pointer to the first source array andrewm@379: * @param[in] src2 Pointer to the second source array andrewm@379: * @param[in] count The number of items in the input arrays andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_addmat_3x3f) (ne10_mat3x3f_t * dst, ne10_mat3x3f_t * src1, ne10_mat3x3f_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_addmat_3x3f_c (ne10_mat3x3f_t * dst, ne10_mat3x3f_t * src1, ne10_mat3x3f_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_addmat_3x3f_neon (ne10_mat3x3f_t * dst, ne10_mat3x3f_t * src1, ne10_mat3x3f_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_addmat_3x3f_asm (ne10_mat3x3f_t * dst, ne10_mat3x3f_t * src1, ne10_mat3x3f_t * src2, ne10_uint32_t count); andrewm@379: /** andrewm@379: * Vector addition of two 2x2 matrixs. andrewm@379: * This function point could be pointed to one of ne10_addmat_2x2f_c, ne10_addmat_2x2f_neon and ne10_addmat_2x2f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src1 Pointer to the first source array andrewm@379: * @param[in] src2 Pointer to the second source array andrewm@379: * @param[in] count The number of items in the input arrays andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_addmat_2x2f) (ne10_mat2x2f_t * dst, ne10_mat2x2f_t * src1, ne10_mat2x2f_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_addmat_2x2f_c (ne10_mat2x2f_t * dst, ne10_mat2x2f_t * src1, ne10_mat2x2f_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_addmat_2x2f_neon (ne10_mat2x2f_t * dst, ne10_mat2x2f_t * src1, ne10_mat2x2f_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_addmat_2x2f_asm (ne10_mat2x2f_t * dst, ne10_mat2x2f_t * src1, ne10_mat2x2f_t * src2, ne10_uint32_t count); andrewm@379: /** @} */ //end of Matrix Add group andrewm@379: andrewm@379: andrewm@379: /** andrewm@379: * @ingroup groupMaths andrewm@379: */ andrewm@379: andrewm@379: /** andrewm@379: * @defgroup SUB_VEC Vector Sub andrewm@379: * andrewm@379: * \par andrewm@379: * These functions implement the vector sub operation for float data type. andrewm@379: */ andrewm@379: andrewm@379: /** andrewm@379: * @addtogroup SUB_VEC andrewm@379: * @{ andrewm@379: */ andrewm@379: andrewm@379: /** andrewm@379: * Subtracts a constant scalar from all the elements of an input array and stores the results in an output array. andrewm@379: * This function point could be pointed to one of ne10_subc_float_c, ne10_subc_float_neon and ne10_subc_float_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src Pointer to the source array andrewm@379: * @param[in] cst The constant scalar subtracted from the input values andrewm@379: * @param[in] count The number of items in the input array andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_subc_float) (ne10_float32_t * dst, ne10_float32_t * src, const ne10_float32_t cst, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_subc_float_c (ne10_float32_t * dst, ne10_float32_t * src, const ne10_float32_t cst, ne10_uint32_t count); // subtract cst from the element(s) andrewm@379: extern ne10_result_t ne10_subc_float_neon (ne10_float32_t * dst, ne10_float32_t * src, const ne10_float32_t cst, ne10_uint32_t count); // subtract cst from the element(s) andrewm@379: extern ne10_result_t ne10_subc_float_asm (ne10_float32_t * dst, ne10_float32_t * src, const ne10_float32_t cst, ne10_uint32_t count); // subtract cst from the element(s) andrewm@379: /** andrewm@379: * Subtracts a constant 2D vector from all of the vectors in an input array and stores the results in an output array. andrewm@379: * This function point could be pointed to one of ne10_subc_vec2f_c, ne10_subc_vec2f_neon and ne10_subc_vec2f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src Pointer to the source array andrewm@379: * @param[in] cst Pointer to the 2D vector subtracted from the input values andrewm@379: * @param[in] count The number of items in the input array andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_subc_vec2f) (ne10_vec2f_t * dst, ne10_vec2f_t * src, const ne10_vec2f_t * cst, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_subc_vec2f_c (ne10_vec2f_t * dst, ne10_vec2f_t * src, const ne10_vec2f_t * cst, ne10_uint32_t count); // subtract cst from the element(s) andrewm@379: extern ne10_result_t ne10_subc_vec2f_neon (ne10_vec2f_t * dst, ne10_vec2f_t * src, const ne10_vec2f_t * cst, ne10_uint32_t count); // subtract cst from the element(s) andrewm@379: extern ne10_result_t ne10_subc_vec2f_asm (ne10_vec2f_t * dst, ne10_vec2f_t * src, const ne10_vec2f_t * cst, ne10_uint32_t count); // subtract cst from the element(s) andrewm@379: /** andrewm@379: * Subtracts a constant 3D vector from all of the vectors in an input array and stores the results in an output array. andrewm@379: * This function point could be pointed to one of ne10_subc_vec3f_c, ne10_subc_vec3f_neon and ne10_subc_vec3f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src Pointer to the source array andrewm@379: * @param[in] cst Pointer to the 3D vector subtracted from the input values andrewm@379: * @param[in] count The number of items in the input array andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_subc_vec3f) (ne10_vec3f_t * dst, ne10_vec3f_t * src, const ne10_vec3f_t * cst, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_subc_vec3f_c (ne10_vec3f_t * dst, ne10_vec3f_t * src, const ne10_vec3f_t * cst, ne10_uint32_t count); // subtract cst from the element(s) andrewm@379: extern ne10_result_t ne10_subc_vec3f_neon (ne10_vec3f_t * dst, ne10_vec3f_t * src, const ne10_vec3f_t * cst, ne10_uint32_t count); // subtract cst from the element(s) andrewm@379: extern ne10_result_t ne10_subc_vec3f_asm (ne10_vec3f_t * dst, ne10_vec3f_t * src, const ne10_vec3f_t * cst, ne10_uint32_t count); // subtract cst from the element(s) andrewm@379: /** andrewm@379: * Subtracts a constant 4D vector from all of the vectors in an input array and stores the results in an output array. andrewm@379: * This function point could be pointed to one of ne10_subc_vec4f_c, ne10_subc_vec4f_neon and ne10_subc_vec4f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src Pointer to the source array andrewm@379: * @param[in] cst Pointer to the 4D vector subtracted from the input values andrewm@379: * @param[in] count The number of items in the input array andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_subc_vec4f) (ne10_vec4f_t * dst, ne10_vec4f_t * src, const ne10_vec4f_t * cst, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_subc_vec4f_c (ne10_vec4f_t * dst, ne10_vec4f_t * src, const ne10_vec4f_t * cst, ne10_uint32_t count); // subtract cst from the element(s) andrewm@379: extern ne10_result_t ne10_subc_vec4f_neon (ne10_vec4f_t * dst, ne10_vec4f_t * src, const ne10_vec4f_t * cst, ne10_uint32_t count); // subtract cst from the element(s) andrewm@379: extern ne10_result_t ne10_subc_vec4f_asm (ne10_vec4f_t * dst, ne10_vec4f_t * src, const ne10_vec4f_t * cst, ne10_uint32_t count); // subtract cst from the element(s) andrewm@379: andrewm@379: /** andrewm@379: * Subtracts the elements of src2 from the elements of src1 and stores the results in the dst. andrewm@379: * This function point could be pointed to one of ne10_sub_float_c, ne10_sub_float_neon and ne10_sub_float_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src1 The first array to use as the input array andrewm@379: * @param[in] src2 The second array to use as the input array andrewm@379: * @param[in] count The number of items in the two input arrays andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_sub_float) (ne10_float32_t * dst, ne10_float32_t * src1, ne10_float32_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_sub_float_c (ne10_float32_t * dst, ne10_float32_t * src1, ne10_float32_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_sub_float_neon (ne10_float32_t * dst, ne10_float32_t * src1, ne10_float32_t * src2, ne10_uint32_t count) asm ("ne10_sub_float_neon"); andrewm@379: extern ne10_result_t ne10_sub_float_asm (ne10_float32_t * dst, ne10_float32_t * src1, ne10_float32_t * src2, ne10_uint32_t count); andrewm@379: /** andrewm@379: * Vector subtraction of two 2D vectors. andrewm@379: * This function point could be pointed to one of ne10_sub_vec2f_c, ne10_sub_vec2f_neon and ne10_sub_vec2f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src1 Pointer to the first source array andrewm@379: * @param[in] src2 Pointer to the second source array andrewm@379: * @param[in] count The number of items in the input arrays andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_sub_vec2f) (ne10_vec2f_t * dst, ne10_vec2f_t * src1, ne10_vec2f_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_sub_vec2f_c (ne10_vec2f_t * dst, ne10_vec2f_t * src1, ne10_vec2f_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_sub_vec2f_neon (ne10_vec2f_t * dst, ne10_vec2f_t * src1, ne10_vec2f_t * src2, ne10_uint32_t count) asm ("ne10_sub_vec2f_neon"); andrewm@379: extern ne10_result_t ne10_sub_vec2f_asm (ne10_vec2f_t * dst, ne10_vec2f_t * src1, ne10_vec2f_t * src2, ne10_uint32_t count); andrewm@379: /** andrewm@379: * Vector subtraction of two 3D vectors. andrewm@379: * This function point could be pointed to one of ne10_sub_vec3f_c, ne10_sub_vec3f_neon and ne10_sub_vec3f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src1 Pointer to the first source array andrewm@379: * @param[in] src2 Pointer to the second source array andrewm@379: * @param[in] count The number of items in the input arrays andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_sub_vec3f) (ne10_vec3f_t * dst, ne10_vec3f_t * src1, ne10_vec3f_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_sub_vec3f_c (ne10_vec3f_t * dst, ne10_vec3f_t * src1, ne10_vec3f_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_sub_vec3f_neon (ne10_vec3f_t * dst, ne10_vec3f_t * src1, ne10_vec3f_t * src2, ne10_uint32_t count) asm ("ne10_sub_vec3f_neon"); andrewm@379: extern ne10_result_t ne10_sub_vec3f_asm (ne10_vec3f_t * dst, ne10_vec3f_t * src1, ne10_vec3f_t * src2, ne10_uint32_t count); andrewm@379: /** andrewm@379: * Vector subtraction of two 4D vectors. andrewm@379: * This function point could be pointed to one of ne10_sub_vec4f_c, ne10_sub_vec4f_neon and ne10_sub_vec4f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src1 Pointer to the first source array andrewm@379: * @param[in] src2 Pointer to the second source array andrewm@379: * @param[in] count The number of items in the input arrays andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_sub_vec4f) (ne10_vec4f_t * dst, ne10_vec4f_t * src1, ne10_vec4f_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_sub_vec4f_c (ne10_vec4f_t * dst, ne10_vec4f_t * src1, ne10_vec4f_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_sub_vec4f_neon (ne10_vec4f_t * dst, ne10_vec4f_t * src1, ne10_vec4f_t * src2, ne10_uint32_t count) asm ("ne10_sub_vec4f_neon"); andrewm@379: extern ne10_result_t ne10_sub_vec4f_asm (ne10_vec4f_t * dst, ne10_vec4f_t * src1, ne10_vec4f_t * src2, ne10_uint32_t count); andrewm@379: /** @} */ //end of Vector Sub group andrewm@379: andrewm@379: /** andrewm@379: * @ingroup groupMaths andrewm@379: */ andrewm@379: andrewm@379: /** andrewm@379: * @defgroup RSBC Vector Rsbc andrewm@379: * andrewm@379: * \par andrewm@379: * These functions implement the vector rsbc operation for float data type. andrewm@379: */ andrewm@379: andrewm@379: /** andrewm@379: * @addtogroup RSBC andrewm@379: * @{ andrewm@379: */ andrewm@379: /** andrewm@379: * Subtracts the elements of an input array from a constant scalar and stores the results in an output array. andrewm@379: * This function point could be pointed to one of ne10_rsbc_float_c, ne10_rsbc_float_neon and ne10_rsbc_float_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src Pointer to the source array andrewm@379: * @param[in] cst The constant scalar to subtract the input values from andrewm@379: * @param[in] count The number of items in the input array andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_rsbc_float) (ne10_float32_t * dst, ne10_float32_t *src, const ne10_float32_t cst, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_rsbc_float_c (ne10_float32_t * dst, ne10_float32_t * src, const ne10_float32_t cst, ne10_uint32_t count); // subtract element(s) from a cst andrewm@379: extern ne10_result_t ne10_rsbc_float_neon (ne10_float32_t * dst, ne10_float32_t * src, const ne10_float32_t cst, ne10_uint32_t count); // subtract element(s) from a cst andrewm@379: extern ne10_result_t ne10_rsbc_float_asm (ne10_float32_t * dst, ne10_float32_t *src, const ne10_float32_t cst, ne10_uint32_t count); // subtract element(s) from a cst andrewm@379: /** andrewm@379: * Subtracts the vectors in an input array from a constant 2D vector and stores the results in an output array. andrewm@379: * This function point could be pointed to one of ne10_rsbc_vec2f_c, ne10_rsbc_vec2f_neon and ne10_rsbc_vec2f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src Pointer to the source array andrewm@379: * @param[in] cst Pointer to the 2D vector to subtract the input values from andrewm@379: * @param[in] count The number of items in the input array andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_rsbc_vec2f) (ne10_vec2f_t * dst, ne10_vec2f_t * src, const ne10_vec2f_t * cst, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_rsbc_vec2f_c (ne10_vec2f_t * dst, ne10_vec2f_t * src, const ne10_vec2f_t * cst, ne10_uint32_t count); // subtract element(s) from a cst andrewm@379: extern ne10_result_t ne10_rsbc_vec2f_neon (ne10_vec2f_t * dst, ne10_vec2f_t * src, const ne10_vec2f_t * cst, ne10_uint32_t count); // subtract element(s) from a cst andrewm@379: extern ne10_result_t ne10_rsbc_vec2f_asm (ne10_vec2f_t * dst, ne10_vec2f_t *src, const ne10_vec2f_t * cst, ne10_uint32_t count); // subtract element(s) from a cst andrewm@379: /** andrewm@379: * Subtracts the vectors in an input array from a constant 3D vector and stores the results in an output array. andrewm@379: * This function point could be pointed to one of ne10_rsbc_vec3f_c, ne10_rsbc_vec3f_neon and ne10_rsbc_vec3f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src Pointer to the source array andrewm@379: * @param[in] cst Pointer to the 3D vector to subtract the input values from andrewm@379: * @param[in] count The number of items in the input array andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_rsbc_vec3f) (ne10_vec3f_t * dst, ne10_vec3f_t * src, const ne10_vec3f_t * cst, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_rsbc_vec3f_c (ne10_vec3f_t * dst, ne10_vec3f_t * src, const ne10_vec3f_t * cst, ne10_uint32_t count); // subtract element(s) from a cst andrewm@379: extern ne10_result_t ne10_rsbc_vec3f_neon (ne10_vec3f_t * dst, ne10_vec3f_t * src, const ne10_vec3f_t * cst, ne10_uint32_t count); // subtract element(s) from a cst andrewm@379: extern ne10_result_t ne10_rsbc_vec3f_asm (ne10_vec3f_t * dst, ne10_vec3f_t *src, const ne10_vec3f_t * cst, ne10_uint32_t count); // subtract element(s) from a cst andrewm@379: /** andrewm@379: * Subtracts the vectors in an input array from a constant 4D vector and stores the results in an output array. andrewm@379: * This function point could be pointed to one of ne10_rsbc_vec4f_c, ne10_rsbc_vec4f_neon and ne10_rsbc_vec4f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src Pointer to the source array andrewm@379: * @param[in] cst Pointer to the 4D vector to subtract the input values from andrewm@379: * @param[in] count The number of items in the input array andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_rsbc_vec4f) (ne10_vec4f_t * dst, ne10_vec4f_t * src, const ne10_vec4f_t * cst, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_rsbc_vec4f_c (ne10_vec4f_t * dst, ne10_vec4f_t * src, const ne10_vec4f_t * cst, ne10_uint32_t count); // subtract element(s) from a cst andrewm@379: extern ne10_result_t ne10_rsbc_vec4f_neon (ne10_vec4f_t * dst, ne10_vec4f_t * src, const ne10_vec4f_t * cst, ne10_uint32_t count); // subtract element(s) from a cst andrewm@379: extern ne10_result_t ne10_rsbc_vec4f_asm (ne10_vec4f_t * dst, ne10_vec4f_t *src, const ne10_vec4f_t * cst, ne10_uint32_t count); // subtract element(s) from a cst andrewm@379: /** @} */ //end of Vector RSBC group andrewm@379: andrewm@379: /** andrewm@379: * @ingroup groupMaths andrewm@379: */ andrewm@379: andrewm@379: /** andrewm@379: * @defgroup SUB_MAT Matrix Sub andrewm@379: * andrewm@379: * \par andrewm@379: * These functions implement the matrix sub operation for float data type. andrewm@379: */ andrewm@379: andrewm@379: /** andrewm@379: * @addtogroup SUB_MAT andrewm@379: * @{ andrewm@379: */ andrewm@379: /** andrewm@379: * Matrix subtraction of two 4x4 matrixs. andrewm@379: * This function point could be pointed to one of ne10_submat_4x4f_c, ne10_submat_4x4f_neon and ne10_submat_4x4f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src1 Pointer to the first source array andrewm@379: * @param[in] src2 Pointer to the second source array andrewm@379: * @param[in] count The number of items in the input arrays andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_submat_4x4f) (ne10_mat4x4f_t * dst, ne10_mat4x4f_t * src1, ne10_mat4x4f_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_submat_4x4f_c (ne10_mat4x4f_t * dst, ne10_mat4x4f_t * src1, ne10_mat4x4f_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_submat_4x4f_neon (ne10_mat4x4f_t * dst, ne10_mat4x4f_t * src1, ne10_mat4x4f_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_submat_4x4f_asm (ne10_mat4x4f_t * dst, ne10_mat4x4f_t * src1, ne10_mat4x4f_t * src2, ne10_uint32_t count); andrewm@379: andrewm@379: /** andrewm@379: * Matrix subtraction of two 3x3 matrixs. andrewm@379: * This function point could be pointed to one of ne10_submat_3x3f_c, ne10_submat_3x3f_neon and ne10_submat_3x3f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src1 Pointer to the first source array andrewm@379: * @param[in] src2 Pointer to the second source array andrewm@379: * @param[in] count The number of items in the input arrays andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_submat_3x3f) (ne10_mat3x3f_t * dst, ne10_mat3x3f_t * src1, ne10_mat3x3f_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_submat_3x3f_c (ne10_mat3x3f_t * dst, ne10_mat3x3f_t * src1, ne10_mat3x3f_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_submat_3x3f_neon (ne10_mat3x3f_t * dst, ne10_mat3x3f_t * src1, ne10_mat3x3f_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_submat_3x3f_asm (ne10_mat3x3f_t * dst, ne10_mat3x3f_t * src1, ne10_mat3x3f_t * src2, ne10_uint32_t count); andrewm@379: andrewm@379: /** andrewm@379: * Matrix subtraction of two 2x2 matrixs. andrewm@379: * This function point could be pointed to one of ne10_submat_2x2f_c, ne10_submat_2x2f_neon and ne10_submat_2x2f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src1 Pointer to the first source array andrewm@379: * @param[in] src2 Pointer to the second source array andrewm@379: * @param[in] count The number of items in the input arrays andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_submat_2x2f) (ne10_mat2x2f_t * dst, ne10_mat2x2f_t * src1, ne10_mat2x2f_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_submat_2x2f_c (ne10_mat2x2f_t * dst, ne10_mat2x2f_t * src1, ne10_mat2x2f_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_submat_2x2f_neon (ne10_mat2x2f_t * dst, ne10_mat2x2f_t * src1, ne10_mat2x2f_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_submat_2x2f_asm (ne10_mat2x2f_t * dst, ne10_mat2x2f_t * src1, ne10_mat2x2f_t * src2, ne10_uint32_t count); andrewm@379: /** @} */ //end of Matrix Sub group andrewm@379: andrewm@379: /** andrewm@379: * @ingroup groupMaths andrewm@379: */ andrewm@379: andrewm@379: /** andrewm@379: * @defgroup MUL_VEC Vector Multiply andrewm@379: * andrewm@379: * \par andrewm@379: * These functions implement the vector multiply operation for float data type. andrewm@379: */ andrewm@379: andrewm@379: /** andrewm@379: * @addtogroup MUL_VEC andrewm@379: * @{ andrewm@379: */ andrewm@379: andrewm@379: /** andrewm@379: * Multiplies the elements of an input array by a constant scalar and stores the results in an output array. andrewm@379: * This function point could be pointed to one of ne10_mulc_float_c, ne10_mulc_float_neon and ne10_mulc_float_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src Pointer to the source array andrewm@379: * @param[in] cst The constant scalar to multiply the input values with andrewm@379: * @param[in] count The number of items in the input array andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_mulc_float) (ne10_float32_t * dst, ne10_float32_t * src, const ne10_float32_t cst, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_mulc_float_c (ne10_float32_t * dst, ne10_float32_t * src, const ne10_float32_t cst, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_mulc_float_neon (ne10_float32_t * dst, ne10_float32_t * src, const ne10_float32_t cst, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_mulc_float_asm (ne10_float32_t * dst, ne10_float32_t * src, const ne10_float32_t cst, ne10_uint32_t count); andrewm@379: /** andrewm@379: * Multiplies the components of 2D vectors in an input array by the components of a constant 2D vector and stores the results in an output array. andrewm@379: * This function point could be pointed to one of ne10_mulc_vec2f_c, ne10_mulc_vec2f_neon and ne10_mulc_vec2f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src Pointer to the source array andrewm@379: * @param[in] cst Pointer to the 2D vector to multiply the input values with andrewm@379: * @param[in] count The number of items in the input array andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_mulc_vec2f) (ne10_vec2f_t * dst, ne10_vec2f_t * src, const ne10_vec2f_t * cst, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_mulc_vec2f_c (ne10_vec2f_t * dst, ne10_vec2f_t * src, const ne10_vec2f_t * cst, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_mulc_vec2f_neon (ne10_vec2f_t * dst, ne10_vec2f_t * src, const ne10_vec2f_t * cst, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_mulc_vec2f_asm (ne10_vec2f_t * dst, ne10_vec2f_t * src, const ne10_vec2f_t * cst, ne10_uint32_t count); andrewm@379: /** andrewm@379: * Multiplies the components of 3D vectors in an input array by the components of a constant 3D vector and stores the results in an output array. andrewm@379: * This function point could be pointed to one of ne10_mulc_vec3f_c, ne10_mulc_vec3f_neon and ne10_mulc_vec3f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src Pointer to the source array andrewm@379: * @param[in] cst Pointer to the 3D vector to multiply the input values with andrewm@379: * @param[in] count The number of items in the input array andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_mulc_vec3f) (ne10_vec3f_t * dst, ne10_vec3f_t * src, const ne10_vec3f_t * cst, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_mulc_vec3f_c (ne10_vec3f_t * dst, ne10_vec3f_t * src, const ne10_vec3f_t * cst, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_mulc_vec3f_neon (ne10_vec3f_t * dst, ne10_vec3f_t * src, const ne10_vec3f_t * cst, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_mulc_vec3f_asm (ne10_vec3f_t * dst, ne10_vec3f_t * src, const ne10_vec3f_t * cst, ne10_uint32_t count); andrewm@379: /** andrewm@379: * Multiplies the components of 4D vectors in an input array by the components of a constant 4D vector and stores the results in an output array. andrewm@379: * This function point could be pointed to one of ne10_mulc_vec4f_c, ne10_mulc_vec4f_neon and ne10_mulc_vec4f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src Pointer to the source array andrewm@379: * @param[in] cst Pointer to the 4D vector to multiply the input values with andrewm@379: * @param[in] count The number of items in the input array andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_mulc_vec4f) (ne10_vec4f_t * dst, ne10_vec4f_t * src, const ne10_vec4f_t * cst, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_mulc_vec4f_c (ne10_vec4f_t * dst, ne10_vec4f_t * src, const ne10_vec4f_t * cst, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_mulc_vec4f_neon (ne10_vec4f_t * dst, ne10_vec4f_t * src, const ne10_vec4f_t * cst, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_mulc_vec4f_asm (ne10_vec4f_t * dst, ne10_vec4f_t * src, const ne10_vec4f_t * cst, ne10_uint32_t count); andrewm@379: andrewm@379: /** andrewm@379: * Multiplies the elements of src1 by the elements of src2 and stores the results in the dst. andrewm@379: * This function point could be pointed to one of ne10_mul_float_c, ne10_mul_float_neon and ne10_mul_float_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src1 The first array to use as the input array andrewm@379: * @param[in] src2 The second array to use as the input array andrewm@379: * @param[in] count The number of items in the two input arrays andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_mul_float) (ne10_float32_t * dst, ne10_float32_t * src1, ne10_float32_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_mul_float_c (ne10_float32_t * dst, ne10_float32_t * src1, ne10_float32_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_mul_float_neon (ne10_float32_t * dst, ne10_float32_t * src1, ne10_float32_t * src2, ne10_uint32_t count) asm ("ne10_mul_float_neon"); andrewm@379: extern ne10_result_t ne10_mul_float_asm (ne10_float32_t * dst, ne10_float32_t * src1, ne10_float32_t * src2, ne10_uint32_t count); andrewm@379: /** andrewm@379: * Multiplies the components of a 2D vector with the corresponding components of another. andrewm@379: * This function point could be pointed to one of ne10_vmul_vec2f_c, ne10_vmul_vec2f_neon and ne10_vmul_vec2f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src1 Pointer to the first source array andrewm@379: * @param[in] src2 Pointer to the second source array andrewm@379: * @param[in] count The number of items in the input arrays andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_vmul_vec2f) (ne10_vec2f_t * dst, ne10_vec2f_t * src1, ne10_vec2f_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_vmul_vec2f_c (ne10_vec2f_t * dst, ne10_vec2f_t * src1, ne10_vec2f_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_vmul_vec2f_neon (ne10_vec2f_t * dst, ne10_vec2f_t * src1, ne10_vec2f_t * src2, ne10_uint32_t count) asm ("ne10_vmul_vec2f_neon"); andrewm@379: extern ne10_result_t ne10_vmul_vec2f_asm (ne10_vec2f_t * dst, ne10_vec2f_t * src1, ne10_vec2f_t * src2, ne10_uint32_t count); andrewm@379: /** andrewm@379: * Multiplies the components of a 3D vector with the corresponding components of another. andrewm@379: * This function point could be pointed to one of ne10_vmul_vec3f_c, ne10_vmul_vec3f_neon and ne10_vmul_vec3f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src1 Pointer to the first source array andrewm@379: * @param[in] src2 Pointer to the second source array andrewm@379: * @param[in] count The number of items in the input arrays andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_vmul_vec3f) (ne10_vec3f_t * dst, ne10_vec3f_t * src1, ne10_vec3f_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_vmul_vec3f_c (ne10_vec3f_t * dst, ne10_vec3f_t * src1, ne10_vec3f_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_vmul_vec3f_neon (ne10_vec3f_t * dst, ne10_vec3f_t * src1, ne10_vec3f_t * src2, ne10_uint32_t count) asm ("ne10_vmul_vec3f_neon"); andrewm@379: extern ne10_result_t ne10_vmul_vec3f_asm (ne10_vec3f_t * dst, ne10_vec3f_t * src1, ne10_vec3f_t * src2, ne10_uint32_t count); andrewm@379: /** andrewm@379: * Multiplies the components of a 4D vector with the corresponding components of another. andrewm@379: * This function point could be pointed to one of ne10_vmul_vec4f_c, ne10_vmul_vec4f_neon and ne10_vmul_vec4f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src1 Pointer to the first source array andrewm@379: * @param[in] src2 Pointer to the second source array andrewm@379: * @param[in] count The number of items in the input arrays andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_vmul_vec4f) (ne10_vec4f_t * dst, ne10_vec4f_t * src1, ne10_vec4f_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_vmul_vec4f_c (ne10_vec4f_t * dst, ne10_vec4f_t * src1, ne10_vec4f_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_vmul_vec4f_neon (ne10_vec4f_t * dst, ne10_vec4f_t * src1, ne10_vec4f_t * src2, ne10_uint32_t count) asm ("ne10_vmul_vec4f_neon"); andrewm@379: extern ne10_result_t ne10_vmul_vec4f_asm (ne10_vec4f_t * dst, ne10_vec4f_t * src1, ne10_vec4f_t * src2, ne10_uint32_t count); andrewm@379: /** @} */ //end of Vector Multiply group andrewm@379: andrewm@379: /** andrewm@379: * @ingroup groupMaths andrewm@379: */ andrewm@379: andrewm@379: /** andrewm@379: * @defgroup MLA_VEC Vector Multiply-Accumulator andrewm@379: * andrewm@379: * \par andrewm@379: * These functions implement the vector multiply-accumulator operation for float data type. andrewm@379: */ andrewm@379: andrewm@379: /** andrewm@379: * @addtogroup MLA_VEC andrewm@379: * @{ andrewm@379: */ andrewm@379: andrewm@379: /** andrewm@379: * Multiplies each entry in the source array (src) by cst, then adds the result to andrewm@379: * the corresponding item of the accumulation array (acc), and stores the result in the destination array. andrewm@379: * This function point could be pointed to one of ne10_mlac_float_c, ne10_mlac_float_neon and ne10_mlac_float_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] acc The corresponding elemetn is added to the result of the multiplication andrewm@379: * @param[in] src Pointer to the source array andrewm@379: * @param[in] cst The constant scalar to multiply the input elements with andrewm@379: * @param[in] count The number of items in the input array andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_mlac_float) (ne10_float32_t * dst, ne10_float32_t * acc, ne10_float32_t * src, const ne10_float32_t cst, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_mlac_float_c (ne10_float32_t * dst, ne10_float32_t * acc, ne10_float32_t * src, const ne10_float32_t cst, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_mlac_float_neon (ne10_float32_t * dst, ne10_float32_t * acc, ne10_float32_t * src, const ne10_float32_t cst, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_mlac_float_asm (ne10_float32_t * dst, ne10_float32_t * acc, ne10_float32_t * src, const ne10_float32_t cst, ne10_uint32_t count); andrewm@379: /** andrewm@379: * Multiplies each entry in the source array (src) by the 2D vector cst, then adds the result to andrewm@379: * the corresponding item of the accumulation array (acc), and stores the result in the destination array. andrewm@379: * This function point could be pointed to one of ne10_mlac_vec2f_c, ne10_mlac_vec2f_neon and ne10_mlac_vec2f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] acc The corresponding elemetn is added to the result of the multiplication andrewm@379: * @param[in] src Pointer to the source array andrewm@379: * @param[in] cst Pointer to the 2D vector to multiply the input vectors with andrewm@379: * @param[in] count The number of items in the input array andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_mlac_vec2f) (ne10_vec2f_t * dst, ne10_vec2f_t * acc, ne10_vec2f_t * src, const ne10_vec2f_t * cst, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_mlac_vec2f_c (ne10_vec2f_t * dst, ne10_vec2f_t * acc, ne10_vec2f_t * src, const ne10_vec2f_t * cst, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_mlac_vec2f_neon (ne10_vec2f_t * dst, ne10_vec2f_t * acc, ne10_vec2f_t * src, const ne10_vec2f_t * cst, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_mlac_vec2f_asm (ne10_vec2f_t * dst, ne10_vec2f_t * acc, ne10_vec2f_t * src, const ne10_vec2f_t * cst, ne10_uint32_t count); andrewm@379: /** andrewm@379: * Multiplies each entry in the source array (src) by the 3D vector cst, then adds the result to andrewm@379: * the corresponding item of the accumulation array (acc), and stores the result in the destination array. andrewm@379: * This function point could be pointed to one of ne10_mlac_vec3f_c, ne10_mlac_vec3f_neon and ne10_mlac_vec3f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] acc The corresponding elemetn is added to the result of the multiplication andrewm@379: * @param[in] src Pointer to the source array andrewm@379: * @param[in] cst Pointer to the 3D vector to multiply the input vectors with andrewm@379: * @param[in] count The number of items in the input array andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_mlac_vec3f) (ne10_vec3f_t * dst, ne10_vec3f_t * acc, ne10_vec3f_t * src, const ne10_vec3f_t * cst, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_mlac_vec3f_c (ne10_vec3f_t * dst, ne10_vec3f_t * acc, ne10_vec3f_t * src, const ne10_vec3f_t * cst, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_mlac_vec3f_neon (ne10_vec3f_t * dst, ne10_vec3f_t * acc, ne10_vec3f_t * src, const ne10_vec3f_t * cst, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_mlac_vec3f_asm (ne10_vec3f_t * dst, ne10_vec3f_t * acc, ne10_vec3f_t * src, const ne10_vec3f_t * cst, ne10_uint32_t count); andrewm@379: /** andrewm@379: * Multiplies each entry in the source array (src) by the 4D vector cst, then adds the result to andrewm@379: * the corresponding item of the accumulation array (acc), and stores the result in the destination array. andrewm@379: * This function point could be pointed to one of ne10_mlac_vec4f_c, ne10_mlac_vec4f_neon and ne10_mlac_vec4f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] acc The corresponding elemetn is added to the result of the multiplication andrewm@379: * @param[in] src Pointer to the source array andrewm@379: * @param[in] cst Pointer to the 4D vector to multiply the input vectors with andrewm@379: * @param[in] count The number of items in the input array andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_mlac_vec4f) (ne10_vec4f_t * dst, ne10_vec4f_t * acc, ne10_vec4f_t * src, const ne10_vec4f_t * cst, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_mlac_vec4f_c (ne10_vec4f_t * dst, ne10_vec4f_t * acc, ne10_vec4f_t * src, const ne10_vec4f_t * cst, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_mlac_vec4f_neon (ne10_vec4f_t * dst, ne10_vec4f_t * acc, ne10_vec4f_t * src, const ne10_vec4f_t * cst, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_mlac_vec4f_asm (ne10_vec4f_t * dst, ne10_vec4f_t * acc, ne10_vec4f_t * src, const ne10_vec4f_t * cst, ne10_uint32_t count); andrewm@379: andrewm@379: /** andrewm@379: * Performs a multiply and accumulate operation using the corresponding elements in acc, src1, and src2. andrewm@379: * This function point could be pointed to one of ne10_mla_float_c, ne10_mla_float_neon and ne10_mla_float_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] acc These elemtns are added to the result of the multiplication operation andrewm@379: * @param[in] src1 The first array to use as the input array andrewm@379: * @param[in] src2 The second array to use as the input array andrewm@379: * @param[in] count The number of items in the two input arrays andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_mla_float) (ne10_float32_t * dst, ne10_float32_t * acc, ne10_float32_t * src1, ne10_float32_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_mla_float_c (ne10_float32_t * dst, ne10_float32_t * acc, ne10_float32_t * src1, ne10_float32_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_mla_float_neon (ne10_float32_t * dst, ne10_float32_t * acc, ne10_float32_t * src1, ne10_float32_t * src2, ne10_uint32_t count) asm ("ne10_mla_float_neon"); andrewm@379: extern ne10_result_t ne10_mla_float_asm (ne10_float32_t * dst, ne10_float32_t * acc, ne10_float32_t * src1, ne10_float32_t * src2, ne10_uint32_t count); andrewm@379: /** andrewm@379: * Performs a multiply and accumulate operation on the components of a 2D vector with the corresponding components of another. andrewm@379: * This function point could be pointed to one of ne10_vmla_vec2f_c, ne10_vmla_vec2f_neon and ne10_vmla_vec2f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src1 Pointer to the first source array andrewm@379: * @param[in] src2 Pointer to the second source array andrewm@379: * @param[in] count The number of items in the input arrays andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_vmla_vec2f) (ne10_vec2f_t * dst, ne10_vec2f_t * acc, ne10_vec2f_t * src1, ne10_vec2f_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_vmla_vec2f_c (ne10_vec2f_t * dst, ne10_vec2f_t * acc, ne10_vec2f_t * src1, ne10_vec2f_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_vmla_vec2f_neon (ne10_vec2f_t * dst, ne10_vec2f_t * acc, ne10_vec2f_t * src1, ne10_vec2f_t * src2, ne10_uint32_t count) asm ("ne10_vmla_vec2f_neon"); andrewm@379: extern ne10_result_t ne10_vmla_vec2f_asm (ne10_vec2f_t * dst, ne10_vec2f_t * acc, ne10_vec2f_t * src1, ne10_vec2f_t * src2, ne10_uint32_t count); andrewm@379: /** andrewm@379: * Performs a multiply and accumulate operation on the components of a 3D vector with the corresponding components of another. andrewm@379: * This function point could be pointed to one of ne10_vmla_vec3f_c, ne10_vmla_vec3f_neon and ne10_vmla_vec3f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src1 Pointer to the first source array andrewm@379: * @param[in] src2 Pointer to the second source array andrewm@379: * @param[in] count The number of items in the input arrays andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_vmla_vec3f) (ne10_vec3f_t * dst, ne10_vec3f_t * acc, ne10_vec3f_t * src1, ne10_vec3f_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_vmla_vec3f_c (ne10_vec3f_t * dst, ne10_vec3f_t * acc, ne10_vec3f_t * src1, ne10_vec3f_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_vmla_vec3f_neon (ne10_vec3f_t * dst, ne10_vec3f_t * acc, ne10_vec3f_t * src1, ne10_vec3f_t * src2, ne10_uint32_t count) asm ("ne10_vmla_vec3f_neon"); andrewm@379: extern ne10_result_t ne10_vmla_vec3f_asm (ne10_vec3f_t * dst, ne10_vec3f_t * acc, ne10_vec3f_t * src1, ne10_vec3f_t * src2, ne10_uint32_t count); andrewm@379: /** andrewm@379: * Performs a multiply and accumulate operation on the components of a 4D vector with the corresponding components of another. andrewm@379: * This function point could be pointed to one of ne10_vmla_vec4f_c, ne10_vmla_vec4f_neon and ne10_vmla_vec4f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src1 Pointer to the first source array andrewm@379: * @param[in] src2 Pointer to the second source array andrewm@379: * @param[in] count The number of items in the input arrays andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_vmla_vec4f) (ne10_vec4f_t * dst, ne10_vec4f_t * acc, ne10_vec4f_t * src1, ne10_vec4f_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_vmla_vec4f_c (ne10_vec4f_t * dst, ne10_vec4f_t * acc, ne10_vec4f_t * src1, ne10_vec4f_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_vmla_vec4f_neon (ne10_vec4f_t * dst, ne10_vec4f_t * acc, ne10_vec4f_t * src1, ne10_vec4f_t * src2, ne10_uint32_t count) asm ("ne10_vmla_vec4f_neon"); andrewm@379: extern ne10_result_t ne10_vmla_vec4f_asm (ne10_vec4f_t * dst, ne10_vec4f_t * acc, ne10_vec4f_t * src1, ne10_vec4f_t * src2, ne10_uint32_t count); andrewm@379: /** @} */ //end of Vector Multiply-Accumulator group andrewm@379: andrewm@379: /** andrewm@379: * @ingroup groupMaths andrewm@379: */ andrewm@379: andrewm@379: /** andrewm@379: * @defgroup MUL_MAT Matrix Multiply andrewm@379: * andrewm@379: * \par andrewm@379: * These functions implement the matrix multiply operation for float data type. andrewm@379: */ andrewm@379: andrewm@379: /** andrewm@379: * @addtogroup MUL_MAT andrewm@379: * @{ andrewm@379: */ andrewm@379: andrewm@379: /** andrewm@379: * Matrix multiplication of two 4x4 matrixs. andrewm@379: * This function point could be pointed to one of ne10_mulmat_4x4f_c, ne10_mulmat_4x4f_neon and ne10_mulmat_4x4f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src1 Pointer to the first source array andrewm@379: * @param[in] src2 Pointer to the second source array andrewm@379: * @param[in] count The number of items in the input arrays andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_mulmat_4x4f) (ne10_mat4x4f_t * dst, ne10_mat4x4f_t * src1, ne10_mat4x4f_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_mulmat_4x4f_c (ne10_mat4x4f_t * dst, ne10_mat4x4f_t * src1, ne10_mat4x4f_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_mulmat_4x4f_neon (ne10_mat4x4f_t * dst, ne10_mat4x4f_t * src1, ne10_mat4x4f_t * src2, ne10_uint32_t count) asm ("ne10_mulmat_4x4f_neon"); andrewm@379: extern ne10_result_t ne10_mulmat_4x4f_asm (ne10_mat4x4f_t * dst, ne10_mat4x4f_t * src1, ne10_mat4x4f_t * src2, ne10_uint32_t count); andrewm@379: andrewm@379: /** andrewm@379: * Matrix multiplication of two 3x3 matrixs. andrewm@379: * This function point could be pointed to one of ne10_mulmat_3x3f_c, ne10_mulmat_3x3f_neon and ne10_mulmat_3x3f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src1 Pointer to the first source array andrewm@379: * @param[in] src2 Pointer to the second source array andrewm@379: * @param[in] count The number of items in the input arrays andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_mulmat_3x3f) (ne10_mat3x3f_t * dst, ne10_mat3x3f_t * src1, ne10_mat3x3f_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_mulmat_3x3f_c (ne10_mat3x3f_t * dst, ne10_mat3x3f_t * src1, ne10_mat3x3f_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_mulmat_3x3f_neon (ne10_mat3x3f_t * dst, ne10_mat3x3f_t * src1, ne10_mat3x3f_t * src2, ne10_uint32_t count) asm ("ne10_mulmat_3x3f_neon"); andrewm@379: extern ne10_result_t ne10_mulmat_3x3f_asm (ne10_mat3x3f_t * dst, ne10_mat3x3f_t * src1, ne10_mat3x3f_t * src2, ne10_uint32_t count); andrewm@379: andrewm@379: /** andrewm@379: * Matrix multiplication of two 2x2 matrixs. andrewm@379: * This function point could be pointed to one of ne10_mulmat_2x2f_c, ne10_mulmat_2x2f_neon and ne10_mulmat_2x2f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src1 Pointer to the first source array andrewm@379: * @param[in] src2 Pointer to the second source array andrewm@379: * @param[in] count The number of items in the input arrays andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_mulmat_2x2f) (ne10_mat2x2f_t * dst, ne10_mat2x2f_t * src1, ne10_mat2x2f_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_mulmat_2x2f_c (ne10_mat2x2f_t * dst, ne10_mat2x2f_t * src1, ne10_mat2x2f_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_mulmat_2x2f_neon (ne10_mat2x2f_t * dst, ne10_mat2x2f_t * src1, ne10_mat2x2f_t * src2, ne10_uint32_t count) asm ("ne10_mulmat_2x2f_neon"); andrewm@379: extern ne10_result_t ne10_mulmat_2x2f_asm (ne10_mat2x2f_t * dst, ne10_mat2x2f_t * src1, ne10_mat2x2f_t * src2, ne10_uint32_t count); andrewm@379: /** @} */ //end of Matrix Multiply group andrewm@379: andrewm@379: /** andrewm@379: * @ingroup groupMaths andrewm@379: */ andrewm@379: andrewm@379: /** andrewm@379: * @defgroup MUL_MAT_VEC Matrix Vector Multiply andrewm@379: * andrewm@379: * \par andrewm@379: * These functions implement the matrix vector multiply operation for float data type. andrewm@379: */ andrewm@379: andrewm@379: /** andrewm@379: * @addtogroup MUL_MAT_VEC andrewm@379: * @{ andrewm@379: */ andrewm@379: /** andrewm@379: * Matrix multiplication of 4x4 matrix and 4D vector. andrewm@379: * This function point could be pointed to one of ne10_mulcmatvec_cm4x4f_v4f_c, ne10_mulcmatvec_cm4x4f_v4f_neon and ne10_mulcmatvec_cm4x4f_v4f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] cst Pointer to the matrix to multiply the input values with andrewm@379: * @param[in] src Pointer to the source array andrewm@379: * @param[in] count The number of items in the input arrays andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_mulcmatvec_cm4x4f_v4f) (ne10_vec4f_t * dst, const ne10_mat4x4f_t * cst, ne10_vec4f_t * src, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_mulcmatvec_cm4x4f_v4f_c (ne10_vec4f_t * dst, const ne10_mat4x4f_t * cst, ne10_vec4f_t * src, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_mulcmatvec_cm4x4f_v4f_neon (ne10_vec4f_t * dst, const ne10_mat4x4f_t * cst, ne10_vec4f_t * src, ne10_uint32_t count) asm ("ne10_mulcmatvec_cm4x4f_v4f_neon"); andrewm@379: extern ne10_result_t ne10_mulcmatvec_cm4x4f_v4f_asm (ne10_vec4f_t * dst, const ne10_mat4x4f_t * cst, ne10_vec4f_t * src, ne10_uint32_t count); andrewm@379: /** andrewm@379: * Matrix multiplication of 3x3 matrix and 3D vector. andrewm@379: * This function point could be pointed to one of ne10_mulcmatvec_cm3x3f_v3f_c, ne10_mulcmatvec_cm3x3f_v3f_neon and ne10_mulcmatvec_cm3x3f_v3f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] cst Pointer to the matrix to multiply the input values with andrewm@379: * @param[in] src Pointer to the source array andrewm@379: * @param[in] count The number of items in the input arrays andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_mulcmatvec_cm3x3f_v3f) (ne10_vec3f_t * dst, const ne10_mat3x3f_t * cst, ne10_vec3f_t * src, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_mulcmatvec_cm3x3f_v3f_c (ne10_vec3f_t * dst, const ne10_mat3x3f_t * cst, ne10_vec3f_t * src, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_mulcmatvec_cm3x3f_v3f_neon (ne10_vec3f_t * dst, const ne10_mat3x3f_t * cst, ne10_vec3f_t * src, ne10_uint32_t count) asm ("ne10_mulcmatvec_cm3x3f_v3f_neon"); andrewm@379: extern ne10_result_t ne10_mulcmatvec_cm3x3f_v3f_asm (ne10_vec3f_t * dst, const ne10_mat3x3f_t * cst, ne10_vec3f_t * src, ne10_uint32_t count); andrewm@379: /** andrewm@379: * Matrix multiplication of 2x2 matrix and 2D vector. andrewm@379: * This function point could be pointed to one of ne10_mulcmatvec_cm2x2f_v2f_c, ne10_mulcmatvec_cm2x2f_v2f_neon and ne10_mulcmatvec_cm2x2f_v2f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] cst Pointer to the matrix to multiply the input values with andrewm@379: * @param[in] src Pointer to the source array andrewm@379: * @param[in] count The number of items in the input arrays andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_mulcmatvec_cm2x2f_v2f) (ne10_vec2f_t * dst, const ne10_mat2x2f_t * cst, ne10_vec2f_t * src, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_mulcmatvec_cm2x2f_v2f_c (ne10_vec2f_t * dst, const ne10_mat2x2f_t * cst, ne10_vec2f_t * src, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_mulcmatvec_cm2x2f_v2f_neon (ne10_vec2f_t * dst, const ne10_mat2x2f_t * cst, ne10_vec2f_t * src, ne10_uint32_t count) asm ("ne10_mulcmatvec_cm2x2f_v2f_neon"); andrewm@379: extern ne10_result_t ne10_mulcmatvec_cm2x2f_v2f_asm (ne10_vec2f_t * dst, const ne10_mat2x2f_t * cst, ne10_vec2f_t * src, ne10_uint32_t count); andrewm@379: andrewm@379: /** @} */ //end of Matrix Vector Multiply group andrewm@379: andrewm@379: /** andrewm@379: * @ingroup groupMaths andrewm@379: */ andrewm@379: andrewm@379: /** andrewm@379: * @defgroup DIV_VEC Vector Div andrewm@379: * andrewm@379: * \par andrewm@379: * These functions implement the vector division operation for float data type. andrewm@379: */ andrewm@379: andrewm@379: /** andrewm@379: * @addtogroup DIV_VEC andrewm@379: * @{ andrewm@379: */ andrewm@379: andrewm@379: /** andrewm@379: * Divides the elements of an input array by a constant scalar and stores the results in an output array. andrewm@379: * This function point could be pointed to one of ne10_divc_float_c, ne10_divc_float_neon and ne10_divc_float_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src Pointer to the source array andrewm@379: * @param[in] cst The constant scalar to divide the input values by andrewm@379: * @param[in] count The number of items in the input array andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_divc_float) (ne10_float32_t * dst, ne10_float32_t * src, const ne10_float32_t cst, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_divc_float_c (ne10_float32_t * dst, ne10_float32_t * src, const ne10_float32_t cst, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_divc_float_neon (ne10_float32_t * dst, ne10_float32_t * src, const ne10_float32_t cst, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_divc_float_asm (ne10_float32_t * dst, ne10_float32_t * src, const ne10_float32_t cst, ne10_uint32_t count); andrewm@379: /** andrewm@379: * Divides the components of 2D vectors in an input array with the components of a constant 2D vector and stores the results in an output array. andrewm@379: * This function point could be pointed to one of ne10_divc_vec2f_c, ne10_divc_vec2f_neon and ne10_divc_vec2f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src Pointer to the source array andrewm@379: * @param[in] cst Pointer to the 2D vector to divide the input values by andrewm@379: * @param[in] count The number of items in the input array andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_divc_vec2f) (ne10_vec2f_t * dst, ne10_vec2f_t * src, const ne10_vec2f_t * cst, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_divc_vec2f_c (ne10_vec2f_t * dst, ne10_vec2f_t * src, const ne10_vec2f_t * cst, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_divc_vec2f_neon (ne10_vec2f_t * dst, ne10_vec2f_t * src, const ne10_vec2f_t * cst, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_divc_vec2f_asm (ne10_vec2f_t * dst, ne10_vec2f_t * src, const ne10_vec2f_t * cst, ne10_uint32_t count); andrewm@379: /** andrewm@379: * Divides the components of 3D vectors in an input array with the components of a constant 3D vector and stores the results in an output array. andrewm@379: * This function point could be pointed to one of ne10_divc_vec3f_c, ne10_divc_vec3f_neon and ne10_divc_vec3f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src Pointer to the source array andrewm@379: * @param[in] cst Pointer to the 3D vector to divide the input values by andrewm@379: * @param[in] count The number of items in the input array andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_divc_vec3f) (ne10_vec3f_t * dst, ne10_vec3f_t * src, const ne10_vec3f_t * cst, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_divc_vec3f_c (ne10_vec3f_t * dst, ne10_vec3f_t * src, const ne10_vec3f_t * cst, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_divc_vec3f_neon (ne10_vec3f_t * dst, ne10_vec3f_t * src, const ne10_vec3f_t * cst, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_divc_vec3f_asm (ne10_vec3f_t * dst, ne10_vec3f_t * src, const ne10_vec3f_t * cst, ne10_uint32_t count); andrewm@379: /** andrewm@379: * Divides the components of 4D vectors in an input array with the components of a constant 4D vector and stores the results in an output array. andrewm@379: * This function point could be pointed to one of ne10_divc_vec4f_c, ne10_divc_vec4f_neon and ne10_divc_vec4f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src Pointer to the source array andrewm@379: * @param[in] cst Pointer to the 4D vector to divide the input values by andrewm@379: * @param[in] count The number of items in the input array andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_divc_vec4f) (ne10_vec4f_t * dst, ne10_vec4f_t * src, const ne10_vec4f_t * cst, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_divc_vec4f_c (ne10_vec4f_t * dst, ne10_vec4f_t * src, const ne10_vec4f_t * cst, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_divc_vec4f_neon (ne10_vec4f_t * dst, ne10_vec4f_t * src, const ne10_vec4f_t * cst, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_divc_vec4f_asm (ne10_vec4f_t * dst, ne10_vec4f_t * src, const ne10_vec4f_t * cst, ne10_uint32_t count); andrewm@379: /** andrewm@379: * Divides the elements of src1 by the elements of src2 and stores the results in the dst. andrewm@379: * This function point could be pointed to one of ne10_div_float_c, ne10_div_float_neon and ne10_div_float_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src1 The first array to use as the input array andrewm@379: * @param[in] src2 The second array to use as the input array andrewm@379: * @param[in] count The number of items in the two input arrays andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_div_float) (ne10_float32_t * dst, ne10_float32_t * src1, ne10_float32_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_div_float_c (ne10_float32_t * dst, ne10_float32_t * src1, ne10_float32_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_div_float_neon (ne10_float32_t * dst, ne10_float32_t * src1, ne10_float32_t * src2, ne10_uint32_t count) asm ("ne10_div_float_neon"); andrewm@379: extern ne10_result_t ne10_div_float_asm (ne10_float32_t * dst, ne10_float32_t * src1, ne10_float32_t * src2, ne10_uint32_t count); andrewm@379: /** andrewm@379: * Divides the components of a 2D vector with the corresponding components of another. andrewm@379: * This function point could be pointed to one of ne10_vdiv_vec2f_c, ne10_vdiv_vec2f_neon and ne10_vdiv_vec2f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src1 Pointer to the nominators' source array andrewm@379: * @param[in] src2 Pointer to the denominators' source array andrewm@379: * @param[in] count The number of items in the input arrays andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_vdiv_vec2f) (ne10_vec2f_t * dst, ne10_vec2f_t * src1, ne10_vec2f_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_vdiv_vec2f_c (ne10_vec2f_t * dst, ne10_vec2f_t * src1, ne10_vec2f_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_vdiv_vec2f_neon (ne10_vec2f_t * dst, ne10_vec2f_t * src1, ne10_vec2f_t * src2, ne10_uint32_t count) asm ("ne10_vdiv_vec2f_neon"); andrewm@379: extern ne10_result_t ne10_vdiv_vec2f_asm (ne10_vec2f_t * dst, ne10_vec2f_t * src1, ne10_vec2f_t * src2, ne10_uint32_t count); andrewm@379: /** andrewm@379: * Divides the components of a 3D vector with the corresponding components of another. andrewm@379: * This function point could be pointed to one of ne10_vdiv_vec3f_c, ne10_vdiv_vec3f_neon and ne10_vdiv_vec3f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src1 Pointer to the nominators' source array andrewm@379: * @param[in] src2 Pointer to the denominators' source array andrewm@379: * @param[in] count The number of items in the input arrays andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_vdiv_vec3f) (ne10_vec3f_t * dst, ne10_vec3f_t * src1, ne10_vec3f_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_vdiv_vec3f_c (ne10_vec3f_t * dst, ne10_vec3f_t * src1, ne10_vec3f_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_vdiv_vec3f_neon (ne10_vec3f_t * dst, ne10_vec3f_t * src1, ne10_vec3f_t * src2, ne10_uint32_t count) asm ("ne10_vdiv_vec3f_neon"); andrewm@379: extern ne10_result_t ne10_vdiv_vec3f_asm (ne10_vec3f_t * dst, ne10_vec3f_t * src1, ne10_vec3f_t * src2, ne10_uint32_t count); andrewm@379: /** andrewm@379: * Divides the components of a 4D vector with the corresponding components of another. andrewm@379: * This function point could be pointed to one of ne10_vdiv_vec4f_c, ne10_vdiv_vec4f_neon and ne10_vdiv_vec4f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src1 Pointer to the nominators' source array andrewm@379: * @param[in] src2 Pointer to the denominators' source array andrewm@379: * @param[in] count The number of items in the input arrays andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_vdiv_vec4f) (ne10_vec4f_t * dst, ne10_vec4f_t * src1, ne10_vec4f_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_vdiv_vec4f_c (ne10_vec4f_t * dst, ne10_vec4f_t * src1, ne10_vec4f_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_vdiv_vec4f_neon (ne10_vec4f_t * dst, ne10_vec4f_t * src1, ne10_vec4f_t * src2, ne10_uint32_t count) asm ("ne10_vdiv_vec4f_neon"); andrewm@379: extern ne10_result_t ne10_vdiv_vec4f_asm (ne10_vec4f_t * dst, ne10_vec4f_t * src1, ne10_vec4f_t * src2, ne10_uint32_t count); andrewm@379: /** @} */ //end of Vector Div group andrewm@379: andrewm@379: /** andrewm@379: * @ingroup groupMaths andrewm@379: */ andrewm@379: andrewm@379: /** andrewm@379: * @defgroup DIV_MAT Matrix Div andrewm@379: * andrewm@379: * \par andrewm@379: * These functions implement the matrix division operation for float data type. andrewm@379: */ andrewm@379: andrewm@379: /** andrewm@379: * @addtogroup DIV_MAT andrewm@379: * @{ andrewm@379: */ andrewm@379: andrewm@379: /** andrewm@379: * Divides the components of a 4x4 matrix with the corresponding components of another. andrewm@379: * This function point could be pointed to one of ne10_divmat_4x4f_c, ne10_divmat_4x4f_neon and ne10_divmat_4x4f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src1 Pointer to the nominators' source array andrewm@379: * @param[in] src2 Pointer to the denominators' source array andrewm@379: * @param[in] count The number of items in the input arrays andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_divmat_4x4f) (ne10_mat4x4f_t * dst, ne10_mat4x4f_t * src1, ne10_mat4x4f_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_divmat_4x4f_c (ne10_mat4x4f_t * dst, ne10_mat4x4f_t * src1, ne10_mat4x4f_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_divmat_4x4f_neon (ne10_mat4x4f_t * dst, ne10_mat4x4f_t * src1, ne10_mat4x4f_t * src2, ne10_uint32_t count) asm ("ne10_divmat_4x4f_neon"); andrewm@379: extern ne10_result_t ne10_divmat_4x4f_asm (ne10_mat4x4f_t * dst, ne10_mat4x4f_t * src1, ne10_mat4x4f_t * src2, ne10_uint32_t count); andrewm@379: /** andrewm@379: * Divides the components of a 3x3 matrix with the corresponding components of another. andrewm@379: * This function point could be pointed to one of ne10_divmat_3x3f_c, ne10_divmat_3x3f_neon and ne10_divmat_3x3f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src1 Pointer to the nominators' source array andrewm@379: * @param[in] src2 Pointer to the denominators' source array andrewm@379: * @param[in] count The number of items in the input arrays andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_divmat_3x3f) (ne10_mat3x3f_t * dst, ne10_mat3x3f_t * src1, ne10_mat3x3f_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_divmat_3x3f_c (ne10_mat3x3f_t * dst, ne10_mat3x3f_t * src1, ne10_mat3x3f_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_divmat_3x3f_neon (ne10_mat3x3f_t * dst, ne10_mat3x3f_t * src1, ne10_mat3x3f_t * src2, ne10_uint32_t count) asm ("ne10_divmat_3x3f_neon"); andrewm@379: extern ne10_result_t ne10_divmat_3x3f_asm (ne10_mat3x3f_t * dst, ne10_mat3x3f_t * src1, ne10_mat3x3f_t * src2, ne10_uint32_t count); andrewm@379: /** andrewm@379: * Divides the components of a 2x2 matrix with the corresponding components of another. andrewm@379: * This function point could be pointed to one of ne10_divmat_2x2f_c, ne10_divmat_2x2f_neon and ne10_divmat_2x2f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src1 Pointer to the nominators' source array andrewm@379: * @param[in] src2 Pointer to the denominators' source array andrewm@379: * @param[in] count The number of items in the input arrays andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_divmat_2x2f) (ne10_mat2x2f_t * dst, ne10_mat2x2f_t * src1, ne10_mat2x2f_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_divmat_2x2f_c (ne10_mat2x2f_t * dst, ne10_mat2x2f_t * src1, ne10_mat2x2f_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_divmat_2x2f_neon (ne10_mat2x2f_t * dst, ne10_mat2x2f_t * src1, ne10_mat2x2f_t * src2, ne10_uint32_t count) asm ("ne10_divmat_2x2f_neon"); andrewm@379: extern ne10_result_t ne10_divmat_2x2f_asm (ne10_mat2x2f_t * dst, ne10_mat2x2f_t * src1, ne10_mat2x2f_t * src2, ne10_uint32_t count); andrewm@379: /** @} */ //end of Matrix Div group andrewm@379: andrewm@379: /** andrewm@379: * @ingroup groupMaths andrewm@379: */ andrewm@379: andrewm@379: /** andrewm@379: * @defgroup SETC_VEC Vector Setc andrewm@379: * andrewm@379: * \par andrewm@379: * These functions implement vector setc operation for float data type. andrewm@379: */ andrewm@379: andrewm@379: /** andrewm@379: * @addtogroup SETC_VEC andrewm@379: * @{ andrewm@379: */ andrewm@379: andrewm@379: /** andrewm@379: * Sets the elements of an input array to a constant scalar and stores the results in an output array. andrewm@379: * This function point could be pointed to one of ne10_setc_float_c, ne10_setc_float_neon and ne10_setc_float_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] cst The constant scalar to set the input values to andrewm@379: * @param[in] count The number of items in the input array andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_setc_float) (ne10_float32_t * dst, const ne10_float32_t cst, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_setc_float_c (ne10_float32_t * dst, const ne10_float32_t cst, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_setc_float_neon (ne10_float32_t * dst, const ne10_float32_t cst, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_setc_float_asm (ne10_float32_t * dst, const ne10_float32_t cst, ne10_uint32_t count); andrewm@379: /** andrewm@379: * Sets the components of 2D vectors in an input array to the components of a constant 2D vector and stores the results in an output array. andrewm@379: * This function point could be pointed to one of ne10_setc_vec2f_c, ne10_setc_vec2f_neon and ne10_setc_vec2f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] cst Pointer to the 2D vector to set the input values to andrewm@379: * @param[in] count The number of items in the input array andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_setc_vec2f) (ne10_vec2f_t * dst, const ne10_vec2f_t * cst, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_setc_vec2f_c (ne10_vec2f_t * dst, const ne10_vec2f_t * cst, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_setc_vec2f_neon (ne10_vec2f_t * dst, const ne10_vec2f_t * cst, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_setc_vec2f_asm (ne10_vec2f_t * dst, const ne10_vec2f_t * cst, ne10_uint32_t count); andrewm@379: /** andrewm@379: * Sets the components of 3D vectors in an input array to the components of a constant 3D vector and stores the results in an output array. andrewm@379: * This function point could be pointed to one of ne10_setc_vec3f_c, ne10_setc_vec3f_neon and ne10_setc_vec3f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] cst Pointer to the 3D vector to set the input values to andrewm@379: * @param[in] count The number of items in the input array andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_setc_vec3f) (ne10_vec3f_t * dst, const ne10_vec3f_t * cst, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_setc_vec3f_c (ne10_vec3f_t * dst, const ne10_vec3f_t * cst, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_setc_vec3f_neon (ne10_vec3f_t * dst, const ne10_vec3f_t * cst, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_setc_vec3f_asm (ne10_vec3f_t * dst, const ne10_vec3f_t * cst, ne10_uint32_t count); andrewm@379: /** andrewm@379: * Sets the components of 4D vectors in an input array to the components of a constant 3D vector and stores the results in an output array. andrewm@379: * This function point could be pointed to one of ne10_setc_vec4f_c, ne10_setc_vec4f_neon and ne10_setc_vec4f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] cst Pointer to the 4D vector to set the input values to andrewm@379: * @param[in] count The number of items in the input array andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_setc_vec4f) (ne10_vec4f_t * dst, const ne10_vec4f_t * cst, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_setc_vec4f_c (ne10_vec4f_t * dst, const ne10_vec4f_t * cst, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_setc_vec4f_neon (ne10_vec4f_t * dst, const ne10_vec4f_t * cst, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_setc_vec4f_asm (ne10_vec4f_t * dst, const ne10_vec4f_t * cst, ne10_uint32_t count); andrewm@379: /** @} */ //end of Vector Setc group andrewm@379: andrewm@379: /** andrewm@379: * @ingroup groupMaths andrewm@379: */ andrewm@379: andrewm@379: /** andrewm@379: * @defgroup LEN_VEC Vector Len andrewm@379: * andrewm@379: * \par andrewm@379: * These functions implement vector len operation for float data type. andrewm@379: */ andrewm@379: andrewm@379: /** andrewm@379: * @addtogroup LEN_VEC andrewm@379: * @{ andrewm@379: */ andrewm@379: /** andrewm@379: * Returns length of 2D vectors in corresponding elements of the output array. andrewm@379: * This function point could be pointed to one of ne10_len_vec2f_c, ne10_len_vec2f_neon and ne10_len_vec2f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src Pointer to the source array andrewm@379: * @param[in] count The number of items in the input array andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_len_vec2f) (ne10_float32_t * dst, ne10_vec2f_t * src, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_len_vec2f_c (ne10_float32_t * dst, ne10_vec2f_t * src, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_len_vec2f_neon (ne10_float32_t * dst, ne10_vec2f_t * src, ne10_uint32_t count) asm ("ne10_len_vec2f_neon"); andrewm@379: extern ne10_result_t ne10_len_vec2f_asm (ne10_float32_t * dst, ne10_vec2f_t * src, ne10_uint32_t count); andrewm@379: /** andrewm@379: * Returns length of 3D vectors in corresponding elements of the output array. andrewm@379: * This function point could be pointed to one of ne10_len_vec3f_c, ne10_len_vec3f_neon and ne10_len_vec3f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src Pointer to the source array andrewm@379: * @param[in] count The number of items in the input array andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_len_vec3f) (ne10_float32_t * dst, ne10_vec3f_t * src, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_len_vec3f_c (ne10_float32_t * dst, ne10_vec3f_t * src, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_len_vec3f_neon (ne10_float32_t * dst, ne10_vec3f_t * src, ne10_uint32_t count) asm ("ne10_len_vec3f_neon"); andrewm@379: extern ne10_result_t ne10_len_vec3f_asm (ne10_float32_t * dst, ne10_vec3f_t * src, ne10_uint32_t count); andrewm@379: /** andrewm@379: * Returns length of 4D vectors in corresponding elements of the output array. andrewm@379: * This function point could be pointed to one of ne10_len_vec4f_c, ne10_len_vec4f_neon and ne10_len_vec4f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src Pointer to the source array andrewm@379: * @param[in] count The number of items in the input array andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_len_vec4f) (ne10_float32_t * dst, ne10_vec4f_t * src, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_len_vec4f_c (ne10_float32_t * dst, ne10_vec4f_t * src, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_len_vec4f_neon (ne10_float32_t * dst, ne10_vec4f_t * src, ne10_uint32_t count) asm ("ne10_len_vec4f_neon"); andrewm@379: extern ne10_result_t ne10_len_vec4f_asm (ne10_float32_t * dst, ne10_vec4f_t * src, ne10_uint32_t count); andrewm@379: /** @} */ //end of Vector Len group andrewm@379: andrewm@379: andrewm@379: /** andrewm@379: * @ingroup groupMaths andrewm@379: */ andrewm@379: andrewm@379: /** andrewm@379: * @defgroup NORM_VEC Vector Normalize andrewm@379: * andrewm@379: * \par andrewm@379: * These functions implement vector normalize operation for float data type. andrewm@379: */ andrewm@379: andrewm@379: /** andrewm@379: * @addtogroup NORM_VEC andrewm@379: * @{ andrewm@379: */ andrewm@379: /** andrewm@379: * Normalizes 2D vectors of the input array and stores them in the corresponding elements of the output array. andrewm@379: * This function point could be pointed to one of ne10_normalize_vec2f_c, ne10_normalize_vec2f_neon and ne10_normalize_vec2f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src Pointer to the source array andrewm@379: * @param[in] count The number of items in the input array andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_normalize_vec2f) (ne10_vec2f_t * dst, ne10_vec2f_t * src, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_normalize_vec2f_c (ne10_vec2f_t * dst, ne10_vec2f_t * src, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_normalize_vec2f_neon (ne10_vec2f_t * dst, ne10_vec2f_t * src, ne10_uint32_t count) asm ("ne10_normalize_vec2f_neon"); andrewm@379: extern ne10_result_t ne10_normalize_vec2f_asm (ne10_vec2f_t * dst, ne10_vec2f_t * src, ne10_uint32_t count); andrewm@379: /** andrewm@379: * Normalizes 3D vectors of the input array and stores them in the corresponding elements of the output array. andrewm@379: * This function point could be pointed to one of ne10_normalize_vec3f_c, ne10_normalize_vec3f_neon and ne10_normalize_vec3f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src Pointer to the source array andrewm@379: * @param[in] count The number of items in the input array andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_normalize_vec3f) (ne10_vec3f_t * dst, ne10_vec3f_t * src, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_normalize_vec3f_c (ne10_vec3f_t * dst, ne10_vec3f_t * src, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_normalize_vec3f_neon (ne10_vec3f_t * dst, ne10_vec3f_t * src, ne10_uint32_t count) asm ("ne10_normalize_vec3f_neon"); andrewm@379: extern ne10_result_t ne10_normalize_vec3f_asm (ne10_vec3f_t * dst, ne10_vec3f_t * src, ne10_uint32_t count); andrewm@379: /** andrewm@379: * Normalizes 4D vectors of the input array and stores them in the corresponding elements of the output array. andrewm@379: * This function point could be pointed to one of ne10_normalize_vec4f_c, ne10_normalize_vec4f_neon and ne10_normalize_vec4f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src Pointer to the source array andrewm@379: * @param[in] count The number of items in the input array andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_normalize_vec4f) (ne10_vec4f_t * dst, ne10_vec4f_t * src, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_normalize_vec4f_c (ne10_vec4f_t * dst, ne10_vec4f_t * src, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_normalize_vec4f_neon (ne10_vec4f_t * dst, ne10_vec4f_t * src, ne10_uint32_t count) asm ("ne10_normalize_vec4f_neon"); andrewm@379: extern ne10_result_t ne10_normalize_vec4f_asm (ne10_vec4f_t * dst, ne10_vec4f_t * src, ne10_uint32_t count); andrewm@379: /** @} */ //end of Vector Normalize group andrewm@379: andrewm@379: andrewm@379: /** andrewm@379: * @ingroup groupMaths andrewm@379: */ andrewm@379: andrewm@379: /** andrewm@379: * @defgroup ABS_VEC Vector Abs andrewm@379: * andrewm@379: * \par andrewm@379: * These functions implement vector abs operation for float data type. andrewm@379: */ andrewm@379: andrewm@379: /** andrewm@379: * @addtogroup ABS_VEC andrewm@379: * @{ andrewm@379: */ andrewm@379: andrewm@379: /** andrewm@379: * Calculates the absolute value of each element in the source array and stores the result in the corresponding entry of the destination array. andrewm@379: * This function point could be pointed to one of ne10_abs_float_c, ne10_abs_float_neon and ne10_abs_float_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src Pointer to the source array andrewm@379: * @param[in] count The number of items in the input array andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_abs_float) (ne10_float32_t * dst, ne10_float32_t * src, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_abs_float_c (ne10_float32_t * dst, ne10_float32_t * src, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_abs_float_neon (ne10_float32_t * dst, ne10_float32_t * src, ne10_uint32_t count) asm ("ne10_abs_float_neon"); andrewm@379: extern ne10_result_t ne10_abs_float_asm (ne10_float32_t * dst, ne10_float32_t * src, ne10_uint32_t count); andrewm@379: /** andrewm@379: * Generates a 2D vector from the absolute values of each of the components of an input vector. andrewm@379: * This function point could be pointed to one of ne10_abs_vec2f_c, ne10_abs_vec2f_neon and ne10_abs_vec2f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src Pointer to the source array andrewm@379: * @param[in] count The number of items in the input array andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_abs_vec2f) (ne10_vec2f_t * dst, ne10_vec2f_t * src, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_abs_vec2f_c (ne10_vec2f_t * dst, ne10_vec2f_t * src, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_abs_vec2f_neon (ne10_vec2f_t * dst, ne10_vec2f_t * src, ne10_uint32_t count) asm ("ne10_abs_vec2f_neon"); andrewm@379: extern ne10_result_t ne10_abs_vec2f_asm (ne10_vec2f_t * dst, ne10_vec2f_t * src, ne10_uint32_t count); andrewm@379: /** andrewm@379: * Generates a 3D vector from the absolute values of each of the components of an input vector. andrewm@379: * This function point could be pointed to one of ne10_abs_vec3f_c, ne10_abs_vec3f_neon and ne10_abs_vec3f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src Pointer to the source array andrewm@379: * @param[in] count The number of items in the input array andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_abs_vec3f) (ne10_vec3f_t * dst, ne10_vec3f_t * src, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_abs_vec3f_c (ne10_vec3f_t * dst, ne10_vec3f_t * src, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_abs_vec3f_neon (ne10_vec3f_t * dst, ne10_vec3f_t * src, ne10_uint32_t count) asm ("ne10_abs_vec3f_neon"); andrewm@379: extern ne10_result_t ne10_abs_vec3f_asm (ne10_vec3f_t * dst, ne10_vec3f_t * src, ne10_uint32_t count); andrewm@379: /** andrewm@379: * Generates a 4D vector from the absolute values of each of the components of an input vector. andrewm@379: * This function point could be pointed to one of ne10_abs_vec4f_c, ne10_abs_vec4f_neon and ne10_abs_vec4f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src Pointer to the source array andrewm@379: * @param[in] count The number of items in the input array andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_abs_vec4f) (ne10_vec4f_t * dst, ne10_vec4f_t * src, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_abs_vec4f_c (ne10_vec4f_t * dst, ne10_vec4f_t * src, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_abs_vec4f_neon (ne10_vec4f_t * dst, ne10_vec4f_t * src, ne10_uint32_t count) asm ("ne10_abs_vec4f_neon"); andrewm@379: extern ne10_result_t ne10_abs_vec4f_asm (ne10_vec4f_t * dst, ne10_vec4f_t * src, ne10_uint32_t count); andrewm@379: /** @} */ //end of Vector Abs group andrewm@379: andrewm@379: /** andrewm@379: * @ingroup groupMaths andrewm@379: */ andrewm@379: andrewm@379: /** andrewm@379: * @defgroup DOT_VEC Vector Dot andrewm@379: * andrewm@379: * \par andrewm@379: * These functions implement vector dot operation for float data type. andrewm@379: */ andrewm@379: andrewm@379: /** andrewm@379: * @addtogroup DOT_VEC andrewm@379: * @{ andrewm@379: */ andrewm@379: /** andrewm@379: * Dot product of two 2D vectors. andrewm@379: * This function point could be pointed to one of ne10_dot_vec2f_c, ne10_dot_vec2f_neon and ne10_dot_vec2f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src1 Pointer to the first source array andrewm@379: * @param[in] src2 Pointer to the second source array andrewm@379: * @param[in] count The number of items in the input arrays andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_dot_vec2f) (ne10_float32_t * dst, ne10_vec2f_t * src1, ne10_vec2f_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_dot_vec2f_c (ne10_float32_t * dst, ne10_vec2f_t * src1, ne10_vec2f_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_dot_vec2f_neon (ne10_float32_t * dst, ne10_vec2f_t * src1, ne10_vec2f_t * src2, ne10_uint32_t count) asm ("ne10_dot_vec2f_neon"); andrewm@379: extern ne10_result_t ne10_dot_vec2f_asm (ne10_float32_t * dst, ne10_vec2f_t * src1, ne10_vec2f_t * src2, ne10_uint32_t count); andrewm@379: /** andrewm@379: * Dot product of two 3D vectors. andrewm@379: * This function point could be pointed to one of ne10_dot_vec3f_c, ne10_dot_vec3f_neon and ne10_dot_vec3f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src1 Pointer to the first source array andrewm@379: * @param[in] src2 Pointer to the second source array andrewm@379: * @param[in] count The number of items in the input arrays andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_dot_vec3f) (ne10_float32_t * dst, ne10_vec3f_t * src1, ne10_vec3f_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_dot_vec3f_c (ne10_float32_t * dst, ne10_vec3f_t * src1, ne10_vec3f_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_dot_vec3f_neon (ne10_float32_t * dst, ne10_vec3f_t * src1, ne10_vec3f_t * src2, ne10_uint32_t count) asm ("ne10_dot_vec3f_neon"); andrewm@379: extern ne10_result_t ne10_dot_vec3f_asm (ne10_float32_t * dst, ne10_vec3f_t * src1, ne10_vec3f_t * src2, ne10_uint32_t count); andrewm@379: /** andrewm@379: * Dot product of two 4D vectors. andrewm@379: * This function point could be pointed to one of ne10_dot_vec4f_c, ne10_dot_vec4f_neon and ne10_dot_vec4f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src1 Pointer to the first source array andrewm@379: * @param[in] src2 Pointer to the second source array andrewm@379: * @param[in] count The number of items in the input arrays andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_dot_vec4f) (ne10_float32_t * dst, ne10_vec4f_t * src1, ne10_vec4f_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_dot_vec4f_c (ne10_float32_t * dst, ne10_vec4f_t * src1, ne10_vec4f_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_dot_vec4f_neon (ne10_float32_t * dst, ne10_vec4f_t * src1, ne10_vec4f_t * src2, ne10_uint32_t count) asm ("ne10_dot_vec4f_neon"); andrewm@379: extern ne10_result_t ne10_dot_vec4f_asm (ne10_float32_t * dst, ne10_vec4f_t * src1, ne10_vec4f_t * src2, ne10_uint32_t count); andrewm@379: /** @} */ //end of Vector Dot group andrewm@379: andrewm@379: andrewm@379: /** andrewm@379: * @ingroup groupMaths andrewm@379: */ andrewm@379: andrewm@379: /** andrewm@379: * @defgroup CROSS_VEC Vector Cross andrewm@379: * andrewm@379: * \par andrewm@379: * These functions implement vector cross operation for float data type. andrewm@379: */ andrewm@379: andrewm@379: /** andrewm@379: * @addtogroup CROSS_VEC andrewm@379: * @{ andrewm@379: */ andrewm@379: andrewm@379: /** andrewm@379: * Performs a cross product operation on the two input vectors. andrewm@379: * This function point could be pointed to one of ne10_cross_vec3f_c, ne10_cross_vec3f_neon and ne10_cross_vec3f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src1 Pointer to the first source array andrewm@379: * @param[in] src2 Pointer to the second source array andrewm@379: * @param[in] count The number of items in the input arrays andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_cross_vec3f) (ne10_vec3f_t * dst, ne10_vec3f_t * src1, ne10_vec3f_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_cross_vec3f_c (ne10_vec3f_t * dst, ne10_vec3f_t * src1, ne10_vec3f_t * src2, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_cross_vec3f_neon (ne10_vec3f_t * dst, ne10_vec3f_t * src1, ne10_vec3f_t * src2, ne10_uint32_t count) asm ("ne10_cross_vec3f_neon"); andrewm@379: extern ne10_result_t ne10_cross_vec3f_asm (ne10_vec3f_t * dst, ne10_vec3f_t * src1, ne10_vec3f_t * src2, ne10_uint32_t count); andrewm@379: /** @} */ //end of Vector Cross group andrewm@379: andrewm@379: /** andrewm@379: * @ingroup groupMaths andrewm@379: */ andrewm@379: andrewm@379: /** andrewm@379: * @defgroup DET_MAT Matrix Determinant andrewm@379: * andrewm@379: * \par andrewm@379: * These functions implement matrix determinant operation for float data type. andrewm@379: */ andrewm@379: andrewm@379: /** andrewm@379: * @addtogroup DET_MAT andrewm@379: * @{ andrewm@379: */ andrewm@379: andrewm@379: /** andrewm@379: * Calculate the determinant of a 4x4 matrix. andrewm@379: * This function point could be pointed to one of ne10_detmat_4x4f_c, ne10_detmat_4x4f_neon and ne10_detmat_4x4f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src Pointer to the source array andrewm@379: * @param[in] count The number of items in the input array andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_detmat_4x4f) (ne10_float32_t * dst, ne10_mat4x4f_t * src, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_detmat_4x4f_c (ne10_float32_t * dst, ne10_mat4x4f_t * src, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_detmat_4x4f_neon (ne10_float32_t * dst, ne10_mat4x4f_t * src, ne10_uint32_t count) asm ("ne10_detmat_4x4f_neon"); andrewm@379: extern ne10_result_t ne10_detmat_4x4f_asm (ne10_float32_t * dst, ne10_mat4x4f_t * src, ne10_uint32_t count); andrewm@379: /** andrewm@379: * Calculate the determinant of a 3x3 matrix. andrewm@379: * This function point could be pointed to one of ne10_detmat_3x3f_c, ne10_detmat_3x3f_neon and ne10_detmat_3x3f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src Pointer to the source array andrewm@379: * @param[in] count The number of items in the input array andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_detmat_3x3f) (ne10_float32_t * dst, ne10_mat3x3f_t * src, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_detmat_3x3f_c (ne10_float32_t * dst, ne10_mat3x3f_t * src, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_detmat_3x3f_neon (ne10_float32_t * dst, ne10_mat3x3f_t * src, ne10_uint32_t count) asm ("ne10_detmat_3x3f_neon"); andrewm@379: extern ne10_result_t ne10_detmat_3x3f_asm (ne10_float32_t * dst, ne10_mat3x3f_t * src, ne10_uint32_t count); andrewm@379: /** andrewm@379: * Calculate the determinant of a 2x2 matrix. andrewm@379: * This function point could be pointed to one of ne10_detmat_2x2f_c, ne10_detmat_2x2f_neon and ne10_detmat_2x2f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src Pointer to the source array andrewm@379: * @param[in] count The number of items in the input array andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_detmat_2x2f) (ne10_float32_t * dst, ne10_mat2x2f_t * src, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_detmat_2x2f_c (ne10_float32_t * dst, ne10_mat2x2f_t * src, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_detmat_2x2f_neon (ne10_float32_t * dst, ne10_mat2x2f_t * src, ne10_uint32_t count) asm ("ne10_detmat_2x2f_neon"); andrewm@379: extern ne10_result_t ne10_detmat_2x2f_asm (ne10_float32_t * dst, ne10_mat2x2f_t * src, ne10_uint32_t count); andrewm@379: /** @} */ //end of Matrix Determinant group andrewm@379: andrewm@379: /** andrewm@379: * @ingroup groupMaths andrewm@379: */ andrewm@379: andrewm@379: /** andrewm@379: * @defgroup INV_MAT Matrix Invertible andrewm@379: * andrewm@379: * \par andrewm@379: * These functions implement matrix invertible operation for float data type. andrewm@379: */ andrewm@379: andrewm@379: /** andrewm@379: * @addtogroup INV_MAT andrewm@379: * @{ andrewm@379: */ andrewm@379: /** andrewm@379: * Calculate the invertible matrix of a 4x4 matrix. andrewm@379: * This function point could be pointed to one of ne10_invmat_4x4f_c, ne10_invmat_4x4f_neon and ne10_invmat_4x4f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src Pointer to the source array andrewm@379: * @param[in] count The number of items in the input array andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_invmat_4x4f) (ne10_mat4x4f_t * dst, ne10_mat4x4f_t * src, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_invmat_4x4f_c (ne10_mat4x4f_t * dst, ne10_mat4x4f_t * src, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_invmat_4x4f_neon (ne10_mat4x4f_t * dst, ne10_mat4x4f_t * src, ne10_uint32_t count) asm ("ne10_invmat_4x4f_neon"); andrewm@379: extern ne10_result_t ne10_invmat_4x4f_asm (ne10_mat4x4f_t * dst, ne10_mat4x4f_t * src, ne10_uint32_t count); andrewm@379: /** andrewm@379: * Calculate the invertible matrix of a 3x3 matrix. andrewm@379: * This function point could be pointed to one of ne10_invmat_3x3f_c, ne10_invmat_3x3f_neon and ne10_invmat_3x3f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src Pointer to the source array andrewm@379: * @param[in] count The number of items in the input array andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_invmat_3x3f) (ne10_mat3x3f_t * dst, ne10_mat3x3f_t * src, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_invmat_3x3f_c (ne10_mat3x3f_t * dst, ne10_mat3x3f_t * src, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_invmat_3x3f_neon (ne10_mat3x3f_t * dst, ne10_mat3x3f_t * src, ne10_uint32_t count) asm ("ne10_invmat_3x3f_neon"); andrewm@379: extern ne10_result_t ne10_invmat_3x3f_asm (ne10_mat3x3f_t * dst, ne10_mat3x3f_t * src, ne10_uint32_t count); andrewm@379: /** andrewm@379: * Calculate the invertible matrix of a 2x2 matrix. andrewm@379: * This function point could be pointed to one of ne10_invmat_2x2f_c, ne10_invmat_2x2f_neon and ne10_invmat_2x2f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src Pointer to the source array andrewm@379: * @param[in] count The number of items in the input array andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_invmat_2x2f) (ne10_mat2x2f_t * dst, ne10_mat2x2f_t * src, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_invmat_2x2f_c (ne10_mat2x2f_t * dst, ne10_mat2x2f_t * src, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_invmat_2x2f_neon (ne10_mat2x2f_t * dst, ne10_mat2x2f_t * src, ne10_uint32_t count) asm ("ne10_invmat_2x2f_neon"); andrewm@379: extern ne10_result_t ne10_invmat_2x2f_asm (ne10_mat2x2f_t * dst, ne10_mat2x2f_t * src, ne10_uint32_t count); andrewm@379: /** @} */ //end of Matrix Invertible group andrewm@379: andrewm@379: /** andrewm@379: * @ingroup groupMaths andrewm@379: */ andrewm@379: andrewm@379: /** andrewm@379: * @defgroup TRANS_MAT Matrix Transpose andrewm@379: * andrewm@379: * \par andrewm@379: * These functions implement matrix transpose operation for float data type. andrewm@379: */ andrewm@379: andrewm@379: /** andrewm@379: * @addtogroup TRANS_MAT andrewm@379: * @{ andrewm@379: */ andrewm@379: /** andrewm@379: * Calculate the transpose matrix of a 4x4 matrix. andrewm@379: * This function point could be pointed to one of ne10_transmat_4x4f_c, ne10_transmat_4x4f_neon and ne10_transmat_4x4f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src Pointer to the source array andrewm@379: * @param[in] count The number of items in the input array andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_transmat_4x4f) (ne10_mat4x4f_t * dst, ne10_mat4x4f_t * src, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_transmat_4x4f_c (ne10_mat4x4f_t * dst, ne10_mat4x4f_t * src, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_transmat_4x4f_neon (ne10_mat4x4f_t * dst, ne10_mat4x4f_t * src, ne10_uint32_t count) asm ("ne10_transmat_4x4f_neon"); andrewm@379: extern ne10_result_t ne10_transmat_4x4f_asm (ne10_mat4x4f_t * dst, ne10_mat4x4f_t * src, ne10_uint32_t count); andrewm@379: /** andrewm@379: * Calculate the transpose matrix of a 4x4 matrix. andrewm@379: * This function point could be pointed to one of ne10_transmat_4x4f_c, ne10_transmat_4x4f_neon and ne10_transmat_4x4f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src Pointer to the source array andrewm@379: * @param[in] count The number of items in the input array andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_transmat_3x3f) (ne10_mat3x3f_t * dst, ne10_mat3x3f_t * src, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_transmat_3x3f_c (ne10_mat3x3f_t * dst, ne10_mat3x3f_t * src, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_transmat_3x3f_neon (ne10_mat3x3f_t * dst, ne10_mat3x3f_t * src, ne10_uint32_t count) asm ("ne10_transmat_3x3f_neon"); andrewm@379: extern ne10_result_t ne10_transmat_3x3f_asm (ne10_mat3x3f_t * dst, ne10_mat3x3f_t * src, ne10_uint32_t count); andrewm@379: /** andrewm@379: * Calculate the transpose matrix of a 3x3 matrix. andrewm@379: * This function point could be pointed to one of ne10_transmat_3x3f_c, ne10_transmat_3x3f_neon and ne10_transmat_3x3f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] src Pointer to the source array andrewm@379: * @param[in] count The number of items in the input array andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_transmat_2x2f) (ne10_mat2x2f_t * dst, ne10_mat2x2f_t * src, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_transmat_2x2f_c (ne10_mat2x2f_t * dst, ne10_mat2x2f_t * src, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_transmat_2x2f_neon (ne10_mat2x2f_t * dst, ne10_mat2x2f_t * src, ne10_uint32_t count) asm ("ne10_transmat_2x2f_neon"); andrewm@379: extern ne10_result_t ne10_trans_mat2x2f_asm (ne10_mat2x2f_t * dst, ne10_mat2x2f_t * src, ne10_uint32_t count); andrewm@379: /** @} */ //end of Matrix Transpose group andrewm@379: andrewm@379: /** andrewm@379: * @ingroup groupMaths andrewm@379: */ andrewm@379: andrewm@379: /** andrewm@379: * @defgroup IDENTITY_MAT Matrix Identity andrewm@379: * andrewm@379: * \par andrewm@379: * These functions implement matrix identity operation for float data type. andrewm@379: */ andrewm@379: andrewm@379: /** andrewm@379: * @addtogroup IDENTITY_MAT andrewm@379: * @{ andrewm@379: */ andrewm@379: /** andrewm@379: * Set the identity matrix of a 2x2 matrix. andrewm@379: * This function point could be pointed to one of ne10_identitymat_2x2f_c, ne10_identitymat_2x2f_neon and ne10_identitymat_2x2f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] count The number of items in the input array andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_identitymat_4x4f) (ne10_mat4x4f_t * dst, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_identitymat_4x4f_c (ne10_mat4x4f_t * dst, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_identitymat_4x4f_neon (ne10_mat4x4f_t * dst, ne10_uint32_t count) asm ("ne10_identitymat_4x4f_neon"); andrewm@379: extern ne10_result_t ne10_identitymat_4x4f_asm (ne10_mat4x4f_t * dst, ne10_uint32_t count); andrewm@379: /** andrewm@379: * Set the identity matrix of a 3x3 matrix. andrewm@379: * This function point could be pointed to one of ne10_identitymat_3x3f_c, ne10_identitymat_3x3f_neon and ne10_identitymat_3x3f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] count The number of items in the input array andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_identitymat_3x3f) (ne10_mat3x3f_t * dst, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_identitymat_3x3f_c (ne10_mat3x3f_t * dst, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_identitymat_3x3f_neon (ne10_mat3x3f_t * dst, ne10_uint32_t count) asm ("ne10_identitymat_3x3f_neon"); andrewm@379: extern ne10_result_t ne10_identitymat_3x3f_asm (ne10_mat3x3f_t * dst, ne10_uint32_t count); andrewm@379: /** andrewm@379: * Set the identity matrix of a 2x2 matrix. andrewm@379: * This function point could be pointed to one of ne10_identitymat_2x2f_c, ne10_identitymat_2x2f_neon and ne10_identitymat_2x2f_asm. andrewm@379: * @param[out] dst Pointer to the destination array andrewm@379: * @param[in] count The number of items in the input array andrewm@379: */ andrewm@379: extern ne10_result_t (*ne10_identitymat_2x2f) (ne10_mat2x2f_t * dst, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_identitymat_2x2f_c (ne10_mat2x2f_t * dst, ne10_uint32_t count); andrewm@379: extern ne10_result_t ne10_identitymat_2x2f_neon (ne10_mat2x2f_t * dst, ne10_uint32_t count) asm ("ne10_identitymat_2x2f_neon"); andrewm@379: extern ne10_result_t ne10_identity_mat2x2f_asm (ne10_mat2x2f_t * dst, ne10_uint32_t count); andrewm@379: /** @} */ //end of Matrix Identity group andrewm@379: andrewm@379: #ifdef __cplusplus andrewm@379: } andrewm@379: #endif andrewm@379: andrewm@379: #endif