Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
wangsen
rocm_bandwidth_test
Commits
61a80367
Commit
61a80367
authored
May 14, 2019
by
Ramesh Errabolu
Browse files
Extend logic to catch more illegal options
parent
cd64b4d9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
rocm_bandwidth_test_parse.cpp
rocm_bandwidth_test_parse.cpp
+10
-4
No files found.
rocm_bandwidth_test_parse.cpp
View file @
61a80367
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment