Click here to Skip to main content
15,881,588 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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] = {};


What I have tried:

not sure how to get this point, so I need ideas from experts
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900