diff --git a/examples/mode.cu b/examples/mode.cu index 2069adec1..48bbeb9f0 100644 --- a/examples/mode.cu +++ b/examples/mode.cu @@ -46,11 +46,7 @@ int main(void) std::cout << std::endl; // count number of unique keys - size_t num_unique = thrust::inner_product(d_data.begin(), d_data.end() - 1, - d_data.begin() + 1, - 0, - thrust::plus(), - thrust::not_equal_to()) + 1; + size_t num_unique = thrust::unique_count(d_data.begin(), d_data.end()); // count multiplicity of each key thrust::device_vector d_output_keys(num_unique);