Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOmarSquircleArt <mail@OmarEmara.dev>2020-04-01 15:48:01 +0300
committerOmarSquircleArt <mail@OmarEmara.dev>2020-04-01 15:48:01 +0300
commitf047d47e24fc5aab41d0b2349f41f539aa085b8f (patch)
tree7f27a8dc2f36d25289a03c294beb0bdf7e28e697 /intern/cycles/util/util_simd.h
parent5e176d67e193b80054392b3e9190510fd90001e4 (diff)
Cycles: AVX implantation of Perlin noise.
This patch adds an AVX implementation of Perlin noise in Cycles. An avxi type was also added as a utility based on the respective type in Intel Embree. Only 3D and 4D noise were implemented, there is no benefit for utilizing AVX in 1D and 2D noise. The SSE trilinear interpolation function was used in the AVX implementation because there is no benefit from using AVX in interpolating the last three dimensions. Differential Revision: https://developer.blender.org/D6680
Diffstat (limited to 'intern/cycles/util/util_simd.h')
-rw-r--r--intern/cycles/util/util_simd.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/intern/cycles/util/util_simd.h b/intern/cycles/util/util_simd.h
index f49cfb4184d..922f5dd274e 100644
--- a/intern/cycles/util/util_simd.h
+++ b/intern/cycles/util/util_simd.h
@@ -75,6 +75,28 @@ static struct FalseTy {
}
} False ccl_maybe_unused;
+static struct ZeroTy {
+ __forceinline operator float() const
+ {
+ return 0;
+ }
+ __forceinline operator int() const
+ {
+ return 0;
+ }
+} zero ccl_maybe_unused;
+
+static struct OneTy {
+ __forceinline operator float() const
+ {
+ return 1;
+ }
+ __forceinline operator int() const
+ {
+ return 1;
+ }
+} one ccl_maybe_unused;
+
static struct NegInfTy {
__forceinline operator float() const
{
@@ -97,6 +119,9 @@ static struct PosInfTy {
}
} inf ccl_maybe_unused, pos_inf ccl_maybe_unused;
+static struct StepTy {
+} step ccl_maybe_unused;
+
/* Intrinsics Functions */
# if defined(__BMI__) && defined(__GNUC__)