Skip to content
This repository has been archived by the owner on Jun 8, 2023. It is now read-only.

Do not emit duplicate definitions of _MATELM%d #93

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/mod2c_core/kinetic.c
Original file line number Diff line number Diff line change
Expand Up @@ -960,7 +960,10 @@ Insertstr(rlst->position, "}");
*(_getelm(_row + 1, _col + 1))\n", fun->u.i);
qv = linsertstr(procfunc, buf);
#if VECTORIZE
Sprintf(buf, "\nconstexpr coreneuron::scopmath::enabled_code code_to_enable{coreneuron::scopmath::enabled_code::all};\n#define _MATELM%d(_row,_col) coreneuron::scopmath::sparse::thread_getelm<code_to_enable>(static_cast<SparseObj*>(_so), _row + 1, _col + 1, _iml)[_iml]\n", fun->u.i);
Sprintf(buf, "#ifndef _MATELM%d\n"
"constexpr coreneuron::scopmath::enabled_code code_to_enable{coreneuron::scopmath::enabled_code::all};\n"
"#define _MATELM%d(_row,_col) coreneuron::scopmath::sparse::thread_getelm<code_to_enable>(static_cast<SparseObj*>(_so), _row + 1, _col + 1, _iml)[_iml]\n"
"#endif\n", fun->u.i, fun->u.i);
vectorize_substitute(qv, buf);
#endif
{static int first = 1; if (first) {
Expand Down