Cannot pass 'DType' value, expected 'AnyTrivialRegType' in call parameter

Earlier the following used to work.

        
fn compare[op: Int, simd_width: Int = simdwidthof[dtype]()]
   (this: Payload[dtype], that: Payload[dtype]) -> Result[DType.bool]:

Now, it does not work anymore. Throws the following error:


error: cannot pass 'DType' value, expected 'AnyTrivialRegType' in call parameter
        op: Int, simd_width: Int = simdwidthof[dtype]()

What is the way out?

Is there a little more context around this code? Specifically what the current struct definition looks like and where dtype is coming from.

It seems to be choosing a different overload for simdwidthof (which by the way it getting replace with simd_width_of eventually) but unsure why without a bit more context.

Replacing simdwidthofwithsimd_width_of solved the issue. Thanks.

1 Like