MCPcopy Create free account
hub / github.com/pybind/pybind11 / compute_array_flag_from_tensor

Function compute_array_flag_from_tensor

include/pybind11/eigen/tensor.h:44–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42
43template <typename T>
44constexpr int compute_array_flag_from_tensor() {
45 static_assert((static_cast<int>(T::Layout) == static_cast<int>(Eigen::RowMajor))
46 || (static_cast<int>(T::Layout) == static_cast<int>(Eigen::ColMajor)),
47 "Layout must be row or column major");
48 return (static_cast<int>(T::Layout) == static_cast<int>(Eigen::RowMajor)) ? array::c_style
49 : array::f_style;
50}
51
52template <typename T>
53struct eigen_tensor_helper {};

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected