From 021e5f3774da7bd50441ab81968cb815c5eb2ce4 Mon Sep 17 00:00:00 2001 From: jpekkila Date: Thu, 12 Sep 2019 15:48:38 +0300 Subject: [PATCH] Renamed NUM_STREAM_TYPES -> NUM_STREAMS --- include/astaroth_defines.h | 4 ++-- src/core/device.cu | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/astaroth_defines.h b/include/astaroth_defines.h index 1c7ba1e..ad5d39b 100644 --- a/include/astaroth_defines.h +++ b/include/astaroth_defines.h @@ -127,9 +127,9 @@ typedef enum { STREAM_14, STREAM_15, STREAM_16, - NUM_STREAM_TYPES + NUM_STREAMS } Stream; -#define STREAM_ALL (NUM_STREAM_TYPES) +#define STREAM_ALL (NUM_STREAMS) #define AC_GEN_ID(X) X typedef enum { diff --git a/src/core/device.cu b/src/core/device.cu index b5d3ebb..9ab7df4 100644 --- a/src/core/device.cu +++ b/src/core/device.cu @@ -46,7 +46,7 @@ struct device_s { AcMeshInfo local_config; // Concurrency - cudaStream_t streams[NUM_STREAM_TYPES]; + cudaStream_t streams[NUM_STREAMS]; // Memory VertexBufferArray vba; @@ -163,7 +163,7 @@ acDeviceCreate(const int id, const AcMeshInfo device_config, Device* device_hand printf("Success!\n"); // Concurrency - for (int i = 0; i < NUM_STREAM_TYPES; ++i) { + for (int i = 0; i < NUM_STREAMS; ++i) { cudaStreamCreateWithPriority(&device->streams[i], cudaStreamNonBlocking, 0); } @@ -228,7 +228,7 @@ acDeviceDestroy(Device device) #endif // Concurrency - for (int i = 0; i < NUM_STREAM_TYPES; ++i) { + for (int i = 0; i < NUM_STREAMS; ++i) { cudaStreamDestroy(device->streams[i]); }