Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
rename parameters to make them unanbigous
authorMartin Quinson <martin.quinson@loria.fr>
Sun, 5 Apr 2015 10:17:44 +0000 (12:17 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Sun, 5 Apr 2015 10:17:44 +0000 (12:17 +0200)
src/bindings/java/jmsg_task.c
src/bindings/java/org/simgrid/msg/Task.java

index b74ea7c..1a968d1 100644 (file)
@@ -64,24 +64,24 @@ Java_org_simgrid_msg_Task_nativeInit(JNIEnv *env, jclass cls) {
 JNIEXPORT void JNICALL
 Java_org_simgrid_msg_Task_create(JNIEnv * env,
                                       jobject jtask, jstring jname,
-                                      jdouble jcomputeDuration,
-                                      jdouble jmessageSize)
+                                      jdouble jflopsAmount,
+                                      jdouble jbytesAmount)
 {
   msg_task_t task;                /* the native task to create                            */
   const char *name = NULL;      /* the name of the task                                 */
 
-  if (jcomputeDuration < 0) {
+  if (jflopsAmount < 0) {
     jxbt_throw_illegal(env,
                        bprintf
-                       ("Task ComputeDuration (%f) cannot be negative",
-                        (double) jcomputeDuration));
+                       ("Task flopsAmount (%f) cannot be negative",
+                        (double) jflopsAmount));
     return;
   }
 
-  if (jmessageSize < 0) {
+  if (jbytesAmount < 0) {
     jxbt_throw_illegal(env,
-                       bprintf("Task MessageSize (%f) cannot be negative",
-                       (double) jmessageSize));
+                       bprintf("Task bytesAmount (%f) cannot be negative",
+                       (double) jbytesAmount));
     return;
   }
 
@@ -92,8 +92,8 @@ Java_org_simgrid_msg_Task_create(JNIEnv * env,
 
   /* create the task */
   task =
-      MSG_task_create(name, (double) jcomputeDuration,
-                     (double) jmessageSize, NULL);
+      MSG_task_create(name, (double) jflopsAmount,
+                     (double) jbytesAmount, NULL);
   if (jname)
     (*env)->ReleaseStringUTFChars(env, jname, name);
   /* sets the task name */
@@ -128,14 +128,14 @@ Java_org_simgrid_msg_Task_parallelCreate(JNIEnv * env,
   if (!jcomputeDurations_arg) {
     jxbt_throw_null(env,
                     xbt_strdup
-                    ("Parallel task compute durations cannot be null"));
+                    ("Parallel task flops amounts cannot be null"));
     return;
   }
 
   if (!jmessageSizes_arg) {
     jxbt_throw_null(env,
                     xbt_strdup
-                    ("Parallel task message sizes cannot be null"));
+                    ("Parallel task bytes amounts cannot be null"));
     return;
   }
 
index 4be7046..a6adc84 100644 (file)
@@ -46,17 +46,17 @@ public class Task {
         *
         * @param name  Task's name
         *
-        * @param computeDuration       A value of the processing amount (in flop) needed to process the task. 
+        * @param flopsAmount   A value of the processing amount (in flop) needed to process the task. 
         *                              If 0, then it cannot be executed with the execute() method.
         *                              This value has to be >= 0.
         *
-        * @param messageSize           A value of amount of data (in bytes) needed to transfert this task.
+        * @param bytesAmount           A value of amount of data (in bytes) needed to transfert this task.
         *                              If 0, then it cannot be transfered with the get() and put() methods.
         *                              This value has to be >= 0.
         */ 
-       public Task(String name, double computeDuration, double messageSize) {
-               create(name, computeDuration, messageSize);
-               this.messageSize = messageSize;
+       public Task(String name, double flopsAmount, double bytesAmount) {
+               create(name, flopsAmount, bytesAmount);
+               this.messageSize = bytesAmount;
                setId(idCpt);
                idCpt++;
        }
@@ -66,44 +66,44 @@ public class Task {
         *
         * @param name          The name of the parallel task.
         * @param hosts         The list of hosts implied by the parallel task.
-        * @param computeDurations      The amount of operations to be performed by each host of \a hosts.
-        * @param messageSizes  A matrix describing the amount of data to exchange between hosts.
+        * @param flopsAmount   The amount of operations to be performed by each host of \a hosts.
+        * @param bytesAmount   A matrix describing the amount of data to exchange between hosts.
         */ 
-       public Task(String name, Host[]hosts, double[]computeDurations, double[]messageSizes) {
-               parallelCreate(name, hosts, computeDurations, messageSizes);
+       public Task(String name, Host[]hosts, double[]flopsAmount, double[]bytesAmount) {
+               parallelCreate(name, hosts, flopsAmount, bytesAmount);
        }
        
        /**
         * The natively implemented method to create a MSG task.
         *
         * @param name            The name of th task.
-        * @param computeDuration    A value of the processing amount (in flop) needed 
+        * @param flopsAmount    A value of the processing amount (in flop) needed 
         *                        to process the task. If 0, then it cannot be executed
         *                        with the execute() method. This value has to be >= 0.
-        * @param messageSize        A value of amount of data (in bytes) needed to transfert 
+        * @param bytesAmount        A value of amount of data (in bytes) needed to transfert 
         *                        this task. If 0, then it cannot be transfered this task. 
         *                        If 0, then it cannot be transfered with the get() and put() 
         *                        methods. This value has to be >= 0.
         * @exception             IllegalArgumentException if compute duration <0 or message size <0
         */
        private final native void create(String name,
-                       double computeDuration,
-                       double messageSize)
+                       double flopsAmount,
+                       double bytesAmount)
        throws IllegalArgumentException;                
        /**
         * The natively implemented method to create a MSG parallel task.
         *
         * @param name                The name of the parallel task.
         * @param hosts                The list of hosts implied by the parallel task.
-        * @param computeDurations    The total number of operations that have to be performed
+        * @param flopsAmount         The total number of operations that have to be performed
         *                            on the hosts.
-        * @param messageSizes        An array of doubles
+        * @param bytesAmount        An array of doubles
         *
         */
        private final native void parallelCreate(String name,
                        Host[]hosts,
-                       double[]computeDurations,
-                       double[]messageSizes)
+                       double[]flopsAmount,
+                       double[]bytesAmount)
        throws NullPointerException, IllegalArgumentException;
        /* *                   * *
         * * Getters / Setters * *