MCPcopy Create free account
hub / github.com/NVIDIA/FasterTransformer / join

Function join

examples/cpp/multi_gpu_gpt/multi_gpu_gpt_async_example.cc:47–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45
46template<typename T>
47std::string join(const T* arr, const int length, const std::string sep = " ")
48{
49 std::string str = "";
50 for (int i = 0; i < length; i++) {
51 str += std::to_string(arr[i]);
52 if (i < length - 1) {
53 str += sep;
54 }
55 }
56 return str;
57}
58
59template<typename T>
60std::string toString(const T* arr, const int length, const bool is_device_array = true)

Callers 1

toStringFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected