Skip to content

Instantly share code, notes, and snippets.

@PeterTh
PeterTh / cpufreq.sh
Last active January 27, 2022 13:50
Setting a completely fixed CPU frequency - for consistent SW benchmarking
# This is tested on Ubuntu 20.04 on an AMD Epyc system
# query hardware limits / capabilities with
cpupower frequency-info
# disable boost
echo "0" | sudo tee /sys/devices/system/cpu/cpufreq/boost
# disable idle states
sudo cpupower -c all idle-set -d 2
sudo cpupower -c all idle-set -d 1
@PeterTh
PeterTh / cplusplus.md
Last active July 6, 2017 12:34
Why teaching modern C++ at UIBK in the Bachelor level is a good idea

Why teaching modern C++ at UIBK in the Bachelor level is a good idea

Popularity

  • C++ is ranked among the top 5 in the vast majority of important programming language popularity / interest metrics, including:

  • Crucially for science, it is ranked #1 in the 2016 IEEE Spectrum programming language rankings for open source projects

@PeterTh
PeterTh / bloomfix.cpp
Last active December 29, 2017 07:18
Nier Automata Bloom Fix
// Overview:
// The bloom pyramid in Nier:A is built up of 5 buffers, which are sized
// 800x450, 400x225, 200x112, 100x56 and 50x28, regardless of resolution
// the mismatch between the largest buffer size and the screen resolution (in e.g. 2560x1440 or even 1920x1080)
// leads to some really ugly artifacts.
//
// To change this, we need to
// 1) Replace the rendertarget textures in question at their creation point
// 2) Adjust the viewport and some constant shader parameter each time they are rendered to
//