GoodAI.Core.Observers.MyMemoryBlockObserver.Execute C# (CSharp) Method

Execute() protected method

protected Execute ( ) : void
return void
        protected override void Execute()
        {
            if (ObserveTensors)
            {
                if (Method == RenderingMethod.RGB)
                {
                    m_tiledRGBKernel.SetupExecution(TextureSize);
                    m_tiledRGBKernel.Run(Target.GetDevicePtr(ObserverGPU, 0, TimeStep), VBODevicePointer, TextureWidth, TextureHeight, TextureSize, TileWidth, TileHeight, TilesInRow, TilesInColumn, MaxValue, m_noBlocks);
                }
                else
                {
                    m_tiledKernel.SetupExecution(TextureSize);
                    m_tiledKernel.Run(Target.GetDevicePtr(ObserverGPU, 0, TimeStep), (int)Method, (int)Scale, MinValue, MaxValue, VBODevicePointer, TextureSize, TextureWidth, TextureHeight, TileWidth, TileHeight, TilesInRow, m_noBlocks);
                }
            }
            else
            {
                if (Method == RenderingMethod.Vector)
                {
                    m_vectorKernel.SetupExecution(TextureSize);
                    m_vectorKernel.Run(Target.GetDevicePtr(ObserverGPU, 0, TimeStep), Elements, MaxValue, VBODevicePointer, TextureSize);
                }
                else if (Method == RenderingMethod.RGB)
                {
                    m_rgbKernel.SetupExecution(TextureSize);
                    m_rgbKernel.Run(Target.GetDevicePtr(ObserverGPU, 0, TimeStep), VBODevicePointer, TextureSize);
                }
                else
                {
                    m_kernel.SetupExecution(TextureSize);
                    m_kernel.Run(Target.GetDevicePtr(ObserverGPU, 0, TimeStep), (int)Method, (int)Scale, MinValue, MaxValue, VBODevicePointer, Math.Min(TextureSize, Target.Count));
                }
            }
        }