Skip to content
Snippets Groups Projects
Commit c24bd652 authored by Thibault Allenet's avatar Thibault Allenet
Browse files

Change argument type from size_t to std::size_t in DataProvider

parent a3c90cca
No related branches found
No related tags found
2 merge requests!105version 0.2.0,!4Dataloader
......@@ -20,14 +20,14 @@ public:
* @param database database from which to load the data.
* @param batchSize number of data samples per batch.
*/
DataProvider(Database& database, size_t batchSize);
DataProvider(Database& database, std::size_t batchSize);
/**
* @brief Create a batch for each data modality in the database. The returned batch contain the data as sorted in the database.
* @param startIndex the starting index in the database to start the batch from.
* @return a vector of tensors. Each tensor is a batch corresponding to one modality.
*/
std::vector<std::shared_ptr<Tensor>> readBatch(size_t startIndex);
std::vector<std::shared_ptr<Tensor>> readBatch(std::size_t startIndex);
protected:
......@@ -35,7 +35,7 @@ protected:
Database& mDatabase;
size_t mNumberModality;
std::vector<std::vector<size_t>> mDataSizes;
std::vector<std::vector<std::size_t>> mDataSizes;
std::vector<std::string> mDataBackends;
std::vector<DataType> mDataTypes;
......
......@@ -4,7 +4,7 @@
using namespace Aidge;
DataProvider::DataProvider(Database& database, size_t batchSize)
DataProvider::DataProvider(Database& database, std::size_t batchSize)
:
mDatabase(database),
mBatchSize(batchSize)
......@@ -22,7 +22,7 @@ DataProvider::DataProvider(Database& database, size_t batchSize)
}
}
std::vector<std::shared_ptr<Tensor>> DataProvider::readBatch(size_t startIndex)
std::vector<std::shared_ptr<Tensor>> DataProvider::readBatch(std::size_t startIndex)
{
assert((startIndex) <= mDatabase.getLen() && " DataProvider readBatch : database fetch out of bounds");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment