! * \brief max number of elements within representation * * The total size of the tensor (in bytes) should not exceed size_t range. */
| 462 | * The total size of the tensor (in bytes) should not exceed size_t range. |
| 463 | */ |
| 464 | size_t max_elements() const { |
| 465 | if (m_trait->low_bit != 0) |
| 466 | return std::numeric_limits<size_t>::max(); |
| 467 | |
| 468 | return std::numeric_limits<size_t>::max() >> m_trait->size_log; |
| 469 | } |
| 470 | |
| 471 | size_t low_bit() const { return m_trait->low_bit; } |
| 472 |