MCPcopy Create free account
hub / github.com/Xtra-Computing/thundersvm / get_working_set_size

Method get_working_set_size

src/thundersvm/model/svmmodel.cpp:351–357  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

349}
350
351int SvmModel::get_working_set_size(int n_instances, int n_features) {
352 size_t free_mem = param.max_mem_size - SyncMem::get_total_memory_size();
353 int ws_size = min(max2power(n_instances),
354 (int) min(max2power(free_mem / sizeof(kernel_type) / (n_instances + n_features)), size_t(1024)));
355 LOG(INFO) << "working set size = " << ws_size;
356 return ws_size;
357}
358
359void SvmModel::set_max_memory_size(size_t size) {
360 if(size > 0)

Callers

nothing calls this directly

Calls 2

minFunction · 0.85
max2powerFunction · 0.85

Tested by

no test coverage detected