Skip to content
Snippets Groups Projects
Commit fb95aeb4 authored by Houssem ROUIS's avatar Houssem ROUIS
Browse files

fix Slice warning

parent 0daa24ea
No related branches found
No related tags found
2 merge requests!152Update Aidge export to take a graph view has an argument instead of a...,!122Add missing attributes to operators
......@@ -152,7 +152,7 @@ bool Aidge::Slice_Op::forwardDims(bool /*allowDataDependency*/) {
if(step == 0) {
AIDGE_THROW_OR_ABORT(std::runtime_error, "{}: Step must be a non-zero value", type());
}
if(step * (end - start) < 0) {
if(step * (static_cast<int64_t>(end) - static_cast<int64_t>(start)) < 0) {
if(step < 0) {
AIDGE_THROW_OR_ABORT(std::runtime_error, "{}: Step is negative we must have End < Start", type());
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment