Commit a2811d3234506de149b522a15b6e1486eb821da6

Authored by David Mayerich
1 parent 654c8934

updated vec3 str() fixes to be more compatible with nvcc

Showing 1 changed file with 7 additions and 3 deletions   Show diff stats
stim/math/vec3.h
... ... @@ -5,6 +5,10 @@
5 5 #include <stim/cuda/cudatools/callable.h>
6 6 #include <cmath>
7 7  
  8 +#ifndef __CUDACC__
  9 +#include <sstream>
  10 +#endif
  11 +
8 12  
9 13 namespace stim{
10 14  
... ... @@ -243,9 +247,9 @@ public:
243 247 return false;
244 248 }
245 249  
246   -//#ifndef __CUDA_ARCH__
  250 +#ifndef __CUDACC__
247 251 /// Outputs the vector as a string
248   -CUDA_UNCALLABLE std::string str() const{
  252 +std::string str() const{
249 253 std::stringstream ss;
250 254  
251 255 const size_t N = 3;
... ... @@ -261,7 +265,7 @@ CUDA_UNCALLABLE std::string str() const{
261 265  
262 266 return ss.str();
263 267 }
264   -//#endif
  268 +#endif
265 269  
266 270 size_t size(){ return 3; }
267 271  
... ...