CLA3P v0.3.1
Compact Linear Algebra Parallel Portable Package
Loading...
Searching...
No Matches
ex01h_dense_vector_shallow_copy.cpp
#include <iostream>
#include <cla3p/dense.hpp>
int main()
{
x = 1;
std::cout << x.info("x") << x;
/*
* Shallow copy x to y (x & y share contents).
*/
std::cout << y.info("y") << y << "\n";
y(0) = 0;
y(2) = 0;
std::cout << "x:\n" << x;
std::cout << "y:\n" << y;
return 0;
}
std::string info(const std::string &header="") const
Get information about the vector.
XiVector< T_Scalar > rcopy()
Create a reference copy (shallow copy) of the vector.
XxVector< real4_t > RfVector
Single precision real vector.
Definition dense.hpp:37