Skip to content

Commit

Permalink
SIMD only for thread safe code.
Browse files Browse the repository at this point in the history
  • Loading branch information
1uc committed Nov 7, 2024
1 parent 958ff56 commit c4f2aa2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/codegen/codegen_neuron_cpp_visitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,12 @@ int CodegenNeuronCppVisitor::position_of_int_var(const std::string& name) const
}


bool CodegenNeuronCppVisitor::parallel_iteration_condition(BlockType type,
const ast::Block* block) {
return info.thread_safe && CodegenCppVisitor::parallel_iteration_condition(type, block);
}


/****************************************************************************************/
/* Backend specific routines */
/****************************************************************************************/
Expand Down
3 changes: 3 additions & 0 deletions src/codegen/codegen_neuron_cpp_visitor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,9 @@ class CodegenNeuronCppVisitor: public CodegenCppVisitor {
int position_of_int_var(const std::string& name) const override;


bool parallel_iteration_condition(BlockType type, const ast::Block* block) override;


/****************************************************************************************/
/* Backend specific routines */
/****************************************************************************************/
Expand Down

0 comments on commit c4f2aa2

Please sign in to comment.