资源简介
NVIDIA GPU Computing SDK
opencl d3d interop
代码片段和文件信息
/*
* Copyright 1993-2010 NVIDIA Corporation. All rights reserved.
*
* Please refer to the NVIDIA end user license agreement (EULA) associated
* with this source code for terms and conditions that govern your use of
* this software. Any use reproduction disclosure or distribution of
* this software and related documentation outside the terms of the EULA
* is strictly prohibited.
*
*/
// *********************************************************************
// Utilities specific to OpenCL samples in NVIDIA GPU Computing SDK
// *********************************************************************
#include “oclUtils.h“
#include
#include
#include
#include
#include
//////////////////////////////////////////////////////////////////////////////
//! Gets the platform ID for NVIDIA if available otherwise default
//!
//! @return the id
//! @param clSelectedPlatformID OpenCL platoform ID
//////////////////////////////////////////////////////////////////////////////
cl_int oclGetPlatformID(cl_platform_id* clSelectedPlatformID)
{
char chBuffer[1024];
cl_uint num_platforms;
cl_platform_id* clPlatformIDs;
cl_int ciErrNum;
*clSelectedPlatformID = NULL;
// Get OpenCL platform count
ciErrNum = clGetPlatformIDs (0 NULL &num_platforms);
if (ciErrNum != CL_SUCCESS)
{
shrLog(“ Error %i in clGetPlatformIDs Call !!!\n\n“ ciErrNum);
return -1000;
}
else
{
if(num_platforms == 0)
{
shrLog(“No OpenCL platform found!\n\n“);
return -2000;
}
else
{
// if there‘s a platform or more make space for ID‘s
if ((clPlatformIDs = (cl_platform_id*)malloc(num_platforms * sizeof(cl_platform_id))) == NULL)
{
shrLog(“Failed to allocate memory for cl_platform ID‘s!\n\n“);
return -3000;
}
// get platform info for each platform and trap the NVIDIA platform if found
ciErrNum = clGetPlatformIDs (num_platforms clPlatformIDs NULL);
for(cl_uint i = 0; i < num_platforms; ++i)
{
ciErrNum = clGetPlatformInfo (clPlatformIDs[i] CL_PLATFORM_NAME 1024 &chBuffer NULL);
if(ciErrNum == CL_SUCCESS)
{
if(strstr(chBuffer “NVIDIA“) != NULL)
{
*clSelectedPlatformID = clPlatformIDs[i];
break;
}
}
}
// default to zeroeth platform if NVIDIA not found
if(*clSelectedPlatformID == NULL)
{
shrLog(“WARNING: NVIDIA OpenCL platform not found - defaulting to first platform!\n\n“);
*clSelectedPlatformID = clPlatformIDs[0];
}
free
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2015-07-02 15:45 NVIDIA GPU Computing SDK\
目录 0 2015-07-02 15:45 NVIDIA GPU Computing SDK\OpenCL\
目录 0 2015-07-02 15:50 NVIDIA GPU Computing SDK\OpenCL\bin\
目录 0 2015-07-02 15:50 NVIDIA GPU Computing SDK\OpenCL\bin\Win32\
目录 0 2015-07-02 15:54 NVIDIA GPU Computing SDK\OpenCL\bin\Win32\Debug\
文件 1058816 2015-07-02 15:54 NVIDIA GPU Computing SDK\OpenCL\bin\Win32\Debug\oclSimpleD3D10Texture.exe
文件 6885376 2015-07-02 15:54 NVIDIA GPU Computing SDK\OpenCL\bin\Win32\Debug\oclSimpleD3D10Texture.pdb
目录 0 2015-07-02 15:45 NVIDIA GPU Computing SDK\OpenCL\bin\win64\
目录 0 2015-07-02 15:45 NVIDIA GPU Computing SDK\OpenCL\bin\win64\Debug\
文件 1008128 2012-04-08 22:40 NVIDIA GPU Computing SDK\OpenCL\bin\win64\Debug\oclSimpleD3D10Texture.exe
目录 0 2015-07-02 15:45 NVIDIA GPU Computing SDK\OpenCL\bin\win64\Release\
文件 411136 2012-04-08 22:40 NVIDIA GPU Computing SDK\OpenCL\bin\win64\Release\oclSimpleD3D10Texture.exe
目录 0 2015-07-02 15:49 NVIDIA GPU Computing SDK\OpenCL\common\
目录 0 2015-07-02 15:50 NVIDIA GPU Computing SDK\OpenCL\common\Debug\
文件 266635 2015-07-02 15:50 NVIDIA GPU Computing SDK\OpenCL\common\Debug\oclUtils.obj
目录 0 2015-07-02 15:53 NVIDIA GPU Computing SDK\OpenCL\common\Debug\oclUtils.tlog\
文件 31490 2015-07-02 15:50 NVIDIA GPU Computing SDK\OpenCL\common\Debug\oclUtils.tlog\CL.read.1.tlog
文件 844 2015-07-02 15:50 NVIDIA GPU Computing SDK\OpenCL\common\Debug\oclUtils.tlog\CL.write.1.tlog
文件 750 2015-07-02 15:50 NVIDIA GPU Computing SDK\OpenCL\common\Debug\oclUtils.tlog\Lib-li
文件 446 2015-07-02 15:50 NVIDIA GPU Computing SDK\OpenCL\common\Debug\oclUtils.tlog\Lib-li
文件 1008 2015-07-02 15:50 NVIDIA GPU Computing SDK\OpenCL\common\Debug\oclUtils.tlog\cl.command.1.tlog
文件 748 2015-07-02 15:50 NVIDIA GPU Computing SDK\OpenCL\common\Debug\oclUtils.tlog\lib.command.1.tlog
文件 239 2015-07-02 15:53 NVIDIA GPU Computing SDK\OpenCL\common\Debug\oclUtils.tlog\oclUtils.lastbuildstate
文件 1571 2015-07-02 15:53 NVIDIA GPU Computing SDK\OpenCL\common\Debug\oclUtils_vs2008.log
文件 748544 2015-07-02 15:50 NVIDIA GPU Computing SDK\OpenCL\common\Debug\vc120.idb
文件 356352 2015-07-02 15:50 NVIDIA GPU Computing SDK\OpenCL\common\Debug\vc120.pdb
目录 0 2015-07-02 15:45 NVIDIA GPU Computing SDK\OpenCL\common\inc\
目录 0 2015-07-02 15:45 NVIDIA GPU Computing SDK\OpenCL\common\inc\CL\
文件 51084 2012-02-17 01:55 NVIDIA GPU Computing SDK\OpenCL\common\inc\CL\cl.h
文件 4985 2012-02-17 01:55 NVIDIA GPU Computing SDK\OpenCL\common\inc\CL\cl_d3d10.h
文件 4724 2012-02-17 01:55 NVIDIA GPU Computing SDK\OpenCL\common\inc\CL\cl_d3d10_ext.h
............此处省略122个文件信息
- 上一篇:水动力学仿真AQWA教程
- 下一篇:词法分析器有界面
相关资源
- 《GPU高性能计算之CUDA》书中源代码
- 基于D3D的YV12视频渲染 更新
- AMD and Nvidia GOP 更新工具 GOPUpd_v1.9.6.
- 垃圾短信基于文本内容识别-cloudComp
- 云计算Cloud Computing
- NVIDIA INT8 GTC China 2017 community Corner 演讲
- _CPU_GPU协同并行计算研究综述_cuda_op
- GPU编程与CG语言之阳春白雪下里巴人
- OpenStack Cloud Computing Cookbook 3rd Edition
- nVIDIA显卡CUDA性能测试工具,可测试
- Riemannian Computing in Computer Vision
- computing with spatial trajectories
- GPU gems 1 pdf
- matconvnet的gpu编译版本(cuda7.5)
- 英伟达显卡虚拟化部署手册(M60 vGP
- nvdia cuda c best practices guide
- Alienware NVIDIA GeForce GTX 780M 显卡一键超
- GPUImage多种滤镜的使用示范以及美颜滤
- 云计算英文版Cloud Computing
- OpenStack.Cloud.Computing.Cookbook.3rd.Edition
-
Cloud Computing Web-ba
sed Applications That - Cloud.Computing.A.Practical.Approach
- CUDA && GPU 数据传输测试
- 国外CPU_GPU_FPGA性能测试比较结果
- 图形处理器架构(GPU_Architecture)与图
- NVIDIA GeForce GTX 650 1024 MB for mac 显卡驱
- The CUDA Handbook: A Comprehensive Guide to
- 广工高性能计算期末论文-翻译论文
- 神经形态认知计算 Neuromorphic Cognitiv
- Cognitive Computing Architectureand Intelligen
评论
共有 条评论