Skip to content

Instantly share code, notes, and snippets.

View kusma's full-sized avatar

Erik Faye-Lund kusma

View GitHub Profile
@Nokius
Nokius / ac100-kernel.md
Last active June 29, 2023 18:40
ARCH LINUX WITH MAINLINE KERNEL FOR TOSHIBA AC100 [paz00 / dynabookaz]

ARCH LINUX WITH MAINLINE KERNEL FOR TOSHIBA AC100

all u need

  • 1-2 hours of your life
  • build envirment for the Kernel
  • device with Ubuntu and nvflash
  • AC100
  • mini-usb cabel
  • usb-stick >512MB
@paniq
paniq / minmaxabssign.txt
Last active June 24, 2024 17:57
useful min/max/abs/sign identities
max(-x,-y) = -min(x,y)
min(-x,-y) = -max(x,y)
abs(x) = abs(-x)
abs(x) = max(x,-x) = -min(x,-x)
abs(x*a) = if (a >= 0) abs(x)*a
(a < 0) -abs(x)*a
// basically any commutative operation
min(x,y) + max(x,y) = x + y
@chrisbanes
chrisbanes / SystemUiHelper.java
Last active March 2, 2024 18:57
SystemUiHelper
/*
* Copyright (C) 2014 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@rikusalminen
rikusalminen / dot.c
Created July 3, 2012 14:55
SIMD dot products: ARM NEON, SSE3, SSE
#if defined(__ARM_NEON__)
vec4 dot(vec4 a, vec4 b)
{
vec4 prod = vmulq_f32(a, b);
vec4 sum1 = vaddq_f32(prod, vrev64q_f32(prod));
vec4 sum2 = vaddq_f32(sum1, vcombine_f32(vget_high_f32(sum1), vget_low_f32(sum1)));
return sum2;
}
#else if defined(__SSE3__)
static inline vec4 vdot(vec4 x, vec4 y)