Skip to content
This repository was archived by the owner on Mar 25, 2025. It is now read-only.

Commit c4f2aa2

Browse files
committed
SIMD only for thread safe code.
1 parent 958ff56 commit c4f2aa2

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

src/codegen/codegen_neuron_cpp_visitor.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,12 @@ int CodegenNeuronCppVisitor::position_of_int_var(const std::string& name) const
7676
}
7777

7878

79+
bool CodegenNeuronCppVisitor::parallel_iteration_condition(BlockType type,
80+
const ast::Block* block) {
81+
return info.thread_safe && CodegenCppVisitor::parallel_iteration_condition(type, block);
82+
}
83+
84+
7985
/****************************************************************************************/
8086
/* Backend specific routines */
8187
/****************************************************************************************/

src/codegen/codegen_neuron_cpp_visitor.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,9 @@ class CodegenNeuronCppVisitor: public CodegenCppVisitor {
149149
int position_of_int_var(const std::string& name) const override;
150150

151151

152+
bool parallel_iteration_condition(BlockType type, const ast::Block* block) override;
153+
154+
152155
/****************************************************************************************/
153156
/* Backend specific routines */
154157
/****************************************************************************************/

0 commit comments

Comments
 (0)