fix remaining lint errors
authorJeff Donahue <jeff.donahue@gmail.com>
Wed, 19 Mar 2014 00:59:41 +0000 (17:59 -0700)
committerJeff Donahue <jeff.donahue@gmail.com>
Wed, 19 Mar 2014 01:21:41 +0000 (18:21 -0700)
src/caffe/layers/images_layer.cpp

index eb1b89e..e750e01 100644 (file)
@@ -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<Dtype>::SetUp(const vector<Blob<Dtype>*>& 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";