节点文献

Fortran 90借用C++函数模板

Fortran 90 Using Function Templates from C++

  • 推荐 CAJ下载
  • PDF下载
  • 不支持迅雷等下载工具,请取消加速工具后下载。

【作者】 毕苏萍周振红赫晓慧

【Author】 BI Su-ping1,ZHOU Zhen-hong2,HE Xiao-hui2(1.School of Civil Engineering,Zhengzhou University,Zhengzhou 450001,China;2.School of Water Conservancy and Environment,Zhengzhou University,Zhengzhou 450001,China)

【机构】 郑州大学土木工程学院郑州大学水利与环境学院

【摘要】 函数模板作为一种泛型编程方法,对科学与工程计算具有重要现实意义.首先,探讨了C++函数模板的实现机制,揭示了函数模板与重载函数间的关系;运用Fortran 90泛型接口块结合外部例程,对C++重载函数进行了模拟;然后,在C++环境中添加包装子以实例化函数模板,并将函数模板实例转化成接口一致的"重载"例程,进而在Fortran 90环境中使用C++函数模板.辅以示例程序,对相关的处理方法给予详细说明,也为其它语言借用C++函数模板提供了借鉴.

【Abstract】 The function template is a kind of generic programming,which possesses important practical significance in scientific and engineering computing.First,the implementing mechanism of C++ function template is explored,and the relationship between function templates and overloaded functions is disclosed.C++ overloaded functions are modeled with the generic interface block plus external procedures of Fortran 90.Then,a wrapper of C++ function templates is appended in order to instantiate function templates,convert function template instances into "overloaded" procedures,and make use of C+ + function templates in Fortran 90.The above-mentioned methods are particularly demonstrated with a demo.The research will also be helpful in applying C++ function templates in other languages.

【基金】 国家自然科学基金资助项目(41101095)
  • 【文献出处】 郑州大学学报(工学版) ,Journal of Zhengzhou University(Engineering Science) , 编辑部邮箱 ,2013年02期
  • 【分类号】TP311.11
  • 【被引频次】1
  • 【下载频次】77
节点文献中: 

本文链接的文献网络图示:

本文的引文网络