Skip to content

Instantly share code, notes, and snippets.

@sschaetz
Created February 21, 2020 15:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sschaetz/8601a4a3245ea811eda1a6d4eb35db92 to your computer and use it in GitHub Desktop.
Save sschaetz/8601a4a3245ea811eda1a6d4eb35db92 to your computer and use it in GitHub Desktop.
#if defined AURA_BASE_OPENCL
#define AURA_KERNEL __kernel
#define AURA_DEVMEM __global
inline float alang_fast_cos(float x)
{
return native_cos(x);
}
#elif defined AURA_BASE_METAL
#include <metal_stdlib>
#include <metal_compute>
#include <metal_math>
using namespace metal;
#define AURA_KERNEL kernel
#define AURA_DEVMEM device
inline float alang_fast_cos(float x)
{
return fast::cos(x);
}
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment