alpaka
Abstraction Library for Parallel Kernel Acceleration
BlockSyncNoOp.hpp
Go to the documentation of this file.
1 /* Copyright 2022 Axel Huebl, Benjamin Worpitz, Matthias Werner, RenĂ© Widera, Jan Stephan, Bernhard Manfred Gruber
2  * SPDX-License-Identifier: MPL-2.0
3  */
4 
5 #pragma once
6 
8 #include "alpaka/core/Common.hpp"
9 
10 namespace alpaka
11 {
12  //! The no op block synchronization.
13  class BlockSyncNoOp : public concepts::Implements<ConceptBlockSync, BlockSyncNoOp>
14  {
15  };
16 
17  namespace trait
18  {
19  template<>
21  {
23  ALPAKA_FN_ACC static auto syncBlockThreads(BlockSyncNoOp const& /* blockSync */) -> void
24  {
25  // Nothing to do.
26  }
27  };
28 
29  template<typename TOp>
31  {
33  ALPAKA_FN_ACC static auto syncBlockThreadsPredicate(BlockSyncNoOp const& /* blockSync */, int predicate)
34  -> int
35  {
36  return predicate;
37  }
38  };
39  } // namespace trait
40 } // namespace alpaka
The no op block synchronization.
#define ALPAKA_FN_ACC
All functions that can be used on an accelerator have to be attributed with ALPAKA_FN_ACC or ALPAKA_F...
Definition: Common.hpp:38
#define ALPAKA_NO_HOST_ACC_WARNING
Disable nvcc warning: 'calling a host function from host device function.' Usage: ALPAKA_NO_HOST_ACC_...
Definition: Common.hpp:82
The alpaka accelerator library.
Tag used in class inheritance hierarchies that describes that a specific concept (TConcept) is implem...
Definition: Concepts.hpp:15
ALPAKA_NO_HOST_ACC_WARNING static ALPAKA_FN_ACC auto syncBlockThreadsPredicate(BlockSyncNoOp const &, int predicate) -> int
The block synchronization and predicate operation trait.
Definition: Traits.hpp:27
ALPAKA_NO_HOST_ACC_WARNING static ALPAKA_FN_ACC auto syncBlockThreads(BlockSyncNoOp const &) -> void
The block synchronization operation trait.
Definition: Traits.hpp:23