Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
b8d025d
Add initial rocm cxx tests
pfultz2 Feb 11, 2026
3cfc07e
Format
pfultz2 Feb 11, 2026
89747b1
Add more type traits
pfultz2 Feb 11, 2026
99cbeb0
Format
pfultz2 Feb 11, 2026
e9b8a6a
Add more type traits tests
pfultz2 Feb 11, 2026
706b2d5
Format
pfultz2 Feb 11, 2026
2676ef7
Move declval
pfultz2 Feb 11, 2026
aa49111
Add operations class
pfultz2 Feb 11, 2026
c0acd27
Format
pfultz2 Feb 11, 2026
5764ba7
Add reverse iterator
pfultz2 Feb 11, 2026
4330fb6
Format
pfultz2 Feb 11, 2026
032c06d
Add array class
pfultz2 Feb 11, 2026
140a37d
Format
pfultz2 Feb 11, 2026
3bc95ac
Add algorithm header
pfultz2 Feb 12, 2026
b488046
Format
pfultz2 Feb 12, 2026
8fb398a
Update algorithm header
pfultz2 Feb 13, 2026
825515b
Format
pfultz2 Feb 13, 2026
8cb326a
Add remove_pointer
pfultz2 Feb 13, 2026
8abb772
Format
pfultz2 Feb 13, 2026
0abfa7d
Add remove_cvref
pfultz2 Feb 13, 2026
13e37c5
FOrmat
pfultz2 Feb 13, 2026
9583af1
Add is_pointer trait
pfultz2 Feb 13, 2026
7ae6f56
Format
pfultz2 Feb 13, 2026
a491154
Use builtin
pfultz2 Feb 13, 2026
1e0c7ef
Add bit_cast
pfultz2 Feb 13, 2026
b228e3b
Format
pfultz2 Feb 13, 2026
c9f2730
Add more bit functions
pfultz2 Feb 13, 2026
dbf5b7d
Format
pfultz2 Feb 13, 2026
63f025f
Simplify rotr
pfultz2 Feb 13, 2026
9ddf29f
Add more type traits
pfultz2 Feb 13, 2026
af9fbe7
Format
pfultz2 Feb 13, 2026
2c15d57
Add is_aritmetic
pfultz2 Feb 13, 2026
1e2c312
Add move and forward functions
pfultz2 Feb 13, 2026
c080a49
Format
pfultz2 Feb 13, 2026
bf26a69
Merge branch 'develop' into rocm-cxx
pfultz2 Apr 19, 2026
4ef0ff1
Add bf16
pfultz2 Apr 19, 2026
13d3162
Add license
pfultz2 Apr 19, 2026
5011c05
Format
pfultz2 Apr 19, 2026
39c7a75
Merge branch 'develop' into rocm-cxx
pfultz2 May 11, 2026
c29e76b
Fix hip rtc def
pfultz2 May 11, 2026
b85c844
Format
pfultz2 May 11, 2026
a537220
Add correct header
pfultz2 May 11, 2026
8e786ab
Copy config file
pfultz2 May 12, 2026
0896035
Merge branch 'develop' into rocm-cxx
pfultz2 May 12, 2026
71e9d44
Add workaround macro
pfultz2 May 12, 2026
0f542c8
Fix tests
pfultz2 May 12, 2026
6b944a9
Format
pfultz2 May 12, 2026
b3a907d
Add clang-tidy customization
pfultz2 May 12, 2026
207681c
Apply fixits
pfultz2 May 12, 2026
ddf5120
Format
pfultz2 May 12, 2026
0c3571a
Fix unused function warning
pfultz2 May 12, 2026
cdccdbb
Format
pfultz2 May 12, 2026
0958e9d
Fix tidy warnings
pfultz2 May 12, 2026
06ed1fd
Fix macro prefix
pfultz2 May 13, 2026
9c0aec5
Merge branch 'develop' into rocm-cxx
pfultz2 Jun 8, 2026
443fcfe
Fix format issue
music-dino Jun 24, 2026
cce9144
Revert "Fix format issue"
music-dino Jun 24, 2026
f1b5b5e
Merge branch 'develop' into rocm-cxx
pfultz2 Jul 14, 2026
25556d8
Merge branch 'develop' into rocm-cxx
pfultz2 Jul 23, 2026
f3a8d13
Define assert for cppcheck
pfultz2 Jul 23, 2026
3a83a73
Fix cppcheck warnings
pfultz2 Jul 23, 2026
e836859
Format
pfultz2 Jul 23, 2026
899f29c
Update year
pfultz2 Jul 23, 2026
53e9a14
Fix tidy warnings
pfultz2 Jul 23, 2026
caa9859
Update src/targets/gpu/kernels/include/rocm/limits.hpp
pfultz2 Jul 24, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,8 @@ rocm_enable_cppcheck(
# Disable because of too many FPs
arithOperationsOnVoidPointer
definePrefix:*test/include/test.hpp
definePrefix:*test/gpu/kernels/rocm*
definePrefix:*src/targets/gpu/kernels/include/rocm*
definePrefix:*src/targets/gpu/kernels/include/migraphx/kernels/test.hpp
# test/pp.cpp exercises the MIGRAPHX_PP_* metaprogramming macros directly, which
# cppcheck's preprocessor cannot expand.
Expand Down
4 changes: 2 additions & 2 deletions src/compile_src.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2015-2024 Advanced Micro Devices, Inc. All rights reserved.
* Copyright (c) 2015-2026 Advanced Micro Devices, Inc. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down Expand Up @@ -51,7 +51,7 @@ std::vector<char> src_compiler::compile(const std::vector<src_file>& srcs) const
write_buffer(full_path, src.content.data(), src.content.size());
if(src.path.extension().string() == ".cpp")
{
params.emplace_back(src.path.filename().string());
params.emplace_back(src.path.string());
if(out.empty())
out = src.path.stem().string() + out_ext;
}
Expand Down
42 changes: 36 additions & 6 deletions src/targets/gpu/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,9 @@ else()
set(MIGRAPHX_USE_HIPRTC ON CACHE BOOL "Use hipRTC APIs")
endif()

file(GLOB KERNEL_FILES CONFIGURE_DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/kernels/include/migraphx/kernels/*.hpp)
file(GLOB_RECURSE KERNEL_FILES CONFIGURE_DEPENDS LIST_DIRECTORIES false
${CMAKE_CURRENT_SOURCE_DIR}/kernels/include/*.hpp
)

if(NOT MIGRAPHX_USE_COMPOSABLEKERNEL)
list(REMOVE_ITEM KERNEL_FILES
Expand Down Expand Up @@ -117,6 +118,31 @@ if(HAS_HIP_LAMBDA_HOST_DEVICE)
target_compile_options(compile_for_gpu INTERFACE -fhip-lambda-host-device)
endif()

function(check_hip_deduction_guide VAR)
set(CMAKE_REQUIRED_LIBRARIES hip::device)
check_cxx_source_compiles("
template<class T>
struct S
{
T x;
};

template<class T>
S(T) -> S<T>;

__attribute__((device)) auto f()
{
return S{1};
}
" ${VAR})
endfunction()
check_hip_deduction_guide(HIP_HAS_WORKING_DEDUCTION_GUIDE)

if(NOT HIP_HAS_WORKING_DEDUCTION_GUIDE)
message(STATUS "Enable deduction guide workaround")
target_compile_definitions(compile_for_gpu INTERFACE MIGRAPHX_WORKAROUND_BROKEN_DEDUCTION_GUIDE=1)
endif()

set_target_properties(migraphx_device PROPERTIES EXPORT_NAME device)
rocm_set_soversion(migraphx_device ${MIGRAPHX_SO_VERSION})
rocm_add_version_resource(migraphx_device "AMD MIGraphX" "MIGraphX Device Library - GPU Device Operations")
Expand Down Expand Up @@ -176,18 +202,22 @@ endif()

add_library(migraphx_gpu_kernel_file_check EXCLUDE_FROM_ALL)

set(CK_TIDY_SKIP_KERNEL_FILES "ck" "ck_gemm" "ck_gemm_softmax_gemm")
set(CK_TIDY_SKIP_KERNEL_FILES ck ck_gemm ck_gemm_softmax_gemm)
foreach(KERNEL_FILE ${KERNEL_FILES})
get_filename_component(KERNEL_BASE_FILE ${KERNEL_FILE} NAME_WE)
file(RELATIVE_PATH KERNEL_FILE_REL ${CMAKE_CURRENT_SOURCE_DIR}/kernels/include/ ${KERNEL_FILE})
get_filename_component(KERNEL_BASE_FILE ${KERNEL_FILE_REL} NAME_WE)
get_filename_component(KERNEL_DIR ${KERNEL_FILE_REL} DIRECTORY)
# Temporary workaround for tidy issue that arises from the fact that CK no longer exposes headers to the host code
if(${KERNEL_BASE_FILE} IN_LIST CK_TIDY_SKIP_KERNEL_FILES)
continue()
endif()
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/kernels/include/migraphx/kernels/${KERNEL_BASE_FILE}.cpp "#include <migraphx/kernels/${KERNEL_BASE_FILE}.hpp>\n")
target_sources(migraphx_gpu_kernel_file_check PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/kernels/include/migraphx/kernels/${KERNEL_BASE_FILE}.cpp)
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/kernels/include/${KERNEL_DIR}/${KERNEL_BASE_FILE}.cpp "#include <${KERNEL_DIR}/${KERNEL_BASE_FILE}.hpp>\n")
target_sources(migraphx_gpu_kernel_file_check PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/kernels/include/${KERNEL_DIR}/${KERNEL_BASE_FILE}.cpp)
Comment on lines +214 to +215
endforeach()

target_link_libraries(migraphx_gpu_kernel_file_check compile_migraphx_gpu_kernels)
# Copy the .clang-tidy files over
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/kernels/include/rocm/.clang-tidy ${CMAKE_CURRENT_BINARY_DIR}/kernels/include/rocm/.clang-tidy COPYONLY)

rocm_clang_tidy_check(migraphx_gpu_kernel_file_check)

Expand Down
2 changes: 1 addition & 1 deletion src/targets/gpu/compile_hip_code_object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ compile_hip_raw(context& ctx, const std::string& content, hip_compile_options op
kernels.end(),
std::back_inserter(srcs),
[](const std::pair<std::string_view, std::string_view>& elem) { return src_file{elem}; });
srcs.emplace_back("main.cpp", content);
srcs.emplace_back(options.src_file, content);

if(options.global % options.local != 0 and hip_accept_non_uniform_wg())
options.emplace_param("-fno-offload-uniform-block");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ struct hip_compile_options
std::vector<shape> virtual_inputs = {};
std::vector<src_file> additional_src_files = {};
std::int64_t output_arg = -1;
std::string src_file = "main.cpp";

/**
* @brief Set the launch parameters but allow v to override the values
Expand Down
8 changes: 8 additions & 0 deletions src/targets/gpu/kernels/include/migraphx/kernels/test.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,14 @@ struct test_manager
__device__ [[maybe_unused]] static void __VA_ARGS__( \
[[maybe_unused]] migraphx::test::test_manager& migraphx_private_test_manager)

// NOLINTNEXTLINE
#define TEST_CASE_TEMPLATE(...) \
__device__ [[maybe_unused]] static void __VA_ARGS__( \
[[maybe_unused]] migraphx::test::test_manager& migraphx_private_test_manager)

// NOLINTNEXTLINE
#define TEST_CASE_REGISTER(...)

} // namespace test
} // namespace migraphx
#endif // MIGRAPHX_GUARD_KERNELS_TEST_HPP
6 changes: 6 additions & 0 deletions src/targets/gpu/kernels/include/rocm/.clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
InheritParentConfig: True
CheckOptions:
- key: readability-identifier-naming.MacroDefinitionPrefix
value: ROCM_
- key: readability-identifier-naming.ConstexprMethodIgnoredRegexp
value: 'quiet_NaN|signaling_NaN'
55 changes: 55 additions & 0 deletions src/targets/gpu/kernels/include/rocm/algorithm.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2025-2026 Advanced Micro Devices, Inc. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
*/
#ifndef ROCM_GUARD_ROCM_ALGORITHM_HPP
#define ROCM_GUARD_ROCM_ALGORITHM_HPP

#include <rocm/algorithm/iter_swap.hpp>
#include <rocm/algorithm/fill.hpp>
#include <rocm/algorithm/accumulate.hpp>
#include <rocm/algorithm/copy.hpp>
#include <rocm/algorithm/copy_if.hpp>
#include <rocm/algorithm/transform.hpp>
#include <rocm/algorithm/is_sorted_until.hpp>
#include <rocm/algorithm/is_sorted.hpp>
#include <rocm/algorithm/for_each.hpp>
#include <rocm/algorithm/find_if.hpp>
#include <rocm/algorithm/find.hpp>
#include <rocm/algorithm/any_of.hpp>
#include <rocm/algorithm/none_of.hpp>
#include <rocm/algorithm/all_of.hpp>
#include <rocm/algorithm/search.hpp>
#include <rocm/algorithm/inner_product.hpp>
#include <rocm/algorithm/equal.hpp>
#include <rocm/algorithm/iota.hpp>
#include <rocm/algorithm/min_element.hpp>
#include <rocm/algorithm/max_element.hpp>
#include <rocm/algorithm/rotate.hpp>
#include <rocm/algorithm/upper_bound.hpp>
#include <rocm/algorithm/lower_bound.hpp>
#include <rocm/algorithm/sort.hpp>
#include <rocm/algorithm/stable_sort.hpp>
#include <rocm/algorithm/merge.hpp>

#endif // ROCM_GUARD_ROCM_ALGORITHM_HPP
51 changes: 51 additions & 0 deletions src/targets/gpu/kernels/include/rocm/algorithm/accumulate.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2025-2026 Advanced Micro Devices, Inc. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
*/
#ifndef ROCM_GUARD_ROCM_ALGORITHM_ACCUMULATE_HPP
#define ROCM_GUARD_ROCM_ALGORITHM_ACCUMULATE_HPP

#include <rocm/config.hpp>

namespace rocm {
inline namespace ROCM_INLINE_NS {

template <class InputIt, class T, class BinaryOperation>
constexpr T accumulate(InputIt first, InputIt last, T init, BinaryOperation op)
{
for(; first != last; ++first)
{
init = op(static_cast<T&&>(init), *first);
}
return init;
}

template <class InputIt, class T>
constexpr T accumulate(InputIt first, InputIt last, T init)
{
return accumulate(first, last, init, [](auto x, auto y) { return x + y; });
}

} // namespace ROCM_INLINE_NS
} // namespace rocm
#endif // ROCM_GUARD_ROCM_ALGORITHM_ACCUMULATE_HPP
42 changes: 42 additions & 0 deletions src/targets/gpu/kernels/include/rocm/algorithm/all_of.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2025-2026 Advanced Micro Devices, Inc. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
*/
#ifndef ROCM_GUARD_ROCM_ALGORITHM_ALL_OF_HPP
#define ROCM_GUARD_ROCM_ALGORITHM_ALL_OF_HPP

#include <rocm/config.hpp>
#include <rocm/algorithm/none_of.hpp>

namespace rocm {
inline namespace ROCM_INLINE_NS {

template <class InputIt, class UnaryPredicate>
constexpr bool all_of(InputIt first, InputIt last, UnaryPredicate p)
{
return none_of(first, last, [=](auto&& x) { return not p(x); });
}

} // namespace ROCM_INLINE_NS
} // namespace rocm
#endif // ROCM_GUARD_ROCM_ALGORITHM_ALL_OF_HPP
42 changes: 42 additions & 0 deletions src/targets/gpu/kernels/include/rocm/algorithm/any_of.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2025-2026 Advanced Micro Devices, Inc. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
*/
#ifndef ROCM_GUARD_ROCM_ALGORITHM_ANY_OF_HPP
#define ROCM_GUARD_ROCM_ALGORITHM_ANY_OF_HPP

#include <rocm/config.hpp>
#include <rocm/algorithm/find_if.hpp>

namespace rocm {
inline namespace ROCM_INLINE_NS {

template <class InputIt, class UnaryPredicate>
constexpr bool any_of(InputIt first, InputIt last, UnaryPredicate p)
{
return find_if(first, last, p) != last;
}

} // namespace ROCM_INLINE_NS
} // namespace rocm
#endif // ROCM_GUARD_ROCM_ALGORITHM_ANY_OF_HPP
45 changes: 45 additions & 0 deletions src/targets/gpu/kernels/include/rocm/algorithm/copy.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
* The MIT License (MIT)
*
* Copyright (c) 2025-2026 Advanced Micro Devices, Inc. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
*/
#ifndef ROCM_GUARD_ROCM_ALGORITHM_COPY_HPP
#define ROCM_GUARD_ROCM_ALGORITHM_COPY_HPP

#include <rocm/config.hpp>

namespace rocm {
inline namespace ROCM_INLINE_NS {

template <class InputIt, class OutputIt>
constexpr OutputIt copy(InputIt first, InputIt last, OutputIt d_first)
{
while(first != last)
{
*d_first++ = *first++;
}
return d_first;
}

} // namespace ROCM_INLINE_NS
} // namespace rocm
#endif // ROCM_GUARD_ROCM_ALGORITHM_COPY_HPP
Loading
Loading