]> gitweb.factorcode.org Git - factor.git/commitdiff
Fix $side-effects in blas help
authorJoe Groff <arcata@gmail.com>
Sat, 5 Jul 2008 18:30:42 +0000 (11:30 -0700)
committerJoe Groff <arcata@gmail.com>
Sat, 5 Jul 2008 18:30:42 +0000 (11:30 -0700)
extra/math/blas/matrices/matrices-docs.factor
extra/math/blas/vectors/vectors-docs.factor
extra/math/blas/vectors/vectors.factor

index 7ac72af58fcec6c488d7f87cb9e2c4479e052c9b..12cc579610345fdbc294f7567fee493dbe0f3337 100644 (file)
@@ -81,17 +81,17 @@ HELP: Mheight
 HELP: n*M.V+n*V-in-place
 { $values { "alpha" "a number" } { "A" "an M-row, N-column BLAS matrix inherited from " { $link blas-matrix-base } } { "x" "an N-element BLAS vector inherited from " { $link blas-vector-base } } { "beta" "a number" } { "y" "an M-element BLAS vector inherited from " { $link blas-vector-base } } }
 { $description "Calculate the matrix-vector product " { $snippet "αAx + βy" } ", and overwrite the current contents of " { $snippet "y" } " with the result. The width of " { $snippet "A" } " must match the length of " { $snippet "x" } ", and the height must match the length of " { $snippet "y" } ". Corresponds to the xGEMV routines in BLAS." }
-{ $side-effects "The memory used by " { $snippet "y" } " is overwritten with the result." } ;
+{ $side-effects "y" } ;
 
 HELP: n*V(*)V+M-in-place
 { $values { "alpha" "a number" } { "x" "an M-element BLAS vector inherited from " { $link blas-vector-base } } { "y" "an N-element BLAS vector inherited from " { $link blas-vector-base } } { "A" "an M-row, N-column BLAS matrix inherited from " { $link blas-matrix-base } } }
 { $description "Calculate the outer product " { $snippet "αx⊗y + A" } " and overwrite the current contents of A with the result. The width of " { $snippet "A" } " must match the length of " { $snippet "y" } ", and its height must match the length of " { $snippet "x" } ". Corresponds to the xGER and xGERU routines in BLAS." }
-{ $side-effects "The memory used by " { $snippet "A" } " is overwritten with the result." } ;
+{ $side-effects "A" } ;
 
 HELP: n*V(*)Vconj+M-in-place
 { $values { "alpha" "a number" } { "x" "an M-element complex BLAS vector inherited from " { $link blas-vector-base } } { "y" "an N-element complex BLAS vector inherited from " { $link blas-vector-base } } { "A" "an M-row, N-column complex BLAS matrix inherited from " { $link blas-matrix-base } } }
 { $description "Calculate the conjugate outer product " { $snippet "αx⊗y̅ + A" } " and overwrite the current contents of A with the result. The width of " { $snippet "A" } " must match the length of " { $snippet "y" } ", and its height must match the length of " { $snippet "x" } ". Corresponds to the xGERC routines in BLAS." }
-{ $side-effects "The memory used by " { $snippet "A" } " is overwritten with the result." } ;
+{ $side-effects "A" } ;
 
 HELP: n*M.M+n*M-in-place
 { $values { "alpha" "a number" } { "A" "an M-row, K-column BLAS matrix inherited from " { $link blas-matrix-base } } { "B" "a K-row, N-column BLAS matrix inherited from " { $link blas-matrix-base } } { "beta" "a number" } { "C" "an M-row, N-column BLAS matrix inherited from " { $link blas-matrix-base } } }
@@ -172,7 +172,7 @@ HELP: Mcols
 HELP: n*M-in-place
 { $values { "n" "a number" } { "A" "A BLAS matrix inheriting from " { $link blas-matrix-base } } }
 { $description "Calculate the scalar-matrix product " { $snippet "nA" } " and overwrite the current contents of A with the result." }
-{ $side-effects "The memory used by " { $snippet "A" } " is overwritten with the result." } ;
+{ $side-effects "A" } ;
 
 HELP: n*M
 { $values { "n" "a number" } { "A" "A BLAS matrix inheriting from " { $link blas-matrix-base } } }
@@ -191,3 +191,12 @@ HELP: M/n
 HELP: Mtranspose
 { $values { "matrix" "A BLAS matrix inheriting from " { $link blas-matrix-base } } }
 { $description "Returns the transpose of " { $snippet "matrix" } ". The returned matrix shares storage with the original matrix." } ;
+
+HELP: element-type
+{ $values { "v" "a BLAS vector inheriting from " { $link blas-vector-base } ", or a BLAS matrix inheriting from " { $link blas-matrix-base } } }
+{ $description "Return the C type of the elements in the given BLAS vector or matrix." } ;
+
+HELP: <empty-vector>
+{ $values { "length" "The length of the new vector" } { "exemplar" "a BLAS vector inheriting from " { $link blas-vector-base } ", or a BLAS matrix inheriting from " { $link blas-matrix-base } } }
+{ $description "Return a vector of zeros with the given length and the same element type as " { $snippet "v" } "." } ;
+
index 9ebfd40d1cc2cdeac89bddfb09eb0c52e396897b..1518bffd95be1104176fb31395123fa0d807cffe 100644 (file)
@@ -21,19 +21,19 @@ HELP: float-blas-vector
 HELP: double-blas-vector
 { $class-description "A vector of double-precision floating-point values. For details on the tuple layout, see " { $link blas-vector-base } "." } ;
 HELP: float-complex-blas-vector
-{ $class-description "A vector of single-precision floating-point complex values. Complex values are stored in memory as two consecutive float values, real part then imaginary part. For details on the tuple layout, see " { $link blas-matrix-base } "." } ;
+{ $class-description "A vector of single-precision floating-point complex values. Complex values are stored in memory as two consecutive float values, real part then imaginary part. For details on the tuple layout, see " { $link blas-vector-base } "." } ;
 HELP: double-complex-blas-vector
-{ $class-description "A vector of single-precision floating-point complex values. Complex values are stored in memory as two consecutive float values, real part then imaginary part. For details on the tuple layout, see " { $link blas-matrix-base } "." } ;
+{ $class-description "A vector of single-precision floating-point complex values. Complex values are stored in memory as two consecutive float values, real part then imaginary part. For details on the tuple layout, see " { $link blas-vector-base } "." } ;
 
 HELP: n*V+V-in-place
 { $values { "alpha" "a number" } { "x" "a BLAS vector inheriting from " { $link blas-vector-base } } { "y" "a BLAS vector inheriting from " { $link blas-vector-base } } }
 { $description "Calculate the vector sum " { $snippet "αx + y" } " and replace the existing contents of y with the result. Corresponds to the xAXPY routines in BLAS." }
-{ $side-effects "The memory used by y is overwritten with the result." } ;
+{ $side-effects "y" } ;
 
 HELP: n*V-in-place
 { $values { "alpha" "a number" } { "x" "a BLAS vector inheriting from " { $link blas-vector-base } } }
 { $description "Calculate the scalar-vector product " { $snippet "αx" } " and replace the existing contents of x with the result. Corresponds to the xSCAL routines in BLAS." }
-{ $side-effects "The memory used by x is overwritten with the result." } ;
+{ $side-effects "x" } ;
 
 HELP: V.
 { $values { "x" "a BLAS vector inheriting from " { $link blas-vector-base } } { "y" "a BLAS vector inheriting from " { $link blas-vector-base } } }
@@ -54,7 +54,7 @@ HELP: Vasum
 HELP: Vswap
 { $values { "x" "a BLAS vector inheriting from " { $link blas-vector-base } } { "y" "a BLAS vector inheriting from " { $link blas-vector-base } } }
 { $description "Swap the contents of " { $snippet "x" } " and " { $snippet "y" } " in place. Corresponds to the xSWAP routines in BLAS." }
-{ $side-effects "The memory contents of the two vectors are exchanged." } ;
+{ $side-effects "x" "y" } ;
 
 HELP: Viamax
 { $values { "x" "a BLAS vector inheriting from " { $link blas-vector-base } } }
@@ -66,18 +66,10 @@ HELP: Vamax
 
 { Viamax Vamax } related-words
 
-HELP: element-type
-{ $values { "v" "a BLAS vector inheriting from " { $link blas-vector-base } ", or a BLAS matrix inheriting from " { $link blas-matrix-base } } }
-{ $description "Return the C type of the elements in the given BLAS vector or matrix." } ;
-
 HELP: <zero-vector>
-{ $values { "exemplar" "a BLAS vector inheriting from " { $link blas-vector-base } } }
+{ $values { "exemplar" "a BLAS vector inheriting from " { $link blas-vector-base } } }
 { $description "Return a vector of zeros with the same length and element type as " { $snippet "v" } ". The vector is constructed with an " { $snippet "inc" } " of zero, so it is not suitable for receiving results from BLAS functions; it is intended to be used as a term in other vector calculations. To construct an empty vector that can be used to receive results, see " { $link <empty-vector> } "." } ;
 
-HELP: <empty-vector>
-{ $values { "length" "The length of the new vector" } { "exemplar" "a BLAS vector inheriting from " { $link blas-vector-base } " } }
-{ $description "Return a vector of zeros with the given length and the same element type as " { $snippet "v" } "." } ;
-
 HELP: n*V+V
 { $values { "alpha" "a number" } { "x" "a BLAS vector inheriting from " { $link blas-vector-base } } { "y" "a BLAS vector inheriting from " { $link blas-vector-base } } }
 { $description "Calculate the vector sum " { $snippet "αx + y" } " and return a freshly-allocated vector with the same length as " { $snippet "x" } " and " { $snippet "y" } " containing the result. Corresponds to the xAXPY routines in BLAS." } ;
index b8b8283781d9e3795f15835aae2430f8cd572c40..bd3b54c7ebd6f70be05d3dcb210cc29b4549b059 100644 (file)
@@ -26,11 +26,11 @@ GENERIC: n*V-in-place   ( alpha x -- x=alpha*x )
 
 GENERIC: V. ( x y -- x.y )
 GENERIC: V.conj ( x y -- xconj.y )
-GENERIC: Vnorm ( x -- norm2(x) )
-GENERIC: Vasum ( x -- sum(norm1(x[i]))
+GENERIC: Vnorm ( x -- norm )
+GENERIC: Vasum ( x -- sum )
 GENERIC: Vswap ( x y -- x=y y=x )
 
-GENERIC: Viamax ( x -- i-where-x[i]=max(norm1(x[i])) )
+GENERIC: Viamax ( x -- max-i )
 
 GENERIC: element-type ( v -- type )