public void forward(Std2DVeci inputs, ComputeSystem system, float alpha) { eogmaneoPINVOKE.Layer_forward(swigCPtr, Std2DVeci.getCPtr(inputs), ComputeSystem.getCPtr(system), alpha); if (eogmaneoPINVOKE.SWIGPendingException.Pending) { throw eogmaneoPINVOKE.SWIGPendingException.Retrieve(); } }
public void step(Std2DVeci inputs, ComputeSystem system) { eogmaneoPINVOKE.Hierarchy_step__SWIG_2(swigCPtr, Std2DVeci.getCPtr(inputs), ComputeSystem.getCPtr(system)); if (eogmaneoPINVOKE.SWIGPendingException.Pending) { throw eogmaneoPINVOKE.SWIGPendingException.Retrieve(); } }
public void save(ComputeSystem cs, string fileName) { csogmaneoPINVOKE.Hierarchy_save(swigCPtr, ComputeSystem.getCPtr(cs), fileName); if (csogmaneoPINVOKE.SWIGPendingException.Pending) { throw csogmaneoPINVOKE.SWIGPendingException.Retrieve(); } }
public void learn(float alpha, float gamma, ComputeSystem system) { eogmaneoPINVOKE.RandomEncoder_learn(swigCPtr, alpha, gamma, ComputeSystem.getCPtr(system)); if (eogmaneoPINVOKE.SWIGPendingException.Pending) { throw eogmaneoPINVOKE.SWIGPendingException.Retrieve(); } }
public void step(Std2DVeci inputs, ComputeSystem system, bool learn, float reward) { eogmaneoPINVOKE.Hierarchy_step__SWIG_0(swigCPtr, Std2DVeci.getCPtr(inputs), ComputeSystem.getCPtr(system), learn, reward); if (eogmaneoPINVOKE.SWIGPendingException.Pending) { throw eogmaneoPINVOKE.SWIGPendingException.Retrieve(); } }
public void activate(StdVecf input, ComputeSystem system, float radius, float thresh, int samples) { eogmaneoPINVOKE.CornerEncoder_activate(swigCPtr, StdVecf.getCPtr(input), ComputeSystem.getCPtr(system), radius, thresh, samples); if (eogmaneoPINVOKE.SWIGPendingException.Pending) { throw eogmaneoPINVOKE.SWIGPendingException.Retrieve(); } }
public void load(SWIGTYPE_p_ogmaneo__schemas__ValueField2D fbValueField2D, ComputeSystem cs) { csogmaneoPINVOKE.ValueField2D_load(swigCPtr, SWIGTYPE_p_ogmaneo__schemas__ValueField2D.getCPtr(fbValueField2D), ComputeSystem.getCPtr(cs)); if (csogmaneoPINVOKE.SWIGPendingException.Pending) { throw csogmaneoPINVOKE.SWIGPendingException.Retrieve(); } }
public void backward(Std2DVeci feedBack, ComputeSystem system, float reward, float beta, float delta, float gamma, float traceCutoff, float advScalar, float epsilon) { eogmaneoPINVOKE.Layer_backward(swigCPtr, Std2DVeci.getCPtr(feedBack), ComputeSystem.getCPtr(system), reward, beta, delta, gamma, traceCutoff, advScalar, epsilon); if (eogmaneoPINVOKE.SWIGPendingException.Pending) { throw eogmaneoPINVOKE.SWIGPendingException.Retrieve(); } }
public bool loadSparseFeaturesKernel(ComputeSystem cs, SparseFeaturesType type) { bool ret = csogmaneoPINVOKE.ComputeProgram_loadSparseFeaturesKernel(swigCPtr, ComputeSystem.getCPtr(cs), (int)type); if (csogmaneoPINVOKE.SWIGPendingException.Pending) { throw csogmaneoPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public bool loadPredictorKernel(ComputeSystem cs) { bool ret = csogmaneoPINVOKE.ComputeProgram_loadPredictorKernel(swigCPtr, ComputeSystem.getCPtr(cs)); if (csogmaneoPINVOKE.SWIGPendingException.Pending) { throw csogmaneoPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public bool loadFromFile(string name, ComputeSystem cs) { bool ret = csogmaneoPINVOKE.ComputeProgram_loadFromFile(swigCPtr, name, ComputeSystem.getCPtr(cs)); if (csogmaneoPINVOKE.SWIGPendingException.Pending) { throw csogmaneoPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public StdVecf reconstruct(StdVeci hiddenStates, ComputeSystem system) { StdVecf ret = new StdVecf(eogmaneoPINVOKE.RandomEncoder_reconstruct(swigCPtr, StdVeci.getCPtr(hiddenStates), ComputeSystem.getCPtr(system)), false); if (eogmaneoPINVOKE.SWIGPendingException.Pending) { throw eogmaneoPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public StdVeci activate(StdVecf input, ComputeSystem system) { StdVeci ret = new StdVeci(eogmaneoPINVOKE.RandomEncoder_activate__SWIG_1(swigCPtr, StdVecf.getCPtr(input), ComputeSystem.getCPtr(system)), false); if (eogmaneoPINVOKE.SWIGPendingException.Pending) { throw eogmaneoPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public static StdVecf sobel(StdVecf src, int width, float clip, ComputeSystem system, int chunkSize) { StdVecf ret = new StdVecf(eogmaneoPINVOKE.sobel(StdVecf.getCPtr(src), width, clip, ComputeSystem.getCPtr(system), chunkSize), true); if (eogmaneoPINVOKE.SWIGPendingException.Pending) { throw eogmaneoPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public ComputeSystem getComputeSystem() { global::System.IntPtr cPtr = csogmaneoPINVOKE.Resources_getComputeSystem(swigCPtr); ComputeSystem ret = (cPtr == global::System.IntPtr.Zero) ? null : new ComputeSystem(cPtr, true); if (csogmaneoPINVOKE.SWIGPendingException.Pending) { throw csogmaneoPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
void OnEnable() { uint[] args = new uint[5] { instanceMesh.GetIndexCount(0), (uint)(num.x * num.y), 0, 0, 0 }; argsBuffer = new ComputeBuffer(1, args.Length * sizeof(uint), ComputeBufferType.IndirectArguments); argsBuffer.SetData(args); system = new ComputeSystem(shader); system.AddKernel("Do", new Vector3Int(num.x, num.y, 1)); system.data.AddRenderTexture("u", GpuUtils.GetRenderTexture(num.x, num.y, 0, true, RenderTextureFormat.RFloat)); system.data.AddRenderTexture("v", GpuUtils.GetRenderTexture(num.x, num.y, 0, true, RenderTextureFormat.RFloat)); system.data.AddBuffer("buff", num.x * num.y, sizeof(float) * 4 * 2); system.data.AddBuffer("test", 1, sizeof(float)); system.BindComputeData(); // instanceMat.SetBuffer("buff", system.data.GetBuffer("buff")); //AAAA Time.fixedDeltaTime = 0.015f; }
public RenderSystemTest() { cam = new GameObject().AddComponent <Camera>(); cam.CopyFrom(Controller.currentCamera); cam.enabled = false; var computeShader = GameObject.Instantiate <ComputeShader>(Finder.Find <ComputeShader>("RenderTest")); computeSystem = new ComputeSystem(computeShader); mrtCam = new MRTCamera <DefferredBufferID>(cam); // mrtCam = new MRTCamera(cam, new DefferredBufferID()); mrtCam.GatherBuffers(); render = GpuUtils.GetScreenRenderTexture(0, true); deferredBuffers.Add(DefferredBufferID.Normals, new ComputeBuffer(Screen.width * Screen.height, sizeof(float) * 4)); deferredBuffers.Add(DefferredBufferID.Position, new ComputeBuffer(Screen.width * Screen.height, sizeof(float) * 4)); deferredBuffers.Add(DefferredBufferID.RenderIDs, new ComputeBuffer(Screen.width * Screen.height, sizeof(float) * 4)); //int Set(); }
public SWIGTYPE_p_flatbuffers__OffsetT_ogmaneo__schemas__ValueField2D_t save(SWIGTYPE_p_flatbuffers__FlatBufferBuilder builder, ComputeSystem cs) { SWIGTYPE_p_flatbuffers__OffsetT_ogmaneo__schemas__ValueField2D_t ret = new SWIGTYPE_p_flatbuffers__OffsetT_ogmaneo__schemas__ValueField2D_t(csogmaneoPINVOKE.ValueField2D_save(swigCPtr, SWIGTYPE_p_flatbuffers__FlatBufferBuilder.getCPtr(builder), ComputeSystem.getCPtr(cs)), true); if (csogmaneoPINVOKE.SWIGPendingException.Pending) { throw csogmaneoPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ComputeSystem obj) { return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr); }
public void load(SWIGTYPE_p_ogmaneo__schemas__ParameterModifier fbParameterModifier, ComputeSystem cs) { csogmaneoPINVOKE.ParameterModifier_load(swigCPtr, SWIGTYPE_p_ogmaneo__schemas__ParameterModifier.getCPtr(fbParameterModifier), ComputeSystem.getCPtr(cs)); if (csogmaneoPINVOKE.SWIGPendingException.Pending) { throw csogmaneoPINVOKE.SWIGPendingException.Retrieve(); } }
public static StdVecf whiten(StdVecf src, int width, int radius, float strength, ComputeSystem system, int chunkSize) { StdVecf ret = new StdVecf(eogmaneoPINVOKE.whiten__SWIG_0(StdVecf.getCPtr(src), width, radius, strength, ComputeSystem.getCPtr(system), chunkSize), true); if (eogmaneoPINVOKE.SWIGPendingException.Pending) { throw eogmaneoPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }