@@ -234,41 +234,41 @@ end
234234=============================================================================#
235235
236236"""
237- IdentityOp
237+ IdentityVal
238238
239239Abstract type for binary operation identity attributes (reduce, scan, etc.).
240240"""
241- abstract type IdentityOp end
241+ abstract type IdentityVal end
242242
243243"""
244- FloatIdentityOp (value, type_id, dtype)
244+ FloatIdentityVal (value, type_id, dtype)
245245
246246Float identity value for binary operations.
247247"""
248- struct FloatIdentityOp <: IdentityOp
248+ struct FloatIdentityVal <: IdentityVal
249249 value:: Float64
250250 type_id:: TypeId
251251 dtype:: Type # Float16, Float32, Float64, etc.
252252end
253253
254254"""
255- IntegerIdentityOp (value, type_id, dtype)
255+ IntegerIdentityVal (value, type_id, dtype)
256256
257257Integer identity value for binary operations.
258258"""
259- struct IntegerIdentityOp <: IdentityOp
259+ struct IntegerIdentityVal <: IdentityVal
260260 value:: UInt128 # Store as UInt128 to handle all unsigned values up to 64 bits
261261 type_id:: TypeId
262262 dtype:: Type # Int8, Int16, Int32, Int64, UInt8, etc. (signedness inferred from dtype)
263263end
264264
265265"""
266- encode_tagged_float!(cb, identity::FloatIdentityOp )
266+ encode_tagged_float!(cb, identity::FloatIdentityVal )
267267
268268Encode a tagged float attribute for reduce identity.
269269Format: tag(Float=0x02) + typeid + ap_int(value_bits)
270270"""
271- function encode_tagged_float! (cb:: CodeBuilder , identity:: FloatIdentityOp )
271+ function encode_tagged_float! (cb:: CodeBuilder , identity:: FloatIdentityVal )
272272 # Tag for Float attribute
273273 push! (cb. buf, 0x02 )
274274 # Type ID
@@ -279,12 +279,12 @@ function encode_tagged_float!(cb::CodeBuilder, identity::FloatIdentityOp)
279279end
280280
281281"""
282- encode_tagged_int!(cb, identity::IntegerIdentityOp )
282+ encode_tagged_int!(cb, identity::IntegerIdentityVal )
283283
284284Encode a tagged integer identity attribute.
285285Format: tag(Int=0x01) + typeid + ap_int(value)
286286"""
287- function encode_tagged_int! (cb:: CodeBuilder , identity:: IntegerIdentityOp )
287+ function encode_tagged_int! (cb:: CodeBuilder , identity:: IntegerIdentityVal )
288288 # Tag for Int attribute
289289 push! (cb. buf, 0x01 )
290290 # Type ID
347347Encode an array of binary operation identity attributes.
348348Dispatches on identity type to encode correctly.
349349"""
350- function encode_identity_array! (cb:: CodeBuilder , identities:: Vector{<:IdentityOp } )
350+ function encode_identity_array! (cb:: CodeBuilder , identities:: Vector{<:IdentityVal } )
351351 encode_varint! (cb. buf, length (identities))
352352 for identity in identities
353353 encode_identity! (cb, identity)
359359
360360Encode a single identity attribute, dispatching on type.
361361"""
362- encode_identity! (cb:: CodeBuilder , identity:: FloatIdentityOp ) = encode_tagged_float! (cb, identity)
363- encode_identity! (cb:: CodeBuilder , identity:: IntegerIdentityOp ) = encode_tagged_int! (cb, identity)
362+ encode_identity! (cb:: CodeBuilder , identity:: FloatIdentityVal ) = encode_tagged_float! (cb, identity)
363+ encode_identity! (cb:: CodeBuilder , identity:: IntegerIdentityVal ) = encode_tagged_int! (cb, identity)
364364
365365"""
366366 BytecodeWriter
0 commit comments