systemml-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthias Boehm (JIRA)" <j...@apache.org>
Subject [jira] [Created] (SYSTEMML-1981) Wrong value type propagation in function w/ auto cast of inputs
Date Thu, 02 Nov 2017 03:56:00 GMT
Matthias Boehm created SYSTEMML-1981:
----------------------------------------

             Summary: Wrong value type propagation in function w/ auto cast of inputs
                 Key: SYSTEMML-1981
                 URL: https://issues.apache.org/jira/browse/SYSTEMML-1981
             Project: SystemML
          Issue Type: Bug
            Reporter: Matthias Boehm
            Priority: Minor


The following code returns the output as {{DOUBLE}} although it's supposed to return {{INT}}.

{code}
foo = function(Matrix[double] X, int input) return (int out) {
  out = input;
  for(i in 1:2) {
    tmp = sum(X);
    out = input + as.integer(tmp);
  }
}

X = seq(1,100);
xmax = max(X); #input of type double
y = foo(X, xmax); #auto casting
print(y);
{code}

This is a minor issue but creates warnings that are annoying if such a function is called
very often:
{{code}}
17/11/01 20:49:00 WARN controlprogram.ProgramBlock: Function output out has wrong value type:
DOUBLE.
{{code}}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message