14 inline namespace _V1 {
21 : MCoordNormMode(normalizationMode), MAddrMode(addressingMode),
22 MFiltMode(filteringMode), MPropList(propList) {}
27 pi::cast<sycl::detail::pi::PiSampler>(clSampler);
28 MContextToSampler[syclContext] = Sampler;
33 &MCoordNormMode,
nullptr);
43 std::lock_guard<std::mutex> Lock(MMutex);
44 for (
auto &Iter : MContextToSampler) {
54 std::lock_guard<std::mutex> Lock(MMutex);
55 auto It = MContextToSampler.find(Context);
56 if (It != MContextToSampler.end())
76 if (errcode_ret == PI_ERROR_UNSUPPORTED_FEATURE)
78 "Images are not supported by this device.");
80 Plugin->checkPiResult(errcode_ret);
81 std::lock_guard<std::mutex> Lock(MMutex);
82 MContextToSampler[Context] = resultSampler;
93 return MCoordNormMode;
The context class represents a SYCL context on which kernel functions may be executed.
sycl::detail::pi::PiSampler getOrCreateSampler(const context &Context)
filtering_mode get_filtering_mode() const
addressing_mode get_addressing_mode() const
coordinate_normalization_mode get_coordinate_normalization_mode() const
sampler_impl(coordinate_normalization_mode normalizationMode, addressing_mode addressingMode, filtering_mode filteringMode, const property_list &propList)
Objects of the property_list class are containers for the SYCL properties.
decltype(Obj::impl) getSyclObjImpl(const Obj &SyclObject)
std::shared_ptr< plugin > PluginPtr
coordinate_normalization_mode
pi_result piSamplerRetain(pi_sampler sampler)
_pi_sampler_filter_mode pi_sampler_filter_mode
pi_bitfield pi_sampler_properties
pi_result piSamplerCreate(pi_context context, const pi_sampler_properties *sampler_properties, pi_sampler *result_sampler)
_pi_sampler_addressing_mode pi_sampler_addressing_mode
@ PI_SAMPLER_INFO_NORMALIZED_COORDS
@ PI_SAMPLER_INFO_FILTER_MODE
@ PI_SAMPLER_INFO_ADDRESSING_MODE
pi_result piSamplerGetInfo(pi_sampler sampler, pi_sampler_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret)
pi_result piSamplerRelease(pi_sampler sampler)