Developer Guide for Intel® SDK for OpenCL™ Applications 2017
                    
                        ID
                        773042
                    
                
                
                    Date
                    10/22/2018
                
                
                    Public
                
            A newer version of this document is available. Customers should click here to go to the newest version.
                        
                        
                            
                            
                                Legal Information
                            
                        
                            
                            
                                Getting Help and Support
                            
                        
                            
                            
                                Introducing the Intel® SDK for OpenCL™ Applications
                            
                        
                            
                            
                                What's New in This Release
                            
                        
                            
                            
                                Which Version of the Intel® SDK for OpenCL™ Applications Should I Use?
                            
                        
                            
                                Intel® Code Builder for OpenCL™ API Plug-in for Microsoft Visual Studio*
                            
                            
                        
                            
                                Intel® Code Builder for OpenCL™ API Plug-in for Eclipse*
                            
                            
                        
                            
                                Debugging OpenCL™ Kernels on GPU
                            
                            
                        
                            
                                Intel® SDK for OpenCL™ Applications Standalone Version
                            
                            
                        
                            
                            
                                OpenCL™ 2.1 Development Environment
                            
                        
                            
                            
                                Intel® FPGA Emulation Platform for OpenCL™ Getting Started Guide
                            
                        
                            
                                Troubleshooting Intel® SDK for OpenCL™ Applications Issues
                            
                            
                        
                    
                
                                                
                                                
                                                    
                                                    
                                                        Configuring Microsoft Visual Studio* IDE
                                                    
                                                    
                                                
                                                    
                                                    
                                                        Converting an Existing Project into an OpenCL™ Project
                                                    
                                                    
                                                
                                                    
                                                        OpenCL™ New Project Wizard
                                                    
                                                    
                                                    
                                                
                                                    
                                                    
                                                        Building an OpenCL™ Project
                                                    
                                                    
                                                
                                                    
                                                    
                                                        Using OpenCL™ Build Properties
                                                    
                                                    
                                                
                                                    
                                                    
                                                        Selecting a Target OpenCL™ Device
                                                    
                                                    
                                                
                                                    
                                                    
                                                        Generating and Viewing Assembly Code
                                                    
                                                    
                                                
                                                    
                                                    
                                                        Generating and Viewing LLVM Code
                                                    
                                                    
                                                
                                                    
                                                    
                                                        Generating Intermediate Program Binaries with Intel® Code Builder for OpenCL™ API Plug-in
                                                    
                                                    
                                                
                                                    
                                                    
                                                        Configuring OpenCL™ Build Options
                                                    
                                                    
                                                
                                            
                                        
                                                            
                                                            
                                                                
                                                                
                                                                    Creating Buffer Variables
                                                                
                                                                
                                                            
                                                                
                                                                
                                                                    Creating Image Variables
                                                                
                                                                
                                                                    
                                                                        Create Image Variables in Bitmap Format
                                                                    
                                                                        Create Image Variables in YUV Format
                                                                    
                                                                
                                                            
                                                                
                                                                
                                                                    Creating Sampler Variables
                                                                
                                                                
                                                            
                                                                
                                                                
                                                                    Creating Pipe Variables
                                                                
                                                                
                                                            
                                                                
                                                                
                                                                    Selecting Memory Options
                                                                
                                                                
                                                            
                                                                
                                                                
                                                                    Editing the Variables
                                                                
                                                                
                                                            
                                                                
                                                                
                                                                    Viewing Contents of the Variables
                                                                
                                                                
                                                            
                                                                
                                                                
                                                                    Copying Variables in Eclipse
                                                                
                                                                
                                                            
                                                                
                                                                
                                                                    Removing Variables
                                                                
                                                                
                                                            
                                                        
                                                    Creating Image Variables
To create a new image variable, open the Code Builder Variable Management view. Go to Tools > Intel Code Builder for OpenCL API > OpenCL Kernel Development > Windows > Variable Management.
Create Image Variables in Bitmap Format
To create an input image variable:
- Click the Choose type drop-down menu near Add variable at the bottom of the view, and select Images.
-  In the Image Variable context menu, enter the Input image variable: 
     - Enter a meaningful name, such as bmp_input1.
- For IO Mode from the drop-down, select Input.
- In the Source field browse to, or enter the path to input bitmap file.
- Enter the appropriate size, type, channel order, and other parameters for your input image.
 
To create an output image variable:
- Click the Choose type drop-down menu near the Add variable at the bottom of the view, and select Images.
-  In the Image Variable context menu, enter the Output image variable: 
     - Enter a meaningful name, such as bmp_output1.
- For IO Mode from the drop-down, select Output. The output image variable does not take a source file.
- Enter the appropriate size, type, channel order, and other parameters for your output image.
- Create output images with the correct size, type, channel order, and so on.
 
Create Image Variables in YUV Format
- In the IO mode, select Input
-  Fill out the image variable dialog box features for the input image. 
     - For the Source field, browse to select your YUV image file.
- For Source Format, select the appropriate YUV format from the drop-down.
- For width and height enter the appropriate values for the image file.
- For the rest of the fields, you can use the defaults, or revise to use one of the valid.