MCPcopy Create free account
hub / github.com/dds-bridge/dds / GetDDSInfo

Function GetDDSInfo

library/src/init.cpp:339–404  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

337
338
339void STDCALL GetDDSInfo(DDSInfo * info)
340{
341 stringstream ss;
342 ss << "DDS DLL\n-------\n";
343
344 const string strSystem = sysdep.get_system(info->system);
345 ss << left << setw(13) << "System" <<
346 setw(20) << right << strSystem << "\n";
347
348 const string strBits = sysdep.get_bits(info->numBits);
349 ss << left << setw(13) << "Word size" <<
350 setw(20) << right << strBits << "\n";
351
352 const string strCompiler =sysdep.get_compiler(info->compiler);
353 ss << left << setw(13) << "Compiler" <<
354 setw(20) << right << strCompiler << "\n";
355
356 const string strConstructor = sysdep.get_constructor(info->constructor);
357 ss << left << setw(13) << "Constructor" <<
358 setw(20) << right << strConstructor << "\n";
359
360 const string strVersion = sysdep.get_version(info->major,
361 info->minor, info->patch);
362 ss << left << setw(13) << "Version" <<
363 setw(20) << right << strVersion << "\n";
364 strcpy(info->version_string, strVersion.c_str());
365
366 ss << left << setw(17) << "Memory max (MB)" <<
367 setw(16) << right << sysdep.get_memory_max() << "\n";
368
369 const string stm = to_string(THREADMEM_SMALL_DEF_MB) + "-" +
370 to_string(THREADMEM_SMALL_MAX_MB) + " / " +
371 to_string(THREADMEM_LARGE_DEF_MB) + "-" +
372 to_string(THREADMEM_LARGE_MAX_MB);
373 ss << left << setw(17) << "Threads (MB)" <<
374 setw(16) << right << stm << "\n";
375
376 info->numCores = sysdep.get_cores();
377 ss << left << setw(17) << "Number of cores" <<
378 setw(16) << right << info->numCores << "\n";
379
380 info->noOfThreads = sysdep.get_num_threads();
381 ss << left << setw(17) << "Number of threads" <<
382 setw(16) << right << sysdep.get_num_threads() << "\n";
383
384 int l = 0, s = 0;
385 for (unsigned i = 0; i < static_cast<unsigned>(info->noOfThreads); i++)
386 {
387 if (memory.ThreadSize(i) == "S")
388 s++;
389 else
390 l++;
391 }
392
393 const string strThrSizes = to_string(s) + " S, " + to_string(l) + " L";
394 strcpy(info->threadSizes, strThrSizes.c_str());
395 ss << left << setw(13) << "Thread sizes" <<
396 setw(20) << right << strThrSizes << "\n";

Callers 2

mainFunction · 0.85
mainFunction · 0.85

Calls 10

get_systemMethod · 0.80
get_bitsMethod · 0.80
get_compilerMethod · 0.80
get_constructorMethod · 0.80
get_versionMethod · 0.80
get_memory_maxMethod · 0.80
get_coresMethod · 0.80
get_num_threadsMethod · 0.80
ThreadSizeMethod · 0.80
get_threadingMethod · 0.80

Tested by 2

mainFunction · 0.68
mainFunction · 0.68