merge conflicts

This commit is contained in:
CaCO3
2023-04-23 16:44:19 +02:00
8 changed files with 94 additions and 1 deletions

View File

@@ -258,7 +258,11 @@ bool CTfLiteClass::ReadFileToModel(std::string _fn)
LogFile.WriteHeapInfo("CTLiteClass::Alloc modelfile start");
#endif
<<<<<<< HEAD
modelfile = (unsigned char*)psram_get_shared_model_memory();
=======
modelfile = (unsigned char*)malloc_psram_heap(std::string(TAG) + "->modelfile", size, MALLOC_CAP_SPIRAM);
>>>>>>> master
if(modelfile != NULL)
{
@@ -311,9 +315,15 @@ CTfLiteClass::CTfLiteClass()
this->modelfile = NULL;
this->interpreter = nullptr;
this->input = nullptr;
<<<<<<< HEAD
this->output = nullptr;
this->kTensorArenaSize = TENSOR_ARENA_SIZE;
this->tensor_arena = (uint8_t*)psram_get_shared_tensor_arena_memory();
=======
this->output = nullptr;
this->kTensorArenaSize = 800 * 1024; /// according to testfile: 108000 - so far 600;; 2021-09-11: 200 * 1024
this->tensor_arena = (uint8_t*)malloc_psram_heap(std::string(TAG) + "->tensor_arena", kTensorArenaSize, MALLOC_CAP_SPIRAM);
>>>>>>> master
}
@@ -322,7 +332,12 @@ CTfLiteClass::~CTfLiteClass()
delete this->interpreter;
delete this->error_reporter;
<<<<<<< HEAD
psram_free_shared_tensor_arena_and_model_memory();
=======
free_psram_heap(std::string(TAG) + "->modelfile", modelfile);
free_psram_heap(std::string(TAG) + "->tensor_arena", this->tensor_arena);
>>>>>>> master
}