File: norm.c1 /* 2 * norm.c 3 * 4 * Code generation for function 'norm' 5 * 6 */ 7 8 /* Include files */ 9 #include "rt_nonfinite.h" 10 #include "gjbf.h" 11 #include "norm.h" 12 #include "blas.h" 13 14 /* Function Definitions */ 15 real_T norm(const real_T x_data[], const int32_T x_size[1]) 16 { 17 real_T y; 18 ptrdiff_t n_t; 19 ptrdiff_t incx_t; 20 if (x_size[0] == 0) { 21 y = 0.0; 22 } else { 23 n_t = (ptrdiff_t)x_size[0]; 24 incx_t = (ptrdiff_t)1; 25 y = dnrm2(&n_t, &x_data[0], &incx_t); 26 } 27 28 return y; 29 } 30 31 /* End of code generation (norm.c) */ 32 |