MCPcopy Create free account
hub / github.com/ROCm/AMDMIGraphX / main

Function main

test/process_test.cpp:168–192  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

166MIGRAPHX_DECLARE_ENV_VAR(MIGRAPHX_PROCESS_TEST_ENVIRONMENT_VARIABLE)
167
168int main(int argc, const char* argv[])
169{
170 if(argc > 1)
171 {
172 std::string arg = argv[1];
173 if(arg == "--stdin")
174 {
175 migraphx::write_buffer(argv[2], read_stdin());
176 return 0;
177 }
178 if(arg == "--stdout")
179 {
180 std::vector<char> result{string_data.begin(), string_data.end()};
181 if(migraphx::enabled(MIGRAPHX_PROCESS_TEST_ENVIRONMENT_VARIABLE{}))
182 std::reverse(result.begin(), result.end());
183 std::fwrite(result.data(), 1, result.size(), stdout);
184 return 0;
185 }
186 }
187 else
188 {
189 executable = argv[0];
190 test::run(argc, argv);
191 }
192}

Callers

nothing calls this directly

Calls 9

write_bufferFunction · 0.85
read_stdinFunction · 0.70
enabledFunction · 0.50
reverseFunction · 0.50
runFunction · 0.50
beginMethod · 0.45
endMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected