Storing Pointers to Shared in Non-UPC Environment

From: Benjamin Byington (bbyingto_at_soe_dot_ucsc_dot_edu)
Date: Wed Apr 22 2009 - 21:33:16 PDT

  • Next message: Paul H. Hargrove: "Re: Storing Pointers to Shared in Non-UPC Environment"
    Hello:
    
    First, I'm new to both UPC and this mailing list, so please forgive me if my ignorance is showing:)
    
    I'm currently writing a mixed language program with UPC to handle the communication between processors.  (The rest being in C++)  Throughout program execution, I have various packets of data that are sitting around for later use, but it is not known in advance how long they will sit or even which processor will eventually need it.  As a result one of the processors maintains a data structure to orchestrate everything and keep track of all the little packets.  I would greatly prefer the data structure and the code manipulating it to be written in C++, but this structure would need to record pointers to the data packets.  I understand that C++ of course cannot use anything that uses the shared keyword anywhere, but I was hoping that somehow I could store the pointers to shared as 64 bytes of anonymous data.  Then my C++ code would be able to store and copy and eventually deliver it to an arbitrary thread, where some UPC could could then treat it like a shared pointer again and!
      access the data.  Unfortunately I've not been able to do this, does anyone know of a way?
    
    Much thanks
    
    Ben Byington
    

  • Next message: Paul H. Hargrove: "Re: Storing Pointers to Shared in Non-UPC Environment"