Skip to content
This repository was archived by the owner on Mar 21, 2024. It is now read-only.

Fix in-place execution of adjacent difference #492

Merged
Merged
Changes from all commits
Commits
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
6 changes: 3 additions & 3 deletions cub/device/dispatch/dispatch_adjacent_difference.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ DeviceAdjacentDifferenceDifferenceKernel(InputIteratorT input,
agent.Process(tile_idx, tile_base);
}

template <typename InputIteratorT>
template <typename InputIteratorT, bool MayAlias = true>
struct DeviceAdjacentDifferencePolicy
{
using ValueT = typename std::iterator_traits<InputIteratorT>::value_type;
Expand All @@ -131,7 +131,7 @@ struct DeviceAdjacentDifferencePolicy
AgentAdjacentDifferencePolicy<128,
Nominal8BItemsToItems<ValueT>(7),
BLOCK_LOAD_WARP_TRANSPOSE,
LOAD_LDG,
MayAlias ? LOAD_CA : LOAD_LDG,
BLOCK_STORE_WARP_TRANSPOSE>;
};

Expand All @@ -145,7 +145,7 @@ template <typename InputIteratorT,
bool MayAlias,
bool ReadLeft,
typename SelectedPolicy =
DeviceAdjacentDifferencePolicy<InputIteratorT>>
DeviceAdjacentDifferencePolicy<InputIteratorT, MayAlias>>
struct DispatchAdjacentDifference : public SelectedPolicy
{
using InputT = typename std::iterator_traits<InputIteratorT>::value_type;
Expand Down