@@ -20,31 +20,30 @@ struct CodeGenerator {
2020 try realFunctionsSIMDExtension. write ( to: realFunctionSIMDFileURL, atomically: true , encoding: . utf8)
2121
2222 let floatingPointTypes : [ String ] = [ " Float " , " Double " ]
23- let simdSizes : [ Int ] = [ 2 , 4 , 8 , 16 , 32 , 64 ]
23+ let simdWidths : [ Int ] = [ 2 , 4 , 8 , 16 , 32 , 64 ]
2424
2525 for floatingPointType in floatingPointTypes {
2626 // Generator Derivatives for RealFunctions for floating point types
2727 let realFunctionDerivativesFileURL = output. appending (
2828 component: " \( floatingPointType) +RealFunctions+Derivatives.swift " ,
2929 directoryHint: . notDirectory
3030 )
31- let type = floatingPointType
3231 let realFunctionsDerivativesExtensionCode = RealFunctionsDerivativesGenerator . realFunctionsDerivativesExtension (
33- type: type ,
32+ type: floatingPointType ,
3433 floatingPointType: floatingPointType
3534 )
3635 try realFunctionsDerivativesExtensionCode. write ( to: realFunctionDerivativesFileURL, atomically: true , encoding: . utf8)
3736
38- for simdSize in simdSizes {
37+ for simdWidth in simdWidths {
3938 let realFunctionFileURL = output. appending (
40- component: " SIMD \( simdSize ) + \( floatingPointType) +RealFunctions.swift " ,
39+ component: " SIMD \( simdWidth ) + \( floatingPointType) +RealFunctions.swift " ,
4140 directoryHint: . notDirectory
4241 )
43- let simdType = " SIMD \( simdSize ) < \( floatingPointType) > "
42+ let simdType = " SIMD \( simdWidth ) < \( floatingPointType) > "
4443
4544 // no simd methods exist for simd size >= 16 and scalar > Float so we don't add acceleration to those.
46- var simdAccelerated : Bool
47- if simdSize > 16 || ( simdSize == 16 && floatingPointType == " Double " ) {
45+ let simdAccelerated : Bool
46+ if simdWidth > 16 || ( simdWidth == 16 && floatingPointType == " Double " ) {
4847 simdAccelerated = false
4948 }
5049 else {
@@ -62,8 +61,8 @@ struct CodeGenerator {
6261
6362 // Generate RealFunctions derivatives for concrete SIMD types
6463 let realFunctionDerivativesFileURL = output
65- . appending ( component: " SIMD \( simdSize ) + \( floatingPointType) +RealFunctions+Derivatives.swift " )
66- let type = " SIMD \( simdSize ) < \( floatingPointType) > "
64+ . appending ( component: " SIMD \( simdWidth ) + \( floatingPointType) +RealFunctions+Derivatives.swift " )
65+ let type = " SIMD \( simdWidth ) < \( floatingPointType) > "
6766 let realFunctionsDerivativesExtensionCode = RealFunctionsDerivativesGenerator . realFunctionsDerivativesExtension (
6867 type: type,
6968 floatingPointType: floatingPointType
0 commit comments