GithubHelp home page GithubHelp logo

incredibleleitman / agd_job_system Goto Github PK

View Code? Open in Web Editor NEW

This project forked from scrembetsch/agd_job_system

0.0 0.0 0.0 6.32 MB

Job System Implemention in C++ for university course "Advanced Game Development"

C++ 89.77% C 10.23%

agd_job_system's Introduction

AGD_Job_System

Job System Implemention in C++ for university course "Advanced Game Development"

Other comments and explanations are in source code.

Performance Comparison:

Serial: Serial

Parallel with 1 Thread: Parallel 1

Parallel with 2 Threads: Parallel 2

Parallel with 3 Threads: Parallel 3

Parallel with 7 Threads: Parallel 7

As we see the fastest possible runtime is already achieved with 3 threads (Reason for this is explained in main.cpp).

Start arguments

Start in parallel:

-p

Otherwise starts in serial mode

Start with different amount of threads:

-t [numThreads]

Otherwise starts with a std::hardware_concurrency() - 1.

Macro Configuration

#define HTL_USING_LOCKLESS          // using lockless variant of worker queue
#define HTL_EXTRA_LOCKS             // still using locks in lockless queue for testing
#define HTL_TEST_DEPENDENCIES       // test if correct dependencies are met
#define HTL_WAIT_FOR_AVAILABLE_JOBS // if set, conditional var wakes on executable jobs instead of size > 0
#define HTL_TEST_ONLY_ONE_FRAME     // main loop returns after one execution
#define HTL_EXTRA_DEBUG             // additional debug output
#define HTL_SORT_JOBS               // sort jobs to be allow workers to instantly start after pushing

THEY TERK ERR JERBS!

                                                 .*/#%%%%%#####/**                                                  
                                          .#%%%#%%%%#&####%%%#%%%%%%%%%%*                                           
                                       .%%%%###%%%%##############%#####%%%%%                                        
                                      %%%#################%########%######%%#%,                                     
                              *#%%%%%%%%%%%%%######%%#%####%#######%########%#%%                                    
                          /%%%%%%%%&%%%*.....%%###%%%%%%%%%#%######%############%#                                  
                        /#%%%%%%%%%%,.........%%%#%%%%%%%%%%#%#%%##%##########%##%%                                 
                       %#%##%##%%(.............#%#%%%*#%%%%%%%%%%%%#%####%%###%###%%                                
                      %######%%/.................%%%%.*%%%%%%%%%%%%%%%###%%%%#%#%%#%#                               
                     %%#%##%#%..................../%%%.,%%%%%%%%%%%%%%####%%%%%#%%#%%(                              
                    ,%##%#%%#......................./%*..(%%%%%%%%%%%%%%%%%%%%%%%%%%%%                              
                    %%%#%#%%........((((((####(*...........#%%%%%%%%%%%%%&%%%%%%%%%&%%,                             
                   .%%%%%&%.....................(####.....,(((%%%%%%./%%%%%%%(%%%%%%%%#                             
                   .%%%%#&/.....................................,#%%%%...*#%%%#.%%%%%%#                             
                    %%%%%&..............             ...             ............#%%#%(                             
                     %%%%%...........                 .                ...........%%%%.                             
                      #%%..........,            #*    /      .           *........%%%#...                           
                   ...*#%..........                   .      .            .........%%.,...                          
                   ..,..,,.........                  .,.                  ................                          
                    ,....,,.........               ..  ...               .........,....*.                           
                     ..*..,,.........,.        ..,...*...... *        ..*..........* ...                            
                       .. *,......................................................,..                               
                         ..*.,,...................(............................,,..                                 
                          %........................,/(..#......................,.,%                                 
                          %%%%%,,,...........,%%%%%%%%%%%%%%%%%%%*.........,.,%%%%%                                 
                          %%%%%%%..,.......,%#%%%%%%%%%%%%#%%%%%%%%,........#%%%%%#                                 
                          ##%%%%%%%..,.. .(%%%%%#%%#%##%##((%%%%%%%%#...,,.#%%%%%#(                                 
                           .#%%%%%%%%,.,,%%%%%%%/,,,.....,.,.,*%%%%%%%#..%%%%%%%#                                   
                            ,#%%%%%%%%((*%%%#,.,,,,,,,,,,,,,.,,,,,*(%%##%%%%%%%#                                    
                              ,%(%%%%%%%%,,,,,,,,,,,,,,,,,,,.,,.,.,,&&&&&&&%#%.                                     
                         ../(##&%%%%&&&&%&&%%(..,...,,..........%%%%&&%#%&&&&%%&&&%.                                
                   #&&%%#%%%&&&&%%%&&&&##&&&%&&#................&&&&&&&%%#%%&&&%%&&&%%%#                            
             #%%%&&&&&&&&&%&%#%&&&&&%%%%&&&&&&&&.............../&&%#&&&%%%%%%&&%&#%&&&###%&                         
      *//%%&&&&%%#%&&&&&&%%%&&&&%%%%%%%%%&&&%&&&&(   ...      #&&&&&&&&&%%%%#%%%&&&%%&&&&&&&&&*                     
%&&%&&%&%%&&%##(%#%&&&&&&&&&%%%%#%%%%%%&&%%&&&&&&&&*         %#%%%&&&%%%&%%%%#%%%&&&&&&&&&&&%%%%%                   
#%##&&%&%#%....,**.,*,,*.,......(%%%#&&&&%%&%&&#%%%%%(     #%%%#%%&&&%%%&&&%%%%%&&&&&&&&&&&%#%&&&&&.                
#&&&@&&&&&&#..*.../*.,...,............./&%#&&&&#%%%%&%%*  &&&%&&&&&&&&&&&&&&&&&&&&&&&&&&%%&&&&&&&&&&%/              
&&&&&&&&&&&%.........,....................&&&&&&&&%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&%%#%%&&&&&&&&&%%%%%#%/            
*%#%&&%&%%%% ............................(..&&&%&&&&&&&&&&&&&&&&&%&&&&&&&&&&&&&&&&&&%(&&&&&&&%%%&&&%%&&&%%,         
 %%%&&%&%%%%                ..............%*..@&&&&&&&&&&&&&&&&&&&&&&&&%&&&&%%&%%%&%%,   #&&&#%&&&&&&&&&&&%%%%*     
                            ...............%&/ %%%%#%%%%%##%%%%##%%&&&%%%&&&%%%%%%%%%,      /%%%%&&&&&&&&&&%%%      
                             %*....*(%&/....%&&%%%%%%%%%%%%%%&%%%%&&&&&%&&&&&&&&&&&&&,       ..,#&&%&&&%%&&%%       
                             %%&&&&&&&@@@.../&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&,     ,....,.....,#%%#%        
                             *&&&&&&&&&&&*...&&&&&&&&&&&&&&&&&&&&&%&&&&&&&&&&&&&&&&&&     .............             
                              &&&&&&&&&&&@..&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&%%%&&%   .....,,*.,,.,*.             
                              (&&&&%&%&&&&&%&&&&%%%##%%%%%#%%%%%#%%&&&&%#&&&&%%#%#%%# ......,.,,*.,,                
          ,#############################################################################################            
          /################################################(############################################            
          /########(########################%##########(#########################%######################            
          /#%#%###%###%%%%%%##%%#%##%##%##%%##%##%%%###%##%#%%#%%#%%#%%%#%#%%##%##%%#%%%###%##%#%%#%%#%%            
           %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%(            
           (%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%             
            %%%%%################################################################################%%%%%#             
            /%%%%############(#######################%###########################################%%%%%              
             %%%%################################################################################%%%%%              
             (%%%###############%&%%&&%%%%&&%%%%%%%%%%&%%%%%%&%&%%%%%%%%&%%&%%%%&&%##############%%%%.              
              %%%###############%#############(###################################%##############%%%%               
              #%%###############&####%############################################&##############%%%/               
               %%############%##%##########################%#####################%%##############%%%                
                 ###############%################################################%&##############*                  

JOBS DONE!

                                                     .,,...,,.                                                          
                                               ./(**//(//////////*** .*******.                                          
                                          (#(//,/(((/((((((((#(((//**/*//(((##(                                         
                                    %%%%#(/*/((((((#####%%%%%%###(/*//(((##%%##                                         
 #&%,                             ,#%%%%%#(**(((((###%%%%#//(#%%%####**/(%%%%%&%%%%/                                    
  &&%%%%,                       %%%%##(///(####%%%/.      .*(#%#(((((((#%%&%%&&&%%%                                     
  %%%%%%%%%%/                 #%%%%#((//((#%%%%(    */(//. .,*(%%%#((%%&#*,....,(##                                     
  #%%%%%%%%%%%%##            &%%%%##((((#%%%%%%.   *(/%%*#. ,*#(%#(/*,,,, .((((* .#%                                    
  .%%%%%%%%%%%%%%%%%#,     *&%%######(((##%%%%%/    ,/#(*. .*((((/,,,,((((((/&#(,*%                                     
   %%%%%%%%%%%%%%%%%%%%%%(#%###(((/**,,,,,*,,,,*/(##%*,,***%#(#/**(%%&%%%##.**,,(#&                                     
   ##################%%%&&&%##((//*,,......,,,,,,,,**,,,,,*//#/(%&&&&&&%%##%%%%%%###.                                   
   /####################%&&&%#(//******,,***,*****//((((#%%%&&%###((((((((((#%##((/////*                                
   ,####################%&&&%#((///******/////(((###%%%%&%#(/*****/***,,,.,,,,,%&&&%%%#((((.                            
    ##########%%%%%%%%%%%&&%%%(((((((((((###%%%%%%%%&%#((///*******,,,,,,,,,,,,,,,(&&&&%####                            
    ,#######%%%%%%%%%%%&&%#((&#########%%%%%%%%%&&%##(////*******,,,,,,,,,,,,,,,,,,/(%&&&&%                             
       ,#####%%%%%##########%%%##%#%%%%%%%%%%%%%%#((((/((/*******,,,,,,,,,,,,********(#&&&&                             
           ###%%%%%######%%%%%&%%%%%%%%%&%%#((//////(///////******,,,,,***************(#&&/                      *.     
              ##%%%%%%%%%%%%%%%&&%%%%%&%(/##(((//////**/***********************/*******/(#%                     ,,,     
                 #%%%%%%%%%%%%%&&&&&%((#**/*,*/(/**,,.*******///**************////******//#%%%(                ,...     
                    (%%%&%#..  *&%##(*/(@%&@&***,,.  ,*************///****************/////##((#%#           ..   .     
                               #%(//(%@&****,,..    ,******#(/****(***********************//((((%. #/(/,    *.     .    
                               #///(@&/**,,,..     .**,,,,,,.(,,,#/,,,,,,,,,,,,,,,,,,,,,,,,,**#/(*,,,,,,,,,,       .    
                              /(//%@%,,,,,..      ,*,.    .  #,,,*.,,,,,,,,,,,,,,,,,,,,,,,,,**. *                   .   
                              %/(&@*,,,,,...  ...,///*,,.    %&@* ,@@&%#/*,,,,,/&. ,,,*.%@@@@@..*                  ..,  
                             ,%(@@/**,,,......,,,,***,,..*   #@(  *&@@@@@@@@%../#..,(((*(.@@@@.,,.....        .....,,,  
                             %#%@/,,,,,,,,,,,,,,,,,,.../&/  .%#/*****,,,,,,,,,,,,***//////////(((/..........,,,         
                             %(@(**,,***,,,,,,,,......&@@/(*,,,*********////(((((#(((#(#########((*..,,,                
                            #%(@@&&#(/,,...,,,......&%/,..,,**//(((((((((####(((##########%##%%##%%&                    
                            &%((%&@@@@@@@@@@@@@&&&%/*,,***////((##((#########(((((((#((((##%%%%%%#.                     
                            &%#(((((#%&&@&&&&&%%#/***/*/////((((((((((((((//*********///(######%#(%%                    
                             #%#((((/(//((((((/**,,**/////(((((((((///////***,,,,,,******/(((#####%                     
                                #((((//////*********////((///////////********,,***********/((####%%                     
                                  (#####(((/***///////////////////***************/////(////(((##%%.                     
                                    .#%##**///(/////////////**//***********//////((((#((((((((###%                      
                                       /#%##(((/////////////*////////////////(((((####((((((#####/                      
                                          #((((///////*////////////////(((((((((######((#####%&%/                       
                                             #((((/////*/////////////((((((((######((#####%&%/                       

agd_job_system's People

Contributors

incredibleleitman avatar buddy99 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.