JNIEXPORT void JNICALL Java_mpi_File_readOrdered( JNIEnv *env, jobject jthis, jlong fh, jobject buf, jboolean db, jint off, jint count, jlong jType, jint bType, jlongArray stat) { MPI_Datatype type = (MPI_Datatype)jType; void *ptr; ompi_java_buffer_t *item; ompi_java_getWritePtr(&ptr, &item, env, buf, db, count, type); MPI_Status status; int rc = MPI_File_read_ordered((MPI_File)fh, ptr, count, type, &status); ompi_java_exceptionCheck(env, rc); ompi_java_releaseWritePtr(ptr, item, env, buf, db, off, count, type, bType); ompi_java_status_set(env, stat, &status); }
JNIEXPORT jlong JNICALL Java_mpi_Message_mRecv( JNIEnv *env, jobject jthis, jlong jMessage, jobject buf, jboolean db, jint off, jint count, jlong jType, jint bType, jlongArray jStatus) { MPI_Message message = (MPI_Message)jMessage; MPI_Datatype type = (MPI_Datatype)jType; void *ptr; ompi_java_buffer_t *item; ompi_java_getWritePtr(&ptr, &item, env, buf, db, count, type); MPI_Status status; int rc = MPI_Mrecv(ptr, count, type, &message, &status); ompi_java_exceptionCheck(env, rc); ompi_java_status_set(env, jStatus, &status); ompi_java_releaseWritePtr(ptr, item, env, buf, db, off, count, type, bType); return (jlong)message; }