Skip to content

Commit

Permalink
Merge branch 'develop' into woptim/rsc-update
Browse files Browse the repository at this point in the history
  • Loading branch information
adayton1 committed Dec 17, 2024
2 parents d504ccb + 8a054d3 commit 35c5658
Show file tree
Hide file tree
Showing 18 changed files with 232 additions and 207 deletions.
3 changes: 2 additions & 1 deletion RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@ The format of this file is based on [Keep a Changelog](http://keepachangelog.com
## [Unreleased] - Release date YYYY-MM-DD

### Added
- Added CARE\_DEEP\_COPY\_RAW\_PTR configuration option.
- Added ATOMIC\_SUB, ATOMIC\_LOAD, ATOMIC\_STORE, ATOMIC\_EXCHANGE, and ATOMIC\_CAS macros.
- Added TSAN\_ONLY\_ATOMIC\_\* macros to suppress tsan data race reports. Controlled by CARE\_ENABLE\_TSAN\_ONLY\_ATOMICS configuration option.

### Removed
- Removed Accessor template parameter from host\_device\_ptr.
- Removed NoOpAccessor and RaceConditionAccessor. It is recommended to use ThreadSanitizer (TSAN) instead to locate race conditions.
- Removed CARE\_ENABLE\_RACE\_DETECTION configuration option.
- Removed implicit conversions between raw pointers and host\_device\_ptrs/host\_ptrs and the corresponding CARE\_ENABLE\_IMPLICIT\_CONVERSIONS configuration option.

### Changed
- Renamed host\_device\_ptr::getPointer to host\_device\_ptr::data.
Expand Down
7 changes: 1 addition & 6 deletions cmake/SetupOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,8 @@ option(ENABLE_PICK "Enable pick and set methods on ManagedArrays" ON)
option(ENABLE_PINNED "Enable pinned memory space" ON)
option(CARE_ENABLE_PINNED_MEMORY_FOR_SCANS "Use pinned memory for scan lengths" ON)
option(CARE_GPU_MEMORY_IS_ACCESSIBLE_ON_CPU "Allows default memory spaces for ZERO_COPY and PAGEABLE to be the GPU memory space" OFF)
# Option to disable implicit conversion between host_device_ptr and raw arrays in CARE.
option(CARE_ENABLE_IMPLICIT_CONVERSIONS "Enable implicit conversions to-from raw pointers" ON)
# CHAI must also be configured with the same settings for implicit conversions.
set(CHAI_ENABLE_IMPLICIT_CONVERSIONS ${CARE_ENABLE_IMPLICIT_CONVERSIONS} CACHE BOOL "Enable implicit conversions to-from raw pointers")
option(CARE_LEGACY_COMPATIBILITY_MODE "Enable legacy compatibility mode" OFF)
option(CARE_DEEP_COPY_RAW_PTR "Use deep copy for managed array initialization from raw pointer" OFF)
option(CARE_ENABLE_MANAGED_PTR "Enable managed_ptr aliases, tests, and reproducer" ON)
option(CARE_DISABLE_RAJAPLUGIN "Disable use of the RAJA plugin. WILL ALSO DISABLE MEMORY MOTION." OFF)
option(CARE_ENABLE_EXTERN_INSTANTIATE "Enable extern instantiation of template functions" OFF)
Expand All @@ -32,8 +29,6 @@ option(CARE_NEVER_USE_RAJA_PARALLEL_SCAN "Disable RAJA parallel scans in SCAN lo
option(CARE_ENABLE_FUSER_BIN_32 "Enable the 32 register fusible loop bin." OFF)
option(CARE_ENABLE_PARALLEL_LOOP_BACKWARDS "Reverse the start and end for parallel loops." OFF)
option(CARE_ENABLE_STALE_DATA_CHECK "Enable checking for stale host data. Only applicable for GPU (or GPU simulation) builds." OFF)
# TODO: Investigate correctness and performance impact of this option
option(CARE_ENABLE_TSAN_ONLY_ATOMICS "Enable atomics for ThreadSanitizer (TSAN) build." OFF)

# Extra components
cmake_dependent_option(CARE_ENABLE_TESTS "Build CARE tests"
Expand Down
2 changes: 0 additions & 2 deletions configs/lc/toss_4_x86_64_ib_cray/amdclang.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,3 @@ set(ENABLE_HIP ON CACHE BOOL "Enable Hip")
set(ROCM_PATH "/usr/tce/packages/rocmcc/rocmcc-6.1.0-magic" CACHE PATH "")
set(CMAKE_HIP_ARCHITECTURES "gfx942:xnack+" CACHE STRING "")
set(AMDGPU_TARGETS "gfx942:xnack+" CACHE STRING "")

set(CARE_ENABLE_IMPLICIT_CONVERSIONS OFF CACHE BOOL "Enable implicit conversions")
7 changes: 5 additions & 2 deletions src/care/DefaultMacros.h
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@ OMP_FOR_BEGIN for (auto INDEX = _care_openmp_for_loop_chunk_begin_ndx; INDEX < _
#define CARE_CHECKED_PARALLEL_LOOP_END(CHECK) CARE_CHECKED_POLICY_LOOP_END(CHECK)

#define CARE_CHECKED_REDUCE_LOOP_START(INDEX, START_INDEX, END_INDEX, CHECK) \
CARE_CHECKED_POLICY_LOOP_START(care::parallel_reduce,INDEX, START_INDEX, END_INDEX, CHECK)
CARE_CHECKED_POLICY_LOOP_START(care::gpu_reduce,INDEX, START_INDEX, END_INDEX, CHECK)

#define CARE_CHECKED_REDUCE_LOOP_END(CHECK) CARE_CHECKED_POLICY_LOOP_END(CHECK)

Expand Down Expand Up @@ -771,7 +771,7 @@ OMP_FOR_BEGIN for (auto INDEX = _care_openmp_for_loop_chunk_begin_ndx; INDEX < _
#define CARE_CHECKED_CHUNKED_PARALLEL_LOOP_END(CHECK) CARE_CHECKED_CHUNKED_POLICY_LOOP_END(CHECK)

#define CARE_CHECKED_CHUNKED_REDUCE_LOOP_START(INDEX, START_INDEX, END_INDEX, CHUNK_SIZE, CHECK) \
CARE_CHECKED_CHUNKED_POLICY_LOOP_START(care::parallel_reduce,INDEX, START_INDEX, END_INDEX, CHUNK_SIZE, CHECK)
CARE_CHECKED_CHUNKED_POLICY_LOOP_START(care::gpu_reduce,INDEX, START_INDEX, END_INDEX, CHUNK_SIZE, CHECK)

#define CARE_CHECKED_CHUNKED_REDUCE_LOOP_END(CHECK) CARE_CHECKED_CHUNKED_POLICY_LOOP_END(CHECK)

Expand Down Expand Up @@ -1278,6 +1278,9 @@ OMP_FOR_BEGIN for (auto INDEX = _care_openmp_for_loop_chunk_begin_ndx; INDEX < _
launch_2D_jagged(care::gpu{}, XSTART, XEND, XLENGTHS.data(chai::DEFAULT, true), YSTART, YLENGTH, __FILE__, __LINE__, [=] CARE_DEVICE (int XINDEX, int YINDEX)->void {
#define CARE_LOOP_2D_STREAM_JAGGED_END });

#define CARE_LOOP_2D_REDUCE_JAGGED(XINDEX, XSTART, XEND, XLENGTHS, YINDEX, YSTART, YLENGTH, FLAT_INDEX) \
launch_2D_jagged(care::gpu_reduce{}, XSTART, XEND, XLENGTHS.data(chai::DEFAULT, true), YSTART, YLENGTH, __FILE__, __LINE__, [=] CARE_DEVICE (int XINDEX, int YINDEX)->void {
#define CARE_LOOP_2D_REDUCE_JAGGED_END });

#endif // !defined(_CARE_DEFAULT_MACROS_H_)

51 changes: 0 additions & 51 deletions src/care/KeyValueSorter_decl.h
Original file line number Diff line number Diff line change
Expand Up @@ -174,31 +174,6 @@ class CARE_DLL_API KeyValueSorter<KeyType, ValueType, RAJADeviceExec> {
setKeyValueArraysFromManagedArray(m_keys, m_values, len, arr);
}

#if defined(CARE_ENABLE_IMPLICIT_CONVERSIONS)

///////////////////////////////////////////////////////////////////////////
/// @author Alan Dayton
///
/// @brief Constructor
///
/// Allocates space and initializes the KeyValueSorter by copying
/// elements and ordering from the given managed array
///
/// @note This overload is needed to prevent ambiguity when implicit
/// casts are enabled
///
/// @param[in] len - The number of elements to allocate space for
/// @param[in] arr - The managed array to copy elements from
///
/// @return a KeyValueSorter instance
///////////////////////////////////////////////////////////////////////////
KeyValueSorter<KeyType, ValueType, RAJADeviceExec>(const size_t len, const host_device_ptr<ValueType> & arr)
: KeyValueSorter<KeyType, ValueType, RAJADeviceExec>(len, host_device_ptr<const ValueType>(arr))
{
}

#endif // defined(CARE_ENABLE_IMPLICIT_CONVERSIONS)

///////////////////////////////////////////////////////////////////////////
/// @author Alan Dayton
/// @brief (Shallow) Copy constructor
Expand Down Expand Up @@ -758,32 +733,6 @@ class CARE_DLL_API KeyValueSorter<KeyType, ValueType, RAJA::seq_exec> {
setKeyValueArraysFromManagedArray(m_keyValues, len, arr);
}

#if defined(CARE_ENABLE_IMPLICIT_CONVERSIONS)

///////////////////////////////////////////////////////////////////////////
/// @author Alan Dayton
///
/// @brief Constructor
///
/// Allocates space and initializes the KeyValueSorter by copying
/// elements and ordering from the given managed array
///
/// @note This overload is needed to prevent ambiguity when implicit
/// casts are enabled
///
/// @param[in] len - The number of elements to allocate space for
/// @param[in] arr - The managed array to copy elements from
///
/// @return a KeyValueSorter instance
///
///////////////////////////////////////////////////////////////////////////
KeyValueSorter<KeyType, ValueType, RAJA::seq_exec>(const size_t len, const host_device_ptr<ValueType> & arr)
: KeyValueSorter<KeyType, ValueType, RAJA::seq_exec>(len, host_device_ptr<const ValueType>(arr))
{
}

#endif // defined(CARE_ENABLE_IMPLICIT_CONVERSIONS)

///////////////////////////////////////////////////////////////////////////
/// @author Alan Dayton
/// @brief (Shallow) Copy constructor
Expand Down
45 changes: 45 additions & 0 deletions src/care/LoopFuser.h
Original file line number Diff line number Diff line change
Expand Up @@ -1273,9 +1273,14 @@ void LoopFuser<REGISTER_COUNT, XARGS...>::registerAction(const char * fileName,
#define FUSIBLE_LOOP_STREAM_R_END \
} }); } FUSIBLE_FLUSH_IF_NEEDED

#define FUSIBLE_REDUCE_LOOP_R FUSIBLE_LOOP_STREAM_R
#define FUSIBLE_REDUCE_LOOP_R_END FUSIBLE_LOOP_STREAM_R_END

#define FUSIBLE_LOOP_STREAM(INDEX, START, END) FUSIBLE_LOOP_STREAM_R(INDEX, START, END, CARE_DEFAULT_LOOP_FUSER_REGISTER_COUNT)
#define FUSIBLE_LOOP_STREAM_END FUSIBLE_LOOP_STREAM_R_END

#define FUSIBLE_REDUCE_LOOP FUSIBLE_LOOP_STREAM
#define FUSIBLE_REDUCE_LOOP_END FUSIBLE_LOOP_STREAM_END

#define FUSIBLE_KERNEL_R(REGISTER_COUNT) { \
auto __fuser__ = LOOPFUSER(REGISTER_COUNT)::getInstance(); \
Expand Down Expand Up @@ -1304,9 +1309,14 @@ void LoopFuser<REGISTER_COUNT, XARGS...>::registerAction(const char * fileName,
} \
}); }}

#define FUSIBLE_REDUCE_LOOP_PHASE_R FUSIBLE_LOOP_PHASE_R
#define FUSIBLE_REDUCE_LOOP_PHASE_R_END FUSIBLE_LOOP_PHASE_R_END

#define FUSIBLE_LOOP_PHASE(INDEX, START, END, PRIORITY) FUSIBLE_LOOP_PHASE_R(INDEX, START, END, PRIORITY, CARE_DEFAULT_LOOP_FUSER_REGISTER_COUNT)
#define FUSIBLE_LOOP_PHASE_END FUSIBLE_LOOP_PHASE_R_END

#define FUSIBLE_REDUCE_LOOP_PHASE FUSIBLE_LOOP_PHASE
#define FUSIBLE_REDUCE_LOOP_PHASE_END FUSIBLE_LOOP_PHASE_END

#define FUSIBLE_KERNEL_PHASE_R(PRIORITY, REGISTER_COUNT) { \
LOOPFUSER(REGISTER_COUNT) * __fuser__ = FusedActionsObserver::getActiveObserver()->getFusedActions<LOOPFUSER(REGISTER_COUNT)>(PRIORITY); \
Expand Down Expand Up @@ -1382,21 +1392,32 @@ void LoopFuser<REGISTER_COUNT, XARGS...>::registerAction(const char * fileName,
#define FUSIBLE_LOOP_SCAN(INDEX, START, END, POS, INIT_POS, BOOL_EXPR) \
FUSIBLE_LOOP_SCAN_R(INDEX, START, END, POS, INIT_POS, BOOL_EXPR, CARE_DEFAULT_LOOP_FUSER_REGISTER_COUNT)

#define FUSIBLE_REDUCE_LOOP_SCAN_R FUSIBLE_LOOP_SCAN_R
#define FUSIBLE_REDUCE_LOOP_SCAN FUSIBLE_LOOP_SCAN

#define _FUSIBLE_LOOP_SCAN_R_END(LENGTH, POS, POS_STORE_DESTINATION) } return 0; }, 1, POS_STORE_DESTINATION); }
#define FUSIBLE_LOOP_SCAN_R_END(LENGTH, POS, POS_STORE_DESTINATION) _FUSIBLE_LOOP_SCAN_R_END(LENGTH, POS, POS_STORE_DESTINATION) FUSIBLE_FLUSH_IF_NEEDED

#define FUSIBLE_LOOP_SCAN_END(LENGTH, POS, POS_STORE_DESTINATION) FUSIBLE_LOOP_SCAN_R_END(LENGTH, POS, POS_STORE_DESTINATION)

#define FUSIBLE_REDUCE_LOOP_SCAN_R_END FUSIBLE_LOOP_SCAN_R_END
#define FUSIBLE_REDUCE_LOOP_SCAN_END FUSIBLE_LOOP_SCAN_END

#define FUSIBLE_LOOP_SCAN_PHASE_R(INDEX, START, END, POS, INIT_POS, BOOL_EXPR, PRIORITY, REGISTER_COUNT) \
_FUSIBLE_LOOP_SCAN_R(FusedActionsObserver::getActiveObserver()->getFusedActions<LOOPFUSER(REGISTER_COUNT)>(PRIORITY), \
INDEX, START, END, POS, INIT_POS, BOOL_EXPR, REGISTER_COUNT)

#define FUSIBLE_LOOP_SCAN_PHASE(INDEX, START, END, POS, INIT_POS, BOOL_EXPR, PRIORITY) \
FUSIBLE_LOOP_SCAN_PHASE_R(INDEX, START, END, POS, INIT_POS, BOOL_EXPR, PRIORITY, CARE_DEFAULT_LOOP_FUSER_REGISTER_COUNT)

#define FUSIBLE_REDUCE_LOOP_SCAN_PHASE_R FUSIBLE_LOOP_SCAN_PHASE_R
#define FUSIBLE_REDUCE_LOOP_SCAN_PHASE FUSIBLE_LOOP_SCAN_PHASE

#define FUSIBLE_LOOP_SCAN_PHASE_END(LENGTH, POS, POS_STORE_DESTINATION) _FUSIBLE_LOOP_SCAN_R_END(LENGTH, POS, POS_STORE_DESTINATION)
#define FUSIBLE_LOOP_SCAN_PHASE_R_END(LENGTH, POS, POS_STORE_DESTINATION) _FUSIBLE_LOOP_SCAN_R_END(LENGTH, POS, POS_STORE_DESTINATION)

#define FUSIBLE_REDUCE_LOOP_SCAN_PHASE_R_END FUSIBLE_LOOP_SCAN_PHASE_R_END
#define FUSIBLE_REDUCE_LOOP_SCAN_PHASE_END FUSIBLE_LOOP_SCAN_PHASE_END

// note - FUSED_SCANVAR will be nullptr if we are not recording, as there will be no need for an intermediate
// FUSED_SCANVAR, so we won't need to write to it in the action or store into it in the conditional
Expand Down Expand Up @@ -1466,13 +1487,21 @@ void LoopFuser<REGISTER_COUNT, XARGS...>::registerAction(const char * fileName,

#define FUSIBLE_LOOP_STREAM_R(INDEX, START, END, REGISTER_COUNT) CARE_STREAM_LOOP(INDEX, START, END)
#define FUSIBLE_LOOP_STREAM(INDEX, START, END) CARE_STREAM_LOOP(INDEX, START, END)
#define FUSIBLE_REDUCE_LOOP_R(INDEX, START, END, REGISTER_COUNT) CARE_REDUCE_LOOP(INDEX, START, END)
#define FUSIBLE_REDUCE_LOOP(INDEX, START, END) CARE_REDUCE_LOOP(INDEX, START, END)

#define FUSIBLE_LOOP_PHASE_R(INDEX, START, END, PRIORITY, REGISTER_COUNT) CARE_STREAM_LOOP(INDEX, START, END)
#define FUSIBLE_LOOP_PHASE(INDEX, START, END, PRIORITY) CARE_STREAM_LOOP(INDEX, START, END)

#define FUSIBLE_LOOP_PHASE_END CARE_STREAM_LOOP_END
#define FUSIBLE_LOOP_PHASE_R_END CARE_STREAM_LOOP_END

#define FUSIBLE_REDUCE_LOOP_PHASE_R(INDEX, START, END, PRIORITY, REGISTER_COUNT) CARE_STREAM_LOOP(INDEX, START, END)
#define FUSIBLE_REDUCE_LOOP_PHASE(INDEX, START, END, PRIORITY) CARE_STREAM_LOOP(INDEX, START, END)

#define FUSIBLE_REDUCE_LOOP_PHASE_END CARE_REDUCE_LOOP_END
#define FUSIBLE_REDUCE_LOOP_PHASE_R_END CARE_REDUCE_LOOP_END

#define FUSIBLE_FLUSH_IF_NEEDED
#define FUSIBLE_PHASE_RESET

Expand All @@ -1485,6 +1514,9 @@ void LoopFuser<REGISTER_COUNT, XARGS...>::registerAction(const char * fileName,
#define FUSIBLE_LOOP_STREAM_R_END CARE_STREAM_LOOP_END
#define FUSIBLE_LOOP_STREAM_END CARE_STREAM_LOOP_END

#define FUSIBLE_REDUCE_LOOP_R_END CARE_REDUCE_LOOP_END
#define FUSIBLE_REDUCE_LOOP_END CARE_REDUCE_LOOP_END

#define FUSIBLE_KERNEL_PHASE_R_END CARE_PARALLEL_KERNEL_END
#define FUSIBLE_KERNEL_R_END CARE_PARALLEL_KERNEL_END
#define FUSIBLE_KERNEL_PHASE_END CARE_PARALLEL_KERNEL_END
Expand All @@ -1501,16 +1533,29 @@ void LoopFuser<REGISTER_COUNT, XARGS...>::registerAction(const char * fileName,
#define FUSIBLE_LOOP_SCAN_R(INDEX, START, END, POS, INIT_POS, BOOL_EXPR, REGISTER_COUNT) SCAN_LOOP(INDEX, START, END, POS, INIT_POS, BOOL_EXPR)
#define FUSIBLE_LOOP_SCAN(INDEX, START, END, POS, INIT_POS, BOOL_EXPR) SCAN_LOOP(INDEX, START, END, POS, INIT_POS, BOOL_EXPR)

#define FUSIBLE_REDUCE_LOOP_SCAN_R(INDEX, START, END, POS, INIT_POS, BOOL_EXPR, REGISTER_COUNT) SCAN_REDUCE_LOOP(INDEX, START, END, POS, INIT_POS, BOOL_EXPR)
#define FUSIBLE_REDUCE_LOOP_SCAN(INDEX, START, END, POS, INIT_POS, BOOL_EXPR) SCAN_REDUCE_LOOP(INDEX, START, END, POS, INIT_POS, BOOL_EXPR)

#define FUSIBLE_LOOP_SCAN_R_END(LENGTH, POS, POS_STORE_DESTINATION) SCAN_LOOP_END(LENGTH, POS, POS_STORE_DESTINATION)
#define FUSIBLE_LOOP_SCAN_END(LENGTH, POS, POS_STORE_DESTINATION) SCAN_LOOP_END(LENGTH, POS, POS_STORE_DESTINATION)

#define FUSIBLE_REDUCE_LOOP_SCAN_R_END(LENGTH, POS, POS_STORE_DESTINATION) SCAN_REDUCE_LOOP_END(LENGTH, POS, POS_STORE_DESTINATION)
#define FUSIBLE_REDUCE_LOOP_SCAN_END(LENGTH, POS, POS_STORE_DESTINATION) SCAN_REDUCE_LOOP_END(LENGTH, POS, POS_STORE_DESTINATION)

#define FUSIBLE_LOOP_SCAN_PHASE_R(INDEX, START, END, POS, INIT_POS, BOOL_EXPR, PRIORITY, REGISTER_COUNT) \
SCAN_LOOP(INDEX, START, END, POS, INIT_POS, BOOL_EXPR)
#define FUSIBLE_LOOP_SCAN_PHASE(INDEX, START, END, POS, INIT_POS, BOOL_EXPR, PRIORITY) SCAN_LOOP(INDEX, START, END, POS, INIT_POS, BOOL_EXPR)

#define FUSIBLE_REDUCE_LOOP_SCAN_PHASE_R(INDEX, START, END, POS, INIT_POS, BOOL_EXPR, PRIORITY, REGISTER_COUNT) \
SCAN_REDUCE_LOOP(INDEX, START, END, POS, INIT_POS, BOOL_EXPR)
#define FUSIBLE_REDUCE_LOOP_SCAN_PHASE(INDEX, START, END, POS, INIT_POS, BOOL_EXPR, PRIORITY) SCAN_REDUCE_LOOP(INDEX, START, END, POS, INIT_POS, BOOL_EXPR)

#define FUSIBLE_LOOP_SCAN_PHASE_R_END(LENGTH, POS, POS_STORE_DESTINATION) SCAN_LOOP_END(LENGTH, POS, POS_STORE_DESTINATION)
#define FUSIBLE_LOOP_SCAN_PHASE_END(LENGTH, POS, POS_STORE_DESTINATION) SCAN_LOOP_END(LENGTH, POS, POS_STORE_DESTINATION)

#define FUSIBLE_REDUCE_LOOP_SCAN_PHASE_R_END(LENGTH, POS, POS_STORE_DESTINATION) SCAN_REDUCE_LOOP_END(LENGTH, POS, POS_STORE_DESTINATION)
#define FUSIBLE_REDUCE_LOOP_SCAN_PHASE_END(LENGTH, POS, POS_STORE_DESTINATION) SCAN_REDUCE_LOOP_END(LENGTH, POS, POS_STORE_DESTINATION)

#define FUSIBLE_FREE(A) A.free()
#define FUSIBLE_FREE_DEVICE(A,DEST,ELEM) care::wrappedFreeDeviceMemory(A, DEST, ELEM);

Expand Down
10 changes: 0 additions & 10 deletions src/care/algorithm_decl.h
Original file line number Diff line number Diff line change
Expand Up @@ -250,16 +250,6 @@ CARE_HOST_DEVICE bool checkSorted(const care::host_device_ptr<const T>& array, c
const bool allowDuplicates = false,
const bool warnOnFailure = true);

#if defined(CARE_ENABLE_IMPLICIT_CONVERSIONS)

template <typename T>
CARE_HOST_DEVICE bool checkSorted(const care::host_device_ptr<T>& array, const int len,
const char* name, const char* argname,
const bool allowDuplicates = false,
const bool warnOnFailure = true);

#endif // defined(CARE_ENABLE_IMPLICIT_CONVERSIONS)

template<typename mapType>
CARE_HOST_DEVICE CARE_DLL_API int BinarySearch(const mapType *map,
const int start,
Expand Down
15 changes: 0 additions & 15 deletions src/care/algorithm_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,21 +103,6 @@ CARE_HOST_DEVICE CARE_INLINE bool checkSorted(const care::host_device_ptr<const
return checkSorted<T>(array.data(), len, name, argname, allowDuplicates, warnOnFailure);
}

#if defined(CARE_ENABLE_IMPLICIT_CONVERSIONS)

template <typename T>
CARE_HOST_DEVICE CARE_INLINE bool checkSorted(const care::host_device_ptr<T>& array,
const int len,
const char* name,
const char* argname,
const bool allowDuplicates,
const bool warnOnFailure)
{
return checkSorted(care::host_device_ptr<const T>(array), len, name, argname, allowDuplicates, warnOnFailure);
}

#endif // defined(CARE_ENABLE_IMPLICIT_CONVERSIONS)

/************************************************************************
* Function : IntersectArrays<A,RAJAExec>
* Author(s) : Peter Robinson, based on IntersectGlobalIDArrays by Al Nichols
Expand Down
Loading

0 comments on commit 35c5658

Please sign in to comment.