mlx-sys 0.0.10-alpha

Rust bindings for mlx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include "mlx-cxx/mlx_cxx.hpp"

namespace mlx_cxx {
    std::variant<std::monostate, mlx::core::Stream, mlx::core::Device> StreamOrDevice::to_variant() {
        switch (tag) {
            case StreamOrDevice::Tag::Default:
                return payload.default_payload;
            case StreamOrDevice::Tag::Stream:
                return payload.stream;
            case StreamOrDevice::Tag::Device:
                return payload.device;
        }
    }
}