     // END Vector all the buy options for the product 2
 }
 
-bool areResultsValid(int *all_products_buy_options, int *best_buy_options)
-{
-   int *tmp_best_buy_options;
+bool areResultsValid(unsigned int *all_products_buy_options, unsigned int *best_buy_options)
+{
+   unsigned int *tmp_best_buy_options;
 
    getBestBuyOptions(all_products_buy_options, tmp_best_buy_options);
 
-   for (int product_iteration = 0; product_iteration < NUM_PRODUCTS * ELEMENTS_PER_BUY_OPTION; product_iteration += ELEMENTS_PER_BUY_OPTION)
+   for (unsigned int product_iteration = 0; product_iteration < NUM_PRODUCTS * ELEMENTS_PER_BUY_OPTION; product_iteration += ELEMENTS_PER_BUY_OPTION)
    {
-       int current_product_position = product_iteration * NUM_BUY_OPTIONS * ELEMENTS_PER_BUY_OPTION;
-       int current_product_store_position = current_product_position + STORE_ID_OFFSET;
-       int current_product_price_position = current_product_position + PRICE_OFFSET;
-
-       int best_store = best_buy_options[current_product_store_position];
-       int best_price = best_buy_options[current_product_price_position];
-
-       int tmp_best_store = tmp_best_buy_options[current_product_store_position];
-       int tmp_best_price = tmp_best_buy_options[current_product_price_position];
+       unsigned int current_product_position = product_iteration * NUM_BUY_OPTIONS * ELEMENTS_PER_BUY_OPTION;
+       unsigned int current_product_store_position = current_product_position + STORE_ID_OFFSET;
+       unsigned int current_product_price_position = current_product_position + PRICE_OFFSET;
+
+       unsigned int best_store = best_buy_options[current_product_store_position];
+       unsigned int best_price = best_buy_options[current_product_price_position];
+
+       unsigned int tmp_best_store = tmp_best_buy_options[current_product_store_position];
+       unsigned int tmp_best_price = tmp_best_buy_options[current_product_price_position];
 
        if (best_store != tmp_best_store || best_price != tmp_best_price)
        {

   return true;
}

void printAllProductsAllBuyOptions(int *all_products_buy_options)
{
    cout << "All products buy options:" << endl;
    for (int i = 0; i < NUM_PRODUCTS; ++i){
        cout << endl << "\tproduct_id: " << i << endl;
        for (int j = 0; j < NUM_BUY_OPTIONS*2; j += 2){
            cout << "Buy option:" << endl;
            cout << "\tstore_id: " << all_products_buy_options[i*NUM_BUY_OPTIONS*2+j] << endl;
            cout << "\tprice: " << all_products_buy_options[i*NUM_BUY_OPTIONS*2+j+1] << endl;


#define NUM_THREADS 512 // El número mínimo de threads es 32 (por el tamaño de warp) y el maximo 1024

void initAllProductsBuyOptions(unsigned int *all_products_buy_options);

void printAllProductsAllBuyOptions(unsigned int *all_products_buy_options);
void getBestBuyOptions(unsigned int *all_products_buy_options, unsigned int *best_buy_options);
void printBestBuyOptions(unsigned int *best_buy_options);

bool areResultsValid(unsigned int *all_products_buy_options, unsigned int *best_buy_options);

// ToDo: Cada thread ejecuta el kernel.
// Identificar el thread en el que estamos, en base a esto, calculamos si nos toca trabajar y, en caso afirmativo
