cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

kalmun
Journeyman III

Problem in running an OpenCL code

I have a problem when running  OpenCL code "EigenValue.cpp" downloaded from 

<a class="jive-link-external-small" href="http://simulation-opencl.googlecode.com/svn/trunk/samples_atistream/EigenValue/">http://simulation-opencl.googlecode.com/svn/trunk/samples_atistream/EigenValue/</a>.  The errors received were

EigenValue.hpp:105:33: error: SDKUtil/SDKCommon.hpp: No such file or directory

EigenValue.hpp:106:38: error: SDKUtil/SDKApplication.hpp: No such file or directory

EigenValue.hpp:107:38: error: SDKUtil/SDKCommandArgs.hpp: No such file or directory

EigenValue.hpp:108:31: error: SDKUtil/SDKFile.hpp: No such file or directory

I would be grateful, if you could let me know how to find the above missing header files.

thanks.

Kalani

Hi&#13;

&#13;

&#13;

&#13;

Thanks for your reply. I got the following errors after doing the above modifications.

EigenValue.cpp: In member function ‘virtual int EigenValue::genBinaryImage()’:

EigenValue.cpp:103: error: ‘bifData’ is not a member of ‘streamsdk’

EigenValue.cpp:103: error: expected ‘;’ before ‘binaryData’

EigenValue.cpp:105: error: ‘binaryData’ was not declared in this scope

EigenValue.cpp:109: error: ‘isComplierFlagsSpecified’ was not declared in this scope

EigenValue.cpp:111: error: ‘flags’ was not declared in this scope

EigenValue.cpp:119: error: ‘class streamsdk::SDKCommon’ has no member named ‘generateBinaryImage’

I would be grateful if you could let me know a solution for the above.

Thanks.

Kalyani

0 Likes
4 Replies
binying
Challenger

Change them to

#include <SDKCommon.hpp>

#include <SDKApplication.hpp>

#include <SDKCommandArgs.hpp>

#include <SDKFile.hpp>

0 Likes

But you still get error when compiling it, it is---

error C2259: 'EigenValue' : cannot instantiate abstract class

2>          due to following members:

2>          'int SDKSample::genBinaryImage(void)' : is abstract

2>          c:\users\binying\documents\amd app\samples\opencl\sdkutil\include\sdkapplication.hpp(103) : see declaration of 'SDKSample::genBinaryImage'

2>

2>Build FAILED.

0 Likes

The solution is

step1. add one line "int genBinaryImage();" in line 196, between   " int setupEigenValue();" and " int setupCL();" in the *.hpp file

step 2.

. in .cpp file, add:

int
EigenValue::genBinaryImage()
{
    streamsdk::bifData binaryData;
    binaryData.kernelName = std::string("EigenValue_Kernels.cl");
    binaryData.flagsStr = std::string("");
    if(isComplierFlagsSpecified())
        binaryData.flagsFileName = std::string(flags.c_str());

    binaryData.binaryName = std::string(dumpBinary.c_str());
    int status = sampleCommon->generateBinaryImage(binaryData);

    CHECK_ERROR(status, SDK_SUCCESS, "OpenCL Generate Binary Image Failed");

    return SDK_SUCCESS;

}

, you can do other thins in the function, it's up to you.