diff --git a/thrust/scan.h b/thrust/scan.h index 668db7247..9b3814223 100644 --- a/thrust/scan.h +++ b/thrust/scan.h @@ -44,12 +44,16 @@ THRUST_NAMESPACE_BEGIN * This version of \p inclusive_scan assumes plus as the associative operator. * When the input and output sequences are the same, the scan is performed * in-place. - + * * \p inclusive_scan is similar to \c std::partial_sum in the STL. The primary * difference between the two functions is that \c std::partial_sum guarantees * a serial summation order, while \p inclusive_scan requires associativity of * the binary operation to parallelize the prefix sum. * + * Results are not deterministic for pseudo-associative operators (e.g., + * addition of floating-point types). Results for pseudo-associative + * operators may vary from run to run. + * * The algorithm's execution is parallelized as determined by \p exec. * * \param exec The execution policy to use for parallelization. @@ -106,12 +110,16 @@ __host__ __device__ * This version of \p inclusive_scan assumes plus as the associative operator. * When the input and output sequences are the same, the scan is performed * in-place. - + * * \p inclusive_scan is similar to \c std::partial_sum in the STL. The primary * difference between the two functions is that \c std::partial_sum guarantees * a serial summation order, while \p inclusive_scan requires associativity of * the binary operation to parallelize the prefix sum. - * + * + * Results are not deterministic for pseudo-associative operators (e.g., + * addition of floating-point types). Results for pseudo-associative + * operators may vary from run to run. + * * \param first The beginning of the input sequence. * \param last The end of the input sequence. * \param result The beginning of the output sequence. @@ -154,12 +162,16 @@ templatebinary_pred(*i, *(i+1)) is true, and belong to * different segments otherwise. * + * Results are not deterministic for pseudo-associative operators (e.g., + * addition of floating-point types). Results for pseudo-associative + * operators may vary from run to run. + * * This version of \p inclusive_scan_by_key uses the associative operator * \c binary_op to perform the prefix sum. When the input and output sequences * are the same, the scan is performed in-place. @@ -1042,6 +1106,10 @@ template*i == *(i+1), and belong to * different segments otherwise. * + * Results are not deterministic for pseudo-associative operators (e.g., + * addition of floating-point types). Results for pseudo-associative + * operators may vary from run to run. + * * Refer to the most general form of \p exclusive_scan_by_key for additional details. * * The algorithm's execution is parallelized as determined by \p exec. @@ -1101,6 +1169,10 @@ __host__ __device__ * belong to the same segment if *i == *(i+1), and belong to * different segments otherwise. * + * Results are not deterministic for pseudo-associative operators (e.g., + * addition of floating-point types). Results for pseudo-associative + * operators may vary from run to run. + * * Refer to the most general form of \p exclusive_scan_by_key for additional details. * * \param first1 The beginning of the key sequence. @@ -1146,6 +1218,10 @@ templatei+1 in the range [first1, last1) belong to the same segment if * binary_pred(*i, *(i+1)) is true, and belong to different segments otherwise. * + * Results are not deterministic for pseudo-associative operators (e.g., + * addition of floating-point types). Results for pseudo-associative + * operators may vary from run to run. + * * The algorithm's execution is parallelized as determined by \p exec. * * \param exec The execution policy to use for parallelization. @@ -1332,6 +1416,10 @@ __host__ __device__ * i+1 in the range [first1, last1) belong to the same segment if * binary_pred(*i, *(i+1)) is true, and belong to different segments otherwise. * + * Results are not deterministic for pseudo-associative operators (e.g., + * addition of floating-point types). Results for pseudo-associative + * operators may vary from run to run. + * * \param first1 The beginning of the key sequence. * \param last1 The end of the key sequence. * \param first2 The beginning of the input value sequence. @@ -1397,6 +1485,10 @@ template