From: Jeff Donahue Date: Wed, 19 Mar 2014 00:59:41 +0000 (-0700) Subject: fix remaining lint errors X-Git-Tag: submit/tizen/20180823.020014~739^2~2^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=76668738002f02006d56601fb9a04482833314a1;p=platform%2Fupstream%2Fcaffeonacl.git fix remaining lint errors --- diff --git a/src/caffe/layers/images_layer.cpp b/src/caffe/layers/images_layer.cpp index eb1b89e..e750e01 100644 --- a/src/caffe/layers/images_layer.cpp +++ b/src/caffe/layers/images_layer.cpp @@ -60,12 +60,15 @@ void* ImagesLayerPrefetch(void* layer_pointer) { int h_off, w_off; // We only do random crop when we do training. if (Caffe::phase() == Caffe::TRAIN) { + // NOLINT_NEXT_LINE(runtime/threadsafe_fn) h_off = rand() % (height - cropsize); + // NOLINT_NEXT_LINE(runtime/threadsafe_fn) w_off = rand() % (width - cropsize); } else { h_off = (height - cropsize) / 2; w_off = (width - cropsize) / 2; } + // NOLINT_NEXT_LINE(runtime/threadsafe_fn) if (mirror && rand() % 2) { // Copy mirrored version for (int c = 0; c < channels; ++c) { @@ -163,6 +166,7 @@ void ImagesLayer::SetUp(const vector*>& bottom, lines_id_ = 0; // Check if we would need to randomly skip a few data points if (this->layer_param_.rand_skip()) { + // NOLINT_NEXT_LINE(runtime/threadsafe_fn) unsigned int skip = rand() % this->layer_param_.rand_skip(); LOG(INFO) << "Skipping first " << skip << " data points."; CHECK_GT(lines_.size(), skip) << "Not enought points to skip";