[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [50456] trunk/blender/intern/cycles/kernel /kernel_types.h: Resolve CUDA kernel compilation error

Sergey Sharybin sergey.vfx at gmail.com
Thu Sep 6 18:42:55 CEST 2012


Revision: 50456
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=50456
Author:   nazgul
Date:     2012-09-06 16:42:55 +0000 (Thu, 06 Sep 2012)
Log Message:
-----------
Resolve CUDA kernel compilation error

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.

Modified Paths:
--------------
    trunk/blender/intern/cycles/kernel/kernel_types.h

Modified: trunk/blender/intern/cycles/kernel/kernel_types.h
===================================================================
--- trunk/blender/intern/cycles/kernel/kernel_types.h	2012-09-06 16:06:55 UTC (rev 50455)
+++ trunk/blender/intern/cycles/kernel/kernel_types.h	2012-09-06 16:42:55 UTC (rev 50456)
@@ -19,11 +19,11 @@
 #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 @@
 	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 */




More information about the Bf-blender-cvs mailing list