Commit 61a80367 authored by Ramesh Errabolu's avatar Ramesh Errabolu
Browse files

Extend logic to catch more illegal options

parent cd64b4d9
...@@ -112,22 +112,28 @@ void RocmBandwidthTest::ValidateCopyUnidirFlags(uint32_t copy_mask, ...@@ -112,22 +112,28 @@ void RocmBandwidthTest::ValidateCopyUnidirFlags(uint32_t copy_mask,
exit(0); exit(0);
} }
if ((copy_ctrl_mask & DEV_COPY_LATENCY) &&
(copy_ctrl_mask & USR_BUFFER_SIZE)) {
PrintHelpScreen();
exit(0);
}
// It is illegal to specify Latency and another // It is illegal to specify Latency and another
// secondary flag that affects a copy operation // secondary flag that affects a copy operation
if ((copy_ctrl_mask & DEV_COPY_LATENCY) && if ((copy_ctrl_mask & DEV_COPY_LATENCY) &&
((copy_ctrl_mask & USR_BUFFER_INIT) || ((copy_ctrl_mask & USR_BUFFER_INIT) ||
(copy_ctrl_mask & CPU_VISIBLE_TIME) || (copy_ctrl_mask & CPU_VISIBLE_TIME) ||
(copy_ctrl_mask & VALIDATE_COPY_OP))) { (copy_ctrl_mask & VALIDATE_COPY_OP))) {
PrintHelpScreen(); PrintHelpScreen();
exit(0); exit(0);
} }
// It is illegal to specify user buffer sizes and another // It is illegal to specify user buffer sizes and another
// secondary flag that affects a copy operation // secondary flag that affects a copy operation
if ((copy_ctrl_mask & USR_BUFFER_SIZE) && if ((copy_ctrl_mask & USR_BUFFER_SIZE) &&
(copy_ctrl_mask & VALIDATE_COPY_OP)) { (copy_ctrl_mask & VALIDATE_COPY_OP)) {
PrintHelpScreen(); PrintHelpScreen();
exit(0); exit(0);
} }
// Check of illegal flags is complete // Check of illegal flags is complete
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment