blob: ac946777a8c1fe9c455987e4a7d0ca8ab435b79c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
/* SPDX-License-Identifier: Apache-2.0
* Copyright 2011-2022 Blender Foundation */
#ifndef __UTIL_OPENIMAGEDENOISE_H__
#define __UTIL_OPENIMAGEDENOISE_H__
#ifdef WITH_OPENIMAGEDENOISE
# include <OpenImageDenoise/oidn.hpp>
#endif
#include "util/system.h"
CCL_NAMESPACE_BEGIN
static inline bool openimagedenoise_supported()
{
#ifdef WITH_OPENIMAGEDENOISE
# ifdef __APPLE__
/* Always supported through Accelerate framework BNNS. */
return true;
# else
return system_cpu_support_sse41();
# endif
#else
return false;
#endif
}
CCL_NAMESPACE_END
#endif /* __UTIL_OPENIMAGEDENOISE_H__ */
|