Skip to content
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 src/care/KeyValueSorter_decl.h
Original file line number Diff line number Diff line change
Expand Up @@ -464,10 +464,10 @@ class CARE_DLL_API KeyValueSorter<KeyType, ValueType, RAJADeviceExec> {
auto keys = m_keys;

// Use SCAN_LOOP to identify where ranges start
SCAN_LOOP(i, start, start+len-1, idx, count,
SCAN_LOOP(i, start, start+len, idx, count,
(i == start) || (keys[i] != keys[i-1])) {
rangeStarts[idx] = i;
} SCAN_LOOP_END(len, idx, count)
} SCAN_LOOP_END(start+len, idx, count)

// Set the last range end
rangeStarts.set(count , start+len);
Expand Down Expand Up @@ -617,7 +617,7 @@ class CARE_DLL_API KeyValueSorter<KeyType, ValueType, RAJADeviceExec> {

// Use exclusive scan to compute output positions
host_device_ptr<int> positions(m_len+1);
care::exclusive_scan(RAJADeviceExec{}, isUnique, positions, m_len, 0, false);
care::exclusive_scan(RAJADeviceExec{}, isUnique, positions, m_len + 1, 0, false);

// Get the total number of unique elements
int newSize = positions.pick(m_len);
Expand Down
Loading