Skip to content

Commit

Permalink
Fix thread_variable conditions.
Browse files Browse the repository at this point in the history
  • Loading branch information
1uc committed Nov 12, 2024
1 parent a085c6f commit 6b371a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/codegen/codegen_helper_visitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ void CodegenHelperVisitor::find_non_range_variables() {

// if model is thread safe and if parameter is being written then
// those variables should be promoted to thread safe variable
if (info.vectorize && info.thread_safe && var->get_write_count() > 0) {
if (info.vectorize && info.declared_thread_safe && var->get_write_count() > 0) {
var->mark_thread_safe();
info.thread_variables.push_back(var);
info.thread_var_data_size += var->get_length();
Expand Down

0 comments on commit 6b371a2

Please sign in to comment.