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 Oct 30, 2024
1 parent c82d0ab commit f349ae6
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 @@ -74,6 +74,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 @@ -147,6 +147,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 f349ae6

Please sign in to comment.