HPL_dcopy(3)
π HPL_dcopy(3) π
okay bestie, gather round, because we're talking about HPL_dcopy from the HPL Library Functions and it's literally the simplest slay in the whole library. no cap. π«Ά
β¨ NAME β¨
HPL_dcopy β it does y := x. that's it. that's the whole vibe. π
πΈ SYNOPSIS πΈ
#include "hpl.h"
void HPL_dcopy( const int N, const double * X, const int INCX, double *
Y, const int INCY );
π¦ DESCRIPTION π¦
so like, HPL_dcopy copies the vector x into the vector y. it's giving "i have a vibe and i'm putting it somewhere else." iconic behaviour honestly. β¨
π ARGUMENTS π
N(local input)const intβ on entry,Nspecifies the length of the vectors x and y. and listen,Nmust be at least zero, okay? we do not do negative lengths in this house. π«X(local input)const double *β on entry,Xis an incremented array of dimension at least( 1 + ( n - 1 ) * abs( INCX ) )that contains the vector x. yes the formula is doing the most, but she's right. πINCX(local input)const intβ on entry,INCXspecifies the increment for the elements ofX. andINCXmust not be zero, fr fr. zero increment is not the move. πY(local input/output)double *β on entry,Yis an incremented array of dimension at least( 1 + ( n - 1 ) * abs( INCY ) )that contains the vector y. on exit, the entries of the incremented arrayYare updated with the entries of the incremented arrayX. so she goes in as one thing and comes out as a whole new girlie. main character transformation arc. π¦β¨INCY(local input)const intβ on entry,INCYspecifies the increment for the elements ofY.INCYmust not be zero. periodt. π
π EXAMPLE π
here's the demo bestie, and yes you can run it, she works:
#include "hpl.h"
int main(int argc, char *argv[])
{
double x[3], y[3];
x[0] = 1.0; x[1] = 2.0; x[2] = 3.0;
y[0] = 4.0; y[1] = 5.0; y[2] = 6.0;
HPL_dcopy( 3, x, 1, y, 1 );
printf("y=[%f,%f,%f]\n", y[0], y[1], y[2]);
exit(0); return(0);
}
like look at her go. x walked in with 1.0, 2.0, 3.0, and y was out here with 4.0, 5.0, 6.0, and then boom β HPL_dcopy said "not anymore" and now y is serving x's whole look. π₯
π SEE ALSO π
if you liked this one (and how could you not), go check out her friends:
HPL_daxpy (3)HPL_dscal (3)HPL_dswap (3)
ngl bestie, the one thing to remember:INCXandINCYare never allowed to be zero, andNis never allowed to be negative. those are the rules. respect them. π«Ά
and that's the whole page!! this was HPL 2.2, dated February 24, 2016, and it lives in the HPL_dcopy(3) manual. mwah, love u, go copy some vectors πππΈ
π¦ where this page comes from
- fedora 43: hpl-doc 2.2-22.fc43 Β· LicenseRef-Callaway-BSD-with-advertising
- fedora 44: hpl-doc 2.2-23.fc44 Β· LicenseRef-Callaway-BSD-with-advertising
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms