Implement fast number serialization routines. (#5772)

* Implement ryu algorithm.
* Implement integer printing.
* Full coverage roundtrip test.
This commit is contained in:
Jiaming Yuan
2020-06-17 12:39:23 +08:00
committed by GitHub
parent 7c3a168ffd
commit 38ee514787
17 changed files with 1601 additions and 253 deletions

View File

@@ -54,9 +54,8 @@ inline data::CupyAdapter AdapterFromData(const thrust::device_vector<float> &x,
array_interface["data"] = j_data;
array_interface["version"] = Integer(static_cast<Integer::Int>(1));
array_interface["typestr"] = String("<f4");
std::stringstream ss;
Json::Dump(array_interface, &ss);
std::string str = ss.str();
std::string str;
Json::Dump(array_interface, &str);
return data::CupyAdapter(str);
}
#endif