角材进度条未显示

时间:2020-04-24 05:56:47

标签: html css angular angular-material

我正在尝试使用进度条,但没有显示出来,但是当我检查时看到了标签。以下是我到目前为止所做的事情。附上屏幕截图以供参考。另外,我还需要一些细节,例如我正在使用有角度的材质来渲染table,checkbox之类的所有组件,但它仍以旧样式显示。

我的app.component.html:

import Foundation
import Metal
import MetalPerformanceShaders

let device = MTLCreateSystemDefaultDevice()!
let commandQueue = device.makeCommandQueue()!

let rows = 8
let columns = 8
let matrixDescriptor = MPSMatrixDescriptor(rows: rows,
                                           columns: columns,
                                           rowBytes: MemoryLayout<Float>.stride * columns,
                                           dataType: .float32)
let mtMatrix = MPSMatrix(device: device, descriptor: matrixDescriptor)

let phMatrix = MPSMatrix(device: device, descriptor: matrixDescriptor)

let distribution = MPSMatrixRandomDistributionDescriptor.uniformDistributionDescriptor(withMinimum: -1.0, maximum: 1.0)

let mtKernel = MPSMatrixRandomMTGP32(device: device,
                                     destinationDataType: .float32,
                                     seed: 0,
                                     distributionDescriptor: distribution)

let phKernel = MPSMatrixRandomPhilox(device: device,
                                     destinationDataType: .float32,
                                     seed: 0,
                                     distributionDescriptor: distribution)


let commandBuffer = commandQueue.makeCommandBuffer()!
mtKernel.encode(commandBuffer: commandBuffer, destinationMatrix: mtMatrix)
phKernel.encode(commandBuffer: commandBuffer, destinationMatrix: phMatrix)
#if os(macOS)
mtMatrix.synchronize(on: commandBuffer)
phMatrix.synchronize(on: commandBuffer)
#endif
commandBuffer.commit()

commandBuffer.waitUntilCompleted() // Only necessary to ensure GPU->CPU sync for display

print("Mersenne Twister values:")
let mtValues = mtMatrix.data.contents().assumingMemoryBound(to: Float.self)
for row in 0..<rows {
    for col in 0..<columns {
        print("\(mtValues[row * columns + col])", terminator: " ")
    }
    print("")
}
print("")

print("Philox values:")
let phValues = phMatrix.data.contents().assumingMemoryBound(to: Float.self)
for row in 0..<rows {
    for col in 0..<columns {
        print("\(phValues[row * columns + col])", terminator: " ")
    }
    print("")
}

复选框:

enter image description here

enter image description here

0 个答案:

没有答案