MATHLIB User Guide
MATHLIB_sqrt.h
Go to the documentation of this file.
1 /*******************************************************************************
2 **+--------------------------------------------------------------------------+**
3 **| **** |**
4 **| **** |**
5 **| ******o*** |**
6 **| ********_///_**** |**
7 **| ***** /_//_/ **** |**
8 **| ** ** (__/ **** |**
9 **| ********* |**
10 **| **** |**
11 **| *** |**
12 **| |**
13 **| Copyright (c) 2016 Texas Instruments Incorporated |**
14 **| |**
15 **| All rights reserved not granted herein. |**
16 **| |**
17 **| Limited License. |**
18 **| |**
19 **| Texas Instruments Incorporated grants a world-wide, royalty-free, |**
20 **| non-exclusive license under copyrights and patents it now or |**
21 **| hereafter owns or controls to make, have made, use, import, offer to |**
22 **| sell and sell ("Utilize") this software subject to the terms herein. |**
23 **| With respect to the foregoing patent license, such license is granted |**
24 **| solely to the extent that any such patent is necessary to Utilize the |**
25 **| software alone. The patent license shall not apply to any |**
26 **| combinations which include this software, other than combinations |**
27 **| with devices manufactured by or for TI ("TI Devices"). No hardware |**
28 **| patent is licensed hereunder. |**
29 **| |**
30 **| Redistributions must preserve existing copyright notices and |**
31 **| reproduce this license (including the above copyright notice and the |**
32 **| disclaimer and (if applicable) source code license limitations below) |**
33 **| in the documentation and/or other materials provided with the |**
34 **| distribution |**
35 **| |**
36 **| Redistribution and use in binary form, without modification, are |**
37 **| permitted provided that the following conditions are met: |**
38 **| |**
39 **| * No reverse engineering, decompilation, or disassembly of this |**
40 **| software is permitted with respect to any software provided in binary |**
41 **| form. |**
42 **| |**
43 **| * any redistribution and use are licensed by TI for use only with |**
44 **| TI Devices. |**
45 **| |**
46 **| * Nothing shall obligate TI to provide you with source code for |**
47 **| the software licensed and provided to you in object code. |**
48 **| |**
49 **| If software source code is provided to you, modification and |**
50 **| redistribution of the source code are permitted provided that the |**
51 **| following conditions are met: |**
52 **| |**
53 **| * any redistribution and use of the source code, including any |**
54 **| resulting derivative works, are licensed by TI for use only with TI |**
55 **| Devices. |**
56 **| |**
57 **| * any redistribution and use of any object code compiled from the |**
58 **| source code and any resulting derivative works, are licensed by TI |**
59 **| for use only with TI Devices. |**
60 **| |**
61 **| Neither the name of Texas Instruments Incorporated nor the names of |**
62 **| its suppliers may be used to endorse or promote products derived from |**
63 **| this software without specific prior written permission. |**
64 **| |**
65 **| DISCLAIMER. |**
66 **| |**
67 **| THIS SOFTWARE IS PROVIDED BY TI AND TI'S LICENSORS "AS IS" AND ANY |**
68 **| EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |**
69 **| IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |**
70 **| PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL TI AND TI'S LICENSORS BE |**
71 **| LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |**
72 **| CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |**
73 **| SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR |**
74 **| BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, |**
75 **| WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE |**
76 **| OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, |**
77 **| EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |**
78 **+--------------------------------------------------------------------------+**
79 *******************************************************************************/
80 
81 #ifndef MATHLIB_SQRT_IXX_IXX_OXX_H_
82 #define MATHLIB_SQRT_IXX_IXX_OXX_H_
83 
84 #include "../../common/MATHLIB_types.h"
85 
86 #ifdef __cplusplus
87 extern "C" {
88 #endif
89 
103 /* @{ */
104 
105 
109 typedef struct
110 {
112  int8_t funcStyle;
114  uint32_t dataSize;
116 
126  MATHLIB_sqrt_InitArgs *pKerInitArgs);
127 
150  MATHLIB_kernelHandle handle,
151  MATHLIB_bufParams1D_t * bufParamsIn,
152  MATHLIB_bufParams1D_t * bufParamsOut,
153  const MATHLIB_sqrt_InitArgs *pKerInitArgs);
154 
175  MATHLIB_kernelHandle handle,
176  const MATHLIB_bufParams2D_t * bufParamsIn,
177  const MATHLIB_bufParams2D_t * bufParamsOut,
178  const MATHLIB_sqrt_InitArgs *pKerInitArgs);
179 
208  MATHLIB_kernelHandle handle,
209  void *restrict pIn,
210  void *restrict pOut);
211 
230  MATHLIB_kernelHandle handle,
231  const void *restrict pIn,
232  const void *restrict pOut);
233 
252  const MATHLIB_bufParams2D_t *bufParamsIn,
253  const MATHLIB_bufParams1D_t *bufParamsFilterCoeff,
254  const MATHLIB_bufParams2D_t *bufParamsFilterVar,
255  const MATHLIB_bufParams2D_t *bufParamsOut,
256  uint64_t *archCycles,
257  uint64_t *estCycles);
258 
261 #ifdef __cplusplus
262 }
263 #endif
264 
265 #endif /* MATHLIB_SQRT_IXX_IXX_OXX_H_ */
266 
267 /* ======================================================================== */
268 /* End of file: MATHLIB_sqrt.h */
269 /* ======================================================================== */
int8_t funcStyle
Variant of the function refer to MATHLIB_FUNCTION_STYLE.
Definition: MATHLIB_sqrt.h:112
A structure for a 2 dimensional buffer descriptor.
MATHLIB_STATUS MATHLIB_sqrt_exec_checkParams(MATHLIB_kernelHandle handle, const void *restrict pIn, const void *restrict pOut)
This function checks the validity of the parameters passed to MATHLIB_sqrt_exec function. This function is called with the same parameters as the MATHLIB_sqrt_exec, and this function must be called before the MATHLIB_sqrt_exec is called.
int32_t MATHLIB_sqrt_getHandleSize(MATHLIB_sqrt_InitArgs *pKerInitArgs)
This is a query function to calculate the size of internal handle.
Structure containing the parameters to initialize the kernel.
Definition: MATHLIB_sqrt.h:109
MATHLIB_STATUS MATHLIB_sqrt_init(MATHLIB_kernelHandle handle, MATHLIB_bufParams1D_t *bufParamsIn, MATHLIB_bufParams1D_t *bufParamsOut, const MATHLIB_sqrt_InitArgs *pKerInitArgs)
This function should be called before the MATHLIB_sqrt_exec function is called. This function takes c...
void MATHLIB_sqrt_perfEst(MATHLIB_kernelHandle handle, const MATHLIB_bufParams2D_t *bufParamsIn, const MATHLIB_bufParams1D_t *bufParamsFilterCoeff, const MATHLIB_bufParams2D_t *bufParamsFilterVar, const MATHLIB_bufParams2D_t *bufParamsOut, uint64_t *archCycles, uint64_t *estCycles)
This is a utility function that gives an estimate of the cycles consumed for the kernel execution...
MATHLIB_STATUS_NAME
The enumeration of all status codes.
uint32_t dataSize
Size of input data.
Definition: MATHLIB_sqrt.h:114
MATHLIB_STATUS MATHLIB_sqrt_init_checkParams(MATHLIB_kernelHandle handle, const MATHLIB_bufParams2D_t *bufParamsIn, const MATHLIB_bufParams2D_t *bufParamsOut, const MATHLIB_sqrt_InitArgs *pKerInitArgs)
This function checks the validity of the parameters passed to MATHLIB_sqrt_init function. This function is called with the same parameters as the MATHLIB_sqrt_init, and this function must be called before the MATHLIB_sqrt_init is called.
A structure for a 1 dimensional buffer descriptor.
MATHLIB_STATUS MATHLIB_sqrt_exec(MATHLIB_kernelHandle handle, void *restrict pIn, void *restrict pOut)
This function is the main kernel compute function.
void * MATHLIB_kernelHandle
Handle type for MATHLIB operations.