17 hash_.mix_in(s_static_type, strlen(s_static_type));
18 hash_.mix_in(modifier_name_.data(), modifier_name_.size());
21void ModifierComputeContext::print_current_in_line(std::ostream &stream)
const
23 stream <<
"Modifier: " << modifier_name_;
29 const std::optional<ComputeContextHash> &cached_hash)
32 if (cached_hash.has_value()) {
38 const int type_size = strlen(s_static_type);
39 const int buffer_size = type_size + 1 + sizeof(int32_t);
40 DynamicStackBuffer<64, 8> buffer_owner(buffer_size, 8);
41 char *buffer = static_cast<char *>(buffer_owner.buffer());
42 memcpy(buffer, s_static_type, type_size + 1);
43 memcpy(buffer + type_size + 1, &node_id_, sizeof(int32_t));
44 hash_.mix_in(buffer, buffer_size);
53 caller_group_node_ = &node;
57void GroupNodeComputeContext::print_current_in_line(std::ostream &stream)
const
59 if (caller_group_node_ !=
nullptr) {
60 stream <<
"Node: " << caller_group_node_->
name;
67 : ComputeContext(s_static_type, parent), output_node_id_(output_node_id)
71 const int type_size = strlen(s_static_type);
72 const int buffer_size = type_size + 1 +
sizeof(
int32_t);
73 DynamicStackBuffer<64, 8> buffer_owner(buffer_size, 8);
74 char *buffer =
static_cast<char *
>(buffer_owner.buffer());
75 memcpy(buffer, s_static_type, type_size + 1);
76 memcpy(buffer + type_size + 1, &output_node_id_,
sizeof(
int32_t));
86void SimulationZoneComputeContext::print_current_in_line(std::ostream &stream)
const
88 stream <<
"Simulation Zone ID: " << output_node_id_;
98 const int type_size = strlen(s_static_type);
99 const int buffer_size = type_size + 1 +
sizeof(
int32_t) +
sizeof(
int);
101 char *buffer =
static_cast<char *
>(buffer_owner.
buffer());
102 memcpy(buffer, s_static_type, type_size + 1);
103 memcpy(buffer + type_size + 1, &output_node_id_,
sizeof(
int32_t));
104 memcpy(buffer + type_size + 1 +
sizeof(
int32_t), &iteration_,
sizeof(
int));
105 hash_.mix_in(buffer, buffer_size);
115void RepeatZoneComputeContext::print_current_in_line(std::ostream &stream)
const
117 stream <<
"Repeat Zone ID: " << output_node_id_;
126 const int type_size = strlen(s_static_type);
127 const int buffer_size = type_size + 1 +
sizeof(
int32_t) +
sizeof(
int);
129 char *buffer =
static_cast<char *
>(buffer_owner.
buffer());
130 memcpy(buffer, s_static_type, type_size + 1);
131 memcpy(buffer + type_size + 1, &output_node_id_,
sizeof(
int32_t));
132 memcpy(buffer + type_size + 1 +
sizeof(
int32_t), &index_,
sizeof(
int));
133 hash_.mix_in(buffer, buffer_size);
142void ForeachGeometryElementZoneComputeContext::print_current_in_line(std::ostream &stream)
const
144 stream <<
"Foreach Geometry Element Zone ID: " << output_node_id_;
152 hash_.mix_in(s_static_type, strlen(s_static_type));
155void OperatorComputeContext::print_current_in_line(std::ostream &stream)
const
157 stream <<
"Operator";
const ComputeContext * parent() const
ComputeContext(const char *static_type, const ComputeContext *parent)
ForeachGeometryElementZoneComputeContext(const ComputeContext *parent, int32_t output_node_id, int index)
int32_t output_node_id() const
GroupNodeComputeContext(const ComputeContext *parent, int32_t node_id, const std::optional< ComputeContextHash > &cached_hash={})
const bNodeTree * caller_tree() const
StringRefNull modifier_name() const
ModifierComputeContext(const ComputeContext *parent, std::string modifier_name)
RepeatZoneComputeContext(const ComputeContext *parent, int32_t output_node_id, int iteration)
int32_t output_node_id() const
SimulationZoneComputeContext(const ComputeContext *parent, int output_node_id)
void mix_in(const void *data, int64_t len)