提交 ddfa22a6 编写于 作者: R Ray Liu 提交者: GitHub

Merge pull request #1421 from loadingArbert/wayneliu/switchSwiftPB

resolve PMOpDesc&ProgramOptimize warning
...@@ -27,7 +27,7 @@ class PMOpDesc { ...@@ -27,7 +27,7 @@ class PMOpDesc {
var map: [String : [String]] = [:] var map: [String : [String]] = [:]
for opDescVar in vars { for opDescVar in vars {
if (canAdd(opDescVar.parameter)) { if (canAdd(opDescVar.parameter)) {
map[opDescVar.parameter] = opDescVar.argumentsArray as! [String] map[opDescVar.parameter] = opDescVar.argumentsArray as? [String]
} }
} }
return map return map
......
...@@ -292,7 +292,7 @@ class ProgramOptimize<P: PrecisionType> { ...@@ -292,7 +292,7 @@ class ProgramOptimize<P: PrecisionType> {
ops.append(node.opDesc!) ops.append(node.opDesc!)
} }
var newProgramDesc = PMProgramDesc.init() let newProgramDesc = PMProgramDesc.init()
let newBlock = PMBlockDesc.init(inVars: block.vars, inOps: ops) let newBlock = PMBlockDesc.init(inVars: block.vars, inOps: ops)
newProgramDesc.blocks.append(newBlock) newProgramDesc.blocks.append(newBlock)
return newProgramDesc return newProgramDesc
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册