ArrayUtils.hpp
Go to the documentation of this file.
1 // This code is based on Jet framework.
2 // Copyright (c) 2018 Doyub Kim
3 // CubbyFlow is voxel-based fluid simulation engine for computer games.
4 // Copyright (c) 2020 CubbyFlow Team
5 // Core Part: Chris Ohk, Junwoo Hwang, Jihong Sin, Seungwoo Yoo
6 // AI Part: Dongheon Cho, Minseo Kim
7 // We are making my contributions/submissions to this project solely in our
8 // personal capacity and are not conveying any rights to any intellectual
9 // property of any third parties.
10 
11 #ifndef CUBBYFLOW_ARRAY_UTILS_HPP
12 #define CUBBYFLOW_ARRAY_UTILS_HPP
13 
14 #include <Core/Array/ArrayView.hpp>
15 
16 namespace CubbyFlow
17 {
18 template <typename T, size_t N>
19 void Fill(ArrayView<T, N> a, const Vector<size_t, N>& begin,
20  const Vector<size_t, N>& end, const T& val);
21 
22 template <typename T, size_t N>
23 void Fill(ArrayView<T, N> a, const T& val);
24 
25 template <typename T>
26 void Fill(ArrayView<T, 1> a, size_t begin, size_t end, const T& val);
27 
28 template <typename T, typename U, size_t N>
29 void Copy(ArrayView<T, N> src, const Vector<size_t, N>& begin,
30  const Vector<size_t, N>& end, ArrayView<U, N> dst);
31 
32 template <typename T, typename U, size_t N>
33 void Copy(ArrayView<T, N> src, ArrayView<U, N> dst);
34 
35 template <typename T, typename U>
36 void Copy(ArrayView<T, 1> src, size_t begin, size_t end, ArrayView<U, 1> dst);
37 
52 template <typename T, typename U>
53 void ExtrapolateToRegion(ArrayView2<T> input, ArrayView2<char> valid,
54  unsigned int numberOfIterations, ArrayView2<U> output);
55 
70 template <typename T, typename U>
71 void ExtrapolateToRegion(ArrayView3<T> input, ArrayView3<char> valid,
72  unsigned int numberOfIterations, ArrayView3<U> output);
73 } // namespace CubbyFlow
74 
76 
77 #endif
void ExtrapolateToRegion(ArrayView2< T > input, ArrayView2< char > valid, unsigned int numberOfIterations, ArrayView2< U > output)
Extrapolates 2-D input data from &#39;valid&#39; (1) to &#39;invalid&#39; (0) region.
Definition: ArrayUtils-Impl.hpp:57
void Copy(ArrayView< T, N > src, const Vector< size_t, N > &begin, const Vector< size_t, N > &end, ArrayView< U, N > dst)
Definition: ArrayUtils-Impl.hpp:38
Definition: pybind11Utils.hpp:20
void Fill(ArrayView< T, N > a, const Vector< size_t, N > &begin, const Vector< size_t, N > &end, const T &val)
Definition: ArrayUtils-Impl.hpp:19