10.07.2015 Views

ATI Stream Computing OpenCL Programming Guide - CiteSeerX

ATI Stream Computing OpenCL Programming Guide - CiteSeerX

ATI Stream Computing OpenCL Programming Guide - CiteSeerX

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>ATI</strong> STREAM COMPUTING<strong>Programming</strong>LayerCommandQueuesE 1K 2M 1 K 1 S 2 S 3 ...1M 2K 3MS 2323. . .nFor CPU queueFor CPU queueFor GPU queueDeviceCommandQueueM 11 K 11 E 11 K 12 M 12 M 31 K 32 M 32CPU...... GPUK 111 K 112SchedulerCPU Core 1 CPU Core 2GPU Core 1 GPU Core 2Figure 2.2Runtime Processing Structure2.2.2 Running Code on Linux2.3 Calling ConventionsThe following steps ensure the execution of <strong>OpenCL</strong> applications on Linux.1. The path to lib<strong>OpenCL</strong>.so ($<strong>ATI</strong>STREAMSDKROOT/lib/x86) must be includedin $LD_LIBRARY_PATH.2. /usr/lib/<strong>OpenCL</strong>/vendors/ must have libatiocl32.so and/orlibatiocl64.so.3. Generally, the path to the kernel file (Template_Kernel.cl) specified in thehost program is relative to the executable. Unless an absolute path isspecified, the kernel file must be in the same directory as the executable.For all Windows platforms, the __stdcall calling convention is used. Functionnames are undecorated.For Linux, the calling convention is __cdecl.2.3 Calling Conventions 2-5Copyright © 2010 Advanced Micro Devices, Inc. All rights reserved.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!