VEC_$DCOPY Domain/OS VEC_$DCOPY
NAME
vec_$dcopy - copy a double-precision vector
SYNOPSIS (C)
#include <apollo/base.h>
#include <apollo/vec.h>
void vec_$dcopy(
double *start_vec,
double *result_vec,
long int &length)
SYNOPSIS (Pascal)
%include '/sys/ins/base.ins.pas';
%include '/sys/ins/vec.ins.pas';
procedure vec_$dcopy(
in start_vec: univ vec_$double_vector;
out result_vec: univ vec_$double_vector;
in length: integer32);
SYNOPSIS (FORTRAN)
%include '/sys/ins/base.ins.ftn'
%include '/sys/ins/vec.ins.ftn'
parameter (nvec = 10)
double precision start_vec(nvec), result_vec(nvec)
integer*4 length
call vec_$dcopy(start_vec, result_vec, length)
DESCRIPTION
Vec_$dcopy copies length elements from start_vec to result_vec.
In C, the resulting operation is
for (i = 0; i < length; ++i)
result_vec[i] = start_vec[i];
In Pascal, the resulting operation is
for i := 1 to length do
begin
result_vec[i] := start_vec[i];
end
In FORTRAN, the resulting operation is
do 10 i = 1, length
result_vec(i) = start_vec(i)
10 continue
start_vec
The vector that result_vec will be copied from.
result_vec
The vector that start_vec will be copied to.
length
The number of elements to copy from start_vec to result_vec.
NOTES
When vec_$dcopy is used to operate on matrixes in C and Pascal, start_vec
and result_vec are row vectors; whereas in FORTRAN, they are column vec-
tors.
SEE ALSO
vec_$copy, vec_$dcopy_i, vec_$icopy, vec_$icopy16.