Skip to content

Instantly share code, notes, and snippets.

@icosahedron
icosahedron / Shaders.metal
Last active July 21, 2022 13:12
Metal Compute Shader from Command Line
//-*- mode: c++ -*-
// build:
// See run.sh
#include <metal_stdlib>
kernel void square(const device float* input [[buffer(0)]],
device float* output [[buffer(1)]],
metal::uint id [[thread_position_in_grid]]) {
output[id] = input[id] * input[id];
}

Keybase proof

I hereby claim:

  • I am icosahedron on github.
  • I am icosahedron (https://keybase.io/icosahedron) on keybase.
  • I have a public key whose fingerprint is 12B1 8EE4 C935 EEDC B2E7 4E98 540B F860 0C09 4E3C

To claim this, I am signing this object: