|
[Sponsors] |
June 11, 2013, 09:20 |
size=THREAD_N_ELEMENTS_INT(thread);
|
#1 |
New Member
HAN HAN
Join Date: Jun 2013
Posts: 1
Rep Power: 0 |
Hello,everyone!
I am an Aisan student learning the UDF on parallel compute.Honestly,it is hard for me knowing C language liitle and the problem confusing me over days.They are : 1.How to use the "compute_node_loop_not_zero*(pe);"and "size=THREAD_N_ELEMENTS_INT(thread);".I read them from the manual help. 2.These are the codes that I write. There may be some problems.Please help me modify them. Thanks a lot! #if PARALLEL float *array; int pe; int size;/*data passing variables*/ #endif/*PARALLEL*/ #if RP_NODE float f[16]; array=(float*)malloc(16*sizeof(float)); array=f; pe=(I_AM_NODE_ZERO_P)?node_host:node_zero; PRF_CSEND_FLOAT(pe,array,16,myid); free(array); if(I_AM_NODE_ZERO_P) compute_node_loop_not_zero(pe) { array=(float*)malloc(16*sizeof(float)); PRF_CRECV_FLOAT(pe,array,16,pe); PRF_CSEND_FLOAT(node_host,array,16,myid); free((char*)array); } #endif/*RP_NODE*/ |
|
|
|