5#include <rexlib/core/operation/operation.hpp>
6#include <rexlib/core/operation/operation_descriptor.hpp>
7#include <rexlib/core/operation/operation_id.hpp>
10#include <rexlib/core/platform/dynamic_shared_object.h>
47template <
typename Op,
typename =
void>
50 static const char* get()
noexcept
64 return Op::get_static_descriptor();
87 if (
op.get_id() != operation_id::of<Op>())
95 return static_cast<const Op&
>(
op);
Macro definitions for supported attributes.
#define REXLIB_NORETURN
Indicates that the function does not return.
Definition attributes.hpp:32
Container for multidimensional numeric data.
Definition array.hpp:31
Immutable static description of an operation type.
Definition operation_descriptor.hpp:30
Abstract class that describes an operation.
Definition operation.hpp:23
Arrays, the operations on them and the devices that run those operations.
Definition cpu_device.hpp:10
const Op & operation_cast(const operation &op)
Downcast an operation after checking its identity.
Definition operation_cast.hpp:85
REXLIB_NORETURN void throw_unexpected_operation(const operation &got, const operation_descriptor &expected)
Report an operation that is not of the expected type.
Definition operation_cast.hpp:49