高性能C ++多维数组 [英] High-performance C++ multi-dimensional arrays

查看:143
本文介绍了高性能C ++多维数组的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找有关高性能多维数组库/ C ++的建议。我真正需要的是:




  • 动态分配在运行时确定大小的数组的能力

    / li>
  • 能够访问和修改单个数组值(快速)


  • 算术如 array1 = array2 + 2 * array3





我遇到过各种图书馆,包括:




  • Blitz ++ ,它看起来正是我所需要的,但似乎维护得不是很好(最新的稳定版本是5年前)


  • Boost ,它不支持数组算术,并且与Blitz ++相比显得相当缓慢。


  • Jonn Bowman的 array.h ,没有文档。

  • $ b

    解决方案 div>

    Eigen 维护得非常好(现在,至少,每个月都有新版本),并支持您需要的其他操作。


    I am looking for advice regarding high performance multi-dimensional array libraries/classes for C++. What I really need is:

    • the ability to dynamically allocate arrays with a size determined at run-time

    • the ability to access and modify single array values (fast)

    • to be able to use simple array arithmetic such as array1 = array2 + 2 * array3

    • a well-maintained library

    I have come across various libraries, including:

    • Blitz++, which looks exactly what I need, but which doesn't seem very well maintained (latest stable release was 5 years ago)

    • Boost, which doesn't support array arithmetic, and appears to be a quite slow compared to say Blitz++.

    • Jonn Bowman's array.h which has no documentation.

    Does anyone have any other suggestions or comments about the above options?

    解决方案

    Eigen is extremely well-maintained (right now, at least, there are new versions coming out every month) and supports the other operations you need.

    这篇关于高性能C ++多维数组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆