From 7c8163fcab2cad8591c3bc3e20cb3cd4e224b807 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Wed, 19 Oct 2022 01:32:44 +0000 Subject: [PATCH] ircd::simt: Alias asm to OpenCL __asm__. --- include/ircd/simt/portable.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/ircd/simt/portable.h b/include/ircd/simt/portable.h index 817c60133..a781d3c77 100644 --- a/include/ircd/simt/portable.h +++ b/include/ircd/simt/portable.h @@ -43,6 +43,16 @@ #define __constant static #endif +// +// OpenCL wants __asm__ but also allow asm +// + +#if defined(__OPENCL_VERSION__) + #if !defined(asm) + #define asm __asm__ + #endif +#endif + // // Silently drop calls to printf() on unsupporting platforms; this way we can // leave the same code unmodified and quietly discard the output.