• Login
  • Register
  • Dolphin Forums
  • Home
  • FAQ
  • Download
  • Wiki
  • Code


Dolphin, the GameCube and Wii emulator - Forums › Dolphin Emulator Discussion and Support › Development Discussion v
« Previous 1 ... 30 31 32 33 34 ... 116 Next »

Math routines
View New Posts | View Today's Posts

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thread Modes
Math routines
12-12-2015, 04:38 AM
#1
CyBoRg
Unregistered
 
Rainbow 
Hello,I'm new here. Big Grin
I'm thinking about trying to optimize some math routines if this has not been done already.
Is there any operation which needs optimization ? For example,a factorization routine,a square root,matrix multiplications,divisions or something like that ? Tongue
Where should I look in the code ?
Also, did somebody think about a "distributed rendering" version of dolphin ? Cool
Regards Blush
Reply
12-12-2015, 08:56 AM
#2
degasus Offline
Developer
**********
Developers (Some Administrators and Super Moderators)
Posts: 1,827
Threads: 10
Joined: May 2012
Our "math" routines look a bit different. eg this is very high in profilation while running in interpreter mode. We also have no factorization or matrix multiplications. But there is a square root and a division, but I doubt you're talking about this kind of code.

Please keep in mind that we're emulating hardware, so all of our functions are done in custom hardware on the wii itself. There is no higher logic in hardware.

What do you mean about "distributed rendering"?
Find
Reply
12-15-2015, 01:11 AM
#3
CyBoRg
Unregistered
 
(12-12-2015, 08:56 AM)degasus Wrote: Our "math" routines look a bit different. eg this is very high in profilation while running in interpreter mode. We also have no factorization or matrix multiplications. But there is a square root and a division, but I doubt you're talking about this kind of code.

Please keep in mind that we're emulating hardware, so all of our functions are done in custom hardware on the wii itself. There is no higher logic in hardware.
That's why I was asking about math.
There are also GPU implementations of math libraries.
But the idea was to understand if there was something that could have improved the performance with the aid of efficient math.
For example, I see a "// TODO: Optimize the below to be as fast as possible." in this.

degasus Wrote:What do you mean about "distributed rendering"?
Forgive me for that, it's a stupid thought... Tongue
I had in mind a master-slave option to share the load on more CPUs,via LAN/WiFi.
Reply
12-15-2015, 01:35 AM
#4
KHg8m3r Offline
Doesn't sleep, just Dolphin and Robots
*******
Posts: 5,920
Threads: 4
Joined: Sep 2013
(12-15-2015, 01:11 AM)CyBoRg Wrote:
(12-12-2015, 08:56 AM)degasus Wrote: Our "math" routines look a bit different. eg this is very high in profilation while running in interpreter mode. We also have no factorization or matrix multiplications. But there is a square root and a division, but I doubt you're talking about this kind of code.

Please keep in mind that we're emulating hardware, so all of our functions are done in custom hardware on the wii itself. There is no higher logic in hardware.
That's why I was asking about math.
There are also GPU implementations of math libraries.
But the idea was to understand if there was something that could have improved the performance with the aid of efficient math.
For example, I see a "// TODO: Optimize the below to be as fast as possible." in this.

If you can find a way to code it so that math is faster, be our guest. If you can effectively push it to the GPU without it slowing down the GPU work already being done and getting a CPU boost out of it, even better.

(12-15-2015, 01:11 AM)CyBoRg Wrote:
degasus Wrote:What do you mean about "distributed rendering"?
Forgive me for that, it's a stupid thought... Tongue
I had in mind a master-slave option to share the load on more CPUs,via LAN/WiFi.

Spreading the CPU load over a network is probably not a good idea. If you take our current dual core Dolphin setup, and try to split those threads over multiple LAN/WiFi computers/CPUs, you would get so much lag from waiting for the different threads to all sync up together.
Find
Reply
12-15-2015, 02:40 AM
#5
CyBoRg
Unregistered
 
(12-15-2015, 01:35 AM)KHg8m3r Wrote: If you can find a way to code it so that math is faster, be our guest. If you can effectively push it to the GPU without it slowing down the GPU work already being done and getting a CPU boost out of it, even better.

I wish I was that good Tongue I'm going to fork the code,we'll see what happens.  Big Grin

KHg8m3r Wrote:Spreading the CPU load over a network is probably not a good idea. If you take our current dual core Dolphin setup, and try to split those threads over multiple LAN/WiFi computers/CPUs, you would get so much lag from waiting for the different threads to all sync up together.
Not only that,it's even harder in that way.
But I had a different trick in mind.  Angel
The idea is to have both(or "n") machine(s) working on half(or 1/n ) the native resolution and to sync the results in one single frame to display.
It's some sort of "shared frame buffer" and the theory behind it is that (bare with me,it's an example,numbers are hypothetical) if we have two machines that can render 1M pixels at 10fps and 500K pixels at 20fps, if we sum our "job" together we effectively get 1M pixels at -+20/19fps(with the minimum lag possible,which is in the order of a few milliseconds on a LAN environment over miles;it's almost unnoticeable if the machines are within a meter).
It is not efficient space-wise because you need "n" copies of everything on the machines,unlike a general implementation of a parallel hypervisor,where the load is shared intelligently by passing messages through the switches; but with this trick in mind,if done right,you effectively multiply the fps by the number of machines(again,at the expense of space since a copy of all the software is needed on each machine).
Cool
Reply
« Next Oldest | Next Newest »


  • View a Printable Version
  • Subscribe to this thread
Forum Jump:


Users browsing this thread: 1 Guest(s)



Powered By MyBB | Theme by Fragma

Linear Mode
Threaded Mode