Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/app/cycles_server.cpp
| Context not available. | |||||
| string devicelist = ""; | string devicelist = ""; | ||||
| string devicename = "cpu"; | string devicename = "cpu"; | ||||
| bool list = false; | bool list = false; | ||||
| int threads = 0; | |||||
| vector<DeviceType>& types = Device::available_types(); | vector<DeviceType>& types = Device::available_types(); | ||||
| Context not available. | |||||
| ap.options ("Usage: cycles_server [options]", | ap.options ("Usage: cycles_server [options]", | ||||
| "--device %s", &devicename, ("Devices to use: " + devicelist).c_str(), | "--device %s", &devicename, ("Devices to use: " + devicelist).c_str(), | ||||
| "--list-devices", &list, "List information about all available devices", | "--list-devices", &list, "List information about all available devices", | ||||
| "--threads %d", &threads, "Number of threads to use", | |||||
| NULL); | NULL); | ||||
| if(ap.parse(argc, argv) < 0) { | if(ap.parse(argc, argv) < 0) { | ||||
| Context not available. | |||||
| } | } | ||||
| } | } | ||||
| TaskScheduler::init(); | TaskScheduler::init(threads); | ||||
| while(1) { | while(1) { | ||||
| Stats stats; | Stats stats; | ||||
| Device *device = Device::create(device_info, stats); | Device *device = Device::create(device_info, stats, true); | ||||
| printf("Cycles Server with device: %s\n", device->info.description.c_str()); | printf("Cycles Server with device: %s\n", device->info.description.c_str()); | ||||
| device->server_run(); | device->server_run(); | ||||
| delete device; | delete device; | ||||
| Context not available. | |||||