91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 27KB
    文件類型: .zip
    金幣: 2
    下載: 0 次
    發布日期: 2021-05-11
  • 語言: 其他
  • 標簽: GPGPU??GPU??

資源簡介

GPGPU的入門程序,很簡單很實用,主要是方便理解??!

資源截圖

代碼片段和文件信息

//---------------------------------------------------------------------------
//???????????????????????????????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\

評論

共有 條評論