Repository: incubator-systemml Updated Branches: refs/heads/master 7f8716b64 -> f8f423c3b
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/f8f423c3/src/test/scripts/functions/updateinplace/updateinplace15.dml ---------------------------------------------------------------------- diff --git a/src/test/scripts/functions/updateinplace/updateinplace15.dml b/src/test/scripts/functions/updateinplace/updateinplace15.dml new file mode 100644 index 0000000..c45c5a8 --- /dev/null +++ b/src/test/scripts/functions/updateinplace/updateinplace15.dml @@ -0,0 +1,39 @@ +#------------------------------------------------------------- +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +#------------------------------------------------------------- + +n = 2; +m = 2; + +parfor (j in 1:m, log=DEBUG){ + A = matrix(3, rows=n, cols=1); + B = matrix(2, rows=n, cols=1); + i = 1 + while (i <= n){ + if (i < 5) + print("i = " + i + " j = " + j + " Sum(A) = " + sum(A)); + if (i < 5) + B = A + A[i,1] = j*7+i; + if(i < 5) + print("j = " + j + " Sum(B) = " + sum(B)); + i = i + 1 + } +} http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/f8f423c3/src/test/scripts/functions/updateinplace/updateinplace2.dml ---------------------------------------------------------------------- diff --git a/src/test/scripts/functions/updateinplace/updateinplace2.dml b/src/test/scripts/functions/updateinplace/updateinplace2.dml new file mode 100644 index 0000000..bf0069b --- /dev/null +++ b/src/test/scripts/functions/updateinplace/updateinplace2.dml @@ -0,0 +1,36 @@ +#------------------------------------------------------------- +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +#------------------------------------------------------------- + +n = 2; +m = 2; + +parfor (j in 1:m, log=DEBUG){ + A = matrix(3, rows=n, cols=1); + B = matrix(2, rows=n, cols=1); + i = 1 + while (i <= n){ + print("i = " + i + " j = " + j + " Sum(B) = " + sum(B)); + if(1 == 1) + B = A + A[i,1] = j*7+i; + i = i + 1 + } +} http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/f8f423c3/src/test/scripts/functions/updateinplace/updateinplace3.dml ---------------------------------------------------------------------- diff --git a/src/test/scripts/functions/updateinplace/updateinplace3.dml b/src/test/scripts/functions/updateinplace/updateinplace3.dml new file mode 100644 index 0000000..0db8da9 --- /dev/null +++ b/src/test/scripts/functions/updateinplace/updateinplace3.dml @@ -0,0 +1,38 @@ +#------------------------------------------------------------- +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +#------------------------------------------------------------- + +n = 2; +m = 2; + +parfor (j in 1:m, log=DEBUG){ + A = matrix(3, rows=n, cols=1); + B = matrix(2, rows=n, cols=1); + i = 1 + while (i <= n){ + if (i < 5) + print("i = " + i + " j = " + j + " Sum(A) = " + sum(A)); + if (1 == 1) + B = A + A[i,1] = j*7+i; + i = i + 1 + } + print("j = " + j + " Sum(B) = " + sum(B)); +} http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/f8f423c3/src/test/scripts/functions/updateinplace/updateinplace4.dml ---------------------------------------------------------------------- diff --git a/src/test/scripts/functions/updateinplace/updateinplace4.dml b/src/test/scripts/functions/updateinplace/updateinplace4.dml new file mode 100644 index 0000000..4b01503 --- /dev/null +++ b/src/test/scripts/functions/updateinplace/updateinplace4.dml @@ -0,0 +1,37 @@ +#------------------------------------------------------------- +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +#------------------------------------------------------------- + +n = 2; +m = 2; + +parfor (j in 1:m, log=DEBUG){ + A = matrix(3, rows=n, cols=1); + B = matrix(2, rows=n, cols=1); + i = 1 + while (i <= n){ + if (1 == 1) + print("i = " + i + " j = " + j + " Sum(A) = " + sum(A)); + if (1 == 1) + B = A + A[i,1] = j*7+i; + i = i + 1 + } +} http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/f8f423c3/src/test/scripts/functions/updateinplace/updateinplace5.dml ---------------------------------------------------------------------- diff --git a/src/test/scripts/functions/updateinplace/updateinplace5.dml b/src/test/scripts/functions/updateinplace/updateinplace5.dml new file mode 100644 index 0000000..41bc618 --- /dev/null +++ b/src/test/scripts/functions/updateinplace/updateinplace5.dml @@ -0,0 +1,34 @@ +#------------------------------------------------------------- +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +#------------------------------------------------------------- + +n = 2; +m = 2; + +parfor (j in 1:m, log=DEBUG){ + A = matrix(3, rows=n, cols=1); + B = matrix(2, rows=n, cols=1); + for (i in 1:n){ + print("i = " + i + " j = " + j + " Sum(B) = " + sum(B)); + if(1 == 1) + B = A + A[i,1] = j*7+i; + } +} http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/f8f423c3/src/test/scripts/functions/updateinplace/updateinplace6.dml ---------------------------------------------------------------------- diff --git a/src/test/scripts/functions/updateinplace/updateinplace6.dml b/src/test/scripts/functions/updateinplace/updateinplace6.dml new file mode 100644 index 0000000..b92d713 --- /dev/null +++ b/src/test/scripts/functions/updateinplace/updateinplace6.dml @@ -0,0 +1,40 @@ +#------------------------------------------------------------- +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +#------------------------------------------------------------- + +n = 2; +m = 2; + +parfor (j in 1:m, log=DEBUG){ + A = matrix(3, rows=n, cols=n); + B = matrix(2, rows=n, cols=n); + C = matrix(1, rows=n, cols=n); + D = matrix(1, rows=n, cols=n); + i = 1 + while (i <= n){ + print("i = " + i + " j = " + j + " Sum(D) = " + sum(D)); + if(1 == 1) { + B = A + D = C %*% (t(B) * 7) + } + A[i,1] = j*7+i; + i = i + 1 + } +} http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/f8f423c3/src/test/scripts/functions/updateinplace/updateinplace7.dml ---------------------------------------------------------------------- diff --git a/src/test/scripts/functions/updateinplace/updateinplace7.dml b/src/test/scripts/functions/updateinplace/updateinplace7.dml new file mode 100644 index 0000000..b00dd22 --- /dev/null +++ b/src/test/scripts/functions/updateinplace/updateinplace7.dml @@ -0,0 +1,39 @@ +#------------------------------------------------------------- +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +#------------------------------------------------------------- + +n = 2; +m = 2; + +parfor (j in 1:m, log=DEBUG){ + A = matrix(3, rows=n, cols=n); + B = matrix(2, rows=n, cols=n); + C = matrix(1, rows=n, cols=n); + D = matrix(1, rows=n, cols=n); + i = 1 + while (i <= n){ + print("i = " + i + " j = " + j + " Sum(D) = " + sum(D)); + if(1 == 1) { + D = C %*% (t(A) * 7) + } + A[i,1] = j*7+i; + i = i + 1 + } +} http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/f8f423c3/src/test/scripts/functions/updateinplace/updateinplace8.dml ---------------------------------------------------------------------- diff --git a/src/test/scripts/functions/updateinplace/updateinplace8.dml b/src/test/scripts/functions/updateinplace/updateinplace8.dml new file mode 100644 index 0000000..fb58024 --- /dev/null +++ b/src/test/scripts/functions/updateinplace/updateinplace8.dml @@ -0,0 +1,39 @@ +#------------------------------------------------------------- +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +#------------------------------------------------------------- + +n = 2; +m = 2; + +parfor (j in 1:m, log=DEBUG){ + A = matrix(3, rows=n, cols=1); + B = matrix(2, rows=n, cols=1); + C = matrix(4, rows=n, cols=1); + i = 1 + while (i <= n){ + print("i = " + i + " j = " + j + " Sum(B) = " + sum(B)); + if(i < 5) + C = A + else + B = A + A[i,1] = j*7+i; + i = i + 1 + } +} http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/f8f423c3/src/test/scripts/functions/updateinplace/updateinplace9.dml ---------------------------------------------------------------------- diff --git a/src/test/scripts/functions/updateinplace/updateinplace9.dml b/src/test/scripts/functions/updateinplace/updateinplace9.dml new file mode 100644 index 0000000..e5c851b --- /dev/null +++ b/src/test/scripts/functions/updateinplace/updateinplace9.dml @@ -0,0 +1,38 @@ +#------------------------------------------------------------- +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +#------------------------------------------------------------- + +n = 2; +m = 2; + +parfor (j in 1:m, log=DEBUG){ + A = matrix(3, rows=n, cols=1); + B = matrix(2, rows=n, cols=1); + i = 1 + while (i <= n){ + if (sum(A) < 5) + print("i = " + i + " j = " + j + " Sum(A) = " + sum(A)); + if (i < 5) + B = A + A[i,1] = j*7+i; + i = i + 1 + } + print("j = " + j + " Sum(B) = " + sum(B)); +}
