COMBINATORIAL_BLAS  1.6
csc.h
Go to the documentation of this file.
1 /****************************************************************/
2 /* Parallel Combinatorial BLAS Library (for Graph Computations) */
3 /* version 1.6 -------------------------------------------------*/
4 /* date: 11/15/2016 --------------------------------------------*/
5 /* authors: Ariful Azad, Aydin Buluc, Adam Lugowski ------------*/
6 /****************************************************************/
7 /*
8  Copyright (c) 2010-2016, The Regents of the University of California
9 
10  Permission is hereby granted, free of charge, to any person obtaining a copy
11  of this software and associated documentation files (the "Software"), to deal
12  in the Software without restriction, including without limitation the rights
13  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14  copies of the Software, and to permit persons to whom the Software is
15  furnished to do so, subject to the following conditions:
16 
17  The above copyright notice and this permission notice shall be included in
18  all copies or substantial portions of the Software.
19 
20  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
26  THE SOFTWARE.
27  */
28 
29 
30 #ifndef _CSC_H
31 #define _CSC_H
32 
33 #include <cstdlib>
34 #include <vector>
35 #include <limits>
36 #include <cassert>
37 #include "SpDefs.h"
38 #include "SpHelper.h"
39 
40 namespace combblas {
41 
42 template <class IT, class NT>
43 class Csc
44 {
45 public:
46  typedef NT value_type;
47  typedef IT index_type;
48  Csc ();
49  Csc (IT size,IT nCol);
50  Csc (const Csc<IT,NT> & rhs); // copy constructor
51  ~Csc();
52 
53  Csc<IT,NT> & operator=(const Csc<IT,NT> & rhs); // assignment operator
54  void Resize(IT nsize);
55 
56 
57  IT * jc ; // col pointers, size n+1
58  IT * ir ; // row indices, size nzmax
59  NT * num; // generic values, size nzmax
60  IT n; // number of columns
61  IT nz;
62 };
63 
64 }
65 
66 #include "csc.cpp" // Template member function definitions need to be known to the compiler
67 
68 #endif
IT index_type
Definition: csc.h:47
int size
Csc< IT, NT > & operator=(const Csc< IT, NT > &rhs)
Definition: csc.cpp:60
IT n
Definition: csc.h:60
IT * jc
Definition: csc.h:57
IT * ir
Definition: csc.h:58
IT nz
Definition: csc.h:61
NT * num
Definition: csc.h:59
Definition: CCGrid.h:4
void Resize(IT nsize)
Does not change the dimension.
Definition: csc.cpp:100
NT value_type
Definition: csc.h:46