Skip to content
Snippets Groups Projects
Commit face9915 authored by noraabiakar's avatar noraabiakar Committed by Benjamin Cumming
Browse files

pass correct index to the NMODL procedures (#610)

Fixes an error in vectorized kernels that sees the incorrect index passed to PROCEDURE calls.
The loop index variable was being passed, instead of the pack of vector indexes.

Fixes #609
parent 2334ada8
No related branches found
No related tags found
No related merge requests found
...@@ -544,7 +544,7 @@ void SimdPrinter::visit(IndexedVariable *sym) { ...@@ -544,7 +544,7 @@ void SimdPrinter::visit(IndexedVariable *sym) {
} }
void SimdPrinter::visit(CallExpression* e) { void SimdPrinter::visit(CallExpression* e) {
out_ << e->name() << "(i_"; out_ << e->name() << "(index_";
for (auto& arg: e->args()) { for (auto& arg: e->args()) {
out_ << ", "; out_ << ", ";
arg->accept(this); arg->accept(this);
...@@ -578,7 +578,7 @@ void SimdPrinter::visit(BlockExpression* block) { ...@@ -578,7 +578,7 @@ void SimdPrinter::visit(BlockExpression* block) {
} }
void emit_simd_procedure_proto(std::ostream& out, ProcedureExpression* e, const std::string& qualified) { void emit_simd_procedure_proto(std::ostream& out, ProcedureExpression* e, const std::string& qualified) {
out << "void " << qualified << (qualified.empty()? "": "::") << e->name() << "(int i_"; out << "void " << qualified << (qualified.empty()? "": "::") << e->name() << "(index_type i_";
for (auto& arg: e->args()) { for (auto& arg: e->args()) {
out << ", const simd_value& " << arg->is_argument()->name(); out << ", const simd_value& " << arg->is_argument()->name();
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment