mnemonic-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject [01/14] incubator-mnemonic git commit: MNEMONIC-159: add a selective mode parameter to the perform() of DNCS
Date Mon, 21 Nov 2016 17:32:27 GMT
Repository: incubator-mnemonic
Updated Branches:
  refs/heads/master 3b000612c -> becaead0e


MNEMONIC-159: add a selective mode parameter to the perform() of DNCS


Project: http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/commit/e2eb6b01
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/tree/e2eb6b01
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/diff/e2eb6b01

Branch: refs/heads/master
Commit: e2eb6b01ec904fd1240507c73195fcc5c17b97bd
Parents: 3b00061
Author: Wang, Gang(Gary) <gang1.wang@intel.com>
Authored: Mon Nov 14 10:50:34 2016 -0800
Committer: Wang, Gang(Gary) <gang1.wang@intel.com>
Committed: Thu Nov 17 12:47:52 2016 -0800

----------------------------------------------------------------------
 .../service/computingservice/internal/PrintServiceImpl.java  | 2 +-
 .../service/computingservice/internal/SortServiceImpl.java   | 8 +++++---
 .../computingservice/DurableSinglyLinkedListNGPrintTest.java | 4 ++--
 .../computingservice/DurableSinglyLinkedListNGSortTest.java  | 4 ++--
 .../service/computingservice/GeneralComputingService.java    | 5 ++++-
 5 files changed, 14 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/blob/e2eb6b01/mnemonic-computing-services/mnemonic-utilities-service/src/main/java/org/apache/mnemonic/service/computingservice/internal/PrintServiceImpl.java
----------------------------------------------------------------------
diff --git a/mnemonic-computing-services/mnemonic-utilities-service/src/main/java/org/apache/mnemonic/service/computingservice/internal/PrintServiceImpl.java
b/mnemonic-computing-services/mnemonic-utilities-service/src/main/java/org/apache/mnemonic/service/computingservice/internal/PrintServiceImpl.java
index 469b813..ef82755 100644
--- a/mnemonic-computing-services/mnemonic-utilities-service/src/main/java/org/apache/mnemonic/service/computingservice/internal/PrintServiceImpl.java
+++ b/mnemonic-computing-services/mnemonic-utilities-service/src/main/java/org/apache/mnemonic/service/computingservice/internal/PrintServiceImpl.java
@@ -42,7 +42,7 @@ public class PrintServiceImpl implements GeneralComputingService {
    * {@inheritDoc}
    */
   @Override
-  public long[] perform(ValueInfo[] valinfos) {
+  public long[] perform(String mode, ValueInfo[] valinfos) {
     long[] ret = null;
     if (null != valinfos) {
       ret = nperformPrint(valinfos);

http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/blob/e2eb6b01/mnemonic-computing-services/mnemonic-utilities-service/src/main/java/org/apache/mnemonic/service/computingservice/internal/SortServiceImpl.java
----------------------------------------------------------------------
diff --git a/mnemonic-computing-services/mnemonic-utilities-service/src/main/java/org/apache/mnemonic/service/computingservice/internal/SortServiceImpl.java
b/mnemonic-computing-services/mnemonic-utilities-service/src/main/java/org/apache/mnemonic/service/computingservice/internal/SortServiceImpl.java
index ace277c..ffa99d1 100644
--- a/mnemonic-computing-services/mnemonic-utilities-service/src/main/java/org/apache/mnemonic/service/computingservice/internal/SortServiceImpl.java
+++ b/mnemonic-computing-services/mnemonic-utilities-service/src/main/java/org/apache/mnemonic/service/computingservice/internal/SortServiceImpl.java
@@ -42,10 +42,12 @@ public class SortServiceImpl implements GeneralComputingService {
    * {@inheritDoc}
    */
   @Override
-  public long[] perform(ValueInfo[] valinfos) {
+  public long[] perform(String mode, ValueInfo[] valinfos) {
     long[] ret = null;
-    if (null != valinfos) {
-      ret = nperformBubbleSort(valinfos);
+    if (null != mode && null != valinfos) {
+      if ("tensor_bubble".equals(mode)) {
+        ret = nperformBubbleSort(valinfos);
+      }
     }
     return ret;
   }

http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/blob/e2eb6b01/mnemonic-computing-services/mnemonic-utilities-service/src/test/java/org/apache/mnemonic/service/computingservice/DurableSinglyLinkedListNGPrintTest.java
----------------------------------------------------------------------
diff --git a/mnemonic-computing-services/mnemonic-utilities-service/src/test/java/org/apache/mnemonic/service/computingservice/DurableSinglyLinkedListNGPrintTest.java
b/mnemonic-computing-services/mnemonic-utilities-service/src/test/java/org/apache/mnemonic/service/computingservice/DurableSinglyLinkedListNGPrintTest.java
index e387fff..7a4038e 100644
--- a/mnemonic-computing-services/mnemonic-utilities-service/src/test/java/org/apache/mnemonic/service/computingservice/DurableSinglyLinkedListNGPrintTest.java
+++ b/mnemonic-computing-services/mnemonic-utilities-service/src/test/java/org/apache/mnemonic/service/computingservice/DurableSinglyLinkedListNGPrintTest.java
@@ -137,7 +137,7 @@ public class DurableSinglyLinkedListNGPrintTest {
     vinfo.dtype = DurableType.SHORT;
     vinfo.frames = Utils.genNativeParamForm(objstack, fidinfostack);
     ValueInfo[] vinfos = {vinfo};
-    gcsvr.perform(vinfos);
+    gcsvr.perform(null, vinfos);
 
   }
 
@@ -231,7 +231,7 @@ public class DurableSinglyLinkedListNGPrintTest {
     vinfo.dtype = DurableType.DOUBLE;
     vinfo.frames = Utils.genNativeParamForm(objstack, fidinfostack);
     ValueInfo[] vinfos = {vinfo};
-    gcsvr.perform(vinfos);
+    gcsvr.perform(null, vinfos);
 
     // Assert.assert, expected);(plist, plist2);
 

http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/blob/e2eb6b01/mnemonic-computing-services/mnemonic-utilities-service/src/test/java/org/apache/mnemonic/service/computingservice/DurableSinglyLinkedListNGSortTest.java
----------------------------------------------------------------------
diff --git a/mnemonic-computing-services/mnemonic-utilities-service/src/test/java/org/apache/mnemonic/service/computingservice/DurableSinglyLinkedListNGSortTest.java
b/mnemonic-computing-services/mnemonic-utilities-service/src/test/java/org/apache/mnemonic/service/computingservice/DurableSinglyLinkedListNGSortTest.java
index 1c939d3..1697341 100644
--- a/mnemonic-computing-services/mnemonic-utilities-service/src/test/java/org/apache/mnemonic/service/computingservice/DurableSinglyLinkedListNGSortTest.java
+++ b/mnemonic-computing-services/mnemonic-utilities-service/src/test/java/org/apache/mnemonic/service/computingservice/DurableSinglyLinkedListNGSortTest.java
@@ -141,7 +141,7 @@ public class DurableSinglyLinkedListNGSortTest {
     vinfo.dtype = DurableType.SHORT;
     vinfo.frames = Utils.genNativeParamForm(objstack, fidinfostack);
     ValueInfo[] vinfos = {vinfo};
-    long[] ret = gcsvr.perform(vinfos);
+    long[] ret = gcsvr.perform("tensor_bubble", vinfos);
 
     Assert.assertEquals(1, ret.length);
     long handler2 = ret[0];
@@ -262,7 +262,7 @@ public class DurableSinglyLinkedListNGSortTest {
     vinfo.dtype = DurableType.DOUBLE;
     vinfo.frames = Utils.genNativeParamForm(objstack, fidinfostack);
     ValueInfo[] vinfos = {vinfo};
-    gcsvr.perform(vinfos);
+    gcsvr.perform("tensor_bubble", vinfos);
 
     // Assert.assert, expected);(plist, plist2);
     DurableSinglyLinkedList<DurableSinglyLinkedList<Double>> linkedvals3 = DurableSinglyLinkedListFactory.restore(m_act,

http://git-wip-us.apache.org/repos/asf/incubator-mnemonic/blob/e2eb6b01/mnemonic-core/src/main/java/org/apache/mnemonic/service/computingservice/GeneralComputingService.java
----------------------------------------------------------------------
diff --git a/mnemonic-core/src/main/java/org/apache/mnemonic/service/computingservice/GeneralComputingService.java
b/mnemonic-core/src/main/java/org/apache/mnemonic/service/computingservice/GeneralComputingService.java
index e05fec6..1608e96 100644
--- a/mnemonic-core/src/main/java/org/apache/mnemonic/service/computingservice/GeneralComputingService.java
+++ b/mnemonic-core/src/main/java/org/apache/mnemonic/service/computingservice/GeneralComputingService.java
@@ -38,11 +38,14 @@ public interface GeneralComputingService {
   /**
    * perform native functionalities according to prepared computing parameters
    *
+   * @param mode
+   *         a selection mode of run instance
+   *
    * @param valinfos
    *         an array of value info
    *
    * @return the array of handler about updated object graphs if any
    */
-  long[] perform(ValueInfo[] valinfos);
+  long[] perform(String mode, ValueInfo[] valinfos);
 
 }


Mime
View raw message