Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2016-08-02 12:27:59 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2016-08-02 15:09:34 +0300
commit7b8b16a18c9b766deb11edc08837c1f112f7922a (patch)
tree49b0f32d63f94f59a8a62429e753da6554ea9d15
parentad48f13099c603ecb4358a1d0d304d2ec30e59d5 (diff)
Cycles: Some cleanup in CUDA device file
-rw-r--r--intern/cycles/device/device_cuda.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/intern/cycles/device/device_cuda.cpp b/intern/cycles/device/device_cuda.cpp
index f88520479df..0b3c31a0a3e 100644
--- a/intern/cycles/device/device_cuda.cpp
+++ b/intern/cycles/device/device_cuda.cpp
@@ -288,10 +288,11 @@ public:
"Install CUDA toolkit in default location.");
return false;
}
- int cuda_version = cuewCompilerVersion();
+ const int cuda_version = cuewCompilerVersion();
VLOG(1) << "Found nvcc " << nvcc
<< ", CUDA version " << cuda_version
<< ".";
+ const int major = cuda_version / 10, minor = cuda_version & 10;
if(cuda_version == 0) {
cuda_error_message("CUDA nvcc compiler version could not be parsed.");
return false;
@@ -299,13 +300,13 @@ public:
if(cuda_version < 60) {
printf("Unsupported CUDA version %d.%d detected, "
"you need CUDA 7.5 or newer.\n",
- cuda_version / 10, cuda_version % 10);
+ major, minor);
return false;
}
else if(cuda_version != 75 && cuda_version != 80) {
printf("CUDA version %d.%d detected, build may succeed but only "
"CUDA 7.5 and 8.0 are officially supported.\n",
- cuda_version / 10, cuda_version % 10);
+ major, minor);
}
return true;
}
@@ -372,7 +373,7 @@ public:
return "";
}
const char *nvcc = cuewCompilerPath();
- string kernel = path_join(kernel_path,
+ const string kernel = path_join(kernel_path,
path_join("kernels",
path_join("cuda", "kernel.cu")));
double starttime = time_dt();