CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
109 lines
1.9 KiB
ReStructuredText
109 lines
1.9 KiB
ReStructuredText
.. meta::
|
|
:description: rocPRIM documentation and API reference library
|
|
:keywords: rocPRIM, ROCm, API, documentation
|
|
|
|
.. _iterators:
|
|
|
|
********************************************************************
|
|
rocPRIM iterators
|
|
********************************************************************
|
|
|
|
Constant
|
|
==========
|
|
|
|
.. doxygenclass:: rocprim::constant_iterator
|
|
:members:
|
|
|
|
|
|
.. note::
|
|
|
|
For example, ``constant_iterator(20)`` generates the infinite sequence::
|
|
|
|
20
|
|
20
|
|
20
|
|
...
|
|
|
|
Counting
|
|
==========
|
|
|
|
.. doxygenclass:: rocprim::counting_iterator
|
|
:members:
|
|
|
|
.. note::
|
|
For example, ``counting_iterator(20)`` generates the infinite sequence::
|
|
|
|
20
|
|
21
|
|
22
|
|
23
|
|
...
|
|
|
|
.. _transform:
|
|
|
|
Transform
|
|
============
|
|
|
|
.. doxygenclass:: rocprim::transform_iterator
|
|
:members:
|
|
|
|
.. note::
|
|
|
|
``transform_iterator(sequence, transform)`` should generate the sequence::
|
|
|
|
transform(sequence(0))
|
|
transform(sequence(1))
|
|
...
|
|
|
|
Predicate
|
|
---------
|
|
|
|
.. doxygenclass:: rocprim::predicate_iterator
|
|
:members:
|
|
|
|
.. note::
|
|
``predicate_iterator(sequence, test, predicate)`` generates the sequence::
|
|
|
|
predicate(test[0]) ? sequence[0] : default
|
|
predicate(test[1]) ? sequence[1] : default
|
|
predicate(test[2]) ? sequence[2] : default
|
|
...
|
|
|
|
Pairing Values with Indices
|
|
=============================
|
|
|
|
.. doxygenclass:: rocprim::arg_index_iterator
|
|
:members:
|
|
|
|
.. note::
|
|
``arg_index_iterator(sequence)`` generates the sequence of tuples::
|
|
|
|
(0, sequence[0])
|
|
(1, sequence[1])
|
|
...
|
|
|
|
Zip
|
|
==============
|
|
|
|
.. doxygenclass:: rocprim::zip_iterator
|
|
:members:
|
|
|
|
.. note::
|
|
``zip_iterator(sequence_X, sequence_Y)`` generates the sequence of tuples::
|
|
|
|
(sequence_X[0], sequence_Y[0])
|
|
(sequence_X[1], sequence_Y[1])
|
|
...
|
|
|
|
Discard
|
|
==============
|
|
|
|
.. doxygenclass:: rocprim::discard_iterator
|
|
:members:
|
|
|
|
Texture Cache
|
|
================
|
|
|
|
.. doxygenclass:: rocprim::texture_cache_iterator
|
|
:members:
|