资源简介
GPGPU的入门程序,很简单很实用,主要是方便理解!!
![](http://www.nz998.com/pic/50251.jpg)
代码片段和文件信息
//---------------------------------------------------------------------------
// www.GPGPU.org
// Sample Code
//---------------------------------------------------------------------------
// Copyright (c) 2004 Mark J. Harris and GPGPU.org
//---------------------------------------------------------------------------
// This software is provided ‘as-is‘ without any express or implied
// warranty. In no event will the authors be held liable for any
// damages arising from the use of this software.
//
// Permission is granted to anyone to use this software for any
// purpose including commercial applications and to alter it and
// redistribute it freely subject to the following restrictions:
//
// 1. The origin of this software must not be misrepresented; you
// must not claim that you wrote the original software. If you use
// this software in a product an acknowledgment in the product
// documentation would be appreciated but is not required.
//
// 2. Altered source versions must be plainly marked as such and
// must not be misrepresented as being the original software.
//
// 3. This notice may not be removed or altered from any source
// distribution.
//
//---------------------------------------------------------------------------
// Author: Mark Harris (harrism@gpgpu.org)
//---------------------------------------------------------------------------
// GPGPU Lesson 0: “helloGPGPU“.
//---------------------------------------------------------------------------
//
// GPGPU CONCEPTS Introduced:
//
// 1.) Texture = Array
// 2.) Fragment Program = Computational Kernel.
// 3.) One-to-one Pixel to Texel Mapping:
// a) Data-Dimensioned Viewport and
// b) Orthographic Projection.
// 4.) Viewport-Sized Quad = Data Stream Generator.
// 5.) Copy To Texture = feedback.
//
// For details of each of these concepts see the explanations in the
// inline “GPGPU CONCEPT“ comments in the code below.
//
// APPLICATION Demonstrated: A simple post-process edge detection filter.
//
//---------------------------------------------------------------------------
#include
#include
#include
#define GLEW_STATIC 1
#include
#include
// forward declarations
class HelloGPGPU;
void reshape(int w int h);
// globals
CGcontext g_cgContext;
CGprofile g_cgProfile;
HelloGPGPU *g_pHello;
// This shader performs a 9-tap Laplacian edge detection filter.
static const char *edgeFragSource =
“half4 edges(half2 coords : TEX0 \n“
“ uniform sampler2D texture) : COLOR \n“
“{ \n“
“ static const half offset = 1.0 / 512.0; \n“
“ half4 c = tex2D(texture coords);
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 13265 2004-06-11 15:52 helloGPGPU-1.0.2\helloGPGPU.cpp
文件 3690 2004-06-11 15:50 helloGPGPU-1.0.2\helloGPGPU.dsp
文件 53248 2004-06-11 15:50 helloGPGPU-1.0.2\helloGPGPU.exe
文件 4359 2004-05-05 15:40 helloGPGPU-1.0.2\helloGPGPU.vcproj
目录 0 2004-06-11 16:04 helloGPGPU-1.0.2\
- 上一篇:软件工程课设
- 下一篇:MTK elian 一键配网 有详细操作流程
相关资源
- x264源码及其配置文件,用于配置树莓
- 论文研究 - 采用多GPU计算的陡峭三维
- 利用GPU破解rar密码工具
- GPU精粹1-中文版.pdf《GPU精粹:实时图形
- eetop.cn_OpenCL.Parallel Computing on the GPU
- GPU+编程与CG+语言之阳春白雪下里巴人
- MD5GPU.rar
- 数据融合代码-ESTARFM
- GPU高性能运算之CUDA源代码
- win10 vs2015 编译nms和gpunms
- GPU结构概述
- GPU编程与CG语言之阳春白雪下里巴人
- NVIDIA GPU Computing SDK
- 《GPU高性能计算之CUDA》书中源代码
- 基于D3D的YV12视频渲染 更新
- _CPU_GPU协同并行计算研究综述_cuda_op
- GPU编程与CG语言之阳春白雪下里巴人
- GPU gems 1 pdf
- matconvnet的gpu编译版本(cuda7.5)
- 英伟达显卡虚拟化部署手册(M60 vGP
- GPUImage多种滤镜的使用示范以及美颜滤
- CUDA && GPU 数据传输测试
- 国外CPU_GPU_FPGA性能测试比较结果
- 图形处理器架构(GPU_Architecture)与图
- The CUDA Handbook: A Comprehensive Guide to
- 广工高性能计算期末论文-翻译论文
- The OpenCL Specification 1.2 官方原版
- 黑苹果微星B460M迫击炮EFIHackintosh-B46
- CUDA_C_Programming_Guide中文版
- GPU计算高级优化技术精简手册
评论
共有 条评论