   }
 
   ::cudaDeviceProp prop;
-  CUDA_CALL(::cudaGetDeviceProperties(&prop, dev_id_));
+  CUDA_CALL(::cudaGetDeviceProperties(&prop, device_id));
 
   // Checks compute capability
   static const int MIN_CC_MAJOR = 3;
   static const int MIN_CC_MINOR = 0;
-  if (prop.major < ::MIN_CC_MAJOR ||
-      (prop.major == ::MIN_CC_MAJOR && prop.minor < ::MIN_CC_MINOR)) {
+  if (prop.major < MIN_CC_MAJOR ||
+      (prop.major == MIN_CC_MAJOR && prop.minor < MIN_CC_MINOR)) {
     THROW_ERROR(
-        "CUDA Device " << dev_id_ << " does not satisfy the "
+        "CUDA Device " << device_id << " does not satisfy the "
         "minimum requirement of the compute capability: "
         << prop.major << '.' << prop.minor << " < "
-        << ::MIN_CC_MAJOR << '.' << ::MIN_CC_MINOR);
+        << MIN_CC_MAJOR << '.' << MIN_CC_MINOR);
   }
 
   // Checks other requirements.

  { \
    if (prop.name[index] < (value)) { \
      THROW_ERROR( \
          "CUDA Device " << dev_id_ << \
          " does not satisfy the minimum requirement by primitiv: " \
          << "property: " << #name << "[" << #index << "], " \
          << "value: " << prop.name[index] << ", " \

  { \
    if (prop.name < (value)) { \
      THROW_ERROR( \
          "CUDA Device " << device_id << \
          " does not satisfy the minimum requirement by primitiv: " \
          << "property: " << #name << ", " \
          << "value: " << prop.name << ", " \
