Input/Output clarification

Input/Output clarification

This is my understanding of the input and output descriptions:

  1. The input consists of three command line arguments, each of which is exactly 32 hex digits long.
  2. The output should be something like "574395734 cycles" printed to stdout.
  3. The program need not specify if it terminated due to all zeros or repeating the initial values.
  4. Elapsed time and units (seconds or milliseconds) should be printed to stderr.

Are any of these inferences wrong?

As far as the input, my program handles hex strings longer/shorter than 32 digits by truncating/zero-padding the most significant digits (and issuing a warning to stderr). This is useful for running small tests involving only one DWORD.

The thing about "output to stdout" and "time to stderr" is something I picked up from another Threading Challenge problem. It probably doesn't matter but I noticed log files created by batch jobs on the MTL record stderr output before stdout, reversing the order of my printf's.

- Rick

2 posts / 0 nouveau(x)
Dernière contribution
Reportez-vous à notre Notice d'optimisation pour plus d'informations sur les choix et l'optimisation des performances dans les produits logiciels Intel.

my assumption:
Every point is fine except the last one.
Every approach is fine unless it affect the requirement.
I do not see any specific need of printing no of cycles on stderr because this is just for the sake of seeing program execution time. it should be stdout.

Connectez-vous pour laisser un commentaire.