All New

user:thomas gists created by user

title:mygist gists with given title

filename:myfile.txt gists having files with given name

extension:yml gists having files with given extension

language:go gists having files with given language

topic:homelab gists with given topic

Login


All New Login

All gists

Recently created
Least recently created
Recently updated
Least recently updated
mga's Avatar

mga / threadPool.h

0 likes
0 forks
2 files
Last active 1 year ago
1
2 #include "threadPool.h"
3
4 ThreadPool::ThreadPool()
5 : m_busyThreads{ 0 }
6 , m_threads{std::vector<std::thread>(std::thread::hardware_concurrency())}
7 , m_stopRequested{ false }
8 {
9 for (size_t i = 0; i < std::thread::hardware_concurrency(); ++i)
10 {
mga's Avatar

mga / speed.c

0 likes
0 forks
1 files
Last active 1 year ago
1 #include <gmp.h>
2 #include <stdio.h>
3 #include <stdlib.h>
4 #include <time.h>
5
6 int main(int argc, char *argv[]) {
7 // Get the limit from the first argument
8 if (argc != 2) {
9 printf("Wrong input.\n");
10 printf("Usage: howfast <limit>\n");
mga's Avatar

mga / mocha.cpp

0 likes
0 forks
1 files
Last active 1 year ago
1 void StyleCatppuccinMocha(ImGuiStyle* dst = NULL)
2 {
3 auto HexToImVec4 = [](const std::string& hex) {
4 unsigned rgba;
5 std::stringstream ss;
6 ss << std::hex << hex.substr(1);
7 ss >> rgba;
8 ImVec4 res = {
9 (float)((rgba >> 24) & 0xFF) / 255.0f,
10 (float)((rgba >> 16) & 0xFF) / 255.0f,
Newer Older

Powered by Opengist ⋅ Load: 163ms⋅

English
Čeština Deutsch English Español Français Magyar Italiano 日本語 Polski Português Русский Türkçe Українська 中文 繁體中文