This repository has been archived on 2026-11-24. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
radiance-sycl/core/main.cpp
T
2026-10-04 12:02:41 +02:00

20 lines
666 B
C++

/* main.cpp -- the entry point. Everything it does is in engine.h's comment; this file only turns
* a command line into that sequence and a status into an exit code.
*/
#include "engine.h"
int main(int argc, char** argv) {
rad::Config cfg;
int s = rad::config_parse(argc, argv, &cfg);
if (s == 1) { rad::config_usage(argv[0]); return 0; }
if (s < 0) { rad::config_usage(argv[0]); return 2; }
rad::Engine engine(std::move(cfg));
s = engine.start();
if (s < 0) return 1; /* start() already said what and why */
if (engine.config().debug_graph) return engine.dump();
return engine.serve() < 0 ? 1 : 0;
}