CLA3P v0.3.1
Compact Linear Algebra Parallel Portable Package
Loading...
Searching...
No Matches
ex01e_dense_vector_copy.cpp
#include <iostream>
#include <cla3p/dense.hpp>
int main()
{
x = 1;
std::cout << x.info("x") << x;
/*
* Copy x to y using assignment.
* Copy x to z using copy().
*/
std::cout << y.info("y") << y;
std::cout << z.info("z") << z;
/*
* Copy y to z using assignment.
* z is already allocated.
* No re-allocation performed.
* Needs matching sizes.
*/
z = y;
std::cout << z.info("z") << z;
return 0;
}
std::string info(const std::string &header="") const
Get information about the vector.
XiVector< T_Scalar > copy() const
Create a deep copy of the vector.
XxVector< real4_t > RfVector
Single precision real vector.
Definition dense.hpp:37