 }
 
 
-void print_sizes(fppoly_t* fp, const size_t layerno)
+size_t predict_size(fppoly_t* fp, const size_t layerno)
 {
     size_t free;
     size_t total;


    std::chrono::duration<double> elapsed_seconds = end - start;
    std::cout << "elapsed time: " << elapsed_seconds.count() << "s" << std::endl << std::endl;
}




        std::cout << "Size: " << current_size << " bytes" << std::endl;

        if(4*(last_size + current_size) > maximum_size)
        {
            maximum_size = 4*(last_size + current_size);
        }
    }

    size_t num_chunks = 1;

    while(maximum_size > free)
    {
        maximum_size /= 2;
        num_chunks *= 2;
    }

    if(num_chunks > 1)
    {
        std::cout << "Number of chunks " << num_chunks << std::endl;
    }

    return num_chunks;
}


void update_state_using_previous_layers_conv_chunk(elina_manager_t* man, fppoly_t* fp, const size_t layerno, const size_t num_chunks, const size_t chunk_counter)
{
    auto start = std::chrono::system_clock::now();

    fppoly_internal_t* pr = fppoly_init_from_manager(man, ELINA_FUNID_ASSIGN_LINEXPR_ARRAY);

    const size_t x_y_size_last_layer = fp->layers[layerno]->output_size[0]*fp->layers[layerno]->output_size[1];
    const size_t num_filters_last_layer = fp->layers[layerno]->output_size[2]/num_chunks;

    std::cout << "num_out_neurons_last " << x_y_size_last_layer*num_filters_last_layer << std::endl;

