From 03b74ea32fbfd53ae1d55d825f768e96041d48d0 Mon Sep 17 00:00:00 2001 From: Martin Schoenherr <m.schoenherr@tu-braunschweig.de> Date: Mon, 4 Dec 2023 21:32:31 +0100 Subject: [PATCH] delete Random.cu --- src/gpu/core/GPU/GPU_Interface.h | 11 ------ src/gpu/core/GPU/Random.cu | 59 -------------------------------- 2 files changed, 70 deletions(-) delete mode 100644 src/gpu/core/GPU/Random.cu diff --git a/src/gpu/core/GPU/GPU_Interface.h b/src/gpu/core/GPU/GPU_Interface.h index ba70027c4..4e6b6fc3e 100644 --- a/src/gpu/core/GPU/GPU_Interface.h +++ b/src/gpu/core/GPU/GPU_Interface.h @@ -35,17 +35,6 @@ #include <cuda.h> #include <cuda_runtime.h> -#include <curand.h> - -#ifdef __clang__ -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments" -#pragma clang diagnostic ignored "-Wunused-but-set-parameter" -#endif -#include <curand_kernel.h> -#ifdef __clang__ -#pragma clang diagnostic pop -#endif struct LBMSimulationParameter; class Parameter; diff --git a/src/gpu/core/GPU/Random.cu b/src/gpu/core/GPU/Random.cu deleted file mode 100644 index 603cd14c4..000000000 --- a/src/gpu/core/GPU/Random.cu +++ /dev/null @@ -1,59 +0,0 @@ -/* Device code */ -#include "LBM/LB.h" -#include "lbm/constants/D3Q27.h" -#include <basics/constants/NumericConstants.h> - -using namespace vf::basics::constant; -using namespace vf::lbm::dir; - -//random numbers -#include <curand.h> -#include <curand_kernel.h> - - -////////////////////////////////////////////////////////////////////////////// -__global__ void initRandom(curandState* state) -{ - //////////////////////////////////////////////////////////////////////////////// - const unsigned x = threadIdx.x; // Globaler x-Index - const unsigned y = blockIdx.x; // Globaler y-Index - const unsigned z = blockIdx.y; // Globaler z-Index - - const unsigned nx = blockDim.x; - const unsigned ny = gridDim.x; - - const unsigned k = nx*(ny*z + y) + x; - ////////////////////////////////////////////////////////////////////////// - - curand_init(k, k, 0, &state[k]); - - ////////////////////////////////////////////////////////////////////////// -} -////////////////////////////////////////////////////////////////////////////// - - - - - -////////////////////////////////////////////////////////////////////////////// -__global__ void generateRandomValues(curandState* state, real* randArray) -{ - //////////////////////////////////////////////////////////////////////////////// - const unsigned x = threadIdx.x; // Globaler x-Index - const unsigned y = blockIdx.x; // Globaler y-Index - const unsigned z = blockIdx.y; // Globaler z-Index - - const unsigned nx = blockDim.x; - const unsigned ny = gridDim.x; - - const unsigned k = nx*(ny*z + y) + x; - ////////////////////////////////////////////////////////////////////////// - - randArray[k] = (real)curand_uniform(&state[k]); - - ////////////////////////////////////////////////////////////////////////// -} -////////////////////////////////////////////////////////////////////////////// - - - -- GitLab