Skip to content

Instantly share code, notes, and snippets.

@zacharycarter
Created August 1, 2020 02:50
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 zacharycarter/adfb3940a3b8357655671ffe9626bbbb to your computer and use it in GitHub Desktop.
Save zacharycarter/adfb3940a3b8357655671ffe9626bbbb to your computer and use it in GitHub Desktop.
import os,
nimterop/cimport
static:
cDebug()
cPlugin:
import strutils
proc onSymbol(sym: var Symbol) {.exportc, dynlib.} =
sym.name = sym.name.strip(chars = {'_'})
{.passC: "-DVK_USE_PLATFORM_MACOS_MVK".}
{.passC: "-DVOLK_IMPLEMENTATION".}
cIncludeDir(currentSourcePath.parentDir()/"volk")
cCompile(currentSourcePath.parentDir()/"volk/volk.c")
cImport(currentSourcePath.parentDir()/"volk/volk.h")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment