- temp = ((*lColumnMatrix > 0) ? *lColumnMatrix : -(*lColumnMatrix));
- if (temp > p) {
- p = temp;
- k2 = i;
- }
- /* next line */
- lColumnMatrix += nb_compo;
- }
-
- /* a whole rest of 0 -> non singular */
- if (p == 0.0) {
- return OPJ_FALSE;
- }
-
- /* should we permute ? */
- if (k2 != k) {
- /*exchange of line */
- /* k2 > k */
- dstPermutations = tmpPermutations + k2 - k;
- /* swap indices */
- t = *tmpPermutations;
- *tmpPermutations = *dstPermutations;
- *dstPermutations = t;
-
- /* and swap entire line. */
- lColumnMatrix = lTmpMatrix + (k2 - k) * nb_compo;
- memcpy(p_swap_area,lColumnMatrix,lSwapSize);
- memcpy(lColumnMatrix,lTmpMatrix,lSwapSize);
- memcpy(lTmpMatrix,p_swap_area,lSwapSize);
- }
-
- /* now update data in the rest of the line and line after */
- lDestMatrix = lTmpMatrix + k;
- lColumnMatrix = lDestMatrix + nb_compo;
- /* take the middle element */
- temp = *(lDestMatrix++);
-
- /* now compute up data (i.e. coeff up of the diagonal). */
- for (i = offset; i < nb_compo; ++i) {
- /*lColumnMatrix; */
- /* divide the lower column elements by the diagonal value */
-
- /* matrix[i][k] /= matrix[k][k]; */
- /* p = matrix[i][k] */
- p = *lColumnMatrix / temp;
- *(lColumnMatrix++) = p;
-
+ temp = ((*lColumnMatrix > 0) ? *lColumnMatrix : -(*lColumnMatrix));
+ if (temp > p) {
+ p = temp;
+ k2 = i;
+ }
+ /* next line */
+ lColumnMatrix += nb_compo;
+ }
+
+ /* a whole rest of 0 -> non singular */
+ if (p == 0.0) {
+ return OPJ_FALSE;
+ }
+
+ /* should we permute ? */
+ if (k2 != k) {
+ /*exchange of line */
+ /* k2 > k */
+ dstPermutations = tmpPermutations + k2 - k;
+ /* swap indices */
+ t = *tmpPermutations;
+ *tmpPermutations = *dstPermutations;
+ *dstPermutations = t;
+
+ /* and swap entire line. */
+ lColumnMatrix = lTmpMatrix + (k2 - k) * nb_compo;
+ memcpy(p_swap_area, lColumnMatrix, lSwapSize);
+ memcpy(lColumnMatrix, lTmpMatrix, lSwapSize);
+ memcpy(lTmpMatrix, p_swap_area, lSwapSize);
+ }
+
+ /* now update data in the rest of the line and line after */
+ lDestMatrix = lTmpMatrix + k;
+ lColumnMatrix = lDestMatrix + nb_compo;
+ /* take the middle element */
+ temp = *(lDestMatrix++);
+
+ /* now compute up data (i.e. coeff up of the diagonal). */
+ for (i = offset; i < nb_compo; ++i) {
+ /*lColumnMatrix; */
+ /* divide the lower column elements by the diagonal value */
+
+ /* matrix[i][k] /= matrix[k][k]; */
+ /* p = matrix[i][k] */
+ p = *lColumnMatrix / temp;
+ *(lColumnMatrix++) = p;
+