检索规则说明:AND代表“并且”;OR代表“或者”;NOT代表“不包含”;(注意必须大写,运算符两边需空一格)
检 索 范 例 :范例一: (K=图书馆学 OR K=情报学) AND A=范并思 范例二:J=计算机应用与软件 AND (U=C++ OR U=Basic) NOT M=Visual
机构地区:[1]郑州大学土木工程学院,河南郑州450001 [2]郑州大学水利与环境学院,河南郑州450001
出 处:《郑州大学学报(工学版)》2013年第2期64-66,共3页Journal of Zhengzhou University(Engineering Science)
基 金:国家自然科学基金资助项目(41101095)
摘 要:函数模板作为一种泛型编程方法,对科学与工程计算具有重要现实意义.首先,探讨了C++函数模板的实现机制,揭示了函数模板与重载函数间的关系;运用Fortran 90泛型接口块结合外部例程,对C++重载函数进行了模拟;然后,在C++环境中添加包装子以实例化函数模板,并将函数模板实例转化成接口一致的"重载"例程,进而在Fortran 90环境中使用C++函数模板.辅以示例程序,对相关的处理方法给予详细说明,也为其它语言借用C++函数模板提供了借鉴.The function template is a kind of generic programming, which possesses important practical signifi- cance 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 ++ overloa- ded 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 ap- plying C ++ function templates in other languages.
关 键 词:科学与计算工程 泛型编程 函数模板 泛型接口块 混合编译
分 类 号:TP311[自动化与计算机技术—计算机软件与理论]
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在链接到云南高校图书馆文献保障联盟下载...
云南高校图书馆联盟文献共享服务平台 版权所有©
您的IP:216.73.216.7