• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ OMPI_INT_2_FINT函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中OMPI_INT_2_FINT函数的典型用法代码示例。如果您正苦于以下问题:C++ OMPI_INT_2_FINT函数的具体用法?C++ OMPI_INT_2_FINT怎么用?C++ OMPI_INT_2_FINT使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了OMPI_INT_2_FINT函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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);
    }
}
开发者ID:00datman,项目名称:ompi,代码行数:14,代码来源:win_get_errhandler_f.c


示例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);
  }
}
开发者ID:315234,项目名称:OpenFOAM-2.2.x-OSX,代码行数:14,代码来源:group_size_f.c


示例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);
    }
}
开发者ID:00datman,项目名称:ompi,代码行数:14,代码来源:error_class_f.c


示例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)
}
开发者ID:IanYXXL,项目名称:A1,代码行数:14,代码来源:file_read_all_end_f.c


示例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);
    }
}
开发者ID:XuanWang1982,项目名称:ompi,代码行数:14,代码来源:file_get_amode_f.c


示例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);
    }
}
开发者ID:00datman,项目名称:ompi,代码行数:15,代码来源:topo_test_f.c


示例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;
  }
}
开发者ID:315234,项目名称:OpenFOAM-2.2.x-OSX,代码行数:15,代码来源:group_union_f.c


示例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 ;
    }
}
开发者ID:aosm,项目名称:openmpi,代码行数:15,代码来源:comm_set_errhandler_f.c


示例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);
    }
}
开发者ID:aosm,项目名称:openmpi,代码行数:15,代码来源:comm_create_errhandler_f.c


示例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);
        }
    }

}
开发者ID:315234,项目名称:OpenFOAM-2.2.x-OSX,代码行数:24,代码来源:status_set_elements_f.c


示例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);
    }
}
开发者ID:00datman,项目名称:ompi,代码行数:15,代码来源:op_commutative_f.c


示例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);
    }
}
开发者ID:00datman,项目名称:ompi,代码行数:15,代码来源:get_version_f.c


示例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);
}
开发者ID:315234,项目名称:OpenFOAM-2.2.x-OSX,代码行数:24,代码来源:win_c2f.c


示例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);
    }
}
开发者ID:00datman,项目名称:ompi,代码行数:15,代码来源:type_create_resized_f.c


示例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);
    }
}
开发者ID:XuanWang1982,项目名称:ompi,代码行数:15,代码来源:type_create_f90_real_f.c


示例16: ompi_file_write_at_all_begin_f

void ompi_file_write_at_all_begin_f(MPI_Fint *fh, MPI_Offset *offset,
				   char *buf, MPI_Fint *count,
				   MPI_Fint *datatype, MPI_Fint *ierr)
{
   int c_ierr;
   MPI_File c_fh = MPI_File_f2c(*fh);
   MPI_Datatype c_type = MPI_Type_f2c(*datatype);

   c_ierr = MPI_File_write_at_all_begin(c_fh,
                                        (MPI_Offset) *offset,
                                        OMPI_F2C_BOTTOM(buf),
                                        OMPI_FINT_2_INT(*count),
                                        c_type);
   if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);
}
开发者ID:XuanWang1982,项目名称:ompi,代码行数:15,代码来源:file_write_at_all_begin_f.c


示例17: mpi_bcast_f

void mpi_bcast_f(char *buffer, MPI_Fint *count, MPI_Fint *datatype, 
		 MPI_Fint *root, MPI_Fint *comm, MPI_Fint *ierr)
{
    MPI_Comm c_comm;
    MPI_Datatype c_type;

    c_comm = MPI_Comm_f2c(*comm);
    c_type = MPI_Type_f2c(*datatype);

    *ierr = OMPI_INT_2_FINT(MPI_Bcast(OMPI_F2C_BOTTOM(buffer), 
				      OMPI_FINT_2_INT(*count), 
				      c_type,
				      OMPI_FINT_2_INT(*root),
				      c_comm));
}
开发者ID:315234,项目名称:OpenFOAM-2.2.x-OSX,代码行数:15,代码来源:bcast_f.c


示例18: ompi_errhandler_get_f

void ompi_errhandler_get_f(MPI_Fint *comm, MPI_Fint *errhandler, MPI_Fint *ierr)
{
    int c_ierr;
    MPI_Comm c_comm;
    MPI_Errhandler c_errhandler;

    c_comm = MPI_Comm_f2c(*comm);

    c_ierr = MPI_Errhandler_get(c_comm, &c_errhandler);
    if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);

    if (MPI_SUCCESS == c_ierr) {
        *errhandler = MPI_Errhandler_c2f(c_errhandler);
    }
}
开发者ID:Dissolubilis,项目名称:ompi-svn-mirror,代码行数:15,代码来源:errhandler_get_f.c


示例19: ompi_file_get_atomicity_f

void ompi_file_get_atomicity_f(MPI_Fint *fh, ompi_fortran_logical_t *flag, MPI_Fint *ierr)
{
    int c_ierr;
    MPI_File c_fh;
    OMPI_LOGICAL_NAME_DECL(flag);

    c_fh = PMPI_File_f2c(*fh);
    c_ierr = PMPI_File_get_atomicity(c_fh,
                                    OMPI_LOGICAL_SINGLE_NAME_CONVERT(flag));
    if (NULL != ierr) *ierr = OMPI_INT_2_FINT(c_ierr);

    if (MPI_SUCCESS == c_ierr) {
        OMPI_SINGLE_INT_2_LOGICAL(flag);
    }
}
开发者ID:00datman,项目名称:ompi,代码行数:15,代码来源:file_get_atomicity_f.c


示例20: mpi_info_get_f

void mpi_info_get_f(MPI_Fint *info, char *key, MPI_Fint *valuelen,
                    char *value, ompi_fortran_logical_t *flag, MPI_Fint *ierr,
                    int key_len, int value_len)
{
    int c_err, ret;
    MPI_Info c_info;
    char *c_key = NULL, c_value[MPI_MAX_INFO_VAL + 1];
    OMPI_LOGICAL_NAME_DECL(flag);

    if (OMPI_SUCCESS != (ret = ompi_fortran_string_f2c(key, key_len, &c_key))) {
        c_err = OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, ret, FUNC_NAME);
        *ierr = OMPI_INT_2_FINT(c_err);
        return;
    }
    c_info = MPI_Info_f2c(*info);

    *ierr = OMPI_INT_2_FINT(MPI_Info_get(c_info, c_key,
                                         OMPI_FINT_2_INT(*valuelen),
                                         c_value,
                                         OMPI_LOGICAL_SINGLE_NAME_CONVERT(flag)));
    if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
        OMPI_SINGLE_INT_2_LOGICAL(flag);

        /* Use the full length of the Fortran string, not *valuelen.
           See comment in ompi/mpi/f77/strings.c. */
        if (OMPI_SUCCESS != (ret = ompi_fortran_string_c2f(c_value, value,
                                                           value_len))) {
            c_err = OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, ret, FUNC_NAME);
            *ierr = OMPI_INT_2_FINT(c_err);
            free(c_key);
            return;
        }
    }

    free(c_key);
}
开发者ID:bringhurst,项目名称:ompi,代码行数:36,代码来源:info_get_f.c



注:本文中的OMPI_INT_2_FINT函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ OMPL_ERROR函数代码示例发布时间:2022-05-30
下一篇:
C++ OMPI_FINT_2_INT函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap