cuLite v0.3.1
A lite CUDA C++ Interface
Loading...
Searching...
No Matches
ex02k_dense_matrix_algebra_scale.cpp
#include <iostream>
#include <cla3p/dense.hpp>
#include <culite/dense.hpp>
#include <culite/algebra.hpp>
int main()
{
hostA = 3.;
hostA >> A; // Transfer to GPU
std::cout << "A:\n" << A << "\n";
/*
* Scale A using operators and the scale function respectively
*/
A *= 2.;
std::cout << "A *= 2:\n" << A;
A.iscale(.5);
std::cout << "A.iscale(.5):\n" << A << "\n";
culite::dns::RdMatrix B = 2. * A ;
std::cout << "B:\n" << B;
return 0;
}
void iscale(T_Scalar val)
Scale the device matrix in-place.
XxMatrix< real_t > RdMatrix
XxMatrix< real_t > RdMatrix
Double precision real matrix.
Definition dense.hpp:55