- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
出于教育目的,我正在尝试在我的宠物项目中使用 Eigen。为了加快数学运算速度,我加入了宏 EIGEN_USE_BLAS
,它激活了 blas
库的使用。
但是当我尝试将我的项目上传到 Testflight 时遇到了问题。 Apple 对此的回应是:
ITMS-90338: Non-public API usage - The app references non-public symbols in My-Project: _saxpy_, _sgemm_, _sgemv_, _strmm_, _strmv_. If method names in your source code match the private Apple APIs listed above, altering your method names will help prevent this app from being flagged in future submissions. In addition, note that one or more of the above APIs may be located in a static library that was included with your app. If so, they must be removed. For further information, visit the Technical Support Information at http://developer.apple.com/support/technical/
我知道 Apple 有 blas
库作为 Accelerate.framework
的一部分,它应该严格通过 Accelerate API 使用。但问题是 Eigen 也有自己的 blas
包含在他们的源代码中,图书馆实际上无意使用 Accelerate.framework
私有(private)胆量。这就是为什么 Apple 要求我重命名这些功能或完全删除它们以消除这种不便。
但我什至不确定是否可以调整 Eigen
及其 blas
以使用替代名称。
有没有办法以某种有效的方式解决这个问题?或者我对 iOS 环境中 Eigen 的使用一无所知?
最佳答案
我很幸运在同事的一些提示和完成工作的强烈意愿下解决了这个问题,现在我想与大家分享我的结论。
问题: Eigen 没有提供 BLAS
二进制文件,它只有 header 。当一个人使用 EIGEN_USE_BLAS
宏并且它确实有效时,这意味着 Apple 正在将 Eigen BLAS 函数链接到他们的二进制文件 - BLAS
二进制文件,它是 Accelerate 的一部分。框架
。最棘手的部分是您的项目不一定应该在内部包含 Accelerate.framework
。 XCode 会自动添加必要的文件,当然它不会告诉你这些。
这里对我来说最奇怪的是,使用 Apple 的 Accelerate.framework
提供的“裸”BLAS
是一种明显的违规行为,因为它是私有(private) API。所以......从我的角度来看,这是一种 XCode 无意中违反了这条规则,并且没有告诉我任何关于它的信息。奇怪...
因此,为了修复它,您需要构建BLAS
或OpenBLAS
二进制文件(我已经构建了OpenBLAS
),将其添加到项目并通过 Build settings
中的 Other linker flags
进行链接。之后错误消失,您可以将您的构建上传到 Testflight。
为了节省您为 iOS
构建 OpenBLAS
的时间,我将给您留下几个链接。我认为这些就足够了:
http://www.programmersought.com/article/2638161057/ - 关于如何构建 OpenBLAS
的非常清晰的教程 https://github.com/xianyi/OpenBLAS/tree/release-0.2.21 - 图书馆的源代码 https://github.com/xianyi/OpenBLAS/issues/1531 - 讨论您可以在哪里找到您可能遇到的问题的解决方案
我发现整个故事中最令人困惑的部分是来自 Apple 的信息。这是另一个副本:
ITMS-90338: Non-public API usage - The app references non-public symbols in My-Project: saxpy, sgemm, sgemv, strmm, strmv. If method names in your source code match the private Apple APIs listed above, altering your method names will help prevent this app from being flagged in future submissions. In addition, note that one or more of the above APIs may be located in a static library that was included with your app. If so, they must be removed. For further information, visit the Technical Support Information at http://developer.apple.com/support/technical/
我的母语不是英语,但我非常有信心地说这篇文章是胡说八道,与解决实际问题完全无关。
它完全没有说明私有(private) API 链接到我的代码这一事实,这就是问题所在。而且我需要为这些函数提供我自己的后端以使错误消失。它说名字匹配,更改我的名字将有助于解决问题,但在我的情况下显然不会。
我希望 Apple 能更清楚地说明这个问题,并且错误描述在未来会更有意义。
关于ios - 在 iOS 项目中使用 Eigen 和 EIGEN_USE_BLAS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58139693/
我想了解表达式模板如何在 Eigen 中工作。 我知道两个动态双向量的总和是由如下所示的东西执行的: CwiseBinaryOp, VectorXd const, VectorXd const > o
在本征中,我们可以创建一个矩阵 Matrix3f m; m m(3, 8, 6); // Input after construction m.diagonal() << 3, 8, 6; Diag
我想知道是否有比使用 for 循环更简单的方法来解决我的问题。所以情况是这样的: 一般来说,我想从我的传感器收集数据点(消息类型为 Eigen::Vector3d,我无法更改它,因为它是一个巨大的框架
简而言之,问题是如何通过一个 Eigen::Map 反对一个期待一个函数 Eigen::MatrixXd 对象。 长话短说: 我有这个 C++ 函数声明 void npMatrix(const Eig
考虑以下代码。 const int N = 100; const float alpha = 0.9; Eigen::MatrixXf myVec = Eigen::MatrixXf::Random(
我试图获得两个张量的矩阵乘积,其中一个张量应该在相乘之前转置( At*B )。 到目前为止,我在 eigen documentation 中发现了什么是没有任何转置和两个矩阵都转置的矩阵乘积。 我正在
我的问题很简单,希望也有一个很好的答案:当我构造了 Eigen::MatrixXd 矩阵时,我可以使用多个线程同时填充矩阵中的行吗(如果我可以确保没有行被同时写入),或者我必须在每个线程中创建临时行对
#include #include namespace Eigen { // float op double -> double template struct ScalarBinaryOpTr
我在 Eigen 库的 API 上遇到了一些困难,即用于稀疏矩阵 Cholesky 分解的 SimplicialLLT 类。我需要分解三个矩阵,然后用它们来求解许多方程组(仅更改右侧) - 因此我只想
我正在尝试使用 Eigen 的 JacobiSVD 进行实验。特别是我试图从奇异值分解中重建输入矩阵。 http://eigen.tuxfamily.org/dox/classEigen_1_1Jac
我刚刚阅读了 Structures having static members Eigen 页。后者陈述如下: If you define a structure having members of
我正在使用 C++ 中的 Eigen 库来获取浮点方阵的平方根: MatrixXf gPrime(QUAD_EKF_NUM_STATES, QUAD_EKF_NUM_STATES); gPri
我正在尝试使用 vector 中的相应值来缩放矩阵中的所有列。如果此值为 0,我想用另一个按常数缩放的矩阵中的列替换该列。听起来很复杂,但在 Matlab 中它非常简单(但可能没有完全优化): a(:
使用 Eigen 将仿射变换转换为等距变换(即仅由旋转和平移组成)的最简单方法是什么? 图书馆? 两种变换都是 3D 的。仿射矩阵在左上象限有一个通用的 3x3 矩阵(即旋转、缩放和剪切),而等轴测在
我正在尝试生成 PCL 点云。我所有的点都在以下容器类型中: std::vector > 我想创建一个指向 PCL 点云的指针: pcl::PointCloud::Ptr pc 创建此点云的最有效方法
最近,我编译了 Eigen3 并用它在 Windows 上做一些线性代数任务。 但我想知道为什么 Eigen3 不需要链接额外的 lib 或 DLL(我只需要包含它的头文件) Eigen 是否在编译时
我正在使用特征张量库,在我看来,shuffle() 方法需要一个对象 Eigen::array 作为输入。 在我的实现中,我有一个 std::list 需要传递给 shuffle (当然我只在运行时知
我有两个问题。 Eigen::Affine3f 和 Eigen::Matrix4f 中表示的刚性变换是否相同? 我们如何从 Eigen::Affine3f 转换为 Eigen::Matrix4f,反之
我想用单个 3-D Eigen::Tensor 替换代码中的一系列矩阵。考虑到这一点,我尝试比较张量和矩阵的性能。 下面的函数“tensorContractTest”执行 (n,n,n) 3 阶张量与
如何将 ArrayXXd 数组转换为 MatrixXd?到目前为止,我已经完成了 MatrixXd temp_mat = my_array; 并且隐式转换似乎工作正常,但这是应该完成的方式吗?或者我应
我是一名优秀的程序员,十分优秀!