MPI_Win_{get,set}_info : add Java bindings
Этот коммит содержится в:
родитель
0836344673
Коммит
7e0581c853
@ -279,3 +279,23 @@ JNIEXPORT jlong JNICALL Java_mpi_Win_free(
|
||||
ompi_java_exceptionCheck(env, rc);
|
||||
return (jlong)win;
|
||||
}
|
||||
|
||||
JNIEXPORT jlong JNICALL Java_mpi_Win_getInfo(
|
||||
JNIEnv *env, jobject jthis, jlong handle)
|
||||
{
|
||||
MPI_Win win = (MPI_Win)handle;
|
||||
MPI_Info info;
|
||||
int rc = MPI_Win_get_info((MPI_Win)win, &info);
|
||||
ompi_java_exceptionCheck(env, rc);
|
||||
return (jlong)info;
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_mpi_Win_setInfo(
|
||||
JNIEnv *env, jobject jthis, jlong handle, jlong i)
|
||||
{
|
||||
MPI_Win win = (MPI_Win)handle;
|
||||
MPI_Info info = (MPI_Info)i;
|
||||
int rc = MPI_Win_set_info(win, info);
|
||||
ompi_java_exceptionCheck(env, rc);
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
@ -231,6 +233,18 @@ public final boolean isNull()
|
||||
return handle == nullHandle;
|
||||
}
|
||||
|
||||
/**
|
||||
* Java binding of {@code MPI_COMM_GET_INFO}.
|
||||
* @throws MPIException
|
||||
*/
|
||||
public final Info getInfo() throws MPIException
|
||||
{
|
||||
MPI.check();
|
||||
return getInfo(handle);
|
||||
}
|
||||
|
||||
private native void getInfo(long handle, long info) throws MPIException;
|
||||
|
||||
/**
|
||||
* Java binding of {@code MPI_COMM_SET_INFO}.
|
||||
* @param info info object
|
||||
@ -242,7 +256,7 @@ public final void setInfo(Info info) throws MPIException
|
||||
setInfo(handle, info.handle);
|
||||
}
|
||||
|
||||
private native void setInfo(long fh, long info) throws MPIException;
|
||||
private native void setInfo(long comm, long info) throws MPIException;
|
||||
|
||||
/**
|
||||
* Java binding of {@code MPI_COMM_GET_INFO}.
|
||||
@ -255,7 +269,7 @@ public final Info getInfo() throws MPIException
|
||||
return new Info(getInfo(handle));
|
||||
}
|
||||
|
||||
private native long getInfo(long fh) throws MPIException;
|
||||
private native long getInfo(long comm) throws MPIException;
|
||||
|
||||
/**
|
||||
* Java binding of the MPI operation {@code MPI_COMM_DISCONNECT}.
|
||||
|
@ -468,4 +468,31 @@ private native void deleteAttr(long win, int keyval) throws MPIException;
|
||||
|
||||
private native long free(long win) throws MPIException;
|
||||
|
||||
/**
|
||||
* Java binding of the MPI operation {@code MPI_WIN_GET_INFO}.
|
||||
* @throws MPIException
|
||||
*/
|
||||
public Info getInfo() throws MPIException
|
||||
{
|
||||
MPI.check();
|
||||
return getInfo(handle);
|
||||
}
|
||||
|
||||
private native Info getInfo(long win)
|
||||
throws MPIException;
|
||||
|
||||
/**
|
||||
* Java binding of the MPI operation {@code MPI_WIN_SET_INFO}.
|
||||
* @param info the new info
|
||||
* @throws MPIException
|
||||
*/
|
||||
public void setInfo(Info info) throws MPIException
|
||||
{
|
||||
MPI.check();
|
||||
setInfo(handle, info);
|
||||
}
|
||||
|
||||
private native void setInfo(long win, Info info)
|
||||
throws MPIException;
|
||||
|
||||
} // Win
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user