ashwin / coursera-heterogeneous

Resources to work offline on the assignments of Heterogenous Parallel Programming course from Coursera.
70 stars 60 forks source link

Splitted Linux and Windows timer implementation #4

Closed oplatek closed 11 years ago

oplatek commented 11 years ago

Hi, I splitted the code which is responsible for timers. Created header (common for Linux and Windows) and put it together with wb.h into include directory.

The source code for timers I put into seperate *.cpp and directories according platform (linux, win32)

Accept it if you want, decline it if you do not want to check it. It's up to you.

ashwin commented 11 years ago

@oplatek That looks good! Have you had a look at my branch? Thanks to contributions from GreyBowyer and achille, a lot of these features are already in my branch :smile:

oplatek commented 11 years ago

Yeah, I checked it after I created the pull request... unfortunately. I guess, that the only obviously better things in my branch is about the Linux Timer.

1) I have only one method + constructor which is OS specific (other like Stop, Start, uses just these 2 methods) So is easier to maintain just these two methods or add new implementation if any other OS or another solution comes up. 2) I am using high performance timer

One thing to consider is to separate the Linux and Windows implementation of cudatimer in two files (and create header cudatimer.h). One solution is to use ifdef and preprocessor. Another is to let it on build system against which cudatimer.cpp to compile. I have no time till thursday, but than I can merge your branch into mino and try to do the pull request again.

ashwin commented 11 years ago

@oplatek Too many folks are already using and have forked from the single wb.h. So, I am a bit wary to merge in this fork now. One contributor has also added a high performance timer for Linux.

Anyway, I will keep an eye out on this fork and merge in pieces that are unimplemented whenever it appears. :smile: