Selected Documentation for Messaging-Cells Library
Addressing features

Module describing addressing convertion functions. More...

Module describing addressing convertion functions.

Addressing is handled with the help of macros and functions that help to map beetween the different kinds of addressing of the Epiphany architecture.

Whether it is:

The most used functions are in files shared_eph3.h and shared.h

Implicit addressing symmetry

In the examples it is used an implicit symmetry: The fact that two objects that are allocated in exactly the same order in different workerus have the same local address.

For example when in the mc_workerus_main function of the philo.cpp program, the line:

    philo_workeru* workeru_dat = philo_workeru::acquire_alloc();

allocates a global 'workeru_dat' variable it is done in every workeru, so all data inside will have the same local address in every workeru.

So the macro glb_stick will return the same local pointer in every workeru and that is why by calling mc_addr_set_id with it and the id of another workeru as in the macro get_stick the chopstick of an other workeru can be addressed in orther to send it missive s. The same happens for glb_philo.