VexCL
Classes | Functions | Variables
vex::Filter Namespace Reference

Device filters. More...

Classes

struct  AllFilter
 Selects any device. More...
 
struct  Vendor
 Selects devices whose vendor name match given value. More...
 
struct  Platform
 Selects devices whose platform name match given value. More...
 
struct  Name
 Selects devices whose names match given value. More...
 
struct  Type
 Selects devices by type. More...
 
struct  DoublePrecisionFilter
 Selects devices supporting double precision. More...
 
struct  Count
 Selects no more than given number of devices. More...
 
struct  Position
 Selects one device at the given position. More...
 
struct  EnvFilter
 Environment filter. More...
 

Functions

template<class Filter >
ExclusiveFilter< Filter > Exclusive (const Filter &filter)
 Allows exclusive access to compute devices across several processes. More...
 
template<class LeftFilter , class RightFilter >
FilterBinaryOp< LeftFilter,
RightFilter, FilterAnd > 
operator&& (const LeftFilter &left, const RightFilter &right)
 Join two filters with AND operator.
 
template<class LeftFilter , class RightFilter >
FilterBinaryOp< LeftFilter,
RightFilter, FilterOr > 
operator|| (const LeftFilter &left, const RightFilter &right)
 Join two filters with OR operator.
 
template<class Flt >
NegateFilter< Flt > operator! (const Flt &flt)
 Negate a filter.
 

Variables

const AllFilter All
 
const DoublePrecisionFilter DoublePrecision
 
const EnvFilter Env
 

Detailed Description

Device filters.

Function Documentation

template<class Filter >
ExclusiveFilter<Filter> vex::Filter::Exclusive ( const Filter &  filter)

Allows exclusive access to compute devices across several processes.

Returns devices that pass through provided device filter and are not locked.

Parameters
filterCompute device filter
Note
Depends on boost::interprocess library.

lock files are created in directory specified in VEXCL_LOCK_DIR environment variable. If the variable does not exist, /tmp is used on Linux and TMPDIR% on Windows. The lock directory should exist and be writable by the running user.