This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Foreign.Ptr | |
| import Foreign.Storable | |
| import Foreign.Marshal.Array | |
| {-@ type PtrLen a n = {v:Ptr a | plen v = n && 0 <= pbase v && 0 <= plen v} @-} | |
| {-@ withArray :: Storable a => x:[a] -> (PtrLen a (len x) -> IO b) -> IO b @-} | |
| {-@ withConstArray :: Storable a => a -> n:Nat -> (PtrLen a n -> IO b) -> IO b @-} | |
| withConstArray x n = withArray (replicate n x) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM centos | |
| ADD tapir.tgz /usr/ | |
| ADD hello /tapir/hello | |
| RUN yum update -y && yum install -y libcilkrts libedit gcc make | |
| RUN ln -s /usr/lib64/libcilkrts.so.5 /usr/lib/libcilkrts.so | |
| CMD [ "/bin/bash" ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include<optional> | |
| #include<vector> | |
| #include<iostream> | |
| using namespace std; | |
| enum opCode { | |
| start, // start loc | |
| send, // send instrResult loc | |
| mix // mix instrResult instrResult | |
| }; |
OlderNewer