Skip to content

Instantly share code, notes, and snippets.

@Themaister
Themaister / Setup.md
Last active January 10, 2019 20:32
Android Gradle basic setup for Vulkan

settings.gradle

include ':android' // Will pull in android/ folder as a subproject. I think you need this file even if you only have one project.

build.gradle

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
@johnbartholomew
johnbartholomew / gist:6811245
Last active December 24, 2015 14:19
Creating statically linkable C "packages"
#define PACKAGE_PRIVATE __attribute__((__visibility__("hidden")))
#define PACKAGE_PUBLIC __attribute__((__visibility__("default")))
/* -------- a.c -------- */
static int the_thing = 42;
PACKAGE_PRIVATE int compute_thing(void) {
return the_thing;
}
@rygorous
rygorous / gist:4172889
Created November 30, 2012 00:28
SSE/AVX matrix multiply
#include <immintrin.h>
#include <intrin.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
union Mat44 {
float m[4][4];
__m128 row[4];
};