Sha256: 5f81d646f531de399f63457758cd313e71d4d48c605fc0cab2894421b2986957

Contents?: true

Size: 1.8 KB

Versions: 17

Compression:

Stored size: 1.8 KB

Contents

#include <torch/torch.h>
#include <rice/Object.hpp>
#include "templates.hpp"

Object wrap(std::tuple<torch::Tensor, torch::Tensor> x) {
  Array a;
  a.push(to_ruby<torch::Tensor>(std::get<0>(x)));
  a.push(to_ruby<torch::Tensor>(std::get<1>(x)));
  return Object(a);
}

Object wrap(std::tuple<torch::Tensor, torch::Tensor, torch::Tensor> x) {
  Array a;
  a.push(to_ruby<torch::Tensor>(std::get<0>(x)));
  a.push(to_ruby<torch::Tensor>(std::get<1>(x)));
  a.push(to_ruby<torch::Tensor>(std::get<2>(x)));
  return Object(a);
}

Object wrap(std::tuple<torch::Tensor, torch::Tensor, torch::Tensor, torch::Tensor> x) {
  Array a;
  a.push(to_ruby<torch::Tensor>(std::get<0>(x)));
  a.push(to_ruby<torch::Tensor>(std::get<1>(x)));
  a.push(to_ruby<torch::Tensor>(std::get<2>(x)));
  a.push(to_ruby<torch::Tensor>(std::get<3>(x)));
  return Object(a);
}

Object wrap(std::tuple<torch::Tensor, torch::Tensor, torch::Tensor, torch::Tensor, torch::Tensor> x) {
  Array a;
  a.push(to_ruby<torch::Tensor>(std::get<0>(x)));
  a.push(to_ruby<torch::Tensor>(std::get<1>(x)));
  a.push(to_ruby<torch::Tensor>(std::get<2>(x)));
  a.push(to_ruby<torch::Tensor>(std::get<3>(x)));
  a.push(to_ruby<torch::Tensor>(std::get<4>(x)));
  return Object(a);
}

Object wrap(std::tuple<torch::Tensor, torch::Tensor, torch::Tensor, int64_t> x) {
  Array a;
  a.push(to_ruby<torch::Tensor>(std::get<0>(x)));
  a.push(to_ruby<torch::Tensor>(std::get<1>(x)));
  a.push(to_ruby<torch::Tensor>(std::get<2>(x)));
  a.push(to_ruby<int64_t>(std::get<3>(x)));
  return Object(a);
}

Object wrap(std::tuple<torch::Tensor, torch::Tensor, double, int64_t> x) {
  Array a;
  a.push(to_ruby<torch::Tensor>(std::get<0>(x)));
  a.push(to_ruby<torch::Tensor>(std::get<1>(x)));
  a.push(to_ruby<double>(std::get<2>(x)));
  a.push(to_ruby<int64_t>(std::get<3>(x)));
  return Object(a);
}

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
torch-rb-0.3.5 ext/torch/templates.cpp
torch-rb-0.3.4 ext/torch/templates.cpp
torch-rb-0.3.3 ext/torch/templates.cpp
torch-rb-0.3.2 ext/torch/templates.cpp
torch-rb-0.3.1 ext/torch/templates.cpp
torch-rb-0.3.0 ext/torch/templates.cpp
torch-rb-0.2.7 ext/torch/templates.cpp
torch-rb-0.2.6 ext/torch/templates.cpp
torch-rb-0.2.5 ext/torch/templates.cpp
torch-rb-0.2.4 ext/torch/templates.cpp
torch-rb-0.2.3 ext/torch/templates.cpp
torch-rb-0.2.2 ext/torch/templates.cpp
torch-rb-0.2.1 ext/torch/templates.cpp
torch-rb-0.2.0 ext/torch/templates.cpp
torch-rb-0.1.8 ext/torch/templates.cpp
torch-rb-0.1.7 ext/torch/templates.cpp
torch-rb-0.1.6 ext/torch/templates.cpp