You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In NVCC there is no overloaded function for, e.g., exp(a) if a is an integer variable or constant. This could lead to problems if users use integers in their models. A case in point is brian-team/brian2genn#133
Suggested solution is to define overloaded functions for all math functions like so:
for the CUDA backend.
However, this would mean that there is a potential discrepancy for the CPU version, in which exp(a) for integer a resolves to double. We could therefore also add
scalar exp(int x) {
returnexp((scalar) x);
}
for the CPU backend.
The text was updated successfully, but these errors were encountered:
It will be a little more tricky for the CPU backend as these overloads will clash with the existing integer overloads but maybe they can be 'hidden' somehow..
In NVCC there is no overloaded function for, e.g.,
exp(a)
if a is an integer variable or constant. This could lead to problems if users use integers in their models. A case in point is brian-team/brian2genn#133Suggested solution is to define overloaded functions for all math functions like so:
for the CUDA backend.
However, this would mean that there is a potential discrepancy for the CPU version, in which
exp(a)
for integer a resolves todouble
. We could therefore also addfor the CPU backend.
The text was updated successfully, but these errors were encountered: