systemml-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Dusenberry (JIRA)" <>
Subject [jira] [Commented] (SYSTEMML-1444) UDFs w/ single output in expressions
Date Tue, 25 Jul 2017 18:06:00 GMT


Mike Dusenberry commented on SYSTEMML-1444:

Thanks, [~return_01] for working on this!  For the multiple output case, I think we would
need full support for tuples, complete with indexing and automatic packing & unpacking.
 Then, functions with "multiple outputs" would actually be returning a single tuple of outputs,
with syntax that would allow for automatic unpacking on assignment.  This is how Python and
others handle this problem.

Using your example, we could assign the results to a tuple variable as

my_tuple = udf(a, b)

or we could unpack into variables as

X, x = udf(a, b)

which is equivalent to

(X, x) = udf(a, b)

and we could use it inline by indexing into the tuple as

Y = udf(a, b)[1] + c  # assuming 1-indexing like the rest of DML

Having support for tuples would be incredibly useful in the general case.  I agree that it
may take a large amount of work, so I would recommend starting with the single-output case,
and keeping the tuple case in mind so that it is reasonable to expand to that afterwards.

> UDFs w/ single output in expressions
> ------------------------------------
>                 Key: SYSTEMML-1444
>                 URL:
>             Project: SystemML
>          Issue Type: Sub-task
>          Components: APIs, Compiler, Runtime
>            Reporter: Matthias Boehm
>            Assignee: Janardhan
>             Fix For: SystemML 1.0

This message was sent by Atlassian JIRA

View raw message