class ov::CoordinateTransform

Overview

Class which allows to calculate item index with given coordinates in tensor and helps to iterate over the subset of coordinates. Tensor items should be placed in memory in row-major order. More…

#include <coordinate_transform.hpp>

class CoordinateTransform: protected ov::CoordinateTransformBasic
{
public:
    // typedefs

    typedef CoordinateIterator Iterator;

    // construction

    CoordinateTransform(
        const Shape& source_shape,
        const Coordinate& source_start_corner,
        const Coordinate& source_end_corner,
        const Strides& source_strides,
        const AxisVector& source_axis_order,
        const CoordinateDiff& target_padding_below,
        const CoordinateDiff& target_padding_above,
        const Strides& source_dilation_strides
        );

    CoordinateTransform(
        const Shape& source_shape,
        const Coordinate& source_start_corner,
        const Coordinate& source_end_corner,
        const Strides& source_strides,
        const AxisVector& source_axis_order,
        const CoordinateDiff& target_padding_below,
        const CoordinateDiff& target_padding_above
        );

    CoordinateTransform(
        const Shape& source_shape,
        const Coordinate& source_start_corner,
        const Coordinate& source_end_corner,
        const Strides& source_strides,
        const AxisVector& source_axis_order
        );

    CoordinateTransform(
        const Shape& source_shape,
        const Coordinate& source_start_corner,
        const Coordinate& source_end_corner,
        const Strides& source_strides
        );

    CoordinateTransform(
        const Shape& source_shape,
        const Coordinate& source_start_corner,
        const Coordinate& source_end_corner
        );

    CoordinateTransform(const Shape& source_shape);

    // methods

    size_t index(const Coordinate& c) const;
    bool has_source_coordinate(const Coordinate& c) const;
    Coordinate to_source_coordinate(const Coordinate& c) const;
    const Shape& get_source_shape() const;
    const Shape& get_target_shape() const;
    const Coordinate& get_source_start_corner() const;
    const Coordinate& get_source_end_corner() const;
    const Strides& get_source_strides() const;
    const AxisVector& get_source_axis_order() const;
    const Strides& get_target_dilation_strides() const;
    CoordinateIterator begin() const;
    const CoordinateIterator& end() const;
};

Inherited Members

public:
    // typedefs

    typedef CoordinateIterator Iterator;

    // methods

    size_t index(const Coordinate& c) const;
    CoordinateIterator begin() const;
    const CoordinateIterator& end() const;

Detailed Documentation

Class which allows to calculate item index with given coordinates in tensor and helps to iterate over the subset of coordinates. Tensor items should be placed in memory in row-major order.

Deprecated

Methods

size_t index(const Coordinate& c) const

The tensor element index calculation by given coordinate.

Parameters:

c

tensor element coordinate

bool has_source_coordinate(const Coordinate& c) const

Checks that coordinate belongs to given coordinates subset.

Parameters:

c

tensor element coordinate

Coordinate to_source_coordinate(const Coordinate& c) const

Convert a target-space coordinate to a source-space coordinate.

Parameters:

c

tensor element coordinate

CoordinateIterator begin() const

Returns an iterator to the first coordinate of the tensor.

const CoordinateIterator& end() const

Returns an iterator to the coordinate following the last element of the tensor.