diff --git a/pytorch/src/gen/java/org/bytedeco/pytorch/JitModule.java b/pytorch/src/gen/java/org/bytedeco/pytorch/JitModule.java index bd1c16b5ec7..f3f47687f30 100644 --- a/pytorch/src/gen/java/org/bytedeco/pytorch/JitModule.java +++ b/pytorch/src/gen/java/org/bytedeco/pytorch/JitModule.java @@ -106,10 +106,10 @@ public native void register_attribute( public native void apply(@Const @ByRef JitModuleApplyFunction fn); - public native @ByVal @Cast("torch::jit::buffer_list*") module_list buffers(@Cast("bool") boolean recurse/*=true*/); - public native @ByVal @Cast("torch::jit::buffer_list*") module_list buffers(); - public native @ByVal @Cast("torch::jit::named_buffer_list*") module_list named_buffers(@Cast("bool") boolean recurse/*=true*/); - public native @ByVal @Cast("torch::jit::named_buffer_list*") module_list named_buffers(); + public native @ByVal buffer_list buffers(@Cast("bool") boolean recurse/*=true*/); + public native @ByVal buffer_list buffers(); + public native @ByVal named_buffer_list named_buffers(@Cast("bool") boolean recurse/*=true*/); + public native @ByVal named_buffer_list named_buffers(); public native @ByVal module_list children(); // direct modules public native @ByVal named_module_list named_children(); @@ -117,16 +117,16 @@ public native void register_attribute( public native @ByVal named_module_list named_modules(); // all tensors involved in gradient optimization - public native @ByVal @Cast("torch::jit::parameter_list*") module_list parameters(@Cast("bool") boolean recurse/*=true*/); - public native @ByVal @Cast("torch::jit::parameter_list*") module_list parameters(); - public native @ByVal @Cast("torch::jit::named_parameter_list*") module_list named_parameters(@Cast("bool") boolean recurse/*=true*/); - public native @ByVal @Cast("torch::jit::named_parameter_list*") module_list named_parameters(); + public native @ByVal parameter_list parameters(@Cast("bool") boolean recurse/*=true*/); + public native @ByVal parameter_list parameters(); + public native @ByVal named_parameter_list named_parameters(@Cast("bool") boolean recurse/*=true*/); + public native @ByVal named_parameter_list named_parameters(); // all members of the object, similar to iterating over dir(obj) in python - public native @ByVal @Cast("torch::jit::attribute_list*") module_list attributes(@Cast("bool") boolean recurse/*=true*/); - public native @ByVal @Cast("torch::jit::attribute_list*") module_list attributes(); - public native @ByVal @Cast("torch::jit::named_attribute_list*") module_list named_attributes(@Cast("bool") boolean recurse/*=true*/); - public native @ByVal @Cast("torch::jit::named_attribute_list*") module_list named_attributes(); + public native @ByVal attribute_list attributes(@Cast("bool") boolean recurse/*=true*/); + public native @ByVal attribute_list attributes(); + public native @ByVal named_attribute_list named_attributes(@Cast("bool") boolean recurse/*=true*/); + public native @ByVal named_attribute_list named_attributes(); public native void dump( @Cast("bool") boolean print_method_bodies, diff --git a/pytorch/src/gen/java/org/bytedeco/pytorch/NamedIValue.java b/pytorch/src/gen/java/org/bytedeco/pytorch/NamedIValue.java new file mode 100644 index 00000000000..d3e34d907d8 --- /dev/null +++ b/pytorch/src/gen/java/org/bytedeco/pytorch/NamedIValue.java @@ -0,0 +1,41 @@ +// Targeted by JavaCPP version 1.5.10-SNAPSHOT: DO NOT EDIT THIS FILE + +package org.bytedeco.pytorch; + +import org.bytedeco.pytorch.Allocator; +import org.bytedeco.pytorch.Function; +import org.bytedeco.pytorch.functions.*; +import org.bytedeco.pytorch.Module; +import org.bytedeco.javacpp.annotation.Cast; +import java.nio.*; +import org.bytedeco.javacpp.*; +import org.bytedeco.javacpp.annotation.*; + +import static org.bytedeco.javacpp.presets.javacpp.*; +import static org.bytedeco.openblas.global.openblas_nolapack.*; +import static org.bytedeco.openblas.global.openblas.*; + +import static org.bytedeco.pytorch.global.torch.*; + + +@Name("torch::jit::Named") @Properties(inherit = org.bytedeco.pytorch.presets.torch.class) +public class NamedIValue extends Pointer { + static { Loader.load(); } + /** Default native constructor. */ + public NamedIValue() { super((Pointer)null); allocate(); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public NamedIValue(long size) { super((Pointer)null); allocateArray(size); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public NamedIValue(Pointer p) { super(p); } + private native void allocate(); + private native void allocateArray(long size); + @Override public NamedIValue position(long position) { + return (NamedIValue)super.position(position); + } + @Override public NamedIValue getPointer(long i) { + return new NamedIValue((Pointer)this).offsetAddress(i); + } + + public native @StdString BytePointer name(); public native NamedIValue name(BytePointer setter); + public native @ByRef IValue value(); public native NamedIValue value(IValue setter); +} diff --git a/pytorch/src/gen/java/org/bytedeco/pytorch/NamedTensor.java b/pytorch/src/gen/java/org/bytedeco/pytorch/NamedTensor.java new file mode 100644 index 00000000000..09bf1bd7203 --- /dev/null +++ b/pytorch/src/gen/java/org/bytedeco/pytorch/NamedTensor.java @@ -0,0 +1,41 @@ +// Targeted by JavaCPP version 1.5.10-SNAPSHOT: DO NOT EDIT THIS FILE + +package org.bytedeco.pytorch; + +import org.bytedeco.pytorch.Allocator; +import org.bytedeco.pytorch.Function; +import org.bytedeco.pytorch.functions.*; +import org.bytedeco.pytorch.Module; +import org.bytedeco.javacpp.annotation.Cast; +import java.nio.*; +import org.bytedeco.javacpp.*; +import org.bytedeco.javacpp.annotation.*; + +import static org.bytedeco.javacpp.presets.javacpp.*; +import static org.bytedeco.openblas.global.openblas_nolapack.*; +import static org.bytedeco.openblas.global.openblas.*; + +import static org.bytedeco.pytorch.global.torch.*; + + +@Name("torch::jit::Named") @Properties(inherit = org.bytedeco.pytorch.presets.torch.class) +public class NamedTensor extends Pointer { + static { Loader.load(); } + /** Default native constructor. */ + public NamedTensor() { super((Pointer)null); allocate(); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public NamedTensor(long size) { super((Pointer)null); allocateArray(size); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public NamedTensor(Pointer p) { super(p); } + private native void allocate(); + private native void allocateArray(long size); + @Override public NamedTensor position(long position) { + return (NamedTensor)super.position(position); + } + @Override public NamedTensor getPointer(long i) { + return new NamedTensor((Pointer)this).offsetAddress(i); + } + + public native @StdString BytePointer name(); public native NamedTensor name(BytePointer setter); + public native @ByRef Tensor value(); public native NamedTensor value(Tensor setter); +} diff --git a/pytorch/src/gen/java/org/bytedeco/pytorch/attribute_iterator.java b/pytorch/src/gen/java/org/bytedeco/pytorch/attribute_iterator.java new file mode 100644 index 00000000000..cf4c7ad5820 --- /dev/null +++ b/pytorch/src/gen/java/org/bytedeco/pytorch/attribute_iterator.java @@ -0,0 +1,55 @@ +// Targeted by JavaCPP version 1.5.10-SNAPSHOT: DO NOT EDIT THIS FILE + +package org.bytedeco.pytorch; + +import org.bytedeco.pytorch.Allocator; +import org.bytedeco.pytorch.Function; +import org.bytedeco.pytorch.functions.*; +import org.bytedeco.pytorch.Module; +import org.bytedeco.javacpp.annotation.Cast; +import java.nio.*; +import org.bytedeco.javacpp.*; +import org.bytedeco.javacpp.annotation.*; + +import static org.bytedeco.javacpp.presets.javacpp.*; +import static org.bytedeco.openblas.global.openblas_nolapack.*; +import static org.bytedeco.openblas.global.openblas.*; + +import static org.bytedeco.pytorch.global.torch.*; + +@Name("torch::jit::slot_iterator_impl") @NoOffset @Properties(inherit = org.bytedeco.pytorch.presets.torch.class) +public class attribute_iterator extends Pointer { + static { Loader.load(); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public attribute_iterator(Pointer p) { super(p); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public attribute_iterator(long size) { super((Pointer)null); allocateArray(size); } + private native void allocateArray(long size); + @Override public attribute_iterator position(long position) { + return (attribute_iterator)super.position(position); + } + @Override public attribute_iterator getPointer(long i) { + return new attribute_iterator((Pointer)this).offsetAddress(i); + } + + public attribute_iterator( + @ByVal JitModule root, + @Cast("bool") boolean recurse, + @Cast("bool") boolean return_module) { super((Pointer)null); allocate(root, recurse, return_module); } + private native void allocate( + @ByVal JitModule root, + @Cast("bool") boolean recurse, + @Cast("bool") boolean return_module); + // empty cursors_, represents end of iteration + public attribute_iterator() { super((Pointer)null); allocate(); } + private native void allocate(); + public native @ByVal @Name("operator *") IValue multiply(); + public native @ByVal @Name("operator ->") IValue access(); + public native @ByRef @Name("operator ++") attribute_iterator increment(); + public native @ByVal @Name("operator ++") attribute_iterator increment(int arg0); + + private static native @Namespace @Cast("bool") @Name("operator !=") boolean notEquals( + @Const @ByRef attribute_iterator a, + @Const @ByRef attribute_iterator b); + public boolean notEquals(attribute_iterator b) { return notEquals(this, b); } +} diff --git a/pytorch/src/gen/java/org/bytedeco/pytorch/attribute_list.java b/pytorch/src/gen/java/org/bytedeco/pytorch/attribute_list.java new file mode 100644 index 00000000000..53ddd45911f --- /dev/null +++ b/pytorch/src/gen/java/org/bytedeco/pytorch/attribute_list.java @@ -0,0 +1,32 @@ +// Targeted by JavaCPP version 1.5.10-SNAPSHOT: DO NOT EDIT THIS FILE + +package org.bytedeco.pytorch; + +import org.bytedeco.pytorch.Allocator; +import org.bytedeco.pytorch.Function; +import org.bytedeco.pytorch.functions.*; +import org.bytedeco.pytorch.Module; +import org.bytedeco.javacpp.annotation.Cast; +import java.nio.*; +import org.bytedeco.javacpp.*; +import org.bytedeco.javacpp.annotation.*; + +import static org.bytedeco.javacpp.presets.javacpp.*; +import static org.bytedeco.openblas.global.openblas_nolapack.*; +import static org.bytedeco.openblas.global.openblas.*; + +import static org.bytedeco.pytorch.global.torch.*; + +@Name("torch::jit::slot_list_impl") @NoOffset @Properties(inherit = org.bytedeco.pytorch.presets.torch.class) +public class attribute_list extends Pointer { + static { Loader.load(); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public attribute_list(Pointer p) { super(p); } + + public native @ByVal attribute_iterator begin(); + public native @ByVal attribute_iterator end(); + public native @Cast("size_t") long size(); + + public attribute_list(@ByVal JitModule module, @Cast("bool") boolean recurse, @Cast("bool") boolean return_module) { super((Pointer)null); allocate(module, recurse, return_module); } + private native void allocate(@ByVal JitModule module, @Cast("bool") boolean recurse, @Cast("bool") boolean return_module); +} diff --git a/pytorch/src/gen/java/org/bytedeco/pytorch/buffer_iterator.java b/pytorch/src/gen/java/org/bytedeco/pytorch/buffer_iterator.java new file mode 100644 index 00000000000..a0b5610ea52 --- /dev/null +++ b/pytorch/src/gen/java/org/bytedeco/pytorch/buffer_iterator.java @@ -0,0 +1,55 @@ +// Targeted by JavaCPP version 1.5.10-SNAPSHOT: DO NOT EDIT THIS FILE + +package org.bytedeco.pytorch; + +import org.bytedeco.pytorch.Allocator; +import org.bytedeco.pytorch.Function; +import org.bytedeco.pytorch.functions.*; +import org.bytedeco.pytorch.Module; +import org.bytedeco.javacpp.annotation.Cast; +import java.nio.*; +import org.bytedeco.javacpp.*; +import org.bytedeco.javacpp.annotation.*; + +import static org.bytedeco.javacpp.presets.javacpp.*; +import static org.bytedeco.openblas.global.openblas_nolapack.*; +import static org.bytedeco.openblas.global.openblas.*; + +import static org.bytedeco.pytorch.global.torch.*; + +@Name("torch::jit::slot_iterator_impl") @NoOffset @Properties(inherit = org.bytedeco.pytorch.presets.torch.class) +public class buffer_iterator extends Pointer { + static { Loader.load(); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public buffer_iterator(Pointer p) { super(p); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public buffer_iterator(long size) { super((Pointer)null); allocateArray(size); } + private native void allocateArray(long size); + @Override public buffer_iterator position(long position) { + return (buffer_iterator)super.position(position); + } + @Override public buffer_iterator getPointer(long i) { + return new buffer_iterator((Pointer)this).offsetAddress(i); + } + + public buffer_iterator( + @ByVal JitModule root, + @Cast("bool") boolean recurse, + @Cast("bool") boolean return_module) { super((Pointer)null); allocate(root, recurse, return_module); } + private native void allocate( + @ByVal JitModule root, + @Cast("bool") boolean recurse, + @Cast("bool") boolean return_module); + // empty cursors_, represents end of iteration + public buffer_iterator() { super((Pointer)null); allocate(); } + private native void allocate(); + public native @ByVal @Name("operator *") Tensor multiply(); + public native @ByVal @Name("operator ->") Tensor access(); + public native @ByRef @Name("operator ++") buffer_iterator increment(); + public native @ByVal @Name("operator ++") buffer_iterator increment(int arg0); + + private static native @Namespace @Cast("bool") @Name("operator !=") boolean notEquals( + @Const @ByRef buffer_iterator a, + @Const @ByRef buffer_iterator b); + public boolean notEquals(buffer_iterator b) { return notEquals(this, b); } +} diff --git a/pytorch/src/gen/java/org/bytedeco/pytorch/buffer_list.java b/pytorch/src/gen/java/org/bytedeco/pytorch/buffer_list.java new file mode 100644 index 00000000000..6e3e6674133 --- /dev/null +++ b/pytorch/src/gen/java/org/bytedeco/pytorch/buffer_list.java @@ -0,0 +1,32 @@ +// Targeted by JavaCPP version 1.5.10-SNAPSHOT: DO NOT EDIT THIS FILE + +package org.bytedeco.pytorch; + +import org.bytedeco.pytorch.Allocator; +import org.bytedeco.pytorch.Function; +import org.bytedeco.pytorch.functions.*; +import org.bytedeco.pytorch.Module; +import org.bytedeco.javacpp.annotation.Cast; +import java.nio.*; +import org.bytedeco.javacpp.*; +import org.bytedeco.javacpp.annotation.*; + +import static org.bytedeco.javacpp.presets.javacpp.*; +import static org.bytedeco.openblas.global.openblas_nolapack.*; +import static org.bytedeco.openblas.global.openblas.*; + +import static org.bytedeco.pytorch.global.torch.*; + +@Name("torch::jit::slot_list_impl") @NoOffset @Properties(inherit = org.bytedeco.pytorch.presets.torch.class) +public class buffer_list extends Pointer { + static { Loader.load(); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public buffer_list(Pointer p) { super(p); } + + public native @ByVal buffer_iterator begin(); + public native @ByVal buffer_iterator end(); + public native @Cast("size_t") long size(); + + public buffer_list(@ByVal JitModule module, @Cast("bool") boolean recurse, @Cast("bool") boolean return_module) { super((Pointer)null); allocate(module, recurse, return_module); } + private native void allocate(@ByVal JitModule module, @Cast("bool") boolean recurse, @Cast("bool") boolean return_module); +} diff --git a/pytorch/src/gen/java/org/bytedeco/pytorch/global/torch.java b/pytorch/src/gen/java/org/bytedeco/pytorch/global/torch.java index 5b5555c824a..1e790b16b01 100644 --- a/pytorch/src/gen/java/org/bytedeco/pytorch/global/torch.java +++ b/pytorch/src/gen/java/org/bytedeco/pytorch/global/torch.java @@ -64220,6 +64220,12 @@ public class torch extends org.bytedeco.pytorch.presets.torch { // Targeting ../NamedJitModule.java +// Targeting ../NamedTensor.java + + +// Targeting ../NamedIValue.java + + // namespace detail // Targeting ../JitModule.java @@ -64296,12 +64302,48 @@ The list of (type, depth) pairs controls the type of specializations and the num // Targeting ../named_module_iterator.java +// Targeting ../parameter_iterator.java + + +// Targeting ../named_parameter_iterator.java + + +// Targeting ../attribute_iterator.java + + +// Targeting ../named_attribute_iterator.java + + +// Targeting ../buffer_iterator.java + + +// Targeting ../named_buffer_iterator.java + + // Targeting ../module_list.java // Targeting ../named_module_list.java +// Targeting ../parameter_list.java + + +// Targeting ../named_parameter_list.java + + +// Targeting ../attribute_list.java + + +// Targeting ../named_attribute_list.java + + +// Targeting ../buffer_list.java + + +// Targeting ../named_buffer_list.java + + // Targeting ../ModulePolicy.java diff --git a/pytorch/src/gen/java/org/bytedeco/pytorch/named_attribute_iterator.java b/pytorch/src/gen/java/org/bytedeco/pytorch/named_attribute_iterator.java new file mode 100644 index 00000000000..7724c8b9d99 --- /dev/null +++ b/pytorch/src/gen/java/org/bytedeco/pytorch/named_attribute_iterator.java @@ -0,0 +1,55 @@ +// Targeted by JavaCPP version 1.5.10-SNAPSHOT: DO NOT EDIT THIS FILE + +package org.bytedeco.pytorch; + +import org.bytedeco.pytorch.Allocator; +import org.bytedeco.pytorch.Function; +import org.bytedeco.pytorch.functions.*; +import org.bytedeco.pytorch.Module; +import org.bytedeco.javacpp.annotation.Cast; +import java.nio.*; +import org.bytedeco.javacpp.*; +import org.bytedeco.javacpp.annotation.*; + +import static org.bytedeco.javacpp.presets.javacpp.*; +import static org.bytedeco.openblas.global.openblas_nolapack.*; +import static org.bytedeco.openblas.global.openblas.*; + +import static org.bytedeco.pytorch.global.torch.*; + +@Name("torch::jit::slot_iterator_impl >") @NoOffset @Properties(inherit = org.bytedeco.pytorch.presets.torch.class) +public class named_attribute_iterator extends Pointer { + static { Loader.load(); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public named_attribute_iterator(Pointer p) { super(p); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public named_attribute_iterator(long size) { super((Pointer)null); allocateArray(size); } + private native void allocateArray(long size); + @Override public named_attribute_iterator position(long position) { + return (named_attribute_iterator)super.position(position); + } + @Override public named_attribute_iterator getPointer(long i) { + return new named_attribute_iterator((Pointer)this).offsetAddress(i); + } + + public named_attribute_iterator( + @ByVal JitModule root, + @Cast("bool") boolean recurse, + @Cast("bool") boolean return_module) { super((Pointer)null); allocate(root, recurse, return_module); } + private native void allocate( + @ByVal JitModule root, + @Cast("bool") boolean recurse, + @Cast("bool") boolean return_module); + // empty cursors_, represents end of iteration + public named_attribute_iterator() { super((Pointer)null); allocate(); } + private native void allocate(); + public native @ByVal @Name("operator *") NamedIValue multiply(); + public native @ByVal @Name("operator ->") NamedIValue access(); + public native @ByRef @Name("operator ++") named_attribute_iterator increment(); + public native @ByVal @Name("operator ++") named_attribute_iterator increment(int arg0); + + private static native @Namespace @Cast("bool") @Name("operator !=") boolean notEquals( + @Const @ByRef named_attribute_iterator a, + @Const @ByRef named_attribute_iterator b); + public boolean notEquals(named_attribute_iterator b) { return notEquals(this, b); } +} diff --git a/pytorch/src/gen/java/org/bytedeco/pytorch/named_attribute_list.java b/pytorch/src/gen/java/org/bytedeco/pytorch/named_attribute_list.java new file mode 100644 index 00000000000..0d1ee8c7015 --- /dev/null +++ b/pytorch/src/gen/java/org/bytedeco/pytorch/named_attribute_list.java @@ -0,0 +1,32 @@ +// Targeted by JavaCPP version 1.5.10-SNAPSHOT: DO NOT EDIT THIS FILE + +package org.bytedeco.pytorch; + +import org.bytedeco.pytorch.Allocator; +import org.bytedeco.pytorch.Function; +import org.bytedeco.pytorch.functions.*; +import org.bytedeco.pytorch.Module; +import org.bytedeco.javacpp.annotation.Cast; +import java.nio.*; +import org.bytedeco.javacpp.*; +import org.bytedeco.javacpp.annotation.*; + +import static org.bytedeco.javacpp.presets.javacpp.*; +import static org.bytedeco.openblas.global.openblas_nolapack.*; +import static org.bytedeco.openblas.global.openblas.*; + +import static org.bytedeco.pytorch.global.torch.*; + +@Name("torch::jit::slot_list_impl >") @NoOffset @Properties(inherit = org.bytedeco.pytorch.presets.torch.class) +public class named_attribute_list extends Pointer { + static { Loader.load(); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public named_attribute_list(Pointer p) { super(p); } + + public native @ByVal named_attribute_iterator begin(); + public native @ByVal named_attribute_iterator end(); + public native @Cast("size_t") long size(); + + public named_attribute_list(@ByVal JitModule module, @Cast("bool") boolean recurse, @Cast("bool") boolean return_module) { super((Pointer)null); allocate(module, recurse, return_module); } + private native void allocate(@ByVal JitModule module, @Cast("bool") boolean recurse, @Cast("bool") boolean return_module); +} diff --git a/pytorch/src/gen/java/org/bytedeco/pytorch/named_buffer_iterator.java b/pytorch/src/gen/java/org/bytedeco/pytorch/named_buffer_iterator.java new file mode 100644 index 00000000000..1aeef22c386 --- /dev/null +++ b/pytorch/src/gen/java/org/bytedeco/pytorch/named_buffer_iterator.java @@ -0,0 +1,55 @@ +// Targeted by JavaCPP version 1.5.10-SNAPSHOT: DO NOT EDIT THIS FILE + +package org.bytedeco.pytorch; + +import org.bytedeco.pytorch.Allocator; +import org.bytedeco.pytorch.Function; +import org.bytedeco.pytorch.functions.*; +import org.bytedeco.pytorch.Module; +import org.bytedeco.javacpp.annotation.Cast; +import java.nio.*; +import org.bytedeco.javacpp.*; +import org.bytedeco.javacpp.annotation.*; + +import static org.bytedeco.javacpp.presets.javacpp.*; +import static org.bytedeco.openblas.global.openblas_nolapack.*; +import static org.bytedeco.openblas.global.openblas.*; + +import static org.bytedeco.pytorch.global.torch.*; + +@Name("torch::jit::slot_iterator_impl >") @NoOffset @Properties(inherit = org.bytedeco.pytorch.presets.torch.class) +public class named_buffer_iterator extends Pointer { + static { Loader.load(); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public named_buffer_iterator(Pointer p) { super(p); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public named_buffer_iterator(long size) { super((Pointer)null); allocateArray(size); } + private native void allocateArray(long size); + @Override public named_buffer_iterator position(long position) { + return (named_buffer_iterator)super.position(position); + } + @Override public named_buffer_iterator getPointer(long i) { + return new named_buffer_iterator((Pointer)this).offsetAddress(i); + } + + public named_buffer_iterator( + @ByVal JitModule root, + @Cast("bool") boolean recurse, + @Cast("bool") boolean return_module) { super((Pointer)null); allocate(root, recurse, return_module); } + private native void allocate( + @ByVal JitModule root, + @Cast("bool") boolean recurse, + @Cast("bool") boolean return_module); + // empty cursors_, represents end of iteration + public named_buffer_iterator() { super((Pointer)null); allocate(); } + private native void allocate(); + public native @ByVal @Name("operator *") NamedTensor multiply(); + public native @ByVal @Name("operator ->") NamedTensor access(); + public native @ByRef @Name("operator ++") named_buffer_iterator increment(); + public native @ByVal @Name("operator ++") named_buffer_iterator increment(int arg0); + + private static native @Namespace @Cast("bool") @Name("operator !=") boolean notEquals( + @Const @ByRef named_buffer_iterator a, + @Const @ByRef named_buffer_iterator b); + public boolean notEquals(named_buffer_iterator b) { return notEquals(this, b); } +} diff --git a/pytorch/src/gen/java/org/bytedeco/pytorch/named_buffer_list.java b/pytorch/src/gen/java/org/bytedeco/pytorch/named_buffer_list.java new file mode 100644 index 00000000000..f79ee2c7687 --- /dev/null +++ b/pytorch/src/gen/java/org/bytedeco/pytorch/named_buffer_list.java @@ -0,0 +1,32 @@ +// Targeted by JavaCPP version 1.5.10-SNAPSHOT: DO NOT EDIT THIS FILE + +package org.bytedeco.pytorch; + +import org.bytedeco.pytorch.Allocator; +import org.bytedeco.pytorch.Function; +import org.bytedeco.pytorch.functions.*; +import org.bytedeco.pytorch.Module; +import org.bytedeco.javacpp.annotation.Cast; +import java.nio.*; +import org.bytedeco.javacpp.*; +import org.bytedeco.javacpp.annotation.*; + +import static org.bytedeco.javacpp.presets.javacpp.*; +import static org.bytedeco.openblas.global.openblas_nolapack.*; +import static org.bytedeco.openblas.global.openblas.*; + +import static org.bytedeco.pytorch.global.torch.*; + +@Name("torch::jit::slot_list_impl >") @NoOffset @Properties(inherit = org.bytedeco.pytorch.presets.torch.class) +public class named_buffer_list extends Pointer { + static { Loader.load(); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public named_buffer_list(Pointer p) { super(p); } + + public native @ByVal named_buffer_iterator begin(); + public native @ByVal named_buffer_iterator end(); + public native @Cast("size_t") long size(); + + public named_buffer_list(@ByVal JitModule module, @Cast("bool") boolean recurse, @Cast("bool") boolean return_module) { super((Pointer)null); allocate(module, recurse, return_module); } + private native void allocate(@ByVal JitModule module, @Cast("bool") boolean recurse, @Cast("bool") boolean return_module); +} diff --git a/pytorch/src/gen/java/org/bytedeco/pytorch/named_parameter_iterator.java b/pytorch/src/gen/java/org/bytedeco/pytorch/named_parameter_iterator.java new file mode 100644 index 00000000000..b7b95d94a50 --- /dev/null +++ b/pytorch/src/gen/java/org/bytedeco/pytorch/named_parameter_iterator.java @@ -0,0 +1,55 @@ +// Targeted by JavaCPP version 1.5.10-SNAPSHOT: DO NOT EDIT THIS FILE + +package org.bytedeco.pytorch; + +import org.bytedeco.pytorch.Allocator; +import org.bytedeco.pytorch.Function; +import org.bytedeco.pytorch.functions.*; +import org.bytedeco.pytorch.Module; +import org.bytedeco.javacpp.annotation.Cast; +import java.nio.*; +import org.bytedeco.javacpp.*; +import org.bytedeco.javacpp.annotation.*; + +import static org.bytedeco.javacpp.presets.javacpp.*; +import static org.bytedeco.openblas.global.openblas_nolapack.*; +import static org.bytedeco.openblas.global.openblas.*; + +import static org.bytedeco.pytorch.global.torch.*; + +@Name("torch::jit::slot_iterator_impl >") @NoOffset @Properties(inherit = org.bytedeco.pytorch.presets.torch.class) +public class named_parameter_iterator extends Pointer { + static { Loader.load(); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public named_parameter_iterator(Pointer p) { super(p); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public named_parameter_iterator(long size) { super((Pointer)null); allocateArray(size); } + private native void allocateArray(long size); + @Override public named_parameter_iterator position(long position) { + return (named_parameter_iterator)super.position(position); + } + @Override public named_parameter_iterator getPointer(long i) { + return new named_parameter_iterator((Pointer)this).offsetAddress(i); + } + + public named_parameter_iterator( + @ByVal JitModule root, + @Cast("bool") boolean recurse, + @Cast("bool") boolean return_module) { super((Pointer)null); allocate(root, recurse, return_module); } + private native void allocate( + @ByVal JitModule root, + @Cast("bool") boolean recurse, + @Cast("bool") boolean return_module); + // empty cursors_, represents end of iteration + public named_parameter_iterator() { super((Pointer)null); allocate(); } + private native void allocate(); + public native @ByVal @Name("operator *") NamedTensor multiply(); + public native @ByVal @Name("operator ->") NamedTensor access(); + public native @ByRef @Name("operator ++") named_parameter_iterator increment(); + public native @ByVal @Name("operator ++") named_parameter_iterator increment(int arg0); + + private static native @Namespace @Cast("bool") @Name("operator !=") boolean notEquals( + @Const @ByRef named_parameter_iterator a, + @Const @ByRef named_parameter_iterator b); + public boolean notEquals(named_parameter_iterator b) { return notEquals(this, b); } +} diff --git a/pytorch/src/gen/java/org/bytedeco/pytorch/named_parameter_list.java b/pytorch/src/gen/java/org/bytedeco/pytorch/named_parameter_list.java new file mode 100644 index 00000000000..6eba09a6a7d --- /dev/null +++ b/pytorch/src/gen/java/org/bytedeco/pytorch/named_parameter_list.java @@ -0,0 +1,32 @@ +// Targeted by JavaCPP version 1.5.10-SNAPSHOT: DO NOT EDIT THIS FILE + +package org.bytedeco.pytorch; + +import org.bytedeco.pytorch.Allocator; +import org.bytedeco.pytorch.Function; +import org.bytedeco.pytorch.functions.*; +import org.bytedeco.pytorch.Module; +import org.bytedeco.javacpp.annotation.Cast; +import java.nio.*; +import org.bytedeco.javacpp.*; +import org.bytedeco.javacpp.annotation.*; + +import static org.bytedeco.javacpp.presets.javacpp.*; +import static org.bytedeco.openblas.global.openblas_nolapack.*; +import static org.bytedeco.openblas.global.openblas.*; + +import static org.bytedeco.pytorch.global.torch.*; + +@Name("torch::jit::slot_list_impl >") @NoOffset @Properties(inherit = org.bytedeco.pytorch.presets.torch.class) +public class named_parameter_list extends Pointer { + static { Loader.load(); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public named_parameter_list(Pointer p) { super(p); } + + public native @ByVal named_parameter_iterator begin(); + public native @ByVal named_parameter_iterator end(); + public native @Cast("size_t") long size(); + + public named_parameter_list(@ByVal JitModule module, @Cast("bool") boolean recurse, @Cast("bool") boolean return_module) { super((Pointer)null); allocate(module, recurse, return_module); } + private native void allocate(@ByVal JitModule module, @Cast("bool") boolean recurse, @Cast("bool") boolean return_module); +} diff --git a/pytorch/src/gen/java/org/bytedeco/pytorch/parameter_iterator.java b/pytorch/src/gen/java/org/bytedeco/pytorch/parameter_iterator.java new file mode 100644 index 00000000000..14f412baf94 --- /dev/null +++ b/pytorch/src/gen/java/org/bytedeco/pytorch/parameter_iterator.java @@ -0,0 +1,55 @@ +// Targeted by JavaCPP version 1.5.10-SNAPSHOT: DO NOT EDIT THIS FILE + +package org.bytedeco.pytorch; + +import org.bytedeco.pytorch.Allocator; +import org.bytedeco.pytorch.Function; +import org.bytedeco.pytorch.functions.*; +import org.bytedeco.pytorch.Module; +import org.bytedeco.javacpp.annotation.Cast; +import java.nio.*; +import org.bytedeco.javacpp.*; +import org.bytedeco.javacpp.annotation.*; + +import static org.bytedeco.javacpp.presets.javacpp.*; +import static org.bytedeco.openblas.global.openblas_nolapack.*; +import static org.bytedeco.openblas.global.openblas.*; + +import static org.bytedeco.pytorch.global.torch.*; + +@Name("torch::jit::slot_iterator_impl") @NoOffset @Properties(inherit = org.bytedeco.pytorch.presets.torch.class) +public class parameter_iterator extends Pointer { + static { Loader.load(); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public parameter_iterator(Pointer p) { super(p); } + /** Native array allocator. Access with {@link Pointer#position(long)}. */ + public parameter_iterator(long size) { super((Pointer)null); allocateArray(size); } + private native void allocateArray(long size); + @Override public parameter_iterator position(long position) { + return (parameter_iterator)super.position(position); + } + @Override public parameter_iterator getPointer(long i) { + return new parameter_iterator((Pointer)this).offsetAddress(i); + } + + public parameter_iterator( + @ByVal JitModule root, + @Cast("bool") boolean recurse, + @Cast("bool") boolean return_module) { super((Pointer)null); allocate(root, recurse, return_module); } + private native void allocate( + @ByVal JitModule root, + @Cast("bool") boolean recurse, + @Cast("bool") boolean return_module); + // empty cursors_, represents end of iteration + public parameter_iterator() { super((Pointer)null); allocate(); } + private native void allocate(); + public native @ByVal @Name("operator *") Tensor multiply(); + public native @ByVal @Name("operator ->") Tensor access(); + public native @ByRef @Name("operator ++") parameter_iterator increment(); + public native @ByVal @Name("operator ++") parameter_iterator increment(int arg0); + + private static native @Namespace @Cast("bool") @Name("operator !=") boolean notEquals( + @Const @ByRef parameter_iterator a, + @Const @ByRef parameter_iterator b); + public boolean notEquals(parameter_iterator b) { return notEquals(this, b); } +} diff --git a/pytorch/src/gen/java/org/bytedeco/pytorch/parameter_list.java b/pytorch/src/gen/java/org/bytedeco/pytorch/parameter_list.java new file mode 100644 index 00000000000..f650a73ab2b --- /dev/null +++ b/pytorch/src/gen/java/org/bytedeco/pytorch/parameter_list.java @@ -0,0 +1,32 @@ +// Targeted by JavaCPP version 1.5.10-SNAPSHOT: DO NOT EDIT THIS FILE + +package org.bytedeco.pytorch; + +import org.bytedeco.pytorch.Allocator; +import org.bytedeco.pytorch.Function; +import org.bytedeco.pytorch.functions.*; +import org.bytedeco.pytorch.Module; +import org.bytedeco.javacpp.annotation.Cast; +import java.nio.*; +import org.bytedeco.javacpp.*; +import org.bytedeco.javacpp.annotation.*; + +import static org.bytedeco.javacpp.presets.javacpp.*; +import static org.bytedeco.openblas.global.openblas_nolapack.*; +import static org.bytedeco.openblas.global.openblas.*; + +import static org.bytedeco.pytorch.global.torch.*; + +@Name("torch::jit::slot_list_impl") @NoOffset @Properties(inherit = org.bytedeco.pytorch.presets.torch.class) +public class parameter_list extends Pointer { + static { Loader.load(); } + /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ + public parameter_list(Pointer p) { super(p); } + + public native @ByVal parameter_iterator begin(); + public native @ByVal parameter_iterator end(); + public native @Cast("size_t") long size(); + + public parameter_list(@ByVal JitModule module, @Cast("bool") boolean recurse, @Cast("bool") boolean return_module) { super((Pointer)null); allocate(module, recurse, return_module); } + private native void allocate(@ByVal JitModule module, @Cast("bool") boolean recurse, @Cast("bool") boolean return_module); +} diff --git a/pytorch/src/main/java/org/bytedeco/pytorch/presets/torch.java b/pytorch/src/main/java/org/bytedeco/pytorch/presets/torch.java index ba44db2b1e4..18d481d541e 100644 --- a/pytorch/src/main/java/org/bytedeco/pytorch/presets/torch.java +++ b/pytorch/src/main/java/org/bytedeco/pytorch/presets/torch.java @@ -1123,7 +1123,10 @@ public void map(InfoMap infoMap) { //// Jit iterators for (String[] t : new String[][]{ - {"Module", "JitModule", "torch::jit::Module"} + {"Module", "JitModule", "torch::jit::Module"}, + {"Parameter", "Tensor", "torch::Tensor"}, + {"Attribute", "IValue", "c10::IValue"}, + {"Buffer", "Tensor", "torch::Tensor"} }) { infoMap.put(new Info( "torch::jit::slot_list_impl",