- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
这不是一个编程问题,而是相关的,并且我无法在其他任何地方找到有关信息。希望能采纳。
我正在尝试移植 C++ AMP 应用程序以在 Surface 2 平板电脑上运行。由于 C++ AMP 在平板电脑上的 WinRT 上工作,并且由于它使用 DirectX 进行 GPU 加速,并且由于 Tegra 处理器确实与 DirectX 一起工作,所以我期待在平板电脑上使用 C++ AMP 与使用“cpu”相比可以提高性能。与使用单个 CPU 内核相比,我发现在 GPU 上使用相同的代码在台式机上的速度提高了大约 80 倍,而且它是高度并行的。
事实证明,平板电脑上的 AMP 解决方案仅让我受益于 Tegras 四核,仅此而已。
我有三个 C++ AMP 设备,它们是:WARP、ref、CPU
默认是 WARP。Ref 非常慢,CPU 现在似乎崩溃了。
SIMD 内核是否不适用于 Tegra4 上的 C++ AMP,还是我必须做一些特殊的事情?
最佳答案
如果您使用以下方式枚举可用加速器,除了任何 GPU 加速器之外,您还将看到以下加速器:
std::vector<accelerator> accls = accelerator::get_all()
取自C++ AMP Book :
- accelerator::direct3d_ref The REF accelerator, also called the Reference Rasterizer or “Software Adapter” accelerator. It emulates a generic graphics card in software on the CPU to provide Direct3D functionality. It is used for debugging and will also be the default accelerator if no other accelerators are available. As the name suggests, the REF accelerator should be considered the de facto standard if you suspect a bug with your hardware vendor’s driver. Typically, your application will not want to use the REF accelerator because it is much slower than hardware-based accelerators and will be slower than just running a C++ implementation of your algorithm on the CPU.
- accelerator::cpu_accelerator The CPU accelerator can be used only for creating arrays that are accessible to the CPU and used for data staging. Your application can’t use this for executing C++ AMP code in the first release of C++ AMP. Further details on using the CPU accelerator to create staging arrays and host arrays are covered in Chapter 7, “Optimization.”
- accelerator::direct3d_warp The WARP accelerator, or Microsoft Basic Render Driver, allows the C++ AMP run time to run on the CPU. The WARP accelerator uses the WARP software rasterizer, which is part of the Direct3D 11 run time. The WARP accelerator uses multicore and data-parallel Single Instruction Multiple Data (SIMD) instructions to execute data-parallel code very efficiently on the CPU. Your application can use WARP as a fallback when no physical GPU is present. The WARP accelerator supports only single-precision math, so it can’t be used for fallback for kernels that require double precision or limited double-precision kernels. An overview of WARP can be found in “Windows Advanced Rasterization Platform (WARP) Guide” on MSDN: http://msdn.microsoft.com/en-us/library/gg615082.aspx.
所以您看到的行为与预期的差不多。
不过,我想您真正想知道的是 Tegra 4 GPU 在哪里?如果 Surface 2 具有 DirectX 11 驱动程序,您会希望将其视为加速器选项。 C++ AMP 需要 DX11。
Surface 2 基于似乎仅支持 DX9.1 的 Tegra 4 (T40a2) SOC。
On the DirectX side, Tegra 4’s GPU supports the Direct3D 9_1 feature level.
取自Nvidia's Tegra 4 GPU: Doubling Down On Efficiency .我无法在 NVidia 的网站上找到任何对此的确认。看来您需要 Tegra K1 才能获得 DX11 支持。很抱歉成为坏消息的传播者。
从好的方面来说,如果您将代码定位在默认加速器上,那么其他具有支持 DX11 的 GPU 的硬件将自动利用它。
关于Tegra 4 表面 2 上的 C++ 放大器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22129248/
我有以 xyz 点格式表示 3D 表面(即地震断层平面)的数据。我想创建这些表面的 3D 表示。我使用 rgl 和 akima 取得了一些成功,但是它无法真正处理可能会自行折叠或在同一 x,y 点具有
我正在尝试将此 X、Y、Z 数据集拟合到未知表面。 不幸的是,线性拟合不足以显示表面数据。我认为多项式拟合可能适合这种情况。另外,问题是我不知道如何建立多项式拟合函数来完成曲面拟合。 任何帮助都会很棒
我已经用plotly构建了一个表面图表,并且我正在尝试根据我自己的文本获得hoverinfo。奇怪的是它不再工作了。 library(plotly) x % layout(dragmode = "tu
我有以下数据: library(rgl) x y,y->z,z->x) zmat <- matrix(data = z, nrow = 6, ncol = 5, byrow = FALSE) surf
我正在使用 DXVA 视频解码器。它工作正常,但我想与另一个 IDirect3D9 设备对象共享解压缩的表面。 我读了this文件,我调用 IDirectXVideoDecoderService::C
按照目前的情况,这个问题不适合我们的问答形式。我们希望答案得到事实、引用或专业知识的支持,但这个问题可能会引发辩论、争论、投票或扩展讨论。如果您觉得这个问题可以改进并可能重新打开,visit the
import pygame, sys, os.path pygame.init() # set up the colours # R G B BLACK = ( 0,
我的目标是在 pygame 实例内显示一个颜色图,以 49 个元素 ndarray 的形式反射(reflect)实时输入,范围从 -6 到 2,标准化为 0 到 1 的值。到目前为止,我正在使用 ma
我在 Visual C# -> surface -> v2.0 -> MS visual C# 2010 express 中的 Surface Application (WPF) 模板中工作。 我正在
我正在尝试在 JavaFX 中实现我自己的 3D 表面动画,但我不理解它应该工作的一切,有人可以帮助我理解哪个应该放在哪里吗? 已经知道使用类构建Mesh需要类对象TraingleMesh然后必须使用
根据我的阅读,我不相信 SurfaceView 可以设置动画,但我会问这个问题: 我在 ViewFlipper 中有一个 surfaceView 对象。当 ViewFlipper 向左或向右移动到新的
我想在 android 屏幕上有一个图像,图像的不同部分可以点击。我的意思是,如果它是 3 个圆圈的图像,我希望能够单击这些圆圈中的每一个, 然后我可以为每个可点击的圆圈添加不同的功能。对于下图中的示
我有一个通过kinect获得的点集,现在我想创建一个网格。我正在尝试使用 CGAL 库并且正在关注 this example . 我使用的是 VS2010,它运行没有任何错误,但是当然它没有在行中
在让我的 SurfaceView 显示我的相机预览时遇到一点问题。我在这里查看了一些问题并通过 Google 搜索了一些 tuts,但我认为这可能是我这边的一个小错误,我只是没有看到。 代码 publ
任何人都可以为我指出一些类(class)或对以下情况提出任何建议吗? 我有一个 SurfaceView,它有一个背景图像,我希望在其上绘制其他位图。我想支持以下操作: 点击一下,新的位图就会添加到背景
我正在尝试学习表面 View 并且我确实读到了它。 所以,我试着制作了一个游戏,我认为它可以帮助我更好地学习。 我创建了一个表面 View 类,如下所示: class SnakeEngine exte
我希望笑脸 div(在用户进入墙壁后显示)将覆盖主迷宫表面而不改变笑脸大小:你能帮帮我吗? 这是 fiddle 链接: http://jsfiddle.net/uqcLn/66/ 这是笑脸 div:
我有一组 (x,y,z) 点,这些点具有相应的法线和值。所以数据的形式是 [x y z nx ny nz c]。我想在这些垂直于这些法线的点上绘制一个 3D 表面,并且具有与该值对应的颜色。所以我想要
我有一个不是函数图的表面的 3D 数据集。数据只是 3D 中的一堆点,我唯一能想到的就是在 Matlab 中尝试 scatter3。 Surf 将不起作用,因为表面不是函数图。 使用 scatter3
假设我有一个函数,例如: 现在,我想绘制它的曲面图(matplotlib plot_surface )。我使用 np.arange(stop,end,increment) 构造了三个数组。 在这里,我
我是一名优秀的程序员,十分优秀!