I have some functions It has been writen in C I would like to use par statment in some of these functions any idea how to call par statement in C function. I have functions where they are located in .c file whereas I call these functions in .xc file but I need to perform some parallelization in these functions.
Another things it would be highly appreciated if somebody could help me solving the below error
cannot declare array of aliasing pointers
How to use par statment in C function
-
- Member++
- Posts: 19
- Joined: Sun Mar 23, 2014 9:51 pm
-
Verified
- Respected Member
- Posts: 347
- Joined: Wed Jan 27, 2016 5:21 pm
Hi Malbahri,
Can you call an XC function where you want the parallelisation and go back to C from there?
Cheers,
Henk
Can you call an XC function where you want the parallelisation and go back to C from there?
Cheers,
Henk
-
- Member++
- Posts: 19
- Joined: Sun Mar 23, 2014 9:51 pm
Dear Henk,
Thanks a lot for your reply. Will you please kindly provide some example for your suggestion
Thanks a lot for your reply. Will you please kindly provide some example for your suggestion
-
Verified
- XCore Legend
- Posts: 1185
- Joined: Thu Dec 10, 2009 9:20 pm
- Location: Bristol, UK
I think henk is talking about wrapping your C functions in an XC that does the par.. i.e.
example_c_file.c:
example_xc_file.xc:
example_c_file.c:
Code: Select all
void main()
{
// Returns when both c_func_1() and c_func_2() complete
an_xc_function();
}
void c_func_1();
{
}
void c_func_2();
{
}
Code: Select all
void an_xc_function()
{
par{
c_func_1();
c_func_2();
}
}