The Quantum Exact Simulation Toolkit v4.3.0
Loading...
Searching...
No Matches
Reporters

Functions for printing Qureg states or reporting their configuration. More...

Functions

void reportQureg (Qureg qureg)
 
void reportQuregParams (Qureg qureg)
 

Detailed Description

Functions for printing Qureg states or reporting their configuration.

Function Documentation

◆ reportQureg()

void reportQureg ( Qureg qureg)
Note
Documentation for this function or struct is under construction!
Warning
This function has not yet been unit tested and may contain bugs. Please use with caution!
See also
  • C and C++ examples

Definition at line 384 of file qureg.cpp.

384 {
385 validate_quregFields(qureg, __func__);
386 validate_numReportedNewlinesAboveZero(__func__); // because trailing newline mandatory
387
388 // account all local CPU memory (including buffer), neglecting GPU memory
389 // because it occupies distinct memory spaces, confusing accounting
390 size_t localMem = mem_getLocalQuregMemoryRequired(qureg.numAmpsPerNode);
391 if (qureg.isDistributed)
392 localMem *= 2; // include buffer. @todo will this ever overflow?!?!
393
394 // include struct size (expected negligibly tiny)
395 localMem += sizeof(qureg);
396
397 printer_sync();
398
399 print_header(qureg, localMem);
400 print_elems(qureg);
401
402 // exclude mandatory newline above
403 print_oneFewerNewlines();
404
405 printer_sync();
406}

◆ reportQuregParams()

void reportQuregParams ( Qureg qureg)
Note
Documentation for this function or struct is under construction!
Warning
This function has not yet been unit tested and may contain bugs. Please use with caution!
See also
  • C and C++ examples

Definition at line 363 of file qureg.cpp.

363 {
364 validate_quregFields(qureg, __func__);
365 validate_numReportedNewlinesAboveZero(__func__); // because trailing newline mandatory
366
367 /// @todo add function to write this output to file (useful for HPC debugging)
368
369 printer_sync();
370
371 print_label("Qureg");
372 printDeploymentInfo(qureg);
373 printDimensionInfo(qureg);
374 printDistributionInfo(qureg);
375 printMemoryInfo(qureg);
376
377 // exclude mandatory newline above
378 print_oneFewerNewlines();
379
380 printer_sync();
381}