clSPARSE  v0.10.0.0
a software library containing Sparse functions written in OpenCL
clSPARSE-2x.h
Go to the documentation of this file.
1 /* ************************************************************************
2  * Copyright 2015 Advanced Micro Devices, Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  * ************************************************************************ */
16 
22 #pragma once
23 #ifndef _CL_SPARSE_2x_H_
24 #define _CL_SPARSE_2x_H_
25 
26 #include "clSPARSE-xx.h"
27 
30 typedef struct clsparseScalar_
31 {
32  void* value;
34 
37 typedef struct cldenseVector_
38 {
39  clsparseIdx_t num_values;
41  void* values;
43 
49 typedef struct clsparseCsrMatrix_
50 {
53  clsparseIdx_t num_rows;
54  clsparseIdx_t num_cols;
55  clsparseIdx_t num_nonzeros;
60  void* values;
61  void* col_indices;
62  void* row_pointer;
68  void* meta;
70 
76 typedef struct clsparseCooMatrix_
77 {
80  clsparseIdx_t num_rows;
81  clsparseIdx_t num_cols;
82  clsparseIdx_t num_nonzeros;
87  void* values;
88  void* col_indices;
89  void* row_indices;
92 
96 typedef struct cldenseMatrix_
97 {
100  clsparseIdx_t num_rows;
101  clsparseIdx_t num_cols;
102  clsparseIdx_t lead_dim;
103  cldenseMajor major;
106  void* values;
108 } cldenseMatrix;
109 
110 #endif
void * value
Definition: clSPARSE-2x.h:32
cldenseMajor
For dense data structures, this enum specifies how multi-dimensional data structures are laid out in ...
Definition: clSPARSE-xx.h:35
void * values
Definition: clSPARSE-2x.h:41
void * values
Definition: clSPARSE-2x.h:106
void * col_indices
Definition: clSPARSE-2x.h:88
Structure to encapsulate sparse matrix data encoded in CSR form to clSPARSE API.
Definition: clSPARSE-1x.h:60
void * values
Definition: clSPARSE-2x.h:60
void * row_pointer
Definition: clSPARSE-2x.h:62
Structure to encapsulate dense matrix data to clSPARSE API.
Definition: clSPARSE-1x.h:127
void * row_indices
Definition: clSPARSE-2x.h:89
cl_uint clsparseIdx_t
An abstraction for the size of indices supported by the library. Clients should use this index type w...
Definition: clSPARSE-xx.h:49
Structure to encapsulate sparse matrix data encoded in COO form to clSPARSE API.
Definition: clSPARSE-1x.h:97
clSPARSE-xx.h defines public types used by any OpenCL version
void * col_indices
Definition: clSPARSE-2x.h:61
void * values
Definition: clSPARSE-2x.h:87
Structure to encapsulate dense vector data to clSPARSE API.
Definition: clSPARSE-1x.h:43
Structure to encapsulate scalar data to clSPARSE API.
Definition: clSPARSE-1x.h:31