Blender  V2.93
FN_multi_function_network_evaluation.hh
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  */
16 
17 #pragma once
18 
24 
25 namespace blender::fn {
26 
27 class MFNetworkEvaluationStorage;
28 
30  private:
31  MFSignature signature_;
34 
35  public:
37 
38  void call(IndexMask mask, MFParams params, MFContext context) const override;
39 
40  private:
42 
43  void copy_inputs_to_storage(MFParams params, Storage &storage) const;
44  void copy_outputs_to_storage(
46  Storage &storage,
47  Vector<const MFInputSocket *> &outputs_to_initialize_in_the_end) const;
48 
49  void evaluate_network_to_compute_outputs(MFContext &global_context, Storage &storage) const;
50 
51  void evaluate_function(MFContext &global_context,
52  const MFFunctionNode &function_node,
53  Storage &storage) const;
54 
55  bool can_do_single_value_evaluation(const MFFunctionNode &function_node, Storage &storage) const;
56 
57  void initialize_remaining_outputs(MFParams params,
58  Storage &storage,
59  Span<const MFInputSocket *> remaining_outputs) const;
60 };
61 
62 } // namespace blender::fn
MFNetworkEvaluator(Vector< const MFOutputSocket * > inputs, Vector< const MFInputSocket * > outputs)
void call(IndexMask mask, MFParams params, MFContext context) const override
uiWidgetBaseParameters params[MAX_WIDGET_BASE_BATCH]
static bNodeSocketTemplate outputs[]
static bNodeSocketTemplate inputs[]
struct SELECTID_Context context
Definition: select_engine.c:47
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)