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

Commit

Permalink
Merge pull request #492 from senior-zero/fix-main/github/adj_diff_in_…
Browse files Browse the repository at this point in the history
…place

Fix in-place execution of adjacent difference
  • Loading branch information
gevtushenko authored May 25, 2022
2 parents 7a9a501 + 389b81b commit 86eeaf1
Showing 1 changed file with 3 additions and 3 deletions.
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

0 comments on commit 86eeaf1

Please sign in to comment.