fix the win32 macro usage (#844)
This commit is contained in:
Родитель
3da0d3c929
Коммит
5104bb9897
|
@ -11,7 +11,7 @@
|
|||
#include "op_def_struct.h"
|
||||
|
||||
#if OCOS_ENABLE_VENDOR_IMAGE_CODECS
|
||||
#if WIN32
|
||||
#if _WIN32
|
||||
#include "image_decoder_win32.hpp"
|
||||
#elif __APPLE__
|
||||
#include "image_decoder_darwin.hpp"
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
template <typename T>
|
||||
void DumpTensorToFile(const ortc::Tensor<T>& tensor, const char* name) {
|
||||
#if WIN32
|
||||
#if _WIN32
|
||||
auto tic = GetTickCount();
|
||||
std::string dtype;
|
||||
if constexpr (std::is_same_v<T, uint8_t> || std::is_same_v<T, std::byte>) {
|
||||
|
|
|
@ -74,7 +74,7 @@ TEST(ImageDecoderTest, TestJpegDecoder) {
|
|||
std::vector<uint8_t>({48, 14, 5, 48, 14, 5, 48, 14, 5, 48, 14, 5}));
|
||||
|
||||
#if OCOS_ENABLE_VENDOR_IMAGE_CODECS
|
||||
#if WIN32
|
||||
#if _WIN32
|
||||
out_range = out_tensor.Data() + 1296 * 3;
|
||||
ASSERT_EQ(std::vector<uint8_t>(out_range, out_range + 12),
|
||||
std::vector<uint8_t>({228, 234, 222, 228, 235, 219, 219, 221, 200, 203, 201, 178}));
|
||||
|
@ -128,7 +128,7 @@ TEST(ImageDecoderTest, TestJpegDecoder) {
|
|||
}
|
||||
|
||||
#if OCOS_ENABLE_VENDOR_IMAGE_CODECS
|
||||
#if defined(WIN32) || defined(__APPLE__)
|
||||
#if defined(_WIN32) || defined(__APPLE__)
|
||||
TEST(ImageDecoderTest, TestTiffDecoder) {
|
||||
ort_extensions::DecodeImage image_decoder;
|
||||
image_decoder.Init(std::unordered_map<std::string, std::variant<std::string>>());
|
||||
|
|
Загрузка…
Ссылка в новой задаче