[datarepo] Add function to read and write sparse tensors accepted/tizen/unified/20230727.173058
authorhyunil park <hyunil46.park@samsung.com>
Mon, 10 Jul 2023 06:37:18 +0000 (15:37 +0900)
committerSangjung Woo <again4you@gmail.com>
Wed, 26 Jul 2023 07:54:24 +0000 (16:54 +0900)
commit9bb82c93982a1609d34bb544a38ad2fd04c65006
tree5c6c830b5b16c7d7b0c56f63f942e7e9d0515aaf
parentba7727823f7c5487eabd311aa7337486bba268dd
[datarepo] Add function to read and write sparse tensors

- Add writing sparse tensors to datareposink
  To add memory to gstbuffer by number of sparse tensors when reading a sample in datareposrc,
  sample_offset, tensor_size, and tensor_count fields are added to the JSON file
- Add reading sparse tensors to datareposrc
  If the tensor format of JSON file is sparse, read a sample using the JSON meta information
  (sample_offset, tensor_size, tensor_count) and append memory to GstBuffer as many as the number
  of sparse tensors.
- Add unit test
- bug fix about shuffle index

Signed-off-by: hyunil park <hyunil46.park@samsung.com>
gst/datarepo/gstdatareposink.c
gst/datarepo/gstdatareposink.h
gst/datarepo/gstdatareposrc.c
gst/datarepo/gstdatareposrc.h
tests/nnstreamer_datarepo/unittest_datareposink.cc
tests/nnstreamer_datarepo/unittest_datareposrc.cc