๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
๐Ÿ’ก EE's DEV/FPGA

[OpenCL] VS 2017์—์„œ OpenCL ์‚ฌ์šฉํ•˜๊ธฐ

by Danna 2018. 8. 8.
728x90
728x90

00 OpenCL ์„ค์น˜ํ•˜๊ธฐ
  • Visual Studio Community 2017 ์‚ฌ์šฉ์ค‘
  • ํ•„์š” ์‚ฌ์–‘ ํ™•์ธ๊ณผ OpenCL SDK ์„ค์น˜๋Š” ์•„๋ž˜ ์‚ฌ์ดํŠธ์—์„œ
  • SDK ์„ค์น˜ ์‹œ OpenCL์šฉ ๋“œ๋ผ์ด๋ฒ„๋„ ํ•จ๊ป˜ ์„ค์น˜๋œ๋‹ค.
  • Windows update๋ฅผ ํ†ตํ•ด ๋‚ด์žฅ๊ทธ๋ž˜ํ”ฝ ๋“œ๋ผ์ด๋ฒ„๋ฅผ ์ตœ์‹ ์œผ๋กœ ์œ ์ง€ํ•ด์•ผ ํ•œ๋‹ค! 

01 Visual Studio ์—์„œ ํ”„๋กœ์ ํŠธ ์ƒ์„ฑ
  • ์ƒˆ ํ”„๋กœ์ ํŠธ๋ฅผ ๋งŒ๋“ค ๋•Œ, CPU OpenCL Project for Windows ์„ ํƒ
  • ์†”๋ฃจ์…˜ ์ด๋ฆ„๊ณผ ์œ„์น˜๋Š” ๋ณธ์ธ์ด ์„ค์ •

02 ํ”„๋กœ์ ํŠธ ์ƒ์„ฑ ์™„๋ฃŒ
  • ์†”๋ฃจ์…˜์„ ๋งŒ๋“ค๊ณ  OpenCL ํŒŒ์ผ๊ณผ Source ํŒŒ์ผ์ด ์žˆ๋Š” ๊ฒƒ์„ ํ™•์ธํ•œ๋‹ค.
  • ํ•ด๋‹น ์ฝ”๋“œ๋Š” ๊ฐ„๋‹จํ•œ Add ์˜ˆ์ œ์ด๋‹ค.
  • ๋””๋ฒ„๊ทธ ํ•˜์ง€ ์•Š๊ณ  ์‹คํ–‰ [Ctrl + F5]


03 SDK 8.1์„ ์ฐพ์„ ์ˆ˜ ์—†๋‹ค๋Š” ์—๋Ÿฌ๊ฐ€ ๋‚˜๋Š” ๊ฒฝ์šฐ
  • ํ”„๋กœ์ ํŠธ ์†์„ฑ > Windows SDK ๋ฒ„์ „์„ 10.0์œผ๋กœ ๋ณ€๊ฒฝํ•ด์ฃผ์—ˆ๋‹ค.

03-2 ๋‹ค๋ฅธ ๋ฐฉ๋ฒ•?
  • #include ์ฝ”๋“œ ์œ„์ชฝ์— ์•„๋ž˜ define์„ ์ž‘์„ฑํ•ด์ค€๋‹ค.
  • #define CL_USE_DEPRECATED_OPENCL_1_2_APIS

04 ์ฝ˜์†”์ฐฝ์ด ๋ฐ”๋กœ ์‚ฌ๋ผ์ง€๋Š” ๊ฒฝ์šฐ
  • ํ”„๋กœ์ ํŠธ - ์†์„ฑ - ๋ง์ปค - ์‹œ์Šคํ…œ - ํ•˜์œ„ ์‹œ์Šคํ…œ : ์ฝ˜์†”๋กœ ๋ณ€๊ฒฝํ•ด์ค€๋‹ค.

05 ์‹คํ–‰ ๊ฒฐ๊ณผ


99 ์ฐธ๊ณ ํ•œ ์‚ฌ์ดํŠธ
  • [ํ›„๋กœ๋ฆฐ์˜ ํ”„๋กœ๊ทธ๋ž˜๋ฐ ์ด์•ผ๊ธฐ] http://hoororyn.tistory.com/1?category=712666

728x90
728x90