You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
977 B
44 lines
977 B
2 years ago
|
/*
|
||
|
* Copyright(C) 1999-2020 National Technology & Engineering Solutions
|
||
|
* of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
|
||
|
* NTESS, the U.S. Government retains certain rights in this software.
|
||
|
*
|
||
|
* See packages/seacas/LICENSE for details
|
||
|
*/
|
||
|
|
||
|
/* Copy a range of a double vector to a double vector */
|
||
|
void cpvec(double *copy, int beg, int end, double *vec)
|
||
|
{
|
||
|
int i;
|
||
|
|
||
|
copy = copy + beg;
|
||
|
vec = vec + beg;
|
||
|
for (i = end - beg + 1; i; i--) {
|
||
|
*copy++ = *vec++;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* Copy a range of a float vector to a double vector */
|
||
|
void float_to_double(double *copy, int beg, int end, float *vec)
|
||
|
{
|
||
|
int i;
|
||
|
|
||
|
copy = copy + beg;
|
||
|
vec = vec + beg;
|
||
|
for (i = end - beg + 1; i; i--) {
|
||
|
*copy++ = *vec++;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* Copy a range of a double vector to a float vector */
|
||
|
void double_to_float(float *copy, int beg, int end, double *vec)
|
||
|
{
|
||
|
int i;
|
||
|
|
||
|
copy = copy + beg;
|
||
|
vec = vec + beg;
|
||
|
for (i = end - beg + 1; i; i--) {
|
||
|
*copy++ = *vec++;
|
||
|
}
|
||
|
}
|