Tensor4D(ShapeT shape) :
   _shape(shape),
   _data(reinterpret_cast<T*>(ALLOCATE(size_bytes()))) {
     Clear();
 }
Exemple #2
0
 constexpr index_type length_bytes() const noexcept { return size_bytes(); }
Exemple #3
0
 void reserved(GLsizeiptr size) noexcept
 {
   size_ = size;
   bind();
   glBufferData(target, size_bytes(), nullptr, usage);
 }
Exemple #4
0
 void data(gsl::span<const data_type> cont) noexcept
 {
   size_ = cont.size();
   bind();
   glBufferData(target, size_bytes(), cont.data(), usage);
 }
ssize_t PackedAudioPacket<T>::read_from_fd(int fd) {
    return read_all(fd, _data, size_bytes( ));
}
ssize_t PackedAudioPacket<T>::write_to_fd(int fd) {
    return write_all(fd, _data, size_bytes( ));
}