Function cl3::sampler::create_sampler [−][src]
pub fn create_sampler(
context: cl_context,
normalize_coords: cl_bool,
addressing_mode: cl_addressing_mode,
filter_mode: cl_filter_mode
) -> Result<cl_sampler, cl_int>
Expand description
Create an OpenCL buffer sampler for a context.
Calls clCreateSampler to create an OpenCL sampler object.
Deprecated in CL_VERSION_2_0 by create_sampler_with_properties.
context
- a valid OpenCL context.normalized_coords
- same interpretation as CL_SAMPLER_NORMALIZED_COORDS.addressing_mode
- same interpretation as CL_SAMPLER_ADDRESSING_MODE.filter_mode
- same interpretation as CL_SAMPLER_FILTER_MODE.
CL_SAMPLER_NORMALIZED_COORDS, CL_SAMPLER_ADDRESSING_MODE and CL_SAMPLER_FILTER_MODE
are described in: Sampler Properties table.
returns a Result containing the new OpenCL sampler object
or the error code from the OpenCL C API function.