COMPASS  5.0.0
End-to-end AO simulation tool using GPU acceleration
carma_utils Namespace Reference

Classes

class  ProgressBar
 

Functions

template<typename T >
std::string to_string (const T &n)
 
template<typename T >
from_string (const std::string &myString)
 
void split (std::vector< std::string > &tokens, const std::string &text, char sep)
 

Function Documentation

◆ from_string()

template<typename T >
T carma_utils::from_string ( const std::string &  myString)

Definition at line 88 of file carma_utils.h.

88  {
89  std::istringstream buffer(myString);
90  T value;
91  buffer >> value;
92  return value;
93 }

◆ split()

void carma_utils::split ( std::vector< std::string > &  tokens,
const std::string &  text,
char  sep 
)

Definition at line 94 of file carma_utils.h.

95  {
96  std::string::size_type start = 0, end = 0;
97  while ((end = text.find(sep, start)) != std::string::npos) {
98  tokens.push_back(text.substr(start, end - start));
99  start = end + 1;
100  }
101  tokens.push_back(text.substr(start));
102 }
Here is the caller graph for this function:

◆ to_string()

template<typename T >
std::string carma_utils::to_string ( const T &  n)

Definition at line 82 of file carma_utils.h.

82  {
83  std::ostringstream stm;
84  stm << n;
85  return stm.str();
86 }
Here is the caller graph for this function:
test_cusolver.n
int n
Definition: test_cusolver.py:7
valid_roket_files.end
end
Definition: valid_roket_files.py:44