43 SizeVector(
const std::initializer_list<int64_t>& dim_sizes)
44 :
std::vector<int64_t>(dim_sizes) {}
47 :
std::vector<int64_t>(dim_sizes) {}
51 explicit SizeVector(int64_t n, int64_t initial_value = 0)
52 :
std::vector<int64_t>(n, initial_value) {}
54 template <
class InputIterator>
56 :
std::vector<int64_t>(first, last) {}
61 static_cast<std::vector<int64_t>*
>(
this)->
operator=(v);
66 static_cast<std::vector<int64_t>*
>(
this)->
operator=(v);
71 if (this->
size() == 0) {
74 return std::accumulate(
75 this->begin(), this->end(), 1LL,
76 [
this](
const int64_t& lhs,
const int64_t& rhs) -> int64_t {
77 if (lhs < 0 || rhs < 0) {
79 "Shape {} cannot contain negative dimensions.",
82 return std::multiplies<int64_t>()(lhs, rhs);
SizeVector()
Definition: SizeVector.h:58
SizeVector & operator=(SizeVector &&v)
Definition: SizeVector.h:65
void LogError(const char *format, const Args &... args)
Definition: Console.h:176
SizeVector(int64_t n, int64_t initial_value=0)
Definition: SizeVector.h:51
Definition: Optional.h:922
SizeVector(const SizeVector &other)
Definition: SizeVector.h:49
Definition: SizeVector.h:41
int size
Definition: FilePCD.cpp:59
std::string ToString() const
Definition: SizeVector.h:86
int64_t NumElements() const
Definition: SizeVector.h:70
SizeVector(const std::vector< int64_t > &dim_sizes)
Definition: SizeVector.h:46
SizeVector(InputIterator first, InputIterator last)
Definition: SizeVector.h:55
Definition: PinholeCameraIntrinsic.cpp:35
filament::Texture::InternalFormat format
Definition: FilamentResourceManager.cpp:191
SizeVector & operator=(const SizeVector &v)
Definition: SizeVector.h:60
SizeVector(const std::initializer_list< int64_t > &dim_sizes)
Definition: SizeVector.h:43