Author Topic: Run code on GPU/CPU !  (Read 970 times)

Offline arianaa30

  • byte
  • *
  • Posts: 44
    • View Profile
Run code on GPU/CPU !
« on: May 05, 2014, 06:59:05 pm »
Hi,
I'm going to use jPCT-AE for a research project, but there is a tricky part. Is there any ways to specify to bind running the code on GPU, or CPU? I want to compare the performance.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11749
    • View Profile
    • http://www.jpct.net
Re: Run code on GPU/CPU !
« Reply #1 on: May 05, 2014, 11:14:59 pm »
Which code? I'm not sure if i get the question...

Offline arianaa30

  • byte
  • *
  • Posts: 44
    • View Profile
Re: Run code on GPU/CPU !
« Reply #2 on: May 06, 2014, 12:10:33 am »
Oh, I did not really mean "the" code  :) I mean a jPCT-AE -based code, assume one of your benchmarks. I want to see how the performance difference could be if I run it purely on GPU or purely on CPU.

Offline Lobby

  • int
  • **
  • Posts: 66
    • View Profile
    • flowersoft
Re: Run code on GPU/CPU !
« Reply #3 on: May 06, 2014, 09:14:43 am »
Do you mean using a software renderer? As far as I know you can't use one in jPCT-AE :-\.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11749
    • View Profile
    • http://www.jpct.net
Re: Run code on GPU/CPU !
« Reply #4 on: May 06, 2014, 09:43:21 am »
Rendering happens on the GPU and so do geometric transforms and stuff. Scene setup, visiblity detection, gross culling, collision detection and similar engine work happens on the CPU. There's no way to do it otherwise and there's no software renderer as Lobby already mentioned. Does that help somehow?

Offline arianaa30

  • byte
  • *
  • Posts: 44
    • View Profile
Re: Run code on GPU/CPU !
« Reply #5 on: May 06, 2014, 05:03:20 pm »
I see. OK, so there is no way of pushing stuffs to run on either on GPU or CPU.
Yes, your differentiation of which parts do run on GPU and which ones run on CPU was helpful.