1
0
Fork 0
mirror of https://github.com/hermitcore/libhermit.git synced 2025-03-09 00:00:03 +01:00

prepare (i)RCCE to support OpenMP on HermitCore

HermitCore isn't able to support the SCC emulator

=> disable emulator specific details (OpenMP staff)
=> OpenMP applications on HermitCore are able to use iRCCE
=> ATTENTION: (i)RCCE isn't thread-safe
This commit is contained in:
Stefan Lankes 2015-10-18 12:42:20 +02:00
parent ffd52cb8fa
commit 4805d4d8ce
4 changed files with 14 additions and 7 deletions

View file

@ -24,6 +24,10 @@
// by Carsten Clauss, Chair for Operating Systems,
// RWTH Aachen University
//
// [2015-10-18] port (i)RCCE to "HermitCore"
// by Stefan Lankes, Institute for Automation of Complex Power Systems
// RWTH Aachen University
#ifndef RCCE_H
#define RCCE_H
@ -45,7 +49,7 @@
#define ABS(x) ((x > 0)?x:-x)
#ifndef _OPENMP
#if !defined(_OPENMP) || defined(__hermit__)
#define RCCE_APP main
#endif
@ -364,7 +368,7 @@ extern RCCE_COMM RCCE_P_COMM;
#define RCCE_POWER_DEFAULT -99999
#endif
#ifdef _OPENMP
#if defined(_OPENMP) && !defined(__hermit__)
#pragma omp threadprivate (RCCE_COMM_WORLD)
#ifdef RC_POWER_MANAGEMENT
#pragma omp threadprivate (RCCE_P_COMM)

View file

@ -16,7 +16,7 @@
#ifndef RCCE_LIB_H
#define RCCE_LIB_H
#include "RCCE.h"
#ifdef _OPENMP
#if defined(_OPENMP) && !defined(__hermit__)
#include <omp.h>
#endif
#include <string.h>
@ -349,7 +349,7 @@ t_vcharp RC_FLAG_BUFFER_START(int);
#endif
#endif
#ifdef _OPENMP
#if defined(_OPENMP) && !defined(__hermit__)
#pragma omp threadprivate (RC_COREID, RC_MY_COREID, RC_REFCLOCKGHZ)
#pragma omp threadprivate (RCCE_comm_buffer)
#pragma omp threadprivate (RCCE_BUFF_SIZE)

View file

@ -49,6 +49,9 @@
// by Carsten Clauss, Chair for Operating Systems,
// RWTH Aachen University
//
// [2015-10-18] port (i)RCCE to "HermitCore"
// by Stefan Lankes, Institute for Automation of Complex Power Systems
// RWTH Aachen University
#ifndef IRCCE_H
#define IRCCE_H
@ -70,7 +73,7 @@ extern const int iRCCE_ANY_LENGTH;
#endif
#if !defined(SINGLEBITFLAGS)
#ifdef _OPENMP
#if defined(_OPENMP) && !defined(__hermit__)
#define iRCCE_MAX_TAGGED_LEN (RCCE_LINE_SIZE - 2 * sizeof(int))
#else
#define iRCCE_MAX_TAGGED_LEN (RCCE_LINE_SIZE - sizeof(int))
@ -145,7 +148,7 @@ typedef struct _iRCCE_WAIT_LIST {
#ifdef AIR
typedef volatile struct _iRCCE_AIR {
#ifndef _OPENMP
#if !defined(_OPENMP) || defined(__hermit__)
int * counter;
int * init;
#else

View file

@ -51,7 +51,7 @@ extern iRCCE_RECV_REQUEST* iRCCE_irecv_any_source_queue;
extern int iRCCE_recent_source;
extern int iRCCE_recent_length;
#ifdef _OPENMP
#if defined(_OPENMP) && !defined(__hermit__)
#pragma omp threadprivate (iRCCE_isend_queue, iRCCE_irecv_queue, iRCCE_irecv_any_source_queue, iRCCE_recent_source, iRCCE_recent_length)
#endif