├── .github └── workflows │ └── pr.yml ├── .gitignore ├── .gitlab-ci-onetbb.yml ├── .pre-commit-config.yaml ├── .reuse └── dep5 ├── CONTRIBUTING.rst ├── LICENSE.rst ├── LICENSES ├── Apache-2.0.txt ├── CC-BY-4.0.txt └── MIT.txt ├── README.rst ├── doc ├── governance.rst └── versioning.rst ├── oneapi-doc.json ├── pyproject.toml ├── requirements.base.txt ├── requirements.header.txt ├── requirements.txt ├── roadmap.rst ├── scripts ├── install.sh └── oneapi.py ├── security.md ├── source ├── _static │ ├── custom.css │ ├── custom.js │ ├── favicons.png │ ├── oneAPI-rgb-3000.png │ ├── oneAPI-rgb-rev-100.png │ └── oneapi-logo1.png ├── _templates │ ├── breadcrumbs.html │ └── layout.html ├── architecture.rst ├── conf.py ├── conf │ ├── common_conf.py │ └── element_conf.py ├── elements │ ├── element_list.rst │ ├── oneCCL │ │ └── source │ │ │ ├── conf.py │ │ │ ├── definitions.rst │ │ │ ├── index.rst │ │ │ ├── introduction.rst │ │ │ ├── namespaces.rst │ │ │ ├── programming_model.rst │ │ │ ├── spec │ │ │ ├── collective_operations.rst │ │ │ ├── datatypes.rst │ │ │ ├── error_handling.rst │ │ │ ├── generic_workflow.rst │ │ │ ├── group_calls.rst │ │ │ ├── main_objects.rst │ │ │ ├── operation_attributes.rst │ │ │ ├── operation_progress.rst │ │ │ ├── operations.rst │ │ │ └── reductions.rst │ │ │ └── spec_version.rst │ ├── oneDAL │ │ ├── Doxyfile │ │ ├── Makefile │ │ ├── dalapi │ │ │ ├── __init__.py │ │ │ ├── directives.py │ │ │ ├── doxypy │ │ │ │ ├── __init__.py │ │ │ │ ├── builder.py │ │ │ │ ├── cli.py │ │ │ │ ├── index.py │ │ │ │ ├── listing.py │ │ │ │ ├── loader.py │ │ │ │ ├── model.py │ │ │ │ ├── parser │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── compound.py │ │ │ │ │ └── index.py │ │ │ │ └── utils.py │ │ │ ├── extension.py │ │ │ ├── generator.py │ │ │ ├── roles.py │ │ │ ├── transformers.py │ │ │ └── utils.py │ │ ├── include │ │ │ └── oneapi │ │ │ │ └── dal │ │ │ │ ├── algo │ │ │ │ ├── kmeans.hpp │ │ │ │ ├── kmeans_init.hpp │ │ │ │ ├── knn.hpp │ │ │ │ └── pca.hpp │ │ │ │ ├── array.hpp │ │ │ │ ├── common.hpp │ │ │ │ ├── table │ │ │ │ ├── column_accessor.hpp │ │ │ │ ├── common.hpp │ │ │ │ ├── homogen.hpp │ │ │ │ └── row_accessor.hpp │ │ │ │ └── train.hpp │ │ ├── make.bat │ │ └── source │ │ │ ├── _static │ │ │ ├── data_analytics_stages.png │ │ │ └── e2eframeworks.png │ │ │ ├── _templates │ │ │ └── layout.html │ │ │ ├── algorithms │ │ │ ├── clustering │ │ │ │ ├── index.rst │ │ │ │ ├── kmeans.rst │ │ │ │ └── kmeans_init.rst │ │ │ ├── decomposition │ │ │ │ ├── index.rst │ │ │ │ └── pca.rst │ │ │ ├── index.rst │ │ │ └── nearest_neighbors │ │ │ │ ├── index.rst │ │ │ │ └── knn_classification.rst │ │ │ ├── appendix │ │ │ ├── index.rst │ │ │ └── kd_tree.rst │ │ │ ├── bibliography.rst │ │ │ ├── common_interface │ │ │ ├── common_type_definitions.rst │ │ │ ├── error_handling.rst │ │ │ ├── header_files_and_namespaces.rst │ │ │ ├── index.rst │ │ │ └── spec_version.rst │ │ │ ├── conf.py │ │ │ ├── data_management │ │ │ ├── _static │ │ │ │ ├── data_management_flow.png │ │ │ │ ├── dataset.png │ │ │ │ └── table_accessor_usage_example.png │ │ │ ├── accessor │ │ │ │ ├── column.rst │ │ │ │ └── row.rst │ │ │ ├── accessors.rst │ │ │ ├── array.rst │ │ │ ├── csv_data_source.rst │ │ │ ├── data_sources.rst │ │ │ ├── index.rst │ │ │ ├── table │ │ │ │ └── homogen.rst │ │ │ └── tables.rst │ │ │ ├── glossary.rst │ │ │ ├── index.rst │ │ │ ├── introduction.rst │ │ │ ├── notations.rst │ │ │ └── programming_model │ │ │ ├── computational_modes.rst │ │ │ ├── descriptors.rst │ │ │ ├── end_to_end_example.rst │ │ │ ├── index.rst │ │ │ └── operations │ │ │ ├── index.rst │ │ │ └── support.rst │ ├── oneDNN │ │ ├── Doxyfile │ │ ├── include │ │ │ ├── dnnl.h │ │ │ ├── dnnl.hpp │ │ │ ├── dnnl_common.hpp │ │ │ ├── dnnl_graph.hpp │ │ │ ├── dnnl_graph_sycl.hpp │ │ │ ├── dnnl_graph_types.h │ │ │ ├── dnnl_sycl.hpp │ │ │ └── dnnl_types.h │ │ └── source │ │ │ ├── _static │ │ │ ├── img_bf16_diagram.png │ │ │ ├── img_execution_model.png │ │ │ ├── img_multiscalar.png │ │ │ ├── img_primitive.png │ │ │ ├── img_programming_model.png │ │ │ ├── img_singlescalar.png │ │ │ └── unrolled_stack_rnn.jpg │ │ │ ├── conf.py │ │ │ ├── conventions.rst │ │ │ ├── data_model │ │ │ ├── data_types │ │ │ │ ├── bfloat16.rst │ │ │ │ ├── index.rst │ │ │ │ └── int8.rst │ │ │ ├── index.rst │ │ │ └── memory │ │ │ │ ├── formats.rst │ │ │ │ ├── index.rst │ │ │ │ └── objects.rst │ │ │ ├── example.cpp │ │ │ ├── execution_model │ │ │ └── index.rst │ │ │ ├── graph │ │ │ ├── data_model.rst │ │ │ ├── general.rst │ │ │ ├── index.rst │ │ │ ├── ops │ │ │ │ ├── Abs.rst │ │ │ │ ├── AbsBackward.rst │ │ │ │ ├── Add.rst │ │ │ │ ├── AvgPool.rst │ │ │ │ ├── AvgPoolBackward.rst │ │ │ │ ├── BatchNormForwardTraining.rst │ │ │ │ ├── BatchNormInference.rst │ │ │ │ ├── BatchNormTrainingBackward.rst │ │ │ │ ├── BiasAdd.rst │ │ │ │ ├── BiasAddBackward.rst │ │ │ │ ├── Clamp.rst │ │ │ │ ├── ClampBackward.rst │ │ │ │ ├── Concat.rst │ │ │ │ ├── ConvTranspose.rst │ │ │ │ ├── ConvTransposeBackwardData.rst │ │ │ │ ├── ConvTransposeBackwardWeights.rst │ │ │ │ ├── Convolution.rst │ │ │ │ ├── ConvolutionBackwardData.rst │ │ │ │ ├── ConvolutionBackwardWeights.rst │ │ │ │ ├── Dequantize.rst │ │ │ │ ├── Divide.rst │ │ │ │ ├── DynamicDequantize.rst │ │ │ │ ├── DynamicQuantize.rst │ │ │ │ ├── Elu.rst │ │ │ │ ├── EluBackward.rst │ │ │ │ ├── End.rst │ │ │ │ ├── Exp.rst │ │ │ │ ├── GELU.rst │ │ │ │ ├── GELUBackward.rst │ │ │ │ ├── HardSigmoid.rst │ │ │ │ ├── HardSigmoidBackward.rst │ │ │ │ ├── HardSwish.rst │ │ │ │ ├── HardSwishBackward.rst │ │ │ │ ├── Interpolate.rst │ │ │ │ ├── InterpolateBackward.rst │ │ │ │ ├── LayerNorm.rst │ │ │ │ ├── LayerNormBackward.rst │ │ │ │ ├── LeakyReLU.rst │ │ │ │ ├── Log.rst │ │ │ │ ├── LogSoftmax.rst │ │ │ │ ├── LogSoftmaxBackward.rst │ │ │ │ ├── MatMul.rst │ │ │ │ ├── MaxPool.rst │ │ │ │ ├── MaxPoolBackward.rst │ │ │ │ ├── Maximum.rst │ │ │ │ ├── Minimum.rst │ │ │ │ ├── Mish.rst │ │ │ │ ├── MishBackward.rst │ │ │ │ ├── Multiply.rst │ │ │ │ ├── PReLU.rst │ │ │ │ ├── PReLUBackward.rst │ │ │ │ ├── Pow.rst │ │ │ │ ├── Quantize.rst │ │ │ │ ├── ReLU.rst │ │ │ │ ├── ReLUBackward.rst │ │ │ │ ├── Reciprocal.rst │ │ │ │ ├── ReduceL1.rst │ │ │ │ ├── ReduceL2.rst │ │ │ │ ├── ReduceMax.rst │ │ │ │ ├── ReduceMean.rst │ │ │ │ ├── ReduceMin.rst │ │ │ │ ├── ReduceProd.rst │ │ │ │ ├── ReduceSum.rst │ │ │ │ ├── Reorder.rst │ │ │ │ ├── Round.rst │ │ │ │ ├── Select.rst │ │ │ │ ├── Sigmoid.rst │ │ │ │ ├── SigmoidBackward.rst │ │ │ │ ├── SoftPlus.rst │ │ │ │ ├── SoftPlusBackward.rst │ │ │ │ ├── Softmax.rst │ │ │ │ ├── SoftmaxBackward.rst │ │ │ │ ├── Sqrt.rst │ │ │ │ ├── SqrtBackward.rst │ │ │ │ ├── Square.rst │ │ │ │ ├── SquaredDifference.rst │ │ │ │ ├── StaticReshape.rst │ │ │ │ ├── StaticTranspose.rst │ │ │ │ ├── Subtract.rst │ │ │ │ ├── Tanh.rst │ │ │ │ ├── TanhBackward.rst │ │ │ │ ├── TypeCast.rst │ │ │ │ ├── Wildcard.rst │ │ │ │ └── index.rst │ │ │ ├── programming_model.rst │ │ │ └── resources │ │ │ │ ├── bf16_programming.png │ │ │ │ ├── int8_programming.png │ │ │ │ └── programming_concepts.png │ │ │ ├── index.rst │ │ │ ├── introduction.rst │ │ │ ├── primitives │ │ │ ├── attributes │ │ │ │ ├── index.rst │ │ │ │ └── post-ops.rst │ │ │ ├── batch_normalization.rst │ │ │ ├── binary.rst │ │ │ ├── concat.rst │ │ │ ├── convolution.rst │ │ │ ├── eltwise.rst │ │ │ ├── general.rst │ │ │ ├── index.rst │ │ │ ├── inner-product.rst │ │ │ ├── layer_normalization.rst │ │ │ ├── lrn.rst │ │ │ ├── matmul.rst │ │ │ ├── pooling.rst │ │ │ ├── prelu.rst │ │ │ ├── reduction.rst │ │ │ ├── reorder.rst │ │ │ ├── resampling.rst │ │ │ ├── rnn.rst │ │ │ ├── shuffle.rst │ │ │ ├── softmax.rst │ │ │ └── sum.rst │ │ │ └── replacements.inc.rst │ ├── oneDPL │ │ └── source │ │ │ ├── common.rst │ │ │ ├── conf.py │ │ │ ├── index.rst │ │ │ ├── parallel_api.rst │ │ │ ├── parallel_api │ │ │ ├── algorithms.rst │ │ │ ├── buffer_wrappers.rst │ │ │ ├── execution_policies.rst │ │ │ ├── iterators.rst │ │ │ └── parallel_range_api.rst │ │ │ └── sycl_kernels_api.rst │ ├── oneMath │ │ └── source │ │ │ ├── appendix │ │ │ ├── acknowledgment.inc.rst │ │ │ ├── appendix.rst │ │ │ └── future_considerations.inc.rst │ │ │ ├── architecture │ │ │ ├── api_design.inc.rst │ │ │ ├── architecture.rst │ │ │ ├── exceptions.inc.rst │ │ │ ├── execution_model.inc.rst │ │ │ ├── memory_model.inc.rst │ │ │ └── other_architecture.inc.rst │ │ │ ├── conf.py │ │ │ ├── domains │ │ │ ├── blas │ │ │ │ ├── asum.rst │ │ │ │ ├── axpby.rst │ │ │ │ ├── axpy.rst │ │ │ │ ├── axpy_batch.rst │ │ │ │ ├── blas-level-1-routines.rst │ │ │ │ ├── blas-level-2-routines.rst │ │ │ │ ├── blas-level-3-routines.rst │ │ │ │ ├── blas-like-extensions.rst │ │ │ │ ├── blas.rst │ │ │ │ ├── copy.rst │ │ │ │ ├── copy_batch.rst │ │ │ │ ├── dgmm_batch.rst │ │ │ │ ├── dot.rst │ │ │ │ ├── dotc.rst │ │ │ │ ├── dotu.rst │ │ │ │ ├── gbmv.rst │ │ │ │ ├── gemm.rst │ │ │ │ ├── gemm_batch.rst │ │ │ │ ├── gemm_bias.rst │ │ │ │ ├── gemmt.rst │ │ │ │ ├── gemv.rst │ │ │ │ ├── gemv_batch.rst │ │ │ │ ├── ger.rst │ │ │ │ ├── gerc.rst │ │ │ │ ├── geru.rst │ │ │ │ ├── hbmv.rst │ │ │ │ ├── hemm.rst │ │ │ │ ├── hemv.rst │ │ │ │ ├── her.rst │ │ │ │ ├── her2.rst │ │ │ │ ├── her2k.rst │ │ │ │ ├── herk.rst │ │ │ │ ├── hpmv.rst │ │ │ │ ├── hpr.rst │ │ │ │ ├── hpr2.rst │ │ │ │ ├── iamax.rst │ │ │ │ ├── iamin.rst │ │ │ │ ├── imatcopy.rst │ │ │ │ ├── imatcopy_batch.rst │ │ │ │ ├── nrm2.rst │ │ │ │ ├── omatadd.rst │ │ │ │ ├── omatadd_batch.rst │ │ │ │ ├── omatcopy.rst │ │ │ │ ├── omatcopy2.rst │ │ │ │ ├── omatcopy_batch.rst │ │ │ │ ├── rot.rst │ │ │ │ ├── rotg.rst │ │ │ │ ├── rotm.rst │ │ │ │ ├── rotmg.rst │ │ │ │ ├── sbmv.rst │ │ │ │ ├── scal.rst │ │ │ │ ├── sdsdot.rst │ │ │ │ ├── spmv.rst │ │ │ │ ├── spr.rst │ │ │ │ ├── spr2.rst │ │ │ │ ├── swap.rst │ │ │ │ ├── symm.rst │ │ │ │ ├── symv.rst │ │ │ │ ├── syr.rst │ │ │ │ ├── syr2.rst │ │ │ │ ├── syr2k.rst │ │ │ │ ├── syrk.rst │ │ │ │ ├── syrk_batch.rst │ │ │ │ ├── tbmv.rst │ │ │ │ ├── tbsv.rst │ │ │ │ ├── tpmv.rst │ │ │ │ ├── tpsv.rst │ │ │ │ ├── trmm.rst │ │ │ │ ├── trmv.rst │ │ │ │ ├── trsm.rst │ │ │ │ ├── trsm_batch.rst │ │ │ │ └── trsv.rst │ │ │ ├── dense_linear_algebra.inc.rst │ │ │ ├── dft │ │ │ │ ├── compute_backward.rst │ │ │ │ ├── compute_forward.rst │ │ │ │ ├── config_params │ │ │ │ │ ├── data_layouts.rst │ │ │ │ │ ├── storage_formats.rst │ │ │ │ │ └── workspace_placement.rst │ │ │ │ ├── descriptor.rst │ │ │ │ ├── dft.rst │ │ │ │ └── enums_and_config_params.rst │ │ │ ├── discrete_fourier_transforms.inc.rst │ │ │ ├── domains.rst │ │ │ ├── equations │ │ │ │ ├── error_functions_plot.jpg │ │ │ │ ├── inverse_error_functions_plot.jpg │ │ │ │ ├── rng-leapfrog.png │ │ │ │ └── rng-skip-ahead.png │ │ │ ├── lapack │ │ │ │ ├── gebrd.rst │ │ │ │ ├── gebrd_scratchpad_size.rst │ │ │ │ ├── geqrf.rst │ │ │ │ ├── geqrf_batch.rst │ │ │ │ ├── geqrf_batch_scratchpad_size.rst │ │ │ │ ├── geqrf_scratchpad_size.rst │ │ │ │ ├── gerqf.rst │ │ │ │ ├── gerqf_scratchpad_size.rst │ │ │ │ ├── gesvd.rst │ │ │ │ ├── gesvd_scratchpad_size.rst │ │ │ │ ├── getrf.rst │ │ │ │ ├── getrf_batch.rst │ │ │ │ ├── getrf_batch_scratchpad_size.rst │ │ │ │ ├── getrf_scratchpad_size.rst │ │ │ │ ├── getri.rst │ │ │ │ ├── getri_batch.rst │ │ │ │ ├── getri_batch_scratchpad_size.rst │ │ │ │ ├── getri_scratchpad_size.rst │ │ │ │ ├── getrs.rst │ │ │ │ ├── getrs_batch.rst │ │ │ │ ├── getrs_batch_scratchpad_size.rst │ │ │ │ ├── getrs_scratchpad_size.rst │ │ │ │ ├── heevd.rst │ │ │ │ ├── heevd_scratchpad_size.rst │ │ │ │ ├── hegvd.rst │ │ │ │ ├── hegvd_scratchpad_size.rst │ │ │ │ ├── hetrd.rst │ │ │ │ ├── hetrd_scratchpad_size.rst │ │ │ │ ├── hetrf.rst │ │ │ │ ├── hetrf_scratchpad_size.rst │ │ │ │ ├── lapack-like-extensions.inc.rst │ │ │ │ ├── lapack-linear-equation-routines.inc.rst │ │ │ │ ├── lapack-singular-value-eigenvalue-routines.inc.rst │ │ │ │ ├── lapack.rst │ │ │ │ ├── orgbr.rst │ │ │ │ ├── orgbr_scratchpad_size.rst │ │ │ │ ├── orgqr.rst │ │ │ │ ├── orgqr_batch.rst │ │ │ │ ├── orgqr_batch_scratchpad_size.rst │ │ │ │ ├── orgqr_scratchpad_size.rst │ │ │ │ ├── orgtr.rst │ │ │ │ ├── orgtr_scratchpad_size.rst │ │ │ │ ├── ormqr.rst │ │ │ │ ├── ormqr_scratchpad_size.rst │ │ │ │ ├── ormrq.rst │ │ │ │ ├── ormrq_scratchpad_size.rst │ │ │ │ ├── ormtr.rst │ │ │ │ ├── ormtr_scratchpad_size.rst │ │ │ │ ├── potrf.rst │ │ │ │ ├── potrf_batch.rst │ │ │ │ ├── potrf_batch_scratchpad_size.rst │ │ │ │ ├── potrf_scratchpad_size.rst │ │ │ │ ├── potri.rst │ │ │ │ ├── potri_scratchpad_size.rst │ │ │ │ ├── potrs.rst │ │ │ │ ├── potrs_batch.rst │ │ │ │ ├── potrs_batch_scratchpad_size.rst │ │ │ │ ├── potrs_scratchpad_size.rst │ │ │ │ ├── syevd.rst │ │ │ │ ├── syevd_scratchpad_size.rst │ │ │ │ ├── sygvd.rst │ │ │ │ ├── sygvd_scratchpad_size.rst │ │ │ │ ├── sytrd.rst │ │ │ │ ├── sytrd_scratchpad_size.rst │ │ │ │ ├── sytrf.rst │ │ │ │ ├── sytrf_scratchpad_size.rst │ │ │ │ ├── trtrs.rst │ │ │ │ ├── trtrs_scratchpad_size.rst │ │ │ │ ├── ungbr.rst │ │ │ │ ├── ungbr_scratchpad_size.rst │ │ │ │ ├── ungqr.rst │ │ │ │ ├── ungqr_batch.rst │ │ │ │ ├── ungqr_batch_scratchpad_size.rst │ │ │ │ ├── ungqr_scratchpad_size.rst │ │ │ │ ├── ungtr.rst │ │ │ │ ├── ungtr_scratchpad_size.rst │ │ │ │ ├── unmqr.rst │ │ │ │ ├── unmqr_scratchpad_size.rst │ │ │ │ ├── unmrq.rst │ │ │ │ ├── unmrq_scratchpad_size.rst │ │ │ │ ├── unmtr.rst │ │ │ │ └── unmtr_scratchpad_size.rst │ │ │ ├── matrix-storage.rst │ │ │ ├── random_number_generators.inc.rst │ │ │ ├── rng │ │ │ │ ├── bibliography.rst │ │ │ │ ├── device_api │ │ │ │ │ ├── device-adaptors.rst │ │ │ │ │ ├── device-distributions-template-parameter-method.rst │ │ │ │ │ ├── device-distributions.rst │ │ │ │ │ ├── device-engines.rst │ │ │ │ │ ├── device-rng-bernoulli.rst │ │ │ │ │ ├── device-rng-beta.rst │ │ │ │ │ ├── device-rng-bits.rst │ │ │ │ │ ├── device-rng-count_engine_adaptor.rst │ │ │ │ │ ├── device-rng-exponential.rst │ │ │ │ │ ├── device-rng-gamma.rst │ │ │ │ │ ├── device-rng-gaussian.rst │ │ │ │ │ ├── device-rng-generate-routines.rst │ │ │ │ │ ├── device-rng-generate.rst │ │ │ │ │ ├── device-rng-geometric.rst │ │ │ │ │ ├── device-rng-lognormal.rst │ │ │ │ │ ├── device-rng-mcg31m1.rst │ │ │ │ │ ├── device-rng-mcg59.rst │ │ │ │ │ ├── device-rng-mrg32k3a.rst │ │ │ │ │ ├── device-rng-pcg64-dxsm.rst │ │ │ │ │ ├── device-rng-philox4x32x10.rst │ │ │ │ │ ├── device-rng-poisson.rst │ │ │ │ │ ├── device-rng-skip-ahead.rst │ │ │ │ │ ├── device-rng-uniform-bits.rst │ │ │ │ │ ├── device-rng-uniform-continuous.rst │ │ │ │ │ ├── device-rng-uniform-discrete.rst │ │ │ │ │ ├── device-rng-usage-model.rst │ │ │ │ │ ├── device-routines.rst │ │ │ │ │ └── device-service-routines.rst │ │ │ │ ├── host_api │ │ │ │ │ ├── distributions-template-parameter-onemath-rng-method-values.rst │ │ │ │ │ ├── distributions.rst │ │ │ │ │ ├── engines-basic-random-number-generators.rst │ │ │ │ │ ├── generate-routine.rst │ │ │ │ │ ├── onemath-rng-ars5.rst │ │ │ │ │ ├── onemath-rng-bernoulli.rst │ │ │ │ │ ├── onemath-rng-beta.rst │ │ │ │ │ ├── onemath-rng-binomial.rst │ │ │ │ │ ├── onemath-rng-bits.rst │ │ │ │ │ ├── onemath-rng-cauchy.rst │ │ │ │ │ ├── onemath-rng-chi_square.rst │ │ │ │ │ ├── onemath-rng-default_engine.rst │ │ │ │ │ ├── onemath-rng-exponential.rst │ │ │ │ │ ├── onemath-rng-gamma.rst │ │ │ │ │ ├── onemath-rng-gaussian.rst │ │ │ │ │ ├── onemath-rng-gaussian_mv.rst │ │ │ │ │ ├── onemath-rng-generate.rst │ │ │ │ │ ├── onemath-rng-geometric.rst │ │ │ │ │ ├── onemath-rng-gumbel.rst │ │ │ │ │ ├── onemath-rng-hypergeometric.rst │ │ │ │ │ ├── onemath-rng-laplace.rst │ │ │ │ │ ├── onemath-rng-leapfrog.rst │ │ │ │ │ ├── onemath-rng-lognormal.rst │ │ │ │ │ ├── onemath-rng-mcg31m1.rst │ │ │ │ │ ├── onemath-rng-mcg59.rst │ │ │ │ │ ├── onemath-rng-mrg32k3a.rst │ │ │ │ │ ├── onemath-rng-mt19937.rst │ │ │ │ │ ├── onemath-rng-mt2203.rst │ │ │ │ │ ├── onemath-rng-multinomial.rst │ │ │ │ │ ├── onemath-rng-negbinomial.rst │ │ │ │ │ ├── onemath-rng-niederreiter.rst │ │ │ │ │ ├── onemath-rng-nondeterministic.rst │ │ │ │ │ ├── onemath-rng-philox4x32x10.rst │ │ │ │ │ ├── onemath-rng-poisson.rst │ │ │ │ │ ├── onemath-rng-poisson_v.rst │ │ │ │ │ ├── onemath-rng-r250.rst │ │ │ │ │ ├── onemath-rng-rayleigh.rst │ │ │ │ │ ├── onemath-rng-sfmt19937.rst │ │ │ │ │ ├── onemath-rng-skip_ahead.rst │ │ │ │ │ ├── onemath-rng-sobol.rst │ │ │ │ │ ├── onemath-rng-uniform-continuous.rst │ │ │ │ │ ├── onemath-rng-uniform-discrete.rst │ │ │ │ │ ├── onemath-rng-uniform_bits.rst │ │ │ │ │ ├── onemath-rng-usage-model.rst │ │ │ │ │ ├── onemath-rng-weibull.rst │ │ │ │ │ ├── onemath-rng-wichmann_hill.rst │ │ │ │ │ ├── rng-host-routines.rst │ │ │ │ │ └── service-routines.rst │ │ │ │ └── onemath-rng-overview.rst │ │ │ ├── sparse_linear_algebra.inc.rst │ │ │ ├── spblas │ │ │ │ ├── data_types │ │ │ │ │ ├── data_handles.rst │ │ │ │ │ ├── format-descriptions.rst │ │ │ │ │ ├── init_coo_matrix.rst │ │ │ │ │ ├── init_csr_matrix.rst │ │ │ │ │ ├── init_dense_matrix.rst │ │ │ │ │ ├── init_dense_vector.rst │ │ │ │ │ ├── release_dense_matrix.rst │ │ │ │ │ ├── release_dense_vector.rst │ │ │ │ │ ├── release_sparse_matrix.rst │ │ │ │ │ ├── set_coo_matrix_data.rst │ │ │ │ │ ├── set_csr_matrix_data.rst │ │ │ │ │ ├── set_dense_matrix_data.rst │ │ │ │ │ ├── set_dense_vector_data.rst │ │ │ │ │ └── set_matrix_property.rst │ │ │ │ ├── matrix_view.rst │ │ │ │ ├── operations │ │ │ │ │ ├── spmm.rst │ │ │ │ │ ├── spmv.rst │ │ │ │ │ └── spsv.rst │ │ │ │ ├── spblas.rst │ │ │ │ └── supported-types.rst │ │ │ ├── stats.inc.rst │ │ │ ├── stats │ │ │ │ ├── onemath_stats_central_moment.rst │ │ │ │ ├── onemath_stats_central_moment_user_mean.rst │ │ │ │ ├── onemath_stats_central_sum.rst │ │ │ │ ├── onemath_stats_central_sum_user_mean.rst │ │ │ │ ├── onemath_stats_dataset.rst │ │ │ │ ├── onemath_stats_kurtosis.rst │ │ │ │ ├── onemath_stats_kurtosis_user_mean.rst │ │ │ │ ├── onemath_stats_make_dataset.rst │ │ │ │ ├── onemath_stats_max.rst │ │ │ │ ├── onemath_stats_mean.rst │ │ │ │ ├── onemath_stats_min.rst │ │ │ │ ├── onemath_stats_min_max.rst │ │ │ │ ├── onemath_stats_overview.rst │ │ │ │ ├── onemath_stats_raw_moment.rst │ │ │ │ ├── onemath_stats_raw_sum.rst │ │ │ │ ├── onemath_stats_routines.rst │ │ │ │ ├── onemath_stats_service_routines.rst │ │ │ │ ├── onemath_stats_skewness.rst │ │ │ │ ├── onemath_stats_skewness_user_mean.rst │ │ │ │ ├── onemath_stats_usage_model.rst │ │ │ │ ├── onemath_stats_variation.rst │ │ │ │ └── onemath_stats_variation_user_mean.rst │ │ │ ├── value_or_pointer.rst │ │ │ ├── vector_math.inc.rst │ │ │ └── vm │ │ │ │ ├── abs.rst │ │ │ │ ├── acos.rst │ │ │ │ ├── acosh.rst │ │ │ │ ├── acospi.rst │ │ │ │ ├── add.rst │ │ │ │ ├── arg.rst │ │ │ │ ├── asin.rst │ │ │ │ ├── asinh.rst │ │ │ │ ├── asinpi.rst │ │ │ │ ├── atan.rst │ │ │ │ ├── atan2.rst │ │ │ │ ├── atan2pi.rst │ │ │ │ ├── atanh.rst │ │ │ │ ├── atanpi.rst │ │ │ │ ├── bibliography.rst │ │ │ │ ├── cbrt.rst │ │ │ │ ├── cdfnorm.rst │ │ │ │ ├── cdfnorminv.rst │ │ │ │ ├── ceil.rst │ │ │ │ ├── cis.rst │ │ │ │ ├── clear_status.rst │ │ │ │ ├── conj.rst │ │ │ │ ├── copysign.rst │ │ │ │ ├── cos.rst │ │ │ │ ├── cosd.rst │ │ │ │ ├── cosh.rst │ │ │ │ ├── cospi.rst │ │ │ │ ├── create_error_handler.rst │ │ │ │ ├── div.rst │ │ │ │ ├── erf.rst │ │ │ │ ├── erfc.rst │ │ │ │ ├── erfcinv.rst │ │ │ │ ├── erfinv.rst │ │ │ │ ├── exp.rst │ │ │ │ ├── exp10.rst │ │ │ │ ├── exp2.rst │ │ │ │ ├── expint1.rst │ │ │ │ ├── expm1.rst │ │ │ │ ├── fdim.rst │ │ │ │ ├── floor.rst │ │ │ │ ├── fmax.rst │ │ │ │ ├── fmin.rst │ │ │ │ ├── fmod.rst │ │ │ │ ├── frac.rst │ │ │ │ ├── get_mode.rst │ │ │ │ ├── get_status.rst │ │ │ │ ├── hypot.rst │ │ │ │ ├── inv.rst │ │ │ │ ├── invcbrt.rst │ │ │ │ ├── invsqrt.rst │ │ │ │ ├── lgamma.rst │ │ │ │ ├── linearfrac.rst │ │ │ │ ├── ln.rst │ │ │ │ ├── log10.rst │ │ │ │ ├── log1p.rst │ │ │ │ ├── log2.rst │ │ │ │ ├── logb.rst │ │ │ │ ├── maxmag.rst │ │ │ │ ├── minmag.rst │ │ │ │ ├── modf.rst │ │ │ │ ├── mul.rst │ │ │ │ ├── mulbyconj.rst │ │ │ │ ├── nearbyint.rst │ │ │ │ ├── nextafter.rst │ │ │ │ ├── pow.rst │ │ │ │ ├── pow2o3.rst │ │ │ │ ├── pow3o2.rst │ │ │ │ ├── powr.rst │ │ │ │ ├── powx.rst │ │ │ │ ├── remainder.rst │ │ │ │ ├── rint.rst │ │ │ │ ├── round.rst │ │ │ │ ├── set_status.rst │ │ │ │ ├── setmode.rst │ │ │ │ ├── sin.rst │ │ │ │ ├── sincos.rst │ │ │ │ ├── sind.rst │ │ │ │ ├── sinh.rst │ │ │ │ ├── sinpi.rst │ │ │ │ ├── special-value-notations.rst │ │ │ │ ├── sqr.rst │ │ │ │ ├── sqrt.rst │ │ │ │ ├── sub.rst │ │ │ │ ├── tan.rst │ │ │ │ ├── tand.rst │ │ │ │ ├── tanh.rst │ │ │ │ ├── tanpi.rst │ │ │ │ ├── tgamma.rst │ │ │ │ ├── trunc.rst │ │ │ │ ├── vm-exceptions.rst │ │ │ │ ├── vm-mathematical-functions.rst │ │ │ │ ├── vm-service-functions.rst │ │ │ │ └── vm.rst │ │ │ └── index.rst │ └── oneTBB │ │ └── source │ │ ├── Resources │ │ ├── 06000005.png │ │ ├── 06000007.png │ │ ├── 06000008.png │ │ ├── 06000009.png │ │ ├── 0600000A.png │ │ ├── 0600000B.png │ │ ├── 0600000C.png │ │ ├── 0600000D.png │ │ ├── 0600000E.png │ │ ├── 0600000F.png │ │ ├── 08000006.png │ │ ├── async_msg_chaining.png │ │ ├── async_msg_simplest.png │ │ ├── critical_path_in_graph.png │ │ ├── dep_graph.jpg │ │ ├── flow-graph.jpg │ │ ├── message_flow_graph.jpg │ │ ├── non_consq_rng.jpg │ │ ├── parll_red.jpg │ │ ├── parll_scan.jpg │ │ ├── reference-latest-19.jpg │ │ ├── streaming_node_args.png │ │ └── streaming_node_port_refs.png │ │ ├── algorithms.rst │ │ ├── algorithms │ │ ├── blocked_ranges │ │ │ ├── blocked_nd_range_cls.rst │ │ │ ├── blocked_range2d_cls.rst │ │ │ ├── blocked_range3d_cls.rst │ │ │ └── blocked_range_cls.rst │ │ ├── examples │ │ │ ├── blocked_rangeNd_example.cpp │ │ │ ├── blocked_rangeNd_example.h │ │ │ ├── range_concept.cpp │ │ │ └── range_concept.h │ │ ├── functions │ │ │ ├── collaborative_call_once_func.rst │ │ │ ├── collaborative_once_flag_cls.rst │ │ │ ├── feeder.rst │ │ │ ├── parallel_deterministic_reduce_func.rst │ │ │ ├── parallel_for_each_func.rst │ │ │ ├── parallel_for_func.rst │ │ │ ├── parallel_invoke_func.rst │ │ │ ├── parallel_pipeline_func.rst │ │ │ ├── parallel_pipeline_func │ │ │ │ ├── filter_cls.rst │ │ │ │ ├── filter_mode_enum.rst │ │ │ │ └── flow_control_cls.rst │ │ │ ├── parallel_reduce_func.rst │ │ │ ├── parallel_scan_func.rst │ │ │ ├── parallel_sort_func.rst │ │ │ └── pre_scan_tag_and_final_scan_tag_clses.rst │ │ ├── partitioners │ │ │ ├── affinity_partitioner.rst │ │ │ ├── auto_partitioner.rst │ │ │ ├── simple_partitioner.rst │ │ │ └── static_partitioner.rst │ │ └── split_tags │ │ │ ├── proportional_split_cls.rst │ │ │ └── split_cls.rst │ │ ├── conf.py │ │ ├── configuration.rst │ │ ├── configuration │ │ ├── enabling_debugging_features.rst │ │ ├── feature_macros.rst │ │ ├── namespaces.rst │ │ └── version_information.rst │ │ ├── containers.rst │ │ ├── containers │ │ ├── auxiliary │ │ │ ├── node_handles_cls.rst │ │ │ └── tbb_hash_compare_cls.rst │ │ ├── concurrent_bounded_queue_cls.rst │ │ ├── concurrent_bounded_queue_cls │ │ │ ├── construct_destroy_copy.rst │ │ │ ├── deduction_guides.rst │ │ │ ├── iterators.rst │ │ │ ├── non_member_binary_comparisons.rst │ │ │ ├── non_member_swap.rst │ │ │ ├── safe_member_functions.rst │ │ │ └── unsafe_member_functions.rst │ │ ├── concurrent_hash_map_cls.rst │ │ ├── concurrent_hash_map_cls │ │ │ ├── accessors.rst │ │ │ ├── construct_destroy_copy.rst │ │ │ ├── deduction_guides.rst │ │ │ ├── hash_policy.rst │ │ │ ├── iterators.rst │ │ │ ├── lookup.rst │ │ │ ├── modifiers.rst │ │ │ ├── non_member_binary_comparisons.rst │ │ │ ├── non_member_swap.rst │ │ │ ├── parallel_iteration.rst │ │ │ ├── size_and_capacity.rst │ │ │ └── unsafe_modifiers.rst │ │ ├── concurrent_map_cls.rst │ │ ├── concurrent_map_cls │ │ │ ├── construction_destruction_copying.rst │ │ │ ├── deduction_guides.rst │ │ │ ├── element_access.rst │ │ │ ├── iterators.rst │ │ │ ├── lookup.rst │ │ │ ├── non_member_binary_comparisons.rst │ │ │ ├── non_member_lexicographical_comparisons.rst │ │ │ ├── non_member_swap.rst │ │ │ ├── observers.rst │ │ │ ├── parallel_iteration.rst │ │ │ ├── safe_modifiers.rst │ │ │ ├── size_and_capacity.rst │ │ │ ├── unsafe_modifiers.rst │ │ │ └── value_compare_cls.rst │ │ ├── concurrent_multimap_cls.rst │ │ ├── concurrent_multimap_cls │ │ │ ├── construction_destruction_copying.rst │ │ │ ├── deduction_guides.rst │ │ │ ├── iterators.rst │ │ │ ├── lookup.rst │ │ │ ├── non_member_binary_comparisons.rst │ │ │ ├── non_member_lexicographical_comparisons.rst │ │ │ ├── non_member_swap.rst │ │ │ ├── observers.rst │ │ │ ├── parallel_iteration.rst │ │ │ ├── safe_modifiers.rst │ │ │ ├── size_and_capacity.rst │ │ │ ├── unsafe_modifiers.rst │ │ │ └── value_compare_cls.rst │ │ ├── concurrent_multiset_cls.rst │ │ ├── concurrent_multiset_cls │ │ │ ├── construction_destruction_copying.rst │ │ │ ├── deduction_guides.rst │ │ │ ├── iterators.rst │ │ │ ├── lookup.rst │ │ │ ├── non_member_binary_comparisons.rst │ │ │ ├── non_member_lexicographical_comparisons.rst │ │ │ ├── non_member_swap.rst │ │ │ ├── observers.rst │ │ │ ├── parallel_iteration.rst │ │ │ ├── safe_modifiers.rst │ │ │ ├── size_and_capacity.rst │ │ │ └── unsafe_modifiers.rst │ │ ├── concurrent_priority_queue_cls.rst │ │ ├── concurrent_priority_queue_cls │ │ │ ├── construct_destroy_copy.rst │ │ │ ├── deduction_guides.rst │ │ │ ├── non_member_binary_comparisons.rst │ │ │ ├── non_member_swap.rst │ │ │ ├── safe_modifiers.rst │ │ │ ├── size_and_capacity.rst │ │ │ └── unsafe_modifiers.rst │ │ ├── concurrent_queue_cls.rst │ │ ├── concurrent_queue_cls │ │ │ ├── construct_destroy_copy.rst │ │ │ ├── deduction_guides.rst │ │ │ ├── iterators.rst │ │ │ ├── non_member_binary_comparisons.rst │ │ │ ├── non_member_swap.rst │ │ │ ├── safe_member_functions.rst │ │ │ └── unsafe_member_functions.rst │ │ ├── concurrent_set_cls.rst │ │ ├── concurrent_set_cls │ │ │ ├── construction_destruction_copying.rst │ │ │ ├── deduction_guides.rst │ │ │ ├── iterators.rst │ │ │ ├── lookup.rst │ │ │ ├── non_member_binary_comparisons.rst │ │ │ ├── non_member_lexicographical_comparisons.rst │ │ │ ├── non_member_swap.rst │ │ │ ├── observers.rst │ │ │ ├── parallel_iteration.rst │ │ │ ├── safe_modifiers.rst │ │ │ ├── size_and_capacity.rst │ │ │ └── unsafe_modifiers.rst │ │ ├── concurrent_unordered_map_cls.rst │ │ ├── concurrent_unordered_map_cls │ │ │ ├── bucket_interface.rst │ │ │ ├── construction_destruction_copying.rst │ │ │ ├── deduction_guides.rst │ │ │ ├── element_access.rst │ │ │ ├── hash_policy.rst │ │ │ ├── iterators.rst │ │ │ ├── lookup.rst │ │ │ ├── non_member_binary_comparisons.rst │ │ │ ├── non_member_swap.rst │ │ │ ├── observers.rst │ │ │ ├── parallel_iteration.rst │ │ │ ├── safe_modifiers.rst │ │ │ ├── size_and_capacity.rst │ │ │ └── unsafe_modifiers.rst │ │ ├── concurrent_unordered_multimap.rst │ │ ├── concurrent_unordered_multimap_cls │ │ │ ├── bucket_interface.rst │ │ │ ├── construction_destruction_copying.rst │ │ │ ├── deduction_guides.rst │ │ │ ├── hash_policy.rst │ │ │ ├── iterators.rst │ │ │ ├── lookup.rst │ │ │ ├── non_member_binary_comparisons.rst │ │ │ ├── non_member_swap.rst │ │ │ ├── observers.rst │ │ │ ├── parallel_iteration.rst │ │ │ ├── safe_modifiers.rst │ │ │ ├── size_and_capacity.rst │ │ │ └── unsafe_modifiers.rst │ │ ├── concurrent_unordered_multiset.rst │ │ ├── concurrent_unordered_multiset_cls │ │ │ ├── bucket_interface.rst │ │ │ ├── construction_destruction_copying.rst │ │ │ ├── deduction_guides.rst │ │ │ ├── hash_policy.rst │ │ │ ├── iterators.rst │ │ │ ├── lookup.rst │ │ │ ├── non_member_binary_comparisons.rst │ │ │ ├── non_member_swap.rst │ │ │ ├── observers.rst │ │ │ ├── parallel_iteration.rst │ │ │ ├── safe_modifiers.rst │ │ │ ├── size_and_capacity.rst │ │ │ └── unsafe_modifiers.rst │ │ ├── concurrent_unordered_set_cls.rst │ │ ├── concurrent_unordered_set_cls │ │ │ ├── bucket_interface.rst │ │ │ ├── construction_destruction_copying.rst │ │ │ ├── deduction_guides.rst │ │ │ ├── hash_policy.rst │ │ │ ├── iterators.rst │ │ │ ├── lookup.rst │ │ │ ├── non_member_binary_comparisons.rst │ │ │ ├── non_member_swap.rst │ │ │ ├── observers.rst │ │ │ ├── parallel_iteration.rst │ │ │ ├── safe_modifiers.rst │ │ │ ├── size_and_capacity.rst │ │ │ └── unsafe_modifiers.rst │ │ ├── concurrent_vector_cls.rst │ │ ├── concurrent_vector_cls │ │ │ ├── concurrent_growth.rst │ │ │ ├── construct_destroy_copy.rst │ │ │ ├── deduction_guides.rst │ │ │ ├── element_access.rst │ │ │ ├── iterators.rst │ │ │ ├── non_member_binary_comparisons.rst │ │ │ ├── non_member_lexicographical_comparisons.rst │ │ │ ├── non_member_swap.rst │ │ │ ├── parallel_iteration.rst │ │ │ ├── size_and_capacity.rst │ │ │ └── unsafe_operations.rst │ │ └── examples │ │ │ └── node_handles.cpp │ │ ├── deprecated │ │ └── task_arena_attach_tag.rst │ │ ├── flow_graph.rst │ │ ├── flow_graph │ │ ├── async_node_cls.rst │ │ ├── broadcast_node_cls.rst │ │ ├── buffer_node_cls.rst │ │ ├── composite_node_cls.rst │ │ ├── continue_msg_cls.rst │ │ ├── continue_node_cls.rst │ │ ├── copy_body_func.rst │ │ ├── dependency_flow_graph_example.rst │ │ ├── examples │ │ │ ├── dependency_flow_graph.cpp │ │ │ ├── lightweight_policy.cpp │ │ │ ├── node_priorities.cpp │ │ │ ├── overwrite_node_cls.cpp │ │ │ ├── sequencer_node_cls.cpp │ │ │ └── write_once_node_cls.cpp │ │ ├── forwarding_and_buffering.rst │ │ ├── func_node_cls.rst │ │ ├── functional_node_policies.rst │ │ ├── graph_cls.rst │ │ ├── graph_node_cls.rst │ │ ├── indexer_node_cls.rst │ │ ├── input_node_cls.rst │ │ ├── input_port_func.rst │ │ ├── join_node_cls.rst │ │ ├── join_node_policies.rst │ │ ├── limiter_node_cls.rst │ │ ├── make_edge_func.rst │ │ ├── message_flow_graph_example.rst │ │ ├── multifunc_node_cls.rst │ │ ├── node_priorities.rst │ │ ├── output_port_func.rst │ │ ├── overwrite_node_cls.rst │ │ ├── predefined_concurrency_limits.rst │ │ ├── priority_queue_node_cls.rst │ │ ├── queue_node_cls.rst │ │ ├── receiver.rst │ │ ├── remove_edge_func.rst │ │ ├── reset_flags_enum.rst │ │ ├── sender.rst │ │ ├── sequencer_node_cls.rst │ │ ├── split_node_cls.rst │ │ ├── tagged_msg_cls.rst │ │ └── write_once_node_cls.rst │ │ ├── identifiers.rst │ │ ├── index.rst │ │ ├── info_namespace.rst │ │ ├── intro.rst │ │ ├── memory_allocation.rst │ │ ├── memory_allocation │ │ ├── c_interface_to_scalable_allocator.rst │ │ ├── cache_aligned_allocator_cls.rst │ │ ├── cache_aligned_resource_cls.rst │ │ ├── scalable_allocator_cls.rst │ │ ├── scalable_memory_resource_func.rst │ │ └── tbb_allocator_cls.rst │ │ ├── mutual_exclusion.rst │ │ ├── mutual_exclusion │ │ ├── mutex_cls.rst │ │ ├── null_mutex_cls.rst │ │ ├── null_rw_mutex_cls.rst │ │ ├── queuing_mutex_cls.rst │ │ ├── queuing_rw_mutex_cls.rst │ │ ├── rw_mutex_cls.rst │ │ ├── speculative_spin_mutex_cls.rst │ │ ├── speculative_spin_rw_mutex_cls.rst │ │ ├── spin_mutex_cls.rst │ │ └── spin_rw_mutex_cls.rst │ │ ├── named_requirements.rst │ │ ├── named_requirements │ │ ├── algorithms │ │ │ ├── blocked_range_val.rst │ │ │ ├── container_based_sequence.rst │ │ │ ├── filter_body.rst │ │ │ ├── par_for_body.rst │ │ │ ├── par_for_each_body.rst │ │ │ ├── par_for_func.rst │ │ │ ├── par_for_index.rst │ │ │ ├── par_reduce_body.rst │ │ │ ├── par_reduce_func.rst │ │ │ ├── par_reduce_reduction.rst │ │ │ ├── par_scan_body.rst │ │ │ ├── par_scan_combine.rst │ │ │ ├── par_scan_func.rst │ │ │ ├── range.rst │ │ │ └── splittable.rst │ │ ├── containers │ │ │ ├── container_range.rst │ │ │ └── hash_compare.rst │ │ ├── flow_graph │ │ │ ├── async_node_body.rst │ │ │ ├── continue_node_body.rst │ │ │ ├── function_node_body.rst │ │ │ ├── gateway_type.rst │ │ │ ├── input_node_body.rst │ │ │ ├── join_node_func_obj.rst │ │ │ ├── multifunction_node_body.rst │ │ │ └── sequencer.rst │ │ ├── mutexes │ │ │ ├── mutex.rst │ │ │ └── rw_mutex.rst │ │ └── task_scheduler │ │ │ └── suspend_func.rst │ │ ├── nested-aux-interfaces.rst │ │ ├── nested-depr-interfaces.rst │ │ ├── nested-gen-info.rst │ │ ├── nested-index.rst │ │ ├── nested-interfaces.rst │ │ ├── notation.rst │ │ ├── task_scheduler.rst │ │ ├── task_scheduler │ │ ├── attach_tag_type.rst │ │ ├── scheduling_controls │ │ │ ├── global_control_cls.rst │ │ │ ├── resumable_tasks.rst │ │ │ ├── task_group_context_cls.rst │ │ │ └── task_scheduler_handle_cls.rst │ │ ├── task_arena │ │ │ ├── task_arena_cls.rst │ │ │ ├── task_scheduler_observer_cls.rst │ │ │ └── this_task_arena_ns.rst │ │ └── task_group │ │ │ ├── task_group_cls.rst │ │ │ ├── task_group_status_enum.rst │ │ │ └── task_handle.rst │ │ ├── thread_local_storage.rst │ │ ├── thread_local_storage │ │ ├── combinable_cls.rst │ │ ├── enumerable_thread_specific_cls.rst │ │ ├── enumerable_thread_specific_cls │ │ │ ├── combining.rst │ │ │ ├── construct_destroy_copy.rst │ │ │ ├── iteration.rst │ │ │ ├── safe_modifiers.rst │ │ │ ├── size_and_capacity.rst │ │ │ └── unsafe_modifiers.rst │ │ └── flattened2d_cls.rst │ │ ├── thread_safety.rst │ │ ├── timing.rst │ │ ├── timing │ │ └── tick_count_cls.rst │ │ ├── uncategorized.rst │ │ └── uncategorized │ │ ├── aggregator_cls.rst │ │ ├── aggregator_cls │ │ ├── basic_interface.rst │ │ └── expert_interface.rst │ │ ├── concurrent_lru_cache_cls.rst │ │ ├── concurrent_lru_cache_cls │ │ └── handle_object_cls.rst │ │ ├── examples │ │ ├── opencl_node_example.cpp │ │ ├── opencl_node_example.makefile │ │ ├── opencl_node_example.makefile.windows │ │ └── vector_operations.cl │ │ ├── flow_graph │ │ ├── async_msg_cls.rst │ │ ├── c_recv_cls.rst │ │ ├── opencl_node_cls.rst │ │ ├── receiver_cls.rst │ │ ├── sender_cls.rst │ │ ├── streaming_node_cls.rst │ │ └── type_specified_message_keys.rst │ │ ├── flow_graph_features.rst │ │ ├── scalable_memory_pools.rst │ │ └── scalable_memory_pools │ │ ├── fixed_pool_cls.rst │ │ ├── memory_pool_allocator_cls.rst │ │ └── memory_pool_cls.rst ├── example.cpp ├── index.rst ├── introduction.rst ├── notices.rst ├── oneapi-architecture.png └── spelling_wordlist.txt └── ubuntu-packages.txt /.gitignore: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | # 3 | # SPDX-License-Identifier: MIT 4 | 5 | doxygen 6 | build 7 | _build 8 | *~ 9 | *.diff 10 | *.log 11 | 12 | /docker/ubuntu-packages.txt 13 | /docker/requirements.txt 14 | /docker/install.sh 15 | 16 | /spec-venv 17 | /repos/* 18 | /.vscode 19 | /site 20 | /tarballs 21 | /site.zip 22 | 23 | __pycache__ 24 | 25 | # -------- Visual Studio -------- 26 | .vs/* 27 | -------------------------------------------------------------------------------- /.pre-commit-config.yaml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2020 The Khronos Group Inc. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | # See https://pre-commit.com for more information 6 | # See https://pre-commit.com/hooks.html for more hooks 7 | 8 | exclude: LICENSES|source/elements 9 | 10 | repos: 11 | - repo: https://github.com/ambv/black 12 | rev: 24.8.0 13 | hooks: 14 | - id: black 15 | - repo: https://github.com/pre-commit/pre-commit-hooks 16 | rev: v4.6.0 17 | hooks: 18 | - id: trailing-whitespace 19 | - id: end-of-file-fixer 20 | - id: check-yaml 21 | - id: check-added-large-files 22 | - repo: https://github.com/pycqa/doc8 23 | rev: v1.1.2 24 | hooks: 25 | - id: doc8 26 | - repo: https://github.com/fsfe/reuse-tool 27 | rev: v4.0.3 28 | hooks: 29 | - id: reuse 30 | - repo: https://github.com/pycqa/flake8 31 | rev: 7.1.1 32 | hooks: 33 | - id: flake8 34 | - repo: https://github.com/pycqa/isort 35 | rev: 5.13.2 36 | hooks: 37 | - id: isort 38 | -------------------------------------------------------------------------------- /LICENSE.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ======= 6 | License 7 | ======= 8 | 9 | The content of this oneAPI Specification is licensed under the 10 | `Creative Commons Attribution 4.0 International License`_. Unless 11 | stated otherwise, the sample code examples in this document are 12 | released to you under the `MIT license`_. 13 | 14 | .. _`Creative Commons Attribution 4.0 International License`: https://creativecommons.org/licenses/by/4.0/legalcode 15 | .. _`MIT License`: https://opensource.org/licenses/MIT 16 | -------------------------------------------------------------------------------- /LICENSES/MIT.txt: -------------------------------------------------------------------------------- 1 | MIT License Copyright (c) 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is furnished 8 | to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice (including the next 11 | paragraph) shall be included in all copies or substantial portions of the 12 | Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 16 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS 17 | OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 18 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF 19 | OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /oneapi-doc.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.4-provisional-rev-1" 3 | } 4 | -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2020 The Khronos Group Inc. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | [tool.black] 6 | line-length = 79 7 | skip-string-normalization = true 8 | -------------------------------------------------------------------------------- /requirements.base.txt: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | # 3 | # SPDX-License-Identifier: MIT 4 | 5 | # This is the minimal set of components required and using the latest 6 | # versions 7 | 8 | breathe 9 | graphviz 10 | lxml 11 | pre-commit 12 | six 13 | Sphinx 14 | sphinx-notfound-page 15 | sphinx-book-theme 16 | sphinx-prompt 17 | sphinx_substitution_extensions 18 | sphinx_tabs 19 | sphinxcontrib.plantuml 20 | sphinxcontrib-spelling 21 | sphinxcontrib-svg2pdfconverter 22 | sphinxmark 23 | -------------------------------------------------------------------------------- /requirements.header.txt: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | # 3 | # SPDX-License-Identifier: MIT 4 | 5 | # This file is generated with: 6 | # 7 | # rm -rf venv 8 | # python -m venv venv 9 | # source venv/bin/activate 10 | # pip install -r requirements.base.txt 11 | # cp requirements.header.txt requirements.txt 12 | # pip freeze >> requirements.txt 13 | # 14 | # Add this header, including copyright back 15 | # 16 | -------------------------------------------------------------------------------- /scripts/install.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | # Copyright (c) 2020, Intel Corporation 4 | # SPDX-FileCopyrightText: 2019-2020 Intel Corporation 5 | # 6 | # SPDX-License-Identifier: MIT 7 | 8 | set -e 9 | set -x 10 | 11 | apt-get update -qq 12 | DEBIAN_FRONTEND=noninteractive xargs -a ubuntu-packages.txt apt-get install -qq 13 | 14 | python3 -m venv venv 15 | . venv/bin/activate 16 | pip install --upgrade pip wheel 17 | pip install --upgrade --quiet -r requirements.txt 18 | -------------------------------------------------------------------------------- /source/_static/custom.css: -------------------------------------------------------------------------------- 1 | /* 2 | * SPDX-FileCopyrightText: 2019-2020 Intel Corporation 3 | * 4 | * SPDX-License-Identifier: MIT 5 | */ 6 | 7 | .wy-side-nav-search, .wy-nav-top { 8 | background: #4308E5; 9 | } 10 | 11 | .eqno { 12 | margin-left: 5px; 13 | float: right; 14 | } 15 | .math .headerlink { 16 | display: none; 17 | visibility: hidden; 18 | } 19 | .math:hover .headerlink { 20 | display: inline-block; 21 | visibility: visible; 22 | margin-right: -0.7em; 23 | } 24 | 25 | /* A workaround for https://github.com/readthedocs/sphinx_rtd_theme/issues/647 26 | * Override display for function signatures so that there is spacing between 27 | * types and arguments */ 28 | .rst-content dl:not(.docutils) dt { 29 | display: table-cell !important; 30 | } 31 | .rst-content dl:not(.docutils) dd { 32 | margin-top: 6px; 33 | } 34 | 35 | /* override table width restrictions 36 | * https://rackerlabs.github.io/docs-rackspace/tools/rtd-tables.html */ 37 | @media screen and (min-width: 767px) { 38 | 39 | .wy-table-responsive table td { 40 | /* !important prevents the common CSS stylesheets from overriding 41 | this as on RTD they are loaded after this stylesheet */ 42 | white-space: normal !important; 43 | } 44 | 45 | .wy-table-responsive { 46 | overflow: visible !important; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /source/_static/favicons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneAPI-spec/1ea5088cab87b69541958b283c3215a80c1f5f25/source/_static/favicons.png -------------------------------------------------------------------------------- /source/_static/oneAPI-rgb-3000.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneAPI-spec/1ea5088cab87b69541958b283c3215a80c1f5f25/source/_static/oneAPI-rgb-3000.png -------------------------------------------------------------------------------- /source/_static/oneAPI-rgb-rev-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneAPI-spec/1ea5088cab87b69541958b283c3215a80c1f5f25/source/_static/oneAPI-rgb-rev-100.png -------------------------------------------------------------------------------- /source/_static/oneapi-logo1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneAPI-spec/1ea5088cab87b69541958b283c3215a80c1f5f25/source/_static/oneapi-logo1.png -------------------------------------------------------------------------------- /source/_templates/breadcrumbs.html: -------------------------------------------------------------------------------- 1 | 6 | 7 | {% extends "!breadcrumbs.html" %} 8 | {% block breadcrumbs %} 9 |
  • oneAPI Specification »
  • 10 | {% for doc in parents %} 11 | {% if loop.first %} 12 |
  • {{ doc.title }}
  • 13 | {% endif %} 14 | {% endfor %} 15 | {% endblock %} 16 | -------------------------------------------------------------------------------- /source/_templates/layout.html: -------------------------------------------------------------------------------- 1 | 6 | 7 | {% extends "!layout.html" %} 8 | 9 | {% block sidebartitle %} 10 | 11 | {% if logo and theme_logo_only %} 12 | 13 | {% else %} 14 | {{ project }} 15 | {% endif %} 16 | 17 | {% if logo %} 18 | {# Not strictly valid HTML, but it's the only way to display/scale 19 | it properly, without weird scripting or heaps of work 20 | #} 21 | 22 | {% endif %} 23 | 24 | 25 | {% if theme_display_version %} 26 | {%- set nav_version = version %} 27 | {% if READTHEDOCS and current_version %} 28 | {%- set nav_version = current_version %} 29 | {% endif %} 30 | {% if nav_version %} 31 |
    32 | {{ nav_version }} 33 |
    34 | {% endif %} 35 | {% endif %} 36 | 37 | {% include "searchbox.html" %} 38 | 39 | {% endblock %} 40 | -------------------------------------------------------------------------------- /source/elements/element_list.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | - :ref:`oneDPL-section`: A companion to the DPC++ Compiler for 6 | programming oneAPI devices with APIs from C++ standard library, 7 | Parallel STL, and extensions. 8 | - :ref:`oneDNN-section`: High performance implementations of 9 | primitives for deep learning frameworks 10 | - :ref:`oneCCL-section`: Communication primitives for scaling deep 11 | learning frameworks across multiple devices 12 | - :ref:`oneDAL-section`: Algorithms for accelerated data science 13 | - :ref:`oneTBB-section`: Library for adding thread-based parallelism 14 | to complex applications on multiprocessors 15 | - :ref:`oneMath-section`: High performance math routines for science, 16 | engineering, and financial applications 17 | -------------------------------------------------------------------------------- /source/elements/oneCCL/source/conf.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | # 3 | # SPDX-License-Identifier: MIT 4 | 5 | # -*- coding: utf-8 -*- 6 | # 7 | # Configuration file for the Sphinx documentation builder. 8 | # 9 | # This file does only contain a selection of the most common options. For a 10 | # full list see the documentation: 11 | # http://www.sphinx-doc.org/en/master/config 12 | 13 | # -- Path setup -------------------------------------------------------------- 14 | 15 | # If extensions (or modules to document with autodoc) are in another directory, 16 | # add these directories to sys.path here. If the directory is relative to the 17 | # documentation root, use os.path.abspath to make it absolute, like shown here. 18 | # 19 | # 20 | import os 21 | import sys 22 | from os.path import join 23 | 24 | project = 'oneCCL' 25 | 26 | repo_root = join('..', '..', '..', '..') 27 | exec(open(join(repo_root, 'source', 'conf', 'common_conf.py')).read()) 28 | exec(open(join(repo_root, 'source', 'conf', 'element_conf.py')).read()) 29 | -------------------------------------------------------------------------------- /source/elements/oneCCL/source/definitions.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | =========== 6 | Definitions 7 | =========== 8 | 9 | .. toctree:: 10 | 11 | spec/main_objects.rst 12 | spec/operations.rst 13 | spec/error_handling.rst 14 | 15 | -------------------------------------------------------------------------------- /source/elements/oneCCL/source/index.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | .. _oneCCL-section: 6 | 7 | ====== 8 | oneCCL 9 | ====== 10 | 11 | .. toctree:: 12 | 13 | introduction 14 | namespaces 15 | spec_version 16 | definitions 17 | programming_model 18 | 19 | 20 | -------------------------------------------------------------------------------- /source/elements/oneCCL/source/introduction.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ============ 6 | Introduction 7 | ============ 8 | 9 | The |ccl_full_name| (oneCCL) provides primitives for the 10 | communication patterns that occur in deep learning applications. 11 | oneCCL supports both scale-up for platforms with multiple 12 | oneAPI devices and scale-out for clusters with multiple compute nodes. 13 | 14 | oneCCL supports the following communication patterns used in deep learning (DL) algorithms: 15 | 16 | - allgatherv 17 | - allreduce 18 | - alltoallv 19 | - broadcast 20 | - reduce 21 | - reduce_scatter 22 | 23 | oneCCL exposes controls over additional optimizations and capabilities such as: 24 | 25 | * Prioritization for communication operations 26 | * Persistent communication operations (enables decoupling one-time initialization and repetitive execution) 27 | -------------------------------------------------------------------------------- /source/elements/oneCCL/source/namespaces.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ========== 6 | Namespaces 7 | ========== 8 | 9 | This section describes the oneCCL namespace conventions. 10 | 11 | 12 | oneapi::ccl namespace 13 | ********************* 14 | 15 | The ``oneapi::ccl`` namespace shall contains public identifiers defined by the library. 16 | 17 | 18 | ccl namespace 19 | ************* 20 | 21 | The alternative ``ccl`` namespace shall be considered an alias for the ``oneapi::ccl`` namespace. 22 | -------------------------------------------------------------------------------- /source/elements/oneCCL/source/programming_model.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ================= 6 | Programming Model 7 | ================= 8 | 9 | .. toctree:: 10 | 11 | spec/generic_workflow.rst 12 | -------------------------------------------------------------------------------- /source/elements/oneCCL/source/spec/group_calls.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ============ 6 | Group Calls 7 | ============ 8 | 9 | oneCCL specification defines the following group calls: 10 | 11 | * group_start() 12 | * group_end() 13 | 14 | 15 | Group calls serve to merge multiple calls into a single group operation. These operations are initiated and finalized using primary functions: group_start() and group_end(). 16 | 17 | Group_start 18 | *********** 19 | 20 | void CCL_API group_start(); 21 | 22 | group_start() starts a group call. group_start() can be used to initiate a group call operation to indicate that successive operations should not get blocked due to CPU synchronization. 23 | 24 | Group_end 25 | ********* 26 | 27 | void CCL_API group_end(); 28 | 29 | group_end() ends a group call. The group_end() call returns when all the operations between group_start() and group_end() have been enqueued for execution, but not necessarily completed. 30 | 31 | 32 | Note: Currently group calls are supported for point-to-point and collective operations. 33 | 34 | -------------------------------------------------------------------------------- /source/elements/oneCCL/source/spec/operation_progress.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | =========================== 6 | Operation Progress Tracking 7 | =========================== 8 | 9 | oneCCL communication operation shall return an event object to be used for tracking the operation's progress. 10 | 11 | The ``event`` class shall provide the ability to wait for completion of an operation in a blocking manner, the ability to check the completion status in a non-blocking manner, and the ability to retrieve the underlying native object that is signaled when the operation completes. 12 | 13 | Event 14 | ***** 15 | 16 | Waiting for the completion of an operation in a blocking manner: 17 | 18 | .. code:: cpp 19 | 20 | void event::wait(); 21 | 22 | 23 | Checking for the completion of an operation in a non-blocking manner: 24 | 25 | .. code:: cpp 26 | 27 | bool event::test(); 28 | 29 | return ``bool`` 30 | ``true`` if the operation has been completed 31 | ``false`` if the operation has not been completed 32 | 33 | 34 | Retrieving a native object that is signaled when the operation completes: 35 | 36 | .. code:: cpp 37 | 38 | native_event_type event::get_native(); 39 | 40 | return ``native_event_type`` 41 | | a native object that is signaled when the operation completes 42 | | shall throw an exception if an ``event`` object does not wrap the native object 43 | -------------------------------------------------------------------------------- /source/elements/oneCCL/source/spec/operations.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ======================== 6 | Communication Operations 7 | ======================== 8 | 9 | This section covers communication operations defined by oneCCL specification. 10 | 11 | .. toctree:: 12 | :maxdepth: 1 13 | 14 | datatypes.rst 15 | reductions.rst 16 | collective_operations.rst 17 | operation_attributes.rst 18 | operation_progress.rst 19 | group_calls.rst 20 | -------------------------------------------------------------------------------- /source/elements/oneCCL/source/spec/reductions.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ========== 6 | Reductions 7 | ========== 8 | 9 | oneCCL specification defines the following reduction operations for :ref:`Allreduce`, :ref:`Reduce` and :ref:`ReduceScatter` collective operations: 10 | 11 | .. code:: cpp 12 | 13 | enum class reduction 14 | { 15 | sum = /* unspecified */, 16 | prod = /* unspecified */, 17 | min = /* unspecified */, 18 | max = /* unspecified */, 19 | avg = /* unspecified */, 20 | custom = /* unspecified */ 21 | }; 22 | 23 | reduction::sum 24 | elementwise summation 25 | reduction::prod 26 | elementwise multiplication 27 | reduction::min 28 | elementwise min 29 | reduction::max 30 | elementwise max 31 | reduction::avg 32 | arithmethic average 33 | reduction::custom 34 | | specify user-defined reduction operation 35 | | the actual reduction function must be passed through ``reduction_fn`` operation attribute 36 | 37 | :doc:`operation_attributes` 38 | -------------------------------------------------------------------------------- /source/elements/oneCCL/source/spec_version.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ============================================ 6 | Current Version of this oneCCL Specification 7 | ============================================ 8 | 9 | This is the oneCCL specification version 1.0. 10 | -------------------------------------------------------------------------------- /source/elements/oneDAL/Makefile: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | # 3 | # SPDX-License-Identifier: MIT 4 | 5 | GH_PAGES = build/gh-pages 6 | 7 | .PHONY: html pdf doxygen parse-doxygen clean gh-pages 8 | 9 | html: 10 | sphinx-build -M html source build -q 11 | 12 | pdf: 13 | sphinx-build -M latexpdf source build -q 14 | 15 | doxygen: 16 | doxygen 17 | 18 | parse-doxygen: doxygen 19 | mkdir -p build 20 | python -m dalapi.doxypy.cli doxygen/xml --compact > build/tree.yaml 21 | 22 | clean: 23 | rm -rf build/doctrees 24 | rm -rf build/html 25 | rm -rf build/latex 26 | 27 | gh-pages: html 28 | cp -r build/html/* $(GH_PAGES) 29 | cd $(GH_PAGES) && \ 30 | git checkout gh-pages && \ 31 | git add . && \ 32 | git commit -m Update && \ 33 | git push origin gh-pages 34 | -------------------------------------------------------------------------------- /source/elements/oneDAL/dalapi/__init__.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | # 3 | # SPDX-License-Identifier: MIT 4 | 5 | __version__ = '0.0.1' 6 | 7 | def setup(app): 8 | from . import extension 9 | extension.setup(app) 10 | return { 11 | 'version': __version__, 12 | 'parallel_read_safe': True, 13 | 'parallel_write_safe': True 14 | } 15 | -------------------------------------------------------------------------------- /source/elements/oneDAL/dalapi/doxypy/__init__.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | # 3 | # SPDX-License-Identifier: MIT 4 | 5 | from .index import Index, index, to_dict, to_json, to_yaml 6 | from .loader import TransformerPass, NameTransformer 7 | from .listing import ListingReader 8 | from . import model 9 | -------------------------------------------------------------------------------- /source/elements/oneDAL/dalapi/doxypy/cli.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | # 3 | # SPDX-License-Identifier: MIT 4 | 5 | from .index import index, to_yaml 6 | 7 | if __name__ == "__main__": 8 | import argparse 9 | args = argparse.ArgumentParser('doxypy: The Doxygen parser for Python') 10 | args.add_argument('dir', type=str, 11 | help='Path to the directory with Doxygen XML output') 12 | args.add_argument('--compact', action='store_true', default=False, 13 | help='Does not include empty fields into output') 14 | # TODO 15 | # args.add_argument('--only-functions', action='store_true', default=False, 16 | # help='If provided, displays only functions') 17 | # args.add_argument('--filter', type=str, default=None, 18 | # help='Enables parsing only for the matched names') 19 | config = args.parse_args() 20 | 21 | idx = index(config.dir) 22 | print(to_yaml(idx, discard_empty=config.compact, indent=2)) 23 | -------------------------------------------------------------------------------- /source/elements/oneDAL/dalapi/doxypy/parser/__init__.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | # 3 | # SPDX-License-Identifier: MIT 4 | 5 | import os 6 | from typing import ( 7 | Any, 8 | Dict, 9 | List, 10 | Text, 11 | Union, 12 | ) 13 | from .index import parse as parse_index 14 | from .compound import parse as parse_compound 15 | 16 | class Parser(object): 17 | def __init__(self, xml_dir: Text): 18 | self._dir = xml_dir 19 | 20 | def parse(self, refid): 21 | xml_filename = self._resolve_path(refid) 22 | parse = parse_index if refid == 'index' else parse_compound 23 | return parse(xml_filename, silence=True) 24 | 25 | def _resolve_path(self, refid): 26 | xml_name = os.path.join(self._dir, refid) 27 | return f'{xml_name}.xml' 28 | -------------------------------------------------------------------------------- /source/elements/oneDAL/dalapi/doxypy/utils.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | # 3 | # SPDX-License-Identifier: MIT 4 | 5 | def split_compound_name(compoundname): 6 | try: 7 | namespace, name = compoundname.rsplit('::', 1) 8 | except ValueError: 9 | namespace, name = '', compoundname 10 | return namespace, name 11 | 12 | def return_list(func): 13 | def wrapper(*args, **kwargs): 14 | return list(func(*args, **kwargs)) 15 | return wrapper 16 | 17 | def return_dict(func): 18 | def wrapper(*args, **kwargs): 19 | return dict(func(*args, **kwargs)) 20 | return wrapper 21 | -------------------------------------------------------------------------------- /source/elements/oneDAL/include/oneapi/dal/train.hpp: -------------------------------------------------------------------------------- 1 | namespace oneapi::dal { 2 | 3 | template 4 | auto train(Args&& ...args); 5 | 6 | } // namespace oneapi::dal 7 | -------------------------------------------------------------------------------- /source/elements/oneDAL/source/_static/data_analytics_stages.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneAPI-spec/1ea5088cab87b69541958b283c3215a80c1f5f25/source/elements/oneDAL/source/_static/data_analytics_stages.png -------------------------------------------------------------------------------- /source/elements/oneDAL/source/_static/e2eframeworks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneAPI-spec/1ea5088cab87b69541958b283c3215a80c1f5f25/source/elements/oneDAL/source/_static/e2eframeworks.png -------------------------------------------------------------------------------- /source/elements/oneDAL/source/_templates/layout.html: -------------------------------------------------------------------------------- 1 | 7 | 8 | {% extends "!layout.html" %} 9 | {% block extrahead %} 10 | 11 | {% endblock %} -------------------------------------------------------------------------------- /source/elements/oneDAL/source/algorithms/clustering/index.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ========== 6 | Clustering 7 | ========== 8 | 9 | .. toctree:: 10 | :titlesonly: 11 | 12 | kmeans.rst 13 | kmeans_init.rst 14 | -------------------------------------------------------------------------------- /source/elements/oneDAL/source/algorithms/decomposition/index.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ============= 6 | Decomposition 7 | ============= 8 | 9 | .. toctree:: 10 | :titlesonly: 11 | 12 | pca.rst 13 | -------------------------------------------------------------------------------- /source/elements/oneDAL/source/algorithms/index.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | .. _algorithms: 6 | 7 | ========== 8 | Algorithms 9 | ========== 10 | 11 | The Algorithms component consists of classes that implement algorithms for 12 | data analysis (data mining) and data modeling (training and prediction). 13 | These algorithms include matrix decompositions, clustering, classification, 14 | and regression algorithms, as well as association rules discovery. 15 | 16 | .. toctree:: 17 | :titlesonly: 18 | 19 | clustering/index.rst 20 | nearest_neighbors/index.rst 21 | decomposition/index.rst 22 | -------------------------------------------------------------------------------- /source/elements/oneDAL/source/algorithms/nearest_neighbors/index.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ======================= 6 | Nearest Neighbors (kNN) 7 | ======================= 8 | 9 | .. toctree:: 10 | :titlesonly: 11 | 12 | knn_classification.rst 13 | -------------------------------------------------------------------------------- /source/elements/oneDAL/source/appendix/index.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ======== 6 | Appendix 7 | ======== 8 | 9 | .. toctree:: 10 | :titlesonly: 11 | 12 | kd_tree.rst 13 | -------------------------------------------------------------------------------- /source/elements/oneDAL/source/appendix/kd_tree.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | .. _kd_tree: 6 | 7 | ======== 8 | k-d Tree 9 | ======== 10 | 11 | :math:`k`-:math:`d` tree is a space-partitioning binary tree [Bentley80]_, where 12 | 13 | - Each non-leaf node induces the hyperplane that splits the feature space into 14 | two parts. To define the splitting hyperplane explicitly, a non-leaf node 15 | stores the identifier of the feature (that defines axis in the feature space) 16 | and `a cut-point `_ 17 | 18 | - Each leaf node of the tree has an associated subset (*a bucket*) of elements of 19 | the training data set. Feature vectors from a bucket belong to the region of 20 | the space defined by tree nodes on the path from the root node to the 21 | respective leaf. 22 | 23 | 24 | ------------- 25 | Related terms 26 | ------------- 27 | 28 | .. _kd_tree_cut_point: 29 | 30 | A cut-point 31 | A feature value that corresponds to a non-leaf node of a :math:`k`-:math:`d` 32 | tree and defines the splitting hyperplane orthogonal to the axis specified by 33 | the given feature. 34 | -------------------------------------------------------------------------------- /source/elements/oneDAL/source/common_interface/index.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ================ 6 | Common Interface 7 | ================ 8 | 9 | .. toctree:: 10 | 11 | spec_version.rst 12 | header_files_and_namespaces.rst 13 | error_handling.rst 14 | common_type_definitions.rst 15 | -------------------------------------------------------------------------------- /source/elements/oneDAL/source/common_interface/spec_version.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ====================================================== 6 | Current Version of this |dal_short_name| Specification 7 | ====================================================== 8 | 9 | This is the |dal_short_name| specification which is part of the oneAPI 10 | specification version 1.0. 11 | -------------------------------------------------------------------------------- /source/elements/oneDAL/source/conf.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | # 3 | # SPDX-License-Identifier: MIT 4 | 5 | # -*- coding: utf-8 -*- 6 | # 7 | # Configuration file for the Sphinx documentation builder. 8 | # 9 | # This file does only contain a selection of the most common options. For a 10 | # full list see the documentation: 11 | # http://www.sphinx-doc.org/en/master/config 12 | 13 | # -- Path setup -------------------------------------------------------------- 14 | 15 | # If extensions (or modules to document with autodoc) are in another directory, 16 | # add these directories to sys.path here. If the directory is relative to the 17 | # documentation root, use os.path.abspath to make it absolute, like shown here. 18 | # 19 | import os 20 | import sys 21 | from os.path import join 22 | 23 | project = 'oneDAL' 24 | 25 | repo_root = join('..', '..', '..', '..') 26 | exec(open(join(repo_root, 'source', 'conf', 'common_conf.py')).read()) 27 | exec(open(join(repo_root, 'source', 'conf', 'element_conf.py')).read()) 28 | 29 | # oneDAL project directory is needed for `dalapi` extension 30 | onedal_relative_doxyfile_dir = '..' 31 | onedal_relative_sources_dir = '..' 32 | onedal_enable_listing = True 33 | -------------------------------------------------------------------------------- /source/elements/oneDAL/source/data_management/_static/data_management_flow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneAPI-spec/1ea5088cab87b69541958b283c3215a80c1f5f25/source/elements/oneDAL/source/data_management/_static/data_management_flow.png -------------------------------------------------------------------------------- /source/elements/oneDAL/source/data_management/_static/dataset.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneAPI-spec/1ea5088cab87b69541958b283c3215a80c1f5f25/source/elements/oneDAL/source/data_management/_static/dataset.png -------------------------------------------------------------------------------- /source/elements/oneDAL/source/data_management/_static/table_accessor_usage_example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneAPI-spec/1ea5088cab87b69541958b283c3215a80c1f5f25/source/elements/oneDAL/source/data_management/_static/table_accessor_usage_example.png -------------------------------------------------------------------------------- /source/elements/oneDAL/source/data_management/table/homogen.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | .. _homogen_table: 6 | 7 | ================= 8 | Homogeneous table 9 | ================= 10 | 11 | Class ``homogen_table`` is an implementation of a table type 12 | for which the following is true: 13 | 14 | - The data within the table are dense and stored as one contiguous memory block. 15 | - All the columns have the same :capterm:`data type `. 16 | 17 | --------------------- 18 | Programming interface 19 | --------------------- 20 | 21 | All types and functions in this section shall be declared in the 22 | ``oneapi::dal`` namespace and be available via inclusion of the 23 | ``oneapi/dal/table/homogen.hpp`` header file. 24 | 25 | .. onedal_class:: oneapi::dal::homogen_table 26 | -------------------------------------------------------------------------------- /source/elements/oneDAL/source/index.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | .. _oneDAL-section: 6 | 7 | ================ 8 | |dal_short_name| 9 | ================ 10 | 11 | 12 | .. |default_ctor_doc| replace:: Creates a new instance of class \ 13 | with the default property values. 14 | 15 | 16 | .. |github| replace:: oneDAL GitHub\* page 17 | .. _github: https://github.com/intel/daal 18 | 19 | This document specifies requirements for implementations of |dal_full_name| (|dal_short_name|). 20 | 21 | |dal_short_name| is a library that helps speed up big data analysis by providing highly optimized 22 | algorithmic building blocks for all stages of data analytics 23 | (preprocessing, transformation, analysis, modeling, validation, and 24 | decision making) in batch, online, and distributed processing modes of 25 | computation. The current version of |dal_short_name| provides 26 | Data Parallel C++ (DPC++) API extensions to the traditional C++ interface. 27 | 28 | For general information, visit |github|_. 29 | 30 | .. toctree:: 31 | :titlesonly: 32 | 33 | introduction.rst 34 | glossary.rst 35 | notations.rst 36 | programming_model/index.rst 37 | common_interface/index.rst 38 | data_management/index.rst 39 | algorithms/index.rst 40 | appendix/index.rst 41 | bibliography.rst 42 | 43 | -------------------------------------------------------------------------------- /source/elements/oneDAL/source/programming_model/computational_modes.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | =================== 6 | Computational modes 7 | =================== 8 | 9 | .. _batch: 10 | 11 | ----- 12 | Batch 13 | ----- 14 | In the batch processing mode, the algorithm works with the entire data set to produce the final 15 | result. A more complex scenario occurs when the entire data set is not available at the moment 16 | or the data set does not fit into the device memory. 17 | 18 | .. _online: 19 | 20 | ------ 21 | Online 22 | ------ 23 | In the online processing mode, the algorithm processes a data set in blocks streamed into the 24 | device's memory. Partial results are updated incrementally and finalized when the last data block 25 | is processed. 26 | 27 | .. _distributed: 28 | 29 | ----------- 30 | Distributed 31 | ----------- 32 | In the distributed processing mode, the algorithm operates on a data set 33 | distributed across several devices (compute nodes). On each node, the algorithm 34 | produces partial results that are later merged into the final result on the main 35 | node. 36 | -------------------------------------------------------------------------------- /source/elements/oneDNN/include/dnnl.h: -------------------------------------------------------------------------------- 1 | // SPDX-FileCopyrightText: 2016-2020 Intel Corporation 2 | // 3 | // SPDX-License-Identifier: Apache-2.0 4 | 5 | #ifndef DNNL_H 6 | #define DNNL_H 7 | 8 | #include "dnnl_types.h" 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /source/elements/oneDNN/source/_static/img_bf16_diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneAPI-spec/1ea5088cab87b69541958b283c3215a80c1f5f25/source/elements/oneDNN/source/_static/img_bf16_diagram.png -------------------------------------------------------------------------------- /source/elements/oneDNN/source/_static/img_execution_model.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneAPI-spec/1ea5088cab87b69541958b283c3215a80c1f5f25/source/elements/oneDNN/source/_static/img_execution_model.png -------------------------------------------------------------------------------- /source/elements/oneDNN/source/_static/img_multiscalar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneAPI-spec/1ea5088cab87b69541958b283c3215a80c1f5f25/source/elements/oneDNN/source/_static/img_multiscalar.png -------------------------------------------------------------------------------- /source/elements/oneDNN/source/_static/img_primitive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneAPI-spec/1ea5088cab87b69541958b283c3215a80c1f5f25/source/elements/oneDNN/source/_static/img_primitive.png -------------------------------------------------------------------------------- /source/elements/oneDNN/source/_static/img_programming_model.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneAPI-spec/1ea5088cab87b69541958b283c3215a80c1f5f25/source/elements/oneDNN/source/_static/img_programming_model.png -------------------------------------------------------------------------------- /source/elements/oneDNN/source/_static/img_singlescalar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneAPI-spec/1ea5088cab87b69541958b283c3215a80c1f5f25/source/elements/oneDNN/source/_static/img_singlescalar.png -------------------------------------------------------------------------------- /source/elements/oneDNN/source/_static/unrolled_stack_rnn.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneAPI-spec/1ea5088cab87b69541958b283c3215a80c1f5f25/source/elements/oneDNN/source/_static/unrolled_stack_rnn.jpg -------------------------------------------------------------------------------- /source/elements/oneDNN/source/data_model/index.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | .. default-domain:: cpp 6 | 7 | ########## 8 | Data model 9 | ########## 10 | 11 | Data in oneDNN is stored in *memory objects* that both store and describe data 12 | that can be of various types and be stored in different formats (layouts). 13 | 14 | .. toctree:: 15 | :maxdepth: 2 16 | 17 | data_types/index.rst 18 | memory/index.rst 19 | 20 | .. vim: ts=3 sw=3 et spell spelllang=en 21 | -------------------------------------------------------------------------------- /source/elements/oneDNN/source/data_model/memory/index.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | .. default-domain:: cpp 6 | 7 | ###### 8 | Memory 9 | ###### 10 | 11 | There are two levels of abstraction for memory in oneDNN. 12 | 13 | 1. *Memory descriptor* -- engine-agnostic logical description of data (number 14 | of dimensions, dimension sizes, :ref:`data type `, and 15 | :ref:`format `. 16 | 17 | 2. *Memory object* -- an engine-specific object combines memory descriptor 18 | with storage. 19 | 20 | oneDNN defines the following convenience aliases to denote tensor dimensions 21 | 22 | .. doxygentypedef:: dnnl::memory::dim 23 | :project: oneDNN 24 | 25 | .. doxygentypedef:: dnnl::memory::dims 26 | :project: oneDNN 27 | 28 | .. toctree:: 29 | :maxdepth: 2 30 | 31 | formats.rst 32 | objects.rst 33 | 34 | .. vim: ts=3 sw=3 et spell spelllang=en 35 | 36 | -------------------------------------------------------------------------------- /source/elements/oneDNN/source/graph/general.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2020-2022 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | .. default-domain:: cpp 6 | 7 | .. include:: ../replacements.inc.rst 8 | 9 | ################## 10 | Common Definitions 11 | ################## 12 | 13 | This section lists common types and definitions used by all or multiple 14 | graph operations. 15 | 16 | Logical tensor enums and type 17 | ***************************** 18 | 19 | .. doxygenstruct:: dnnl::graph::logical_tensor 20 | :project: oneDNN 21 | :members: 22 | 23 | Operation attributes and kinds 24 | ****************************** 25 | 26 | .. doxygenstruct:: dnnl::graph::op 27 | :project: oneDNN 28 | :members: 29 | 30 | Graph objects member functions 31 | ****************************** 32 | 33 | .. doxygenstruct:: dnnl::graph::graph 34 | :project: oneDNN 35 | :members: 36 | 37 | Macros to specify unknown shapes 38 | ******************************** 39 | 40 | .. doxygendefine:: DNNL_GRAPH_UNKNOWN_NDIMS 41 | :project: oneDNN 42 | 43 | .. doxygendefine:: DNNL_GRAPH_UNKNOWN_DIM 44 | :project: oneDNN 45 | 46 | -------------------------------------------------------------------------------- /source/elements/oneDNN/source/graph/index.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2020-2021 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | .. _graph-section: 6 | 7 | =============== 8 | Graph extension 9 | =============== 10 | 11 | oneDNN Graph extension is a flexible graph interface to maximize 12 | operation fusions in a scalable way. oneDNN Graph API accepts a full 13 | computational graph as input and performs a engine-aware graph 14 | partitioning, where sub-graphs of operations that are candidate for 15 | fusion are grouped together. Those partitions are then compiled and 16 | executed as fused operations. 17 | 18 | .. toctree:: 19 | :maxdepth: 1 20 | 21 | general.rst 22 | programming_model.rst 23 | data_model.rst 24 | ops/index.rst 25 | 26 | -------------------------------------------------------------------------------- /source/elements/oneDNN/source/graph/ops/End.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2020-2022 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | .. include:: ../../replacements.inc.rst 6 | 7 | 8 | End 9 | ### 10 | 11 | End operation is used to help construct graph, for example tracking the 12 | uses of a tensor. 13 | 14 | Operation Attributes 15 | ******************** 16 | 17 | End operation does not support any attribute. 18 | 19 | Execution Arguments 20 | ******************* 21 | 22 | The inputs and outputs must be provided according to the below index order 23 | when constructing an operation. 24 | 25 | Inputs 26 | ====== 27 | 28 | 29 | ===== ============= ==================== 30 | Index Argument Name Required or Optional 31 | ===== ============= ==================== 32 | 0 ``src`` Required 33 | ===== ============= ==================== 34 | 35 | Outputs 36 | ======= 37 | 38 | 39 | End operation does not support output tensor. 40 | 41 | 42 | Supported Data Types 43 | ******************** 44 | 45 | End operation supports the following data type combinations. 46 | 47 | ==== =========== 48 | Src Destination 49 | ==== =========== 50 | f32 f32 51 | bf16 bf16 52 | f16 f16 53 | ==== =========== 54 | -------------------------------------------------------------------------------- /source/elements/oneDNN/source/graph/ops/Round.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2020-2022 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | .. include:: ../../replacements.inc.rst 6 | 7 | 8 | Round 9 | ##### 10 | 11 | Round operation rounds the values of a tensor to the nearest integer, 12 | element-wise. 13 | 14 | Operation Attributes 15 | ******************** 16 | 17 | Round operation does not support any attribute. 18 | 19 | Execution Arguments 20 | ******************* 21 | 22 | The inputs and outputs must be provided according to the below index order 23 | when constructing an operation. 24 | 25 | Inputs 26 | ====== 27 | 28 | 29 | ===== ============= ==================== 30 | Index Argument Name Required or Optional 31 | ===== ============= ==================== 32 | 0 ``src`` Required 33 | ===== ============= ==================== 34 | 35 | Outputs 36 | ======= 37 | 38 | 39 | ===== ============= ==================== 40 | Index Argument Name Required or Optional 41 | ===== ============= ==================== 42 | 0 ``dst`` Required 43 | ===== ============= ==================== 44 | 45 | 46 | Supported Data Types 47 | ******************** 48 | 49 | Round operation supports the following data type combinations. 50 | 51 | ==== ==== 52 | Src Dst 53 | ==== ==== 54 | f32 f32 55 | f16 f16 56 | bf16 bf16 57 | ==== ==== 58 | -------------------------------------------------------------------------------- /source/elements/oneDNN/source/graph/ops/Sqrt.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2020-2022 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | .. include:: ../../replacements.inc.rst 6 | 7 | 8 | Sqrt 9 | #### 10 | 11 | Sqrt operation performs element-wise square root operation with given 12 | tensor. 13 | 14 | Operation Attributes 15 | ******************** 16 | 17 | Sqrt operation does not support any attribute. 18 | 19 | Execution Arguments 20 | ******************* 21 | 22 | The inputs and outputs must be provided according to the below index order 23 | when constructing an operation. 24 | 25 | Inputs 26 | ====== 27 | 28 | 29 | ===== ============= ==================== 30 | Index Argument Name Required or Optional 31 | ===== ============= ==================== 32 | 0 ``src`` Required 33 | ===== ============= ==================== 34 | 35 | Outputs 36 | ======= 37 | 38 | 39 | ===== ============= ==================== 40 | Index Argument Name Required or Optional 41 | ===== ============= ==================== 42 | 0 ``dst`` Required 43 | ===== ============= ==================== 44 | 45 | Supported Data Types 46 | ******************** 47 | 48 | Sqrt operation supports the following data type combinations. 49 | 50 | ==== ==== 51 | Src Dst 52 | ==== ==== 53 | f32 f32 54 | f16 f16 55 | bf16 bf16 56 | ==== ==== 57 | -------------------------------------------------------------------------------- /source/elements/oneDNN/source/graph/ops/Square.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2020-2022 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | .. include:: ../../replacements.inc.rst 6 | 7 | 8 | Square 9 | ###### 10 | 11 | Square operation performs element-wise square operation with given 12 | tensor. 13 | 14 | Operation Attributes 15 | ******************** 16 | 17 | Square operation does not support any attribute. 18 | 19 | Execution Arguments 20 | ******************* 21 | 22 | The inputs and outputs must be provided according to the below index order 23 | when constructing an operation. 24 | 25 | Inputs 26 | ====== 27 | 28 | 29 | ===== ============= ==================== 30 | Index Argument Name Required or Optional 31 | ===== ============= ==================== 32 | 0 ``src`` Required 33 | ===== ============= ==================== 34 | 35 | Outputs 36 | ======= 37 | 38 | 39 | ===== ============= ==================== 40 | Index Argument Name Required or Optional 41 | ===== ============= ==================== 42 | 0 ``dst`` Required 43 | ===== ============= ==================== 44 | 45 | Supported Data Types 46 | ******************** 47 | 48 | Square operation supports the following data type combinations. 49 | 50 | ==== ==== 51 | Src Dst 52 | ==== ==== 53 | f32 f32 54 | f16 f16 55 | bf16 bf16 56 | ==== ==== 57 | -------------------------------------------------------------------------------- /source/elements/oneDNN/source/graph/resources/bf16_programming.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneAPI-spec/1ea5088cab87b69541958b283c3215a80c1f5f25/source/elements/oneDNN/source/graph/resources/bf16_programming.png -------------------------------------------------------------------------------- /source/elements/oneDNN/source/graph/resources/int8_programming.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneAPI-spec/1ea5088cab87b69541958b283c3215a80c1f5f25/source/elements/oneDNN/source/graph/resources/int8_programming.png -------------------------------------------------------------------------------- /source/elements/oneDNN/source/graph/resources/programming_concepts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneAPI-spec/1ea5088cab87b69541958b283c3215a80c1f5f25/source/elements/oneDNN/source/graph/resources/programming_concepts.png -------------------------------------------------------------------------------- /source/elements/oneDPL/source/conf.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | # 3 | # SPDX-License-Identifier: MIT 4 | 5 | # -*- coding: utf-8 -*- 6 | # 7 | # Configuration file for the Sphinx documentation builder. 8 | # 9 | # This file does only contain a selection of the most common options. For a 10 | # full list see the documentation: 11 | # http://www.sphinx-doc.org/en/master/config 12 | 13 | # -- Path setup -------------------------------------------------------------- 14 | 15 | # If extensions (or modules to document with autodoc) are in another directory, 16 | # add these directories to sys.path here. If the directory is relative to the 17 | # documentation root, use os.path.abspath to make it absolute, like shown here. 18 | # 19 | import os 20 | import sys 21 | sys.path.insert(0, os.path.abspath(os.path.join('..','..','..','conf'))) 22 | # element_conf needs to import this conf 23 | sys.path.insert(0, os.path.abspath('.')) 24 | 25 | project = 'oneDPL' 26 | 27 | from element_conf import * 28 | -------------------------------------------------------------------------------- /source/elements/oneDPL/source/parallel_api.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2022 Intel Corporation 2 | .. SPDX-FileCopyrightText: Contributors to the oneAPI Specification project. 3 | .. 4 | .. SPDX-License-Identifier: CC-BY-4.0 5 | 6 | Parallel API 7 | ------------ 8 | 9 | oneDPL provides the set of parallel algorithms as defined by the `C++ Standard`_, 10 | including parallel algorithms added in the 6th edition known as C++20. 11 | All those algorithms work with *C++ Standard aligned execution policies* and with 12 | *device execution policies*. 13 | 14 | oneDPL also provides *parallel range algorithms*: variations of C++20 range-based algorithms 15 | that take a oneDPL execution policy. 16 | 17 | Additionally, oneDPL provides wrapper functions for `SYCL`_ buffers, special iterators, and 18 | a set of non-standard parallel algorithms. 19 | 20 | .. toctree:: 21 | :titlesonly: 22 | 23 | parallel_api/execution_policies.rst 24 | parallel_api/buffer_wrappers.rst 25 | parallel_api/iterators.rst 26 | parallel_api/algorithms.rst 27 | parallel_api/parallel_range_api.rst 28 | 29 | .. _`C++ Standard`: https://isocpp.org/std/the-standard 30 | .. _`SYCL`: https://registry.khronos.org/SYCL/specs/sycl-2020/html/sycl-2020.html 31 | -------------------------------------------------------------------------------- /source/elements/oneMath/source/appendix/acknowledgment.inc.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | .. _onemath_acknowledgment: 6 | 7 | Acknowledgment 8 | --------------- 9 | The oneMath `Special Interest Group `__ members 10 | provided valuable feedback to the specification and are thanked for their contributions. 11 | 12 | -------------------------------------------------------------------------------- /source/elements/oneMath/source/appendix/appendix.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | .. _onemath_appendix: 6 | 7 | oneMath Appendix 8 | ================ 9 | 10 | .. include:: future_considerations.inc.rst 11 | .. include:: acknowledgment.inc.rst 12 | 13 | -------------------------------------------------------------------------------- /source/elements/oneMath/source/appendix/future_considerations.inc.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | .. _onemath_future_considerations: 6 | 7 | Future considerations 8 | --------------------- 9 | The following items are being considered for future versions of this specification: 10 | 11 | * Encapsulation of matrix and vector information in classes. Matrix storage information could also be encapsulated. 12 | * More human-readable names for linear algebra functionality, aligned with the P1673 C++ proposal. 13 | * Broader support for row major layout. 14 | * Alternative handling of computational failures. 15 | 16 | -------------------------------------------------------------------------------- /source/elements/oneMath/source/conf.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | # 3 | # SPDX-License-Identifier: MIT 4 | 5 | # -*- coding: utf-8 -*- 6 | # 7 | # Configuration file for the Sphinx documentation builder. 8 | # 9 | # This file does only contain a selection of the most common options. For a 10 | # full list see the documentation: 11 | # http://www.sphinx-doc.org/en/master/config 12 | 13 | # -- Path setup -------------------------------------------------------------- 14 | 15 | # If extensions (or modules to document with autodoc) are in another directory, 16 | # add these directories to sys.path here. If the directory is relative to the 17 | # documentation root, use os.path.abspath to make it absolute, like shown here. 18 | # 19 | import os 20 | import sys 21 | from os.path import join 22 | 23 | 24 | project = 'oneMath' 25 | 26 | repo_root = join('..', '..', '..', '..') 27 | exec(open(join(repo_root, 'source', 'conf', 'common_conf.py')).read()) 28 | exec(open(join(repo_root, 'source', 'conf', 'element_conf.py')).read()) 29 | -------------------------------------------------------------------------------- /source/elements/oneMath/source/domains/blas/blas.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | .. _onemath_blas: 6 | 7 | BLAS Routines 8 | +++++++++++++ 9 | 10 | oneMath provides DPC++ interfaces to the Basic Linear Algebra Subprograms (BLAS) routines (Level1, Level2, Level3), as well as several BLAS-like extension routines. 11 | 12 | .. toctree:: 13 | :maxdepth: 1 14 | 15 | blas-level-1-routines.rst 16 | blas-level-2-routines.rst 17 | blas-level-3-routines.rst 18 | blas-like-extensions.rst 19 | 20 | 21 | **Parent topic:** :ref:`onemath_dense_linear_algebra` 22 | -------------------------------------------------------------------------------- /source/elements/oneMath/source/domains/dense_linear_algebra.inc.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | .. _onemath_dense_linear_algebra: 6 | 7 | Dense Linear Algebra 8 | --------------------- 9 | 10 | This section contains information about dense linear algebra routines: 11 | 12 | :ref:`matrix-storage` provides information about dense matrix and vector storage formats that are used by oneMath :ref:`onemath_blas` and :ref:`onemath_lapack`. 13 | 14 | :ref:`onemath_blas` provides vector, matrix-vector, and matrix-matrix routines for dense matrices and vector operations. 15 | 16 | :ref:`value_or_pointer` describes some details of how scalar parameters (such as ``alpha`` and ``beta``) are handled so that users may pass either values or pointers for these parameters. 17 | 18 | :ref:`onemath_lapack` provides more complex dense linear algebra routines, e.g., matrix factorization, solving dense systems of linear equations, least square problems, eigenvalue and singular value problems, and performing a number of related computational tasks. 19 | 20 | .. toctree:: 21 | :hidden: 22 | 23 | matrix-storage.rst 24 | value_or_pointer.rst 25 | blas/blas.rst 26 | lapack/lapack.rst 27 | -------------------------------------------------------------------------------- /source/elements/oneMath/source/domains/discrete_fourier_transforms.inc.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | .. _onemath_discrete_fourier_transforms: 6 | 7 | Discrete Fourier Transforms 8 | ---------------------------------- 9 | 10 | The :ref:`onemath_dft` offer several options for computing Discrete Fourier Transforms (DFTs). 11 | 12 | .. toctree:: 13 | :hidden: 14 | 15 | dft/dft.rst 16 | 17 | -------------------------------------------------------------------------------- /source/elements/oneMath/source/domains/domains.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | .. _onemath_domains: 6 | 7 | oneMath Domains 8 | ================ 9 | 10 | This section describes the Data Parallel C++ (DPC++) interface. 11 | 12 | .. include:: dense_linear_algebra.inc.rst 13 | .. include:: sparse_linear_algebra.inc.rst 14 | .. include:: discrete_fourier_transforms.inc.rst 15 | .. include:: random_number_generators.inc.rst 16 | .. include:: stats.inc.rst 17 | .. include:: vector_math.inc.rst 18 | 19 | -------------------------------------------------------------------------------- /source/elements/oneMath/source/domains/equations/error_functions_plot.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneAPI-spec/1ea5088cab87b69541958b283c3215a80c1f5f25/source/elements/oneMath/source/domains/equations/error_functions_plot.jpg -------------------------------------------------------------------------------- /source/elements/oneMath/source/domains/equations/inverse_error_functions_plot.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneAPI-spec/1ea5088cab87b69541958b283c3215a80c1f5f25/source/elements/oneMath/source/domains/equations/inverse_error_functions_plot.jpg -------------------------------------------------------------------------------- /source/elements/oneMath/source/domains/equations/rng-leapfrog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneAPI-spec/1ea5088cab87b69541958b283c3215a80c1f5f25/source/elements/oneMath/source/domains/equations/rng-leapfrog.png -------------------------------------------------------------------------------- /source/elements/oneMath/source/domains/equations/rng-skip-ahead.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneAPI-spec/1ea5088cab87b69541958b283c3215a80c1f5f25/source/elements/oneMath/source/domains/equations/rng-skip-ahead.png -------------------------------------------------------------------------------- /source/elements/oneMath/source/domains/lapack/lapack.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | .. _onemath_lapack: 6 | 7 | LAPACK Routines 8 | +++++++++++++++ 9 | 10 | oneMath provides a DPC++ interface to select routines from the Linear Algebra PACKage (LAPACK), as well as several LAPACK-like extension routines. 11 | LAPACK routines require column major layout of matrices. 12 | 13 | .. include:: lapack-linear-equation-routines.inc.rst 14 | .. include:: lapack-singular-value-eigenvalue-routines.inc.rst 15 | .. include:: lapack-like-extensions.inc.rst 16 | 17 | 18 | .. container:: 19 | 20 | .. container:: Note 21 | 22 | 23 | .. rubric:: Note 24 | :class: NoteTipHead 25 | 26 | 27 | Different arrays used as parameters to oneMath LAPACK routines must 28 | not overlap. 29 | 30 | 31 | .. container:: Note 32 | 33 | 34 | .. rubric:: Warning 35 | :name: warning 36 | :class: NoteTipHead 37 | 38 | 39 | LAPACK routines assume that input matrices do not contain IEEE 754 40 | special values such as INF or NaN values. Using these special 41 | values may cause LAPACK to return unexpected results or become 42 | unstable. 43 | 44 | **Parent topic:** :ref:`onemath_dense_linear_algebra` 45 | -------------------------------------------------------------------------------- /source/elements/oneMath/source/domains/random_number_generators.inc.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | .. _onemath_rng: 6 | 7 | Random Number Generators 8 | ------------------------- 9 | 10 | The |onemath_full_name| Random Number Generators provides a :ref:`set of routines ` implementing commonly 11 | used :ref:`pseudorandom, quasi-random, and non-deterministic generators ` 12 | with :ref:`continuous and discrete distributions `. 13 | 14 | .. toctree:: 15 | :hidden: 16 | 17 | rng/onemath-rng-overview.rst 18 | -------------------------------------------------------------------------------- /source/elements/oneMath/source/domains/rng/device_api/device-adaptors.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2025 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | .. _onemath_device_rng_adaptors: 6 | 7 | Engine Adaptors 8 | =============== 9 | 10 | oneMath RNG provides following device engine adaptors: 11 | 12 | .. tabularcolumns:: |\Y{0.4}|\Y{0.6}| 13 | 14 | .. list-table:: 15 | :header-rows: 1 16 | :class: longtable 17 | 18 | * - Routine 19 | - Description 20 | 21 | * - :ref:`onemath_device_rng_count_engine_adaptor` 22 | - Provide a method to count how many random numbers were taken from an 23 | engine during the ``generate`` call 24 | 25 | .. toctree:: 26 | :hidden: 27 | 28 | device-rng-count_engine_adaptor.rst 29 | 30 | **Parent topic:** :ref:`onemath_device_rng_routines` 31 | -------------------------------------------------------------------------------- /source/elements/oneMath/source/domains/rng/device_api/device-rng-generate-routines.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2023 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | .. _onemath_device_rng_generate_routines: 6 | 7 | Device Generate Routines 8 | ======================== 9 | 10 | 11 | Use the :ref:`onemath_device_rng_generate` routine to obtain random numbers from a given engine with proper 12 | statistics of a given distribution. 13 | 14 | .. toctree:: 15 | :maxdepth: 1 16 | :hidden: 17 | 18 | device-rng-generate.rst -------------------------------------------------------------------------------- /source/elements/oneMath/source/domains/rng/device_api/device-service-routines.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2023 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | .. _onemath_device_rng_service_routines: 6 | 7 | Device Service Routines 8 | ======================= 9 | 10 | .. tabularcolumns:: |\Y{0.4}|\Y{0.6}| 11 | 12 | .. list-table:: 13 | :header-rows: 1 14 | 15 | * - Routine 16 | - Description 17 | 18 | * - :ref:`onemath_device_rng_skip_ahead` 19 | - Proceed state of engine by the skip-ahead method to skip a given number of elements from the original sequence. 20 | 21 | .. toctree:: 22 | :maxdepth: 1 23 | :hidden: 24 | 25 | device-rng-skip-ahead.rst 26 | 27 | **Parent topic:** :ref:`onemath_device_rng_routines` -------------------------------------------------------------------------------- /source/elements/oneMath/source/domains/rng/host_api/generate-routine.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | .. _onemath_rng_generate_routine: 6 | 7 | Host Generate Routine 8 | ===================== 9 | 10 | .. container:: 11 | 12 | 13 | - :ref:`onemath_rng_generate` 14 | Entry point to obtain random numbers from a given engine with 15 | proper statistics of a given distribution. 16 | 17 | **Parent topic:** :ref:`onemath_rng_manual_offload_routines` 18 | 19 | .. toctree:: 20 | :hidden: 21 | 22 | onemath-rng-generate 23 | -------------------------------------------------------------------------------- /source/elements/oneMath/source/domains/rng/host_api/onemath-rng-default_engine.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | .. _onemath_rng_default_engine: 6 | 7 | default_engine 8 | ============== 9 | 10 | Default random engine. 11 | 12 | .. _onemath_rng_default_engine_description: 13 | 14 | .. rubric:: Description 15 | 16 | The choice of engine type named by default_engine is implementation-defined. The implementation may select this type on the basis of performance, size, quality, or any combination of such factors. 17 | 18 | .. _onemath_rng_default_engine_description_syntax: 19 | 20 | type alias default_engine 21 | ------------------------- 22 | 23 | .. rubric:: Syntax 24 | 25 | .. code-block:: cpp 26 | 27 | using default_engine = implementation-defined; 28 | 29 | 30 | **Parent topic:** :ref:`onemath_rng_engines_basic_random_number_generators` 31 | -------------------------------------------------------------------------------- /source/elements/oneMath/source/domains/rng/host_api/service-routines.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | .. _onemath_rng_service_routines: 6 | 7 | Host Service Routines 8 | ===================== 9 | 10 | 11 | .. container:: 12 | 13 | 14 | .. container:: tablenoborder 15 | 16 | 17 | .. list-table:: 18 | :header-rows: 1 19 | 20 | * - Routine 21 | - Description 22 | * - \ :ref:`onemath_rng_leapfrog`\ 23 | - Proceed state of engine by the leapfrog method to generate a subsequence of the original sequence 24 | * - \ :ref:`onemath_rng_skip_ahead`\ 25 | - Proceed state of engine by the skip-ahead method to skip a given number of elements from the original sequence 26 | 27 | 28 | 29 | **Parent topic:** :ref:`onemath_rng_manual_offload_routines` 30 | 31 | .. toctree:: 32 | :hidden: 33 | 34 | onemath-rng-leapfrog 35 | onemath-rng-skip_ahead 36 | -------------------------------------------------------------------------------- /source/elements/oneMath/source/domains/sparse_linear_algebra.inc.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2024 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | .. _onemath_sparse_linear_algebra: 6 | 7 | Sparse Linear Algebra 8 | ---------------------- 9 | 10 | .. container:: 11 | 12 | The |onemath_full_name| provides a C++ interface to a set of Sparse 13 | Linear Algebra routines using SYCL. 14 | 15 | :ref:`onemath_spblas` provides basic operations on sparse vectors and 16 | matrices. Most operations are split into three stages: query of the external 17 | workspace size, optimization stage and execution. For a given configuration, 18 | the first two stages would typically be called once for a set of input 19 | arguments and the execution stage may be called multiple times. During the 20 | optimization stage, the API may inspect the matrix properties including size, 21 | sparsity pattern and available parallelism, and may apply matrix format or 22 | structure changes to enable a more optimized algorithm. User-provided matrix 23 | data remain unmodified if such optimizations are made. In the execution 24 | stage, multiple routine calls can take advantage of the optimization stage 25 | data in order to improve performance. Each operation has a descriptor type 26 | that is used to carry information across the different stages. 27 | 28 | .. toctree:: 29 | :hidden: 30 | 31 | spblas/spblas.rst 32 | 33 | -------------------------------------------------------------------------------- /source/elements/oneMath/source/domains/spblas/spblas.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2024 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | .. _onemath_spblas: 6 | 7 | Sparse BLAS 8 | =========== 9 | 10 | .. container:: 11 | 12 | Sparse BLAS routines provide basic operations on sparse vectors and matrices. 13 | 14 | .. container:: tablenoborder 15 | 16 | .. list-table:: 17 | :header-rows: 1 18 | 19 | * - Routines and Objects 20 | - Description 21 | * - :ref:`onemath_sparse_data_handles` 22 | - Matrix and vector handle types 23 | * - :ref:`onemath_sparse_spmm_header` 24 | - Compute the product of a sparse matrix with a dense matrix 25 | * - :ref:`onemath_sparse_spmv_header` 26 | - Compute the product of a sparse matrix with a dense vector 27 | * - :ref:`onemath_sparse_spsv_header` 28 | - Solve a triangular sparse linear system 29 | 30 | .. toctree:: 31 | :hidden: 32 | 33 | data_types/data_handles 34 | operations/spmm 35 | operations/spmv 36 | operations/spsv 37 | matrix_view 38 | supported-types 39 | 40 | **Parent topic:** :ref:`onemath_sparse_linear_algebra` 41 | -------------------------------------------------------------------------------- /source/elements/oneMath/source/domains/spblas/supported-types.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2024 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | .. _onemath_sparse_supported_types: 6 | 7 | Supported template types 8 | ======================== 9 | 10 | .. container:: tablenoborder 11 | 12 | .. list-table:: 13 | :header-rows: 1 14 | 15 | * - Data Types ```` 16 | - Integer Types ```` 17 | * - ``float`` 18 | - ``std::int32_t`` 19 | * - ``double`` 20 | - ``std::int64_t`` 21 | * - ``std::complex`` 22 | -   23 | * - ``std::complex`` 24 | -   25 | 26 | ``dataType`` is used to describe the precision (i.e. number of bits) and domain 27 | (i.e. real or complex) of the :ref:`data handles ` 28 | and the operations using them. 29 | 30 | ``indexType`` is used to describe the range of integer types such as indices, 31 | offsets or sizes of the :ref:`data handles ` and the 32 | operations using them. 33 | 34 | **Parent topic:** :ref:`onemath_spblas` 35 | -------------------------------------------------------------------------------- /source/elements/oneMath/source/domains/stats.inc.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | .. _onemath_stats: 6 | 7 | Summary Statistics 8 | ------------------- 9 | 10 | The oneMath provides a set of :ref:`Summary Statistics routines ` that compute basic statistical estimates for single and double precision multi-dimensional datasets. 11 | 12 | .. toctree:: 13 | :hidden: 14 | 15 | stats/onemath_stats_overview.rst -------------------------------------------------------------------------------- /source/elements/oneMath/source/domains/stats/onemath_stats_overview.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | .. _onemath_stats_overview: 6 | 7 | Summary Statistics 8 | ================== 9 | 10 | .. rubric:: Definitions 11 | 12 | The oneMath Summary Statistics domains consists of: 13 | 14 | * Dataset structure. The structure consolidates the information of a multi-dimensional dataset (see detailed description in :ref:`onemath_stats_dataset`). 15 | * Computation routines. The routines are represented as free functions (see detailed description for each routine in :ref:`onemath_stats_routines`): 16 | 17 | * Raw and central sums / moments up to the fourth order 18 | * Variation coefficient 19 | * Skewness and excess kurtosis (further referred as kurtosis) 20 | * Minimum and maximum 21 | 22 | Refer to :ref:`onemath_stats_usage_model`. 23 | 24 | .. toctree:: 25 | :hidden: 26 | 27 | onemath_stats_usage_model.rst 28 | onemath_stats_dataset.rst 29 | onemath_stats_routines.rst 30 | onemath_stats_service_routines.rst 31 | 32 | **Parent topic:** :ref:`onemath_stats` -------------------------------------------------------------------------------- /source/elements/oneMath/source/domains/stats/onemath_stats_service_routines.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | .. _onemath_stats_service_routines: 6 | 7 | Service Routines 8 | ================ 9 | 10 | 11 | .. container:: 12 | 13 | 14 | .. container:: tablenoborder 15 | 16 | 17 | .. list-table:: 18 | :header-rows: 1 19 | 20 | * - Routine 21 | - Description 22 | * - \ :ref:`onemath_stats_make_dataset`\ 23 | - Creates a dataset from the provided parameters 24 | 25 | 26 | 27 | **Parent topic:** :ref:`onemath_stats` 28 | 29 | .. toctree:: 30 | :hidden: 31 | 32 | onemath_stats_make_dataset 33 | -------------------------------------------------------------------------------- /source/elements/oneMath/source/domains/vector_math.inc.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | .. _onemath_vm_inc: 6 | 7 | Vector Math 8 | ----------- 9 | 10 | .. container:: 11 | 12 | oneMath :ref:`Vector Mathematics functions ` (VM) compute a mathematical 13 | function of each of the vector elements. VM includes a set of 14 | functions (arithmetic, power, trigonometric, exponential, 15 | hyperbolic, special, and rounding) that operate on vectors of real 16 | and complex numbers. 17 | 18 | .. toctree:: 19 | :hidden: 20 | 21 | vm/vm.rst -------------------------------------------------------------------------------- /source/elements/oneMath/source/domains/vm/bibliography.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | .. _onemath_vm_bibliography: 6 | 7 | Bibliography 8 | ============ 9 | 10 | 11 | .. container:: 12 | 13 | 14 | For more information about the VM functionality, refer to the 15 | following publications: 16 | 17 | 18 | - 19 | 20 | 21 | .. container:: 22 | 23 | 24 | **VM** 25 | 26 | 27 | [IEEE754] 28 | IEEE Standard for Binary Floating-Point Arithmetic. 29 | ANSI/IEEE Std 754-2008. 30 | 31 | 32 | -------------------------------------------------------------------------------- /source/elements/oneMath/source/index.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | .. _oneMath-section: 6 | 7 | ======= 8 | oneMath 9 | ======= 10 | 11 | The |onemath_full_name| (oneMath) defines a set of fundamental mathematical routines for use in high-performance computing and other applications. As part of oneAPI, oneMath is designed to allow execution on a wide variety of computational devices: CPUs, GPUs, FPGAs, and other accelerators. The functionality is subdivided into several domains: dense linear algebra, sparse linear algebra, discrete Fourier transforms, random number generators and vector math. 12 | 13 | 14 | The general assumptions, design features and requirements for the oneMath library and host-to-device computational routines will be described in :ref:`onemath_architecture`. 15 | The individual domains and their APIs are described in :ref:`onemath_domains`. 16 | Other design considerations that are not necessarily part of the oneMath specification but that are worth mentioning will be discussed in :ref:`onemath_appendix`. 17 | 18 | 19 | .. toctree:: 20 | :maxdepth: 2 21 | 22 | architecture/architecture.rst 23 | domains/domains.rst 24 | appendix/appendix.rst 25 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/Resources/06000005.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneAPI-spec/1ea5088cab87b69541958b283c3215a80c1f5f25/source/elements/oneTBB/source/Resources/06000005.png -------------------------------------------------------------------------------- /source/elements/oneTBB/source/Resources/06000007.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneAPI-spec/1ea5088cab87b69541958b283c3215a80c1f5f25/source/elements/oneTBB/source/Resources/06000007.png -------------------------------------------------------------------------------- /source/elements/oneTBB/source/Resources/06000008.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneAPI-spec/1ea5088cab87b69541958b283c3215a80c1f5f25/source/elements/oneTBB/source/Resources/06000008.png -------------------------------------------------------------------------------- /source/elements/oneTBB/source/Resources/06000009.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneAPI-spec/1ea5088cab87b69541958b283c3215a80c1f5f25/source/elements/oneTBB/source/Resources/06000009.png -------------------------------------------------------------------------------- /source/elements/oneTBB/source/Resources/0600000A.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneAPI-spec/1ea5088cab87b69541958b283c3215a80c1f5f25/source/elements/oneTBB/source/Resources/0600000A.png -------------------------------------------------------------------------------- /source/elements/oneTBB/source/Resources/0600000B.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneAPI-spec/1ea5088cab87b69541958b283c3215a80c1f5f25/source/elements/oneTBB/source/Resources/0600000B.png -------------------------------------------------------------------------------- /source/elements/oneTBB/source/Resources/0600000C.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneAPI-spec/1ea5088cab87b69541958b283c3215a80c1f5f25/source/elements/oneTBB/source/Resources/0600000C.png -------------------------------------------------------------------------------- /source/elements/oneTBB/source/Resources/0600000D.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneAPI-spec/1ea5088cab87b69541958b283c3215a80c1f5f25/source/elements/oneTBB/source/Resources/0600000D.png -------------------------------------------------------------------------------- /source/elements/oneTBB/source/Resources/0600000E.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneAPI-spec/1ea5088cab87b69541958b283c3215a80c1f5f25/source/elements/oneTBB/source/Resources/0600000E.png -------------------------------------------------------------------------------- /source/elements/oneTBB/source/Resources/0600000F.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneAPI-spec/1ea5088cab87b69541958b283c3215a80c1f5f25/source/elements/oneTBB/source/Resources/0600000F.png -------------------------------------------------------------------------------- /source/elements/oneTBB/source/Resources/08000006.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneAPI-spec/1ea5088cab87b69541958b283c3215a80c1f5f25/source/elements/oneTBB/source/Resources/08000006.png -------------------------------------------------------------------------------- /source/elements/oneTBB/source/Resources/async_msg_chaining.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneAPI-spec/1ea5088cab87b69541958b283c3215a80c1f5f25/source/elements/oneTBB/source/Resources/async_msg_chaining.png -------------------------------------------------------------------------------- /source/elements/oneTBB/source/Resources/async_msg_simplest.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneAPI-spec/1ea5088cab87b69541958b283c3215a80c1f5f25/source/elements/oneTBB/source/Resources/async_msg_simplest.png -------------------------------------------------------------------------------- /source/elements/oneTBB/source/Resources/critical_path_in_graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneAPI-spec/1ea5088cab87b69541958b283c3215a80c1f5f25/source/elements/oneTBB/source/Resources/critical_path_in_graph.png -------------------------------------------------------------------------------- /source/elements/oneTBB/source/Resources/dep_graph.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneAPI-spec/1ea5088cab87b69541958b283c3215a80c1f5f25/source/elements/oneTBB/source/Resources/dep_graph.jpg -------------------------------------------------------------------------------- /source/elements/oneTBB/source/Resources/flow-graph.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneAPI-spec/1ea5088cab87b69541958b283c3215a80c1f5f25/source/elements/oneTBB/source/Resources/flow-graph.jpg -------------------------------------------------------------------------------- /source/elements/oneTBB/source/Resources/message_flow_graph.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneAPI-spec/1ea5088cab87b69541958b283c3215a80c1f5f25/source/elements/oneTBB/source/Resources/message_flow_graph.jpg -------------------------------------------------------------------------------- /source/elements/oneTBB/source/Resources/non_consq_rng.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneAPI-spec/1ea5088cab87b69541958b283c3215a80c1f5f25/source/elements/oneTBB/source/Resources/non_consq_rng.jpg -------------------------------------------------------------------------------- /source/elements/oneTBB/source/Resources/parll_red.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneAPI-spec/1ea5088cab87b69541958b283c3215a80c1f5f25/source/elements/oneTBB/source/Resources/parll_red.jpg -------------------------------------------------------------------------------- /source/elements/oneTBB/source/Resources/parll_scan.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneAPI-spec/1ea5088cab87b69541958b283c3215a80c1f5f25/source/elements/oneTBB/source/Resources/parll_scan.jpg -------------------------------------------------------------------------------- /source/elements/oneTBB/source/Resources/reference-latest-19.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneAPI-spec/1ea5088cab87b69541958b283c3215a80c1f5f25/source/elements/oneTBB/source/Resources/reference-latest-19.jpg -------------------------------------------------------------------------------- /source/elements/oneTBB/source/Resources/streaming_node_args.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneAPI-spec/1ea5088cab87b69541958b283c3215a80c1f5f25/source/elements/oneTBB/source/Resources/streaming_node_args.png -------------------------------------------------------------------------------- /source/elements/oneTBB/source/Resources/streaming_node_port_refs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneAPI-spec/1ea5088cab87b69541958b283c3215a80c1f5f25/source/elements/oneTBB/source/Resources/streaming_node_port_refs.png -------------------------------------------------------------------------------- /source/elements/oneTBB/source/algorithms/examples/range_concept.cpp: -------------------------------------------------------------------------------- 1 | #include "range_concept.h" 2 | 3 | int main() { 4 | TrivialNaturalRange r; 5 | r.upper = 1; 6 | r.lower = 0; 7 | return int(r.empty()); 8 | } 9 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/algorithms/examples/range_concept.h: -------------------------------------------------------------------------------- 1 | #include // for split tags 2 | 3 | struct TrivialNaturalRange { 4 | // restore the default constructor 5 | TrivialNaturalRange() {} 6 | 7 | size_t lower; 8 | size_t upper; 9 | bool empty() const { return lower == upper; } 10 | bool is_divisible() const { return upper > lower + 1; } 11 | 12 | // basic splitting constructor 13 | TrivialNaturalRange(TrivialNaturalRange& r, oneapi::tbb::split) { 14 | size_t m = r.lower + (r.upper - r.lower) / 2; 15 | upper = r.upper; 16 | r.upper = lower = m; 17 | } 18 | 19 | // optional proportional splitting constructor 20 | TrivialNaturalRange(TrivialNaturalRange& r, oneapi::tbb::proportional_split p) { 21 | size_t m = r.lower + ((r.upper - r.lower) * p.left()) / (p.left() + p.right()); 22 | if (m == r.lower) 23 | m++; 24 | else if (m == r.upper) 25 | m--; 26 | upper = r.upper; 27 | r.upper = lower = m; 28 | } 29 | 30 | // optional trait that enables proportional split 31 | static const bool is_splittable_in_proportion = true; 32 | }; 33 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/algorithms/functions/collaborative_once_flag_cls.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2021 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ======================= 6 | collaborative_once_flag 7 | ======================= 8 | **[algorithms.collaborative_call_once.collaborative_once_flag]** 9 | 10 | Special class that ``collaborative_call_once`` uses to perform a call only once. 11 | 12 | .. code:: cpp 13 | 14 | // Defined in header 15 | 16 | namespace oneapi { 17 | namespace tbb { 18 | 19 | class collaborative_once_flag { 20 | public: 21 | collaborative_once_flag(); 22 | collaborative_once_flag(const collaborative_once_flag&) = delete; 23 | collaborative_once_flag& operator=(const collaborative_once_flag&) = delete; 24 | }; 25 | } // namespace tbb 26 | } // namespace oneapi 27 | 28 | Member functions 29 | ---------------- 30 | 31 | .. cpp:function:: collaborative_once_flag() 32 | 33 | Constructs an ``collaborative_once_flag`` object. The initial state indicates that no function has been called. 34 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/algorithms/functions/parallel_pipeline_func/filter_mode_enum.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2021 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | =========== 6 | filter_mode 7 | =========== 8 | **[algorithms.parallel_pipeline.filter_mode]** 9 | 10 | A ``filter_mode`` enumeration represents an execution mode of a ``filter`` in a ``parallel_pipeline`` algorithm. 11 | 12 | Its enumerated values and their meanings are as follows: 13 | 14 | * A ``parallel`` filter can process multiple items in parallel and without a particular order. 15 | * A ``serial_out_of_order`` filter processes items one at a time and without a particular order. 16 | * A ``serial_in_order`` filter processes items one at a time. The order in which items are processed 17 | is implicitly set by the first `serial_in_order` filter and respected by all other such filters in the pipeline. 18 | 19 | .. code:: cpp 20 | 21 | // Defined in header 22 | 23 | namespace oneapi { 24 | namespace tbb { 25 | 26 | enum class filter_mode { 27 | parallel = /*implementation-defined*/, 28 | serial_in_order = /*implementation-defined*/, 29 | serial_out_of_order = /*implementation-defined*/ 30 | }; 31 | 32 | } // namespace tbb 33 | } // namespace oneapi 34 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/algorithms/functions/parallel_pipeline_func/flow_control_cls.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2021 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ============ 6 | flow_control 7 | ============ 8 | **[algorithms.parallel_pipeline.flow_control]** 9 | 10 | Enables the first filter in a composite filter to indicate when the end of input stream is reached. 11 | 12 | Template function ``parallel_pipeline`` passes a ``flow_control`` object to the functor 13 | of the first filter. When the functor reaches the end of its input stream, it should invoke ``fc.stop()`` 14 | and return a dummy value that will not be passed to the next filter. 15 | 16 | .. code:: cpp 17 | 18 | // Defined in header 19 | 20 | namespace oneapi { 21 | namespace tbb { 22 | 23 | class flow_control { 24 | public: 25 | void stop(); 26 | }; 27 | 28 | } // namespace tbb 29 | } namespace oneapi 30 | 31 | Member functions 32 | ---------------- 33 | 34 | .. cpp:function:: void stop() 35 | 36 | Indicates that first filter of the pipeline reaches the end of its output. 37 | 38 | See also: 39 | 40 | * :doc:`FilterBody requiremnts <../../../named_requirements/algorithms/filter_body>` 41 | * :doc:`filter class ` 42 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/algorithms/split_tags/split_cls.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2021 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ===== 6 | split 7 | ===== 8 | **[algorithms.split]** 9 | 10 | Type of an argument for a splitting constructor of :doc:`Range <../../named_requirements/algorithms/range>`. 11 | An argument of type ``split`` is used to distinguish a splitting constructor from a copy constructor. 12 | 13 | .. code:: cpp 14 | 15 | // Defined in header 16 | // Defined in header 17 | // Defined in header 18 | // Defined in header 19 | // Defined in header 20 | // Defined in header 21 | // Defined in header 22 | // Defined in header 23 | 24 | class split; 25 | 26 | See also: 27 | 28 | * :doc:`Range requirements <../../named_requirements/algorithms/range>` 29 | 30 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/conf.py: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | # 3 | # SPDX-License-Identifier: MIT 4 | 5 | # -*- coding: utf-8 -*- 6 | # 7 | # Configuration file for the Sphinx documentation builder. 8 | # 9 | # This file does only contain a selection of the most common options. For a 10 | # full list see the documentation: 11 | # http://www.sphinx-doc.org/en/master/config 12 | 13 | # -- Path setup -------------------------------------------------------------- 14 | 15 | # If extensions (or modules to document with autodoc) are in another directory, 16 | # add these directories to sys.path here. If the directory is relative to the 17 | # documentation root, use os.path.abspath to make it absolute, like shown here. 18 | # 19 | import os 20 | import sys 21 | from os.path import join 22 | 23 | 24 | project = 'oneTBB' 25 | 26 | repo_root = join('..', '..', '..', '..') 27 | exec(open(join(repo_root, 'source', 'conf', 'common_conf.py')).read()) 28 | exec(open(join(repo_root, 'source', 'conf', 'element_conf.py')).read()) 29 | 30 | exclude_patterns = ['nested-*.rst', 31 | 'uncategorized.rst', 32 | 'uncategorized/**', 33 | 'low_level_task_api.rst', 34 | 'low_level_tasking/**', 35 | ] 36 | 37 | latex_documents = [ 38 | ('index', 'oneTBB-spec.tex', u'oneAPI Threading Building Blocks Specification', 39 | u'Intel', 'manual'), 40 | ] 41 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/configuration.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ============= 6 | Configuration 7 | ============= 8 | **[configuration]** 9 | 10 | This section describes the most general features of oneAPI Threading Building Blocks (oneTBB) such as namespaces, versioning, and macros. 11 | 12 | .. toctree:: 13 | :titlesonly: 14 | 15 | configuration/namespaces.rst 16 | configuration/version_information.rst 17 | configuration/enabling_debugging_features.rst 18 | configuration/feature_macros.rst 19 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/configuration/namespaces.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ========== 6 | Namespaces 7 | ========== 8 | **[configuration.namespaces]** 9 | 10 | This section describes the oneTBB namespace conventions. 11 | 12 | tbb Namespace 13 | ------------- 14 | 15 | The ``tbb`` namespace contains public identifiers defined by the library 16 | that you can reference in your program. 17 | 18 | tbb::flow Namespace 19 | ------------------- 20 | 21 | The ``tbb::flow`` namespace contains public identifiers defined by the 22 | library that you can reference in your program related to the flow graph feature. See 23 | :doc:`Flow Graph <../flow_graph>` for more information. 24 | 25 | oneapi::tbb Namespace 26 | --------------------- 27 | 28 | The ``tbb`` namespace is a part of the top level ``oneapi`` namespace. Therefore, all API from the ``tbb`` 29 | namespace (incl. the ``tbb::flow`` namespace) are available in the ``oneapi::tbb`` namespace. The 30 | ``oneapi::tbb`` namespace can be considered as an alias for the ``tbb`` namespace: 31 | 32 | .. code:: cpp 33 | 34 | namespace oneapi { namespace tbb = ::tbb; } 35 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/containers/concurrent_bounded_queue_cls/iterators.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ========= 6 | Iterators 7 | ========= 8 | 9 | The types ``concurrent_bounded_queue::iterator`` and ``concurrent_bounded_queue::const_iterator`` 10 | meet the requirements of ``ForwardIterator`` from the [forward.iterators] ISO C++ Standard section. 11 | 12 | All member functions in this section can only be performed serially. The behavior is undefined in 13 | case of concurrent execution of these methods with other (either concurrently safe) methods. 14 | 15 | unsafe_begin and unsafe_cbegin 16 | ------------------------------ 17 | 18 | .. code:: cpp 19 | 20 | iterator unsafe_begin(); 21 | 22 | const_iterator unsafe_begin() const; 23 | 24 | const_iterator unsafe_cbegin() const; 25 | 26 | **Returns**: an iterator to the first element in the container. 27 | 28 | unsafe_end and unsafe_cend 29 | -------------------------- 30 | 31 | .. code:: cpp 32 | 33 | iterator unsafe_end(); 34 | 35 | const_iterator unsafe_end() const; 36 | 37 | const_iterator unsafe_cend() const; 38 | 39 | **Returns**: an iterator to the element that follows the last element in the container. 40 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/containers/concurrent_bounded_queue_cls/non_member_binary_comparisons.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ============================= 6 | Non-member binary comparisons 7 | ============================= 8 | 9 | .. code:: cpp 10 | 11 | template 12 | bool operator==( const concurrent_bounded_queue& lhs, 13 | const concurrent_bounded_queue& rhs ); 14 | 15 | Checks if ``lhs`` is equal to ``rhs``, that is they have the same number of elements and ``lhs`` 16 | contains all elements from ``rhs``. 17 | 18 | **Returns**: ``true`` if ``lhs`` is equal to ``rhs``; ``false``, otherwise. 19 | 20 | .. code:: cpp 21 | 22 | template 23 | bool operator!=( const concurrent_bounded_queue& lhs, 24 | const concurrent_bounded_queue& rhs ); 25 | 26 | Equivalent to ``!(lhs == rhs)``. 27 | 28 | **Returns**: ``true`` if ``lhs`` is not equal to ``rhs``; ``false``, otherwise. 29 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/containers/concurrent_bounded_queue_cls/non_member_swap.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | =============== 6 | Non-member swap 7 | =============== 8 | 9 | .. code:: cpp 10 | 11 | template 12 | void swap( concurrent_bounded_queue& lhs, 13 | concurrent_bounded_queue& rhs ); 14 | 15 | Equivalent to ``lhs.swap(rhs)``. 16 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/containers/concurrent_bounded_queue_cls/unsafe_member_functions.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ==================================== 6 | Concurrently unsafe member functions 7 | ==================================== 8 | 9 | All member functions in this section can only be performed serially. The behavior is undefined in 10 | case of concurrent execution of these methods with other (either concurrently safe) methods. 11 | 12 | The number of elements 13 | ---------------------- 14 | 15 | .. code:: cpp 16 | 17 | size_type size() const; 18 | 19 | **Returns**: the number of elements in the container. 20 | 21 | ---------------------------- 22 | 23 | .. code:: cpp 24 | 25 | bool empty() const; 26 | 27 | **Returns**: ``true`` if the container is empty; ``false``, otherwise. 28 | 29 | clear 30 | ----- 31 | 32 | .. code:: cpp 33 | 34 | void clear(); 35 | 36 | Removes all elements from the container. 37 | 38 | swap 39 | ---- 40 | 41 | .. code:: cpp 42 | 43 | void swap( concurrent_bounded_queue& other ); 44 | 45 | Swaps contents of ``*this`` and ``other``. 46 | 47 | Swaps allocators if ``std::allocator_traits::propagate_on_container_swap::value`` is ``true``. 48 | 49 | Otherwise if ``get_allocator() != other.get_allocator()`` the behavior is undefined. -------------------------------------------------------------------------------- /source/elements/oneTBB/source/containers/concurrent_hash_map_cls/hash_policy.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | =========== 6 | Hash policy 7 | =========== 8 | 9 | Rehashing 10 | --------- 11 | 12 | .. code:: cpp 13 | 14 | void rehash( size_type n = 0 ); 15 | 16 | If ``n > 0``, sets the number of buckets to the value that is not less than ``n``. 17 | 18 | bucket_count 19 | ------------ 20 | 21 | .. code:: cpp 22 | 23 | size_type bucket_count() const; 24 | 25 | **Returns**: the number of buckets in the container. 26 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/containers/concurrent_hash_map_cls/non_member_binary_comparisons.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ============================= 6 | Non-member binary comparisons 7 | ============================= 8 | 9 | Two objects of ``concurrent_hash_map`` are equal if the following conditions are ``true``: 10 | 11 | * They contain equal number of elements. 12 | * Each element from one container is also available in the other. 13 | 14 | .. code:: cpp 15 | 16 | template 17 | bool operator==( const concurrent_hash_map& lhs, 18 | const concurrent_hash_map& rhs ); 19 | 20 | **Returns**: ``true`` if ``lhs`` is equivalent to ``rhs``; ``false``, otherwise. 21 | 22 | ----------------------------------------------------------------------------- 23 | 24 | .. code:: cpp 25 | 26 | template 27 | bool operator!=( const concurrent_hash_map& lhs, 28 | const concurrent_hash_map& rhs ); 29 | 30 | Equivalent to ``!(lhs == rhs)``. 31 | 32 | **Returns**: ``true`` if ``lhs`` is not equal to ``rhs``; ``false``, otherwise. 33 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/containers/concurrent_hash_map_cls/non_member_swap.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | =============== 6 | Non-member swap 7 | =============== 8 | 9 | .. code:: cpp 10 | 11 | template 12 | void swap( concurrent_hash_map& lhs, 13 | concurrent_hash_map& rhs ); 14 | 15 | Equivalent to ``lhs.swap(rhs)``. 16 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/containers/concurrent_hash_map_cls/parallel_iteration.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ================== 6 | Parallel iteration 7 | ================== 8 | 9 | Member types ``concurrent_hash_map::range_type`` and ``concurrent_hash_map::const_range_type`` 10 | meet the :doc:`ContainerRange requirements <../../named_requirements/containers/container_range>`. 11 | 12 | These types differ only in that the bounds for a ``concurrent_hash_map::const_range_type`` 13 | are of type ``concurrent_hash_map::const_iterator``, whereas the bounds for a ``concurrent_hash_map::range_type`` 14 | are of type ``concurrent_hash_map::iterator``. 15 | 16 | Traversing the ``concurrent_hash_map`` is not thread safe. The behavior is undefined in case of concurrent execution of any 17 | member functions while traversing the ``range_type`` or ``const_range_type``. 18 | 19 | range member function 20 | --------------------- 21 | 22 | .. code:: cpp 23 | 24 | range_type range( std::size_t grainsize = 1 ); 25 | 26 | const_range_type range( std::size_t grainsize = 1 ) const; 27 | 28 | **Returns**: a range object representing all elements in the container. 29 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/containers/concurrent_hash_map_cls/size_and_capacity.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ================= 6 | Size and capacity 7 | ================= 8 | 9 | empty 10 | ----- 11 | 12 | .. code:: cpp 13 | 14 | bool empty() const; 15 | 16 | **Returns**: ``true`` if the container is empty; ``false``, otherwise. 17 | 18 | The result may differ with the actual container state in case of pending concurrent insertions or erasures. 19 | 20 | size 21 | ---- 22 | 23 | .. code:: cpp 24 | 25 | size_type size() const; 26 | 27 | **Returns**: the number of elements in the container. 28 | 29 | The result may differ with the actual container state in case of pending concurrent insertions or erasures. 30 | 31 | max_size 32 | -------- 33 | 34 | .. code:: cpp 35 | 36 | size_type max_size() const; 37 | 38 | **Returns**: The maximum number of elements that container can hold. 39 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/containers/concurrent_hash_map_cls/unsafe_modifiers.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ============================= 6 | Concurrently unsafe modifiers 7 | ============================= 8 | 9 | All member functions in this section can only be performed serially. 10 | The behavior is undefined in case of concurrent execution of these member functions 11 | with other (either concurrently safe) methods. 12 | 13 | clear 14 | ----- 15 | 16 | .. code:: cpp 17 | 18 | void clear(); 19 | 20 | Removes all elements from the container. 21 | 22 | swap 23 | ---- 24 | 25 | .. code:: cpp 26 | 27 | void swap( concurrent_hash_map& other ); 28 | 29 | Swaps contents of ``*this`` and ``other``. 30 | 31 | Swaps allocators if ``std::allocator_traits::propagate_on_container_swap::value`` is ``true``. 32 | 33 | Otherwise, if ``get_allocator() != other.get_allocator()``, the behavior is undefined. 34 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/containers/concurrent_map_cls/iterators.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ========= 6 | Iterators 7 | ========= 8 | 9 | The types ``concurrent_map::iterator`` and ``concurrent_map::const_iterator`` 10 | meet the requirements of ``ForwardIterator`` from the [forward.iterators] ISO C++ standard section. 11 | 12 | begin and cbegin 13 | ---------------- 14 | 15 | .. code:: cpp 16 | 17 | iterator begin(); 18 | 19 | const_iterator begin() const; 20 | 21 | const_iterator cbegin() const; 22 | 23 | **Returns**: an iterator to the first element in the container. 24 | 25 | end and cend 26 | ------------ 27 | 28 | .. code:: cpp 29 | 30 | iterator end(); 31 | 32 | const_iterator end() const; 33 | 34 | const_iterator cend() const; 35 | 36 | **Returns**: an iterator to the element that follows the last element in the container. 37 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/containers/concurrent_map_cls/non_member_binary_comparisons.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2021 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ============================= 6 | Non-member binary comparisons 7 | ============================= 8 | 9 | Two ``oneapi::tbb::concurrent_map`` objects are equal if they have the same number of elements 10 | and each element in one container is equal to the element in other container on the same position. 11 | 12 | .. code:: cpp 13 | 14 | template 15 | bool operator==( const concurrent_map& lhs, 16 | const concurrent_map& rhs ) 17 | 18 | **Returns**: ``true`` if ``lhs`` is equal to ``rhs``; ``false``, otherwise. 19 | 20 | ----------------------------------------------------- 21 | 22 | .. code:: cpp 23 | 24 | template 25 | bool operator!=( const concurrent_map& lhs, 26 | const concurrent_map& rhs ) 27 | 28 | **Returns**: ``true`` if ``lhs`` is not equal to ``rhs``; ``false``, otherwise. 29 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/containers/concurrent_map_cls/non_member_swap.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | =============== 6 | Non-member swap 7 | =============== 8 | 9 | .. code:: cpp 10 | 11 | template 12 | void swap( concurrent_map& lhs, 13 | concurrent_map& rhs ); 14 | 15 | Equivalent to ``lhs.swap(rhs)``. 16 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/containers/concurrent_map_cls/observers.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ========= 6 | Observers 7 | ========= 8 | 9 | get_allocator 10 | ------------- 11 | 12 | .. code:: cpp 13 | 14 | allocator_type get_allocator() const; 15 | 16 | **Returns**: a copy of the allocator associated with ``*this``. 17 | 18 | key_comp 19 | -------- 20 | 21 | .. code:: cpp 22 | 23 | key_compare key_comp() const; 24 | 25 | **Returns**: a copy of the key comparison functor associated with ``*this``. 26 | 27 | value_comp 28 | ---------- 29 | 30 | .. code:: cpp 31 | 32 | value_compare value_comp() const; 33 | 34 | **Returns**: an object of the ``value_compare`` class that is used to compare 35 | ``value_type`` objects. 36 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/containers/concurrent_map_cls/parallel_iteration.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ================== 6 | Parallel iteration 7 | ================== 8 | 9 | Member types ``concurrent_map::range_type`` and ``concurrent_map::const_range_type`` 10 | meet the :doc:`ContainerRange requirements <../../named_requirements/containers/container_range>`. 11 | 12 | These types differ only in that the bounds for a ``concurrent_map::const_range_type`` 13 | are of type ``concurrent_map::const_iterator``, whereas the bounds for a ``concurrent_map::range_type`` 14 | are of type ``concurrent_map::iterator``. 15 | 16 | range member function 17 | --------------------- 18 | 19 | .. code:: cpp 20 | 21 | range_type range(); 22 | 23 | const_range_type range() const; 24 | 25 | **Returns**: a range object representing all elements in the container. 26 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/containers/concurrent_map_cls/size_and_capacity.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ================= 6 | Size and capacity 7 | ================= 8 | 9 | empty 10 | ----- 11 | 12 | .. code:: cpp 13 | 14 | bool empty() const; 15 | 16 | **Returns**: ``true`` if the container is empty; ``false``, otherwise. 17 | 18 | The result may differ with the actual container state in case of pending concurrent insertions. 19 | 20 | size 21 | ---- 22 | 23 | .. code:: cpp 24 | 25 | size_type size() const; 26 | 27 | **Returns**: the number of elements in the container. 28 | 29 | The result may differ with the actual container size in case of pending concurrent insertions. 30 | 31 | max_size 32 | -------- 33 | 34 | .. code:: cpp 35 | 36 | size_type max_size() const; 37 | 38 | **Returns**: the maximum number of elements that container can hold. 39 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/containers/concurrent_multimap_cls/iterators.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ========= 6 | Iterators 7 | ========= 8 | 9 | The types ``concurrent_multimap::iterator`` and ``concurrent_multimap::const_iterator`` 10 | meet the requirements of ``ForwardIterator`` from the [forward.iterators] ISO C++ standard section. 11 | 12 | begin and cbegin 13 | ---------------- 14 | 15 | .. code:: cpp 16 | 17 | iterator begin(); 18 | 19 | const_iterator begin() const; 20 | 21 | const_iterator cbegin() const; 22 | 23 | **Returns**: an iterator to the first element in the container. 24 | 25 | end and cend 26 | ------------ 27 | 28 | .. code:: cpp 29 | 30 | iterator end(); 31 | 32 | const_iterator end() const; 33 | 34 | const_iterator cend() const; 35 | 36 | **Returns**: an iterator to the element that follows the last element in the container. 37 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/containers/concurrent_multimap_cls/non_member_binary_comparisons.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2021 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ============================= 6 | Non-member binary comparisons 7 | ============================= 8 | 9 | Two ``oneapi::tbb::concurrent_multimap`` objects are equal if they have the same number of elements 10 | and each element in one container is equal to the element in other container on the same position. 11 | 12 | .. code:: cpp 13 | 14 | template 15 | bool operator==( const concurrent_multimap& lhs, 16 | const concurrent_multimap& rhs ) 17 | 18 | **Returns**: ``true`` if ``lhs`` is equal to ``rhs``; ``false``, otherwise. 19 | 20 | ----------------------------------------------------- 21 | 22 | .. code:: cpp 23 | 24 | template 25 | bool operator!=( const concurrent_multimap& lhs, 26 | const concurrent_multimap& rhs ) 27 | 28 | **Returns**: ``true`` if ``lhs`` is not equal to ``rhs``; ``false``, otherwise. 29 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/containers/concurrent_multimap_cls/non_member_swap.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | =============== 6 | Non-member swap 7 | =============== 8 | 9 | .. code:: cpp 10 | 11 | template 12 | void swap( concurrent_multimap& lhs, 13 | concurrent_multimap& rhs ); 14 | 15 | Equivalent to ``lhs.swap(rhs)``. 16 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/containers/concurrent_multimap_cls/observers.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ========= 6 | Observers 7 | ========= 8 | 9 | get_allocator 10 | ------------- 11 | 12 | .. code:: cpp 13 | 14 | allocator_type get_allocator() const; 15 | 16 | **Returns**: a copy of the allocator associated with ``*this``. 17 | 18 | key_comp 19 | -------- 20 | 21 | .. code:: cpp 22 | 23 | key_compare key_comp() const; 24 | 25 | **Returns**: a copy of the key comparison functor associated with ``*this``. 26 | 27 | value_comp 28 | ---------- 29 | 30 | .. code:: cpp 31 | 32 | value_compare value_comp() const; 33 | 34 | **Returns**: an object of the ``value_compare`` class that is used to compare 35 | ``value_type`` objects. 36 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/containers/concurrent_multimap_cls/parallel_iteration.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ================== 6 | Parallel iteration 7 | ================== 8 | 9 | Member types ``concurrent_multimap::range_type`` and ``concurrent_multimap::const_range_type`` 10 | meet the :doc:`ContainerRange requirements <../../named_requirements/containers/container_range>`. 11 | 12 | These types differ only in that the bounds for a ``concurrent_multimap::const_range_type`` 13 | are of type ``concurrent_multimap::const_iterator``, whereas the bounds for a ``concurrent_multimap::range_type`` 14 | are of type ``concurrent_multimap::iterator``. 15 | 16 | range member function 17 | --------------------- 18 | 19 | .. code:: cpp 20 | 21 | range_type range(); 22 | 23 | const_range_type range() const; 24 | 25 | **Returns**: a range object representing all elements in the container. 26 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/containers/concurrent_multimap_cls/size_and_capacity.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ================= 6 | Size and capacity 7 | ================= 8 | 9 | empty 10 | ----- 11 | 12 | .. code:: cpp 13 | 14 | bool empty() const; 15 | 16 | **Returns**: ``true`` if the container is empty, ``false`` otherwise. 17 | 18 | The result may differ with the actual container state in case of pending concurrent insertions. 19 | 20 | size 21 | ---- 22 | 23 | .. code:: cpp 24 | 25 | size_type size() const; 26 | 27 | **Returns**: the number of elements in the container. 28 | 29 | The result may differ with the actual container size in case of pending concurrent insertions. 30 | 31 | max_size 32 | -------- 33 | 34 | .. code:: cpp 35 | 36 | size_type max_size() const; 37 | 38 | **Returns**: the maximum number of elements that container can hold. 39 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/containers/concurrent_multiset_cls/iterators.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ========= 6 | Iterators 7 | ========= 8 | 9 | The types ``concurrent_multiset::iterator`` and ``concurrent_multiset::const_iterator`` 10 | meet the requirements of ``ForwardIterator`` from the [forward.iterators] ISO C++ standard section. 11 | 12 | begin and cbegin 13 | ---------------- 14 | 15 | .. code:: cpp 16 | 17 | iterator begin(); 18 | 19 | const_iterator begin() const; 20 | 21 | const_iterator cbegin() const; 22 | 23 | **Returns**: an iterator to the first element in the container. 24 | 25 | end and cend 26 | ------------ 27 | 28 | .. code:: cpp 29 | 30 | iterator end(); 31 | 32 | const_iterator end() const; 33 | 34 | const_iterator cend() const; 35 | 36 | **Returns**: an iterator to the element that follows the last element in the container. 37 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/containers/concurrent_multiset_cls/non_member_binary_comparisons.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2021 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ============================= 6 | Non-member binary comparisons 7 | ============================= 8 | 9 | Two ``oneapi::tbb::concurrent_multiset`` objects are equal if they have the same number of elements 10 | and each element in one container is equal to the element in other container on the same position. 11 | 12 | .. code:: cpp 13 | 14 | template 15 | bool operator==( const concurrent_multiset& lhs, 16 | const concurrent_multiset& rhs ) 17 | 18 | **Returns**: ``true`` if ``lhs`` is equal to ``rhs``; ``false``, otherwise. 19 | 20 | ----------------------------------------------------- 21 | 22 | .. code:: cpp 23 | 24 | template 25 | bool operator!=( const concurrent_multiset& lhs, 26 | const concurrent_multiset& rhs ) 27 | 28 | **Returns**: ``true`` if ``lhs`` is not equal to ``rhs``; ``false``, otherwise. 29 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/containers/concurrent_multiset_cls/non_member_swap.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | =============== 6 | Non-member swap 7 | =============== 8 | 9 | .. code:: cpp 10 | 11 | template 12 | void swap( concurrent_multiset& lhs, 13 | concurrent_multiset& rhs ); 14 | 15 | Equivalent to ``lhs.swap(rhs)``. 16 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/containers/concurrent_multiset_cls/observers.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ========= 6 | Observers 7 | ========= 8 | 9 | get_allocator 10 | ------------- 11 | 12 | .. code:: cpp 13 | 14 | allocator_type get_allocator() const; 15 | 16 | **Returns**: a copy of the allocator associated with ``*this``. 17 | 18 | key_comp 19 | -------- 20 | 21 | .. code:: cpp 22 | 23 | key_compare key_comp() const; 24 | 25 | **Returns**: a copy of the key comparison functor associated with ``*this``. 26 | 27 | value_comp 28 | ---------- 29 | 30 | .. code:: cpp 31 | 32 | value_compare value_comp() const; 33 | 34 | **Returns**: an object of the ``value_compare`` class that is used to compare 35 | ``value_type`` objects. 36 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/containers/concurrent_multiset_cls/parallel_iteration.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ================== 6 | Parallel iteration 7 | ================== 8 | 9 | Member types ``concurrent_multiset::range_type`` and ``concurrent_multiset::const_range_type`` 10 | meet the :doc:`ContainerRange requirements <../../named_requirements/containers/container_range>`. 11 | 12 | These types differ only in that the bounds for a ``concurrent_multiset::const_range_type`` 13 | are of type ``concurrent_multiset::const_iterator``, whereas the bounds for a ``concurrent_multiset::range_type`` 14 | are of type ``concurrent_multiset::iterator``. 15 | 16 | range member function 17 | --------------------- 18 | 19 | .. code:: cpp 20 | 21 | range_type range(); 22 | 23 | const_range_type range() const; 24 | 25 | **Returns**: a range object representing all elements in the container. 26 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/containers/concurrent_multiset_cls/size_and_capacity.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ================= 6 | Size and capacity 7 | ================= 8 | 9 | empty 10 | ----- 11 | 12 | .. code:: cpp 13 | 14 | bool empty() const; 15 | 16 | **Returns**: ``true`` if the container is empty; ``false``, otherwise. 17 | 18 | The result may differ from the actual container state in case of pending concurrent insertions. 19 | 20 | size 21 | ---- 22 | 23 | .. code:: cpp 24 | 25 | size_type size() const; 26 | 27 | **Returns**: the number of elements in the container. 28 | 29 | The result may differ from the actual container size in case of pending concurrent insertions. 30 | 31 | max_size 32 | -------- 33 | 34 | .. code:: cpp 35 | 36 | size_type max_size() const; 37 | 38 | **Returns**: the maximum number of elements that container can hold. 39 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/containers/concurrent_priority_queue_cls/non_member_binary_comparisons.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ============================= 6 | Non-member binary comparisons 7 | ============================= 8 | 9 | .. code:: cpp 10 | 11 | template 12 | bool operator==( const concurrent_priority_queue& lhs, 13 | const concurrent_priority_queue& rhs ); 14 | 15 | Checks if ``lhs`` is equal to ``rhs``, that is they have the same number of elements and ``lhs`` 16 | contains all elements from ``rhs`` with the same priority. 17 | 18 | **Returns**: ``true`` if ``lhs`` is equal to ``rhs``; ``false``, otherwise. 19 | 20 | .. code:: cpp 21 | 22 | template 23 | bool operator!=( const concurrent_priority_queue& lhs, 24 | const concurrent_priority_queue& rhs ); 25 | 26 | Equivalent to ``!(lhs == rhs)``. 27 | 28 | **Returns**: ``true`` if ``lhs`` is not equal to ``rhs``; ``false``, otherwise. 29 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/containers/concurrent_priority_queue_cls/non_member_swap.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | =============== 6 | Non-member swap 7 | =============== 8 | 9 | .. code:: cpp 10 | 11 | template 12 | void swap( concurrent_priority_queue& lhs, 13 | concurrent_priority_queue& rhs ); 14 | 15 | Equivalent to ``lhs.swap(rhs)``. 16 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/containers/concurrent_priority_queue_cls/size_and_capacity.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ================= 6 | Size and capacity 7 | ================= 8 | 9 | empty 10 | ----- 11 | 12 | .. code:: cpp 13 | 14 | bool empty() const; 15 | 16 | **Returns**: ``true`` if the container is empty; ``false``, otherwise. 17 | 18 | The result may differ from the actual container state in case of pending concurrent ``push`` 19 | or ``try_pop`` operations. 20 | 21 | size 22 | ---- 23 | 24 | .. code:: cpp 25 | 26 | size_type size() const; 27 | 28 | **Returns**: the number of elements in the container. 29 | 30 | The result may differ from the actual number of elements in case of pending concurrent ``push`` 31 | or ``try_pop`` operations. 32 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/containers/concurrent_priority_queue_cls/unsafe_modifiers.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ============================= 6 | Concurrently unsafe modifiers 7 | ============================= 8 | 9 | All member functions in this section can only be performed serially. The behavior is undefined in 10 | case of concurrent execution of these methods with other (either concurrently safe) methods. 11 | 12 | clear 13 | ----- 14 | 15 | .. code:: cpp 16 | 17 | void clear(); 18 | 19 | Removes all elements from the container. 20 | 21 | swap 22 | ---- 23 | 24 | .. code:: cpp 25 | 26 | void swap( concurrent_priority_queue& other ); 27 | 28 | Swaps contents of ``*this`` and ``other``. 29 | 30 | Swaps allocators if ``std::allocator_traits::propagate_on_container_swap::value`` is ``true``. 31 | 32 | Otherwise if ``get_allocator() != other.get_allocator()`` the behavior is undefined. 33 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/containers/concurrent_queue_cls/iterators.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ========= 6 | Iterators 7 | ========= 8 | 9 | The types ``concurrent_queue::iterator`` and ``concurrent_queue::const_iterator`` 10 | meet the requirements of ``ForwardIterator`` from the [forward.iterators] ISO C++ Standard section. 11 | 12 | All member functions in this section can only be performed serially. The behavior is undefined in 13 | case of concurrent execution of these methods with other (either concurrently safe) methods. 14 | 15 | unsafe_begin and unsafe_cbegin 16 | ------------------------------ 17 | 18 | .. code:: cpp 19 | 20 | iterator unsafe_begin(); 21 | 22 | const_iterator unsafe_begin() const; 23 | 24 | const_iterator unsafe_cbegin() const; 25 | 26 | **Returns**: an iterator to the first element in the container. 27 | 28 | unsafe_end and unsafe_cend 29 | -------------------------- 30 | 31 | .. code:: cpp 32 | 33 | iterator unsafe_end(); 34 | 35 | const_iterator unsafe_end() const; 36 | 37 | const_iterator unsafe_cend() const; 38 | 39 | **Returns**: an iterator to the element that follows the last element in the container. 40 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/containers/concurrent_queue_cls/non_member_binary_comparisons.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ============================= 6 | Non-member binary comparisons 7 | ============================= 8 | 9 | .. code:: cpp 10 | 11 | template 12 | bool operator==( const concurrent_queue& lhs, 13 | const concurrent_queue& rhs ); 14 | 15 | Checks if ``lhs`` is equal to ``rhs``, that is they have the same number of elements and ``lhs`` 16 | contains all elements from ``rhs``. 17 | 18 | **Returns**: ``true`` if ``lhs`` is equal to ``rhs``; ``false``, otherwise. 19 | 20 | .. code:: cpp 21 | 22 | template 23 | bool operator!=( const concurrent_queue& lhs, 24 | const concurrent_queue& rhs ); 25 | 26 | Equivalent to ``!(lhs == rhs)``. 27 | 28 | **Returns**: ``true`` if ``lhs`` is not equal to ``rhs``; ``false``, otherwise. 29 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/containers/concurrent_queue_cls/non_member_swap.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | =============== 6 | Non-member swap 7 | =============== 8 | 9 | .. code:: cpp 10 | 11 | template 12 | void swap( concurrent_queue& lhs, 13 | concurrent_queue& rhs ); 14 | 15 | Equivalent to ``lhs.swap(rhs)``. 16 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/containers/concurrent_queue_cls/unsafe_member_functions.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ==================================== 6 | Concurrently unsafe member functions 7 | ==================================== 8 | 9 | All member functions in this section can only be performed serially. The behavior is undefined in 10 | case of concurrent execution of these methods with other (either concurrently safe) methods. 11 | 12 | The number of elements 13 | ---------------------- 14 | 15 | .. code:: cpp 16 | 17 | size_type unsafe_size() const; 18 | 19 | **Returns**: the number of elements in the container. 20 | 21 | ---------------------------- 22 | 23 | .. code:: cpp 24 | 25 | bool empty() const; 26 | 27 | **Returns**: ``true`` if the container is empty; ``false``, otherwise. 28 | 29 | clear 30 | ----- 31 | 32 | .. code:: cpp 33 | 34 | void clear(); 35 | 36 | Removes all elements from the container. 37 | 38 | swap 39 | ---- 40 | 41 | .. code:: cpp 42 | 43 | void swap( concurrent_queue& other ); 44 | 45 | Swaps contents of ``*this`` and ``other``. 46 | 47 | Swaps allocators if ``std::allocator_traits::propagate_on_container_swap::value`` is ``true``. 48 | 49 | Otherwise if ``get_allocator() != other.get_allocator()`` the behavior is undefined. -------------------------------------------------------------------------------- /source/elements/oneTBB/source/containers/concurrent_set_cls/iterators.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ========= 6 | Iterators 7 | ========= 8 | 9 | The types ``concurrent_set::iterator`` and ``concurrent_set::const_iterator`` 10 | meet the requirements of ``ForwardIterator`` from the [forward.iterators] ISO C++ standard section. 11 | 12 | begin and cbegin 13 | ---------------- 14 | 15 | .. code:: cpp 16 | 17 | iterator begin(); 18 | 19 | const_iterator begin() const; 20 | 21 | const_iterator cbegin() const; 22 | 23 | **Returns**: an iterator to the first element in the container. 24 | 25 | end and cend 26 | ------------ 27 | 28 | .. code:: cpp 29 | 30 | iterator end(); 31 | 32 | const_iterator end() const; 33 | 34 | const_iterator cend() const; 35 | 36 | **Returns**: an iterator to the element that follows the last element in the container. 37 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/containers/concurrent_set_cls/non_member_binary_comparisons.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2021 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ============================= 6 | Non-member binary comparisons 7 | ============================= 8 | 9 | Two ``oneapi::tbb::concurrent_set`` objects are equal if they have the same number of elements 10 | and each element in one container is equal to the element in other container on the same position. 11 | 12 | .. code:: cpp 13 | 14 | template 15 | bool operator==( const concurrent_set& lhs, 16 | const concurrent_set& rhs ) 17 | 18 | **Returns**: ``true`` if ``lhs`` is equal to ``rhs``; ``false``, otherwise. 19 | 20 | ----------------------------------------------------- 21 | 22 | .. code:: cpp 23 | 24 | template 25 | bool operator!=( const concurrent_set& lhs, 26 | const concurrent_set& rhs ) 27 | 28 | **Returns**: ``true`` if ``lhs`` is not equal to ``rhs``; ``false``, otherwise. 29 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/containers/concurrent_set_cls/non_member_swap.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | =============== 6 | Non-member swap 7 | =============== 8 | 9 | .. code:: cpp 10 | 11 | template 12 | void swap( concurrent_set& lhs, 13 | concurrent_set& rhs ); 14 | 15 | Equivalent to ``lhs.swap(rhs)``. 16 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/containers/concurrent_set_cls/observers.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ========= 6 | Observers 7 | ========= 8 | 9 | get_allocator 10 | ------------- 11 | 12 | .. code:: cpp 13 | 14 | allocator_type get_allocator() const; 15 | 16 | **Returns**: a copy of the allocator associated with ``*this``. 17 | 18 | key_comp 19 | -------- 20 | 21 | .. code:: cpp 22 | 23 | key_compare key_comp() const; 24 | 25 | **Returns**: a copy of the key comparison functor associated with ``*this``. 26 | 27 | value_comp 28 | ---------- 29 | 30 | .. code:: cpp 31 | 32 | value_compare value_comp() const; 33 | 34 | **Returns**: an object of the ``value_compare`` class that is used to compare 35 | ``value_type`` objects. 36 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/containers/concurrent_set_cls/parallel_iteration.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ================== 6 | Parallel iteration 7 | ================== 8 | 9 | Member types ``concurrent_set::range_type`` and ``concurrent_set::const_range_type`` 10 | meet the :doc:`ContainerRange requirements <../../named_requirements/containers/container_range>`. 11 | 12 | These types differ only in that the bounds for a ``concurrent_set::const_range_type`` 13 | are of type ``concurrent_set::const_iterator``, whereas the bounds for a ``concurrent_set::range_type`` 14 | are of type ``concurrent_set::iterator``. 15 | 16 | range member function 17 | --------------------- 18 | 19 | .. code:: cpp 20 | 21 | range_type range(); 22 | 23 | const_range_type range() const; 24 | 25 | **Returns**: a range object representing all elements in the container. 26 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/containers/concurrent_set_cls/size_and_capacity.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ================= 6 | Size and capacity 7 | ================= 8 | 9 | empty 10 | ----- 11 | 12 | .. code:: cpp 13 | 14 | bool empty() const; 15 | 16 | **Returns**: ``true`` if the container is empty; ``false``, otherwise. 17 | 18 | The result may differ from the actual container state in case of pending concurrent insertions. 19 | 20 | size 21 | ---- 22 | 23 | .. code:: cpp 24 | 25 | size_type size() const; 26 | 27 | **Returns**: the number of elements in the container. 28 | 29 | The result may differ from the actual container size in case of pending concurrent insertions. 30 | 31 | max_size 32 | -------- 33 | 34 | .. code:: cpp 35 | 36 | size_type max_size() const; 37 | 38 | **Returns**: the maximum number of elements that container can hold. 39 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/containers/concurrent_unordered_map_cls/iterators.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ========= 6 | Iterators 7 | ========= 8 | 9 | The types ``concurrent_unordered_map::iterator`` and ``concurrent_unordered_map::const_iterator`` 10 | meet the requirements of ``ForwardIterator`` from the [forward.iterators] ISO C++ Standard section. 11 | 12 | begin and cbegin 13 | ---------------- 14 | 15 | .. code:: cpp 16 | 17 | iterator begin(); 18 | 19 | const_iterator begin() const; 20 | 21 | const_iterator cbegin() const; 22 | 23 | **Returns**: an iterator to the first element in the container. 24 | 25 | end and cend 26 | ------------ 27 | 28 | .. code:: cpp 29 | 30 | iterator end(); 31 | 32 | const_iterator end() const; 33 | 34 | const_iterator cend() const; 35 | 36 | **Returns**: an iterator to the element that follows the last element in the container. 37 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/containers/concurrent_unordered_map_cls/non_member_swap.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | =============== 6 | Non-member swap 7 | =============== 8 | 9 | .. code:: cpp 10 | 11 | template 13 | void swap( concurrent_unordered_map& lhs, 14 | concurrent_unordered_map& rhs ) noexcept(noexcept(lhs.swap(rhs))); 15 | 16 | Equivalent to ``lhs.swap(rhs)``. 17 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/containers/concurrent_unordered_map_cls/observers.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ========= 6 | Observers 7 | ========= 8 | 9 | get_allocator 10 | ------------- 11 | 12 | .. code:: cpp 13 | 14 | allocator_type get_allocator() const; 15 | 16 | **Returns**: a copy of the allocator associated with ``*this``. 17 | 18 | hash_function 19 | ------------- 20 | 21 | .. code:: cpp 22 | 23 | hasher hash_function() const; 24 | 25 | **Returns**: a copy of the hash function associated with ``*this``. 26 | 27 | key_eq 28 | ------ 29 | 30 | .. code:: cpp 31 | 32 | key_equal key_eq() const; 33 | 34 | **Returns**: a copy of the key equality predicate associated with ``*this``. 35 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/containers/concurrent_unordered_map_cls/parallel_iteration.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ================== 6 | Parallel iteration 7 | ================== 8 | 9 | Member types ``concurrent_unordered_map::range_type`` and ``concurrent_unordered_map::const_range_type`` 10 | meet the :doc:`ContainerRange requirements <../../named_requirements/containers/container_range>`. 11 | 12 | These types differ only in that the bounds for a ``concurrent_unordered_map::const_range_type`` 13 | are of type ``concurrent_unordered_map::const_iterator``, whereas the bounds for a ``concurrent_unordered_map::range_type`` 14 | are of type ``concurrent_unordered_map::iterator``. 15 | 16 | range member function 17 | --------------------- 18 | 19 | .. code:: cpp 20 | 21 | range_type range(); 22 | 23 | const_range_type range() const; 24 | 25 | **Returns**: a range object representing all elements in the container. 26 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/containers/concurrent_unordered_map_cls/size_and_capacity.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ================= 6 | Size and capacity 7 | ================= 8 | 9 | empty 10 | ----- 11 | 12 | .. code:: cpp 13 | 14 | bool empty() const; 15 | 16 | **Returns**: ``true`` if the container is empty; ``false``, otherwise. 17 | 18 | The result may differ from the actual container state in case of pending concurrent insertions. 19 | 20 | size 21 | ---- 22 | 23 | .. code:: cpp 24 | 25 | size_type size() const; 26 | 27 | **Returns**: the number of elements in the container. 28 | 29 | The result may differ from the actual container size in case of pending concurrent insertions. 30 | 31 | max_size 32 | -------- 33 | 34 | .. code:: cpp 35 | 36 | size_type max_size() const; 37 | 38 | **Returns**: the maximum number of elements that container can hold. 39 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/containers/concurrent_unordered_multimap_cls/iterators.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ========= 6 | Iterators 7 | ========= 8 | 9 | The types ``concurrent_unordered_multimap::iterator`` and ``concurrent_unordered_multimap::const_iterator`` 10 | meet the requirements of ``ForwardIterator`` from the [forward.iterators] ISO C++ Standard section. 11 | 12 | begin and cbegin 13 | ---------------- 14 | 15 | .. code:: cpp 16 | 17 | iterator begin(); 18 | 19 | const_iterator begin() const; 20 | 21 | const_iterator cbegin() const; 22 | 23 | **Returns**: an iterator to the first element in the container. 24 | 25 | end and cend 26 | ------------ 27 | 28 | .. code:: cpp 29 | 30 | iterator end(); 31 | 32 | const_iterator end() const; 33 | 34 | const_iterator cend() const; 35 | 36 | **Returns**: an iterator to the element that follows the last element in the container. 37 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/containers/concurrent_unordered_multimap_cls/non_member_swap.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | =============== 6 | Non-member swap 7 | =============== 8 | 9 | .. code:: cpp 10 | 11 | template 13 | void swap( concurrent_unordered_multimap& lhs, 14 | concurrent_unordered_multimap& rhs ) noexcept(noexcept(lhs.swap(rhs))); 15 | 16 | Equivalent to ``lhs.swap(rhs)``. 17 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/containers/concurrent_unordered_multimap_cls/observers.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ========= 6 | Observers 7 | ========= 8 | 9 | get_allocator 10 | ------------- 11 | 12 | .. code:: cpp 13 | 14 | allocator_type get_allocator() const; 15 | 16 | **Returns**: a copy of the allocator associated with ``*this``. 17 | 18 | hash_function 19 | ------------- 20 | 21 | .. code:: cpp 22 | 23 | hasher hash_function() const; 24 | 25 | **Returns**: a copy of the hash function associated with ``*this``. 26 | 27 | key_eq 28 | ------ 29 | 30 | .. code:: cpp 31 | 32 | key_equal key_eq() const; 33 | 34 | **Returns**: a copy of the key equality predicate associated with ``*this``. 35 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/containers/concurrent_unordered_multimap_cls/parallel_iteration.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ================== 6 | Parallel iteration 7 | ================== 8 | 9 | Member types ``concurrent_unordered_multimap::range_type`` and ``concurrent_unordered_multimap::const_range_type`` 10 | meet the :doc:`ContainerRange requirements <../../named_requirements/containers/container_range>`. 11 | 12 | These types differ only in that the bounds for a ``concurrent_unordered_multimap::const_range_type`` 13 | are of type ``concurrent_unordered_multimap::const_iterator``, whereas the bounds for a ``concurrent_unordered_multimap::range_type`` 14 | are of type ``concurrent_unordered_multimap::iterator``. 15 | 16 | range member function 17 | --------------------- 18 | 19 | .. code:: cpp 20 | 21 | range_type range(); 22 | 23 | const_range_type range() const; 24 | 25 | **Returns**: a range object representing all elements in the container. 26 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/containers/concurrent_unordered_multimap_cls/size_and_capacity.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ================= 6 | Size and capacity 7 | ================= 8 | 9 | empty 10 | ----- 11 | 12 | .. code:: cpp 13 | 14 | bool empty() const; 15 | 16 | **Returns**: ``true`` if the container is empty; ``false``, otherwise. 17 | 18 | The result may differ from the actual container state in case of pending concurrent insertions. 19 | 20 | size 21 | ---- 22 | 23 | .. code:: cpp 24 | 25 | size_type size() const; 26 | 27 | **Returns**: the number of elements in the container. 28 | 29 | The result may differ from the actual container size in case of pending concurrent insertions. 30 | 31 | max_size 32 | -------- 33 | 34 | .. code:: cpp 35 | 36 | size_type max_size() const; 37 | 38 | **Returns**: the maximum number of elements that container can hold. 39 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/containers/concurrent_unordered_multiset_cls/iterators.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ========= 6 | Iterators 7 | ========= 8 | 9 | The types ``concurrent_unordered_multiset::iterator`` and ``concurrent_unordered_multiset::const_iterator`` 10 | meet the requirements of ``ForwardIterator`` from the [forward.iterators] ISO C++ Standard section. 11 | 12 | begin and cbegin 13 | ---------------- 14 | 15 | .. code:: cpp 16 | 17 | iterator begin(); 18 | 19 | const_iterator begin() const; 20 | 21 | const_iterator cbegin() const; 22 | 23 | **Returns**: an iterator to the first element in the container. 24 | 25 | end and cend 26 | ------------ 27 | 28 | .. code:: cpp 29 | 30 | iterator end(); 31 | 32 | const_iterator end() const; 33 | 34 | const_iterator cend() const; 35 | 36 | **Returns**: an iterator to the element that follows the last element in the container. 37 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/containers/concurrent_unordered_multiset_cls/non_member_swap.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | =============== 6 | Non-member swap 7 | =============== 8 | 9 | .. code:: cpp 10 | 11 | template 13 | void swap( concurrent_unordered_multiset& lhs, 14 | concurrent_unordered_multiset& rhs ) noexcept(noexcept(lhs.swap(rhs))); 15 | 16 | Equivalent to ``lhs.swap(rhs)``. 17 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/containers/concurrent_unordered_multiset_cls/observers.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ========= 6 | Observers 7 | ========= 8 | 9 | get_allocator 10 | ------------- 11 | 12 | .. code:: cpp 13 | 14 | allocator_type get_allocator() const; 15 | 16 | **Returns**: a copy of the allocator associated with ``*this``. 17 | 18 | hash_function 19 | ------------- 20 | 21 | .. code:: cpp 22 | 23 | hasher hash_function() const; 24 | 25 | **Returns**: a copy of the hash function associated with ``*this``. 26 | 27 | key_eq 28 | ------ 29 | 30 | .. code:: cpp 31 | 32 | key_equal key_eq() const; 33 | 34 | **Returns**: a copy of the key equality predicate associated with ``*this``. 35 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/containers/concurrent_unordered_multiset_cls/parallel_iteration.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ================== 6 | Parallel iteration 7 | ================== 8 | 9 | Member types ``concurrent_unordered_multiset::range_type`` and ``concurrent_unordered_multiset::const_range_type`` 10 | meet the :doc:`ContainerRange requirements <../../named_requirements/containers/container_range>`. 11 | 12 | These types differ only in that the bounds for a ``concurrent_unordered_multiset::const_range_type`` 13 | are of type ``concurrent_unordered_multiset::const_iterator``, whereas the bounds for a ``concurrent_unordered_multiset::range_type`` 14 | are of type ``concurrent_unordered_multiset::iterator``. 15 | 16 | range member function 17 | --------------------- 18 | 19 | .. code:: cpp 20 | 21 | range_type range(); 22 | 23 | const_range_type range() const; 24 | 25 | **Returns**: a range object representing all elements in the container. 26 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/containers/concurrent_unordered_multiset_cls/size_and_capacity.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ================= 6 | Size and capacity 7 | ================= 8 | 9 | empty 10 | ----- 11 | 12 | .. code:: cpp 13 | 14 | bool empty() const; 15 | 16 | **Returns**: ``true`` if the container is empty; ``false``, otherwise. 17 | 18 | The result may differ with the actual container state in case of pending concurrent insertions. 19 | 20 | size 21 | ---- 22 | 23 | .. code:: cpp 24 | 25 | size_type size() const; 26 | 27 | **Returns**: the number of elements in the container. 28 | 29 | The result may differ with the actual container size in case of pending concurrent insertions. 30 | 31 | max_size 32 | -------- 33 | 34 | .. code:: cpp 35 | 36 | size_type max_size() const; 37 | 38 | **Returns**: the maximum number of elements that container can hold. 39 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/containers/concurrent_unordered_set_cls/iterators.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ========= 6 | Iterators 7 | ========= 8 | 9 | The types ``concurrent_unordered_set::iterator`` and ``concurrent_unordered_set::const_iterator`` 10 | meet the requirements of ``ForwardIterator`` from the [forward.iterators] ISO C++ Standard section. 11 | 12 | begin and cbegin 13 | ---------------- 14 | 15 | .. code:: cpp 16 | 17 | iterator begin(); 18 | 19 | const_iterator begin() const; 20 | 21 | const_iterator cbegin() const; 22 | 23 | **Returns**: an iterator to the first element in the container. 24 | 25 | end and cend 26 | ------------ 27 | 28 | .. code:: cpp 29 | 30 | iterator end(); 31 | 32 | const_iterator end() const; 33 | 34 | const_iterator cend() const; 35 | 36 | **Returns**: an iterator to the element that follows the last element in the container. 37 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/containers/concurrent_unordered_set_cls/non_member_swap.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | =============== 6 | Non-member swap 7 | =============== 8 | 9 | .. code:: cpp 10 | 11 | template 13 | void swap( concurrent_unordered_set& lhs, 14 | concurrent_unordered_set& rhs ) noexcept(noexcept(lhs.swap(rhs))); 15 | 16 | Equivalent to ``lhs.swap(rhs)``. 17 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/containers/concurrent_unordered_set_cls/observers.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ========= 6 | Observers 7 | ========= 8 | 9 | get_allocator 10 | ------------- 11 | 12 | .. code:: cpp 13 | 14 | allocator_type get_allocator() const; 15 | 16 | **Returns**: a copy of the allocator associated with ``*this``. 17 | 18 | hash_function 19 | ------------- 20 | 21 | .. code:: cpp 22 | 23 | hasher hash_function() const; 24 | 25 | **Returns**: a copy of the hash function associated with ``*this``. 26 | 27 | key_eq 28 | ------ 29 | 30 | .. code:: cpp 31 | 32 | key_equal key_eq() const; 33 | 34 | **Returns**: a copy of the key equality predicate associated with ``*this``. 35 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/containers/concurrent_unordered_set_cls/parallel_iteration.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ================== 6 | Parallel iteration 7 | ================== 8 | 9 | Member types ``concurrent_unordered_set::range_type`` and ``concurrent_unordered_set::const_range_type`` 10 | meet the :doc:`ContainerRange requirements <../../named_requirements/containers/container_range>`. 11 | 12 | These types differ only in that the bounds for a ``concurrent_unordered_set::const_range_type`` 13 | are of type ``concurrent_unordered_set::const_iterator``, whereas the bounds for a ``concurrent_unordered_set::range_type`` 14 | are of type ``concurrent_unordered_set::iterator``. 15 | 16 | range member function 17 | --------------------- 18 | 19 | .. code:: cpp 20 | 21 | range_type range(); 22 | 23 | const_range_type range() const; 24 | 25 | **Returns**: a range object representing all elements in the container. 26 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/containers/concurrent_unordered_set_cls/size_and_capacity.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ================= 6 | Size and capacity 7 | ================= 8 | 9 | empty 10 | ----- 11 | 12 | .. code:: cpp 13 | 14 | bool empty() const; 15 | 16 | **Returns**: ``true`` if the container is empty; ``false``, otherwise. 17 | 18 | The result may differ from the actual container state in case of pending concurrent insertions. 19 | 20 | size 21 | ---- 22 | 23 | .. code:: cpp 24 | 25 | size_type size() const; 26 | 27 | **Returns**: the number of elements in the container. 28 | 29 | The result may differ from the actual container size in case of pending concurrent insertions. 30 | 31 | max_size 32 | -------- 33 | 34 | .. code:: cpp 35 | 36 | size_type max_size() const; 37 | 38 | **Returns**: the maximum number of elements that container can hold. 39 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/containers/concurrent_vector_cls/non_member_binary_comparisons.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ============================= 6 | Non-member binary comparisons 7 | ============================= 8 | 9 | Two objects of ``concurrent_vector`` are equal if: 10 | 11 | * they contains an equal number of elements. 12 | * the elements on the same positions are equal. 13 | 14 | .. code:: cpp 15 | 16 | template 17 | bool operator==( const concurrent_vector& lhs, 18 | const concurrent_vector& rhs ); 19 | 20 | **Returns**: ``true`` if ``lhs`` is equal to ``rhs``, ``false`` otherwise. 21 | 22 | --------------------------------------------- 23 | 24 | .. code:: cpp 25 | 26 | template 27 | bool operator!=( const concurrent_vector& lhs, 28 | const concurrent_vector& rhs ); 29 | 30 | **Returns**: ``true`` if ``lhs`` is not equal to ``rhs``, ``false`` otherwise. 31 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/containers/concurrent_vector_cls/non_member_swap.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | =============== 6 | Non-member swap 7 | =============== 8 | 9 | .. code:: cpp 10 | 11 | template 12 | void swap( concurrent_vector& lhs, 13 | concurrent_vector& rhs ); 14 | 15 | Equivalent to ``lhs.swap(rhs)``. -------------------------------------------------------------------------------- /source/elements/oneTBB/source/containers/concurrent_vector_cls/parallel_iteration.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ================== 6 | Parallel iteration 7 | ================== 8 | 9 | Member types ``concurrent_vector::range_type`` and ``concurrent_vector::const_range_type`` 10 | meet the :doc:`ContainerRange requirements <../../named_requirements/containers/container_range>`. 11 | 12 | These types differ only in that the bounds for a ``concurrent_vector::const_range_type`` 13 | are of type ``concurrent_vector::const_iterator``, whereas the bounds for a ``concurrent_vector::range_type`` 14 | are of type ``concurrent_vector::iterator``. 15 | 16 | range member function 17 | --------------------- 18 | 19 | .. code:: cpp 20 | 21 | range_type range( size_type grainsize = 1 ); 22 | 23 | const_range_type range( size_type grainsize = 1 ) const; 24 | 25 | **Returns**: a range object representing all elements in the container. 26 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/containers/concurrent_vector_cls/size_and_capacity.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ================= 6 | Size and capacity 7 | ================= 8 | 9 | size 10 | ---- 11 | 12 | .. code:: cpp 13 | 14 | size_type size() const noexcept; 15 | 16 | **Returns**: the number of elements in the vector. 17 | 18 | empty 19 | ----- 20 | 21 | .. code:: cpp 22 | 23 | bool empty() const noexcept; 24 | 25 | **Returns**: ``true`` if the vector is empty; ``false``, otherwise. 26 | 27 | max_size 28 | -------- 29 | 30 | .. code:: cpp 31 | 32 | size_type max_size() const noexcept; 33 | 34 | **Returns**: the maximum number of elements that the vector can hold. 35 | 36 | capacity 37 | -------- 38 | 39 | .. code:: cpp 40 | 41 | size_type capacity() const noexcept; 42 | 43 | **Returns**: the maximum number of elements that the vector 44 | can hold without allocating more memory. 45 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/containers/examples/node_handles.cpp: -------------------------------------------------------------------------------- 1 | #include "oneapi/tbb/concurrent_unordered_map.h" 2 | 3 | int main() { 4 | using Map = oneapi::tbb::concurrent_unordered_map; 5 | Map map = {{1, 1}, {2, 2}, {3, 3}}; 6 | 7 | // Extract an element from the container 8 | Map::node_type nh = map.unsafe_extract(2); 9 | 10 | // Change key/value of handled element 11 | nh.key() = 7; 12 | nh.mapped() = 9; 13 | 14 | // Insert an element to the new container 15 | Map map2; 16 | map2.insert(std::move(nh)); 17 | } 18 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/flow_graph/continue_msg_cls.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2021 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ============ 6 | continue_msg 7 | ============ 8 | **[flow_graph.continue_msg]** 9 | 10 | An empty class that represents a continue message. An object of this class is used to indicate that 11 | the sender has completed. 12 | 13 | .. code:: cpp 14 | 15 | // Defined in header 16 | 17 | namespace oneapi { 18 | namespace tbb { 19 | namespace flow { 20 | 21 | class continue_msg {}; 22 | 23 | } // namespace flow 24 | } // namespace tbb 25 | } // namespace oneapi 26 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/flow_graph/copy_body_func.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2021 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ========= 6 | copy_body 7 | ========= 8 | **[flow_graph.copy_body]** 9 | 10 | ``copy_body`` is a function template that returns a copy of the body function object from the following 11 | nodes: 12 | 13 | * :doc:`continue_node ` 14 | * :doc:`function_node ` 15 | * :doc:`multifunction_node ` 16 | * :doc:`input_node ` 17 | * :doc:`async_node ` 18 | 19 | .. code:: cpp 20 | 21 | namespace oneapi { 22 | namespace tbb { 23 | namespace flow { 24 | 25 | // Defined in header 26 | 27 | template< typename Body, typename Node > 28 | Body copy_body( Node &n ); 29 | 30 | } // namespace flow 31 | } // namespace tbb 32 | } // namespace oneapi 33 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/flow_graph/examples/dependency_flow_graph.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "oneapi/tbb/flow_graph.h" 3 | 4 | using namespace oneapi::tbb::flow; 5 | 6 | struct body { 7 | std::string my_name; 8 | body(const char *name) : my_name(name) {} 9 | void operator()(continue_msg) const { 10 | printf("%s\n", my_name.c_str()); 11 | } 12 | }; 13 | 14 | int main() { 15 | graph g; 16 | 17 | broadcast_node< continue_msg > start(g); 18 | continue_node a(g, body("A")); 19 | continue_node b(g, body("B")); 20 | continue_node c(g, body("C")); 21 | continue_node d(g, body("D")); 22 | continue_node e(g, body("E")); 23 | 24 | make_edge(start, a); 25 | make_edge(start, b); 26 | make_edge(a, c); 27 | make_edge(b, c); 28 | make_edge(c, d); 29 | make_edge(a, e); 30 | 31 | for (int i = 0; i < 3; ++i) { 32 | start.try_put(continue_msg()); 33 | g.wait_for_all(); 34 | } 35 | 36 | return 0; 37 | } 38 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/flow_graph/examples/lightweight_policy.cpp: -------------------------------------------------------------------------------- 1 | #include "oneapi/tbb/flow_graph.h" 2 | 3 | int main() { 4 | using namespace oneapi::tbb::flow; 5 | 6 | graph g; 7 | 8 | function_node< int, int > add( g, unlimited, [](const int &v) { 9 | return v+1; 10 | } ); 11 | function_node< int, int, lightweight > multiply( g, unlimited, [](const int &v) noexcept { 12 | return v*2; 13 | } ); 14 | function_node< int, int, lightweight > cube( g, unlimited, [](const int &v) noexcept { 15 | return v*v*v; 16 | } ); 17 | 18 | make_edge(add, multiply); 19 | make_edge(multiply, cube); 20 | 21 | for(int i = 1; i <= 10; ++i) 22 | add.try_put(i); 23 | g.wait_for_all(); 24 | 25 | return 0; 26 | } 27 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/flow_graph/examples/sequencer_node_cls.cpp: -------------------------------------------------------------------------------- 1 | #include "oneapi/tbb/flow_graph.h" 2 | 3 | struct Message { 4 | int id; 5 | int data; 6 | }; 7 | 8 | int main() { 9 | oneapi::tbb::flow::graph g; 10 | 11 | // Due to parallelism the node can push messages to its successors in any order 12 | oneapi::tbb::flow::function_node< Message, Message > process(g, oneapi::tbb::flow::unlimited, [] (Message msg) -> Message { 13 | msg.data++; 14 | return msg; 15 | }); 16 | 17 | oneapi::tbb::flow::sequencer_node< Message > ordering(g, [](const Message& msg) -> int { 18 | return msg.id; 19 | }); 20 | 21 | oneapi::tbb::flow::function_node< Message > writer(g, oneapi::tbb::flow::serial, [] (const Message& msg) { 22 | printf("Message recieved with id: %d\n", msg.id); 23 | }); 24 | 25 | oneapi::tbb::flow::make_edge(process, ordering); 26 | oneapi::tbb::flow::make_edge(ordering, writer); 27 | 28 | for (int i = 0; i < 100; ++i) { 29 | Message msg = { i, 0 }; 30 | process.try_put(msg); 31 | } 32 | 33 | g.wait_for_all(); 34 | } 35 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/flow_graph/graph_node_cls.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2021 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ========== 6 | graph_node 7 | ========== 8 | **[flow_graph.graph_node]** 9 | 10 | A base class for all graph nodes. 11 | 12 | .. code:: cpp 13 | 14 | namespace oneapi { 15 | namespace tbb { 16 | namespace flow { 17 | 18 | class graph_node { 19 | public: 20 | explicit graph_node( graph &g ); 21 | virtual ~graph_node(); 22 | }; 23 | 24 | } // namespace flow 25 | } // namespace tbb 26 | } // namespace oneapi 27 | 28 | The ``graph_node`` class is a base class for all flow graph nodes. 29 | The virtual destructor allows flow graph nodes to be destroyed through pointers to ``graph_node``. 30 | For example, a ``vector< graph_node * >`` can be used to hold the addresses of flow graph nodes 31 | that will need to be destroyed later. 32 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/flow_graph/input_port_func.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2021 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ========== 6 | input_port 7 | ========== 8 | **[flow_graph.input_port]** 9 | 10 | A template function that returns a reference to a specific input port of a given 11 | ``join_node``, ``indexer_node`` or ``composite_node``. 12 | 13 | .. code:: cpp 14 | 15 | // Defined in header 16 | 17 | namespace oneapi { 18 | namespace tbb { 19 | namespace flow { 20 | 21 | template 22 | /*implementation-defined*/& input_port(NodeType &n); 23 | 24 | } // namespace flow 25 | } // namespace tbb 26 | } // namespace oneapi 27 | 28 | See also: 29 | 30 | * :doc:`join_node template class ` 31 | * :doc:`indexer_node template class ` 32 | * :doc:`composite_node template class ` 33 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/flow_graph/output_port_func.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2021 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | =========== 6 | output_port 7 | =========== 8 | **[flow_graph.output_port]** 9 | 10 | A template function that returns a reference to a specific output port of a given 11 | ``split_node``, ``indexer_node``, or ``composite_node``. 12 | 13 | .. code:: cpp 14 | 15 | // Defined in header 16 | 17 | namespace oneapi { 18 | namespace tbb { 19 | namespace flow { 20 | 21 | template 22 | /*implementation-defined*/& output_port(NodeType &n); 23 | 24 | } // namespace flow 25 | } // namespace tbb 26 | } // namespace oneapi 27 | 28 | See also: 29 | 30 | * :doc:`split_node Template Class ` 31 | * :doc:`multifunction_node Template Class ` 32 | * :doc:`composite_node Template Class ` 33 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/flow_graph/predefined_concurrency_limits.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ============================= 6 | Predefined Concurrency Limits 7 | ============================= 8 | **[flow_graph.concurrency_limits]** 9 | 10 | Predefined constants that can be used as ``function_node``, ``multifunction_node``, and ``async_node`` 11 | constructors arguments to define concurrency limit. 12 | 13 | .. code:: cpp 14 | 15 | // Defined in header 16 | 17 | namespace oneapi { 18 | namespace tbb { 19 | namespace flow { 20 | 21 | std::size_t unlimited = /*implementation-defined*/; 22 | std::size_t serial = /*implementation-defined*/; 23 | 24 | } // namespace flow 25 | } // namespace tbb 26 | } // namespace oneapi 27 | 28 | ``unlimited`` concurrency allows an unlimited number of invocations of the body to execute concurrently. 29 | 30 | ``serial`` concurrency allows only a single call of body to execute concurrently. 31 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/flow_graph/receiver.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2021 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ======== 6 | receiver 7 | ======== 8 | **[flow_graph.receiver]** 9 | 10 | A base class for all nodes that may receive messages. 11 | 12 | .. code:: cpp 13 | 14 | namespace oneapi { 15 | namespace tbb { 16 | namespace flow { 17 | 18 | template< typename T > 19 | class receiver { /*unspecified*/ }; 20 | 21 | } // namespace flow 22 | } // namespace tbb 23 | } // namespace oneapi 24 | 25 | The ``T`` type is a message type. 26 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/flow_graph/sender.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2021 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ====== 6 | sender 7 | ====== 8 | **[flow_graph.sender]** 9 | 10 | A base class for all nodes that may send messages. 11 | 12 | .. code:: cpp 13 | 14 | namespace oneapi { 15 | namespace tbb { 16 | namespace flow { 17 | 18 | template< typename T > 19 | class sender { /*unspecified*/ }; 20 | 21 | } // namespace flow 22 | } // namespace tbb 23 | } // namespace oneapi 24 | 25 | The ``T`` type is a message type. 26 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/identifiers.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | =========== 6 | Identifiers 7 | =========== 8 | **[identifiers]** 9 | 10 | This section describes the identifier conventions used by oneTBB. 11 | 12 | Case 13 | ---- 14 | 15 | The identifier convention in the library follows the style of the ISO C++ standard library. Identifiers are written in underscore_style, and concepts - in PascalCase. 16 | 17 | Reserved Identifier Prefixes 18 | ---------------------------- 19 | 20 | The library reserves the ``__TBB`` prefix for internal identifiers and macros that should never be directly referenced by your code. 21 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/index.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2021 Intel Corporation 2 | .. SPDX-FileCopyrightText: Contributors to the oneAPI Specification project. 3 | .. 4 | .. SPDX-License-Identifier: CC-BY-4.0 5 | 6 | ============================================== 7 | oneAPI Threading Building Blocks Specification 8 | ============================================== 9 | **[spec.version]** 10 | 11 | **Version**: |tbb_version|. 12 | 13 | .. toctree:: 14 | :maxdepth: 2 15 | :caption: General Information: 16 | 17 | intro.rst 18 | notation.rst 19 | identifiers.rst 20 | named_requirements.rst 21 | thread_safety.rst 22 | 23 | .. toctree:: 24 | :maxdepth: 2 25 | :caption: oneTBB Interfaces: 26 | 27 | configuration.rst 28 | algorithms.rst 29 | flow_graph.rst 30 | task_scheduler.rst 31 | containers.rst 32 | thread_local_storage.rst 33 | 34 | .. toctree:: 35 | :maxdepth: 2 36 | :caption: oneTBB Auxiliary Interfaces: 37 | 38 | memory_allocation.rst 39 | mutual_exclusion.rst 40 | timing.rst 41 | info_namespace.rst 42 | 43 | .. toctree:: 44 | :maxdepth: 2 45 | :caption: oneTBB Deprecated Interfaces: 46 | 47 | deprecated/task_arena_attach_tag.rst 48 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/memory_allocation/scalable_memory_resource_func.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2021 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ======================== 6 | scalable_memory_resource 7 | ======================== 8 | **[memory_allocation.scalable_memory_resource]** 9 | 10 | A ``oneapi::tbb::scalable_memory_resource()`` is a function that returns a memory resource for scalable memory allocation. 11 | 12 | The ``scalable_memory_resource()`` function returns the pointer to the memory resource managed by the oneTBB scalable memory allocator. 13 | In particular, its ``allocate`` method uses ``scalable_aligned_malloc()``, and ``deallocate`` uses ``scalable_free()``. 14 | The memory resources returned by this function compare equal. 15 | 16 | ``std::pmr::polymorphic_allocator`` instantiated with ``oneapi::tbb::scalable_memory_resource()`` behaves like ``oneapi::tbb::scalable_allocator``. 17 | 18 | .. code:: cpp 19 | 20 | // Defined in header 21 | 22 | std::pmr::memory_resource* scalable_memory_resource(); 23 | 24 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/mutual_exclusion.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2021 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ================ 6 | Mutual Exclusion 7 | ================ 8 | **[mutex]** 9 | 10 | The library provides a set of mutual exclusion primitives to simplify writing race-free code. 11 | A mutex object facilitates protection against data races and provides safe synchronization of data between threads. 12 | 13 | Mutex Classes 14 | ------------- 15 | 16 | .. toctree:: 17 | :titlesonly: 18 | 19 | mutual_exclusion/mutex_cls.rst 20 | mutual_exclusion/rw_mutex_cls.rst 21 | mutual_exclusion/spin_mutex_cls.rst 22 | mutual_exclusion/spin_rw_mutex_cls.rst 23 | mutual_exclusion/speculative_spin_mutex_cls.rst 24 | mutual_exclusion/speculative_spin_rw_mutex_cls.rst 25 | mutual_exclusion/queuing_mutex_cls.rst 26 | mutual_exclusion/queuing_rw_mutex_cls.rst 27 | mutual_exclusion/null_mutex_cls.rst 28 | mutual_exclusion/null_rw_mutex_cls.rst 29 | 30 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/named_requirements/algorithms/container_based_sequence.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ====================== 6 | ContainerBasedSequence 7 | ====================== 8 | **[req.container_based_sequence]** 9 | 10 | A type `C` satisfies `ContainerBasedSequence` if it meets the following requirements: 11 | 12 | ---------------------------------------------------------------- 13 | 14 | **ContainerBasedSequence Requirements: Pseudo-Signature, Semantics** 15 | 16 | .. note:: 17 | 18 | In this page ``c`` is an object of type (possibly ``const``) ``C``. 19 | 20 | Templates that use the named requirement can impose stricter requirements on the iterator concept. 21 | 22 | .. cpp:function:: std::begin(c) 23 | 24 | Returns an input iterator to the beginning of the sequence represented by ``c``. 25 | 26 | .. cpp:function:: std::end(c) 27 | 28 | Returns an input iterator one past the end of the sequence represented by ``c``. 29 | 30 | See also: 31 | 32 | * :doc:`parallel_for_each algorithm <../../algorithms/functions/parallel_for_each_func>` 33 | * :doc:`parallel_sort algorithm <../../algorithms/functions/parallel_sort_func>` 34 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/named_requirements/algorithms/par_for_body.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | =============== 6 | ParallelForBody 7 | =============== 8 | **[req.parallel_for_body]** 9 | 10 | A type `Body` satisfies `ParallelForBody` if it meets the following requirements: 11 | 12 | ---------------------------------------------------------------------- 13 | 14 | **ParallelForBody Requirements: Pseudo-Signature, Semantics** 15 | 16 | .. cpp:function:: Body::Body( const Body& ) 17 | 18 | Copy constructor. 19 | 20 | .. cpp:function:: Body::~Body() 21 | 22 | Destructor. 23 | 24 | .. cpp:function:: void Body::operator()( Range& range ) const 25 | 26 | Applies body to a range. ``Range`` type must meet the :doc:`Range requirements `. 27 | 28 | See also: 29 | 30 | * :doc:`parallel_for algorithm <../../algorithms/functions/parallel_for_func>` 31 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/named_requirements/algorithms/par_for_func.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ================ 6 | ParallelForFunc 7 | ================ 8 | **[req.parallel_for_func]** 9 | 10 | A type `F` satisfies `ParallelForFunc` if it meets the following requirements: 11 | 12 | -------------------------------------------------------------------------------- 13 | 14 | **ParallelForFunc Requirements: Pseudo-Signature, Semantics** 15 | 16 | .. cpp:function:: void F::operator()(Index index) const 17 | 18 | Applies the function to the index. ``Index`` type must be the same as corresponding template parameter of the :doc:`parallel_for algorithm <../../algorithms/functions/parallel_for_func>`. 19 | 20 | See also: 21 | 22 | * :doc:`parallel_for algorithm <../../algorithms/functions/parallel_for_func>` 23 | * :doc:`ParallelForIndex named requirement ` 24 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/named_requirements/algorithms/par_reduce_body.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ================== 6 | ParallelReduceBody 7 | ================== 8 | **[req.parallel_reduce_body]** 9 | 10 | A type `Body` satisfies `ParallelReduceBody` if it meets the following requirements: 11 | 12 | ----------------------------------------------------------------------------------------------------- 13 | 14 | **ParallelReduceBody Requirements: Pseudo-Signature, Semantics** 15 | 16 | .. namespace:: ParallelReduceBody 17 | 18 | .. cpp:function:: Body::Body( Body&, split ) 19 | 20 | Splitting constructor. Must be able to run concurrently with ``operator()`` and method ``join``. 21 | 22 | .. cpp:function:: Body::~Body() 23 | 24 | Destructor. 25 | 26 | .. cpp:function:: void Body::operator()(const Range& range) 27 | 28 | Accumulates result for a subrange. ``Range`` type must meet the :doc:`Range requirements `. 29 | 30 | .. cpp:function:: void Body::join( Body& rhs ) 31 | 32 | Joins results. The result in rhs should be merged into the result of ``this``. 33 | 34 | See also: 35 | 36 | * :doc:`parallel_reduce algorithm <../../algorithms/functions/parallel_reduce_func>` 37 | * :doc:`parallel_determinstic_reduce algorithm <../../algorithms/functions/parallel_deterministic_reduce_func>` 38 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/named_requirements/algorithms/par_reduce_func.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ================== 6 | ParallelReduceFunc 7 | ================== 8 | **[req.parallel_reduce_body]** 9 | 10 | A type `Func` satisfies `ParallelReduceFunc` if it meets the following requirements: 11 | 12 | ----------------------------------------------------------------------------------------------------- 13 | 14 | **ParallelReduceFunc Requirements: Pseudo-Signature, Semantics** 15 | 16 | .. cpp:function:: Value Func::operator()(const Range& range, const Value& x) const 17 | 18 | Accumulates result for a subrange, starting with initial value ``x``. 19 | ``Range`` type must meet the :doc:`Range requirements `. 20 | ``Value`` type must be the same as a corresponding template parameter for the 21 | :doc:`parallel_reduce algorithm <../../algorithms/functions/parallel_reduce_func>` algorithm. 22 | 23 | See also: 24 | 25 | * :doc:`parallel_reduce algorithm <../../algorithms/functions/parallel_reduce_func>` 26 | * :doc:`parallel_determinstic_reduce algorithm <../../algorithms/functions/parallel_deterministic_reduce_func>` 27 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/named_requirements/algorithms/par_reduce_reduction.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ======================= 6 | ParallelReduceReduction 7 | ======================= 8 | **[req.parallel_reduce_reduction]** 9 | 10 | A type `Reduction` satisfies `ParallelReduceReduction` if it meets the following requirements: 11 | 12 | ----------------------------------------------------------------------------------------------------- 13 | 14 | **ParallelReduceReduction Requirements: Pseudo-Signature, Semantics** 15 | 16 | .. cpp:function:: Value Reduction::operator()(const Value& x, const Value& y) const 17 | 18 | Combines results ``x`` and ``y``. 19 | ``Value`` type must be the same as a corresponding template parameter for the 20 | :doc:`parallel_reduce algorithm <../../algorithms/functions/parallel_reduce_func>` algorithm. 21 | 22 | See also: 23 | 24 | * :doc:`parallel_reduce algorithm <../../algorithms/functions/parallel_reduce_func>` 25 | * :doc:`parallel_determinstic_reduce algorithm <../../algorithms/functions/parallel_deterministic_reduce_func>` 26 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/named_requirements/algorithms/par_scan_combine.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | =================== 6 | ParallelScanCombine 7 | =================== 8 | **[req.parallel_scan_combine]** 9 | 10 | A type `Combine` satisfies `ParallelScanCombine` if it meets the following requirements: 11 | 12 | -------------------------------------------------------------------------------- 13 | 14 | **ParallelScanCombine Requirements: Pseudo-Signature, Semantics** 15 | 16 | .. cpp:function:: Value Combine::operator()(const Value& left, const Value& right) const 17 | 18 | Combines summaries ``left`` and ``right`` and returns the result 19 | ``Value`` type must be the same as a corresponding template parameter for the ``parallel_scan`` algorithm. 20 | 21 | See also: 22 | 23 | * :doc:`parallel_scan algorithm <../../algorithms/functions/parallel_scan_func>` 24 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/named_requirements/algorithms/par_scan_func.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ================ 6 | ParallelScanFunc 7 | ================ 8 | **[req.parallel_scan_func]** 9 | 10 | A type `Scan` satisfies `ParallelScanFunc` if it meets the following requirements: 11 | 12 | -------------------------------------------------------------------------------- 13 | 14 | **ParallelScanFunc Requirements: Pseudo-Signature, Semantics** 15 | 16 | .. cpp:function:: Value Scan::operator()(const Range& r, const Value& sum, bool is_final) const 17 | 18 | Starting with ``sum``, computes the summary and, for ``is_final == true``, 19 | the scan result for range ``r``. Returns the computed summary. 20 | ``Value`` type must be the same as a corresponding template parameter for the ``parallel_scan`` algorithm. 21 | 22 | See also: 23 | 24 | * :doc:`parallel_scan algorithm <../../algorithms/functions/parallel_scan_func>` 25 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/named_requirements/containers/hash_compare.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | =========== 6 | HashCompare 7 | =========== 8 | **[req.hash_compare]** 9 | 10 | HashCompare is an object which is used to calculate hash code for an object and compare 11 | two objects for equality. 12 | 13 | The type ``H`` satisfies ``HashCompare`` if it meets the following requirements: 14 | 15 | ---------------------------------------------------------------- 16 | 17 | **HashCompare Requirements: Pseudo-Signature, Semantics** 18 | 19 | .. cpp:function:: H::H( const H& ) 20 | 21 | Copy constructor. 22 | 23 | .. cpp:function:: H::~H() 24 | 25 | Destructor. 26 | 27 | .. cpp:function:: std::size_t H::hash(const KeyType& k) const 28 | 29 | Calculates the hash for a provided key. 30 | 31 | .. cpp:function:: ReturnType H::equal(const KeyType& k1, const KeyType& k2) const 32 | 33 | Requirements: 34 | 35 | * The type ``ReturnType`` should be implicitly convertible to ``bool``. 36 | 37 | Compares ``k1`` and ``k2`` for equality. 38 | 39 | If this function returns ``true``, ``H::hash(k1)`` should be equal to ``H::hash(k2)``. 40 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/named_requirements/flow_graph/async_node_body.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ============= 6 | AsyncNodeBody 7 | ============= 8 | **[req.async_node_body]** 9 | 10 | A type `Body` satisfies `AsyncNodeBody` if it meets the following requirements: 11 | 12 | ---------------------------------------------------------------------- 13 | 14 | **AsyncNodeBody Requirements: Pseudo-Signature, Semantics** 15 | 16 | .. namespace:: AsyncNodeBody 17 | 18 | .. cpp:function:: Body::Body( const Body& ) 19 | 20 | Copy constructor. 21 | 22 | .. cpp:function:: Body::~Body() 23 | 24 | Destructor. 25 | 26 | .. cpp:function:: void Body::operator()( const Input &v, GatewayType &gateway ) 27 | 28 | **Requirements:** 29 | 30 | * The ``Input`` type must be the same as the ``Input`` template type argument 31 | of the ``async_node`` instance in which the ``Body`` object is passed during construction. 32 | * The ``GatewayType`` type must be the same as the ``gateway_type`` member type 33 | of the ``async_node`` instance in which the ``Body`` object is passed during construction. 34 | 35 | The input value ``v`` is submitted by the flow graph to an external activity. 36 | The :doc:`gateway interface ` allows the external activity to communicate 37 | with the enclosing flow graph. 38 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/named_requirements/flow_graph/continue_node_body.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ================ 6 | ContinueNodeBody 7 | ================ 8 | **[req.continue_node_body]** 9 | 10 | A type `Body` satisfies `ContinueNodeBody` if it meets the following requirements: 11 | 12 | ---------------------------------------------------------------------- 13 | 14 | **ContinueNodeBody Requirements: Pseudo-Signature, Semantics** 15 | 16 | .. namespace:: ContinueNodeBody 17 | 18 | .. cpp:function:: Body::Body( const Body& ) 19 | 20 | Copy constructor. 21 | 22 | .. cpp:function:: Body::~Body() 23 | 24 | Destructor. 25 | 26 | .. cpp:function:: Output Body::operator()( const continue_msg &v ) 27 | 28 | **Requirements:** The type ``Output`` must be the same as the template type argument ``Output`` of the 29 | ``continue_node`` instance in which the ``Body`` object is passed during construction. 30 | 31 | Performs operation and returns a value of type Output. 32 | 33 | See also: 34 | 35 | * :doc:`continue_node class <../../flow_graph/continue_node_cls>` 36 | * :doc:`continue_msg class <../../flow_graph/continue_msg_cls>` 37 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/named_requirements/flow_graph/function_node_body.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ================ 6 | FunctionNodeBody 7 | ================ 8 | **[req.function_node_body]** 9 | 10 | A type `Body` satisfies `FunctionNodeBody` if it meets the following requirements: 11 | 12 | ---------------------------------------------------------------------- 13 | 14 | **FunctionNodeBody Requirements: Pseudo-Signature, Semantics** 15 | 16 | .. namespace:: FunctionNodeBody 17 | 18 | .. cpp:function:: Body::Body( const Body& ) 19 | 20 | Copy constructor. 21 | 22 | .. cpp:function:: Body::~Body() 23 | 24 | Destructor. 25 | 26 | .. cpp:function:: Output Body::operator()( const Input& v ) 27 | 28 | **Requirements:** The ``Input`` and ``Output`` types must be the same as the ``Input`` and ``Output`` 29 | template type arguments of the ``function_node`` instance in which the ``Body`` object is passed 30 | during construction. 31 | 32 | Performs operation on ``v`` and returns a value of type ``Output``. 33 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/named_requirements/flow_graph/gateway_type.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | =========== 6 | GatewayType 7 | =========== 8 | **[req.gateway_type]** 9 | 10 | A type `T` satisfies `GatewayType` if it meets the following requirements: 11 | 12 | ------------------------------------------------------------------------------------------ 13 | 14 | **GatewayType Requirements: Pseudo-Signature, Semantics** 15 | 16 | .. cpp:function:: bool T::try_put( const Output &v ) 17 | 18 | **Requirements:** The type ``Output`` must be the same as the template type argument ``Output`` of the 19 | corresponding ``async_node`` instance. 20 | 21 | Broadcasts ``v`` to all successors of the corresponding ``async_node`` instance. 22 | 23 | .. cpp:function:: void T::reserve_wait() 24 | 25 | Notifies a flow graph that work has been submitted to an external activity. 26 | 27 | .. cpp:function:: void T::release_wait() 28 | 29 | Notifies a flow graph that work submitted to an external activity has completed. 30 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/named_requirements/flow_graph/input_node_body.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2021 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ============= 6 | InputNodeBody 7 | ============= 8 | **[req.input_node_body]** 9 | 10 | A type `Body` satisfies `InputNodeBody` if it meets the following requirements: 11 | 12 | ---------------------------------------------------------------------- 13 | 14 | **InputNodeBody Requirements: Pseudo-Signature, Semantics** 15 | 16 | .. namespace:: InputNodeBody 17 | 18 | .. cpp:function:: Body::Body( const Body& ) 19 | 20 | Copy constructor. 21 | 22 | .. cpp:function:: Body::~Body() 23 | 24 | Destructor. 25 | 26 | .. cpp:function:: Output Body::operator()( oneapi::tbb::flow_control& fc ) 27 | 28 | **Requirements:** The type ``Output`` must be the same as the template type argument ``Output`` of the 29 | ``input_node`` instance in which the ``Body`` object is passed during construction. 30 | 31 | Applies body to generate the next item. Call ``fc.stop()`` when new element cannot be generated. 32 | Because ``Output`` needs to be returned, ``Body`` may return any valid value of ``Output``, to be 33 | immediately discarded. 34 | 35 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/named_requirements/flow_graph/join_node_func_obj.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ====================== 6 | JoinNodeFunctionObject 7 | ====================== 8 | **[req.join_node_function_object]** 9 | 10 | A type `Func` satisfies `JoinNodeFunctionObject` if it meets the following requirements: 11 | 12 | ---------------------------------------------------------------------- 13 | 14 | **JoinNodeFunctionObject Requirements: Pseudo-Signature, Semantics** 15 | 16 | .. cpp:function:: Func::Func( const Func& ) 17 | 18 | Copy constructor. 19 | 20 | .. cpp:function:: Func::~Func() 21 | 22 | Destructor. 23 | 24 | .. cpp:function:: Key Func::operator()( const Input& v ) 25 | 26 | **Requirements:** The ``Key`` and ``Input`` types must be the same as the ``K`` and the corresponding 27 | element of the ``OutputTuple`` template arguments of the ``join_node`` instance to which the ``Func`` object is passed 28 | during construction. 29 | 30 | Returns key to be used for hashing input messages. 31 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/named_requirements/flow_graph/multifunction_node_body.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ===================== 6 | MultifunctionNodeBody 7 | ===================== 8 | **[req.multifunction_node_body]** 9 | 10 | A type `Body` satisfies `MultifunctionNodeBody` if it meets the following requirements: 11 | 12 | ---------------------------------------------------------------------- 13 | 14 | **MultifunctionNodeBody Requirements: Pseudo-Signature, Semantics** 15 | 16 | .. namespace:: MultifunctionNodeBody 17 | 18 | .. cpp:function:: Body::Body( const Body& ) 19 | 20 | Copy constructor. 21 | 22 | .. cpp:function:: Body::~Body() 23 | 24 | Destructor. 25 | 26 | .. cpp:function:: void Body::operator()(const Input &v, OutputPortsType &p) 27 | 28 | **Requirements:** 29 | 30 | * The ``Input`` type must be the same as the ``Input`` template type argument 31 | of the ``multifunction_node`` instance in which the ``Body`` object is passed during construction. 32 | * The ``OutputPortsType`` type must be the same as the ``output_ports_type`` member type 33 | of the ``multifunction_node`` instance in which the ``Body`` object is passed during construction. 34 | 35 | Performs operation on ``v``. May call ``try_put()`` on zero or more of 36 | the output ports. May call ``try_put()`` on any output port multiple 37 | times. 38 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/named_requirements/flow_graph/sequencer.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ========= 6 | Sequencer 7 | ========= 8 | **[req.sequencer]** 9 | 10 | A type `S` satisfies `Sequencer` if it meets the following requirements: 11 | 12 | ---------------------------------------------------------------------- 13 | 14 | **Sequencer Requirements: Pseudo-Signature, Semantics** 15 | 16 | .. cpp:function:: S::S( const S& ) 17 | 18 | Copy constructor. 19 | 20 | .. cpp:function:: S::~S() 21 | 22 | Destructor. 23 | 24 | .. cpp:function:: size_t S::operator()( const T &v ) 25 | 26 | **Requirements:** The type ``T`` must be the same as the template type argument ``T`` of the 27 | ``sequencer_node`` instance in which the ``S`` object is passed during construction. 28 | 29 | Returns the sequence number for the provided message ``v``. 30 | 31 | See also: 32 | 33 | * :doc:`sequencer_node class <../../flow_graph/sequencer_node_cls>` 34 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/named_requirements/task_scheduler/suspend_func.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2021 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | =========== 6 | SuspendFunc 7 | =========== 8 | **[req.suspend_func]** 9 | 10 | A type `Func` satisfies `SuspendFunc` if it meets the following requirements: 11 | 12 | ---------------------------------------------------------------------- 13 | 14 | **SuspendFunc Requirements: Pseudo-Signature, Semantics** 15 | 16 | .. namespace:: SuspendFunc 17 | 18 | .. cpp:function:: Func::Func( const Func& ) 19 | 20 | Copy constructor. 21 | 22 | .. cpp:function:: void Func::operator()( oneapi::tbb::task::suspend_point ) 23 | 24 | Body that accepts the current task execution point to resume later. 25 | 26 | See also: 27 | 28 | * :doc:`resumable tasks <../../task_scheduler/scheduling_controls/resumable_tasks>` 29 | 30 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/nested-aux-interfaces.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ============================= 6 | oneTBB Auxiliary Interfaces 7 | ============================= 8 | 9 | .. toctree:: 10 | :maxdepth: 2 11 | 12 | memory_allocation.rst 13 | mutual_exclusion.rst 14 | timing.rst 15 | info_namespace.rst 16 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/nested-depr-interfaces.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2021 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ============================= 6 | oneTBB Deprecated Interfaces 7 | ============================= 8 | 9 | .. toctree:: 10 | :maxdepth: 2 11 | 12 | deprecated/task_arena_attach_tag.rst 13 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/nested-gen-info.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ===================== 6 | General Information 7 | ===================== 8 | 9 | .. toctree:: 10 | :maxdepth: 2 11 | 12 | intro.rst 13 | notation.rst 14 | identifiers.rst 15 | named_requirements.rst 16 | thread_safety.rst 17 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/nested-index.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2021 Intel Corporation 2 | .. SPDX-FileCopyrightText: Contributors to the oneAPI Specification project. 3 | .. 4 | .. SPDX-License-Identifier: CC-BY-4.0 5 | 6 | .. _oneTBB-section: 7 | 8 | ====== 9 | oneTBB 10 | ====== 11 | **[spec.version]** 12 | 13 | This is the specification of |tbb_full_name|, part of the oneAPI Specification version |tbb_version|. 14 | 15 | .. toctree:: 16 | :maxdepth: 2 17 | 18 | nested-gen-info 19 | nested-interfaces 20 | nested-aux-interfaces 21 | nested-depr-interfaces 22 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/nested-interfaces.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | =================== 6 | oneTBB Interfaces 7 | =================== 8 | 9 | .. toctree:: 10 | :maxdepth: 2 11 | 12 | configuration.rst 13 | algorithms.rst 14 | flow_graph.rst 15 | task_scheduler.rst 16 | containers.rst 17 | thread_local_storage.rst 18 | 19 | 20 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/task_scheduler/attach_tag_type.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2021 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | =============== 6 | attach tag type 7 | =============== 8 | **[scheduler.attach]** 9 | 10 | An ``attach`` tag type is specifically used with ``task_arena`` and 11 | ``task_scheduler_handle`` interfaces. It is guaranteed to be constructible by default. 12 | 13 | .. code:: cpp 14 | 15 | namespace oneapi { 16 | namespace tbb { 17 | using attach = /* unspecified */ 18 | } 19 | } 20 | 21 | See also: 22 | 23 | * :doc:`task_arena ` 24 | * :doc:`task_scheduler_handle ` -------------------------------------------------------------------------------- /source/elements/oneTBB/source/task_scheduler/task_group/task_group_status_enum.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2021 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ================= 6 | task_group_status 7 | ================= 8 | **[scheduler.task_group_status]** 9 | 10 | A ``task_group_status`` type represents the status of a ``task_group``. 11 | 12 | .. code:: cpp 13 | 14 | namespace oneapi { 15 | namespace tbb { 16 | enum task_group_status { 17 |        not_complete, 18 |         complete, 19 |         canceled 20 |     }; 21 | } // namespace tbb 22 | } // namespace oneapi 23 | 24 | Member constants 25 | ---------------- 26 | 27 | .. c:macro:: not_complete 28 | 29 | Not cancelled and not all tasks in a group have completed. 30 | 31 | .. c:macro:: complete 32 | 33 | Not cancelled and all tasks in a group have completed. 34 | 35 | .. c:macro:: canceled 36 | 37 | Task group received cancellation request. 38 | 39 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/thread_local_storage.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ==================== 6 | Thread Local Storage 7 | ==================== 8 | **[thread_local_storage]** 9 | 10 | oneAPI Threading Building Blocks provides class templates for thread local storage (TLS). 11 | Each provides a thread-local element per thread and lazily creates elements on demand. 12 | 13 | .. toctree:: 14 | :titlesonly: 15 | :maxdepth: 1 16 | 17 | thread_local_storage/combinable_cls.rst 18 | thread_local_storage/enumerable_thread_specific_cls.rst 19 | 20 | This section also describes class template ``flatten2d``, which assists a common idiom where 21 | an ``enumerable_thread_specific`` represents a container partitioner across threads. 22 | 23 | .. toctree:: 24 | :titlesonly: 25 | 26 | thread_local_storage/flattened2d_cls.rst 27 | 28 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/thread_local_storage/enumerable_thread_specific_cls/safe_modifiers.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2021 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | =========================== 6 | Concurrently safe modifiers 7 | =========================== 8 | 9 | All member functions in this section can be performed concurrently with each other. 10 | 11 | .. namespace:: oneapi::tbb::enumerable_thread_specific 12 | 13 | .. cpp:function:: reference local() 14 | 15 | If there is no current element corresponding to the current thread, this method constructs a new element. 16 | A new element is copy-constructed if an exemplar was provided to the constructor for 17 | ``*this``; otherwise, a new element is default-constructed. 18 | 19 | **Returns**: A reference to the element of ``*this`` that corresponds to the current thread. 20 | 21 | .. cpp:function:: reference local( bool& exists ) 22 | 23 | Similar to ``local()``, except that ``exists`` is set to true if an element 24 | was already present for the current thread; false, otherwise. 25 | 26 | **Returns**: Reference to the thread-local element. 27 | 28 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/thread_local_storage/enumerable_thread_specific_cls/size_and_capacity.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2021 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ================= 6 | Size and capacity 7 | ================= 8 | 9 | .. namespace:: oneapi::tbb::enumerable_thread_specific 10 | 11 | .. cpp:function:: size_type size() const 12 | 13 | Returns the number of elements in ``*this``. 14 | The value is equal to the number of distinct threads that have called ``local()`` after 15 | ``*this`` was constructed or most recently cleared. 16 | 17 | .. cpp:function:: bool empty() const 18 | 19 | Returns ``true`` if the container is empty; ``false``, otherwise. 20 | 21 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/thread_local_storage/enumerable_thread_specific_cls/unsafe_modifiers.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ============================= 6 | Concurrently unsafe modifiers 7 | ============================= 8 | 9 | All member functions in this section can only be performed serially. The behavior is undefined in 10 | case of concurrent execution of these methods with other (either concurrently safe) methods. 11 | 12 | clear 13 | ----- 14 | 15 | .. code:: cpp 16 | 17 | void clear(); 18 | 19 | Destroys all elements in ``*this``. 20 | 21 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/thread_safety.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ============= 6 | Thread Safety 7 | ============= 8 | **[thread_safety]** 9 | 10 | Unless otherwise stated, the thread safety rules for the library are as follows: 11 | 12 | * Two threads can invoke a method or function concurrently on different objects, but not the same object. 13 | * It is unsafe for two threads to invoke concurrently methods or functions on the same object. 14 | 15 | Departures from this convention are noted in the classes descriptions. For example, the concurrent containers are more liberal. By their nature, they do permit some concurrent operations on the same container object. -------------------------------------------------------------------------------- /source/elements/oneTBB/source/timing.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ====== 6 | Timing 7 | ====== 8 | **[timing]** 9 | 10 | Parallel programming is about speeding up *wall clock* time, which is the real time that it takes a program or function to run. The library provides API to simplify timing within an application. 11 | 12 | Syntax 13 | ------ 14 | 15 | .. code:: cpp 16 | 17 | // Declared in tick_count.h 18 | 19 | class tick_count; 20 | 21 | class tick_count::interval_t; 22 | 23 | 24 | Classes 25 | ----------- 26 | 27 | .. toctree:: 28 | 29 | timing/tick_count_cls.rst 30 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/uncategorized.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ============= 6 | Uncategorized 7 | ============= 8 | 9 | This section describes the APIs which category in the specification is not yet defined. 10 | It includes some of former TBB preview features, as well as functionality considered for reworking or removal. 11 | 12 | .. toctree:: 13 | 14 | uncategorized/concurrent_lru_cache_cls.rst 15 | uncategorized/aggregator_cls.rst 16 | uncategorized/flow_graph_features.rst 17 | uncategorized/scalable_memory_pools.rst 18 | uncategorized/resumable_tasks.rst 19 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/uncategorized/aggregator_cls.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ================ 6 | aggregator Class 7 | ================ 8 | 9 | 10 | Summary 11 | ------- 12 | 13 | Class for mutual exclusion that does not model the 14 | Mutex Concept. 15 | 16 | See also: 17 | 18 | * :doc:`Mutex Concept <../../../synchronization/mutexes/mutex_concept>` 19 | 20 | .. toctree:: 21 | 22 | aggregator_cls/basic_interface.rst 23 | aggregator_cls/expert_interface.rst 24 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/uncategorized/examples/opencl_node_example.makefile: -------------------------------------------------------------------------------- 1 | SAMPLE_BASE_NAME = opencl_node_example 2 | #TODO get the OpenCL paths from the NBTS system list 3 | OPENCL_ROOT_DIR = /mnt/tbbusers/tbbtest/soft/INDE 4 | 5 | ifeq ($(shell uname), Linux) 6 | SOURCE_OPENCL = . $(OPENCL_ROOT_DIR)/opencl_vars.sh intel64 && 7 | OPENCL_LIB = -lOpenCL 8 | endif 9 | 10 | ifeq ($(shell uname), Darwin) 11 | OPENCL_LIB = -framework OpenCL 12 | endif 13 | 14 | release: 15 | $(SOURCE_OPENCL) $(CXX) -O2 -o $(SAMPLE_BASE_NAME).$(OUTPUT_EXTENSION) $(CXXFLAGS) \ 16 | $(SAMPLE_BASE_NAME).cpp -ltbb $(OPENCL_LIB) $(LIBS) 17 | debug: 18 | $(SOURCE_OPENCL) $(CXX) -O0 -o $(SAMPLE_BASE_NAME).$(OUTPUT_EXTENSION) $(CXXFLAGS) \ 19 | $(SAMPLE_BASE_NAME).cpp -ltbb_debug $(OPENCL_LIB) $(LIBS) 20 | 21 | run: 22 | $(SOURCE_OPENCL) mv $(SAMPLE_BASE_NAME).$(OUTPUT_EXTENSION) $(PROG) && \ 23 | ./$(PROG) 24 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/uncategorized/examples/opencl_node_example.makefile.windows: -------------------------------------------------------------------------------- 1 | SAMPLE_BASE_NAME=opencl_node_example 2 | #TODO get the OpenCL paths from the NBTS system list 3 | OPENCL_ROOT_DIR=S:\soft\INDE 4 | 5 | release: 6 | $(OPENCL_ROOT_DIR)\opencl_vars.bat intel64 && \ 7 | $(CXX) /O2 $(SAMPLE_BASE_NAME).cpp $(CXXFLAGS) /link tbb.lib OpenCL.lib $(LIBS) \ 8 | /OUT:$(SAMPLE_BASE_NAME).$(OUTPUT_EXTENSION) 9 | 10 | debug: 11 | $(OPENCL_ROOT_DIR)\opencl_vars.bat intel64 && \ 12 | $(CXX) /Od $(SAMPLE_BASE_NAME).cpp $(CXXFLAGS) /link tbb_debug.lib OpenCL.lib $(LIBS) \ 13 | /OUT:$(SAMPLE_BASE_NAME).$(OUTPUT_EXTENSION) 14 | 15 | run: 16 | $(OPENCL_ROOT_DIR)\opencl_vars.bat intel64 && \ 17 | cmd.exe /C move $(SAMPLE_BASE_NAME).$(OUTPUT_EXTENSION) $(PROG) && \ 18 | $(PROG) 19 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/uncategorized/examples/vector_operations.cl: -------------------------------------------------------------------------------- 1 | __kernel void cuber( __global int* buf ){ 2 | int idx = get_global_id(0); 3 | buf[idx] = buf[idx] * buf[idx] * buf[idx]; 4 | } 5 | 6 | __kernel void squarer( __global int* buf ){ 7 | int idx = get_global_id(0); 8 | buf[idx] = buf[idx] * buf[idx]; 9 | } 10 | -------------------------------------------------------------------------------- /source/elements/oneTBB/source/uncategorized/flow_graph_features.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ========== 6 | Flow Graph 7 | ========== 8 | 9 | This section describes features of Flow Graph that are considered for reworking. 10 | 11 | .. toctree:: 12 | 13 | flow_graph/async_msg_cls.rst 14 | flow_graph/streaming_node_cls.rst 15 | flow_graph/opencl_node_cls.rst 16 | flow_graph/type_specified_message_keys.rst 17 | flow_graph/sender_cls.rst 18 | flow_graph/receiver_cls.rst 19 | flow_graph/c_recv_cls.rst 20 | -------------------------------------------------------------------------------- /source/example.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | using namespace sycl; 3 | 4 | int main() { 5 | // declare host arrays 6 | double *Ahost = new double[M*N]; 7 | double *Bhost = new double[N*P]; 8 | double *Chost = new double[M*P]; 9 | 10 | { 11 | // Initializing the devices queue with a gpu_selector 12 | queue q{gpu_selector()}; 13 | 14 | // Creating 2D buffers for matrices which are bound to host arrays 15 | buffer a{Ahost, range<2>{M,N}}; 16 | buffer b{Bhost, range<2>{N,P}}; 17 | buffer c{Chost, range<2>{M,P}}; 18 | 19 | // Submitting command group to queue to compute matrix c=a*b 20 | q.submit([&](handler &h){ 21 | // Read from a and b, write to c 22 | auto A = a.get_access(h); 23 | auto B = b.get_access(h); 24 | auto C = c.get_access(h); 25 | 26 | int WidthA = a.get_range()[1]; 27 | 28 | // Executing kernel 29 | h.parallel_for(range<2>{M, P}, 30 | [=](id<2> index){ 31 | int row = index[0]; 32 | int col = index[1]; 33 | 34 | // Compute the result of one element in c 35 | double sum = 0.0; 36 | for (int i = 0; i < WidthA; i++) { 37 | sum += A[row][i] * B[i][col]; 38 | } 39 | C[index] = sum; 40 | }); 41 | }); 42 | } 43 | // when we exit the block, the buffer destructor will write result back to C. 44 | } 45 | -------------------------------------------------------------------------------- /source/index.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. 3 | .. SPDX-License-Identifier: CC-BY-4.0 4 | 5 | ********************** 6 | oneAPI Specification 7 | ********************** 8 | 9 | oneAPI is an open, free, and standards-based programming system that 10 | provides portability and performance across accelerators and 11 | generations of hardware. oneAPI consists of a language and libraries 12 | for creating parallel applications: 13 | 14 | .. include:: elements/element_list.rst 15 | 16 | 17 | .. toctree:: 18 | :hidden: 19 | :maxdepth: 4 20 | 21 | introduction 22 | architecture 23 | elements/oneDPL/source/index 24 | elements/oneDNN/source/index 25 | elements/oneCCL/source/index 26 | elements/oneDAL/source/index 27 | elements/oneTBB/source/nested-index 28 | elements/oneMath/source/index 29 | Releases 30 | notices 31 | -------------------------------------------------------------------------------- /source/notices.rst: -------------------------------------------------------------------------------- 1 | .. SPDX-FileCopyrightText: 2019-2020 Intel Corporation 2 | .. SPDX-FileCopyrightText: The UXL Foundation Contributors. 3 | .. 4 | .. SPDX-License-Identifier: CC-BY-4.0 5 | 6 | Legal Notices and Disclaimers 7 | ----------------------------- 8 | 9 | The content of this oneAPI Specification is licensed under the `Creative 10 | Commons Attribution 4.0 International License`_. Unless stated otherwise, the 11 | sample code examples in this document are released to you under the `MIT 12 | license`_. 13 | 14 | By opening an issue, providing feedback, or otherwise contributing to the 15 | specification, you agree that the UXL Foundation will be free to use, disclose, 16 | reproduce, modify, license, or otherwise distribute your feedback at its sole 17 | discretion without any obligations or restrictions of any kind, including 18 | without limitation, intellectual property rights or licensing obligations. 19 | 20 | This document contains information on products, services and/or processes in 21 | development. All information provided here is subject to change without notice. 22 | 23 | .. _`Creative Commons Attribution 4.0 International License`: https://creativecommons.org/licenses/by/4.0/legalcode 24 | .. _`MIT License`: https://opensource.org/licenses/MIT 25 | -------------------------------------------------------------------------------- /source/oneapi-architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uxlfoundation/oneAPI-spec/1ea5088cab87b69541958b283c3215a80c1f5f25/source/oneapi-architecture.png -------------------------------------------------------------------------------- /ubuntu-packages.txt: -------------------------------------------------------------------------------- 1 | inkscape 2 | latexmk 3 | plantuml 4 | texlive-fonts-extra 5 | texlive-fonts-recommended 6 | texlive-latex-base 7 | texlive-latex-extra 8 | --------------------------------------------------------------------------------