Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: opencl programming

  1. #1
    Junior Member
    Join Date
    Dec 2011
    Posts
    7

    opencl programming

    i do not have a gpu for my system..i want to run an opencl program for face recogniton.. can i do it possibly with a cpu(x86,i5 core cpu,32 bit operating system)? please help me out..

  2. #2

    Re: opencl programming

    On my macbook pro, I use opencl both on the GPU and the CPU. You specify something like CL_DEVICE_CPU to make a context for the cpu.

    Off the top of my head I don't know how many cores (real or virtual) the i5 has. My i7 has two real cores but with hyperthreading they appear as four.

  3. #3
    Junior Member
    Join Date
    Dec 2011
    Posts
    7

    Re: opencl programming

    thanks.. can you help me out with any sites related my project..?wat are the back up files required for running a opencl code?

  4. #4
    Junior Member
    Join Date
    Dec 2011
    Posts
    7

    Re: opencl programming

    in compiling the following program i'm gettin a error saying"error compiling opencl kernel".
    can anyone pl help me out?


    #include <utility>
    #define __NO_STD_VECTOR
    #include <CL/cl.hpp>
    #include <cstdio>
    #include <cstdlib>
    #include <fstream>
    #include <iostream>
    #include <string>
    #include <iterator>
    const std::string hw("Hello World\n");
    inline void
    checkErr(cl_int err, const char * name)
    {
    if (err != CL_SUCCESS) {
    std::cerr << "ERROR: " << name
    << " (" << err << ")" << std::endl;
    exit(EXIT_FAILURE);
    }
    }
    int
    main(void)
    {
    cl_int err;
    cl::vector< cl::Platform > platformList;
    cl::Platform::get(&platformList);
    checkErr(platformList.size()!=0 ? CL_SUCCESS : -1, "cl::Platform::get");
    std::cerr << "Platform number is: " << platformList.size() << std::endl;

    std::string platformVendor;
    platformList[0].getInfo((cl_platform_info)CL_PLATFORM_VENDOR, &platformVendor);
    std::cerr << "Platform is by: " << platformVendor << "\n";
    cl_context_properties cprops[3] =
    {CL_CONTEXT_PLATFORM, (cl_context_properties)(platformList[0])(), 0};

    cl::Context context(
    CL_DEVICE_TYPE_CPU,
    cprops,
    NULL,
    NULL,
    &err);
    checkErr(err, "Conext::Context()");
    char * outH = new char[hw.length()+1];
    cl::Buffer outCL(
    context,
    CL_MEM_WRITE_ONLY | CL_MEM_USE_HOST_PTR,
    hw.length()+1,
    outH,
    &err);
    checkErr(err, "Buffer::Buffer()");

  5. #5

    Re: opencl programming

    I use Xcode / Cocoa under OSX ... everything is already there when I install Xcode, but I don't have the luxury of latest drivers etc. -- I have to wait for Apple to do stuff, and they lag way behind.

    I don't know C++ so I'm not much help; maybe later I can find some time to see something obvious wrong with your code, but maybe someone who knows C++ will speak up...?

  6. #6
    Member
    Join Date
    Mar 2010
    Location
    Raleigh, NC
    Posts
    55

    Re: opencl programming

    Is that your entire code? I don't see your kernel (what is compiled), nor do I see your commands for compiling.

    Make sure you have an SDK installed so that you can use OpenCL. AMD/NVIDIA/Intel should be good. Please give us more information and we can help you further.

  7. #7
    Junior Member
    Join Date
    Dec 2011
    Posts
    7

    Re: opencl programming

    is it possible to write a opencl code for face recognition?

  8. #8

    Re: opencl programming

    I imagine that it may be possible to do what you want to do, but I do not know what is involved in face recognition, or the details of your proposed approach.

    You need to decide that yourself. I think that you need first to at least design your program, how you intend to deal with face recognition, which calculations are involved. Then, once that is done, you can look at your design and decide which of those calculations can be done in parallel. Then you will know if your project is appropriate for OpenCL.

  9. #9
    Junior Member
    Join Date
    Dec 2011
    Posts
    7

    Re: opencl programming

    iam planning to write program for a illuminance invariant face recognition system using opencl.methodology includes filtering(homomorphic),illumination normalization and correction using dct,face recognition using pca...

  10. #10
    Junior Member
    Join Date
    Dec 2011
    Posts
    7

    Re: opencl programming

    i use a intel processor(i5 core). i have installed AMD APP SDK for opencl .. will it be compatible? please help me soon..

Page 1 of 2 12 LastLast

Similar Threads

  1. opencl programming for face recognition
    By nandhini in forum OpenCL
    Replies: 1
    Last Post: 04-11-2012, 11:14 PM
  2. Replies: 0
    Last Post: 04-28-2011, 07:25 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •