Blender V4.3
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.linear_allocator().allocate(type.size() * min_array_size_,
13 type.alignment());
14 const GMutableSpan span{type, buffer, min_array_size_};
15 actual_params_.append_unchecked_as(std::in_place_type<GMutableSpan>, span);
16 if (!type.is_trivially_destructible()) {
17 scope.add_destruct_call(
18 [&type, buffer, mask = mask_]() { type.destruct_indices(buffer, mask); });
19 }
20}
21
22} // namespace blender::fn::multi_function