 void lexpr_replace_relu_bounds_specialized(expr_t** expr_array, double* lb_array, double* ub_array, const size_t num_out_neurons_last_layer, const size_t num_out_neurons_current_layer)
 {
     size_t n = blockIdx.x;
-    size_t i = threadIdx.x;
+    size_t i = blockIdx.y*blockDim.x + threadIdx.x;
 
     if(n < num_out_neurons_last_layer)
     {


// sorts an array of size_t and mirrors the same permutation to two arrays of double
__device__ __host__
void sort_sparse_expr(expr_t* const expr)
{
    const size_t length = expr->size;

    size_t* array = expr->dim;
    double* mirror_array_1 = expr->inf_coeff;
    double* mirror_array_2 = expr->sup_coeff;

    size_t* a = array;
    size_t* b = nullptr;
    double* mirror_1_a = mirror_array_1;
    double* mirror_1_b = nullptr;
    double* mirror_2_a = mirror_array_2;
    double* mirror_2_b = nullptr;

    bool sorted = true;


}


__device__ __host__
expr_t* create_dense_expr(const double* coeff, const double cst, const size_t size)
{
    expr_t* expr = (expr_t*) malloc(sizeof(expr_t));
