1
1

MPI_Win_create_dynamic : add Java bindings

Этот коммит содержится в:
Gilles Gouaillardet 2015-06-02 19:07:08 +09:00
родитель 2fa8167383
Коммит ade7de549c
2 изменённых файлов: 32 добавлений и 0 удалений

Просмотреть файл

@ -9,6 +9,8 @@
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2015 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -41,6 +43,18 @@ JNIEXPORT jlong JNICALL Java_mpi_Win_createWin(
return (jlong)win;
}
JNIEXPORT jlong JNICALL Java_mpi_Win_create_dynamicWin(
jlong info, jlong comm)
{
MPI_Win win;
int rc = MPI_Win_create_dynamic(
(MPI_Info)info, (MPI_Comm)comm, &win);
ompi_java_exceptionCheck(env, rc);
return (jlong)win;
}
JNIEXPORT jlong JNICALL Java_mpi_Win_getGroup(
JNIEnv *env, jobject jthis, jlong win)
{

Просмотреть файл

@ -9,6 +9,8 @@
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2015 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -65,6 +67,22 @@ private native long createWin(
Buffer base, int size, int dispUnit, long info, long comm)
throws MPIException;
/**
* Java binding of {@code MPI_WIN_CREATE_DYNAMIC}.
* @param info info object
* @param comm communicator
* @throws MPIException
*/
public Win(Info info, Comm comm)
throws MPIException
{
handle = createWinDynamic(info.handle, comm.handle);
}
private native long createWinDynamic(
long info, long comm)
throws MPIException;
private int getBaseType(Datatype orgType, Datatype targetType)
{
int baseType = orgType.baseType;