You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A helper class to be used as a template to create contexts and open devices. It'll receive operators, DBM and constant types as a base for feature selection (by means of clGetPlatformInfo and clGetDevicetInfo).
Still needs to flesh out its nterface. Some ideas:
// Some custom type definitionsusing my_constant_type = float_int;
using my_allocator = std::allocator<my_constant_type>;
auto config = cl::config()
// Further refinements take into consideration the previous definitions' types.// The calls here have a specific path, that is:// - Context (by means of with_context)// - Constant Type (and its constant_limits)// - DBM type// - Operator type// The config object should be able to receive templates and automatically apply the// types provided in previous steps, and then convert those combinations into // predicates to be used in clGetPlatformInfo and clGetDeviceInfo.// The user can initiate as many with_context (and its inner) paths as needed.// The resulting config object's type itself is not a template, and as such is not// parameterized or restricted by the types used in the with_ methods.
.with_context<cl::context>(
cl::with_constant_type<my_constant_type>(
.with_dbm_type<cl::dense_dbm, my_allocator>()
.with_oper<cl::add_cons_close_oper>()
), // constant_type
cl::with_constant_type<float>(
cl::with_dbm_type<cl::dense_dbm /*, std::allocator<float> */>(
cl::with_oper<cl::add_cons_close_oper>()
) // dbm_type
) // constant_type
) // context// The user can pass in a direct verification of some device/platform property with a predicate
.with_cl_platform([](platform_id) { ... })
.with_cl_platform_param<CL_PLATFROM_...>([](value, /*optional*/ platform_id) { ... })
.with_cl_platform_param<CL_PLATFROM_...>(value)
.with_cl_device([](device_id) { ... })
.with_cl_device_param<CL_DEVICE_...>([](value, /*optional*/ device_id) { ... })
.with_cl_device_param<CL_DEVICE_...>(value)
// The user can also add specific context properties. These will be used when opening // the CL context
.with_cl_context_properties(CL_CONTEXT_..., ...)
The text was updated successfully, but these errors were encountered:
A helper class to be used as a template to create contexts and open devices. It'll receive operators, DBM and constant types as a base for feature selection (by means of
clGetPlatformInfo
andclGetDevicetInfo
).Still needs to flesh out its nterface. Some ideas:
The text was updated successfully, but these errors were encountered: