From 675e0e69d0762d2c362c81246b6e2713aa713032 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Frantz?= Date: Tue, 27 Dec 2022 14:24:57 +0100 Subject: [PATCH 1/2] Fix example in documentation This didn't compile. --- thrust/execution_policy.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/thrust/execution_policy.h b/thrust/execution_policy.h index 1e5dfa8f7..85002ded8 100644 --- a/thrust/execution_policy.h +++ b/thrust/execution_policy.h @@ -282,10 +282,10 @@ template * } * }; * ... - * int vec(3); + * int vec[3]; * vec[0] = 0; vec[1] = 1; vec[2] = 2; * - * thrust::for_each(thrust::host, vec.begin(), vec.end(), printf_functor()); + * thrust::for_each(thrust::host, vec, vec + 3, printf_functor()); * * // 0 1 2 is printed to standard output in some unspecified order * \endcode From 695c610b8113c76d94851651ce634b3a91747d55 Mon Sep 17 00:00:00 2001 From: Michael Schellenberger Costa Date: Tue, 21 Feb 2023 14:54:40 +0100 Subject: [PATCH 2/2] Simplify array construction --- thrust/execution_policy.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/thrust/execution_policy.h b/thrust/execution_policy.h index 85002ded8..ecf14413f 100644 --- a/thrust/execution_policy.h +++ b/thrust/execution_policy.h @@ -282,8 +282,7 @@ template * } * }; * ... - * int vec[3]; - * vec[0] = 0; vec[1] = 1; vec[2] = 2; + * int vec[] = { 0, 1, 2 }; * * thrust::for_each(thrust::host, vec, vec + 3, printf_functor()); *