From d9c5d447e4e19c1ddd073a071eb14711487aab51 Mon Sep 17 00:00:00 2001 From: Olivier Giroux Date: Fri, 29 Jan 2021 14:49:30 -0800 Subject: [PATCH 1/2] Fixed rename errors --- benchmarks/concurrency.cpp | 4 ++-- benchmarks/concurrency.cu | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/benchmarks/concurrency.cpp b/benchmarks/concurrency.cpp index 9374a99d0f..e8121a8c9b 100755 --- a/benchmarks/concurrency.cpp +++ b/benchmarks/concurrency.cpp @@ -172,10 +172,10 @@ struct ticket_mutex { }; struct sem_mutex { - void lock() noexcept { + __host__ __device__ void lock() noexcept { c.acquire(); } - void unlock() noexcept { + __host__ __device__ void unlock() noexcept { c.release(); } sem_mutex() : c(1) { } diff --git a/benchmarks/concurrency.cu b/benchmarks/concurrency.cu index 1b82814fa8..e3b7bf5832 100644 --- a/benchmarks/concurrency.cu +++ b/benchmarks/concurrency.cu @@ -1 +1 @@ -#include "benchmark.cpp" +#include "concurrency.cpp" From d03260b507ace1992e21d819b9efd6626389f87e Mon Sep 17 00:00:00 2001 From: Michael Schellenberger Costa Date: Tue, 21 Feb 2023 10:00:23 +0100 Subject: [PATCH 2/2] Use `_ABI` rather than hard coding `__host__ __device__` --- benchmarks/concurrency.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/benchmarks/concurrency.cpp b/benchmarks/concurrency.cpp index e8121a8c9b..55d03ce15f 100755 --- a/benchmarks/concurrency.cpp +++ b/benchmarks/concurrency.cpp @@ -172,10 +172,10 @@ struct ticket_mutex { }; struct sem_mutex { - __host__ __device__ void lock() noexcept { + _ABI void lock() noexcept { c.acquire(); } - __host__ __device__ void unlock() noexcept { + _ABI void unlock() noexcept { c.release(); } sem_mutex() : c(1) { }