| 1 | package AI::TensorFlow::Libtensorflow::Eager::Context; | ||
| 2 | # ABSTRACT: Eager context | ||
| 3 | $AI::TensorFlow::Libtensorflow::Eager::Context::VERSION = '0.0.7'; | ||
| 4 | use strict; | ||
| 5 | use warnings; | ||
| 6 | use AI::TensorFlow::Libtensorflow::Lib qw(arg); | ||
| 7 | my $ffi = AI::TensorFlow::Libtensorflow::Lib->ffi; | ||
| 8 | $ffi->mangler(AI::TensorFlow::Libtensorflow::Lib->mangler_default); | ||
| 9 | |||
| 10 | $ffi->attach( [ 'NewContext' => 'New' ] => [ | ||
| 11 | arg TFE_ContextOptions => 'opts', | ||
| 12 | arg TF_Status => 'status' | ||
| 13 | ] => 'TFE_Context' => sub { | ||
| 14 | my ($xs, $class, @rest) = @_; | ||
| 15 | $xs->(@rest); | ||
| 16 | } ); | ||
| 17 | |||
| 18 | __END__ |