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
VeoFunction's know the types of their arguments (pointer/integer, float/double). Thus when we call the function it would be nice if py-veo could attempt to coerce whatever objects we pass into these types. For instance, if the type to be passed to the kernel is an integer of some type we should call arg.__index__() on whatever object is passed to VeoFunction.__call__(...). Similarly, if the type is a float or double we should call arg.__float__().
This is nice as it enables one to define smart pointers and would enable one to directly pass a VEMemPtr to a kernel (since VEMemPtr would implement index() and hence would be coerced into an integer upon being passed as an argument to a kernel). It also fits well with the duck-typed nature of Python.
The text was updated successfully, but these errors were encountered:
VeoFunction's know the types of their arguments (pointer/integer, float/double). Thus when we call the function it would be nice if py-veo could attempt to coerce whatever objects we pass into these types. For instance, if the type to be passed to the kernel is an integer of some type we should call
arg.__index__()
on whatever object is passed toVeoFunction.__call__(...)
. Similarly, if the type is a float or double we should callarg.__float__()
.This is nice as it enables one to define smart pointers and would enable one to directly pass a VEMemPtr to a kernel (since VEMemPtr would implement index() and hence would be coerced into an integer upon being passed as an argument to a kernel). It also fits well with the duck-typed nature of Python.
The text was updated successfully, but these errors were encountered: