         super.viewDidLoad()
 
         if NSProcessInfo.processInfo().environment["SAMOFLY_UNIT_TESTS"] == nil {
-            // Initialize Metal
             initMetal()
         }
 

    var running: Bool = false

    var metalDevice: MTLDevice?
    var metalLib: MTLLibrary?
    var commandQueue: MTLCommandQueue?
    var textureCache : Unmanaged<CVMetalTextureCacheRef>?
    var input: MTLTexture?
    var output : MTLTexture?
    var outputBGRA : MTLTexture?

    // Shaders
    var cropAndRotateState: MTLComputePipelineState?
    var crop352x288to224State: MTLComputePipelineState?
    var float2BGRAState : MTLComputePipelineState?

    var engine: Engine?
    var net : Net?

        }
    }

    private func initMetal() {
        engine = Engine()
        net = Net(engine: engine!, config: GoogLeNetConfig(),
            threadsPerThreadgroup: GoogLeNetProfile.GetThreadsPerThreadgroup())
        metalDevice = MTLCreateSystemDefaultDevice()
        CVMetalTextureCacheCreate(kCFAllocatorDefault, nil, metalDevice!, nil, &textureCache)

        // init output texture
        let outputDesc = MTLTextureDescriptor()
