mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-06-27 03:11:28 +00:00
Merged PR 4851009: move clamp_cast under OperatorHelper namespace
move clamp_cast under OperatorHelper namespace This PR is to fix the duplicated definition of clamp_cast in "WindowsAI\dml\Common\Algorithms.h"
This commit is contained in:
parent
5ebdf76aa3
commit
c0a3320522
1 changed files with 4 additions and 5 deletions
|
|
@ -20,13 +20,12 @@
|
|||
}\
|
||||
}
|
||||
|
||||
template<typename T, typename I> T clamp_cast(I input)
|
||||
{
|
||||
return static_cast<T>(std::clamp<I>(input, std::numeric_limits<T>::lowest(), std::numeric_limits<T>::max()));
|
||||
}
|
||||
|
||||
namespace OperatorHelper
|
||||
{
|
||||
template<typename T, typename I> T clamp_cast(I input)
|
||||
{
|
||||
return static_cast<T>(std::clamp<I>(input, std::numeric_limits<T>::lowest(), std::numeric_limits<T>::max()));
|
||||
}
|
||||
enum TensorAxis { N, C, H, W, DoNotCoerce = UINT_MAX, LeftAligned = INT_MAX, RightAligned = INT_MIN, NoPlacementAdjustment = 0 };
|
||||
enum BroadcastMode { NoBroadcast, UnidirectionalBroadcast, MultidirectionalBroadcast };
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue