mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-06-06 00:03:22 +00:00
Fix prefast warning (#14895)
Fix a prefast warning: `The const variable 'spatial_dim_start' can be computed at compile-time. Consider using constexpr (con.5).`
This commit is contained in:
parent
c1155b70c5
commit
6c8538f086
1 changed files with 1 additions and 1 deletions
|
|
@ -173,7 +173,7 @@ Status Conv<T, NHWC>::UpdateState(OpKernelContext* context, bool bias_expected)
|
|||
TensorShapeVector slice_axes;
|
||||
slice_axes.reserve(kernel_rank);
|
||||
|
||||
const size_t spatial_dim_start = channels_last ? 1 : 2;
|
||||
constexpr size_t spatial_dim_start = channels_last ? 1 : 2;
|
||||
const size_t spatial_dim_end = spatial_dim_start + kernel_rank;
|
||||
TensorShape spatial_shape = X->Shape().Slice(spatial_dim_start, spatial_dim_end);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue