Resolve CUDA kernel compilation error
authorSergey Sharybin <sergey.vfx@gmail.com>
Thu, 6 Sep 2012 16:42:55 +0000 (16:42 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Thu, 6 Sep 2012 16:42:55 +0000 (16:42 +0000)
Instead of including util_string.h which in fact also defines some
symbols from util_string.cpp include STL's string header and directly
use std::string.

intern/cycles/kernel/kernel_types.h

index 7faa1323258248be7380e0c3f844fb50db47cd85..06babe7849336164cf93b8adaa12372eea10f27d 100644 (file)
 #ifndef __KERNEL_TYPES_H__
 #define __KERNEL_TYPES_H__
 
+#include <string>
+
 #include "kernel_math.h"
 #include "svm/svm_types.h"
 
-#include "util_string.h"
-
 #ifndef __KERNEL_GPU__
 #define __KERNEL_CPU__
 #endif
@@ -370,28 +370,28 @@ typedef enum AttributeStandard {
        ATTR_STD_NOT_FOUND = ~0
 } AttributeStandard;
 
-__device string attribute_standard_name(AttributeStandard std)
+__device std::string attribute_standard_name(AttributeStandard std)
 {
        if(std == ATTR_STD_VERTEX_NORMAL)
-               return string("N");
+               return std::string("N");
        else if(std == ATTR_STD_FACE_NORMAL)
-               return string("Ng");
+               return std::string("Ng");
        else if(std == ATTR_STD_UV)
-               return string("uv");
+               return std::string("uv");
        else if(std == ATTR_STD_GENERATED)
-               return string("generated");
+               return std::string("generated");
        else if(std == ATTR_STD_POSITION_UNDEFORMED)
-               return string("undeformed");
+               return std::string("undeformed");
        else if(std == ATTR_STD_POSITION_UNDISPLACED)
-               return string("undisplaced");
+               return std::string("undisplaced");
        else if(std == ATTR_STD_MOTION_PRE)
-               return string("motion_pre");
+               return std::string("motion_pre");
        else if(std == ATTR_STD_MOTION_POST)
-               return string("motion_post");
+               return std::string("motion_post");
        else if(std == ATTR_STD_PARTICLE)
-               return string("particle");
+               return std::string("particle");
        
-       return string();
+       return std::string();
 }
 
 /* Closure data */