diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-09-06 20:42:55 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-09-06 20:42:55 +0400 |
commit | 518c974b80e148fb42650aecd8c2a99f06ef16d1 (patch) | |
tree | 34307a22d4cd21ab59755f64e70a6d9d0c86075f /intern/cycles/kernel/kernel_types.h | |
parent | f647348420758b1b1d1bb4ab82c70caaee571d99 (diff) |
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.
Diffstat (limited to 'intern/cycles/kernel/kernel_types.h')
-rw-r--r-- | intern/cycles/kernel/kernel_types.h | 26 |
1 files changed, 13 insertions, 13 deletions
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 <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 */ |