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

Function is_tensor_aligned

include/pybind11/eigen/tensor.h:39–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37PYBIND11_NAMESPACE_BEGIN(detail)
38
39inline bool is_tensor_aligned(const void *data) {
40 return (reinterpret_cast<std::size_t>(data) % EIGEN_DEFAULT_ALIGN_BYTES) == 0;
41}
42
43template <typename T>
44constexpr int compute_array_flag_from_tensor() {

Callers 2

loadFunction · 0.85
loadMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected