The Quantum Exact Simulation Toolkit v4.2.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 375 of file qureg.cpp.

375 {
376 validate_quregFields(qureg, __func__);
377 validate_numReportedNewlinesAboveZero(__func__); // because trailing newline mandatory
378
379 // account all local CPU memory (including buffer), neglecting GPU memory
380 // because it occupies distinct memory spaces, confusing accounting
381 size_t localMem = mem_getLocalQuregMemoryRequired(qureg.numAmpsPerNode);
382 if (qureg.isDistributed)
383 localMem *= 2; // include buffer. @todo will this ever overflow?!?!
384
385 // include struct size (expected negligibly tiny)
386 localMem += sizeof(qureg);
387
388 print_header(qureg, localMem);
389 print_elems(qureg);
390
391 // exclude mandatory newline above
392 print_oneFewerNewlines();
393}

◆ 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 357 of file qureg.cpp.

357 {
358 validate_quregFields(qureg, __func__);
359 validate_numReportedNewlinesAboveZero(__func__); // because trailing newline mandatory
360
361 /// @todo add function to write this output to file (useful for HPC debugging)
362
363 // printer routines will consult env rank to avoid duplicate printing
364 print_label("Qureg");
365 printDeploymentInfo(qureg);
366 printDimensionInfo(qureg);
367 printDistributionInfo(qureg);
368 printMemoryInfo(qureg);
369
370 // exclude mandatory newline above
371 print_oneFewerNewlines();
372}