Vocabulary
math.blas.vectors

Inputs
 TYPE an object T an object

Outputs
None

Definition

:: (define-blas-vector) ( TYPE T -- )
[ "<direct-" write TYPE present write "-array>" write ]
with-string-writer parse-word :> <DIRECT-ARRAY>
[ T present write "COPY" write ] with-string-writer
parse-word :> XCOPY
[ T present write "SWAP" write ] with-string-writer
parse-word :> XSWAP
[ "I" write T present write "AMAX" write ]
with-string-writer parse-word :> IXAMAX
[ TYPE present write "-blas-vector" write ]
with-string-writer create-class-in :> VECTOR
[ "<" write TYPE present write "-blas-vector>" write ]
with-string-writer create-word-in :> <VECTOR>
[ ">" write TYPE present write "-blas-vector" write ]
with-string-writer create-word-in :> >VECTOR T >lower :> t
[ t present write "vector{" write ] with-string-writer
create-word-in :> XVECTOR{
[ T present write "AXPY" write ] with-string-writer
parse-word :> XAXPY
[ T present write "SCAL" write ] with-string-writer
parse-word :> XSCAL VECTOR \ blas-vector-base
{ } define-tuple-class* <VECTOR>
T{ fake-quotation { seq { VECTOR boa } } } fake-quotations>
first ( underlying length inc -- vector ) define-declared*
last-word make-inline >VECTOR T{ fake-quotation
{ seq
{
T{ fake-quotation { seq ~array~ } }
T{ fake-quotation { seq ~array~ } }
bi
1
<VECTOR>
}
}
} fake-quotations> first ( seq -- v ) define-declared*
VECTOR \ clone create-method-in dup \ method set T{
fake-quotation
{ seq
{
TYPE
heap-size
(prepare-copy)
T{ fake-quotation { seq ~array~ } }
3dip
<VECTOR>
}
}
} fake-quotations> first define*
VECTOR \ element-type create-method-in dup \ method set
T{ fake-quotation { seq { drop TYPE } } } fake-quotations>
first define* VECTOR \ Vswap create-method-in
dup \ method set T{ fake-quotation
{ seq
{
(prepare-swap)
T{ fake-quotation { seq ~array~ } }
2dip
}
}
} fake-quotations> first define*
VECTOR \ Viamax create-method-in dup \ method set
T{ fake-quotation { seq { (prepare-nrm2) IXAMAX 1 - } } }
fake-quotations> ~57 more~ ;