iXamax returns a 1-based array index. decrement that shit

db4
Joe Groff 2009-02-09 16:37:45 -06:00
parent ddf8afbb7e
commit ad843a1bcf
2 changed files with 10 additions and 11 deletions

View File

@ -37,8 +37,8 @@ HELP: blas-vector-base
{ $list
{ { $link float-blas-vector } }
{ { $link double-blas-vector } }
{ { $link float-complex-blas-vector } }
{ { $link double-complex-blas-vector } }
{ { $link complex-float-blas-vector } }
{ { $link complex-double-blas-vector } }
}
"All of these subclasses share the same tuple layout:"
{ $list
@ -51,10 +51,10 @@ HELP: float-blas-vector
{ $class-description "A vector of single-precision floating-point values. For details on the tuple layout, see " { $link blas-vector-base } "." } ;
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-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-vector-base } "." } ;
HELP: complex-float-blas-vector
{ $class-description "A vector of single-precision floating-point complex values. For details on the tuple layout, see " { $link blas-vector-base } "." } ;
HELP: complex-double-blas-vector
{ $class-description "A vector of double-precision floating-point complex values. For details on the tuple layout, see " { $link blas-vector-base } "." } ;
HELP: n*V+V!
{ $values { "alpha" number } { "x" blas-vector-base } { "y" blas-vector-base } { "y=alpha*x+y" blas-vector-base } }
@ -145,11 +145,11 @@ HELP: dvector{
HELP: cvector{
{ $syntax "cvector{ 1.0 -2.0 C{ 3.0 -1.0 } }" }
{ $description "Construct a literal " { $link float-complex-blas-vector } "." } ;
{ $description "Construct a literal " { $link complex-float-blas-vector } "." } ;
HELP: zvector{
{ $syntax "dvector{ 1.0 -2.0 C{ 3.0 -1.0 } }" }
{ $description "Construct a literal " { $link double-complex-blas-vector } "." } ;
{ $description "Construct a literal " { $link complex-double-blas-vector } "." } ;
{
POSTPONE: svector{ POSTPONE: dvector{

View File

@ -1,7 +1,6 @@
USING: accessors alien alien.c-types arrays ascii byte-arrays combinators
combinators.short-circuit fry kernel math math.blas.ffi
math.complex math.functions math.order sequences.complex
sequences.complex-components sequences sequences.private
math.complex math.functions math.order sequences sequences.private
functors words locals parser prettyprint.backend prettyprint.custom
specialized-arrays.float specialized-arrays.double
specialized-arrays.direct.float specialized-arrays.direct.double
@ -165,7 +164,7 @@ M: VECTOR element-type
M: VECTOR Vswap
(prepare-swap) [ XSWAP ] 2dip ;
M: VECTOR Viamax
(prepare-nrm2) IXAMAX ;
(prepare-nrm2) IXAMAX 1- ;
M: VECTOR (blas-vector-like)
drop <VECTOR> ;