DPNP C++ backend kernel library 0.18.0dev0
Data Parallel Extension for NumPy*
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Modules
DPNPC_id< _Tp > Class Template Referencefinal

Type to keep USM array pointers used in kernels. More...

#include <dpnp_iterator.hpp>

Public Types

using value_type = _Tp
 
using iterator = DPNP_USM_iterator<value_type>
 
using pointer = value_type *
 
using reference = value_type &
 
using size_type = shape_elem_type
 

Public Member Functions

 DPNPC_id (DPCTLSyclQueueRef q_ref, pointer __ptr, const size_type *__shape, const size_type __shape_size)
 
 DPNPC_id (DPCTLSyclQueueRef q_ref, pointer __ptr, const size_type *__shape, const size_type *__strides, const size_type __ndim)
 
 DPNPC_id (DPCTLSyclQueueRef q_ref, pointer __ptr, const std::vector< size_type > &__shape)
 Main container for reduction iterator.
 
 DPNPC_id (pointer __ptr, const std::vector< size_type > &__shape, const std::vector< size_type > &__strides)
 Main container for reduction/broadcasting iterator.
 
size_type get_output_size () const
 this function return number of elements in output
 
void broadcast_to_shape (const size_type *__shape, const size_type __shape_size)
 
void broadcast_to_shape (const std::vector< size_type > &__shape)
 Broadcast input data to specified shape.
 
void set_axis (shape_elem_type __axis)
 Set axis for the data object to use in computation.
 
void set_axes (const shape_elem_type *__axes, const size_t axes_ndim)
 
void set_axes (const std::vector< shape_elem_type > &__axes)
 Set axes for the data object to use in computation.
 
iterator begin (size_type output_global_id=0) const
 this function is designed for SYCL environment execution
 
iterator end (size_type output_global_id=0) const
 this function is designed for SYCL environment execution
 
reference operator[] (size_type __n) const
 this function is designed for SYCL environment execution
 

Detailed Description

template<typename _Tp>
class DPNPC_id< _Tp >

Type to keep USM array pointers used in kernels.

This type should be used in host part of the code to provide pre-calculated data. The DPNP_USM_iterator will be used later in SYCL environment

Definition at line 200 of file dpnp_iterator.hpp.

Member Typedef Documentation

◆ iterator

template<typename _Tp >
using DPNPC_id< _Tp >::iterator = DPNP_USM_iterator<value_type>

Definition at line 204 of file dpnp_iterator.hpp.

◆ pointer

template<typename _Tp >
using DPNPC_id< _Tp >::pointer = value_type *

Definition at line 205 of file dpnp_iterator.hpp.

◆ reference

template<typename _Tp >
using DPNPC_id< _Tp >::reference = value_type &

Definition at line 206 of file dpnp_iterator.hpp.

◆ size_type

template<typename _Tp >
using DPNPC_id< _Tp >::size_type = shape_elem_type

Definition at line 207 of file dpnp_iterator.hpp.

◆ value_type

template<typename _Tp >
using DPNPC_id< _Tp >::value_type = _Tp

Definition at line 203 of file dpnp_iterator.hpp.

Constructor & Destructor Documentation

◆ DPNPC_id() [1/2]

template<typename _Tp >
DPNPC_id< _Tp >::DPNPC_id ( DPCTLSyclQueueRef q_ref,
pointer __ptr,
const size_type * __shape,
const size_type __shape_size )
inline

Definition at line 209 of file dpnp_iterator.hpp.

◆ DPNPC_id() [2/2]

template<typename _Tp >
DPNPC_id< _Tp >::DPNPC_id ( DPCTLSyclQueueRef q_ref,
pointer __ptr,
const size_type * __shape,
const size_type * __strides,
const size_type __ndim )
inline

Definition at line 219 of file dpnp_iterator.hpp.

◆ ~DPNPC_id()

template<typename _Tp >
DPNPC_id< _Tp >::~DPNPC_id ( )
inline

Definition at line 278 of file dpnp_iterator.hpp.

Member Function Documentation

◆ begin()

template<typename _Tp >
iterator DPNPC_id< _Tp >::begin ( size_type output_global_id = 0) const
inline

this function is designed for SYCL environment execution

Definition at line 468 of file dpnp_iterator.hpp.

Here is the caller graph for this function:

◆ broadcast_to_shape()

template<typename _Tp >
void DPNPC_id< _Tp >::broadcast_to_shape ( const size_type * __shape,
const size_type __shape_size )
inline

Definition at line 289 of file dpnp_iterator.hpp.

◆ end()

template<typename _Tp >
iterator DPNPC_id< _Tp >::end ( size_type output_global_id = 0) const
inline

this function is designed for SYCL environment execution

Definition at line 476 of file dpnp_iterator.hpp.

◆ get_output_size()

template<typename _Tp >
size_type DPNPC_id< _Tp >::get_output_size ( ) const
inline

this function return number of elements in output

Definition at line 284 of file dpnp_iterator.hpp.

◆ operator[]()

template<typename _Tp >
reference DPNPC_id< _Tp >::operator[] ( size_type __n) const
inline

this function is designed for SYCL environment execution

Definition at line 486 of file dpnp_iterator.hpp.

Here is the call graph for this function:

◆ set_axes()

template<typename _Tp >
void DPNPC_id< _Tp >::set_axes ( const shape_elem_type * __axes,
const size_t axes_ndim )
inline

Definition at line 379 of file dpnp_iterator.hpp.


The documentation for this class was generated from the following file: