How do I locate the data of host and kernel in two different locations

I have wrote the kernel code that will be run on FPGA device. Currently, I am writing the host code which will be run on CPU. In the last meeting with my professor, he told me that the data (arrays in my case) in the host should not be located in the same memory space of that for the device. Thus, he asked me to use pointers for the data in the host part.

Actually, 1- I am not sure if I understand why the data should be in two different location.
2- how to use pointers to use different memory location.
3-bellow are the arrays in the host. Any idea how to convert these arrays into pointers?

int array_X_set[5430][20];
    int array_Y_set[5430];

    for (int i = 0; i < 5430; i++) {
        for (int j = 0; j < 20; j++)
            array_X_set[i][j] = array_X_dataset[i][j];
        array_Y_set[i] = array_Y_dataset[i];
    }

    int X_train[4344][20] = {};
    int Y_train[4344] = {};
    int X_test[1086][20] = {};
    int Y_test[1086] = {};

11 days ego. Did you already solved or is it still relevant?

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.