Lines Matching defs:context
111 * cl::Context context(CL_DEVICE_TYPE_CPU, properties);
113 * std::vector<cl::Device> devices = context.getInfo<CL_CONTEXT_DEVICES>();
117 * cl::Program program_ = cl::Program(context, source);
123 * cl::CommandQueue queue(context, devices[0], 0, &err);
1710 static cl_int retain(cl_context context)
1711 { return ::clRetainContext(context); }
1712 static cl_int release(cl_context context)
1713 { return ::clReleaseContext(context); }
1808 static cl_uint getContextPlatformVersion(cl_context context)
1811 // device and obtain its context
1813 clGetContextInfo(context, CL_CONTEXT_DEVICES, 0, NULL, &size);
1817 clGetContextInfo(context, CL_CONTEXT_DEVICES, size, devices, NULL);
2072 /*! \brief Returns the first device on the default context.
2508 /*! \brief Constructs a context including a list of specified devices.
2568 /*! \brief Constructs a context including all or a subset of devices of a specified type.
2683 /*! \brief Returns a singleton context including all devices of CL_DEVICE_TYPE_DEFAULT.
2743 __CL_EXPLICIT_CONSTRUCTORS Context(const cl_context& context) : detail::Wrapper<cl_type>(context) { }
2833 Context context = Context::getDefault(&error);
2842 device = context.getInfo<CL_CONTEXT_DEVICES>()[0];
2991 /*! \brief Constructs a user event on a given context.
2996 const Context& context,
3001 context(),
3175 /*! \brief Constructs a Buffer in a specified context.
3183 const Context& context,
3190 object_ = ::clCreateBuffer(context(), flags, size, host_ptr, &error);
3198 /*! \brief Constructs a Buffer in the default context.
3215 Context context = Context::getDefault(err);
3217 object_ = ::clCreateBuffer(context(), flags, size, host_ptr, &error);
3254 Context context = Context::getDefault(err);
3257 object_ = ::clCreateBuffer(context(), flags, size, static_cast<DataType*>(&*startIterator), &error);
3259 object_ = ::clCreateBuffer(context(), flags, size, 0, &error);
3277 * \brief Construct a Buffer from a host container via iterators using a specified context.
3282 Buffer(const Context &context, IteratorType startIterator, IteratorType endIterator,
3385 cl_context context, cl_mem_flags flags, ID3D10Buffer* buffer,
3388 /*! \brief Constructs a BufferD3D10, in a specified context, from a
3394 const Context& context,
3402 vector<cl_context_properties> props = context.getInfo<CL_CONTEXT_PROPERTIES>();
3417 context(),
3490 /*! \brief Constructs a BufferGL in a specified context, from a given
3496 const Context& context,
3503 context(),
3667 /*! \brief Constructs a 1D Image in a specified context.
3672 const Context& context,
3687 context(),
3757 const Context& context,
3773 context(),
3834 const Context& context,
3854 context(),
3919 /*! \brief Constructs a 1D Image in a specified context.
3924 const Context& context,
3939 cl_uint version = detail::getContextPlatformVersion(context());
3961 context(),
3978 context(), flags,&format, width, height, row_pitch, host_ptr, &error);
4052 /*! \brief Constructs an Image2DGL in a specified context, from a given
4058 const Context& context,
4067 context(),
4140 const Context& context,
4164 context(),
4228 /*! \brief Constructs a 3D Image in a specified context.
4233 const Context& context,
4250 cl_uint version = detail::getContextPlatformVersion(context());
4274 context(),
4291 context(), flags, &format, width, height, depth, row_pitch,
4364 /*! \brief Constructs an Image3DGL in a specified context, from a given
4370 const Context& context,
4379 context(),
4454 const Context& context,
4463 context(),
4534 /*! \brief Constructs a BufferRenderGL in a specified context, from a given
4540 const Context& context,
4547 context(),
4664 /*! \brief Constructs a Sampler in a specified context.
4669 const Context& context,
4677 context(),
5037 Context context = Context::getDefault(err);
5040 context(), (cl_uint)1, &strings, &length, &error);
5063 const Context& context,
5074 context(), (cl_uint)1, &strings, &length, &error);
5097 const Context& context,
5113 context(), (cl_uint)n, strings, lengths, &error);
5123 * \param context A valid OpenCL context in which to construct the program.
5133 * CL_INVALID_CONTEXT if context is not a valid context.
5136 * CL_INVALID_DEVICE if OpenCL devices listed in devices are not in the list of devices associated with context.
5141 const Context& context,
5179 context(), (cl_uint) devices.size(),
5198 const Context& context,
5213 context(),
5525 Context context = Context::getDefault(&error);
5534 Device device = context.getInfo<CL_CONTEXT_DEVICES>()[0];
5537 context(), device(), properties, &error);
5546 * \brief Constructs a CommandQueue for an implementation defined device in the given context
5549 const Context& context,
5555 error = context.getInfo(CL_CONTEXT_DEVICES, &devices);
5567 object_ = ::clCreateCommandQueue(context(), devices[0](), properties, &error);
5578 const Context& context,
5585 context(), device(), properties, &error);
5650 Context context = Context::getDefault(&error);
5659 Device device = context.getInfo<CL_CONTEXT_DEVICES>()[0];
5661 default_ = CommandQueue(context, device, 0, &error);
6532 cl_context context = getInfo<CL_QUEUE_CONTEXT>();
6565 cl_context context = getInfo<CL_QUEUE_CONTEXT>();
6627 const Context &context,
6651 object_ = ::clCreateBuffer(context(), flags, size, static_cast<DataType*>(&*startIterator), &error);
6653 object_ = ::clCreateBuffer(context(), flags, size, 0, &error);
6662 CommandQueue queue(context, 0, &error);
6701 Context context = queue.getInfo<CL_QUEUE_CONTEXT>();
6704 object_ = ::clCreateBuffer(context(), flags, size, static_cast<DataType*>(&*startIterator), &error);
6707 object_ = ::clCreateBuffer(context(), flags, size, 0, &error);