From bcccdf7b1a674760a42384f6a540f5e84837dfb6 Mon Sep 17 00:00:00 2001 From: Daniel Nichols Date: Wed, 24 Jul 2019 23:02:07 -0400 Subject: [PATCH] fixed include formatting --- include/mdnn_device_types.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/include/mdnn_device_types.h b/include/mdnn_device_types.h index 6ab5928..777a327 100644 --- a/include/mdnn_device_types.h +++ b/include/mdnn_device_types.h @@ -8,12 +8,13 @@ */ #pragma once -/* Named mdnn_device_types.h so as not to interfere with cuda's device_types.h +/* Named mdnn_device_types.h so as not to interfere with cuda's device_types.h TODO -- refactor/rename this file */ #include #include + #include "types.h" namespace magmadnn { @@ -37,8 +38,10 @@ struct GetDeviceType {}; } combine(HOST, CPU); +#if defined(_HAS_CUDA_) combine(DEVICE, GPU); combine(MANAGED, COMBINED); +#endif #undef combine @@ -69,8 +72,10 @@ inline DeviceType getDeviceType(memory_t mem_type) { switch (mem_type) { CASE(HOST) +#if defined(_HAS_CUDA_) CASE(DEVICE) CASE(MANAGED) +#endif default: return CPU; }