root/ompi/mpi/java/c/mpi_Prequest.c

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. Java_mpi_Prequest_start
  2. Java_mpi_Prequest_startAll

   1 /*
   2  * Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana
   3  *                         University Research and Technology
   4  *                         Corporation.  All rights reserved.
   5  * Copyright (c) 2004-2005 The University of Tennessee and The University
   6  *                         of Tennessee Research Foundation.  All rights
   7  *                         reserved.
   8  * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
   9  *                         University of Stuttgart.  All rights reserved.
  10  * Copyright (c) 2004-2005 The Regents of the University of California.
  11  *                         All rights reserved.
  12  * $COPYRIGHT$
  13  *
  14  * Additional copyrights may follow
  15  *
  16  * $HEADER$
  17  */
  18 
  19 #include "ompi_config.h"
  20 #include <stdlib.h>
  21 #include <assert.h>
  22 #ifdef HAVE_TARGETCONDITIONALS_H
  23 #include <TargetConditionals.h>
  24 #endif
  25 
  26 #include "mpi.h"
  27 #include "mpi_Prequest.h"
  28 #include "mpiJava.h"
  29 
  30 JNIEXPORT jlong JNICALL Java_mpi_Prequest_start(
  31         JNIEnv *env, jobject jthis, jlong jRequest)
  32 {
  33     MPI_Request request = (MPI_Request)jRequest;
  34     int rc = MPI_Start(&request);
  35     ompi_java_exceptionCheck(env, rc);
  36     return (jlong)request;
  37 }
  38 
  39 JNIEXPORT void JNICALL Java_mpi_Prequest_startAll(
  40         JNIEnv *env, jclass clazz, jlongArray prequests)
  41 {
  42     int count = (*env)->GetArrayLength(env, prequests);
  43     jlong* jReq;
  44     MPI_Request *cReq;
  45     ompi_java_getPtrArray(env, prequests, &jReq, (void***)&cReq);
  46     int rc = MPI_Startall(count, cReq);
  47     ompi_java_exceptionCheck(env, rc);
  48     ompi_java_releasePtrArray(env, prequests, jReq, (void**)cReq);
  49 }

/* [<][>][^][v][top][bottom][index][help] */