common.h 632 B

1234567891011121314
  1. #if !defined(TORCH_STABLE_ONLY) && !defined(TORCH_TARGET_VERSION)
  2. // Copyright (c) 2023 The pybind Community.
  3. #pragma once
  4. // Common message for `static_assert()`s, which are useful to easily
  5. // preempt much less obvious errors.
  6. #define PYBIND11_EIGEN_MESSAGE_POINTER_TYPES_ARE_NOT_SUPPORTED \
  7. "Pointer types (in particular `PyObject *`) are not supported as scalar types for Eigen " \
  8. "types."
  9. #else
  10. #error "This file should not be included when either TORCH_STABLE_ONLY or TORCH_TARGET_VERSION is defined."
  11. #endif // !defined(TORCH_STABLE_ONLY) && !defined(TORCH_TARGET_VERSION)