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