forked from BVLC/caffe
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Daniil Efremov
committed
Feb 1, 2017
1 parent
1dc780b
commit e7f4160
Showing
2 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// | ||
// Created by daniil on 1/11/17. | ||
// | ||
|
||
#ifndef CLBLAST_ANDROID_PATCH_H | ||
#define CLBLAST_ANDROID_PATCH_H | ||
|
||
#include <string> | ||
#include <sstream> | ||
#include <cstdio> | ||
#include <cstdlib> | ||
namespace std { | ||
template<typename T> | ||
std::string to_string(T value) { | ||
//create an output string stream | ||
std::ostringstream os; | ||
|
||
//throw the value into the string stream | ||
os << value; | ||
|
||
//convert the string stream into a string and return | ||
return os.str(); | ||
} | ||
|
||
inline double stod(string value) { | ||
return strtod (value.c_str(), NULL); | ||
} | ||
|
||
inline int stoi(string value) { | ||
return strtol (value.c_str(),NULL,0); | ||
} | ||
} | ||
#endif //CLBLAST_ANDROID_PATCH_H | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters