资源简介
Intel OpenCL示例项目,得到GPU的相关设备信息并打印,用于测试Windows下OpenCL环境搭建是否成功
代码片段和文件信息
// Copyright (c) 2009-2013 Intel Corporation
// All rights reserved.
//
// WARRANTY DISCLAIMER
//
// THESE MATERIALS ARE PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// “AS IS“ AND ANY EXPRESS OR IMPLIED WARRANTIES INCLUDING BUT NOT
// LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT INDIRECT INCIDENTAL SPECIAL
// EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING BUT NOT LIMITED TO
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE DATA OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
// OF LIABILITY WHETHER IN CONTRACT STRICT LIABILITY OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THESE
// MATERIALS EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// Intel Corporation is the author of the Materials and requests that all
// problem reports or change requests be submitted to it directly
#include
#include
#include
#include
#include
#include
int main (int argc const char** argv)
{
// All stuff needed for sample is kept in this function body.
// There is a couple of help macros; so they are also defined
// directly inside this function and context dependent.
using namespace std;
// -----------------------------------------------------------------------
// 1. Parse command line.
// Default substring for platform name
const char* required_platform_subname = “Intel“;
// Sample accepts one optional argument only see usage information below
if(argc > 2)
{
cerr << “Error: too many command line arguments.\n“;
}
// Print usage information in case
if(
argc > 2 || // ... when wrong number of arguments is provided
argc == 2 && ( // or user asks for help
strcmp(argv[1] “-h“) == 0 ||
strcmp(argv[1] “--help“) == 0
)
)
{
cout
<< “Usage: “ << argv[0] << “ [-h | --help | ]\n\n“
<< “ -h --help Show this help message and exit.\n\n“
<< “ Platform name substring to select platform.\n“
<< “ Case sensitive. Default value is \““
<< required_platform_subname << “\“.\n“
<< “ In case of multiple matches the first matching\n“
<< “ platform is selected.\n“;
exit(argc > 2); // return non-zero only if an error occurs
}
if(argc == 2)
{
// User provided substring for platform name selection:
required_platform_subname = argv[1];
}
// -----------------------------------------------------------------------
// 2. Define error handling strategy. 属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2015-01-18 17:32 CapsBasic\
文件 15386 2015-01-18 16:44 CapsBasic\capsbasic.cpp
文件 8062 2015-01-18 16:44 CapsBasic\CapsBasic.vcxproj
文件 958 2015-01-18 16:44 CapsBasic\CapsBasic.vcxproj.filters
文件 1238 2015-01-18 16:44 CapsBasic\CapsBasic_2010.sln
文件 1243 2015-01-18 16:44 CapsBasic\CapsBasic_2012.sln
文件 8284 2015-01-18 16:44 CapsBasic\CapsBasic_2012.vcxproj
文件 1322 2015-01-18 16:44 CapsBasic\CapsBasic_2013.sln
文件 8285 2015-01-18 16:44 CapsBasic\CapsBasic_2013.vcxproj
文件 7163 2015-01-18 16:44 CapsBasic\README.TXT
文件 70028 2015-01-18 16:44 CapsBasic\user_guide.pdf
目录 0 2015-01-18 17:32 templates\
文件 1509 2015-01-18 16:44 templates\intelocl_win32_debug.props
文件 1506 2015-01-18 16:44 templates\intelocl_win32_release.props
文件 1509 2015-01-18 16:44 templates\intelocl_win64_debug.props
文件 1506 2015-01-18 16:44 templates\intelocl_win64_release.props
相关资源
- opencl编程指南随书代码
- OPENCL编程指南随书源码
- eetop.cn_OpenCL.Parallel Computing on the GPU
- OpenCL48_CN.pdf
- _CPU_GPU协同并行计算研究综述_cuda_op
- amd中文opencl教程
- OpenCL规范1.2正体中文版 beta1
- 基于OpenCL并行加速算法研究及其FPGA实
- OpenCL中文入门完整教程
- The OpenCL Specification 1.2 官方原版
- [并行计算——结构·算法·编程].陈国
- OPENCL1.2 标准
- CUDA和OPENCL遥感影像正射校正
- OpenCL in Action.pdf
- OpenCL学习资料合辑(OpenCL编程指南O
- FPGA异构计算——基于OpenCL的开发方法
- FPGA异构计算 基于OpenCL的开发方法
- Heterogeneous Computing with OpenCL 2.0English
- OpenCL双边滤波实现美颜功能
- OpenCL编程指南 高清PDF版
- opencl异构并行计算原理机制与优化实
- AMD-APP-SDK-v2.9-Windows-64位
- GPU编程与优化 大众高性能计算(高清
- OpenCL异构并行计算(完整版)
- OpenCL坡度提取GDAL
- intel fpga opencl 编程指南
- intel opencl sdk 用户手册
- 解决并修复opencl出错intel_sdk_for_openc
- 操作系统之文件系统设计一个n 个用户
- openCL编程指导随书源代码
川公网安备 51152502000135号
评论
共有 条评论