forked from bartvdbraak/blender
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.
This commit is contained in:
parent
f647348420
commit
518c974b80
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user