Skip to content
This repository has been archived by the owner on Feb 10, 2025. It is now read-only.

Commit

Permalink
Added gaussian blur, some refactor, fast gaussian, fixes MSVC
Browse files Browse the repository at this point in the history
  • Loading branch information
awxkee committed Apr 20, 2024
1 parent 184cc92 commit 385e1af
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 2 deletions.
32 changes: 32 additions & 0 deletions Dockerfile.msvc
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
FROM mcr.microsoft.com/windows/server:ltsc2022-KB5035857-amd64

# Restore the default Windows shell for correct batch processing.
SHELL ["cmd", "/S", "/C"]

RUN ` \
# Download the Build Tools bootstrapper.
curl -SL --output vs_buildtools.exe https://aka.ms/vs/17/release/vs_buildtools.exe ` \
` \
# Install Build Tools with the Microsoft.VisualStudio.Workload.AzureBuildTools workload, excluding workloads and components with known issues.
&& (start /w vs_buildtools.exe --quiet --wait --norestart --nocache ` \
--installPath "%ProgramFiles(x86)%\Microsoft Visual Studio\2022\BuildTools" ` \
--add Microsoft.VisualStudio.Workload.AzureBuildTools ` \
--remove Microsoft.VisualStudio.Component.Windows10SDK.10240 ` \
--remove Microsoft.VisualStudio.Component.Windows10SDK.10586 ` \
--remove Microsoft.VisualStudio.Component.Windows10SDK.14393 ` \
--remove Microsoft.VisualStudio.Component.Windows81SDK ` \
|| IF "%ERRORLEVEL%"=="3010" EXIT 0) ` \
` \
# Cleanup
&& del /q vs_buildtools.exe

WORKDIR "C:\\sparkyuv"

COPY . .

RUN cmake .
RUN make

EXPOSE $PORT

CMD [ "make" ]
4 changes: 2 additions & 2 deletions src/TypeSupport.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
#define SPARKYUV_INLINE static inline
#endif

#define ENABLE_TYPE_IS_F16(T) typename std::enable_if<std::is_same<T, hwy::float16_t>::value, int>::type = 0
#define ENABLE_TYPE_IS_NOT_F16(T) typename std::enable_if<!std::is_same<T, hwy::float16_t>::value, int>::type = 0
#define ENABLE_TYPE_IS_F16(T) typename std::enable_if<(std::is_same<T, hwy::float16_t>::value), int>::type = 0
#define ENABLE_TYPE_IS_NOT_F16(T) typename std::enable_if<(!std::is_same<T, hwy::float16_t>::value), int>::type = 0

template<typename T, ENABLE_TYPE_IS_F16(T)>
TYPE_INLINE float LoadFloat(const T *src) {
Expand Down

0 comments on commit 385e1af

Please sign in to comment.