检索规则说明:AND代表“并且”;OR代表“或者”;NOT代表“不包含”;(注意必须大写,运算符两边需空一格)
检 索 范 例 :范例一: (K=图书馆学 OR K=情报学) AND A=范并思 范例二:J=计算机应用与软件 AND (U=C++ OR U=Basic) NOT M=Visual
作 者:陈磊[1] 徐烂 CHEN Lei, XU Lan (College of Computer Science and Technology, University of South China, Hengyang 421001, China)
机构地区:[1]南华大学计算机科学与技术学院,湖南衡阳421001
出 处:《电脑知识与技术》2014年第5期2962-2966,共5页Computer Knowledge and Technology
基 金:本课题得到湖南省自然科学基金(11JJ6047,13JJ4076);湖南省教育厅优秀青年项目(138101);南华大学重点学科和创新团队建设基金资助项目;衡阳市科技局科技计划项目(2013KG66,2013KG67)
摘 要:目前,在科学计算领域有不少程序采用了Fortran和C++两种语言进行混合编程(即“混编”),但现有混编的程序代码可读性差,可维护性差,严重影响了软件的可移植性和可重用性。针对此现状,笔者总结了自己在核电软件开发中的实际经验,分三步阐述了Fortran和C++混合编程的规范化:首先,用宏定义等方法实现C++类型与Fortran类型的映射;然后,对于简单类型的参数传递,提出规范性意见;最后,对于Fortran中的特殊类型,提出在C++中用封装类型进行定义。经过对比验证,证明规范化的混合编程确实增加了代码的鲁棒性,可维护性。Nowadays in scientific computing, a mixed-programming technology with FORTRAN and C++program language is adopted in many programs. While lots of mixed programs have the problems of bad readability and maintainability, so it have a bad influence on the reusability of software. According to the situation, author sum up experiences and come up with a solution how to improve the mix-programming by three step. Firstly, use a macro definition method to realize the type-map between FORTRAN and C++. Secondly, to the base-type parameter passing, propose an idea about normalization. At last, propose a solution that use a C++use-defined type for the special type in FORTRAN. By validating the results of before the normalization and after it, mixed-programming with normalization did improve the maintainability and robustness of the code.
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在链接到云南高校图书馆文献保障联盟下载...
云南高校图书馆联盟文献共享服务平台 版权所有©
您的IP:216.73.216.117