Files
2017-10-26 19:57:24 +02:00

49 lines
1.5 KiB
C
Executable File

#ifndef MOC_INTERNAL_ADDRESS_MACROS_PPU_H_
#define MOC_INTERNAL_ADDRESS_MACROS_PPU_H_
#include "../imoc_macros.h"
/**
* \addtogroup internal_am
**/
//@{
/**
* @name PPU-only
**/
//@{
/**
* LS-Address of own remote queue at node 'rank'.
*
* Address is of type uint32_t.
**/
#define IMOC_LS_REMOTE_QUEUE(proc) ( (proc > node_handle.rank) ? moc_spu_thread_list[proc-moc_ppu_thread_count].queue_base_in_ls+sizeof(moc_message_envelope_t)*node_handle.queue_size*node_handle.rank : moc_spu_thread_list[proc-moc_ppu_thread_count].queue_base_in_ls+sizeof(moc_message_envelope_t)*node_handle.queue_size*(node_handle.rank-1) )
/**
* LS-Address of own remote queue-entry at node 'rank'.
*
* Address is of type uint32_t.
**/
#define IMOC_LS_REMOTE_QUEUE_ENTRY(proc, index) ( (proc > node_handle.rank) ? moc_spu_thread_list[proc-moc_ppu_thread_count].queue_base_in_ls+sizeof(moc_message_envelope_t)*node_handle.queue_size*node_handle.rank+sizeof(moc_message_envelope_t)*(index) : moc_spu_thread_list[proc-moc_ppu_thread_count].queue_base_in_ls+sizeof(moc_message_envelope_t)*node_handle.queue_size*(node_handle.rank-1)+sizeof(moc_message_envelope_t)*(index) )
/**
* Effective Address of remote status-array entry at node 'rank'.
*
* Address is of type uint32_t
**/
#define IMOC_LS_REMOTE_STATUS_ENTRY(id, rank) ( moc_spu_thread_list[rank-moc_ppu_thread_count].status_base_in_ls+sizeof(moc_message_status_t)*(id) )
//@}
//@}
#endif /*MOC_INTERNAL_ADDRESS_MACROS_PPU_H_*/