\brief Return a pointer to the buffer's data The buffer has to be a CPU buffer (`is_cpu()` is true). Otherwise, an assertion may be thrown or a null pointer may be returned. To get the buffer's data address regardless of its device, call `address()`.
| 266 | /// |
| 267 | /// To get the buffer's data address regardless of its device, call `address()`. |
| 268 | const uint8_t* data() const { |
| 269 | #ifndef NDEBUG |
| 270 | CheckCPU(); |
| 271 | #endif |
| 272 | return ARROW_PREDICT_TRUE(is_cpu_) ? data_ : NULLPTR; |
| 273 | } |
| 274 | |
| 275 | /// \brief Return a pointer to the buffer's data cast to a specific type |
| 276 | /// |