BlueBear icon

Benchmark CPU/GPU

BlueBear | PRO | 02/17/12 07:15:01 AM UTC | 0 ⭐ | 449 👁️ | Never ⏰ | []
C++ |

890 B

|

None

|

0 👍

/

0 👎

/*
Korosi Zalannak
Program pre zmeranie rychlosti CPU v MHZ, GPU v MHZ a VRAM v MB.
program vyuziva algorytmus ktory meria to ze za sekundu kolko cyklov sa vykona v CPU
                    
                       pocet cyklov pri skonceni podprogramu - pocet cyklov pri zacati podprogramu
cize rychlost CPU = --------------------------------------------------------------------------------
                                                        1 000 000
 
 
 
 
do programu este treba doplnit ostatne srandy pre GPU inac je to funkcny program, zatial beta
Lesliesoft Team 2012
*/  
#include <windows.h>
#include <stdio.h>
_declspec(naked) ULONGLONG GetCycleCount()
{
_asm rdtsc;
_asm ret;
}
 
DWORD GetCPUSpeed()
{
ULONGLONG ullStart, ullStop;
ullStart = GetCycleCount();
Sleep(1000);
ullStop = GetCycleCount();
return (DWORD)((ullStop - ullStart) / 1000000);
}
 
int main()
{
printf("Processor Speed: %.2f MHz\n", ((float)GetCPUSpeed()));
return 0;
}

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎

    
        
  • Syutrsz icon
    03/31/26 11:02:03 PM UTC
    text |

    0 B

    |

    0 👍

    /

    0 👎

    Best t33n active cpx link daily updates!
     Copy and paste the link in a new browser tab and then hit enter!
     https://crazyporn.@xxx/members/157354/?asgtbndr=1&play=true&spon=adworld&zone=400
     Remove the @ 
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎