Point Cloud Library (PCL)  1.14.1
cutil_inline_bankchecker.h
1 /*
2  * Copyright 1993-2010 NVIDIA Corporation. All rights reserved.
3  *
4  * Please refer to the NVIDIA end user license agreement (EULA) associated
5  * with this source code for terms and conditions that govern your use of
6  * this software. Any use, reproduction, disclosure, or distribution of
7  * this software and related documentation outside the terms of the EULA
8  * is strictly prohibited.
9  *
10  */
11 
12 #pragma once
13 
14 #ifdef _DEBUG
15  #if __DEVICE_EMULATION__
16  #define cutilBankChecker(array, idx) (__cutilBankChecker (threadIdx.x, threadIdx.y, threadIdx.z, \
17  blockDim.x, blockDim.y, blockDim.z, \
18  #array, idx, __FILE__, __LINE__), \
19  array[idx])
20 
21  #else
22  #define cutilBankChecker(array, idx) array[idx]
23  #endif
24 #else
25  #define cutilBankChecker(array, idx) array[idx]
26 #endif
27 
28  // Interface for bank conflict checker
29 inline void __cutilBankChecker(unsigned int tidx, unsigned int tidy, unsigned int tidz,
30  unsigned int bdimx, unsigned int bdimy, unsigned int bdimz,
31  char *aname, int index, char *file, int line)
32 {
33  cutCheckBankAccess( tidx, tidy, tidz, bdimx, bdimy, bdimz, file, line, aname, index);
34 }