Fork me on GitHub
 All Classes Files Functions Variables Groups Pages
multiply.cu
#include <cusp/multiply.h>
#include <cusp/array2d.h>
#include <cusp/print.h>
int main(void)
{
// initialize matrix
A(0,0) = 10; A(0,1) = 20;
A(1,0) = 40; A(1,1) = 50;
// initialize input vector
x[0] = 1;
x[1] = 2;
// allocate output vector
// compute y = A * x
cusp::multiply(A, x, y);
// print y
return 0;
}