compiler_gym/service/proto

Proto.h

#include "compiler_gym/service/proto/Proto.h"

namespace compiler_gym
struct SpaceContainsEventChecker
#include <Proto.h>

Checks whether an Event is contained inside a Space.

This is analogous to the gym.spaces.Space.contains(...) method.

Upon receiving and action in the service backend this class can be used to check against the service action space if it is a valid action.

Public Types

using TypeIdFuncMap = std::unordered_map<std::string, std::function<bool(const Space&, const Event&, bool, const Context&)>>

Public Functions

bool contains(const Space &space, const Event &event, bool errorOnFalse = false) const
void checkContains(const Space &space, const Event &event) const
inline Context &context()
inline const Context &context() const

Private Members

Context ctx_
struct Context
#include <Proto.h>

Public Members

TypeIdFuncMap typeIdFuncMap