File: spy.cu

package info (click to toggle)
python-escript 5.6-10
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 144,304 kB
  • sloc: python: 592,074; cpp: 136,909; ansic: 18,675; javascript: 9,411; xml: 3,384; sh: 738; makefile: 207
file content (22 lines) | stat: -rw-r--r-- 547 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include <cusp/gallery/poisson.h>
#include <cusp/io/matrix_market.h>
#include <cusp/opengl/spy/spy.h>

int main(int argc, char** argv)
{
    cusp::csr_matrix<int,float,cusp::host_memory> A;
    if (argc == 1)
    {
        // no input file was specified, generate an example
        cusp::gallery::poisson5pt(A, 500, 500);
    }
    else if (argc == 2)
    {
        // an input file was specified, read it from disk
        cusp::io::read_matrix_market_file(A, argv[1]);
    }
    cusp::opengl::spy::view_matrix(A);

    return 0;
} // end main