mirror of
https://github.com/ROCm/composable_kernel.git
synced 2026-05-11 00:40:09 +00:00
move utility headers from library/include to include path (#1697)
This commit is contained in:
16
include/ck/library/utility/numeric.hpp
Normal file
16
include/ck/library/utility/numeric.hpp
Normal file
@@ -0,0 +1,16 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
// Copyright (c) 2018-2023, Advanced Micro Devices, Inc. All rights reserved.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <iterator>
|
||||
#include <numeric>
|
||||
|
||||
namespace ck {
|
||||
template <typename T, typename ForwardIterator, typename Size, typename BinaryOperation>
|
||||
auto accumulate_n(ForwardIterator first, Size count, T init, BinaryOperation op)
|
||||
-> decltype(std::accumulate(first, std::next(first, count), init, op))
|
||||
{
|
||||
return std::accumulate(first, std::next(first, count), init, op);
|
||||
}
|
||||
} // namespace ck
|
||||
Reference in New Issue
Block a user