本文整理汇总了C++中OMPI_INT_2_FINT函数的典型用法代码示例。如果您正苦于以下问题:C++ OMPI_INT_2_FINT函数的具体用法?C++ OMPI_INT_2_FINT怎么用?C++ OMPI_INT_2_FINT使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了OMPI_INT_2_FINT函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ompi_win_get_errhandler_f
void ompi_win_get_errhandler_f(MPI_Fint *win, MPI_Fint *errhandler,
MPI_Fint *ierr)
{
int c_ierr;
MPI_Errhandler c_err;
MPI_Win c_win = PMPI_Win_f2c(*win);
c_ierr = PMPI_Win_get_errhandler(c_win, &c_err);
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
if (MPI_SUCCESS == c_ierr) {
*errhandler = PMPI_Errhandler_c2f(c_err);
}
}
示例2: mpi_group_size_f
void mpi_group_size_f(MPI_Fint *group, MPI_Fint *size, MPI_Fint *ierr)
{
ompi_group_t *c_group;
OMPI_SINGLE_NAME_DECL(size);
/* Make the fortran to c representation conversion */
c_group = MPI_Group_f2c(*group);
*ierr = OMPI_INT_2_FINT(MPI_Group_size(c_group,
OMPI_SINGLE_NAME_CONVERT(size)));
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
OMPI_SINGLE_INT_2_FINT(size);
}
}
示例3: ompi_error_class_f
void ompi_error_class_f(MPI_Fint *errorcode, MPI_Fint *errorclass,
MPI_Fint *ierr)
{
int c_ierr;
OMPI_SINGLE_NAME_DECL(errorclass);
c_ierr = PMPI_Error_class(OMPI_FINT_2_INT(*errorcode),
OMPI_SINGLE_NAME_CONVERT(errorclass));
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
if (MPI_SUCCESS == c_ierr) {
OMPI_SINGLE_INT_2_FINT(errorclass);
}
}
示例4: ompi_file_read_all_end_f
void ompi_file_read_all_end_f(MPI_Fint *fh, char *buf, MPI_Fint *status,
MPI_Fint *ierr)
{
int c_ierr;
OMPI_FORTRAN_STATUS_DECLARATION(c_status,c_status2)
MPI_File c_fh = MPI_File_f2c(*fh);
OMPI_FORTRAN_STATUS_SET_POINTER(c_status,c_status2,status)
c_ierr = MPI_File_read_all_end(c_fh, buf, c_status);
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
OMPI_FORTRAN_STATUS_RETURN(c_status,c_status2,status,c_ierr)
}
示例5: ompi_file_get_amode_f
void ompi_file_get_amode_f(MPI_Fint *fh, MPI_Fint *amode, MPI_Fint *ierr)
{
int c_ierr;
MPI_File c_fh;
OMPI_SINGLE_NAME_DECL(amode);
c_fh = MPI_File_f2c(*fh);
c_ierr = MPI_File_get_amode(c_fh, OMPI_SINGLE_NAME_CONVERT(amode));
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
if (MPI_SUCCESS == c_ierr) {
OMPI_SINGLE_INT_2_FINT(amode);
}
}
示例6: ompi_topo_test_f
void ompi_topo_test_f(MPI_Fint *comm, MPI_Fint *topo_type, MPI_Fint *ierr)
{
int c_ierr;
MPI_Comm c_comm;
OMPI_SINGLE_NAME_DECL(topo_type);
c_comm = PMPI_Comm_f2c(*comm);
c_ierr = PMPI_Topo_test(c_comm, OMPI_SINGLE_NAME_CONVERT(topo_type));
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
if (MPI_SUCCESS == c_ierr) {
OMPI_SINGLE_INT_2_FINT(topo_type);
}
}
示例7: mpi_group_union_f
void mpi_group_union_f(MPI_Fint *group1, MPI_Fint *group2, MPI_Fint *newgroup, MPI_Fint *ierr)
{
ompi_group_t *c_group1, *c_group2, *c_newgroup;
/* Make the fortran to c representation conversion */
c_group1 = MPI_Group_f2c(*group1);
c_group2 = MPI_Group_f2c(*group2);
*ierr = OMPI_INT_2_FINT(MPI_Group_union(c_group1, c_group2, &c_newgroup));
/* translate the results from c to fortran */
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
*newgroup = c_newgroup->grp_f_to_c_index;
}
}
示例8: mpi_comm_set_errhandler_f
void mpi_comm_set_errhandler_f(MPI_Fint *comm, MPI_Fint *errhandler,
MPI_Fint *ierr)
{
MPI_Comm c_comm;
MPI_Errhandler c_errhandler;
c_comm = MPI_Comm_f2c(*comm);
c_errhandler = MPI_Errhandler_f2c(*errhandler);
*ierr = OMPI_INT_2_FINT(MPI_Comm_set_errhandler(c_comm, c_errhandler));
if ( MPI_SUCCESS == OMPI_FINT_2_INT(*ierr) &&
OMPI_ERRHANDLER_TYPE_PREDEFINED != c_errhandler->eh_mpi_object_type ) {
c_errhandler->eh_fortran_function = true ;
}
}
示例9: mpi_comm_create_errhandler_f
void mpi_comm_create_errhandler_f(ompi_errhandler_fortran_handler_fn_t *function,
MPI_Fint *errhandler, MPI_Fint *ierr)
{
MPI_Errhandler c_errhandler;
/* See the note in src/mpi/f77/prototypes_mpi.h about the use of
(void*) for function pointers in this function */
*ierr = OMPI_INT_2_FINT(
MPI_Comm_create_errhandler((MPI_Comm_errhandler_fn*)function,
&c_errhandler));
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
*errhandler = MPI_Errhandler_c2f(c_errhandler);
}
}
示例10: mpi_status_set_elements_f
void mpi_status_set_elements_f(MPI_Fint *status, MPI_Fint *datatype,
MPI_Fint *count, MPI_Fint *ierr)
{
MPI_Datatype c_type = MPI_Type_f2c(*datatype);
MPI_Status c_status;
/* This seems silly, but someone will do it */
if (OMPI_IS_FORTRAN_STATUS_IGNORE(status)) {
*ierr = OMPI_INT_2_FINT(MPI_SUCCESS);
} else {
MPI_Status_f2c( status, &c_status );
*ierr = OMPI_INT_2_FINT(MPI_Status_set_elements(&c_status, c_type,
OMPI_FINT_2_INT(*count)));
/* If datatype is really being set, then that needs to be
converted.... */
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
MPI_Status_c2f(&c_status, status);
}
}
}
示例11: ompi_op_commutative_f
void ompi_op_commutative_f(MPI_Fint *op, MPI_Fint *commute, MPI_Fint *ierr)
{
int c_ierr;
MPI_Op c_op;
OMPI_SINGLE_NAME_DECL(commute);
c_op = PMPI_Op_f2c(*op);
c_ierr = PMPI_Op_commutative(c_op, OMPI_SINGLE_NAME_CONVERT(commute));
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
if (MPI_SUCCESS == c_ierr) {
OMPI_SINGLE_INT_2_FINT(commute);
}
}
示例12: ompi_get_version_f
void ompi_get_version_f(MPI_Fint *version, MPI_Fint *subversion, MPI_Fint *ierr)
{
int c_ierr;
OMPI_SINGLE_NAME_DECL(version);
OMPI_SINGLE_NAME_DECL(subversion);
c_ierr = PMPI_Get_version(OMPI_SINGLE_NAME_CONVERT(version),
OMPI_SINGLE_NAME_CONVERT(subversion));
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
if (MPI_SUCCESS == c_ierr) {
OMPI_SINGLE_INT_2_FINT(version);
OMPI_SINGLE_INT_2_FINT(subversion);
}
}
示例13: MPI_Win_c2f
MPI_Fint MPI_Win_c2f(MPI_Win win)
{
OPAL_CR_NOOP_PROGRESS();
if ( MPI_PARAM_CHECK) {
OMPI_ERR_INIT_FINALIZE(FUNC_NAME);
/* Note that ompi_win_invalid() explicitly checks for
MPI_WIN_NULL, but MPI_WIN_C2F is supposed to treat
MPI_WIN_NULL as a valid window (and therefore return
a valid Fortran handle for it). Hence, this function
should not return an error if MPI_WIN_NULL is passed in.
See a big comment in ompi/communicator/communicator.h about
this (I know that's not win.h, but the issues are related,
and that's where the explanation is). */
if (ompi_win_invalid(win) && MPI_WIN_NULL != win) {
return OMPI_INT_2_FINT(-1);
}
}
return OMPI_INT_2_FINT(win->w_f_to_c_index);
}
示例14: ompi_type_create_resized_f
void ompi_type_create_resized_f(MPI_Fint *oldtype, MPI_Aint *lb,
MPI_Aint *extent, MPI_Fint *newtype,
MPI_Fint *ierr)
{
int c_ierr;
MPI_Datatype c_old = PMPI_Type_f2c(*oldtype);
MPI_Datatype c_new;
c_ierr = PMPI_Type_create_resized(c_old, *lb, *extent, &c_new);
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
if (MPI_SUCCESS == c_ierr) {
*newtype = PMPI_Type_c2f(c_new);
}
}
示例15: ompi_type_create_f90_real_f
void ompi_type_create_f90_real_f(MPI_Fint *p, MPI_Fint *r,
MPI_Fint *newtype, MPI_Fint *ierr)
{
int c_ierr;
MPI_Datatype c_new = MPI_Type_f2c(*newtype);
c_ierr = MPI_Type_create_f90_real(OMPI_FINT_2_INT(*p),
OMPI_FINT_2_INT(*r),
&c_new);
if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
if (MPI_SUCCESS == c_ierr) {
*newtype = MPI_Type_c2f(c_new);
}
}