ALP User Documentation 0.7.0
Algebraic Programming User Documentation
descriptors.hpp
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
27#ifndef _H_GRB_DESCRIPTOR
28#define _H_GRB_DESCRIPTOR
29
30#include <string>
31
32
33namespace grb {
34
54 typedef unsigned int Descriptor;
55
57 namespace descriptors {
58
63 static constexpr Descriptor no_operation = 0;
64
66 static constexpr Descriptor invert_mask = 1;
67
71 static constexpr Descriptor transpose_matrix = 2;
72
91 static constexpr Descriptor no_duplicates = 4;
92
103 static constexpr Descriptor structural = 8;
104
118
151 static constexpr Descriptor dense = 16;
152
159 static constexpr Descriptor add_identity = 32;
160
167 static constexpr Descriptor use_index = 64;
168
196 static constexpr Descriptor no_casting = 256;
197
207 static constexpr Descriptor explicit_zero = 512;
208
213 static constexpr Descriptor safe_overlap = 1024;
214
219 static constexpr Descriptor transpose_left = 2048;
220
225 static constexpr Descriptor transpose_right = 4096;
226
227 // Put internal, backend-specific descriptors last
228
229
239 static constexpr Descriptor force_row_major = 8192;
240
248 std::string toString( const Descriptor descr );
249
250 } // namespace descriptors
251
252 namespace internal {
253
255 static constexpr Descriptor MAX_DESCRIPTOR_VALUE = 16383;
256
257 } // namespace internal
258
259} // namespace grb
260
261#endif
262
static constexpr Descriptor transpose_left
For operations involving two matrices, transposes the left-hand side input matrix prior to applying i...
Definition: descriptors.hpp:219
static constexpr Descriptor transpose_matrix
Transposes the input matrix prior to applying it.
Definition: descriptors.hpp:71
static constexpr Descriptor no_casting
Disallows the standard casting of input parameters to a compatible domain in case they did not match ...
Definition: descriptors.hpp:196
static constexpr Descriptor use_index
Instead of using input vector elements, use the index of those elements.
Definition: descriptors.hpp:167
static constexpr Descriptor transpose_right
For operations involving two matrices, transposes the right-hand side input matrix prior to applying ...
Definition: descriptors.hpp:225
static constexpr Descriptor no_operation
Indicates no additional pre- or post-processing on any of the GraphBLAS function arguments.
Definition: descriptors.hpp:63
static constexpr Descriptor no_duplicates
For data ingestion methods, such as grb::buildVector or grb::buildMatrix, this descriptor indicates t...
Definition: descriptors.hpp:91
static constexpr Descriptor invert_mask
Inverts the mask prior to applying it.
Definition: descriptors.hpp:66
static constexpr Descriptor safe_overlap
Indicates overlapping input and output vectors is intentional and safe, due to, for example,...
Definition: descriptors.hpp:213
static constexpr Descriptor add_identity
For any call to a matrix computation, the input matrix A is instead interpreted as ,...
Definition: descriptors.hpp:159
static constexpr Descriptor explicit_zero
Computation shall proceed with zeros (according to the current semiring) propagating throughout the r...
Definition: descriptors.hpp:207
static constexpr Descriptor structural_complement
Uses the structural complement of a mask vector.
Definition: descriptors.hpp:117
static constexpr Descriptor structural
Uses the structure of a mask vector only.
Definition: descriptors.hpp:103
static constexpr Descriptor dense
Indicates that all input and output vectors to an ALP/GraphBLAS primitive are structurally dense.
Definition: descriptors.hpp:151
std::string toString(const Descriptor descr)
Translates a descriptor into a string.
The ALP/GraphBLAS namespace.
Definition: graphblas.hpp:452
unsigned int Descriptor
Descriptors indicate pre- or post-processing for some or all of the arguments to an ALP/GraphBLAS cal...
Definition: descriptors.hpp:54