Skip to content

Commit

Permalink
Fixes to concrete buffer types to support reader cast operation.
Browse files Browse the repository at this point in the history
  • Loading branch information
cnuernber committed Oct 12, 2020
1 parent 531ab9c commit 1445b4f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/tech/v3/datatype/array_buffer.clj
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,8 @@
dtype-proto/PEndianness
(endianness [item] :little-endian)
dtype-proto/PElemwiseReaderCast
(elemwise-reader-cast [item new-dtype] cached-io)
(elemwise-reader-cast [item new-dtype]
(or cached-io (dtype-proto/->reader item)))
dtype-proto/PToArrayBuffer
(convertible-to-array-buffer? [item] true)
(->array-buffer [item] item)
Expand Down
3 changes: 2 additions & 1 deletion src/tech/v3/datatype/native_buffer.clj
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,8 @@
dtype-proto/PElemwiseDatatype
(elemwise-datatype [this] datatype)
dtype-proto/PElemwiseReaderCast
(elemwise-reader-cast [item new-dtype] cached-io)
(elemwise-reader-cast [item new-dtype]
(or cached-io (dtype-proto/->reader item)))
dtype-proto/PDatatype
(datatype [this] :native-buffer)
dtype-proto/PECount
Expand Down

0 comments on commit 1445b4f

Please sign in to comment.