From 518c974b80e148fb42650aecd8c2a99f06ef16d1 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Thu, 6 Sep 2012 16:42:55 +0000 Subject: 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. --- intern/cycles/kernel/kernel_types.h | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'intern/cycles/kernel/kernel_types.h') diff --git a/intern/cycles/kernel/kernel_types.h b/intern/cycles/kernel/kernel_types.h index 7faa1323258..06babe78493 100644 --- a/intern/cycles/kernel/kernel_types.h +++ b/intern/cycles/kernel/kernel_types.h @@ -19,11 +19,11 @@ #ifndef __KERNEL_TYPES_H__ #define __KERNEL_TYPES_H__ +#include + #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 */ -- cgit v1.2.3