Loading...
Searching...
No Matches
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
15
16namespace CubbyFlow
17{
18template <typename T, size_t N>
19void Fill(ArrayView<T, N> a, const Vector<size_t, N>& begin,
20 const Vector<size_t, N>& end, const T& val);
21
22template <typename T, size_t N>
23void Fill(ArrayView<T, N> a, const T& val);
24
25template <typename T>
26void Fill(ArrayView<T, 1> a, size_t begin, size_t end, const T& val);
27
28template <typename T, typename U, size_t N>
29void Copy(ArrayView<T, N> src, const Vector<size_t, N>& begin,
31
32template <typename T, typename U, size_t N>
34
35template <typename T, typename U>
36void Copy(ArrayView<T, 1> src, size_t begin, size_t end, ArrayView<U, 1> dst);
37
52template <typename T, typename U>
55
70template <typename T, typename U>
73} // namespace CubbyFlow
74
76
77#endif
Definition pybind11Utils.hpp:21
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
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
Matrix< T, Rows, 1 > Vector
Definition Matrix.hpp:738
void ExtrapolateToRegion(ArrayView2< T > input, ArrayView2< char > valid, unsigned int numberOfIterations, ArrayView2< U > output)
Extrapolates 2-D input data from 'valid' (1) to 'invalid' (0) region.
Definition ArrayUtils-Impl.hpp:57