SkelCL
SkelCL is a high level multi GPU skeleton library developed at the university of Münster, Germany.
 All Classes Namespaces Files Functions Variables Typedefs Groups
Functions
skelcl::distribution Namespace Reference

This namespace groups factory functions to construct the different distributions available in SkelCL. More...

Functions

template<template< typename > class C, typename T >
std::unique_ptr
< skelcl::detail::Distribution
< C< T > > > 
Block (const C< T > &c)
 Factory function to create a BlockDistribution with the types of the given container. More...
 
template<template< typename > class C, typename T >
void setBlock (const C< T > &c)
 This function sets the distribution of the given container to the BlockDistribution. More...
 
template<template< typename > class C, typename T >
std::unique_ptr
< skelcl::detail::Distribution
< C< T > > > 
OL (const C< T > &c)
 Factory function to create an OverlapDistribution with the types of the given container. More...
 
template<template< typename > class C, typename T >
void setOL (const C< T > &c)
 This function sets the distribution of the given container to the OverlapDistribution. More...
 
template<template< typename > class C, typename T >
std::unique_ptr
< skelcl::detail::Distribution
< C< T > > > 
Copy (const C< T > &c, typename identity< std::function< T(const T &, const T &)>>::type combineFunc=nullptr)
 Factory function to create a CopyDistribution with the types of the given container. More...
 
template<template< typename > class C, typename T >
void setCopy (const C< T > &c, std::function< T(const T &, const T &)> combineFunc=nullptr)
 This function sets the distribution of the given container to the CopyDistribution. More...
 
template<template< typename > class C, typename T >
std::unique_ptr
< skelcl::detail::Distribution
< C< T > > > 
Single (const C< T > &c)
 Factory function to create a SingleDistribution with the types of the given container and for the default device. More...
 
template<template< typename > class C, typename T >
std::unique_ptr
< skelcl::detail::Distribution
< C< T > > > 
Single (const C< T > &c, const std::shared_ptr< skelcl::detail::Device > &device)
 Factory function to create a SingleDistribution with the types of the given container and for the given device. More...
 
template<template< typename > class C, typename T >
void setSingle (const C< T > &c)
 This function sets the distribution of the given container to the SingleDistribution using the default device. More...
 
template<template< typename > class C, typename T >
void setSingle (const C< T > &c, const std::shared_ptr< skelcl::detail::Device > &device)
 This function sets the distribution of the given container to the SingleDistribution using the given device. More...
 

Detailed Description

This namespace groups factory functions to construct the different distributions available in SkelCL.

Function Documentation

template<template< typename > class C, typename T >
std::unique_ptr<skelcl::detail::Distribution<C<T> > > skelcl::distribution::Block ( const C< T > &  c)

Factory function to create a BlockDistribution with the types of the given container.

Template Parameters
CIncomplete type of the container for which the distribution is created. The complete type is C<T>. C can be Vector or Matrix.
TType of the elements of the container for which the distribution is created.
Parameters
cContainer for which the distribution is created. This argument is used to deduct the types needed to create the distribution which gets returned.
Returns
A pointer to a newly created BlockDistribution with the types of the given container.

Definition at line 94 of file Distributions.h.

template<template< typename > class C, typename T >
std::unique_ptr<skelcl::detail::Distribution<C<T> > > skelcl::distribution::Copy ( const C< T > &  c,
typename identity< std::function< T(const T &, const T &)>>::type  combineFunc = nullptr 
)

Factory function to create a CopyDistribution with the types of the given container.

Template Parameters
CIncomplete type of the container for which the distribution is created. The complete type is C<T>. C can be Vector or Matrix.
TType of the elements of the container for which the distribution is created.
Parameters
cContainer for which the distribution is created. This argument is used to deduct the types needed to create the distribution which gets returned.
combineFuncA binary function explaining how two elements of the container should be combined if two devices modify the data of a copy distributed container simultaneously.
Returns
A pointer to a newly created CopyDistribution with the types of the given container.

Definition at line 186 of file Distributions.h.

template<template< typename > class C, typename T >
std::unique_ptr<skelcl::detail::Distribution<C<T> > > skelcl::distribution::OL ( const C< T > &  c)

Factory function to create an OverlapDistribution with the types of the given container.

Template Parameters
CIncomplete type of the container for which the distribution is created. The complete type is C<T>. C can be Vector or Matrix.
TType of the elements of the container for which the distribution is created.
Parameters
cContainer for which the distribution is created. This argument is used to deduct the types needed to create the distribution which gets returned.
Returns
A pointer to a newly created OverlapDistribution with the types of the given container.

Definition at line 138 of file Distributions.h.

template<template< typename > class C, typename T >
void skelcl::distribution::setBlock ( const C< T > &  c)

This function sets the distribution of the given container to the BlockDistribution.

Template Parameters
CIncomplete type of the container for which the distribution is set. The complete type is C<T>. C can be Vector or Matrix.
TType of the elements of the container for which the distribution is set.
Parameters
cContainer for which the distribution is set to BlockDistribution using the setDistribution function.

Definition at line 114 of file Distributions.h.

template<template< typename > class C, typename T >
void skelcl::distribution::setCopy ( const C< T > &  c,
std::function< T(const T &, const T &)>  combineFunc = nullptr 
)

This function sets the distribution of the given container to the CopyDistribution.

Template Parameters
CIncomplete type of the container for which the distribution is set. The complete type is C<T>. C can be Vector or Matrix.
TType of the elements of the container for which the distribution is set.
Parameters
cContainer for which the distribution is set to CopyDistribution using the setDistribution function.
combineFuncA binary function explaining how two elements of the container should be combined if two devices modify the data of a copy distributed container simultaneously.

Definition at line 213 of file Distributions.h.

template<template< typename > class C, typename T >
void skelcl::distribution::setOL ( const C< T > &  c)

This function sets the distribution of the given container to the OverlapDistribution.

Template Parameters
CIncomplete type of the container for which the distribution is set. The complete type is C<T>. C can be Vector or Matrix.
TType of the elements of the container for which the distribution is set.
Parameters
cContainer for which the distribution is set to OverlapDistribution using the setDistribution function.

Definition at line 158 of file Distributions.h.

template<template< typename > class C, typename T >
void skelcl::distribution::setSingle ( const C< T > &  c)

This function sets the distribution of the given container to the SingleDistribution using the default device.

Template Parameters
CIncomplete type of the container for which the distribution is set. The complete type is C<T>. C can be Vector or Matrix.
TType of the elements of the container for which the distribution is set.
Parameters
cContainer for which the distribution is set to SingleDistribution using the default device.

Definition at line 286 of file Distributions.h.

template<template< typename > class C, typename T >
void skelcl::distribution::setSingle ( const C< T > &  c,
const std::shared_ptr< skelcl::detail::Device > &  device 
)

This function sets the distribution of the given container to the SingleDistribution using the given device.

Template Parameters
CIncomplete type of the container for which the distribution is set. The complete type is C<T>. C can be Vector or Matrix.
TType of the elements of the container for which the distribution is set.
Parameters
cContainer for which the distribution is set to SingleDistribution using the given device.
deviceThe device used for the SingleDistribution.

Definition at line 306 of file Distributions.h.

template<template< typename > class C, typename T >
std::unique_ptr<skelcl::detail::Distribution<C<T> > > skelcl::distribution::Single ( const C< T > &  c)

Factory function to create a SingleDistribution with the types of the given container and for the default device.

Template Parameters
CIncomplete type of the container for which the distribution is created. The complete type is C<T>. C can be Vector or Matrix.
TType of the elements of the container for which the distribution is created.
Parameters
cContainer for which the distribution is created. This argument is used to deduct the types needed to create the distribution which gets returned.
Returns
A pointer to a newly created SingleDistribution with the types of the given container and the default device.

Definition at line 239 of file Distributions.h.

template<template< typename > class C, typename T >
std::unique_ptr<skelcl::detail::Distribution<C<T> > > skelcl::distribution::Single ( const C< T > &  c,
const std::shared_ptr< skelcl::detail::Device > &  device 
)

Factory function to create a SingleDistribution with the types of the given container and for the given device.

Template Parameters
CIncomplete type of the container for which the distribution is created. The complete type is C<T>. C can be Vector or Matrix.
TType of the elements of the container for which the distribution is created.
Parameters
cContainer for which the distribution is created. This argument is used to deduct the types needed to create the distribution which gets returned.
deviceThe device used for the SingleDistribution.
Returns
A pointer to a newly created SingleDistribution with the types of the given container and for the given device.

Definition at line 265 of file Distributions.h.