101 if (context.use_gpu()) {
125 map_.remove_if([](
auto item) {
return !item.value->needed; });
129 for (
auto &value : map_.values()) {
130 value->needed =
false;
140 auto &weights = *map_.lookup_or_add_cb(
141 key, [&]() {
return std::make_unique<SymmetricBlurWeights>(context, type, radius); });
143 weights.needed =
true;
144 return weights.weights;
constexpr IndexRange()=default
void share_data(const Result &source)
Result upload_to_gpu(const bool from_pool) const
void store_pixel(const int2 &texel, const T &pixel_value)
void allocate_texture(const Domain domain, const bool from_pool=true, const std::optional< ResultStorageType > storage_type=std::nullopt)
T load_pixel(const int2 &texel) const
Result & get(Context &context, math::FilterKernel type, float2 radius)
SymmetricBlurWeightsKey(math::FilterKernel type, float2 radius)
SymmetricBlurWeights(Context &context, math::FilterKernel type, float2 radius)
float3x3 scale(float3x3 mat, float2 scale)
bool operator==(const BokehKernelKey &a, const BokehKernelKey &b)
T safe_divide(const T &a, const T &b)
T length(const VecBase< T, Size > &a)
float filter_kernel_value(FilterKernel kernel, float x)
unsigned __int64 uint64_t
constexpr uint64_t get_default_hash(const T &v, const Args &...args)