From: Martin Quinson Date: Sun, 5 Apr 2015 10:17:44 +0000 (+0200) Subject: rename parameters to make them unanbigous X-Git-Tag: v3_12~738^2~6 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/b4aa86eda21745423eed8a01346cecf7346d47fc rename parameters to make them unanbigous --- diff --git a/src/bindings/java/jmsg_task.c b/src/bindings/java/jmsg_task.c index b74ea7c664..1a968d1973 100644 --- a/src/bindings/java/jmsg_task.c +++ b/src/bindings/java/jmsg_task.c @@ -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; } diff --git a/src/bindings/java/org/simgrid/msg/Task.java b/src/bindings/java/org/simgrid/msg/Task.java index 4be7046fad..a6adc84bd8 100644 --- a/src/bindings/java/org/simgrid/msg/Task.java +++ b/src/bindings/java/org/simgrid/msg/Task.java @@ -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 * *