How can a C application work on multiple cores with gem5? -


i new gem5 simulator. have c application want make run faster. first thing i've done optimize using several techniques loop unrolling , simd. , next step, intend make work on multiple cores (x86 , arm) must use gem5 simulator.

the application radix4 computing. i've succeeded make work on 1 core systems x86 , arm but, want make work on 4, 16, ... cores x86 or arm.

could give me hints or show me right way this? thank

this global idea application

void init_twiddle(int n) {   int i;   for(i=0; i<twiddle_limit; i++)   {    /*filling twiddle table*/   } }  void init_lut(int n) {   lut_n2 = malloc((1+pmax)*sizeof(int*));   (i=0; <= pmax; i++){     (j=0; j < n; j++)     /*calculate radix parametrs , put them in table*/   } }  void bit_r4_reorder(float* x, float* y, int n) { /*bit reordering after calculating radix4*/ }  void radix4(float *x,float *y, int n) { /*function radix4 computing*/ }  int main() { /*calling previous functions*/  } 

the application doesn't know it's being run on simulated system, can treat gem5 real system achieve goal. i.e., using openmp or mpi.

if system being modeled has these libraries (openmp or mpi) installed these libraries should work in theory.


Comments