All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.bytedeco.pytorch.WithCurrentScope Maven / Gradle / Ivy

// Targeted by JavaCPP version 1.5.7: DO NOT EDIT THIS FILE

package org.bytedeco.pytorch;

import org.bytedeco.pytorch.Allocator;
import org.bytedeco.pytorch.Function;
import org.bytedeco.pytorch.Module;
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.*;


/** \brief An utility class for setting temporary scopes.
 *
 * When an object of this class is created, it stores the current scope, sets
 * the new one, and restores the original scope when the object is destroyed.
 */
@Namespace("torch::jit") @NoOffset @Properties(inherit = org.bytedeco.pytorch.presets.torch.class)
public class WithCurrentScope extends Pointer {
    static { Loader.load(); }
    /** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */
    public WithCurrentScope(Pointer p) { super(p); }

  public WithCurrentScope(@ByRef Graph g, @ByVal @Cast("torch::jit::ScopePtr*") Pointer scope) { super((Pointer)null); allocate(g, scope); }
  private native void allocate(@ByRef Graph g, @ByVal @Cast("torch::jit::ScopePtr*") Pointer scope);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy