Blender V5.0
multi_function_params.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
6
8
9void ParamsBuilder::add_unused_output_for_unsupporting_function(const CPPType &type)
10{
11 ResourceScope &scope = this->resource_scope();
12 void *buffer = scope.allocator().allocate_array(type, min_array_size_);
13 const GMutableSpan span{type, buffer, min_array_size_};
14 actual_params_.append_unchecked_as(std::in_place_type<GMutableSpan>, span);
15 if (!type.is_trivially_destructible) {
17 [&type, buffer, mask = mask_]() { type.destruct_indices(buffer, mask); });
18 }
19}
20
21} // namespace blender::fn::multi_function
bool is_trivially_destructible
void destruct_indices(void *ptr, const IndexMask &mask) const
void add_destruct_call(Func func)
LinearAllocator & allocator()
ccl_device_inline float2 mask(const MaskType mask, const float2 a)