diff options
| author | Sheikh Dawood Abdul Ajees <[email protected]> | 2018-01-05 10:51:37 -0600 |
|---|---|---|
| committer | Sheikh Dawood Abdul Ajees <[email protected]> | 2018-01-05 10:51:37 -0600 |
| commit | 983c93ad16707bd2b092f425725140f145e967aa (patch) | |
| tree | c5533c94dbffd31a1d179614354ea07dd769062a /APEX_1.4/common/include/ApexCudaWrapper.h | |
| parent | Merge branch 'master' (diff) | |
| download | physx-3.4-983c93ad16707bd2b092f425725140f145e967aa.tar.xz physx-3.4-983c93ad16707bd2b092f425725140f145e967aa.zip | |
PhysX 3.4.1, APEX 1.4.1 Release @23307153
Diffstat (limited to 'APEX_1.4/common/include/ApexCudaWrapper.h')
| -rw-r--r-- | APEX_1.4/common/include/ApexCudaWrapper.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/APEX_1.4/common/include/ApexCudaWrapper.h b/APEX_1.4/common/include/ApexCudaWrapper.h index 5db1fa76..3d1105ba 100644 --- a/APEX_1.4/common/include/ApexCudaWrapper.h +++ b/APEX_1.4/common/include/ApexCudaWrapper.h @@ -56,25 +56,29 @@ struct ApexKernelConfig uint32_t fixedSharedMemDWords; uint32_t sharedMemDWordsPerWarp; DimBlock blockDim; - uint32_t minWarpsPerBlock; uint32_t maxGridSize; + uint32_t maxGridSizeMul; + uint32_t maxGridSizeDiv; - ApexKernelConfig() { fixedSharedMemDWords = sharedMemDWordsPerWarp = 0; blockDim = DimBlock(0, 0, 0); minWarpsPerBlock = 1; maxGridSize = MAX_BOUND_BLOCKS; } - ApexKernelConfig(uint32_t fixedSharedMemDWords, uint32_t sharedMemDWordsPerWarp, int fixedWarpsPerBlock = 0, uint32_t minWarpsPerBlock = 1, uint32_t maxGridSize = MAX_BOUND_BLOCKS) + ApexKernelConfig() { fixedSharedMemDWords = sharedMemDWordsPerWarp = 0; blockDim = DimBlock(0, 0, 0); maxGridSize = maxGridSizeMul = 0; maxGridSizeDiv = 1; } + ApexKernelConfig(uint32_t fixedSharedMemDWords, uint32_t sharedMemDWordsPerWarp, int fixedWarpsPerBlock = 0, uint32_t maxGridSize = 0, uint32_t maxGridSizeMul = 0, uint32_t maxGridSizeDiv = 1) { this->fixedSharedMemDWords = fixedSharedMemDWords; this->sharedMemDWordsPerWarp = sharedMemDWordsPerWarp; this->blockDim = DimBlock(fixedWarpsPerBlock * WARP_SIZE); - this->minWarpsPerBlock = minWarpsPerBlock; this->maxGridSize = maxGridSize; + this->maxGridSizeMul = maxGridSizeMul; + this->maxGridSizeDiv = maxGridSizeDiv; + //final maxGridSize = min(SMcount, maxGridSize [if (maxGridSize != 0)], maxBlockSize * maxGridSizeMul / maxGridSizeDiv [if (maxGridSizeMul != 0)]) } ApexKernelConfig(uint32_t fixedSharedMemDWords, uint32_t sharedMemDWordsPerWarp, const DimBlock& blockDim) { this->fixedSharedMemDWords = fixedSharedMemDWords; this->sharedMemDWordsPerWarp = sharedMemDWordsPerWarp; this->blockDim = blockDim; - this->minWarpsPerBlock = 1; - this->maxGridSize = MAX_BOUND_BLOCKS; + this->maxGridSize = 0; + this->maxGridSizeMul = 0; + this->maxGridSizeDiv = 1; } }; |