mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-25 22:26:24 +00:00
On Windows, clang-format has a bug when AlignTrailingComments.Kind is set to `Leave` (https://clang.llvm.org/docs/ClangFormatStyleOptions.html#aligntrailingcomments), where it will keep adding indentation to comments after each formatting runs. This PR changes to always align comments so we do not hit the bug. As a consequence of the options change we need to reformat some of the files. Note that this option is aligned with the rest of the repository.
35 lines
810 B
C++
35 lines
810 B
C++
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
// Licensed under the MIT License.
|
|
|
|
#pragma once
|
|
|
|
#include "inc/ImageConversionTypes.h"
|
|
|
|
namespace _winml {
|
|
|
|
class NominalRangeConverter {
|
|
public:
|
|
NominalRangeConverter() = delete;
|
|
NominalRangeConverter(winml::LearningModelPixelRange pixelRange);
|
|
|
|
float Normalize(float val) const;
|
|
|
|
DirectX::PackedVector::HALF Normalize(DirectX::PackedVector::HALF val) const;
|
|
|
|
#if defined(_M_AMD64) || defined(_M_IX86)
|
|
__m128 Normalize(__m128 sse_data) const;
|
|
#endif
|
|
|
|
float Denormalize(float val) const;
|
|
|
|
DirectX::PackedVector::HALF Denormalize(DirectX::PackedVector::HALF val) const;
|
|
|
|
#if defined(_M_AMD64) || defined(_M_IX86)
|
|
__m128 Denormalize(__m128 sse_data) const;
|
|
#endif
|
|
|
|
private:
|
|
float scale;
|
|
int32_t shift;
|
|
};
|
|
} // namespace _winml
|