VisionCpp  0.0.1
Public Types | Public Member Functions | Public Attributes | List of all members
visioncpp::internal::GlobalNeighbour< T > Struct Template Reference

GlobalNeighbour is used to provide local access for each element of the global memory based on the Coordinate passed by eval expression. More...

#include <mem_neighbour.hpp>

Inheritance diagram for visioncpp::internal::GlobalNeighbour< T >:
Collaboration diagram for visioncpp::internal::GlobalNeighbour< T >:

Public Types

using PixelType = T
 

Public Member Functions

 GlobalNeighbour (cl::sycl::global_ptr< T > &ptr, size_t colsArg, size_t rowsArg)
 
void set_offset (int c, int r)
 function set_offset: More...
 
PixelType at (int c, int r) const
 function at provides access to a specific Coordinate for a 2d buffer parameters: More...
 
PixelType at (int c) const
 function at provides access to a specific coordinate for a 1d buffer parameters: More...
 

Public Attributes

size_t I_c
 
size_t I_r
 
size_t cols
 
size_t rows
 
cl::sycl::global_ptr< T > & ptr
 

Detailed Description

template<typename T>
struct visioncpp::internal::GlobalNeighbour< T >

GlobalNeighbour is used to provide local access for each element of the global memory based on the Coordinate passed by eval expression.

It is used as an input type for user functor when the global neighbour operation is required. template parameters

Template Parameters
Tis the pixel type for the global memory

Definition at line 82 of file mem_neighbour.hpp.

Member Typedef Documentation

◆ PixelType

template<typename T >
using visioncpp::internal::GlobalNeighbour< T >::PixelType = T

Definition at line 83 of file mem_neighbour.hpp.

Constructor & Destructor Documentation

◆ GlobalNeighbour()

template<typename T >
visioncpp::internal::GlobalNeighbour< T >::GlobalNeighbour ( cl::sycl::global_ptr< T > &  ptr,
size_t  colsArg,
size_t  rowsArg 
)
inline

Definition at line 89 of file mem_neighbour.hpp.

Member Function Documentation

◆ at() [1/2]

template<typename T >
PixelType visioncpp::internal::GlobalNeighbour< T >::at ( int  c) const
inline

function at provides access to a specific coordinate for a 1d buffer parameters:

Parameters
cindex
Returns
PixelType

Definition at line 115 of file mem_neighbour.hpp.

References visioncpp::internal::GlobalNeighbour< T >::ptr.

◆ at() [2/2]

template<typename T >
PixelType visioncpp::internal::GlobalNeighbour< T >::at ( int  c,
int  r 
) const
inline

function at provides access to a specific Coordinate for a 2d buffer parameters:

Parameters
ccolumn index
rrow index
Returns
PixelType

Definition at line 106 of file mem_neighbour.hpp.

References visioncpp::internal::calculate_index(), visioncpp::internal::GlobalNeighbour< T >::cols, visioncpp::internal::GlobalNeighbour< T >::ptr, and visioncpp::internal::GlobalNeighbour< T >::rows.

Here is the call graph for this function:

◆ set_offset()

template<typename T >
void visioncpp::internal::GlobalNeighbour< T >::set_offset ( int  c,
int  r 
)
inline

function set_offset:

used to set the global memory offset for each global thread function parameters:

Parameters
c: column index
rrow index
Returns
void

Definition at line 97 of file mem_neighbour.hpp.

References visioncpp::internal::GlobalNeighbour< T >::I_c, and visioncpp::internal::GlobalNeighbour< T >::I_r.

Member Data Documentation

◆ cols

template<typename T >
size_t visioncpp::internal::GlobalNeighbour< T >::cols

Definition at line 86 of file mem_neighbour.hpp.

Referenced by visioncpp::internal::GlobalNeighbour< T >::at().

◆ I_c

template<typename T >
size_t visioncpp::internal::GlobalNeighbour< T >::I_c

◆ I_r

template<typename T >
size_t visioncpp::internal::GlobalNeighbour< T >::I_r

◆ ptr

template<typename T >
cl::sycl::global_ptr<T>& visioncpp::internal::GlobalNeighbour< T >::ptr

Definition at line 88 of file mem_neighbour.hpp.

Referenced by visioncpp::internal::GlobalNeighbour< T >::at().

◆ rows

template<typename T >
size_t visioncpp::internal::GlobalNeighbour< T >::rows

Definition at line 87 of file mem_neighbour.hpp.

Referenced by visioncpp::internal::GlobalNeighbour< T >::at().


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