AI-TensorFlow-Libtensorflow

 view release on metacpan or  search on metacpan

lib/AI/TensorFlow/Libtensorflow/Lib.pm  view on Meta::CPAN

		my ($name) = @_;
		"${prefix}_$name";
	}
}

sub mangler_for_object {
	my ($class, $object_name) = @_;
	sub {
		my ($name) = @_;

		# constructor and destructors
		return "TF_New${object_name}" if $name eq 'New';
		return "TF_Delete${object_name}" if $name eq 'Delete';

		return "TF_${object_name}$name";
	};
}

sub arg(@) {
	my $arg = AI::TensorFlow::Libtensorflow::Lib::_Arg->new(
		type => shift,
		id => shift,
	);
	return $arg, @_;
}

# from FFI::Platypus::Type::StringArray
use constant _pointer_incantation =>
  $^O eq 'MSWin32' && do { require Config; $Config::Config{archname} =~ /MSWin32-x64/ }
  ? 'Q'
  : 'L!';
use constant _size_of_pointer => FFI::Platypus->new( api => 2 )->sizeof('opaque');
use constant _pointer_buffer => "P" . _size_of_pointer;

package # hide from PAUSE
  AI::TensorFlow::Libtensorflow::Lib::_Arg {

use Class::Tiny qw(type id);

use overload
	q{""} => 'stringify',
	eq => 'eq';

sub stringify { $_[0]->type }

sub eq {
	my ($self, $other, $swap) = @_;
	"$self" eq "$other";
}

}



1;

__END__

=pod

=encoding UTF-8

=head1 NAME

AI::TensorFlow::Libtensorflow::Lib - Private class for AI::TensorFlow::Libtensorflow

=head2 C<tensorflow/c/c_api.h>

=head3 TF_SessionOptions

L<AI::TensorFlow::Libtensorflow::SessionOptions>

=for TF_CAPI_DEF typedef struct TF_SessionOptions TF_SessionOptions;

=head3 TF_Graph

L<AI::TensorFlow::Libtensorflow::Graph>

=for TF_CAPI_DEF typedef struct TF_Graph TF_Graph;

=head3 TF_OperationDescription

L<AI::TensorFlow::Libtensorflow::OperationDescription>

=for TF_CAPI_DEF typedef struct TF_OperationDescription TF_OperationDescription;

=head3 TF_Operation

L<AI::TensorFlow::Libtensorflow::Operation>

=for TF_CAPI_DEF typedef struct TF_Operation TF_Operation;

=head3 TF_Function

=for TF_CAPI_DEF typedef struct TF_Function TF_Function;

=head3 TF_FunctionOptions

=for TF_CAPI_DEF typedef struct TF_FunctionOptions TF_FunctionOptions;

=head3 TF_ImportGraphDefOptions

L<AI::TensorFlow::Libtensorflow::ImportGraphDefOptions>

=for TF_CAPI_DEF typedef struct TF_ImportGraphDefOptions TF_ImportGraphDefOptions;

=head3 TF_ImportGraphDefResults

L<AI::TensorFlow::Libtensorflow::ImportGraphDefResults>

=for TF_CAPI_DEF typedef struct TF_ImportGraphDefResults TF_ImportGraphDefResults;

=head3 TF_Session

L<AI::TensorFlow::Libtensorflow::Session>

=for TF_CAPI_DEF typedef struct TF_Session TF_Session;

=head3 TF_DeprecatedSession

=for TF_CAPI_DEF typedef struct TF_DeprecatedSession TF_DeprecatedSession;



( run in 0.348 second using v1.01-cache-2.11-cpan-d59ab9ce9b0 )