Cleanup Cycles Denoising platform-specific defines
authorLukas Stockner <lukas.stockner@freenet.de>
Fri, 9 Jun 2017 20:31:26 +0000 (22:31 +0200)
committerLukas Stockner <lukas.stockner@freenet.de>
Fri, 9 Jun 2017 20:38:16 +0000 (22:38 +0200)
intern/cycles/kernel/filter/filter_reconstruction.h

index 538d57d3dc9aced961fec16b73559ffd0e9a8401..d6d7639a22d0461d4baec9f7c5a62715e2209c38 100644 (file)
@@ -36,17 +36,17 @@ ccl_device_inline void kernel_filter_construct_gramian(int x, int y,
        int p_offset =  y    *w +  x;
        int q_offset = (y+dy)*w + (x+dx);
 
-#ifdef __KERNEL_CPU__
-       const int stride = 1;
-       (void)storage_stride;
-       (void)localIdx;
-       float design_row[DENOISE_FEATURES+1];
-#elif defined(__KERNEL_CUDA__)
+#ifdef __KERNEL_GPU__
        const int stride = storage_stride;
+#else
+       const int stride = 1;
+       (void) storage_stride;
+#endif
+
+#ifdef __KERNEL_CUDA__
        ccl_local float shared_design_row[(DENOISE_FEATURES+1)*CCL_MAX_LOCAL_SIZE];
        ccl_local_param float *design_row = shared_design_row + localIdx*(DENOISE_FEATURES+1);
 #else
-       const int stride = storage_stride;
        float design_row[DENOISE_FEATURES+1];
 #endif
 
@@ -74,11 +74,11 @@ ccl_device_inline void kernel_filter_finalize(int x, int y, int w, int h,
                                               int4 buffer_params,
                                               int sample)
 {
-#ifdef __KERNEL_CPU__
-       const int stride = 1;
-       (void)storage_stride;
-#else
+#ifdef __KERNEL_GPU__
        const int stride = storage_stride;
+#else
+       const int stride = 1;
+       (void) storage_stride;
 #endif
 
        /* The weighted average of pixel colors (essentially, the NLM-filtered image).
@@ -105,6 +105,4 @@ ccl_device_inline void kernel_filter_finalize(int x, int y, int w, int h,
        combined_buffer[2] = final_color.z;
 }
 
-#undef STORAGE_TYPE
-
 CCL_NAMESPACE_END