OpenCl

  • HaterSalad
    2nd Aug 2010 Member 0 Permalink
    I know nothing about programming but how hard would it be to use OpenCL for TPT?
  • Aizria
    2nd Aug 2010 Member 0 Permalink
    Actually, in looking at the source recently, I believe I saw a reference in the #include section to OpenCL. Hang on a sec and I'll check that.

    EDIT: Yeah. Here it is:

    #ifdef OCL

    #include <CL/opencl.h>

    #endif
  • Simon
    2nd Aug 2010 Administrator 2 Permalink
    Excimer-Sun-Software
    That's as close as it gets to having OpenCL implemented. I'm currently researching and hope to have it implemented soon.
  • Aizria
    2nd Aug 2010 Member 0 Permalink
    At first I thought it was referencing OpenGL! Haha! I almost panicked then because I'm altering it slightly to work on jailbroken iPod Touch/iPhone and the hardware for those devices has absolutely no support for OpenGL (that I know of). Then I realised that it said "opencl.h" and not "opengl.h" and then calmed down a bit.
  • HaterSalad
    2nd Aug 2010 Member 0 Permalink
    So, if OpenCL were implemented would we see a HUGE improvement or just a few more fps here and there?
  • ssc4k
    2nd Aug 2010 Member 0 Permalink
    Simon:
    I'm currently researching and hope to have it implemented soon.

    That's great news! I know you have the skills to be able to do this, I never could :p.

    HaterSalad:
    So, if OpenCL were implemented would we see a HUGE improvement or just a few more fps here and there?

    If used to calculate the physics, yes depending on how good your your GPU is (assuming that's what the OpenCL will be written optimized to use) possibly a 50 times speedup, if coded for using a few CPU cores then a few times speedup. The best part is most of the game uses single precision floats or integers which GPU's do VERY well with compared to doubles.
  • triclops200
    2nd Aug 2010 Former Staff 0 Permalink
    ... I'm working on opencl code right now lol
  • floridarolf
    2nd Aug 2010 Member 0 Permalink
    Maybe you could write a super nice email to AMD and ask them how they did it? ^^
  • triclops200
    2nd Aug 2010 Former Staff 0 Permalink
    floridarolf
    lol, I'm starting to understand it, I, at least, don't think we'll need to (if I can understand it, Simon definitely can)
  • plypencil
    2nd Aug 2010 Member 0 Permalink
    Using a gpu instead of cpu can get you around 4000 times more fps if you use a nvidia phyx card, I wont notice a difference though I have no lag what so ever