muda
string_pointer.h
1 #pragma once
2 #include <muda/muda_def.h>
3 
4 namespace muda::details
5 {
7 {
8  public:
9  char* device_string = nullptr;
10  char* host_string = nullptr;
11  unsigned int length = 0;
12 
13  MUDA_INLINE MUDA_GENERIC const char* auto_select() const MUDA_NOEXCEPT
14  {
15 #ifdef __CUDA_ARCH__
16  return device_string;
17 #else
18  return host_string;
19 #endif // __CUDA_ARCH__
20  }
21 };
22 } // namespace muda
Definition: string_pointer.h:6