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
This are things I encountered during kernel development.
Operators
Given:
Int a;
Float b;
Float c;
... the following should work:
c = a+b; // No operator for Int, Float combination
c = a*b; // idem
a += 16; // operator doesn't exist
c += b; // operator doesn't exist
a = (b < 0); // Can't assign result BoolExpr to Int
The first three have alternatives:
c = toFloat(a)+b;
c = toFloat(a)*b;
c = c + b;
...but I personally would truly appreciate it if the initial versions worked. I can sort of understand if you want to have explicit casts, but still.
Conversion of number values to DSL
I would appreciate the possibility to mix constants with DSL variables, for example:
Int a = 1;
Float b= 3.14f*radius; // Also mix in expressions
Related, when using generator functions, it would be nice if a Float/Int can be initialized with a (C++) constant, just like with k.run():
voidGenerator(Int a, Float b, int c = 0, int d = 12.34f) { ... }
...
Generator(3, 2.78f);
Generator(valA, valB, 1, 24.68f); // Also, pass in C++ values.
If that works like Where
I would like to see an If-operator that works like Where:
Where (x > 10) x++; End
This works per vector element; if a given element satisfies the condition, the if-block is executed. Other elements are untouched.
Currently, Where only allows assignments and expressions. An If that works analogously, and which allows all statements, would be appreciated.
The text was updated successfully, but these errors were encountered:
This are things I encountered during kernel development.
Operators
Given:
... the following should work:
The first three have alternatives:
...but I personally would truly appreciate it if the initial versions worked. I can sort of understand if you want to have explicit casts, but still.
Conversion of number values to DSL
I would appreciate the possibility to mix constants with DSL variables, for example:
Related, when using generator functions, it would be nice if a Float/Int can be initialized with a (C++) constant, just like with
k.run()
:If
that works likeWhere
I would like to see an
If
-operator that works likeWhere
:This works per vector element; if a given element satisfies the condition, the if-block is executed. Other elements are untouched.
Currently,
Where
only allows assignments and expressions. AnIf
that works analogously, and which allows all statements, would be appreciated.The text was updated successfully, but these errors were encountered: