Removed max_cus() from Device, used device->gpu->cus() instead

This commit is contained in:
Trung Nguyen
2022-10-07 15:50:30 -05:00
parent 6b9e83fe20
commit 00f46120c7
5 changed files with 9 additions and 12 deletions

View File

@ -727,10 +727,10 @@ int BaseAmoebaT::fphi_uind() {
return 0;
// Compute the block size and grid size to keep all cores busy
const int max_cus = device->max_cus();
const int cus = device->gpu->cus();
int BX=block_size();
int GX=static_cast<int>(ceil(static_cast<double>(ainum)/BX));
while (GX < max_cus) {
while (GX < cus) {
BX /= 2;
GX=static_cast<int>(ceil(static_cast<double>(ainum)/BX));
}
@ -793,10 +793,10 @@ int BaseAmoebaT::fphi_mpole() {
int nbor_pitch=nbor->nbor_pitch();
// Compute the block size and grid size to keep all cores busy
const int max_cus = device->max_cus();
const int cus = device->gpu->cus();
int BX=block_size();
int GX=static_cast<int>(ceil(static_cast<double>(ainum)/BX));
while (GX < max_cus) {
while (GX < cus) {
BX /= 2;
GX=static_cast<int>(ceil(static_cast<double>(ainum)/BX));
}