首页> 外文会议>International Congress on Mathematical Software >Employing C++ Templates in the Design of a Computer Algebra Library
【24h】

Employing C++ Templates in the Design of a Computer Algebra Library

机译:在计算机代数库的设计中使用C ++模板

获取原文

摘要

We discuss design aspects of the open-source Basic Polynomial Algebra Subprograms (BPAS) library. We build on standard C++11 template mechanisms to improve ease of use and accessibility. The BPAS computer algebra library looks to enable end-users to do work more easily and efficiently through optimized C code wrapped in an object-oriented and user-friendly CH-|- interface. Two key aspects of this interface to be discussed are the encoding of the algebraic hierarchy as a class hierarchy and a mechanism to support the combination of algebraic types as a new type. Existing libraries, if encoding the algebraic hierarchy at all, use runtime value checks to determine if two elements belong to the same ring for an incorrect false sense of type safety in an otherwise statically-typed language. On the contrary, our template metaprogramming mechanism provides true compile-time type safety and compile-time code generation. The details of this mechanism are transparent to end-users, providing a very natural interface for an end-user mathematician.
机译:我们讨论了开源基础多项式代数子程序(BPAS)库的设计方面。我们基于标准的C ++ 11模板机制来提高易用性和可访问性。 BPAS计算机代数库旨在通过包装在面向对象和用户友好的CH- |-接口中的优化C代码,使最终用户更轻松,更高效地工作。要讨论的该接口的两个关键方面是将代数层次结构编码为类层次结构,以及支持将代数类型组合为新类型的机制。现有的库,如果完全对代数层次进行编码,则使用运行时值检查来确定两个元素是否属于同一个环,从而以其他方式为静态类型的语言产生错误的类型安全错误感。相反,我们的模板元编程机制提供了真正的编译时类型安全性和编译时代码生成。这种机制的细节对最终用户是透明的,为最终用户数学家提供了非常自然的界面。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号