Mali OpenCL SDK v1.1.0
 All Classes Files Functions Variables Macros Pages
sobel_no_vectors.cpp File Reference
#include "common.h"
#include "image.h"
#include <CL/cl.h>
#include <iostream>
#include <fstream>
#include <sstream>
#include <cstddef>
#include <cmath>

Go to the source code of this file.

Functions

int main (void)
 Simple Sobel filter OpenCL sample which doesn't use vectors.
 

Function Documentation

int main ( void  )

Simple Sobel filter OpenCL sample which doesn't use vectors.

A sample which loads a bitmap and then passes it to the GPU. An OpenCL kernel which does Sobel filtering is then run on the data. The gradients of the image in x and y directions are returned by the GPU and are combined on the CPU to form the filtered data. The input image is loaded from assets/input.bmp. The output gradients in X and Y, as well as the combined gradient image are stored in output-dX.bmp, output-dY.bmp and output.bmp respectively. No vectors are used in this sample's OpenCL kernel to provide a comparison with the vectorized version.

Returns
The exit code of the application, non-zero if a problem occurred.

Definition at line 36 of file sobel_no_vectors.cpp.