@@ -56,31 +56,30 @@ class DRAMStorePy : public DRAMStore {
5656 size_t Load (const py::list& blockIds, const py::list& offsets, const py::list& addresses,
5757 const py::list& lengths)
5858 {
59- return this ->SubmitPy (blockIds, offsets, addresses, lengths, CCStore:: Task::Type::LOAD,
60- CCStore:: Task::Location::DEVICE, " DRAM::H2D" );
59+ return this ->SubmitPy (blockIds, offsets, addresses, lengths, Task::Type::LOAD,
60+ Task::Location::DEVICE, " DRAM::H2D" );
6161 }
6262 size_t Dump (const py::list& blockIds, const py::list& offsets, const py::list& addresses,
6363 const py::list& lengths)
6464 {
65- return this ->SubmitPy (blockIds, offsets, addresses, lengths, CCStore:: Task::Type::DUMP,
66- CCStore:: Task::Location::DEVICE, " DRAM::D2H" );
65+ return this ->SubmitPy (blockIds, offsets, addresses, lengths, Task::Type::DUMP,
66+ Task::Location::DEVICE, " DRAM::D2H" );
6767 }
6868
6969private:
7070 size_t SubmitPy (const py::list& blockIds, const py::list& offsets, const py::list& addresses,
71- const py::list& lengths, const CCStore:: Task::Type type,
72- const CCStore::Task::Location location, const std::string& brief)
71+ const py::list& lengths, Task::Type&& type, Task::Location&& location ,
72+ std::string& & brief)
7373 {
74- CCStore:: Task task{type, location, brief};
74+ Task task{std::move ( type), std::move ( location), std::move ( brief) };
7575 auto blockId = blockIds.begin ();
7676 auto offset = offsets.begin ();
7777 auto address = addresses.begin ();
7878 auto length = lengths.begin ();
7979 while ((blockId != blockIds.end ()) && (offset != offsets.end ()) &&
8080 (address != addresses.end ()) && (length != lengths.end ())) {
81- auto ret = task.Append (blockId->cast <std::string>(), offset->cast <size_t >(),
82- address->cast <uintptr_t >(), length->cast <size_t >());
83- if (ret != 0 ) { return CCStore::invalidTaskId; }
81+ task.Append (blockId->cast <std::string>(), offset->cast <size_t >(),
82+ address->cast <uintptr_t >(), length->cast <size_t >());
8483 blockId++;
8584 offset++;
8685 address++;
0 commit comments