Vendor things
This commit is contained in:
parent
5deceec006
commit
977e3c17e5
19434 changed files with 10682014 additions and 0 deletions
10
third-party/vendor/metal/examples/compute/shaders.metal
vendored
Normal file
10
third-party/vendor/metal/examples/compute/shaders.metal
vendored
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
#include <metal_stdlib>
|
||||
|
||||
using namespace metal;
|
||||
|
||||
kernel void sum(device uint *data [[ buffer(0) ]],
|
||||
volatile device atomic_uint *sum [[ buffer(1) ]],
|
||||
uint gid [[ thread_position_in_grid ]])
|
||||
{
|
||||
atomic_fetch_add_explicit(sum, data[gid], memory_order_relaxed);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue