Bug #1081: Report an error on command-line flags that expect a wholly-missing integer...
[charm.git] / examples / charm++ / cell / OffloadAPI / hello / hello_shared.cpp
blob6f8882016eb06213dc5bf8cb0f2e3d958c49de0d
1 #include <stdio.h>
2 #include "spert.h"
3 #include "hello_shared.h"
5 inline void sayHi(char* msg) {
6 printf("\"%s\" from SPE %d...\n",
7 msg, (int)getSPEID());
10 #ifdef __cplusplus
11 extern "C"
12 #endif
13 void funcLookup(int funcIndex,
14 void* readWritePtr, int readWriteLen,
15 void* readOnlyPtr, int readOnlyLen,
16 void* writeOnlyPtr, int writeOnlyLen,
17 DMAListEntry* dmaList) {
19 switch (funcIndex) {
21 case SPE_FUNC_INDEX_INIT: break;
22 case SPE_FUNC_INDEX_CLOSE: break;
24 case FUNC_SAYHI:
25 sayHi((char*)readOnlyPtr);
26 break;
28 default:
29 printf("ERROR :: Invalid funcIndex (%d)\n",
30 funcIndex);
31 break;