chol.cpp
Go to the documentation of this file.
00001 /*
00002  * chol.cpp
00003  *
00004  * Code generation for function 'chol'
00005  *
00006  * C source code generated on: Wed Jul 24 16:11:35 2013
00007  *
00008  */
00009 
00010 /* Include files */
00011 #include "rt_nonfinite.h"
00012 #include "Optimal_affine_tracking_3d16_fast_realtime.h"
00013 #include "chol.h"
00014 
00015 /* Type Definitions */
00016 
00017 /* Named Constants */
00018 
00019 /* Variable Declarations */
00020 
00021 /* Variable Definitions */
00022 
00023 /* Function Declarations */
00024 
00025 /* Function Definitions */
00026 void chol(real_T A[36])
00027 {
00028   int32_T info;
00029   int32_T colj;
00030   int32_T j;
00031   boolean_T exitg1;
00032   int32_T jm1;
00033   int32_T jj;
00034   real_T ajj;
00035   int32_T ix;
00036   int32_T iy;
00037   int32_T coljp1;
00038   int32_T i29;
00039   int32_T iac;
00040   real_T c;
00041   int32_T i30;
00042   int32_T ia;
00043   info = 0;
00044   colj = 1;
00045   j = 1;
00046   exitg1 = FALSE;
00047   while ((exitg1 == 0U) && (j < 7)) {
00048     jm1 = j - 1;
00049     jj = (colj + jm1) - 1;
00050     ajj = 0.0;
00051     if (jm1 < 1) {
00052     } else {
00053       ix = colj;
00054       iy = colj;
00055       for (coljp1 = 1; coljp1 <= jm1; coljp1++) {
00056         ajj += A[ix - 1] * A[iy - 1];
00057         ix++;
00058         iy++;
00059       }
00060     }
00061 
00062     ajj = A[jj] - ajj;
00063     if (ajj > 0.0) {
00064       ajj = sqrt(ajj);
00065       A[jj] = ajj;
00066       if (j < 6) {
00067         jj += 7;
00068         coljp1 = colj + 6;
00069         if (jm1 == 0) {
00070         } else {
00071           iy = jj - 1;
00072           i29 = coljp1 + 6 * (5 - j);
00073           for (iac = coljp1; iac <= i29; iac += 6) {
00074             ix = colj;
00075             c = 0.0;
00076             i30 = iac + jm1;
00077             for (ia = iac; ia <= i30 - 1; ia++) {
00078               c += A[ia - 1] * A[ix - 1];
00079               ix++;
00080             }
00081 
00082             A[iy] += -c;
00083             iy += 6;
00084           }
00085         }
00086 
00087         ajj = 1.0 / ajj;
00088         i29 = jj + 6 * (5 - j);
00089         while (jj <= i29) {
00090           A[jj - 1] *= ajj;
00091           jj += 6;
00092         }
00093 
00094         colj = coljp1;
00095       }
00096 
00097       j++;
00098     } else {
00099       A[jj] = ajj;
00100       info = j;
00101       exitg1 = TRUE;
00102     }
00103   }
00104 
00105   if (info == 0) {
00106     jj = 6;
00107   } else {
00108     jj = info - 1;
00109   }
00110 
00111   for (j = 0; j + 1 <= jj; j++) {
00112     for (coljp1 = j + 1; coljp1 + 1 <= jj; coljp1++) {
00113       A[coljp1 + 6 * j] = 0.0;
00114     }
00115   }
00116 }
00117 
00118 /* End of code generation (chol.cpp) */


depth_tracker_ros_vr8
Author(s): shusain
autogenerated on Fri Dec 6 2013 20:45:46