Skip to content

Commit bf23f89

Browse files
authored
clarifies that init val is not included in block aggregate (NVIDIA#4515)
1 parent c6923df commit bf23f89

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

cub/cub/block/block_scan.cuh

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -859,6 +859,8 @@ public:
859859
//! The corresponding output ``thread_data`` in those threads will be ``INT_MIN, 0, 0, 2, ..., 124, 126``.
860860
//! Furthermore the value ``126`` will be stored in ``block_aggregate`` for all threads.
861861
//!
862+
//! \note ``initial_value`` is not applied to the block-wide aggregate.
863+
//!
862864
//! @endrst
863865
//!
864866
//! @tparam ScanOp
@@ -872,7 +874,9 @@ public:
872874
//!
873875
//! @param[in] initial_value
874876
//! @rst
875-
//! Initial value to seed the exclusive scan (and is assigned to ``output[0]`` in *thread*\ :sub:`0`)
877+
//! Initial value to seed the exclusive scan (and is assigned to ``output[0]`` in *thread*\ :sub:`0`). It is not
878+
//! taken into account for ``block_aggregate``.
879+
//!
876880
//! @endrst
877881
//!
878882
//! @param[in] scan_op
@@ -1117,6 +1121,8 @@ public:
11171121
//! ``{ [INT_MIN,0,0,2], [2,4,4,6], ..., [506,508,508,510] }``.
11181122
//! Furthermore the value ``510`` will be stored in ``block_aggregate`` for all threads.
11191123
//!
1124+
//! \note ``initial_value`` is not applied to the block-wide aggregate.
1125+
//!
11201126
//! @endrst
11211127
//!
11221128
//! @tparam ITEMS_PER_THREAD
@@ -1133,7 +1139,8 @@ public:
11331139
//!
11341140
//! @param[in] initial_value
11351141
//! @rst
1136-
//! Initial value to seed the exclusive scan (and is assigned to `output[0]` in *thread*\ :sub:`0`)
1142+
//! Initial value to seed the exclusive scan (and is assigned to `output[0]` in *thread*\ :sub:`0`). It is not taken
1143+
//! into account for ``block_aggregate``.
11371144
//! @endrst
11381145
//!
11391146
//! @param[in] scan_op
@@ -2405,6 +2412,8 @@ public:
24052412
//!
24062413
//! The value ``126`` will be stored in ``block_aggregate`` for all threads.
24072414
//!
2415+
//! \note ``initial_value`` is not applied to the block-wide aggregate.
2416+
//!
24082417
//! @endrst
24092418
//!
24102419
//! @tparam ITEMS_PER_THREAD
@@ -2421,7 +2430,7 @@ public:
24212430
//!
24222431
//! @param[in] initial_value
24232432
//! Initial value to seed the inclusive scan (uniform across block). It is not taken
2424-
//! into account for block_aggregate.
2433+
//! into account for ``block_aggregate``.
24252434
//!
24262435
//! @param[in] scan_op
24272436
//! Binary scan functor

0 commit comments

Comments
 (0)