Arrays of tasks

Technical questions regarding the xTIMEcomposer, xSOFTip Explorer and Programming with XMOS.
Experienced Member
Posts: 67
Joined: Fri Oct 05, 2018 4:26 pm

Arrays of tasks

Postby RedDave » Thu Feb 21, 2019 10:28 am

Suppose I have a task that receives a variable sized array of ports and/or interfaces.

Now suppose I need to launch one parallel task for each of these.

Code: Select all

void task(server interface if i[N], in port p[N], static const size_t N)
    subtask(i[0], p[0], 0);
    subtask(i[1], p[1], 1);
    subtask(i[N-1], p[N-1], N-1);
Is there a notation for doing this?
I'm at a loss for what words to use when searching for it.

User avatar
Respected Member
Posts: 419
Joined: Thu Nov 26, 2015 11:47 pm

Postby akp » Fri Feb 22, 2019 12:18 am

Who is online

Users browsing this forum: No registered users and 4 guests