Skip to content

Commit

Permalink
fixes std:: prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
vedaldi committed Aug 11, 2017
1 parent a1031ca commit 5780d16
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
12 changes: 6 additions & 6 deletions matlab/src/bits/nnbnorm_gpu.cu
Original file line number Diff line number Diff line change
Expand Up @@ -844,9 +844,9 @@ struct BatchNormForwardWithMoment<VLDT_GPU, dataType>
size_t blockSize = getBlockSize(planeArea) ;
//size_t L = 10000 * blockSize ;
//size_t numBlocksPerChannel = (planeArea * size + L - 1) / L ;
//numBlocksPerChannel = min(numBlocksPerChannel, size) ;
//numBlocksPerChannel = min(numBlocksPerChannel, 65536 / numChannels) ;
//numBlocksPerChannel = max(numBlocksPerChannel, 1) ;
//numBlocksPerChannel = std::min(numBlocksPerChannel, size) ;
//numBlocksPerChannel = std::min(numBlocksPerChannel, 65536 / numChannels) ;
//numBlocksPerChannel = std::max(numBlocksPerChannel, 1) ;
size_t numBlocksPerChannel = 1 ;
size_t numBlocks = numChannels * numBlocksPerChannel ;
assert(numBlocksPerChannel >= 1) ;
Expand Down Expand Up @@ -1000,9 +1000,9 @@ struct BatchNormBackwardWithMoment<VLDT_GPU, dataType>
size_t blockSize = getBlockSize(planeArea) ;
//size_t L = 10000 * blockSize ;
//size_t numBlocksPerChannel = (planeArea * size + L - 1) / L ;
//numBlocksPerChannel = min(numBlocksPerChannel, size) ;
//numBlocksPerChannel = min(numBlocksPerChannel, 65536 / numChannels) ;
//numBlocksPerChannel = max(numBlocksPerChannel, 1) ;
//numBlocksPerChannel = std::min(numBlocksPerChannel, size) ;
//numBlocksPerChannel = std::min(numBlocksPerChannel, 65536 / numChannels) ;
//numBlocksPerChannel = std::max(numBlocksPerChannel, 1) ;
size_t numBlocksPerChannel = 1 ;
size_t numBlocks = numChannels * numBlocksPerChannel ;

Expand Down
16 changes: 8 additions & 8 deletions matlab/src/bits/nnpooling.cu
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,10 @@ struct PoolingForwardCPU
for (int y = 0; y < outputHeight; ++y) {
int x1 = x * (signed)op.strideX - (signed)op.padLeft ;
int y1 = y * (signed)op.strideY - (signed)op.padTop ;
int x2 = min(x1 + op.poolWidth, (int)width) ;
int y2 = min(y1 + op.poolHeight, (int)height) ;
x1 = max(x1, 0) ;
y1 = max(y1, 0) ;
int x2 = std::min(x1 + op.poolWidth, (int)width) ;
int y2 = std::min(y1 + op.poolHeight, (int)height) ;
x1 = std::max(x1, 0) ;
y1 = std::max(y1, 0) ;
Accumulator acc(y2 - y1, x2 - x1) ;
for (int u = x1 ; u < x2 ; ++u) {
for (int v = y1 ; v < y2 ; ++v) {
Expand Down Expand Up @@ -191,10 +191,10 @@ struct PoolingBackwardCPU
for (int y = 0; y < outputHeight; ++y) {
int x1 = x * (signed)op.strideX - (signed)op.padLeft ;
int y1 = y * (signed)op.strideY - (signed)op.padTop ;
int x2 = min(x1 + op.poolWidth, (int)width) ;
int y2 = min(y1 + op.poolHeight, (int)height) ;
x1 = max(x1, 0) ;
y1 = max(y1, 0) ;
int x2 = std::min(x1 + op.poolWidth, (int)width) ;
int y2 = std::min(y1 + op.poolHeight, (int)height) ;
x1 = std::max(x1, 0) ;
y1 = std::max(y1, 0) ;
Accumulator acc(y2 - y1, x2 - x1, derOutputData[x * outputHeight + y]) ;
for (int u = x1 ; u < x2 ; ++u) {
for (int v = y1 ; v < y2 ; ++v) {
Expand Down

0 comments on commit 5780d16

Please sign in to comment.