[GRASS-SVN] r51600 - grass/trunk/lib/gmath

svn_grass at osgeo.org svn_grass at osgeo.org
Tue May 8 07:31:58 EDT 2012


Author: mmetz
Date: 2012-05-08 04:31:58 -0700 (Tue, 08 May 2012)
New Revision: 51600

Modified:
   grass/trunk/lib/gmath/blas_level_2.c
   grass/trunk/lib/gmath/blas_level_3.c
Log:
gmath lib: fix typos

Modified: grass/trunk/lib/gmath/blas_level_2.c
===================================================================
--- grass/trunk/lib/gmath/blas_level_2.c	2012-05-05 08:58:18 UTC (rev 51599)
+++ grass/trunk/lib/gmath/blas_level_2.c	2012-05-08 11:31:58 UTC (rev 51600)
@@ -126,7 +126,7 @@
 }
 
 /*!
- * \brief Compute the dyadic product of twMo vectors. 
+ * \brief Compute the dyadic product of two vectors. 
  * The result is stored in the matrix A.
  *
  * This function is multi-threaded with OpenMP and can be called within a parallel OpenMP region.

Modified: grass/trunk/lib/gmath/blas_level_3.c
===================================================================
--- grass/trunk/lib/gmath/blas_level_3.c	2012-05-05 08:58:18 UTC (rev 51599)
+++ grass/trunk/lib/gmath/blas_level_3.c	2012-05-08 11:31:58 UTC (rev 51600)
@@ -157,7 +157,7 @@
  *
  * A must be of size rows_A * cols_A
  * B must be of size rows_B * cols_B with rows_B == cols_A
- * C must be of size rows_A * rows_B
+ * C must be of size rows_A * cols_B
  *
  *
  * This function is multi-threaded with OpenMP and can be called within a parallel OpenMP region.
@@ -167,18 +167,18 @@
  * \param C (double **)
  * \param rows_A (int)
  * \param cols_A (int)
- * \param rows_B (int)
+ * \param cols_B (int)
  * \return (void)
  *
  * */
 void G_math_d_AB(double **A, double **B, double **C, int rows_A,
-		 int cols_A, int rows_B)
+		 int cols_A, int cols_B)
 {
     int i, j, k;
 
 #pragma omp for schedule (static) private(i, j, k)
     for (i = 0; i < rows_A; i++) {
-	for (j = 0; j < rows_B; j++) {
+	for (j = 0; j < cols_B; j++) {
 	    C[i][j] = 0.0;
 	    for (k = cols_A - 1; k >= 0; k--) {
 		C[i][j] += A[i][k] * B[k][j];
@@ -198,7 +198,7 @@
  *
  * A must be of size rows_A * cols_A
  * B must be of size rows_B * cols_B with rows_B == cols_A
- * C must be of size rows_A * rows_B
+ * C must be of size rows_A * cols_B
  *
  *
  * This function is multi-threaded with OpenMP and can be called within a parallel OpenMP region.
@@ -208,18 +208,18 @@
  * \param C (float **)
  * \param rows_A (int)
  * \param cols_A (int)
- * \param rows_B (int)
+ * \param cols_B (int)
  * \return (void)
  *
  * */
 void G_math_f_AB(float **A, float **B, float **C, int rows_A,
-		 int cols_A, int rows_B)
+		 int cols_A, int cols_B)
 {
     int i, j, k;
 
 #pragma omp for schedule (static) private(i, j, k)
     for (i = 0; i < rows_A; i++) {
-	for (j = 0; j < rows_B; j++) {
+	for (j = 0; j < cols_B; j++) {
 	    C[i][j] = 0.0;
 	    for (k = cols_A - 1; k >= 0; k--) {
 		C[i][j] += A[i][k] * B[k][j];



More information about the grass-commit mailing list