\brief Return a writable pointer to the buffer's data The buffer has to be a mutable CPU buffer (`is_cpu()` and `is_mutable()` are true). Otherwise, an assertion may be thrown or a null pointer may be returned. To get the buffer's mutable data address regardless of its device, call `mutable_address()`.
| 249 | /// To get the buffer's mutable data address regardless of its device, call |
| 250 | /// `mutable_address()`. |
| 251 | uint8_t* mutable_data() { |
| 252 | #ifndef NDEBUG |
| 253 | CheckCPU(); |
| 254 | CheckMutable(); |
| 255 | #endif |
| 256 | return ARROW_PREDICT_TRUE(is_cpu_ && is_mutable_) ? const_cast<uint8_t*>(data_) |
| 257 | : NULLPTR; |
| 258 | } |
| 259 | |
| 260 | /// \brief Return a writable pointer to the buffer's data cast to a specific type |
| 261 | /// |
no outgoing calls
no test coverage detected