CLA3P v0.3.1
Compact Linear Algebra Parallel Portable Package
Loading...
Searching...
No Matches
ex01f_dense_vector_move.cpp
#include <iostream>
#include <cla3p/dense.hpp>
int main()
{
x = 1;
std::cout << x.info("x") << x;
/*
* Move x to y.
*/
std::cout << x.info("x") << x;
std::cout << y.info("y") << y;
/*
* Move y to z.
* z is non-empty with non matching dimension, so operation will fail.
*/
try {
z = y.move();
} catch (...) {
std::cout << "Invalid move exception caught" << std::endl;
}
return 0;
}
std::string info(const std::string &header="") const
Get information about the vector.
XiVector< T_Scalar > move()
Move the vector's resources.
XxVector< real4_t > RfVector
Single precision real vector.
Definition dense.hpp:37