Skip to content

Instantly share code, notes, and snippets.

View Naios's full-sized avatar

Denis Blank Naios

  • Germany
View GitHub Profile
@Naios
Naios / Span.hpp
Created January 20, 2022 15:38
A simple span polyfill
template <typename T>
class Span {
public:
using size_type = std::size_t;
using value_type = std::remove_const_t<T>;
using pointer = std::add_pointer_t<T>;
using const_pointer = std::add_pointer_t<std::add_const_t<T>>;
using reference = std::add_lvalue_reference_t<T>;
using const_reference = std::add_lvalue_reference_t<std::add_const_t<T>>;
@Naios
Naios / testit.md
Created December 17, 2020 13:09
testit

test

@Naios
Naios / continuable.hpp
Created April 7, 2020 20:14
Continuable 4.0.0 Amalgamation
/// This is an automatic generated amalgamation of:
/// continuable version 4.0.0 (735697026b72a8f415d3443834cceeda9623780d)
/*
/~` _ _ _|_. _ _ |_ | _
\_,(_)| | | || ||_|(_||_)|(/_
https://github.com/Naios/continuable
v4.0.0
@Naios
Naios / continuable.hpp
Created March 12, 2018 15:06
Continuable 3.0.0 Amalgamation
/// This is an automatic generated amalgamation of:
/// continuable version 3.0.0 (d30814c2ff001)
/*
/~` _ _ _|_. _ _ |_ | _
\_,(_)| | | || ||_|(_||_)|(/_
https://github.com/Naios/continuable
v3.0.0
diff --git a/cmake/macros/FindPCHSupport.cmake b/cmake/macros/FindPCHSupport.cmake
index abe7f40d17..bb6affbc36 100644
--- a/cmake/macros/FindPCHSupport.cmake
+++ b/cmake/macros/FindPCHSupport.cmake
@@ -1,3 +1,4 @@
+set(COTIRE_PCH_MEMORY_SCALING_FACTOR 500)
include(cotire)
function(ADD_CXX_PCH TARGET_NAME_LIST PCH_HEADER)
@Naios
Naios / extract_all.diff
Created May 8, 2017 22:57
HPX documentation with EXTRACT_ALL
This file has been truncated, but you can view the full file.
diff --git a/hpx.html b/hpx.html
index 8290a7a..a13dfdc 100644
--- a/hpx.html
+++ b/hpx.html
@@ -65,7 +65,7 @@
Performance Counter Data using a Simple Function</a></span></dt><dt><span class="section"><a href="#hpx.manual.performance_counters.providing.full_counters">Implementing
a Full Performance Counter</a></span></dt></dl></dd><dt><span class="section"><a href="#hpx.manual.performance_counters.counters">Existing
<span class="emphasis"><em>HPX</em></span> Performance Counters</a></span></dt></dl></dd><dt><span class="section"><a href="#hpx.manual.schedulers"><span class="emphasis"><em>HPX</em></span> Thread
- Scheduling Policies</a></span></dt></dl></dd><dt><span class="section"><a href="#id761419">Index</a></span></dt><dt><span class="section"><a href="#id778529">Reference</a></span></dt><dd><dl><dt><span class="section"><a href="#header.hpx.components.component_storage.migrate_from_storage_hpp">Header &lt;hpx/components/component_storage/migrate_from_storage.hpp&gt;</a
@Naios
Naios / error_code.cpp
Created April 21, 2017 15:39
Custom error category
class process_error_category : public std::error_category {
public:
using error_category::error_category;
const char* name() const noexcept override {
return "";
}
std::string message(int _Errval) const override {
return "";
@Naios
Naios / antlr4leak.log
Created January 9, 2017 00:02
Antlr4 memory leak
==5093== Memcheck, a memory error detector
==5093== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==5093== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==5093== Command: ./src/compiler
==5093==
==5093==
==5093== HEAP SUMMARY:
==5093== in use at exit: 87,136 bytes in 69 blocks
==5093== total heap usage: 32,825 allocs, 32,756 frees, 2,682,473 bytes allocated
==5093==
$ bloaty -n 200 -d symbols worldserver
VM SIZE FILE SIZE
-------------- --------------
55.6% 37.5Mi [Unmapped] 532Mi 94.8%
39.1% 26.3Mi [Other] 26.2Mi 4.7%
0.4% 256Ki opcodeTable 0 0.0%
0.2% 135Ki World::LoadConfigSettings 135Ki 0.0%
0.2% 132Ki World::SetInitialWorldSettings 132Ki 0.0%
0.1% 101Ki SmartScript::ProcessAction 101Ki 0.0%
0.1% 80.0Ki ObjectMgr::LoadQuests
00007ffb3e9da079() Unknown
000000eaf40e2970() Unknown
cccccccccccccccc() Unknown
cccccccccccccccc() Unknown
cccccccccccccccc() Unknown
000000ea90dcee10() Unknown
00007ffb3e9db90c() Unknown
000000eaf40e2970() Unknown
cccccccccccccccc() Unknown
cccccccccccccccc() Unknown