Instantly share code, notes, and snippets.
kieber-emmons
/ ParallelRadixSort.metal
Last active
February 6, 2024 10:24
This gist is for an article I wrote on Medium (https://medium.com/p/4f4590cfd5d3).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ParallelRadixSort.metal | |
// | |
// Created by Matthew Kieber-Emmons on 08/29/22. | |
// Copyright © 2022 Matthew Kieber-Emmons. All rights reserved. | |
// This work is for educational purposes only and cannot be used without consent. | |
// | |
#include <metal_stdlib> | |
using namespace metal; |
kieber-emmons
/ ParallelScan.metal
Last active
September 16, 2022 01:42
This gist accompanies a Medium story I wrote about optimizing Parallel Prefix Sum in Metal and comparison to optimized CPU code on Apple M1 (https://kieber-emmons.medium.com/efficient-parallel-prefix-sum-in-metal-for-apple-m1-9e60b974d62).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ParallelScan.metal | |
// | |
// Copyright © 2021 Matthew Kieber-Emmons. All rights reserved. | |
// For educational purposes only. | |
// | |
#include <metal_stdlib> | |
using namespace metal; |
kieber-emmons
/ ParallelReduce.metal
Last active
September 15, 2022 23:16
This gist is associated with a Medium Story (https://kieber-emmons.medium.com/optimizing-parallel-reduction-in-metal-for-apple-m1-8e8677b49b01).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ParallelReduce.metal | |
// | |
// Created by Matthew Kieber-Emmons on 03/11/2021. | |
// Copyright © 2021 Matthew Kieber-Emmons. All rights reserved. | |
// This work is for educational purposes only and cannot be used without consent. | |
// | |
#include <metal_stdlib> | |
using namespace metal; |