Files
composable_kernel/include/ck/utility/reduction_common.hpp
2025-08-29 03:39:09 +00:00

29 lines
581 B
C++
Executable File

// SPDX-License-Identifier: MIT
// Copyright (c) 2018-2023, Advanced Micro Devices, Inc. All rights reserved.
#pragma once
#include "ck/utility/reduction_enums.hpp"
namespace ck {
struct float_equal_one
{
template <class T>
__host__ __device__ inline bool operator()(T x)
{
return x <= static_cast<T>(1.0f) and x >= static_cast<T>(1.0f);
};
};
struct float_equal_zero
{
template <class T>
__host__ __device__ inline bool operator()(T x)
{
return x <= static_cast<T>(0.0f) and x >= static_cast<T>(0.0f);
};
};
} // namespace ck