ALP User Documentation  0.8.preview
Algebraic Programming User Documentation
backends.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 
29 #ifndef _H_GRB_BACKENDS
30 #define _H_GRB_BACKENDS
31 
32 #include <string>
33 #include <iostream>
34 
35 
36 namespace grb {
37 
49  enum Backend {
50 
56 
63 
71 
77 
84  shmem1D,
85 
93  NUMA1D,
94 
101  GENERIC_BSP,
102 
114 
123  doublyBSP1D,
124 
133  BSP2D,
134 
145  autoBSP,
146 
154  optBSP,
155 
164 
172  hybridSmall,
173 
183  hybridMid,
184 
197  hybridLarge,
198 
204  minFootprint,
205 
211 
220  banshee_ssr
221 
222  };
223 
231  static inline std::string toString( const enum grb::Backend backend ) {
232  switch( backend ) {
233  case grb::Backend::reference: return "reference";
234  case grb::Backend::reference_omp: return "reference_omp";
235  case grb::Backend::hyperdags: return "hyperdags";
236  case grb::Backend::nonblocking: return "nonblocking";
237  case grb::Backend::shmem1D: return "shmem1D";
238  case grb::Backend::NUMA1D: return "NUMA1D";
239  case grb::Backend::GENERIC_BSP: return "GENERIC_BSP";
240  case grb::Backend::BSP1D: return "BSP1D";
241  case grb::Backend::doublyBSP1D: return "doublyBSP1D";
242  case grb::Backend::BSP2D: return "BSP2D";
243  case grb::Backend::autoBSP: return "autoBSP";
244  case grb::Backend::optBSP: return "optBSP";
245  case grb::Backend::hybrid: return "hybrid";
246  case grb::Backend::hybridSmall: return "hybridSmall";
247  case grb::Backend::hybridMid: return "hybridMid";
248  case grb::Backend::hybridLarge: return "hybridLarge";
249  case grb::Backend::minFootprint: return "minFootprint";
250  case grb::Backend::banshee: return "banshee";
251  case grb::Backend::banshee_ssr: return "banshee_ssr";
252  default:
253  const int backend_id = static_cast< int >( backend );
254  std::cerr << "Warning, std::string( const grb::Backend ): unknown backend "
255  << backend_id << " encountered, please submit a bug report.\n";
256  return "unknown_backend(id=" + std::to_string( backend_id ) + ")";
257  }
258  }
259 
260 } // namespace grb
261 
262 #endif
263 
A variant for Snitch RISC-V cores.
Definition: backends.hpp:210
A composed backend that uses reference_omp within each user process and BSP1D between sockets.
Definition: backends.hpp:163
A backend that automatically extracts hyperDAGs from user computations.
Definition: backends.hpp:70
The threaded reference implementation.
Definition: backends.hpp:62
The threaded nonblocking implementation.
Definition: backends.hpp:76
The sequential reference implementation.
Definition: backends.hpp:55
Backend
A collection of all backends.
Definition: backends.hpp:49
The ALP/GraphBLAS namespace.
Definition: graphblas.hpp:477
std::string toString(const RC code)
A parallel implementation based on a row-wise 1D data distribution, implemented using LPF.
Definition: backends.hpp:113