Commit e3a9b5e
authored
Avoid negating unsigned integers in
This PR resolves an issue when calling `dpnp.resize` with unsigned
integer size.
The negation of an unsigned int underflows and creates a large positive
repeats, which leads to a runtime error. The PR fixes the used ceil
division.dpnp.resize (#2508)1 parent 7d2380d commit e3a9b5e
File tree
3 files changed
+20
-6
lines changed- dpnp
- tests
3 files changed
+20
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3129 | 3129 | | |
3130 | 3130 | | |
3131 | 3131 | | |
3132 | | - | |
3133 | | - | |
3134 | | - | |
| 3132 | + | |
| 3133 | + | |
| 3134 | + | |
3135 | 3135 | | |
3136 | 3136 | | |
3137 | 3137 | | |
| |||
3146 | 3146 | | |
3147 | 3147 | | |
3148 | 3148 | | |
3149 | | - | |
3150 | | - | |
| 3149 | + | |
| 3150 | + | |
| 3151 | + | |
| 3152 | + | |
3151 | 3153 | | |
3152 | 3154 | | |
3153 | 3155 | | |
| |||
3187 | 3189 | | |
3188 | 3190 | | |
3189 | 3191 | | |
3190 | | - | |
| 3192 | + | |
| 3193 | + | |
3191 | 3194 | | |
3192 | 3195 | | |
3193 | 3196 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1238 | 1238 | | |
1239 | 1239 | | |
1240 | 1240 | | |
| 1241 | + | |
| 1242 | + | |
| 1243 | + | |
| 1244 | + | |
| 1245 | + | |
| 1246 | + | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
| 1250 | + | |
1241 | 1251 | | |
1242 | 1252 | | |
1243 | 1253 | | |
| |||
0 commit comments