ALP User Documentation 0.7.0
Algebraic Programming User Documentation
blas_sparse_vec.h
Go to the documentation of this file.
1
2/*
3 * Copyright 2021 Huawei Technologies Co., Ltd.
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
26#ifndef _H_ALP_SPARSEBLAS_EXT_VEC
27#define _H_ALP_SPARSEBLAS_EXT_VEC
28
29#ifdef __cplusplus
30extern "C" {
31#endif
32
34typedef void * extblas_sparse_vector;
35
46
65 const double val,
66 const int index
67);
68
82
96
110int EXTBLAS_dusv_nz( const extblas_sparse_vector x, int * nz );
111
128
158 const extblas_sparse_vector x,
159 double * const val, int * const ind
160);
161
174
187
188#ifdef __cplusplus
189} // end extern "C"
190#endif
191
192#endif // end `_H_ALP_SPARSEBLAS_EXT_VEC'
193
int EXTBLAS_dusvds(extblas_sparse_vector x)
Destroys the given sparse vector.
int EXTBLAS_dusv_get(const extblas_sparse_vector x, double *const val, int *const ind)
Retrieves a sparse vector entry.
extblas_sparse_vector EXTBLAS_dusv_begin(const int n)
Creates a handle to a new sparse vector that holds no entries.
int EXTBLAS_dusv_nz(const extblas_sparse_vector x, int *nz)
Retrieves the number of nonzeroes in a given finalised sparse vector.
int EXTBLAS_dusv_clear(extblas_sparse_vector x)
Removes all entries from a finalised sparse vector.
void * extblas_sparse_vector
A sparse vector.
Definition: blas_sparse_vec.h:34
int EXTBLAS_dusv_open(const extblas_sparse_vector x)
Opens a sparse vector for read-out.
int EXTBLAS_dusv_insert_entry(extblas_sparse_vector x, const double val, const int index)
Inserts a new nonzero entry into a sparse vector that is under construction.
int EXTBLAS_dusv_close(const extblas_sparse_vector x)
Closes a sparse vector read-out.
int EXTBLAS_dusv_end(extblas_sparse_vector x)
Signals the end of sparse vector construction, making the given vector ready for use.