ALP User Documentation 0.7.alpha
Algebraic Programming User Documentation
Loading...
Searching...
No Matches
bsp1d/config.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_BSP1D_CONFIG
28#define _H_GRB_BSP1D_CONFIG
29
30#include <assert.h>
31
33
34// if not defined, we set the backend of the BSP1D implementation to the
35// reference implementation
36#ifndef _GRB_BSP1D_BACKEND
37 #pragma message "_GRB_BSP1D_BACKEND was not set-- auto-selecting reference"
38 #define _GRB_BSP1D_BACKEND reference
39#endif
40
41
42namespace grb {
43
44 namespace config {
45
61 template<>
62 class IMPLEMENTATION< BSP1D > {
63
64 private:
65
71 static bool set;
72
78 static grb::config::ALLOC_MODE mode;
79
85 static void deduce() noexcept;
86
87
88 public:
89
93 static constexpr ALLOC_MODE defaultAllocMode() {
95 }
96
103 static constexpr bool fixedVectorCapacities() {
104 return IMPLEMENTATION< _GRB_BSP1D_BACKEND >::fixedVectorCapacities();
105 }
106
125
131 static constexpr Backend coordinatesBackend() {
132 return IMPLEMENTATION< _GRB_BSP1D_BACKEND >::coordinatesBackend();
133 }
134
135 };
136
139 } // namespace config
140
141} // namespace grb
142
143#endif // end ``_H_GRB_BSP1D_CONFIG''
144
static constexpr ALLOC_MODE defaultAllocMode()
Definition: bsp1d/config.hpp:93
static grb::config::ALLOC_MODE sharedAllocMode() noexcept
RC set(Vector< DataType, backend, Coords > &x, const T val, const Phase &phase=EXECUTE, const typename std::enable_if< !grb::is_object< DataType >::value &&!grb::is_object< T >::value, void >::type *const =nullptr) noexcept
Sets all elements of a vector to the given value.
Definition: io.hpp:857
Backend
A collection of all backends.
Definition: backends.hpp:46
@ BSP1D
A parallel implementation based on a row-wise 1D data distribution, implemented using LPF.
Definition: backends.hpp:104
ALLOC_MODE
The memory allocation modes implemented in the grb::reference and the grb::reference_omp backends.
Definition: reference/config.hpp:54
@ ALIGNED
Allocation via posix_memalign.
Definition: reference/config.hpp:57
The ALP/GraphBLAS namespace.
Definition: graphblas.hpp:450
Contains the configuration parameters for the reference and reference_omp backends.