AnsweredAssumed Answered

Error Getting Platform OpenCL

Question asked by musa on Nov 19, 2016
Latest reply on Nov 30, 2016 by dipak

hi ,

my system configuration is

Ubuntu 14.04

no Gpu

intel i5 processor 3rd generation

RAM 4GB

using opencl -> AMDAPPSDK-3.0

I am new into OpenCL. i ran a simple program to check the no. of platform got error.

 

CODE:

 

#include <CL/cl.h>

#include <string.h>

#include <stdio.h>

#include <stdlib.h>

#include <iostream>

#include <string>

#include <fstream>

 

#define SUCCESS 0

#define FAILURE 1

using namespace std;

 

int main()

{

    /*Step1: Getting platforms and choose an available one.*/

    cl_uint numPlatforms;    //the NO. of platforms

    cl_platform_id platform = NULL;    //the chosen platform

    cl_int    status = clGetPlatformIDs(0, NULL, &numPlatforms);

 

    cout << "No ofPlatforms: "<< numPlatforms<<endl;

    if (status < 1)

    {

        cout << "Error: Getting platforms!" << endl;

        return FAILURE;

    }

 

}

ERROR:

Error: Getting platforms!

KINDLY PROVIDE SOME SOLUTION TO THIS.

Outcomes