Skip to content

Commit

Permalink
Add launch_bounds attr to kernel
Browse files Browse the repository at this point in the history
  • Loading branch information
kchristin22 committed Nov 17, 2024
1 parent 7ab2649 commit cd4f0dd
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions demos/CUDA/BlackScholes/BlackScholes_kernel.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,13 @@ __device__ inline void BlackScholesBodyGPU(float& CallResult, float& PutResult,
////////////////////////////////////////////////////////////////////////////////
// Process an array of optN options on GPU
////////////////////////////////////////////////////////////////////////////////
__global__ void BlackScholesGPU(float2* __restrict d_CallResult,
float2* __restrict d_PutResult,
float2* __restrict d_StockPrice,
float2* __restrict d_OptionStrike,
float2* __restrict d_OptionYears,
float Riskfree, float Volatility, int optN) {
__launch_bounds__(128) __global__
void BlackScholesGPU(float2* __restrict d_CallResult,
float2* __restrict d_PutResult,
float2* __restrict d_StockPrice,
float2* __restrict d_OptionStrike,
float2* __restrict d_OptionYears, float Riskfree,
float Volatility, int optN) {
////Thread index
// const int tid = blockDim.x * blockIdx.x + threadIdx.x;
////Total number of threads in execution grid
Expand Down

0 comments on commit cd4f0dd

Please sign in to comment.