#pragma once #include #include #include #include #include #include #include "ray/core.h" namespace ray { namespace api { struct MemberFunctionPtrHolder { uintptr_t value[2]; }; struct RemoteFunctionPtrHolder { /// The remote function pointer uintptr_t function_pointer; /// The executable function pointer uintptr_t exec_function_pointer; }; class RayRuntime { public: virtual ObjectID Put(std::shared_ptr data) = 0; virtual std::shared_ptr Get(const ObjectID &id) = 0; virtual std::vector> Get( const std::vector &ids) = 0; virtual WaitResult Wait(const std::vector &ids, int num_objects, int timeout_ms) = 0; virtual ObjectID Call(RemoteFunctionPtrHolder &fptr, std::shared_ptr args) = 0; virtual ActorID CreateActor(RemoteFunctionPtrHolder &fptr, std::shared_ptr args) = 0; virtual ObjectID CallActor(const RemoteFunctionPtrHolder &fptr, const ActorID &actor, std::shared_ptr args) = 0; }; } // namespace api } // namespace ray