Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/141.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何枚举C+中的所有加速器+;放大器? 在C++中,如何检测和枚举所有C++加速加速器?_C++_C++ Amp - Fatal编程技术网

如何枚举C+中的所有加速器+;放大器? 在C++中,如何检测和枚举所有C++加速加速器?

如何枚举C+中的所有加速器+;放大器? 在C++中,如何检测和枚举所有C++加速加速器?,c++,c++-amp,C++,C++ Amp,Don McRady发布了一个应用程序,其中列举了非仿真加速器。虽然我有一个DX11卡(GTX 260),但我没有看到任何可用的加速器。Daniel Moth演示了如何查询单个加速器,但我无法找到如何用C++ AMP调用枚举所有(仿真和非)加速器。 看起来很简单:并发::GETYEngultActhSuffor();代码>丹尼尔·莫思: 在VS11开发人员预览位中,您只需调用concurrency::get_accelerators();。我们正在努力使测试版更容易发现这一点,无论何时 这是我的

Don McRady发布了一个应用程序,其中列举了非仿真加速器。虽然我有一个DX11卡(GTX 260),但我没有看到任何可用的加速器。Daniel Moth演示了如何查询单个加速器,但我无法找到如何用C++ AMP调用枚举所有(仿真和非)加速器。

看起来很简单:<代码>并发::GETYEngultActhSuffor();代码>丹尼尔·莫思:

在VS11开发人员预览位中,您只需调用concurrency::get_accelerators();。我们正在努力使测试版更容易发现这一点,无论何时

这是我的密码:

#include <iostream>
#include "stdafx.h"
#include "amp.h"

using namespace std;
using namespace concurrency;

void inspect_accelerators()
{
    auto accelerators = accelerator::get_all();
    for_each(begin(accelerators), end(accelerators),[=](accelerator acc){ 
        wcout << "New accelerator: " << acc.description << endl;
        wcout << "is_debug = " << acc.is_debug << endl;
        wcout << "is_emulated = " << acc.is_emulated <<endl;
        wcout << "dedicated_memory = " << acc.dedicated_memory << endl;
        wcout << "device_path = " << acc.device_path << endl;
        wcout << "has_display = " << acc.has_display << endl;                
        wcout << "version = " << (acc.version >> 16) << '.' << (acc.version & 0xFFFF) << endl;
    });
}
#包括
#包括“stdafx.h”
#包括“amp.h”
使用名称空间std;
使用名称空间并发;
真空加速器()
{
自动加速器=加速器::获取所有();
对于每个(开始(加速器),结束(加速器),[=](加速器acc){

wcout看起来很简单:
concurrency::get_accelerators();
Daniel Moth:

在VS11开发者预览版中,您只需调用concurrency::get_accelerators();即可。我们正在努力使测试版更容易发现这一点,无论何时

这是我的密码:

#include <iostream>
#include "stdafx.h"
#include "amp.h"

using namespace std;
using namespace concurrency;

void inspect_accelerators()
{
    auto accelerators = accelerator::get_all();
    for_each(begin(accelerators), end(accelerators),[=](accelerator acc){ 
        wcout << "New accelerator: " << acc.description << endl;
        wcout << "is_debug = " << acc.is_debug << endl;
        wcout << "is_emulated = " << acc.is_emulated <<endl;
        wcout << "dedicated_memory = " << acc.dedicated_memory << endl;
        wcout << "device_path = " << acc.device_path << endl;
        wcout << "has_display = " << acc.has_display << endl;                
        wcout << "version = " << (acc.version >> 16) << '.' << (acc.version & 0xFFFF) << endl;
    });
}
#包括
#包括“stdafx.h”
#包括“amp.h”
使用名称空间std;
使用名称空间并发;
真空加速器()
{
自动加速器=加速器::获取所有();
对于每个(开始(加速器),结束(加速器),[=](加速器acc){

wcout感谢您将我博客中的答案转发到这里:-)

你在问题中做了旁白:

“虽然我有一张DX11卡(GTX 260),但我没有看到任何可用的加速器”

如果Don的实用程序没有找到你的卡,那么它不是DX11卡,或者他的实用程序中有一个bug,我们很感激你向他报告RePro。但是,我在供应商的网站上验证了GTX 260是DX10卡。所以这不是C++代码的好目标,很不幸…… 干杯


丹尼尔

谢谢你把我博客上的答案转发到这里:-)

你在问题中做了旁白:

“虽然我有一张DX11卡(GTX 260),但我没有看到任何可用的加速器”

如果Don的实用程序没有找到你的卡,那么它不是DX11卡,或者他的实用程序中有一个bug,我们很感激你向他报告RePro。但是,我在供应商的网站上验证了GTX 260是DX10卡。所以这不是C++代码的好目标,很不幸…… 干杯


Daniel

感谢您的跟进。您完全正确-不确定为什么Win7 x86上的dxdiag.exe显示DX11。昨天出去买了一台GTX 560 Ti,唐的实用程序正确识别了它。感谢您的跟进。您完全正确-不确定为什么Win7 x86上的dxdiag.exe显示DX11。出去买了一台GTX 560 Ti昨天,Don的实用程序正确识别了它。啊,刚找到文档:这是新文档的位置:啊,刚找到文档:这是新文档的位置: