/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-composable-kernel/checkouts/docs-6.4.3/include/ck/utility/reduction_common.hpp Source File

/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-composable-kernel/checkouts/docs-6.4.3/include/ck/utility/reduction_common.hpp Source File#

Composable Kernel: /home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-composable-kernel/checkouts/docs-6.4.3/include/ck/utility/reduction_common.hpp Source File
reduction_common.hpp
Go to the documentation of this file.
1 // SPDX-License-Identifier: MIT
2 // Copyright (c) 2018-2023, Advanced Micro Devices, Inc. All rights reserved.
3 
4 #pragma once
5 
7 
8 namespace ck {
9 
11 {
12  template <class T>
13  __host__ __device__ inline bool operator()(T x)
14  {
15  return x <= static_cast<T>(1.0f) and x >= static_cast<T>(1.0f);
16  };
17 };
18 
20 {
21  template <class T>
22  __host__ __device__ inline bool operator()(T x)
23  {
24  return x <= static_cast<T>(0.0f) and x >= static_cast<T>(0.0f);
25  };
26 };
27 
28 } // namespace ck
Definition: ck.hpp:264
Definition: reduction_common.hpp:11
__host__ __device__ bool operator()(T x)
Definition: reduction_common.hpp:13
Definition: reduction_common.hpp:20
__host__ __device__ bool operator()(T x)
Definition: reduction_common.hpp:22