Skip to content

Instantly share code, notes, and snippets.

View DiamondLovesYou's full-sized avatar

Richard Diamond DiamondLovesYou

View GitHub Profile
@zingaburga
zingaburga / sve2.md
Last active June 4, 2024 08:54
ARM’s Scalable Vector Extensions: A Critical Look at SVE2 For Integer Workloads

ARM’s Scalable Vector Extensions: A Critical Look at SVE2 For Integer Workloads

Scalable Vector Extensions (SVE) is ARM’s latest SIMD extension to their instruction set, which was announced back in 2016. A follow-up SVE2 extension was announced in 2019, designed to incorporate all functionality from ARM’s current primary SIMD extension, NEON (aka ASIMD).

Despite being announced 5 years ago, there is currently no generally available CPU which supports any form of SVE (which excludes the [Fugaku supercomputer](https://www.fujitsu.com/global/about/innovation/

@yohhoy
yohhoy / av1-codec.md
Last active August 14, 2019 09:50
AV1 video codec memorandum

AV1 coding scheme

  • Arithmetic coding
    • multi-symbols (up to 16 values)
    • Coefficients coding: lv_map
    • CDF: Cumulative distribution function
      • CDF update (at the end of frame)
      • CDF update (adaptive per symbol)
  • Image blocking
@chisui
chisui / agnoster-nix.zsh-theme
Last active May 24, 2024 19:20
zsh agonoster theme with nix-shell
# vim:ft=zsh ts=2 sw=2 sts=2
#
# agnoster's Theme - https://gist.github.com/3712874
# A Powerline-inspired theme for ZSH
#
# # README
#
# In order for this theme to render correctly, you will need a
# [Powerline-patched font](https://github.com/Lokaltog/powerline-fonts).
# Make sure you have a recent version: the code points that Powerline
@spheenik
spheenik / 2.12.0.patch
Last active February 16, 2023 21:01
QEMU sound improvement
diff --git audio/audio.c audio/audio.c
index 6eccdb17ee..4eb190a18f 100644
--- audio/audio.c
+++ audio/audio.c
@@ -2097,3 +2097,8 @@ void AUD_set_volume_in (SWVoiceIn *sw, int mute, uint8_t lvol, uint8_t rvol)
}
}
}
+
+int64_t audio_get_timer_ticks(void)
@CMCDragonkai
CMCDragonkai / memory_layout.md
Last active July 11, 2024 23:29
Linux: Understanding the Memory Layout of Linux Executables

Understanding the Memory Layout of Linux Executables

Required tools for playing around with memory:

  • hexdump
  • objdump
  • readelf
  • xxd
  • gcore
@ArseniyShestakov
ArseniyShestakov / gpu-hotplug.md
Last active May 3, 2024 05:54
Current QEMU dual-VM configuration. Thanks to everyone who helped me!

Check it's working

DRI_PRIME=1 glxinfo | grep OpenGL

Unbind AMD GPU from Radeon driver

echo "1002 6719" > /sys/bus/pci/drivers/vfio-pci/new_id echo "0000:01:00.0" > /sys/bus/pci/devices/0000:01:00.0/driver/unbind echo "0000:01:00.0" > /sys/bus/pci/drivers/vfio-pci/bind echo "1002 6719" > /sys/bus/pci/drivers/vfio-pci/remove_id echo "1002 aa80" > /sys/bus/pci/drivers/vfio-pci/new_id echo "0000:01:00.1" > /sys/bus/pci/devices/0000:01:00.1/driver/unbind

@ayosec
ayosec / 0 Results.md
Last active September 4, 2017 06:12
Rust performance for maps with uint keys

Benchmarks on different Map implementations for uint keys

Environment:

$ rustc --version
rustc 0.13.0-nightly (770378a31 2014-11-20 23:02:01 +0000)
$ uname -sm
Linux x86_64

No optimizations. No debug info

@aginor
aginor / AMD-fglrx-3.17-3.19.patch
Last active August 29, 2015 14:09
Patch AMD/ATI catalyst/fglrx 14.301.1001 / 14.9 or 14.501.1003 /14.12 driver to work with linux 3.17.x to 3.19.x kernels (tested on Fedora 20)
--- a/common/lib/modules/fglrx/build_mod/firegl_public.c 2014-11-29 09:02:10.000000000 +1300
+++ b/common/lib/modules/fglrx/build_mod/firegl_public.c 2015-04-18 22:31:06.673656387 +1200
@@ -4816,8 +4816,13 @@
{
unsigned long orig_level;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0)
orig_level = __get_cpu_var(kasExecutionLevel);
__get_cpu_var(kasExecutionLevel) = level;
+#else
@guillermo
guillermo / my_app.sh
Created January 15, 2014 08:27
This is a unix wrapper around the erlang vm.
#!/bin/bash
# This is a unix wrapper around the erlang vm. It provides the following functionality:
#
# * Spawns in foreground
# * Handle SIGHUP and call RELOADFUNC
# * Handle SIGTERM SIGQUIT and SIGINT telling to the vm to quit
# * Dies if the vm dies (for example kernel killing because out of memory)
#
# Forks and improvements are welcome.
@mikesmullin
mikesmullin / x86-assembly-notes.md
Last active July 18, 2024 01:57
Notes on x86-64 Assembly and Machine Code

Mike's x86-64 Assembly (ASM) Notes

Assembling Binary Machine Code

Operating Modes:

These determine the assumed/default size of instruction operands, and restricts which opcodes are available, and how they are used.

Modern operating systems, booted inside Real mode,