From be9e0e279f5d9c3f31bfb30995c9bc92396874f0 Mon Sep 17 00:00:00 2001 From: Danny McCormick Date: Thu, 12 May 2022 16:59:17 -0400 Subject: [PATCH 1/5] Add function for simple function registration --- sdks/go/pkg/beam/register/register.go | 593 ++++++++++++++++++--- sdks/go/pkg/beam/register/register.tmpl | 9 +- sdks/go/pkg/beam/register/register_test.go | 30 ++ 3 files changed, 565 insertions(+), 67 deletions(-) diff --git a/sdks/go/pkg/beam/register/register.go b/sdks/go/pkg/beam/register/register.go index f8f6895f3612..a7c2f8e971c6 100644 --- a/sdks/go/pkg/beam/register/register.go +++ b/sdks/go/pkg/beam/register/register.go @@ -2250,12 +2250,18 @@ func registerDoFn0x0StructWrappersAndFuncs(doFn genericDoFn0x0) { reflectx.RegisterStructWrapper(reflect.TypeOf(doFn).Elem(), wrapperFn) } -// DoFn0x0 registers your DoFn to optimize execution at runtime. +// DoFn0x0 registers your structural DoFn to optimize execution at runtime. func DoFn0x0(doFn genericDoFn0x0) { registerDoFnTypes(doFn) registerDoFn0x0StructWrappersAndFuncs(doFn) } +// Function0x0 registers your non-structural DoFn to optimize execution at runtime. +func Function0x0(doFn func()) { + runtime.RegisterFunction(doFn) + registerMethodTypes(reflect.TypeOf(doFn)) +} + type genericDoFn1x0[I0 any] interface { ProcessElement(i0 I0) } @@ -2320,13 +2326,20 @@ func registerDoFn1x0StructWrappersAndFuncs[I0 any](doFn genericDoFn1x0[I0]) { reflectx.RegisterStructWrapper(reflect.TypeOf(doFn).Elem(), wrapperFn) } -// DoFn1x0[I0 any] registers your DoFn to optimize execution at runtime. +// DoFn1x0[I0 any] registers your structural DoFn to optimize execution at runtime. // DoFn input and output parameter types should be provided in order as the generic constraints. func DoFn1x0[I0 any](doFn genericDoFn1x0[I0]) { registerDoFnTypes(doFn) registerDoFn1x0StructWrappersAndFuncs[I0](doFn) } +// Function1x0[I0 any] registers your non-structural DoFn to optimize execution at runtime. +// Function input and output parameter types should be provided in order as the generic constraints. +func Function1x0[I0 any](doFn func(I0)) { + runtime.RegisterFunction(doFn) + registerMethodTypes(reflect.TypeOf(doFn)) +} + type genericDoFn2x0[I0, I1 any] interface { ProcessElement(i0 I0, i1 I1) } @@ -2391,13 +2404,20 @@ func registerDoFn2x0StructWrappersAndFuncs[I0, I1 any](doFn genericDoFn2x0[I0, I reflectx.RegisterStructWrapper(reflect.TypeOf(doFn).Elem(), wrapperFn) } -// DoFn2x0[I0, I1 any] registers your DoFn to optimize execution at runtime. +// DoFn2x0[I0, I1 any] registers your structural DoFn to optimize execution at runtime. // DoFn input and output parameter types should be provided in order as the generic constraints. func DoFn2x0[I0, I1 any](doFn genericDoFn2x0[I0, I1]) { registerDoFnTypes(doFn) registerDoFn2x0StructWrappersAndFuncs[I0, I1](doFn) } +// Function2x0[I0, I1 any] registers your non-structural DoFn to optimize execution at runtime. +// Function input and output parameter types should be provided in order as the generic constraints. +func Function2x0[I0, I1 any](doFn func(I0, I1)) { + runtime.RegisterFunction(doFn) + registerMethodTypes(reflect.TypeOf(doFn)) +} + type genericDoFn3x0[I0, I1, I2 any] interface { ProcessElement(i0 I0, i1 I1, i2 I2) } @@ -2462,13 +2482,20 @@ func registerDoFn3x0StructWrappersAndFuncs[I0, I1, I2 any](doFn genericDoFn3x0[I reflectx.RegisterStructWrapper(reflect.TypeOf(doFn).Elem(), wrapperFn) } -// DoFn3x0[I0, I1, I2 any] registers your DoFn to optimize execution at runtime. +// DoFn3x0[I0, I1, I2 any] registers your structural DoFn to optimize execution at runtime. // DoFn input and output parameter types should be provided in order as the generic constraints. func DoFn3x0[I0, I1, I2 any](doFn genericDoFn3x0[I0, I1, I2]) { registerDoFnTypes(doFn) registerDoFn3x0StructWrappersAndFuncs[I0, I1, I2](doFn) } +// Function3x0[I0, I1, I2 any] registers your non-structural DoFn to optimize execution at runtime. +// Function input and output parameter types should be provided in order as the generic constraints. +func Function3x0[I0, I1, I2 any](doFn func(I0, I1, I2)) { + runtime.RegisterFunction(doFn) + registerMethodTypes(reflect.TypeOf(doFn)) +} + type genericDoFn4x0[I0, I1, I2, I3 any] interface { ProcessElement(i0 I0, i1 I1, i2 I2, i3 I3) } @@ -2533,13 +2560,20 @@ func registerDoFn4x0StructWrappersAndFuncs[I0, I1, I2, I3 any](doFn genericDoFn4 reflectx.RegisterStructWrapper(reflect.TypeOf(doFn).Elem(), wrapperFn) } -// DoFn4x0[I0, I1, I2, I3 any] registers your DoFn to optimize execution at runtime. +// DoFn4x0[I0, I1, I2, I3 any] registers your structural DoFn to optimize execution at runtime. // DoFn input and output parameter types should be provided in order as the generic constraints. func DoFn4x0[I0, I1, I2, I3 any](doFn genericDoFn4x0[I0, I1, I2, I3]) { registerDoFnTypes(doFn) registerDoFn4x0StructWrappersAndFuncs[I0, I1, I2, I3](doFn) } +// Function4x0[I0, I1, I2, I3 any] registers your non-structural DoFn to optimize execution at runtime. +// Function input and output parameter types should be provided in order as the generic constraints. +func Function4x0[I0, I1, I2, I3 any](doFn func(I0, I1, I2, I3)) { + runtime.RegisterFunction(doFn) + registerMethodTypes(reflect.TypeOf(doFn)) +} + type genericDoFn5x0[I0, I1, I2, I3, I4 any] interface { ProcessElement(i0 I0, i1 I1, i2 I2, i3 I3, i4 I4) } @@ -2604,13 +2638,20 @@ func registerDoFn5x0StructWrappersAndFuncs[I0, I1, I2, I3, I4 any](doFn genericD reflectx.RegisterStructWrapper(reflect.TypeOf(doFn).Elem(), wrapperFn) } -// DoFn5x0[I0, I1, I2, I3, I4 any] registers your DoFn to optimize execution at runtime. +// DoFn5x0[I0, I1, I2, I3, I4 any] registers your structural DoFn to optimize execution at runtime. // DoFn input and output parameter types should be provided in order as the generic constraints. func DoFn5x0[I0, I1, I2, I3, I4 any](doFn genericDoFn5x0[I0, I1, I2, I3, I4]) { registerDoFnTypes(doFn) registerDoFn5x0StructWrappersAndFuncs[I0, I1, I2, I3, I4](doFn) } +// Function5x0[I0, I1, I2, I3, I4 any] registers your non-structural DoFn to optimize execution at runtime. +// Function input and output parameter types should be provided in order as the generic constraints. +func Function5x0[I0, I1, I2, I3, I4 any](doFn func(I0, I1, I2, I3, I4)) { + runtime.RegisterFunction(doFn) + registerMethodTypes(reflect.TypeOf(doFn)) +} + type genericDoFn6x0[I0, I1, I2, I3, I4, I5 any] interface { ProcessElement(i0 I0, i1 I1, i2 I2, i3 I3, i4 I4, i5 I5) } @@ -2675,13 +2716,20 @@ func registerDoFn6x0StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5 any](doFn gene reflectx.RegisterStructWrapper(reflect.TypeOf(doFn).Elem(), wrapperFn) } -// DoFn6x0[I0, I1, I2, I3, I4, I5 any] registers your DoFn to optimize execution at runtime. +// DoFn6x0[I0, I1, I2, I3, I4, I5 any] registers your structural DoFn to optimize execution at runtime. // DoFn input and output parameter types should be provided in order as the generic constraints. func DoFn6x0[I0, I1, I2, I3, I4, I5 any](doFn genericDoFn6x0[I0, I1, I2, I3, I4, I5]) { registerDoFnTypes(doFn) registerDoFn6x0StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5](doFn) } +// Function6x0[I0, I1, I2, I3, I4, I5 any] registers your non-structural DoFn to optimize execution at runtime. +// Function input and output parameter types should be provided in order as the generic constraints. +func Function6x0[I0, I1, I2, I3, I4, I5 any](doFn func(I0, I1, I2, I3, I4, I5)) { + runtime.RegisterFunction(doFn) + registerMethodTypes(reflect.TypeOf(doFn)) +} + type genericDoFn7x0[I0, I1, I2, I3, I4, I5, I6 any] interface { ProcessElement(i0 I0, i1 I1, i2 I2, i3 I3, i4 I4, i5 I5, i6 I6) } @@ -2746,13 +2794,20 @@ func registerDoFn7x0StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, I6 any](doFn reflectx.RegisterStructWrapper(reflect.TypeOf(doFn).Elem(), wrapperFn) } -// DoFn7x0[I0, I1, I2, I3, I4, I5, I6 any] registers your DoFn to optimize execution at runtime. +// DoFn7x0[I0, I1, I2, I3, I4, I5, I6 any] registers your structural DoFn to optimize execution at runtime. // DoFn input and output parameter types should be provided in order as the generic constraints. func DoFn7x0[I0, I1, I2, I3, I4, I5, I6 any](doFn genericDoFn7x0[I0, I1, I2, I3, I4, I5, I6]) { registerDoFnTypes(doFn) registerDoFn7x0StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, I6](doFn) } +// Function7x0[I0, I1, I2, I3, I4, I5, I6 any] registers your non-structural DoFn to optimize execution at runtime. +// Function input and output parameter types should be provided in order as the generic constraints. +func Function7x0[I0, I1, I2, I3, I4, I5, I6 any](doFn func(I0, I1, I2, I3, I4, I5, I6)) { + runtime.RegisterFunction(doFn) + registerMethodTypes(reflect.TypeOf(doFn)) +} + type genericDoFn8x0[I0, I1, I2, I3, I4, I5, I6, I7 any] interface { ProcessElement(i0 I0, i1 I1, i2 I2, i3 I3, i4 I4, i5 I5, i6 I6, i7 I7) } @@ -2817,13 +2872,20 @@ func registerDoFn8x0StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, I6, I7 any](d reflectx.RegisterStructWrapper(reflect.TypeOf(doFn).Elem(), wrapperFn) } -// DoFn8x0[I0, I1, I2, I3, I4, I5, I6, I7 any] registers your DoFn to optimize execution at runtime. +// DoFn8x0[I0, I1, I2, I3, I4, I5, I6, I7 any] registers your structural DoFn to optimize execution at runtime. // DoFn input and output parameter types should be provided in order as the generic constraints. func DoFn8x0[I0, I1, I2, I3, I4, I5, I6, I7 any](doFn genericDoFn8x0[I0, I1, I2, I3, I4, I5, I6, I7]) { registerDoFnTypes(doFn) registerDoFn8x0StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, I6, I7](doFn) } +// Function8x0[I0, I1, I2, I3, I4, I5, I6, I7 any] registers your non-structural DoFn to optimize execution at runtime. +// Function input and output parameter types should be provided in order as the generic constraints. +func Function8x0[I0, I1, I2, I3, I4, I5, I6, I7 any](doFn func(I0, I1, I2, I3, I4, I5, I6, I7)) { + runtime.RegisterFunction(doFn) + registerMethodTypes(reflect.TypeOf(doFn)) +} + type genericDoFn9x0[I0, I1, I2, I3, I4, I5, I6, I7, I8 any] interface { ProcessElement(i0 I0, i1 I1, i2 I2, i3 I3, i4 I4, i5 I5, i6 I6, i7 I7, i8 I8) } @@ -2888,13 +2950,20 @@ func registerDoFn9x0StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, I6, I7, I8 an reflectx.RegisterStructWrapper(reflect.TypeOf(doFn).Elem(), wrapperFn) } -// DoFn9x0[I0, I1, I2, I3, I4, I5, I6, I7, I8 any] registers your DoFn to optimize execution at runtime. +// DoFn9x0[I0, I1, I2, I3, I4, I5, I6, I7, I8 any] registers your structural DoFn to optimize execution at runtime. // DoFn input and output parameter types should be provided in order as the generic constraints. func DoFn9x0[I0, I1, I2, I3, I4, I5, I6, I7, I8 any](doFn genericDoFn9x0[I0, I1, I2, I3, I4, I5, I6, I7, I8]) { registerDoFnTypes(doFn) registerDoFn9x0StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, I6, I7, I8](doFn) } +// Function9x0[I0, I1, I2, I3, I4, I5, I6, I7, I8 any] registers your non-structural DoFn to optimize execution at runtime. +// Function input and output parameter types should be provided in order as the generic constraints. +func Function9x0[I0, I1, I2, I3, I4, I5, I6, I7, I8 any](doFn func(I0, I1, I2, I3, I4, I5, I6, I7, I8)) { + runtime.RegisterFunction(doFn) + registerMethodTypes(reflect.TypeOf(doFn)) +} + type genericDoFn10x0[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9 any] interface { ProcessElement(i0 I0, i1 I1, i2 I2, i3 I3, i4 I4, i5 I5, i6 I6, i7 I7, i8 I8, i9 I9) } @@ -2959,13 +3028,20 @@ func registerDoFn10x0StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, I6, I7, I8, reflectx.RegisterStructWrapper(reflect.TypeOf(doFn).Elem(), wrapperFn) } -// DoFn10x0[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9 any] registers your DoFn to optimize execution at runtime. +// DoFn10x0[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9 any] registers your structural DoFn to optimize execution at runtime. // DoFn input and output parameter types should be provided in order as the generic constraints. func DoFn10x0[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9 any](doFn genericDoFn10x0[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9]) { registerDoFnTypes(doFn) registerDoFn10x0StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9](doFn) } +// Function10x0[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9 any] registers your non-structural DoFn to optimize execution at runtime. +// Function input and output parameter types should be provided in order as the generic constraints. +func Function10x0[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9 any](doFn func(I0, I1, I2, I3, I4, I5, I6, I7, I8, I9)) { + runtime.RegisterFunction(doFn) + registerMethodTypes(reflect.TypeOf(doFn)) +} + type genericDoFn0x1[R0 any] interface { ProcessElement() R0 } @@ -3030,13 +3106,20 @@ func registerDoFn0x1StructWrappersAndFuncs[R0 any](doFn genericDoFn0x1[R0]) { reflectx.RegisterStructWrapper(reflect.TypeOf(doFn).Elem(), wrapperFn) } -// DoFn0x1[R0 any] registers your DoFn to optimize execution at runtime. +// DoFn0x1[R0 any] registers your structural DoFn to optimize execution at runtime. // DoFn input and output parameter types should be provided in order as the generic constraints. func DoFn0x1[R0 any](doFn genericDoFn0x1[R0]) { registerDoFnTypes(doFn) registerDoFn0x1StructWrappersAndFuncs[R0](doFn) } +// Function0x1[R0 any] registers your non-structural DoFn to optimize execution at runtime. +// Function input and output parameter types should be provided in order as the generic constraints. +func Function0x1[R0 any](doFn func() R0) { + runtime.RegisterFunction(doFn) + registerMethodTypes(reflect.TypeOf(doFn)) +} + type genericDoFn1x1[I0, R0 any] interface { ProcessElement(i0 I0) R0 } @@ -3101,13 +3184,20 @@ func registerDoFn1x1StructWrappersAndFuncs[I0, R0 any](doFn genericDoFn1x1[I0, R reflectx.RegisterStructWrapper(reflect.TypeOf(doFn).Elem(), wrapperFn) } -// DoFn1x1[I0, R0 any] registers your DoFn to optimize execution at runtime. +// DoFn1x1[I0, R0 any] registers your structural DoFn to optimize execution at runtime. // DoFn input and output parameter types should be provided in order as the generic constraints. func DoFn1x1[I0, R0 any](doFn genericDoFn1x1[I0, R0]) { registerDoFnTypes(doFn) registerDoFn1x1StructWrappersAndFuncs[I0, R0](doFn) } +// Function1x1[I0, R0 any] registers your non-structural DoFn to optimize execution at runtime. +// Function input and output parameter types should be provided in order as the generic constraints. +func Function1x1[I0, R0 any](doFn func(I0) R0) { + runtime.RegisterFunction(doFn) + registerMethodTypes(reflect.TypeOf(doFn)) +} + type genericDoFn2x1[I0, I1, R0 any] interface { ProcessElement(i0 I0, i1 I1) R0 } @@ -3172,13 +3262,20 @@ func registerDoFn2x1StructWrappersAndFuncs[I0, I1, R0 any](doFn genericDoFn2x1[I reflectx.RegisterStructWrapper(reflect.TypeOf(doFn).Elem(), wrapperFn) } -// DoFn2x1[I0, I1, R0 any] registers your DoFn to optimize execution at runtime. +// DoFn2x1[I0, I1, R0 any] registers your structural DoFn to optimize execution at runtime. // DoFn input and output parameter types should be provided in order as the generic constraints. func DoFn2x1[I0, I1, R0 any](doFn genericDoFn2x1[I0, I1, R0]) { registerDoFnTypes(doFn) registerDoFn2x1StructWrappersAndFuncs[I0, I1, R0](doFn) } +// Function2x1[I0, I1, R0 any] registers your non-structural DoFn to optimize execution at runtime. +// Function input and output parameter types should be provided in order as the generic constraints. +func Function2x1[I0, I1, R0 any](doFn func(I0, I1) R0) { + runtime.RegisterFunction(doFn) + registerMethodTypes(reflect.TypeOf(doFn)) +} + type genericDoFn3x1[I0, I1, I2, R0 any] interface { ProcessElement(i0 I0, i1 I1, i2 I2) R0 } @@ -3243,13 +3340,20 @@ func registerDoFn3x1StructWrappersAndFuncs[I0, I1, I2, R0 any](doFn genericDoFn3 reflectx.RegisterStructWrapper(reflect.TypeOf(doFn).Elem(), wrapperFn) } -// DoFn3x1[I0, I1, I2, R0 any] registers your DoFn to optimize execution at runtime. +// DoFn3x1[I0, I1, I2, R0 any] registers your structural DoFn to optimize execution at runtime. // DoFn input and output parameter types should be provided in order as the generic constraints. func DoFn3x1[I0, I1, I2, R0 any](doFn genericDoFn3x1[I0, I1, I2, R0]) { registerDoFnTypes(doFn) registerDoFn3x1StructWrappersAndFuncs[I0, I1, I2, R0](doFn) } +// Function3x1[I0, I1, I2, R0 any] registers your non-structural DoFn to optimize execution at runtime. +// Function input and output parameter types should be provided in order as the generic constraints. +func Function3x1[I0, I1, I2, R0 any](doFn func(I0, I1, I2) R0) { + runtime.RegisterFunction(doFn) + registerMethodTypes(reflect.TypeOf(doFn)) +} + type genericDoFn4x1[I0, I1, I2, I3, R0 any] interface { ProcessElement(i0 I0, i1 I1, i2 I2, i3 I3) R0 } @@ -3314,13 +3418,20 @@ func registerDoFn4x1StructWrappersAndFuncs[I0, I1, I2, I3, R0 any](doFn genericD reflectx.RegisterStructWrapper(reflect.TypeOf(doFn).Elem(), wrapperFn) } -// DoFn4x1[I0, I1, I2, I3, R0 any] registers your DoFn to optimize execution at runtime. +// DoFn4x1[I0, I1, I2, I3, R0 any] registers your structural DoFn to optimize execution at runtime. // DoFn input and output parameter types should be provided in order as the generic constraints. func DoFn4x1[I0, I1, I2, I3, R0 any](doFn genericDoFn4x1[I0, I1, I2, I3, R0]) { registerDoFnTypes(doFn) registerDoFn4x1StructWrappersAndFuncs[I0, I1, I2, I3, R0](doFn) } +// Function4x1[I0, I1, I2, I3, R0 any] registers your non-structural DoFn to optimize execution at runtime. +// Function input and output parameter types should be provided in order as the generic constraints. +func Function4x1[I0, I1, I2, I3, R0 any](doFn func(I0, I1, I2, I3) R0) { + runtime.RegisterFunction(doFn) + registerMethodTypes(reflect.TypeOf(doFn)) +} + type genericDoFn5x1[I0, I1, I2, I3, I4, R0 any] interface { ProcessElement(i0 I0, i1 I1, i2 I2, i3 I3, i4 I4) R0 } @@ -3385,13 +3496,20 @@ func registerDoFn5x1StructWrappersAndFuncs[I0, I1, I2, I3, I4, R0 any](doFn gene reflectx.RegisterStructWrapper(reflect.TypeOf(doFn).Elem(), wrapperFn) } -// DoFn5x1[I0, I1, I2, I3, I4, R0 any] registers your DoFn to optimize execution at runtime. +// DoFn5x1[I0, I1, I2, I3, I4, R0 any] registers your structural DoFn to optimize execution at runtime. // DoFn input and output parameter types should be provided in order as the generic constraints. func DoFn5x1[I0, I1, I2, I3, I4, R0 any](doFn genericDoFn5x1[I0, I1, I2, I3, I4, R0]) { registerDoFnTypes(doFn) registerDoFn5x1StructWrappersAndFuncs[I0, I1, I2, I3, I4, R0](doFn) } +// Function5x1[I0, I1, I2, I3, I4, R0 any] registers your non-structural DoFn to optimize execution at runtime. +// Function input and output parameter types should be provided in order as the generic constraints. +func Function5x1[I0, I1, I2, I3, I4, R0 any](doFn func(I0, I1, I2, I3, I4) R0) { + runtime.RegisterFunction(doFn) + registerMethodTypes(reflect.TypeOf(doFn)) +} + type genericDoFn6x1[I0, I1, I2, I3, I4, I5, R0 any] interface { ProcessElement(i0 I0, i1 I1, i2 I2, i3 I3, i4 I4, i5 I5) R0 } @@ -3456,13 +3574,20 @@ func registerDoFn6x1StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, R0 any](doFn reflectx.RegisterStructWrapper(reflect.TypeOf(doFn).Elem(), wrapperFn) } -// DoFn6x1[I0, I1, I2, I3, I4, I5, R0 any] registers your DoFn to optimize execution at runtime. +// DoFn6x1[I0, I1, I2, I3, I4, I5, R0 any] registers your structural DoFn to optimize execution at runtime. // DoFn input and output parameter types should be provided in order as the generic constraints. func DoFn6x1[I0, I1, I2, I3, I4, I5, R0 any](doFn genericDoFn6x1[I0, I1, I2, I3, I4, I5, R0]) { registerDoFnTypes(doFn) registerDoFn6x1StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, R0](doFn) } +// Function6x1[I0, I1, I2, I3, I4, I5, R0 any] registers your non-structural DoFn to optimize execution at runtime. +// Function input and output parameter types should be provided in order as the generic constraints. +func Function6x1[I0, I1, I2, I3, I4, I5, R0 any](doFn func(I0, I1, I2, I3, I4, I5) R0) { + runtime.RegisterFunction(doFn) + registerMethodTypes(reflect.TypeOf(doFn)) +} + type genericDoFn7x1[I0, I1, I2, I3, I4, I5, I6, R0 any] interface { ProcessElement(i0 I0, i1 I1, i2 I2, i3 I3, i4 I4, i5 I5, i6 I6) R0 } @@ -3527,13 +3652,20 @@ func registerDoFn7x1StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, I6, R0 any](d reflectx.RegisterStructWrapper(reflect.TypeOf(doFn).Elem(), wrapperFn) } -// DoFn7x1[I0, I1, I2, I3, I4, I5, I6, R0 any] registers your DoFn to optimize execution at runtime. +// DoFn7x1[I0, I1, I2, I3, I4, I5, I6, R0 any] registers your structural DoFn to optimize execution at runtime. // DoFn input and output parameter types should be provided in order as the generic constraints. func DoFn7x1[I0, I1, I2, I3, I4, I5, I6, R0 any](doFn genericDoFn7x1[I0, I1, I2, I3, I4, I5, I6, R0]) { registerDoFnTypes(doFn) registerDoFn7x1StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, I6, R0](doFn) } +// Function7x1[I0, I1, I2, I3, I4, I5, I6, R0 any] registers your non-structural DoFn to optimize execution at runtime. +// Function input and output parameter types should be provided in order as the generic constraints. +func Function7x1[I0, I1, I2, I3, I4, I5, I6, R0 any](doFn func(I0, I1, I2, I3, I4, I5, I6) R0) { + runtime.RegisterFunction(doFn) + registerMethodTypes(reflect.TypeOf(doFn)) +} + type genericDoFn8x1[I0, I1, I2, I3, I4, I5, I6, I7, R0 any] interface { ProcessElement(i0 I0, i1 I1, i2 I2, i3 I3, i4 I4, i5 I5, i6 I6, i7 I7) R0 } @@ -3598,13 +3730,20 @@ func registerDoFn8x1StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, I6, I7, R0 an reflectx.RegisterStructWrapper(reflect.TypeOf(doFn).Elem(), wrapperFn) } -// DoFn8x1[I0, I1, I2, I3, I4, I5, I6, I7, R0 any] registers your DoFn to optimize execution at runtime. +// DoFn8x1[I0, I1, I2, I3, I4, I5, I6, I7, R0 any] registers your structural DoFn to optimize execution at runtime. // DoFn input and output parameter types should be provided in order as the generic constraints. func DoFn8x1[I0, I1, I2, I3, I4, I5, I6, I7, R0 any](doFn genericDoFn8x1[I0, I1, I2, I3, I4, I5, I6, I7, R0]) { registerDoFnTypes(doFn) registerDoFn8x1StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, I6, I7, R0](doFn) } +// Function8x1[I0, I1, I2, I3, I4, I5, I6, I7, R0 any] registers your non-structural DoFn to optimize execution at runtime. +// Function input and output parameter types should be provided in order as the generic constraints. +func Function8x1[I0, I1, I2, I3, I4, I5, I6, I7, R0 any](doFn func(I0, I1, I2, I3, I4, I5, I6, I7) R0) { + runtime.RegisterFunction(doFn) + registerMethodTypes(reflect.TypeOf(doFn)) +} + type genericDoFn9x1[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0 any] interface { ProcessElement(i0 I0, i1 I1, i2 I2, i3 I3, i4 I4, i5 I5, i6 I6, i7 I7, i8 I8) R0 } @@ -3669,13 +3808,20 @@ func registerDoFn9x1StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, I6, I7, I8, R reflectx.RegisterStructWrapper(reflect.TypeOf(doFn).Elem(), wrapperFn) } -// DoFn9x1[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0 any] registers your DoFn to optimize execution at runtime. +// DoFn9x1[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0 any] registers your structural DoFn to optimize execution at runtime. // DoFn input and output parameter types should be provided in order as the generic constraints. func DoFn9x1[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0 any](doFn genericDoFn9x1[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0]) { registerDoFnTypes(doFn) registerDoFn9x1StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0](doFn) } +// Function9x1[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0 any] registers your non-structural DoFn to optimize execution at runtime. +// Function input and output parameter types should be provided in order as the generic constraints. +func Function9x1[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0 any](doFn func(I0, I1, I2, I3, I4, I5, I6, I7, I8) R0) { + runtime.RegisterFunction(doFn) + registerMethodTypes(reflect.TypeOf(doFn)) +} + type genericDoFn10x1[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0 any] interface { ProcessElement(i0 I0, i1 I1, i2 I2, i3 I3, i4 I4, i5 I5, i6 I6, i7 I7, i8 I8, i9 I9) R0 } @@ -3740,13 +3886,20 @@ func registerDoFn10x1StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, I6, I7, I8, reflectx.RegisterStructWrapper(reflect.TypeOf(doFn).Elem(), wrapperFn) } -// DoFn10x1[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0 any] registers your DoFn to optimize execution at runtime. +// DoFn10x1[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0 any] registers your structural DoFn to optimize execution at runtime. // DoFn input and output parameter types should be provided in order as the generic constraints. func DoFn10x1[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0 any](doFn genericDoFn10x1[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0]) { registerDoFnTypes(doFn) registerDoFn10x1StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0](doFn) } +// Function10x1[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0 any] registers your non-structural DoFn to optimize execution at runtime. +// Function input and output parameter types should be provided in order as the generic constraints. +func Function10x1[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0 any](doFn func(I0, I1, I2, I3, I4, I5, I6, I7, I8, I9) R0) { + runtime.RegisterFunction(doFn) + registerMethodTypes(reflect.TypeOf(doFn)) +} + type genericDoFn0x2[R0, R1 any] interface { ProcessElement() (R0, R1) } @@ -3811,13 +3964,20 @@ func registerDoFn0x2StructWrappersAndFuncs[R0, R1 any](doFn genericDoFn0x2[R0, R reflectx.RegisterStructWrapper(reflect.TypeOf(doFn).Elem(), wrapperFn) } -// DoFn0x2[R0, R1 any] registers your DoFn to optimize execution at runtime. +// DoFn0x2[R0, R1 any] registers your structural DoFn to optimize execution at runtime. // DoFn input and output parameter types should be provided in order as the generic constraints. func DoFn0x2[R0, R1 any](doFn genericDoFn0x2[R0, R1]) { registerDoFnTypes(doFn) registerDoFn0x2StructWrappersAndFuncs[R0, R1](doFn) } +// Function0x2[R0, R1 any] registers your non-structural DoFn to optimize execution at runtime. +// Function input and output parameter types should be provided in order as the generic constraints. +func Function0x2[R0, R1 any](doFn func() (R0, R1)) { + runtime.RegisterFunction(doFn) + registerMethodTypes(reflect.TypeOf(doFn)) +} + type genericDoFn1x2[I0, R0, R1 any] interface { ProcessElement(i0 I0) (R0, R1) } @@ -3882,13 +4042,20 @@ func registerDoFn1x2StructWrappersAndFuncs[I0, R0, R1 any](doFn genericDoFn1x2[I reflectx.RegisterStructWrapper(reflect.TypeOf(doFn).Elem(), wrapperFn) } -// DoFn1x2[I0, R0, R1 any] registers your DoFn to optimize execution at runtime. +// DoFn1x2[I0, R0, R1 any] registers your structural DoFn to optimize execution at runtime. // DoFn input and output parameter types should be provided in order as the generic constraints. func DoFn1x2[I0, R0, R1 any](doFn genericDoFn1x2[I0, R0, R1]) { registerDoFnTypes(doFn) registerDoFn1x2StructWrappersAndFuncs[I0, R0, R1](doFn) } +// Function1x2[I0, R0, R1 any] registers your non-structural DoFn to optimize execution at runtime. +// Function input and output parameter types should be provided in order as the generic constraints. +func Function1x2[I0, R0, R1 any](doFn func(I0) (R0, R1)) { + runtime.RegisterFunction(doFn) + registerMethodTypes(reflect.TypeOf(doFn)) +} + type genericDoFn2x2[I0, I1, R0, R1 any] interface { ProcessElement(i0 I0, i1 I1) (R0, R1) } @@ -3953,13 +4120,20 @@ func registerDoFn2x2StructWrappersAndFuncs[I0, I1, R0, R1 any](doFn genericDoFn2 reflectx.RegisterStructWrapper(reflect.TypeOf(doFn).Elem(), wrapperFn) } -// DoFn2x2[I0, I1, R0, R1 any] registers your DoFn to optimize execution at runtime. +// DoFn2x2[I0, I1, R0, R1 any] registers your structural DoFn to optimize execution at runtime. // DoFn input and output parameter types should be provided in order as the generic constraints. func DoFn2x2[I0, I1, R0, R1 any](doFn genericDoFn2x2[I0, I1, R0, R1]) { registerDoFnTypes(doFn) registerDoFn2x2StructWrappersAndFuncs[I0, I1, R0, R1](doFn) } +// Function2x2[I0, I1, R0, R1 any] registers your non-structural DoFn to optimize execution at runtime. +// Function input and output parameter types should be provided in order as the generic constraints. +func Function2x2[I0, I1, R0, R1 any](doFn func(I0, I1) (R0, R1)) { + runtime.RegisterFunction(doFn) + registerMethodTypes(reflect.TypeOf(doFn)) +} + type genericDoFn3x2[I0, I1, I2, R0, R1 any] interface { ProcessElement(i0 I0, i1 I1, i2 I2) (R0, R1) } @@ -4024,13 +4198,20 @@ func registerDoFn3x2StructWrappersAndFuncs[I0, I1, I2, R0, R1 any](doFn genericD reflectx.RegisterStructWrapper(reflect.TypeOf(doFn).Elem(), wrapperFn) } -// DoFn3x2[I0, I1, I2, R0, R1 any] registers your DoFn to optimize execution at runtime. +// DoFn3x2[I0, I1, I2, R0, R1 any] registers your structural DoFn to optimize execution at runtime. // DoFn input and output parameter types should be provided in order as the generic constraints. func DoFn3x2[I0, I1, I2, R0, R1 any](doFn genericDoFn3x2[I0, I1, I2, R0, R1]) { registerDoFnTypes(doFn) registerDoFn3x2StructWrappersAndFuncs[I0, I1, I2, R0, R1](doFn) } +// Function3x2[I0, I1, I2, R0, R1 any] registers your non-structural DoFn to optimize execution at runtime. +// Function input and output parameter types should be provided in order as the generic constraints. +func Function3x2[I0, I1, I2, R0, R1 any](doFn func(I0, I1, I2) (R0, R1)) { + runtime.RegisterFunction(doFn) + registerMethodTypes(reflect.TypeOf(doFn)) +} + type genericDoFn4x2[I0, I1, I2, I3, R0, R1 any] interface { ProcessElement(i0 I0, i1 I1, i2 I2, i3 I3) (R0, R1) } @@ -4095,13 +4276,20 @@ func registerDoFn4x2StructWrappersAndFuncs[I0, I1, I2, I3, R0, R1 any](doFn gene reflectx.RegisterStructWrapper(reflect.TypeOf(doFn).Elem(), wrapperFn) } -// DoFn4x2[I0, I1, I2, I3, R0, R1 any] registers your DoFn to optimize execution at runtime. +// DoFn4x2[I0, I1, I2, I3, R0, R1 any] registers your structural DoFn to optimize execution at runtime. // DoFn input and output parameter types should be provided in order as the generic constraints. func DoFn4x2[I0, I1, I2, I3, R0, R1 any](doFn genericDoFn4x2[I0, I1, I2, I3, R0, R1]) { registerDoFnTypes(doFn) registerDoFn4x2StructWrappersAndFuncs[I0, I1, I2, I3, R0, R1](doFn) } +// Function4x2[I0, I1, I2, I3, R0, R1 any] registers your non-structural DoFn to optimize execution at runtime. +// Function input and output parameter types should be provided in order as the generic constraints. +func Function4x2[I0, I1, I2, I3, R0, R1 any](doFn func(I0, I1, I2, I3) (R0, R1)) { + runtime.RegisterFunction(doFn) + registerMethodTypes(reflect.TypeOf(doFn)) +} + type genericDoFn5x2[I0, I1, I2, I3, I4, R0, R1 any] interface { ProcessElement(i0 I0, i1 I1, i2 I2, i3 I3, i4 I4) (R0, R1) } @@ -4166,13 +4354,20 @@ func registerDoFn5x2StructWrappersAndFuncs[I0, I1, I2, I3, I4, R0, R1 any](doFn reflectx.RegisterStructWrapper(reflect.TypeOf(doFn).Elem(), wrapperFn) } -// DoFn5x2[I0, I1, I2, I3, I4, R0, R1 any] registers your DoFn to optimize execution at runtime. +// DoFn5x2[I0, I1, I2, I3, I4, R0, R1 any] registers your structural DoFn to optimize execution at runtime. // DoFn input and output parameter types should be provided in order as the generic constraints. func DoFn5x2[I0, I1, I2, I3, I4, R0, R1 any](doFn genericDoFn5x2[I0, I1, I2, I3, I4, R0, R1]) { registerDoFnTypes(doFn) registerDoFn5x2StructWrappersAndFuncs[I0, I1, I2, I3, I4, R0, R1](doFn) } +// Function5x2[I0, I1, I2, I3, I4, R0, R1 any] registers your non-structural DoFn to optimize execution at runtime. +// Function input and output parameter types should be provided in order as the generic constraints. +func Function5x2[I0, I1, I2, I3, I4, R0, R1 any](doFn func(I0, I1, I2, I3, I4) (R0, R1)) { + runtime.RegisterFunction(doFn) + registerMethodTypes(reflect.TypeOf(doFn)) +} + type genericDoFn6x2[I0, I1, I2, I3, I4, I5, R0, R1 any] interface { ProcessElement(i0 I0, i1 I1, i2 I2, i3 I3, i4 I4, i5 I5) (R0, R1) } @@ -4237,13 +4432,20 @@ func registerDoFn6x2StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, R0, R1 any](d reflectx.RegisterStructWrapper(reflect.TypeOf(doFn).Elem(), wrapperFn) } -// DoFn6x2[I0, I1, I2, I3, I4, I5, R0, R1 any] registers your DoFn to optimize execution at runtime. +// DoFn6x2[I0, I1, I2, I3, I4, I5, R0, R1 any] registers your structural DoFn to optimize execution at runtime. // DoFn input and output parameter types should be provided in order as the generic constraints. func DoFn6x2[I0, I1, I2, I3, I4, I5, R0, R1 any](doFn genericDoFn6x2[I0, I1, I2, I3, I4, I5, R0, R1]) { registerDoFnTypes(doFn) registerDoFn6x2StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, R0, R1](doFn) } +// Function6x2[I0, I1, I2, I3, I4, I5, R0, R1 any] registers your non-structural DoFn to optimize execution at runtime. +// Function input and output parameter types should be provided in order as the generic constraints. +func Function6x2[I0, I1, I2, I3, I4, I5, R0, R1 any](doFn func(I0, I1, I2, I3, I4, I5) (R0, R1)) { + runtime.RegisterFunction(doFn) + registerMethodTypes(reflect.TypeOf(doFn)) +} + type genericDoFn7x2[I0, I1, I2, I3, I4, I5, I6, R0, R1 any] interface { ProcessElement(i0 I0, i1 I1, i2 I2, i3 I3, i4 I4, i5 I5, i6 I6) (R0, R1) } @@ -4308,13 +4510,20 @@ func registerDoFn7x2StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, I6, R0, R1 an reflectx.RegisterStructWrapper(reflect.TypeOf(doFn).Elem(), wrapperFn) } -// DoFn7x2[I0, I1, I2, I3, I4, I5, I6, R0, R1 any] registers your DoFn to optimize execution at runtime. +// DoFn7x2[I0, I1, I2, I3, I4, I5, I6, R0, R1 any] registers your structural DoFn to optimize execution at runtime. // DoFn input and output parameter types should be provided in order as the generic constraints. func DoFn7x2[I0, I1, I2, I3, I4, I5, I6, R0, R1 any](doFn genericDoFn7x2[I0, I1, I2, I3, I4, I5, I6, R0, R1]) { registerDoFnTypes(doFn) registerDoFn7x2StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, I6, R0, R1](doFn) } +// Function7x2[I0, I1, I2, I3, I4, I5, I6, R0, R1 any] registers your non-structural DoFn to optimize execution at runtime. +// Function input and output parameter types should be provided in order as the generic constraints. +func Function7x2[I0, I1, I2, I3, I4, I5, I6, R0, R1 any](doFn func(I0, I1, I2, I3, I4, I5, I6) (R0, R1)) { + runtime.RegisterFunction(doFn) + registerMethodTypes(reflect.TypeOf(doFn)) +} + type genericDoFn8x2[I0, I1, I2, I3, I4, I5, I6, I7, R0, R1 any] interface { ProcessElement(i0 I0, i1 I1, i2 I2, i3 I3, i4 I4, i5 I5, i6 I6, i7 I7) (R0, R1) } @@ -4379,13 +4588,20 @@ func registerDoFn8x2StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, I6, I7, R0, R reflectx.RegisterStructWrapper(reflect.TypeOf(doFn).Elem(), wrapperFn) } -// DoFn8x2[I0, I1, I2, I3, I4, I5, I6, I7, R0, R1 any] registers your DoFn to optimize execution at runtime. +// DoFn8x2[I0, I1, I2, I3, I4, I5, I6, I7, R0, R1 any] registers your structural DoFn to optimize execution at runtime. // DoFn input and output parameter types should be provided in order as the generic constraints. func DoFn8x2[I0, I1, I2, I3, I4, I5, I6, I7, R0, R1 any](doFn genericDoFn8x2[I0, I1, I2, I3, I4, I5, I6, I7, R0, R1]) { registerDoFnTypes(doFn) registerDoFn8x2StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, I6, I7, R0, R1](doFn) } +// Function8x2[I0, I1, I2, I3, I4, I5, I6, I7, R0, R1 any] registers your non-structural DoFn to optimize execution at runtime. +// Function input and output parameter types should be provided in order as the generic constraints. +func Function8x2[I0, I1, I2, I3, I4, I5, I6, I7, R0, R1 any](doFn func(I0, I1, I2, I3, I4, I5, I6, I7) (R0, R1)) { + runtime.RegisterFunction(doFn) + registerMethodTypes(reflect.TypeOf(doFn)) +} + type genericDoFn9x2[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0, R1 any] interface { ProcessElement(i0 I0, i1 I1, i2 I2, i3 I3, i4 I4, i5 I5, i6 I6, i7 I7, i8 I8) (R0, R1) } @@ -4450,13 +4666,20 @@ func registerDoFn9x2StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, I6, I7, I8, R reflectx.RegisterStructWrapper(reflect.TypeOf(doFn).Elem(), wrapperFn) } -// DoFn9x2[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0, R1 any] registers your DoFn to optimize execution at runtime. +// DoFn9x2[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0, R1 any] registers your structural DoFn to optimize execution at runtime. // DoFn input and output parameter types should be provided in order as the generic constraints. func DoFn9x2[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0, R1 any](doFn genericDoFn9x2[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0, R1]) { registerDoFnTypes(doFn) registerDoFn9x2StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0, R1](doFn) } +// Function9x2[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0, R1 any] registers your non-structural DoFn to optimize execution at runtime. +// Function input and output parameter types should be provided in order as the generic constraints. +func Function9x2[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0, R1 any](doFn func(I0, I1, I2, I3, I4, I5, I6, I7, I8) (R0, R1)) { + runtime.RegisterFunction(doFn) + registerMethodTypes(reflect.TypeOf(doFn)) +} + type genericDoFn10x2[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0, R1 any] interface { ProcessElement(i0 I0, i1 I1, i2 I2, i3 I3, i4 I4, i5 I5, i6 I6, i7 I7, i8 I8, i9 I9) (R0, R1) } @@ -4521,13 +4744,20 @@ func registerDoFn10x2StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, I6, I7, I8, reflectx.RegisterStructWrapper(reflect.TypeOf(doFn).Elem(), wrapperFn) } -// DoFn10x2[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0, R1 any] registers your DoFn to optimize execution at runtime. +// DoFn10x2[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0, R1 any] registers your structural DoFn to optimize execution at runtime. // DoFn input and output parameter types should be provided in order as the generic constraints. func DoFn10x2[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0, R1 any](doFn genericDoFn10x2[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0, R1]) { registerDoFnTypes(doFn) registerDoFn10x2StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0, R1](doFn) } +// Function10x2[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0, R1 any] registers your non-structural DoFn to optimize execution at runtime. +// Function input and output parameter types should be provided in order as the generic constraints. +func Function10x2[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0, R1 any](doFn func(I0, I1, I2, I3, I4, I5, I6, I7, I8, I9) (R0, R1)) { + runtime.RegisterFunction(doFn) + registerMethodTypes(reflect.TypeOf(doFn)) +} + type genericDoFn0x3[R0, R1, R2 any] interface { ProcessElement() (R0, R1, R2) } @@ -4592,13 +4822,20 @@ func registerDoFn0x3StructWrappersAndFuncs[R0, R1, R2 any](doFn genericDoFn0x3[R reflectx.RegisterStructWrapper(reflect.TypeOf(doFn).Elem(), wrapperFn) } -// DoFn0x3[R0, R1, R2 any] registers your DoFn to optimize execution at runtime. +// DoFn0x3[R0, R1, R2 any] registers your structural DoFn to optimize execution at runtime. // DoFn input and output parameter types should be provided in order as the generic constraints. func DoFn0x3[R0, R1, R2 any](doFn genericDoFn0x3[R0, R1, R2]) { registerDoFnTypes(doFn) registerDoFn0x3StructWrappersAndFuncs[R0, R1, R2](doFn) } +// Function0x3[R0, R1, R2 any] registers your non-structural DoFn to optimize execution at runtime. +// Function input and output parameter types should be provided in order as the generic constraints. +func Function0x3[R0, R1, R2 any](doFn func() (R0, R1, R2)) { + runtime.RegisterFunction(doFn) + registerMethodTypes(reflect.TypeOf(doFn)) +} + type genericDoFn1x3[I0, R0, R1, R2 any] interface { ProcessElement(i0 I0) (R0, R1, R2) } @@ -4663,13 +4900,20 @@ func registerDoFn1x3StructWrappersAndFuncs[I0, R0, R1, R2 any](doFn genericDoFn1 reflectx.RegisterStructWrapper(reflect.TypeOf(doFn).Elem(), wrapperFn) } -// DoFn1x3[I0, R0, R1, R2 any] registers your DoFn to optimize execution at runtime. +// DoFn1x3[I0, R0, R1, R2 any] registers your structural DoFn to optimize execution at runtime. // DoFn input and output parameter types should be provided in order as the generic constraints. func DoFn1x3[I0, R0, R1, R2 any](doFn genericDoFn1x3[I0, R0, R1, R2]) { registerDoFnTypes(doFn) registerDoFn1x3StructWrappersAndFuncs[I0, R0, R1, R2](doFn) } +// Function1x3[I0, R0, R1, R2 any] registers your non-structural DoFn to optimize execution at runtime. +// Function input and output parameter types should be provided in order as the generic constraints. +func Function1x3[I0, R0, R1, R2 any](doFn func(I0) (R0, R1, R2)) { + runtime.RegisterFunction(doFn) + registerMethodTypes(reflect.TypeOf(doFn)) +} + type genericDoFn2x3[I0, I1, R0, R1, R2 any] interface { ProcessElement(i0 I0, i1 I1) (R0, R1, R2) } @@ -4734,13 +4978,20 @@ func registerDoFn2x3StructWrappersAndFuncs[I0, I1, R0, R1, R2 any](doFn genericD reflectx.RegisterStructWrapper(reflect.TypeOf(doFn).Elem(), wrapperFn) } -// DoFn2x3[I0, I1, R0, R1, R2 any] registers your DoFn to optimize execution at runtime. +// DoFn2x3[I0, I1, R0, R1, R2 any] registers your structural DoFn to optimize execution at runtime. // DoFn input and output parameter types should be provided in order as the generic constraints. func DoFn2x3[I0, I1, R0, R1, R2 any](doFn genericDoFn2x3[I0, I1, R0, R1, R2]) { registerDoFnTypes(doFn) registerDoFn2x3StructWrappersAndFuncs[I0, I1, R0, R1, R2](doFn) } +// Function2x3[I0, I1, R0, R1, R2 any] registers your non-structural DoFn to optimize execution at runtime. +// Function input and output parameter types should be provided in order as the generic constraints. +func Function2x3[I0, I1, R0, R1, R2 any](doFn func(I0, I1) (R0, R1, R2)) { + runtime.RegisterFunction(doFn) + registerMethodTypes(reflect.TypeOf(doFn)) +} + type genericDoFn3x3[I0, I1, I2, R0, R1, R2 any] interface { ProcessElement(i0 I0, i1 I1, i2 I2) (R0, R1, R2) } @@ -4805,13 +5056,20 @@ func registerDoFn3x3StructWrappersAndFuncs[I0, I1, I2, R0, R1, R2 any](doFn gene reflectx.RegisterStructWrapper(reflect.TypeOf(doFn).Elem(), wrapperFn) } -// DoFn3x3[I0, I1, I2, R0, R1, R2 any] registers your DoFn to optimize execution at runtime. +// DoFn3x3[I0, I1, I2, R0, R1, R2 any] registers your structural DoFn to optimize execution at runtime. // DoFn input and output parameter types should be provided in order as the generic constraints. func DoFn3x3[I0, I1, I2, R0, R1, R2 any](doFn genericDoFn3x3[I0, I1, I2, R0, R1, R2]) { registerDoFnTypes(doFn) registerDoFn3x3StructWrappersAndFuncs[I0, I1, I2, R0, R1, R2](doFn) } +// Function3x3[I0, I1, I2, R0, R1, R2 any] registers your non-structural DoFn to optimize execution at runtime. +// Function input and output parameter types should be provided in order as the generic constraints. +func Function3x3[I0, I1, I2, R0, R1, R2 any](doFn func(I0, I1, I2) (R0, R1, R2)) { + runtime.RegisterFunction(doFn) + registerMethodTypes(reflect.TypeOf(doFn)) +} + type genericDoFn4x3[I0, I1, I2, I3, R0, R1, R2 any] interface { ProcessElement(i0 I0, i1 I1, i2 I2, i3 I3) (R0, R1, R2) } @@ -4876,13 +5134,20 @@ func registerDoFn4x3StructWrappersAndFuncs[I0, I1, I2, I3, R0, R1, R2 any](doFn reflectx.RegisterStructWrapper(reflect.TypeOf(doFn).Elem(), wrapperFn) } -// DoFn4x3[I0, I1, I2, I3, R0, R1, R2 any] registers your DoFn to optimize execution at runtime. +// DoFn4x3[I0, I1, I2, I3, R0, R1, R2 any] registers your structural DoFn to optimize execution at runtime. // DoFn input and output parameter types should be provided in order as the generic constraints. func DoFn4x3[I0, I1, I2, I3, R0, R1, R2 any](doFn genericDoFn4x3[I0, I1, I2, I3, R0, R1, R2]) { registerDoFnTypes(doFn) registerDoFn4x3StructWrappersAndFuncs[I0, I1, I2, I3, R0, R1, R2](doFn) } +// Function4x3[I0, I1, I2, I3, R0, R1, R2 any] registers your non-structural DoFn to optimize execution at runtime. +// Function input and output parameter types should be provided in order as the generic constraints. +func Function4x3[I0, I1, I2, I3, R0, R1, R2 any](doFn func(I0, I1, I2, I3) (R0, R1, R2)) { + runtime.RegisterFunction(doFn) + registerMethodTypes(reflect.TypeOf(doFn)) +} + type genericDoFn5x3[I0, I1, I2, I3, I4, R0, R1, R2 any] interface { ProcessElement(i0 I0, i1 I1, i2 I2, i3 I3, i4 I4) (R0, R1, R2) } @@ -4947,13 +5212,20 @@ func registerDoFn5x3StructWrappersAndFuncs[I0, I1, I2, I3, I4, R0, R1, R2 any](d reflectx.RegisterStructWrapper(reflect.TypeOf(doFn).Elem(), wrapperFn) } -// DoFn5x3[I0, I1, I2, I3, I4, R0, R1, R2 any] registers your DoFn to optimize execution at runtime. +// DoFn5x3[I0, I1, I2, I3, I4, R0, R1, R2 any] registers your structural DoFn to optimize execution at runtime. // DoFn input and output parameter types should be provided in order as the generic constraints. func DoFn5x3[I0, I1, I2, I3, I4, R0, R1, R2 any](doFn genericDoFn5x3[I0, I1, I2, I3, I4, R0, R1, R2]) { registerDoFnTypes(doFn) registerDoFn5x3StructWrappersAndFuncs[I0, I1, I2, I3, I4, R0, R1, R2](doFn) } +// Function5x3[I0, I1, I2, I3, I4, R0, R1, R2 any] registers your non-structural DoFn to optimize execution at runtime. +// Function input and output parameter types should be provided in order as the generic constraints. +func Function5x3[I0, I1, I2, I3, I4, R0, R1, R2 any](doFn func(I0, I1, I2, I3, I4) (R0, R1, R2)) { + runtime.RegisterFunction(doFn) + registerMethodTypes(reflect.TypeOf(doFn)) +} + type genericDoFn6x3[I0, I1, I2, I3, I4, I5, R0, R1, R2 any] interface { ProcessElement(i0 I0, i1 I1, i2 I2, i3 I3, i4 I4, i5 I5) (R0, R1, R2) } @@ -5018,13 +5290,20 @@ func registerDoFn6x3StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, R0, R1, R2 an reflectx.RegisterStructWrapper(reflect.TypeOf(doFn).Elem(), wrapperFn) } -// DoFn6x3[I0, I1, I2, I3, I4, I5, R0, R1, R2 any] registers your DoFn to optimize execution at runtime. +// DoFn6x3[I0, I1, I2, I3, I4, I5, R0, R1, R2 any] registers your structural DoFn to optimize execution at runtime. // DoFn input and output parameter types should be provided in order as the generic constraints. func DoFn6x3[I0, I1, I2, I3, I4, I5, R0, R1, R2 any](doFn genericDoFn6x3[I0, I1, I2, I3, I4, I5, R0, R1, R2]) { registerDoFnTypes(doFn) registerDoFn6x3StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, R0, R1, R2](doFn) } +// Function6x3[I0, I1, I2, I3, I4, I5, R0, R1, R2 any] registers your non-structural DoFn to optimize execution at runtime. +// Function input and output parameter types should be provided in order as the generic constraints. +func Function6x3[I0, I1, I2, I3, I4, I5, R0, R1, R2 any](doFn func(I0, I1, I2, I3, I4, I5) (R0, R1, R2)) { + runtime.RegisterFunction(doFn) + registerMethodTypes(reflect.TypeOf(doFn)) +} + type genericDoFn7x3[I0, I1, I2, I3, I4, I5, I6, R0, R1, R2 any] interface { ProcessElement(i0 I0, i1 I1, i2 I2, i3 I3, i4 I4, i5 I5, i6 I6) (R0, R1, R2) } @@ -5089,13 +5368,20 @@ func registerDoFn7x3StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, I6, R0, R1, R reflectx.RegisterStructWrapper(reflect.TypeOf(doFn).Elem(), wrapperFn) } -// DoFn7x3[I0, I1, I2, I3, I4, I5, I6, R0, R1, R2 any] registers your DoFn to optimize execution at runtime. +// DoFn7x3[I0, I1, I2, I3, I4, I5, I6, R0, R1, R2 any] registers your structural DoFn to optimize execution at runtime. // DoFn input and output parameter types should be provided in order as the generic constraints. func DoFn7x3[I0, I1, I2, I3, I4, I5, I6, R0, R1, R2 any](doFn genericDoFn7x3[I0, I1, I2, I3, I4, I5, I6, R0, R1, R2]) { registerDoFnTypes(doFn) registerDoFn7x3StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, I6, R0, R1, R2](doFn) } +// Function7x3[I0, I1, I2, I3, I4, I5, I6, R0, R1, R2 any] registers your non-structural DoFn to optimize execution at runtime. +// Function input and output parameter types should be provided in order as the generic constraints. +func Function7x3[I0, I1, I2, I3, I4, I5, I6, R0, R1, R2 any](doFn func(I0, I1, I2, I3, I4, I5, I6) (R0, R1, R2)) { + runtime.RegisterFunction(doFn) + registerMethodTypes(reflect.TypeOf(doFn)) +} + type genericDoFn8x3[I0, I1, I2, I3, I4, I5, I6, I7, R0, R1, R2 any] interface { ProcessElement(i0 I0, i1 I1, i2 I2, i3 I3, i4 I4, i5 I5, i6 I6, i7 I7) (R0, R1, R2) } @@ -5160,13 +5446,20 @@ func registerDoFn8x3StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, I6, I7, R0, R reflectx.RegisterStructWrapper(reflect.TypeOf(doFn).Elem(), wrapperFn) } -// DoFn8x3[I0, I1, I2, I3, I4, I5, I6, I7, R0, R1, R2 any] registers your DoFn to optimize execution at runtime. +// DoFn8x3[I0, I1, I2, I3, I4, I5, I6, I7, R0, R1, R2 any] registers your structural DoFn to optimize execution at runtime. // DoFn input and output parameter types should be provided in order as the generic constraints. func DoFn8x3[I0, I1, I2, I3, I4, I5, I6, I7, R0, R1, R2 any](doFn genericDoFn8x3[I0, I1, I2, I3, I4, I5, I6, I7, R0, R1, R2]) { registerDoFnTypes(doFn) registerDoFn8x3StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, I6, I7, R0, R1, R2](doFn) } +// Function8x3[I0, I1, I2, I3, I4, I5, I6, I7, R0, R1, R2 any] registers your non-structural DoFn to optimize execution at runtime. +// Function input and output parameter types should be provided in order as the generic constraints. +func Function8x3[I0, I1, I2, I3, I4, I5, I6, I7, R0, R1, R2 any](doFn func(I0, I1, I2, I3, I4, I5, I6, I7) (R0, R1, R2)) { + runtime.RegisterFunction(doFn) + registerMethodTypes(reflect.TypeOf(doFn)) +} + type genericDoFn9x3[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0, R1, R2 any] interface { ProcessElement(i0 I0, i1 I1, i2 I2, i3 I3, i4 I4, i5 I5, i6 I6, i7 I7, i8 I8) (R0, R1, R2) } @@ -5231,13 +5524,20 @@ func registerDoFn9x3StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, I6, I7, I8, R reflectx.RegisterStructWrapper(reflect.TypeOf(doFn).Elem(), wrapperFn) } -// DoFn9x3[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0, R1, R2 any] registers your DoFn to optimize execution at runtime. +// DoFn9x3[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0, R1, R2 any] registers your structural DoFn to optimize execution at runtime. // DoFn input and output parameter types should be provided in order as the generic constraints. func DoFn9x3[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0, R1, R2 any](doFn genericDoFn9x3[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0, R1, R2]) { registerDoFnTypes(doFn) registerDoFn9x3StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0, R1, R2](doFn) } +// Function9x3[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0, R1, R2 any] registers your non-structural DoFn to optimize execution at runtime. +// Function input and output parameter types should be provided in order as the generic constraints. +func Function9x3[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0, R1, R2 any](doFn func(I0, I1, I2, I3, I4, I5, I6, I7, I8) (R0, R1, R2)) { + runtime.RegisterFunction(doFn) + registerMethodTypes(reflect.TypeOf(doFn)) +} + type genericDoFn10x3[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0, R1, R2 any] interface { ProcessElement(i0 I0, i1 I1, i2 I2, i3 I3, i4 I4, i5 I5, i6 I6, i7 I7, i8 I8, i9 I9) (R0, R1, R2) } @@ -5302,13 +5602,20 @@ func registerDoFn10x3StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, I6, I7, I8, reflectx.RegisterStructWrapper(reflect.TypeOf(doFn).Elem(), wrapperFn) } -// DoFn10x3[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0, R1, R2 any] registers your DoFn to optimize execution at runtime. +// DoFn10x3[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0, R1, R2 any] registers your structural DoFn to optimize execution at runtime. // DoFn input and output parameter types should be provided in order as the generic constraints. func DoFn10x3[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0, R1, R2 any](doFn genericDoFn10x3[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0, R1, R2]) { registerDoFnTypes(doFn) registerDoFn10x3StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0, R1, R2](doFn) } +// Function10x3[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0, R1, R2 any] registers your non-structural DoFn to optimize execution at runtime. +// Function input and output parameter types should be provided in order as the generic constraints. +func Function10x3[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0, R1, R2 any](doFn func(I0, I1, I2, I3, I4, I5, I6, I7, I8, I9) (R0, R1, R2)) { + runtime.RegisterFunction(doFn) + registerMethodTypes(reflect.TypeOf(doFn)) +} + type genericDoFn0x4[R0, R1, R2, R3 any] interface { ProcessElement() (R0, R1, R2, R3) } @@ -5373,13 +5680,20 @@ func registerDoFn0x4StructWrappersAndFuncs[R0, R1, R2, R3 any](doFn genericDoFn0 reflectx.RegisterStructWrapper(reflect.TypeOf(doFn).Elem(), wrapperFn) } -// DoFn0x4[R0, R1, R2, R3 any] registers your DoFn to optimize execution at runtime. +// DoFn0x4[R0, R1, R2, R3 any] registers your structural DoFn to optimize execution at runtime. // DoFn input and output parameter types should be provided in order as the generic constraints. func DoFn0x4[R0, R1, R2, R3 any](doFn genericDoFn0x4[R0, R1, R2, R3]) { registerDoFnTypes(doFn) registerDoFn0x4StructWrappersAndFuncs[R0, R1, R2, R3](doFn) } +// Function0x4[R0, R1, R2, R3 any] registers your non-structural DoFn to optimize execution at runtime. +// Function input and output parameter types should be provided in order as the generic constraints. +func Function0x4[R0, R1, R2, R3 any](doFn func() (R0, R1, R2, R3)) { + runtime.RegisterFunction(doFn) + registerMethodTypes(reflect.TypeOf(doFn)) +} + type genericDoFn1x4[I0, R0, R1, R2, R3 any] interface { ProcessElement(i0 I0) (R0, R1, R2, R3) } @@ -5444,13 +5758,20 @@ func registerDoFn1x4StructWrappersAndFuncs[I0, R0, R1, R2, R3 any](doFn genericD reflectx.RegisterStructWrapper(reflect.TypeOf(doFn).Elem(), wrapperFn) } -// DoFn1x4[I0, R0, R1, R2, R3 any] registers your DoFn to optimize execution at runtime. +// DoFn1x4[I0, R0, R1, R2, R3 any] registers your structural DoFn to optimize execution at runtime. // DoFn input and output parameter types should be provided in order as the generic constraints. func DoFn1x4[I0, R0, R1, R2, R3 any](doFn genericDoFn1x4[I0, R0, R1, R2, R3]) { registerDoFnTypes(doFn) registerDoFn1x4StructWrappersAndFuncs[I0, R0, R1, R2, R3](doFn) } +// Function1x4[I0, R0, R1, R2, R3 any] registers your non-structural DoFn to optimize execution at runtime. +// Function input and output parameter types should be provided in order as the generic constraints. +func Function1x4[I0, R0, R1, R2, R3 any](doFn func(I0) (R0, R1, R2, R3)) { + runtime.RegisterFunction(doFn) + registerMethodTypes(reflect.TypeOf(doFn)) +} + type genericDoFn2x4[I0, I1, R0, R1, R2, R3 any] interface { ProcessElement(i0 I0, i1 I1) (R0, R1, R2, R3) } @@ -5515,13 +5836,20 @@ func registerDoFn2x4StructWrappersAndFuncs[I0, I1, R0, R1, R2, R3 any](doFn gene reflectx.RegisterStructWrapper(reflect.TypeOf(doFn).Elem(), wrapperFn) } -// DoFn2x4[I0, I1, R0, R1, R2, R3 any] registers your DoFn to optimize execution at runtime. +// DoFn2x4[I0, I1, R0, R1, R2, R3 any] registers your structural DoFn to optimize execution at runtime. // DoFn input and output parameter types should be provided in order as the generic constraints. func DoFn2x4[I0, I1, R0, R1, R2, R3 any](doFn genericDoFn2x4[I0, I1, R0, R1, R2, R3]) { registerDoFnTypes(doFn) registerDoFn2x4StructWrappersAndFuncs[I0, I1, R0, R1, R2, R3](doFn) } +// Function2x4[I0, I1, R0, R1, R2, R3 any] registers your non-structural DoFn to optimize execution at runtime. +// Function input and output parameter types should be provided in order as the generic constraints. +func Function2x4[I0, I1, R0, R1, R2, R3 any](doFn func(I0, I1) (R0, R1, R2, R3)) { + runtime.RegisterFunction(doFn) + registerMethodTypes(reflect.TypeOf(doFn)) +} + type genericDoFn3x4[I0, I1, I2, R0, R1, R2, R3 any] interface { ProcessElement(i0 I0, i1 I1, i2 I2) (R0, R1, R2, R3) } @@ -5586,13 +5914,20 @@ func registerDoFn3x4StructWrappersAndFuncs[I0, I1, I2, R0, R1, R2, R3 any](doFn reflectx.RegisterStructWrapper(reflect.TypeOf(doFn).Elem(), wrapperFn) } -// DoFn3x4[I0, I1, I2, R0, R1, R2, R3 any] registers your DoFn to optimize execution at runtime. +// DoFn3x4[I0, I1, I2, R0, R1, R2, R3 any] registers your structural DoFn to optimize execution at runtime. // DoFn input and output parameter types should be provided in order as the generic constraints. func DoFn3x4[I0, I1, I2, R0, R1, R2, R3 any](doFn genericDoFn3x4[I0, I1, I2, R0, R1, R2, R3]) { registerDoFnTypes(doFn) registerDoFn3x4StructWrappersAndFuncs[I0, I1, I2, R0, R1, R2, R3](doFn) } +// Function3x4[I0, I1, I2, R0, R1, R2, R3 any] registers your non-structural DoFn to optimize execution at runtime. +// Function input and output parameter types should be provided in order as the generic constraints. +func Function3x4[I0, I1, I2, R0, R1, R2, R3 any](doFn func(I0, I1, I2) (R0, R1, R2, R3)) { + runtime.RegisterFunction(doFn) + registerMethodTypes(reflect.TypeOf(doFn)) +} + type genericDoFn4x4[I0, I1, I2, I3, R0, R1, R2, R3 any] interface { ProcessElement(i0 I0, i1 I1, i2 I2, i3 I3) (R0, R1, R2, R3) } @@ -5657,13 +5992,20 @@ func registerDoFn4x4StructWrappersAndFuncs[I0, I1, I2, I3, R0, R1, R2, R3 any](d reflectx.RegisterStructWrapper(reflect.TypeOf(doFn).Elem(), wrapperFn) } -// DoFn4x4[I0, I1, I2, I3, R0, R1, R2, R3 any] registers your DoFn to optimize execution at runtime. +// DoFn4x4[I0, I1, I2, I3, R0, R1, R2, R3 any] registers your structural DoFn to optimize execution at runtime. // DoFn input and output parameter types should be provided in order as the generic constraints. func DoFn4x4[I0, I1, I2, I3, R0, R1, R2, R3 any](doFn genericDoFn4x4[I0, I1, I2, I3, R0, R1, R2, R3]) { registerDoFnTypes(doFn) registerDoFn4x4StructWrappersAndFuncs[I0, I1, I2, I3, R0, R1, R2, R3](doFn) } +// Function4x4[I0, I1, I2, I3, R0, R1, R2, R3 any] registers your non-structural DoFn to optimize execution at runtime. +// Function input and output parameter types should be provided in order as the generic constraints. +func Function4x4[I0, I1, I2, I3, R0, R1, R2, R3 any](doFn func(I0, I1, I2, I3) (R0, R1, R2, R3)) { + runtime.RegisterFunction(doFn) + registerMethodTypes(reflect.TypeOf(doFn)) +} + type genericDoFn5x4[I0, I1, I2, I3, I4, R0, R1, R2, R3 any] interface { ProcessElement(i0 I0, i1 I1, i2 I2, i3 I3, i4 I4) (R0, R1, R2, R3) } @@ -5728,13 +6070,20 @@ func registerDoFn5x4StructWrappersAndFuncs[I0, I1, I2, I3, I4, R0, R1, R2, R3 an reflectx.RegisterStructWrapper(reflect.TypeOf(doFn).Elem(), wrapperFn) } -// DoFn5x4[I0, I1, I2, I3, I4, R0, R1, R2, R3 any] registers your DoFn to optimize execution at runtime. +// DoFn5x4[I0, I1, I2, I3, I4, R0, R1, R2, R3 any] registers your structural DoFn to optimize execution at runtime. // DoFn input and output parameter types should be provided in order as the generic constraints. func DoFn5x4[I0, I1, I2, I3, I4, R0, R1, R2, R3 any](doFn genericDoFn5x4[I0, I1, I2, I3, I4, R0, R1, R2, R3]) { registerDoFnTypes(doFn) registerDoFn5x4StructWrappersAndFuncs[I0, I1, I2, I3, I4, R0, R1, R2, R3](doFn) } +// Function5x4[I0, I1, I2, I3, I4, R0, R1, R2, R3 any] registers your non-structural DoFn to optimize execution at runtime. +// Function input and output parameter types should be provided in order as the generic constraints. +func Function5x4[I0, I1, I2, I3, I4, R0, R1, R2, R3 any](doFn func(I0, I1, I2, I3, I4) (R0, R1, R2, R3)) { + runtime.RegisterFunction(doFn) + registerMethodTypes(reflect.TypeOf(doFn)) +} + type genericDoFn6x4[I0, I1, I2, I3, I4, I5, R0, R1, R2, R3 any] interface { ProcessElement(i0 I0, i1 I1, i2 I2, i3 I3, i4 I4, i5 I5) (R0, R1, R2, R3) } @@ -5799,13 +6148,20 @@ func registerDoFn6x4StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, R0, R1, R2, R reflectx.RegisterStructWrapper(reflect.TypeOf(doFn).Elem(), wrapperFn) } -// DoFn6x4[I0, I1, I2, I3, I4, I5, R0, R1, R2, R3 any] registers your DoFn to optimize execution at runtime. +// DoFn6x4[I0, I1, I2, I3, I4, I5, R0, R1, R2, R3 any] registers your structural DoFn to optimize execution at runtime. // DoFn input and output parameter types should be provided in order as the generic constraints. func DoFn6x4[I0, I1, I2, I3, I4, I5, R0, R1, R2, R3 any](doFn genericDoFn6x4[I0, I1, I2, I3, I4, I5, R0, R1, R2, R3]) { registerDoFnTypes(doFn) registerDoFn6x4StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, R0, R1, R2, R3](doFn) } +// Function6x4[I0, I1, I2, I3, I4, I5, R0, R1, R2, R3 any] registers your non-structural DoFn to optimize execution at runtime. +// Function input and output parameter types should be provided in order as the generic constraints. +func Function6x4[I0, I1, I2, I3, I4, I5, R0, R1, R2, R3 any](doFn func(I0, I1, I2, I3, I4, I5) (R0, R1, R2, R3)) { + runtime.RegisterFunction(doFn) + registerMethodTypes(reflect.TypeOf(doFn)) +} + type genericDoFn7x4[I0, I1, I2, I3, I4, I5, I6, R0, R1, R2, R3 any] interface { ProcessElement(i0 I0, i1 I1, i2 I2, i3 I3, i4 I4, i5 I5, i6 I6) (R0, R1, R2, R3) } @@ -5870,13 +6226,20 @@ func registerDoFn7x4StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, I6, R0, R1, R reflectx.RegisterStructWrapper(reflect.TypeOf(doFn).Elem(), wrapperFn) } -// DoFn7x4[I0, I1, I2, I3, I4, I5, I6, R0, R1, R2, R3 any] registers your DoFn to optimize execution at runtime. +// DoFn7x4[I0, I1, I2, I3, I4, I5, I6, R0, R1, R2, R3 any] registers your structural DoFn to optimize execution at runtime. // DoFn input and output parameter types should be provided in order as the generic constraints. func DoFn7x4[I0, I1, I2, I3, I4, I5, I6, R0, R1, R2, R3 any](doFn genericDoFn7x4[I0, I1, I2, I3, I4, I5, I6, R0, R1, R2, R3]) { registerDoFnTypes(doFn) registerDoFn7x4StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, I6, R0, R1, R2, R3](doFn) } +// Function7x4[I0, I1, I2, I3, I4, I5, I6, R0, R1, R2, R3 any] registers your non-structural DoFn to optimize execution at runtime. +// Function input and output parameter types should be provided in order as the generic constraints. +func Function7x4[I0, I1, I2, I3, I4, I5, I6, R0, R1, R2, R3 any](doFn func(I0, I1, I2, I3, I4, I5, I6) (R0, R1, R2, R3)) { + runtime.RegisterFunction(doFn) + registerMethodTypes(reflect.TypeOf(doFn)) +} + type genericDoFn8x4[I0, I1, I2, I3, I4, I5, I6, I7, R0, R1, R2, R3 any] interface { ProcessElement(i0 I0, i1 I1, i2 I2, i3 I3, i4 I4, i5 I5, i6 I6, i7 I7) (R0, R1, R2, R3) } @@ -5941,13 +6304,20 @@ func registerDoFn8x4StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, I6, I7, R0, R reflectx.RegisterStructWrapper(reflect.TypeOf(doFn).Elem(), wrapperFn) } -// DoFn8x4[I0, I1, I2, I3, I4, I5, I6, I7, R0, R1, R2, R3 any] registers your DoFn to optimize execution at runtime. +// DoFn8x4[I0, I1, I2, I3, I4, I5, I6, I7, R0, R1, R2, R3 any] registers your structural DoFn to optimize execution at runtime. // DoFn input and output parameter types should be provided in order as the generic constraints. func DoFn8x4[I0, I1, I2, I3, I4, I5, I6, I7, R0, R1, R2, R3 any](doFn genericDoFn8x4[I0, I1, I2, I3, I4, I5, I6, I7, R0, R1, R2, R3]) { registerDoFnTypes(doFn) registerDoFn8x4StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, I6, I7, R0, R1, R2, R3](doFn) } +// Function8x4[I0, I1, I2, I3, I4, I5, I6, I7, R0, R1, R2, R3 any] registers your non-structural DoFn to optimize execution at runtime. +// Function input and output parameter types should be provided in order as the generic constraints. +func Function8x4[I0, I1, I2, I3, I4, I5, I6, I7, R0, R1, R2, R3 any](doFn func(I0, I1, I2, I3, I4, I5, I6, I7) (R0, R1, R2, R3)) { + runtime.RegisterFunction(doFn) + registerMethodTypes(reflect.TypeOf(doFn)) +} + type genericDoFn9x4[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0, R1, R2, R3 any] interface { ProcessElement(i0 I0, i1 I1, i2 I2, i3 I3, i4 I4, i5 I5, i6 I6, i7 I7, i8 I8) (R0, R1, R2, R3) } @@ -6012,13 +6382,20 @@ func registerDoFn9x4StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, I6, I7, I8, R reflectx.RegisterStructWrapper(reflect.TypeOf(doFn).Elem(), wrapperFn) } -// DoFn9x4[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0, R1, R2, R3 any] registers your DoFn to optimize execution at runtime. +// DoFn9x4[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0, R1, R2, R3 any] registers your structural DoFn to optimize execution at runtime. // DoFn input and output parameter types should be provided in order as the generic constraints. func DoFn9x4[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0, R1, R2, R3 any](doFn genericDoFn9x4[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0, R1, R2, R3]) { registerDoFnTypes(doFn) registerDoFn9x4StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0, R1, R2, R3](doFn) } +// Function9x4[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0, R1, R2, R3 any] registers your non-structural DoFn to optimize execution at runtime. +// Function input and output parameter types should be provided in order as the generic constraints. +func Function9x4[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0, R1, R2, R3 any](doFn func(I0, I1, I2, I3, I4, I5, I6, I7, I8) (R0, R1, R2, R3)) { + runtime.RegisterFunction(doFn) + registerMethodTypes(reflect.TypeOf(doFn)) +} + type genericDoFn10x4[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0, R1, R2, R3 any] interface { ProcessElement(i0 I0, i1 I1, i2 I2, i3 I3, i4 I4, i5 I5, i6 I6, i7 I7, i8 I8, i9 I9) (R0, R1, R2, R3) } @@ -6083,13 +6460,20 @@ func registerDoFn10x4StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, I6, I7, I8, reflectx.RegisterStructWrapper(reflect.TypeOf(doFn).Elem(), wrapperFn) } -// DoFn10x4[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0, R1, R2, R3 any] registers your DoFn to optimize execution at runtime. +// DoFn10x4[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0, R1, R2, R3 any] registers your structural DoFn to optimize execution at runtime. // DoFn input and output parameter types should be provided in order as the generic constraints. func DoFn10x4[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0, R1, R2, R3 any](doFn genericDoFn10x4[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0, R1, R2, R3]) { registerDoFnTypes(doFn) registerDoFn10x4StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0, R1, R2, R3](doFn) } +// Function10x4[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0, R1, R2, R3 any] registers your non-structural DoFn to optimize execution at runtime. +// Function input and output parameter types should be provided in order as the generic constraints. +func Function10x4[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0, R1, R2, R3 any](doFn func(I0, I1, I2, I3, I4, I5, I6, I7, I8, I9) (R0, R1, R2, R3)) { + runtime.RegisterFunction(doFn) + registerMethodTypes(reflect.TypeOf(doFn)) +} + type genericDoFn0x5[R0, R1, R2, R3, R4 any] interface { ProcessElement() (R0, R1, R2, R3, R4) } @@ -6154,13 +6538,20 @@ func registerDoFn0x5StructWrappersAndFuncs[R0, R1, R2, R3, R4 any](doFn genericD reflectx.RegisterStructWrapper(reflect.TypeOf(doFn).Elem(), wrapperFn) } -// DoFn0x5[R0, R1, R2, R3, R4 any] registers your DoFn to optimize execution at runtime. +// DoFn0x5[R0, R1, R2, R3, R4 any] registers your structural DoFn to optimize execution at runtime. // DoFn input and output parameter types should be provided in order as the generic constraints. func DoFn0x5[R0, R1, R2, R3, R4 any](doFn genericDoFn0x5[R0, R1, R2, R3, R4]) { registerDoFnTypes(doFn) registerDoFn0x5StructWrappersAndFuncs[R0, R1, R2, R3, R4](doFn) } +// Function0x5[R0, R1, R2, R3, R4 any] registers your non-structural DoFn to optimize execution at runtime. +// Function input and output parameter types should be provided in order as the generic constraints. +func Function0x5[R0, R1, R2, R3, R4 any](doFn func() (R0, R1, R2, R3, R4)) { + runtime.RegisterFunction(doFn) + registerMethodTypes(reflect.TypeOf(doFn)) +} + type genericDoFn1x5[I0, R0, R1, R2, R3, R4 any] interface { ProcessElement(i0 I0) (R0, R1, R2, R3, R4) } @@ -6225,13 +6616,20 @@ func registerDoFn1x5StructWrappersAndFuncs[I0, R0, R1, R2, R3, R4 any](doFn gene reflectx.RegisterStructWrapper(reflect.TypeOf(doFn).Elem(), wrapperFn) } -// DoFn1x5[I0, R0, R1, R2, R3, R4 any] registers your DoFn to optimize execution at runtime. +// DoFn1x5[I0, R0, R1, R2, R3, R4 any] registers your structural DoFn to optimize execution at runtime. // DoFn input and output parameter types should be provided in order as the generic constraints. func DoFn1x5[I0, R0, R1, R2, R3, R4 any](doFn genericDoFn1x5[I0, R0, R1, R2, R3, R4]) { registerDoFnTypes(doFn) registerDoFn1x5StructWrappersAndFuncs[I0, R0, R1, R2, R3, R4](doFn) } +// Function1x5[I0, R0, R1, R2, R3, R4 any] registers your non-structural DoFn to optimize execution at runtime. +// Function input and output parameter types should be provided in order as the generic constraints. +func Function1x5[I0, R0, R1, R2, R3, R4 any](doFn func(I0) (R0, R1, R2, R3, R4)) { + runtime.RegisterFunction(doFn) + registerMethodTypes(reflect.TypeOf(doFn)) +} + type genericDoFn2x5[I0, I1, R0, R1, R2, R3, R4 any] interface { ProcessElement(i0 I0, i1 I1) (R0, R1, R2, R3, R4) } @@ -6296,13 +6694,20 @@ func registerDoFn2x5StructWrappersAndFuncs[I0, I1, R0, R1, R2, R3, R4 any](doFn reflectx.RegisterStructWrapper(reflect.TypeOf(doFn).Elem(), wrapperFn) } -// DoFn2x5[I0, I1, R0, R1, R2, R3, R4 any] registers your DoFn to optimize execution at runtime. +// DoFn2x5[I0, I1, R0, R1, R2, R3, R4 any] registers your structural DoFn to optimize execution at runtime. // DoFn input and output parameter types should be provided in order as the generic constraints. func DoFn2x5[I0, I1, R0, R1, R2, R3, R4 any](doFn genericDoFn2x5[I0, I1, R0, R1, R2, R3, R4]) { registerDoFnTypes(doFn) registerDoFn2x5StructWrappersAndFuncs[I0, I1, R0, R1, R2, R3, R4](doFn) } +// Function2x5[I0, I1, R0, R1, R2, R3, R4 any] registers your non-structural DoFn to optimize execution at runtime. +// Function input and output parameter types should be provided in order as the generic constraints. +func Function2x5[I0, I1, R0, R1, R2, R3, R4 any](doFn func(I0, I1) (R0, R1, R2, R3, R4)) { + runtime.RegisterFunction(doFn) + registerMethodTypes(reflect.TypeOf(doFn)) +} + type genericDoFn3x5[I0, I1, I2, R0, R1, R2, R3, R4 any] interface { ProcessElement(i0 I0, i1 I1, i2 I2) (R0, R1, R2, R3, R4) } @@ -6367,13 +6772,20 @@ func registerDoFn3x5StructWrappersAndFuncs[I0, I1, I2, R0, R1, R2, R3, R4 any](d reflectx.RegisterStructWrapper(reflect.TypeOf(doFn).Elem(), wrapperFn) } -// DoFn3x5[I0, I1, I2, R0, R1, R2, R3, R4 any] registers your DoFn to optimize execution at runtime. +// DoFn3x5[I0, I1, I2, R0, R1, R2, R3, R4 any] registers your structural DoFn to optimize execution at runtime. // DoFn input and output parameter types should be provided in order as the generic constraints. func DoFn3x5[I0, I1, I2, R0, R1, R2, R3, R4 any](doFn genericDoFn3x5[I0, I1, I2, R0, R1, R2, R3, R4]) { registerDoFnTypes(doFn) registerDoFn3x5StructWrappersAndFuncs[I0, I1, I2, R0, R1, R2, R3, R4](doFn) } +// Function3x5[I0, I1, I2, R0, R1, R2, R3, R4 any] registers your non-structural DoFn to optimize execution at runtime. +// Function input and output parameter types should be provided in order as the generic constraints. +func Function3x5[I0, I1, I2, R0, R1, R2, R3, R4 any](doFn func(I0, I1, I2) (R0, R1, R2, R3, R4)) { + runtime.RegisterFunction(doFn) + registerMethodTypes(reflect.TypeOf(doFn)) +} + type genericDoFn4x5[I0, I1, I2, I3, R0, R1, R2, R3, R4 any] interface { ProcessElement(i0 I0, i1 I1, i2 I2, i3 I3) (R0, R1, R2, R3, R4) } @@ -6438,13 +6850,20 @@ func registerDoFn4x5StructWrappersAndFuncs[I0, I1, I2, I3, R0, R1, R2, R3, R4 an reflectx.RegisterStructWrapper(reflect.TypeOf(doFn).Elem(), wrapperFn) } -// DoFn4x5[I0, I1, I2, I3, R0, R1, R2, R3, R4 any] registers your DoFn to optimize execution at runtime. +// DoFn4x5[I0, I1, I2, I3, R0, R1, R2, R3, R4 any] registers your structural DoFn to optimize execution at runtime. // DoFn input and output parameter types should be provided in order as the generic constraints. func DoFn4x5[I0, I1, I2, I3, R0, R1, R2, R3, R4 any](doFn genericDoFn4x5[I0, I1, I2, I3, R0, R1, R2, R3, R4]) { registerDoFnTypes(doFn) registerDoFn4x5StructWrappersAndFuncs[I0, I1, I2, I3, R0, R1, R2, R3, R4](doFn) } +// Function4x5[I0, I1, I2, I3, R0, R1, R2, R3, R4 any] registers your non-structural DoFn to optimize execution at runtime. +// Function input and output parameter types should be provided in order as the generic constraints. +func Function4x5[I0, I1, I2, I3, R0, R1, R2, R3, R4 any](doFn func(I0, I1, I2, I3) (R0, R1, R2, R3, R4)) { + runtime.RegisterFunction(doFn) + registerMethodTypes(reflect.TypeOf(doFn)) +} + type genericDoFn5x5[I0, I1, I2, I3, I4, R0, R1, R2, R3, R4 any] interface { ProcessElement(i0 I0, i1 I1, i2 I2, i3 I3, i4 I4) (R0, R1, R2, R3, R4) } @@ -6509,13 +6928,20 @@ func registerDoFn5x5StructWrappersAndFuncs[I0, I1, I2, I3, I4, R0, R1, R2, R3, R reflectx.RegisterStructWrapper(reflect.TypeOf(doFn).Elem(), wrapperFn) } -// DoFn5x5[I0, I1, I2, I3, I4, R0, R1, R2, R3, R4 any] registers your DoFn to optimize execution at runtime. +// DoFn5x5[I0, I1, I2, I3, I4, R0, R1, R2, R3, R4 any] registers your structural DoFn to optimize execution at runtime. // DoFn input and output parameter types should be provided in order as the generic constraints. func DoFn5x5[I0, I1, I2, I3, I4, R0, R1, R2, R3, R4 any](doFn genericDoFn5x5[I0, I1, I2, I3, I4, R0, R1, R2, R3, R4]) { registerDoFnTypes(doFn) registerDoFn5x5StructWrappersAndFuncs[I0, I1, I2, I3, I4, R0, R1, R2, R3, R4](doFn) } +// Function5x5[I0, I1, I2, I3, I4, R0, R1, R2, R3, R4 any] registers your non-structural DoFn to optimize execution at runtime. +// Function input and output parameter types should be provided in order as the generic constraints. +func Function5x5[I0, I1, I2, I3, I4, R0, R1, R2, R3, R4 any](doFn func(I0, I1, I2, I3, I4) (R0, R1, R2, R3, R4)) { + runtime.RegisterFunction(doFn) + registerMethodTypes(reflect.TypeOf(doFn)) +} + type genericDoFn6x5[I0, I1, I2, I3, I4, I5, R0, R1, R2, R3, R4 any] interface { ProcessElement(i0 I0, i1 I1, i2 I2, i3 I3, i4 I4, i5 I5) (R0, R1, R2, R3, R4) } @@ -6580,13 +7006,20 @@ func registerDoFn6x5StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, R0, R1, R2, R reflectx.RegisterStructWrapper(reflect.TypeOf(doFn).Elem(), wrapperFn) } -// DoFn6x5[I0, I1, I2, I3, I4, I5, R0, R1, R2, R3, R4 any] registers your DoFn to optimize execution at runtime. +// DoFn6x5[I0, I1, I2, I3, I4, I5, R0, R1, R2, R3, R4 any] registers your structural DoFn to optimize execution at runtime. // DoFn input and output parameter types should be provided in order as the generic constraints. func DoFn6x5[I0, I1, I2, I3, I4, I5, R0, R1, R2, R3, R4 any](doFn genericDoFn6x5[I0, I1, I2, I3, I4, I5, R0, R1, R2, R3, R4]) { registerDoFnTypes(doFn) registerDoFn6x5StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, R0, R1, R2, R3, R4](doFn) } +// Function6x5[I0, I1, I2, I3, I4, I5, R0, R1, R2, R3, R4 any] registers your non-structural DoFn to optimize execution at runtime. +// Function input and output parameter types should be provided in order as the generic constraints. +func Function6x5[I0, I1, I2, I3, I4, I5, R0, R1, R2, R3, R4 any](doFn func(I0, I1, I2, I3, I4, I5) (R0, R1, R2, R3, R4)) { + runtime.RegisterFunction(doFn) + registerMethodTypes(reflect.TypeOf(doFn)) +} + type genericDoFn7x5[I0, I1, I2, I3, I4, I5, I6, R0, R1, R2, R3, R4 any] interface { ProcessElement(i0 I0, i1 I1, i2 I2, i3 I3, i4 I4, i5 I5, i6 I6) (R0, R1, R2, R3, R4) } @@ -6651,13 +7084,20 @@ func registerDoFn7x5StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, I6, R0, R1, R reflectx.RegisterStructWrapper(reflect.TypeOf(doFn).Elem(), wrapperFn) } -// DoFn7x5[I0, I1, I2, I3, I4, I5, I6, R0, R1, R2, R3, R4 any] registers your DoFn to optimize execution at runtime. +// DoFn7x5[I0, I1, I2, I3, I4, I5, I6, R0, R1, R2, R3, R4 any] registers your structural DoFn to optimize execution at runtime. // DoFn input and output parameter types should be provided in order as the generic constraints. func DoFn7x5[I0, I1, I2, I3, I4, I5, I6, R0, R1, R2, R3, R4 any](doFn genericDoFn7x5[I0, I1, I2, I3, I4, I5, I6, R0, R1, R2, R3, R4]) { registerDoFnTypes(doFn) registerDoFn7x5StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, I6, R0, R1, R2, R3, R4](doFn) } +// Function7x5[I0, I1, I2, I3, I4, I5, I6, R0, R1, R2, R3, R4 any] registers your non-structural DoFn to optimize execution at runtime. +// Function input and output parameter types should be provided in order as the generic constraints. +func Function7x5[I0, I1, I2, I3, I4, I5, I6, R0, R1, R2, R3, R4 any](doFn func(I0, I1, I2, I3, I4, I5, I6) (R0, R1, R2, R3, R4)) { + runtime.RegisterFunction(doFn) + registerMethodTypes(reflect.TypeOf(doFn)) +} + type genericDoFn8x5[I0, I1, I2, I3, I4, I5, I6, I7, R0, R1, R2, R3, R4 any] interface { ProcessElement(i0 I0, i1 I1, i2 I2, i3 I3, i4 I4, i5 I5, i6 I6, i7 I7) (R0, R1, R2, R3, R4) } @@ -6722,13 +7162,20 @@ func registerDoFn8x5StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, I6, I7, R0, R reflectx.RegisterStructWrapper(reflect.TypeOf(doFn).Elem(), wrapperFn) } -// DoFn8x5[I0, I1, I2, I3, I4, I5, I6, I7, R0, R1, R2, R3, R4 any] registers your DoFn to optimize execution at runtime. +// DoFn8x5[I0, I1, I2, I3, I4, I5, I6, I7, R0, R1, R2, R3, R4 any] registers your structural DoFn to optimize execution at runtime. // DoFn input and output parameter types should be provided in order as the generic constraints. func DoFn8x5[I0, I1, I2, I3, I4, I5, I6, I7, R0, R1, R2, R3, R4 any](doFn genericDoFn8x5[I0, I1, I2, I3, I4, I5, I6, I7, R0, R1, R2, R3, R4]) { registerDoFnTypes(doFn) registerDoFn8x5StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, I6, I7, R0, R1, R2, R3, R4](doFn) } +// Function8x5[I0, I1, I2, I3, I4, I5, I6, I7, R0, R1, R2, R3, R4 any] registers your non-structural DoFn to optimize execution at runtime. +// Function input and output parameter types should be provided in order as the generic constraints. +func Function8x5[I0, I1, I2, I3, I4, I5, I6, I7, R0, R1, R2, R3, R4 any](doFn func(I0, I1, I2, I3, I4, I5, I6, I7) (R0, R1, R2, R3, R4)) { + runtime.RegisterFunction(doFn) + registerMethodTypes(reflect.TypeOf(doFn)) +} + type genericDoFn9x5[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0, R1, R2, R3, R4 any] interface { ProcessElement(i0 I0, i1 I1, i2 I2, i3 I3, i4 I4, i5 I5, i6 I6, i7 I7, i8 I8) (R0, R1, R2, R3, R4) } @@ -6793,13 +7240,20 @@ func registerDoFn9x5StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, I6, I7, I8, R reflectx.RegisterStructWrapper(reflect.TypeOf(doFn).Elem(), wrapperFn) } -// DoFn9x5[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0, R1, R2, R3, R4 any] registers your DoFn to optimize execution at runtime. +// DoFn9x5[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0, R1, R2, R3, R4 any] registers your structural DoFn to optimize execution at runtime. // DoFn input and output parameter types should be provided in order as the generic constraints. func DoFn9x5[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0, R1, R2, R3, R4 any](doFn genericDoFn9x5[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0, R1, R2, R3, R4]) { registerDoFnTypes(doFn) registerDoFn9x5StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0, R1, R2, R3, R4](doFn) } +// Function9x5[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0, R1, R2, R3, R4 any] registers your non-structural DoFn to optimize execution at runtime. +// Function input and output parameter types should be provided in order as the generic constraints. +func Function9x5[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0, R1, R2, R3, R4 any](doFn func(I0, I1, I2, I3, I4, I5, I6, I7, I8) (R0, R1, R2, R3, R4)) { + runtime.RegisterFunction(doFn) + registerMethodTypes(reflect.TypeOf(doFn)) +} + type genericDoFn10x5[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0, R1, R2, R3, R4 any] interface { ProcessElement(i0 I0, i1 I1, i2 I2, i3 I3, i4 I4, i5 I5, i6 I6, i7 I7, i8 I8, i9 I9) (R0, R1, R2, R3, R4) } @@ -6864,13 +7318,20 @@ func registerDoFn10x5StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, I6, I7, I8, reflectx.RegisterStructWrapper(reflect.TypeOf(doFn).Elem(), wrapperFn) } -// DoFn10x5[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0, R1, R2, R3, R4 any] registers your DoFn to optimize execution at runtime. +// DoFn10x5[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0, R1, R2, R3, R4 any] registers your structural DoFn to optimize execution at runtime. // DoFn input and output parameter types should be provided in order as the generic constraints. func DoFn10x5[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0, R1, R2, R3, R4 any](doFn genericDoFn10x5[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0, R1, R2, R3, R4]) { registerDoFnTypes(doFn) registerDoFn10x5StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0, R1, R2, R3, R4](doFn) } +// Function10x5[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0, R1, R2, R3, R4 any] registers your non-structural DoFn to optimize execution at runtime. +// Function input and output parameter types should be provided in order as the generic constraints. +func Function10x5[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0, R1, R2, R3, R4 any](doFn func(I0, I1, I2, I3, I4, I5, I6, I7, I8, I9) (R0, R1, R2, R3, R4)) { + runtime.RegisterFunction(doFn) + registerMethodTypes(reflect.TypeOf(doFn)) +} + type startBundle0x0 interface { StartBundle() } diff --git a/sdks/go/pkg/beam/register/register.tmpl b/sdks/go/pkg/beam/register/register.tmpl index b615c784a711..60f63f81fd46 100644 --- a/sdks/go/pkg/beam/register/register.tmpl +++ b/sdks/go/pkg/beam/register/register.tmpl @@ -194,11 +194,18 @@ func registerDoFn{{$processElementIn}}x{{$processElementOut}}StructWrappersAndFu reflectx.RegisterStructWrapper(reflect.TypeOf(doFn).Elem(), wrapperFn) } -// DoFn{{$processElementIn}}x{{$processElementOut}}{{(genericTypingRepresentation $processElementIn $processElementOut true)}} registers your DoFn to optimize execution at runtime. +// DoFn{{$processElementIn}}x{{$processElementOut}}{{(genericTypingRepresentation $processElementIn $processElementOut true)}} registers your structural DoFn to optimize execution at runtime. {{if (or $processElementIn $processElementOut)}}// DoFn input and output parameter types should be provided in order as the generic constraints. {{end}}func DoFn{{$processElementIn}}x{{$processElementOut}}{{(genericTypingRepresentation $processElementIn $processElementOut true)}}(doFn genericDoFn{{$processElementIn}}x{{$processElementOut}}{{(genericTypingRepresentation $processElementIn $processElementOut false)}}) { registerDoFnTypes(doFn) registerDoFn{{$processElementIn}}x{{$processElementOut}}StructWrappersAndFuncs{{(genericTypingRepresentation $processElementIn $processElementOut false)}}(doFn) +} + +// Function{{$processElementIn}}x{{$processElementOut}}{{(genericTypingRepresentation $processElementIn $processElementOut true)}} registers your non-structural DoFn to optimize execution at runtime. +{{if (or $processElementIn $processElementOut)}}// Function input and output parameter types should be provided in order as the generic constraints. +{{end}}func Function{{$processElementIn}}x{{$processElementOut}}{{(genericTypingRepresentation $processElementIn $processElementOut true)}}(doFn func({{range $in := upto $processElementIn}}{{if $in}}, {{end}}I{{$in}}{{end}}) {{if (gt $processElementOut 1)}}({{end}}{{range $out := upto $processElementOut}}{{if $out}}, {{end}}R{{$out}}{{end}}{{if (gt $processElementOut 1)}}){{end}}) { + runtime.RegisterFunction(doFn) + registerMethodTypes(reflect.TypeOf(doFn)) }{{end}}{{end}} {{range $startFinishBundleOut := upto $startFinishBundleOutRange}}{{range $startFinishBundleIn := upto $startFinishBundleInRange}} diff --git a/sdks/go/pkg/beam/register/register_test.go b/sdks/go/pkg/beam/register/register_test.go index 9aee375b14ac..c1099cc4e6f4 100644 --- a/sdks/go/pkg/beam/register/register_test.go +++ b/sdks/go/pkg/beam/register/register_test.go @@ -537,6 +537,36 @@ func TestIter2_Struct(t *testing.T) { } } +type CustomFunctionParameter struct { + key string + val int +} + +type CustomFunctionReturn struct { + key int + val string +} + +func customFunction(a CustomFunctionParameter) CustomFunctionReturn { + return CustomFunctionReturn{ + key: a.val, + val: a.key, + } +} + +func TestFunction(t *testing.T) { + Function1x1[CustomFunctionParameter, CustomFunctionReturn](customFunction) + + // Need to call FromType so that the registry will reconcile its registrations + schema.FromType(reflect.TypeOf(CustomFunctionParameter{})) + if !schema.Registered(reflect.TypeOf(CustomFunctionParameter{})) { + t.Errorf("schema.Registered(reflect.TypeOf(CustomFunctionParameter{})) = false, want true") + } + if !schema.Registered(reflect.TypeOf(CustomFunctionReturn{})) { + t.Errorf("schema.Registered(reflect.TypeOf(CustomFunctionReturn{})) = false, want true") + } +} + type elementProcessor struct { inFV exec.FullValue } From 8fe2b6052a6cf667df698a7adcd60120eaac10a3 Mon Sep 17 00:00:00 2001 From: Danny McCormick Date: Thu, 12 May 2022 18:47:44 -0400 Subject: [PATCH 2/5] RegisterFunc + benchmarks --- sdks/go/pkg/beam/register/register.go | 462 ++++++++++++++++++--- sdks/go/pkg/beam/register/register.tmpl | 7 +- sdks/go/pkg/beam/register/register_test.go | 127 ++++-- 3 files changed, 494 insertions(+), 102 deletions(-) diff --git a/sdks/go/pkg/beam/register/register.go b/sdks/go/pkg/beam/register/register.go index a7c2f8e971c6..6cf4cfa9efc6 100644 --- a/sdks/go/pkg/beam/register/register.go +++ b/sdks/go/pkg/beam/register/register.go @@ -2256,10 +2256,15 @@ func DoFn0x0(doFn genericDoFn0x0) { registerDoFn0x0StructWrappersAndFuncs(doFn) } -// Function0x0 registers your non-structural DoFn to optimize execution at runtime. +// Function0x0 registers your functional DoFn to optimize execution at runtime. func Function0x0(doFn func()) { runtime.RegisterFunction(doFn) registerMethodTypes(reflect.TypeOf(doFn)) + caller := func(fn interface{}) reflectx.Func { + f := fn.(func()) + return &caller0x0{fn: f} + } + reflectx.RegisterFunc(reflect.TypeOf((*func())(nil)).Elem(), caller) } type genericDoFn1x0[I0 any] interface { @@ -2333,11 +2338,16 @@ func DoFn1x0[I0 any](doFn genericDoFn1x0[I0]) { registerDoFn1x0StructWrappersAndFuncs[I0](doFn) } -// Function1x0[I0 any] registers your non-structural DoFn to optimize execution at runtime. +// Function1x0[I0 any] registers your functional DoFn to optimize execution at runtime. // Function input and output parameter types should be provided in order as the generic constraints. func Function1x0[I0 any](doFn func(I0)) { runtime.RegisterFunction(doFn) registerMethodTypes(reflect.TypeOf(doFn)) + caller := func(fn interface{}) reflectx.Func { + f := fn.(func(I0)) + return &caller1x0[I0]{fn: f} + } + reflectx.RegisterFunc(reflect.TypeOf((*func(I0))(nil)).Elem(), caller) } type genericDoFn2x0[I0, I1 any] interface { @@ -2411,11 +2421,16 @@ func DoFn2x0[I0, I1 any](doFn genericDoFn2x0[I0, I1]) { registerDoFn2x0StructWrappersAndFuncs[I0, I1](doFn) } -// Function2x0[I0, I1 any] registers your non-structural DoFn to optimize execution at runtime. +// Function2x0[I0, I1 any] registers your functional DoFn to optimize execution at runtime. // Function input and output parameter types should be provided in order as the generic constraints. func Function2x0[I0, I1 any](doFn func(I0, I1)) { runtime.RegisterFunction(doFn) registerMethodTypes(reflect.TypeOf(doFn)) + caller := func(fn interface{}) reflectx.Func { + f := fn.(func(I0, I1)) + return &caller2x0[I0, I1]{fn: f} + } + reflectx.RegisterFunc(reflect.TypeOf((*func(I0, I1))(nil)).Elem(), caller) } type genericDoFn3x0[I0, I1, I2 any] interface { @@ -2489,11 +2504,16 @@ func DoFn3x0[I0, I1, I2 any](doFn genericDoFn3x0[I0, I1, I2]) { registerDoFn3x0StructWrappersAndFuncs[I0, I1, I2](doFn) } -// Function3x0[I0, I1, I2 any] registers your non-structural DoFn to optimize execution at runtime. +// Function3x0[I0, I1, I2 any] registers your functional DoFn to optimize execution at runtime. // Function input and output parameter types should be provided in order as the generic constraints. func Function3x0[I0, I1, I2 any](doFn func(I0, I1, I2)) { runtime.RegisterFunction(doFn) registerMethodTypes(reflect.TypeOf(doFn)) + caller := func(fn interface{}) reflectx.Func { + f := fn.(func(I0, I1, I2)) + return &caller3x0[I0, I1, I2]{fn: f} + } + reflectx.RegisterFunc(reflect.TypeOf((*func(I0, I1, I2))(nil)).Elem(), caller) } type genericDoFn4x0[I0, I1, I2, I3 any] interface { @@ -2567,11 +2587,16 @@ func DoFn4x0[I0, I1, I2, I3 any](doFn genericDoFn4x0[I0, I1, I2, I3]) { registerDoFn4x0StructWrappersAndFuncs[I0, I1, I2, I3](doFn) } -// Function4x0[I0, I1, I2, I3 any] registers your non-structural DoFn to optimize execution at runtime. +// Function4x0[I0, I1, I2, I3 any] registers your functional DoFn to optimize execution at runtime. // Function input and output parameter types should be provided in order as the generic constraints. func Function4x0[I0, I1, I2, I3 any](doFn func(I0, I1, I2, I3)) { runtime.RegisterFunction(doFn) registerMethodTypes(reflect.TypeOf(doFn)) + caller := func(fn interface{}) reflectx.Func { + f := fn.(func(I0, I1, I2, I3)) + return &caller4x0[I0, I1, I2, I3]{fn: f} + } + reflectx.RegisterFunc(reflect.TypeOf((*func(I0, I1, I2, I3))(nil)).Elem(), caller) } type genericDoFn5x0[I0, I1, I2, I3, I4 any] interface { @@ -2645,11 +2670,16 @@ func DoFn5x0[I0, I1, I2, I3, I4 any](doFn genericDoFn5x0[I0, I1, I2, I3, I4]) { registerDoFn5x0StructWrappersAndFuncs[I0, I1, I2, I3, I4](doFn) } -// Function5x0[I0, I1, I2, I3, I4 any] registers your non-structural DoFn to optimize execution at runtime. +// Function5x0[I0, I1, I2, I3, I4 any] registers your functional DoFn to optimize execution at runtime. // Function input and output parameter types should be provided in order as the generic constraints. func Function5x0[I0, I1, I2, I3, I4 any](doFn func(I0, I1, I2, I3, I4)) { runtime.RegisterFunction(doFn) registerMethodTypes(reflect.TypeOf(doFn)) + caller := func(fn interface{}) reflectx.Func { + f := fn.(func(I0, I1, I2, I3, I4)) + return &caller5x0[I0, I1, I2, I3, I4]{fn: f} + } + reflectx.RegisterFunc(reflect.TypeOf((*func(I0, I1, I2, I3, I4))(nil)).Elem(), caller) } type genericDoFn6x0[I0, I1, I2, I3, I4, I5 any] interface { @@ -2723,11 +2753,16 @@ func DoFn6x0[I0, I1, I2, I3, I4, I5 any](doFn genericDoFn6x0[I0, I1, I2, I3, I4, registerDoFn6x0StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5](doFn) } -// Function6x0[I0, I1, I2, I3, I4, I5 any] registers your non-structural DoFn to optimize execution at runtime. +// Function6x0[I0, I1, I2, I3, I4, I5 any] registers your functional DoFn to optimize execution at runtime. // Function input and output parameter types should be provided in order as the generic constraints. func Function6x0[I0, I1, I2, I3, I4, I5 any](doFn func(I0, I1, I2, I3, I4, I5)) { runtime.RegisterFunction(doFn) registerMethodTypes(reflect.TypeOf(doFn)) + caller := func(fn interface{}) reflectx.Func { + f := fn.(func(I0, I1, I2, I3, I4, I5)) + return &caller6x0[I0, I1, I2, I3, I4, I5]{fn: f} + } + reflectx.RegisterFunc(reflect.TypeOf((*func(I0, I1, I2, I3, I4, I5))(nil)).Elem(), caller) } type genericDoFn7x0[I0, I1, I2, I3, I4, I5, I6 any] interface { @@ -2801,11 +2836,16 @@ func DoFn7x0[I0, I1, I2, I3, I4, I5, I6 any](doFn genericDoFn7x0[I0, I1, I2, I3, registerDoFn7x0StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, I6](doFn) } -// Function7x0[I0, I1, I2, I3, I4, I5, I6 any] registers your non-structural DoFn to optimize execution at runtime. +// Function7x0[I0, I1, I2, I3, I4, I5, I6 any] registers your functional DoFn to optimize execution at runtime. // Function input and output parameter types should be provided in order as the generic constraints. func Function7x0[I0, I1, I2, I3, I4, I5, I6 any](doFn func(I0, I1, I2, I3, I4, I5, I6)) { runtime.RegisterFunction(doFn) registerMethodTypes(reflect.TypeOf(doFn)) + caller := func(fn interface{}) reflectx.Func { + f := fn.(func(I0, I1, I2, I3, I4, I5, I6)) + return &caller7x0[I0, I1, I2, I3, I4, I5, I6]{fn: f} + } + reflectx.RegisterFunc(reflect.TypeOf((*func(I0, I1, I2, I3, I4, I5, I6))(nil)).Elem(), caller) } type genericDoFn8x0[I0, I1, I2, I3, I4, I5, I6, I7 any] interface { @@ -2879,11 +2919,16 @@ func DoFn8x0[I0, I1, I2, I3, I4, I5, I6, I7 any](doFn genericDoFn8x0[I0, I1, I2, registerDoFn8x0StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, I6, I7](doFn) } -// Function8x0[I0, I1, I2, I3, I4, I5, I6, I7 any] registers your non-structural DoFn to optimize execution at runtime. +// Function8x0[I0, I1, I2, I3, I4, I5, I6, I7 any] registers your functional DoFn to optimize execution at runtime. // Function input and output parameter types should be provided in order as the generic constraints. func Function8x0[I0, I1, I2, I3, I4, I5, I6, I7 any](doFn func(I0, I1, I2, I3, I4, I5, I6, I7)) { runtime.RegisterFunction(doFn) registerMethodTypes(reflect.TypeOf(doFn)) + caller := func(fn interface{}) reflectx.Func { + f := fn.(func(I0, I1, I2, I3, I4, I5, I6, I7)) + return &caller8x0[I0, I1, I2, I3, I4, I5, I6, I7]{fn: f} + } + reflectx.RegisterFunc(reflect.TypeOf((*func(I0, I1, I2, I3, I4, I5, I6, I7))(nil)).Elem(), caller) } type genericDoFn9x0[I0, I1, I2, I3, I4, I5, I6, I7, I8 any] interface { @@ -2957,11 +3002,16 @@ func DoFn9x0[I0, I1, I2, I3, I4, I5, I6, I7, I8 any](doFn genericDoFn9x0[I0, I1, registerDoFn9x0StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, I6, I7, I8](doFn) } -// Function9x0[I0, I1, I2, I3, I4, I5, I6, I7, I8 any] registers your non-structural DoFn to optimize execution at runtime. +// Function9x0[I0, I1, I2, I3, I4, I5, I6, I7, I8 any] registers your functional DoFn to optimize execution at runtime. // Function input and output parameter types should be provided in order as the generic constraints. func Function9x0[I0, I1, I2, I3, I4, I5, I6, I7, I8 any](doFn func(I0, I1, I2, I3, I4, I5, I6, I7, I8)) { runtime.RegisterFunction(doFn) registerMethodTypes(reflect.TypeOf(doFn)) + caller := func(fn interface{}) reflectx.Func { + f := fn.(func(I0, I1, I2, I3, I4, I5, I6, I7, I8)) + return &caller9x0[I0, I1, I2, I3, I4, I5, I6, I7, I8]{fn: f} + } + reflectx.RegisterFunc(reflect.TypeOf((*func(I0, I1, I2, I3, I4, I5, I6, I7, I8))(nil)).Elem(), caller) } type genericDoFn10x0[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9 any] interface { @@ -3035,11 +3085,16 @@ func DoFn10x0[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9 any](doFn genericDoFn10x0[I registerDoFn10x0StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9](doFn) } -// Function10x0[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9 any] registers your non-structural DoFn to optimize execution at runtime. +// Function10x0[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9 any] registers your functional DoFn to optimize execution at runtime. // Function input and output parameter types should be provided in order as the generic constraints. func Function10x0[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9 any](doFn func(I0, I1, I2, I3, I4, I5, I6, I7, I8, I9)) { runtime.RegisterFunction(doFn) registerMethodTypes(reflect.TypeOf(doFn)) + caller := func(fn interface{}) reflectx.Func { + f := fn.(func(I0, I1, I2, I3, I4, I5, I6, I7, I8, I9)) + return &caller10x0[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9]{fn: f} + } + reflectx.RegisterFunc(reflect.TypeOf((*func(I0, I1, I2, I3, I4, I5, I6, I7, I8, I9))(nil)).Elem(), caller) } type genericDoFn0x1[R0 any] interface { @@ -3113,11 +3168,16 @@ func DoFn0x1[R0 any](doFn genericDoFn0x1[R0]) { registerDoFn0x1StructWrappersAndFuncs[R0](doFn) } -// Function0x1[R0 any] registers your non-structural DoFn to optimize execution at runtime. +// Function0x1[R0 any] registers your functional DoFn to optimize execution at runtime. // Function input and output parameter types should be provided in order as the generic constraints. func Function0x1[R0 any](doFn func() R0) { runtime.RegisterFunction(doFn) registerMethodTypes(reflect.TypeOf(doFn)) + caller := func(fn interface{}) reflectx.Func { + f := fn.(func() R0) + return &caller0x1[R0]{fn: f} + } + reflectx.RegisterFunc(reflect.TypeOf((*func() R0)(nil)).Elem(), caller) } type genericDoFn1x1[I0, R0 any] interface { @@ -3191,11 +3251,16 @@ func DoFn1x1[I0, R0 any](doFn genericDoFn1x1[I0, R0]) { registerDoFn1x1StructWrappersAndFuncs[I0, R0](doFn) } -// Function1x1[I0, R0 any] registers your non-structural DoFn to optimize execution at runtime. +// Function1x1[I0, R0 any] registers your functional DoFn to optimize execution at runtime. // Function input and output parameter types should be provided in order as the generic constraints. func Function1x1[I0, R0 any](doFn func(I0) R0) { runtime.RegisterFunction(doFn) registerMethodTypes(reflect.TypeOf(doFn)) + caller := func(fn interface{}) reflectx.Func { + f := fn.(func(I0) R0) + return &caller1x1[I0, R0]{fn: f} + } + reflectx.RegisterFunc(reflect.TypeOf((*func(I0) R0)(nil)).Elem(), caller) } type genericDoFn2x1[I0, I1, R0 any] interface { @@ -3269,11 +3334,16 @@ func DoFn2x1[I0, I1, R0 any](doFn genericDoFn2x1[I0, I1, R0]) { registerDoFn2x1StructWrappersAndFuncs[I0, I1, R0](doFn) } -// Function2x1[I0, I1, R0 any] registers your non-structural DoFn to optimize execution at runtime. +// Function2x1[I0, I1, R0 any] registers your functional DoFn to optimize execution at runtime. // Function input and output parameter types should be provided in order as the generic constraints. func Function2x1[I0, I1, R0 any](doFn func(I0, I1) R0) { runtime.RegisterFunction(doFn) registerMethodTypes(reflect.TypeOf(doFn)) + caller := func(fn interface{}) reflectx.Func { + f := fn.(func(I0, I1) R0) + return &caller2x1[I0, I1, R0]{fn: f} + } + reflectx.RegisterFunc(reflect.TypeOf((*func(I0, I1) R0)(nil)).Elem(), caller) } type genericDoFn3x1[I0, I1, I2, R0 any] interface { @@ -3347,11 +3417,16 @@ func DoFn3x1[I0, I1, I2, R0 any](doFn genericDoFn3x1[I0, I1, I2, R0]) { registerDoFn3x1StructWrappersAndFuncs[I0, I1, I2, R0](doFn) } -// Function3x1[I0, I1, I2, R0 any] registers your non-structural DoFn to optimize execution at runtime. +// Function3x1[I0, I1, I2, R0 any] registers your functional DoFn to optimize execution at runtime. // Function input and output parameter types should be provided in order as the generic constraints. func Function3x1[I0, I1, I2, R0 any](doFn func(I0, I1, I2) R0) { runtime.RegisterFunction(doFn) registerMethodTypes(reflect.TypeOf(doFn)) + caller := func(fn interface{}) reflectx.Func { + f := fn.(func(I0, I1, I2) R0) + return &caller3x1[I0, I1, I2, R0]{fn: f} + } + reflectx.RegisterFunc(reflect.TypeOf((*func(I0, I1, I2) R0)(nil)).Elem(), caller) } type genericDoFn4x1[I0, I1, I2, I3, R0 any] interface { @@ -3425,11 +3500,16 @@ func DoFn4x1[I0, I1, I2, I3, R0 any](doFn genericDoFn4x1[I0, I1, I2, I3, R0]) { registerDoFn4x1StructWrappersAndFuncs[I0, I1, I2, I3, R0](doFn) } -// Function4x1[I0, I1, I2, I3, R0 any] registers your non-structural DoFn to optimize execution at runtime. +// Function4x1[I0, I1, I2, I3, R0 any] registers your functional DoFn to optimize execution at runtime. // Function input and output parameter types should be provided in order as the generic constraints. func Function4x1[I0, I1, I2, I3, R0 any](doFn func(I0, I1, I2, I3) R0) { runtime.RegisterFunction(doFn) registerMethodTypes(reflect.TypeOf(doFn)) + caller := func(fn interface{}) reflectx.Func { + f := fn.(func(I0, I1, I2, I3) R0) + return &caller4x1[I0, I1, I2, I3, R0]{fn: f} + } + reflectx.RegisterFunc(reflect.TypeOf((*func(I0, I1, I2, I3) R0)(nil)).Elem(), caller) } type genericDoFn5x1[I0, I1, I2, I3, I4, R0 any] interface { @@ -3503,11 +3583,16 @@ func DoFn5x1[I0, I1, I2, I3, I4, R0 any](doFn genericDoFn5x1[I0, I1, I2, I3, I4, registerDoFn5x1StructWrappersAndFuncs[I0, I1, I2, I3, I4, R0](doFn) } -// Function5x1[I0, I1, I2, I3, I4, R0 any] registers your non-structural DoFn to optimize execution at runtime. +// Function5x1[I0, I1, I2, I3, I4, R0 any] registers your functional DoFn to optimize execution at runtime. // Function input and output parameter types should be provided in order as the generic constraints. func Function5x1[I0, I1, I2, I3, I4, R0 any](doFn func(I0, I1, I2, I3, I4) R0) { runtime.RegisterFunction(doFn) registerMethodTypes(reflect.TypeOf(doFn)) + caller := func(fn interface{}) reflectx.Func { + f := fn.(func(I0, I1, I2, I3, I4) R0) + return &caller5x1[I0, I1, I2, I3, I4, R0]{fn: f} + } + reflectx.RegisterFunc(reflect.TypeOf((*func(I0, I1, I2, I3, I4) R0)(nil)).Elem(), caller) } type genericDoFn6x1[I0, I1, I2, I3, I4, I5, R0 any] interface { @@ -3581,11 +3666,16 @@ func DoFn6x1[I0, I1, I2, I3, I4, I5, R0 any](doFn genericDoFn6x1[I0, I1, I2, I3, registerDoFn6x1StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, R0](doFn) } -// Function6x1[I0, I1, I2, I3, I4, I5, R0 any] registers your non-structural DoFn to optimize execution at runtime. +// Function6x1[I0, I1, I2, I3, I4, I5, R0 any] registers your functional DoFn to optimize execution at runtime. // Function input and output parameter types should be provided in order as the generic constraints. func Function6x1[I0, I1, I2, I3, I4, I5, R0 any](doFn func(I0, I1, I2, I3, I4, I5) R0) { runtime.RegisterFunction(doFn) registerMethodTypes(reflect.TypeOf(doFn)) + caller := func(fn interface{}) reflectx.Func { + f := fn.(func(I0, I1, I2, I3, I4, I5) R0) + return &caller6x1[I0, I1, I2, I3, I4, I5, R0]{fn: f} + } + reflectx.RegisterFunc(reflect.TypeOf((*func(I0, I1, I2, I3, I4, I5) R0)(nil)).Elem(), caller) } type genericDoFn7x1[I0, I1, I2, I3, I4, I5, I6, R0 any] interface { @@ -3659,11 +3749,16 @@ func DoFn7x1[I0, I1, I2, I3, I4, I5, I6, R0 any](doFn genericDoFn7x1[I0, I1, I2, registerDoFn7x1StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, I6, R0](doFn) } -// Function7x1[I0, I1, I2, I3, I4, I5, I6, R0 any] registers your non-structural DoFn to optimize execution at runtime. +// Function7x1[I0, I1, I2, I3, I4, I5, I6, R0 any] registers your functional DoFn to optimize execution at runtime. // Function input and output parameter types should be provided in order as the generic constraints. func Function7x1[I0, I1, I2, I3, I4, I5, I6, R0 any](doFn func(I0, I1, I2, I3, I4, I5, I6) R0) { runtime.RegisterFunction(doFn) registerMethodTypes(reflect.TypeOf(doFn)) + caller := func(fn interface{}) reflectx.Func { + f := fn.(func(I0, I1, I2, I3, I4, I5, I6) R0) + return &caller7x1[I0, I1, I2, I3, I4, I5, I6, R0]{fn: f} + } + reflectx.RegisterFunc(reflect.TypeOf((*func(I0, I1, I2, I3, I4, I5, I6) R0)(nil)).Elem(), caller) } type genericDoFn8x1[I0, I1, I2, I3, I4, I5, I6, I7, R0 any] interface { @@ -3737,11 +3832,16 @@ func DoFn8x1[I0, I1, I2, I3, I4, I5, I6, I7, R0 any](doFn genericDoFn8x1[I0, I1, registerDoFn8x1StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, I6, I7, R0](doFn) } -// Function8x1[I0, I1, I2, I3, I4, I5, I6, I7, R0 any] registers your non-structural DoFn to optimize execution at runtime. +// Function8x1[I0, I1, I2, I3, I4, I5, I6, I7, R0 any] registers your functional DoFn to optimize execution at runtime. // Function input and output parameter types should be provided in order as the generic constraints. func Function8x1[I0, I1, I2, I3, I4, I5, I6, I7, R0 any](doFn func(I0, I1, I2, I3, I4, I5, I6, I7) R0) { runtime.RegisterFunction(doFn) registerMethodTypes(reflect.TypeOf(doFn)) + caller := func(fn interface{}) reflectx.Func { + f := fn.(func(I0, I1, I2, I3, I4, I5, I6, I7) R0) + return &caller8x1[I0, I1, I2, I3, I4, I5, I6, I7, R0]{fn: f} + } + reflectx.RegisterFunc(reflect.TypeOf((*func(I0, I1, I2, I3, I4, I5, I6, I7) R0)(nil)).Elem(), caller) } type genericDoFn9x1[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0 any] interface { @@ -3815,11 +3915,16 @@ func DoFn9x1[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0 any](doFn genericDoFn9x1[I0, registerDoFn9x1StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0](doFn) } -// Function9x1[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0 any] registers your non-structural DoFn to optimize execution at runtime. +// Function9x1[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0 any] registers your functional DoFn to optimize execution at runtime. // Function input and output parameter types should be provided in order as the generic constraints. func Function9x1[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0 any](doFn func(I0, I1, I2, I3, I4, I5, I6, I7, I8) R0) { runtime.RegisterFunction(doFn) registerMethodTypes(reflect.TypeOf(doFn)) + caller := func(fn interface{}) reflectx.Func { + f := fn.(func(I0, I1, I2, I3, I4, I5, I6, I7, I8) R0) + return &caller9x1[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0]{fn: f} + } + reflectx.RegisterFunc(reflect.TypeOf((*func(I0, I1, I2, I3, I4, I5, I6, I7, I8) R0)(nil)).Elem(), caller) } type genericDoFn10x1[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0 any] interface { @@ -3893,11 +3998,16 @@ func DoFn10x1[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0 any](doFn genericDoFn10 registerDoFn10x1StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0](doFn) } -// Function10x1[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0 any] registers your non-structural DoFn to optimize execution at runtime. +// Function10x1[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0 any] registers your functional DoFn to optimize execution at runtime. // Function input and output parameter types should be provided in order as the generic constraints. func Function10x1[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0 any](doFn func(I0, I1, I2, I3, I4, I5, I6, I7, I8, I9) R0) { runtime.RegisterFunction(doFn) registerMethodTypes(reflect.TypeOf(doFn)) + caller := func(fn interface{}) reflectx.Func { + f := fn.(func(I0, I1, I2, I3, I4, I5, I6, I7, I8, I9) R0) + return &caller10x1[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0]{fn: f} + } + reflectx.RegisterFunc(reflect.TypeOf((*func(I0, I1, I2, I3, I4, I5, I6, I7, I8, I9) R0)(nil)).Elem(), caller) } type genericDoFn0x2[R0, R1 any] interface { @@ -3971,11 +4081,16 @@ func DoFn0x2[R0, R1 any](doFn genericDoFn0x2[R0, R1]) { registerDoFn0x2StructWrappersAndFuncs[R0, R1](doFn) } -// Function0x2[R0, R1 any] registers your non-structural DoFn to optimize execution at runtime. +// Function0x2[R0, R1 any] registers your functional DoFn to optimize execution at runtime. // Function input and output parameter types should be provided in order as the generic constraints. func Function0x2[R0, R1 any](doFn func() (R0, R1)) { runtime.RegisterFunction(doFn) registerMethodTypes(reflect.TypeOf(doFn)) + caller := func(fn interface{}) reflectx.Func { + f := fn.(func() (R0, R1)) + return &caller0x2[R0, R1]{fn: f} + } + reflectx.RegisterFunc(reflect.TypeOf((*func() (R0, R1))(nil)).Elem(), caller) } type genericDoFn1x2[I0, R0, R1 any] interface { @@ -4049,11 +4164,16 @@ func DoFn1x2[I0, R0, R1 any](doFn genericDoFn1x2[I0, R0, R1]) { registerDoFn1x2StructWrappersAndFuncs[I0, R0, R1](doFn) } -// Function1x2[I0, R0, R1 any] registers your non-structural DoFn to optimize execution at runtime. +// Function1x2[I0, R0, R1 any] registers your functional DoFn to optimize execution at runtime. // Function input and output parameter types should be provided in order as the generic constraints. func Function1x2[I0, R0, R1 any](doFn func(I0) (R0, R1)) { runtime.RegisterFunction(doFn) registerMethodTypes(reflect.TypeOf(doFn)) + caller := func(fn interface{}) reflectx.Func { + f := fn.(func(I0) (R0, R1)) + return &caller1x2[I0, R0, R1]{fn: f} + } + reflectx.RegisterFunc(reflect.TypeOf((*func(I0) (R0, R1))(nil)).Elem(), caller) } type genericDoFn2x2[I0, I1, R0, R1 any] interface { @@ -4127,11 +4247,16 @@ func DoFn2x2[I0, I1, R0, R1 any](doFn genericDoFn2x2[I0, I1, R0, R1]) { registerDoFn2x2StructWrappersAndFuncs[I0, I1, R0, R1](doFn) } -// Function2x2[I0, I1, R0, R1 any] registers your non-structural DoFn to optimize execution at runtime. +// Function2x2[I0, I1, R0, R1 any] registers your functional DoFn to optimize execution at runtime. // Function input and output parameter types should be provided in order as the generic constraints. func Function2x2[I0, I1, R0, R1 any](doFn func(I0, I1) (R0, R1)) { runtime.RegisterFunction(doFn) registerMethodTypes(reflect.TypeOf(doFn)) + caller := func(fn interface{}) reflectx.Func { + f := fn.(func(I0, I1) (R0, R1)) + return &caller2x2[I0, I1, R0, R1]{fn: f} + } + reflectx.RegisterFunc(reflect.TypeOf((*func(I0, I1) (R0, R1))(nil)).Elem(), caller) } type genericDoFn3x2[I0, I1, I2, R0, R1 any] interface { @@ -4205,11 +4330,16 @@ func DoFn3x2[I0, I1, I2, R0, R1 any](doFn genericDoFn3x2[I0, I1, I2, R0, R1]) { registerDoFn3x2StructWrappersAndFuncs[I0, I1, I2, R0, R1](doFn) } -// Function3x2[I0, I1, I2, R0, R1 any] registers your non-structural DoFn to optimize execution at runtime. +// Function3x2[I0, I1, I2, R0, R1 any] registers your functional DoFn to optimize execution at runtime. // Function input and output parameter types should be provided in order as the generic constraints. func Function3x2[I0, I1, I2, R0, R1 any](doFn func(I0, I1, I2) (R0, R1)) { runtime.RegisterFunction(doFn) registerMethodTypes(reflect.TypeOf(doFn)) + caller := func(fn interface{}) reflectx.Func { + f := fn.(func(I0, I1, I2) (R0, R1)) + return &caller3x2[I0, I1, I2, R0, R1]{fn: f} + } + reflectx.RegisterFunc(reflect.TypeOf((*func(I0, I1, I2) (R0, R1))(nil)).Elem(), caller) } type genericDoFn4x2[I0, I1, I2, I3, R0, R1 any] interface { @@ -4283,11 +4413,16 @@ func DoFn4x2[I0, I1, I2, I3, R0, R1 any](doFn genericDoFn4x2[I0, I1, I2, I3, R0, registerDoFn4x2StructWrappersAndFuncs[I0, I1, I2, I3, R0, R1](doFn) } -// Function4x2[I0, I1, I2, I3, R0, R1 any] registers your non-structural DoFn to optimize execution at runtime. +// Function4x2[I0, I1, I2, I3, R0, R1 any] registers your functional DoFn to optimize execution at runtime. // Function input and output parameter types should be provided in order as the generic constraints. func Function4x2[I0, I1, I2, I3, R0, R1 any](doFn func(I0, I1, I2, I3) (R0, R1)) { runtime.RegisterFunction(doFn) registerMethodTypes(reflect.TypeOf(doFn)) + caller := func(fn interface{}) reflectx.Func { + f := fn.(func(I0, I1, I2, I3) (R0, R1)) + return &caller4x2[I0, I1, I2, I3, R0, R1]{fn: f} + } + reflectx.RegisterFunc(reflect.TypeOf((*func(I0, I1, I2, I3) (R0, R1))(nil)).Elem(), caller) } type genericDoFn5x2[I0, I1, I2, I3, I4, R0, R1 any] interface { @@ -4361,11 +4496,16 @@ func DoFn5x2[I0, I1, I2, I3, I4, R0, R1 any](doFn genericDoFn5x2[I0, I1, I2, I3, registerDoFn5x2StructWrappersAndFuncs[I0, I1, I2, I3, I4, R0, R1](doFn) } -// Function5x2[I0, I1, I2, I3, I4, R0, R1 any] registers your non-structural DoFn to optimize execution at runtime. +// Function5x2[I0, I1, I2, I3, I4, R0, R1 any] registers your functional DoFn to optimize execution at runtime. // Function input and output parameter types should be provided in order as the generic constraints. func Function5x2[I0, I1, I2, I3, I4, R0, R1 any](doFn func(I0, I1, I2, I3, I4) (R0, R1)) { runtime.RegisterFunction(doFn) registerMethodTypes(reflect.TypeOf(doFn)) + caller := func(fn interface{}) reflectx.Func { + f := fn.(func(I0, I1, I2, I3, I4) (R0, R1)) + return &caller5x2[I0, I1, I2, I3, I4, R0, R1]{fn: f} + } + reflectx.RegisterFunc(reflect.TypeOf((*func(I0, I1, I2, I3, I4) (R0, R1))(nil)).Elem(), caller) } type genericDoFn6x2[I0, I1, I2, I3, I4, I5, R0, R1 any] interface { @@ -4439,11 +4579,16 @@ func DoFn6x2[I0, I1, I2, I3, I4, I5, R0, R1 any](doFn genericDoFn6x2[I0, I1, I2, registerDoFn6x2StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, R0, R1](doFn) } -// Function6x2[I0, I1, I2, I3, I4, I5, R0, R1 any] registers your non-structural DoFn to optimize execution at runtime. +// Function6x2[I0, I1, I2, I3, I4, I5, R0, R1 any] registers your functional DoFn to optimize execution at runtime. // Function input and output parameter types should be provided in order as the generic constraints. func Function6x2[I0, I1, I2, I3, I4, I5, R0, R1 any](doFn func(I0, I1, I2, I3, I4, I5) (R0, R1)) { runtime.RegisterFunction(doFn) registerMethodTypes(reflect.TypeOf(doFn)) + caller := func(fn interface{}) reflectx.Func { + f := fn.(func(I0, I1, I2, I3, I4, I5) (R0, R1)) + return &caller6x2[I0, I1, I2, I3, I4, I5, R0, R1]{fn: f} + } + reflectx.RegisterFunc(reflect.TypeOf((*func(I0, I1, I2, I3, I4, I5) (R0, R1))(nil)).Elem(), caller) } type genericDoFn7x2[I0, I1, I2, I3, I4, I5, I6, R0, R1 any] interface { @@ -4517,11 +4662,16 @@ func DoFn7x2[I0, I1, I2, I3, I4, I5, I6, R0, R1 any](doFn genericDoFn7x2[I0, I1, registerDoFn7x2StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, I6, R0, R1](doFn) } -// Function7x2[I0, I1, I2, I3, I4, I5, I6, R0, R1 any] registers your non-structural DoFn to optimize execution at runtime. +// Function7x2[I0, I1, I2, I3, I4, I5, I6, R0, R1 any] registers your functional DoFn to optimize execution at runtime. // Function input and output parameter types should be provided in order as the generic constraints. func Function7x2[I0, I1, I2, I3, I4, I5, I6, R0, R1 any](doFn func(I0, I1, I2, I3, I4, I5, I6) (R0, R1)) { runtime.RegisterFunction(doFn) registerMethodTypes(reflect.TypeOf(doFn)) + caller := func(fn interface{}) reflectx.Func { + f := fn.(func(I0, I1, I2, I3, I4, I5, I6) (R0, R1)) + return &caller7x2[I0, I1, I2, I3, I4, I5, I6, R0, R1]{fn: f} + } + reflectx.RegisterFunc(reflect.TypeOf((*func(I0, I1, I2, I3, I4, I5, I6) (R0, R1))(nil)).Elem(), caller) } type genericDoFn8x2[I0, I1, I2, I3, I4, I5, I6, I7, R0, R1 any] interface { @@ -4595,11 +4745,16 @@ func DoFn8x2[I0, I1, I2, I3, I4, I5, I6, I7, R0, R1 any](doFn genericDoFn8x2[I0, registerDoFn8x2StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, I6, I7, R0, R1](doFn) } -// Function8x2[I0, I1, I2, I3, I4, I5, I6, I7, R0, R1 any] registers your non-structural DoFn to optimize execution at runtime. +// Function8x2[I0, I1, I2, I3, I4, I5, I6, I7, R0, R1 any] registers your functional DoFn to optimize execution at runtime. // Function input and output parameter types should be provided in order as the generic constraints. func Function8x2[I0, I1, I2, I3, I4, I5, I6, I7, R0, R1 any](doFn func(I0, I1, I2, I3, I4, I5, I6, I7) (R0, R1)) { runtime.RegisterFunction(doFn) registerMethodTypes(reflect.TypeOf(doFn)) + caller := func(fn interface{}) reflectx.Func { + f := fn.(func(I0, I1, I2, I3, I4, I5, I6, I7) (R0, R1)) + return &caller8x2[I0, I1, I2, I3, I4, I5, I6, I7, R0, R1]{fn: f} + } + reflectx.RegisterFunc(reflect.TypeOf((*func(I0, I1, I2, I3, I4, I5, I6, I7) (R0, R1))(nil)).Elem(), caller) } type genericDoFn9x2[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0, R1 any] interface { @@ -4673,11 +4828,16 @@ func DoFn9x2[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0, R1 any](doFn genericDoFn9x2 registerDoFn9x2StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0, R1](doFn) } -// Function9x2[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0, R1 any] registers your non-structural DoFn to optimize execution at runtime. +// Function9x2[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0, R1 any] registers your functional DoFn to optimize execution at runtime. // Function input and output parameter types should be provided in order as the generic constraints. func Function9x2[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0, R1 any](doFn func(I0, I1, I2, I3, I4, I5, I6, I7, I8) (R0, R1)) { runtime.RegisterFunction(doFn) registerMethodTypes(reflect.TypeOf(doFn)) + caller := func(fn interface{}) reflectx.Func { + f := fn.(func(I0, I1, I2, I3, I4, I5, I6, I7, I8) (R0, R1)) + return &caller9x2[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0, R1]{fn: f} + } + reflectx.RegisterFunc(reflect.TypeOf((*func(I0, I1, I2, I3, I4, I5, I6, I7, I8) (R0, R1))(nil)).Elem(), caller) } type genericDoFn10x2[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0, R1 any] interface { @@ -4751,11 +4911,16 @@ func DoFn10x2[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0, R1 any](doFn genericDo registerDoFn10x2StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0, R1](doFn) } -// Function10x2[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0, R1 any] registers your non-structural DoFn to optimize execution at runtime. +// Function10x2[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0, R1 any] registers your functional DoFn to optimize execution at runtime. // Function input and output parameter types should be provided in order as the generic constraints. func Function10x2[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0, R1 any](doFn func(I0, I1, I2, I3, I4, I5, I6, I7, I8, I9) (R0, R1)) { runtime.RegisterFunction(doFn) registerMethodTypes(reflect.TypeOf(doFn)) + caller := func(fn interface{}) reflectx.Func { + f := fn.(func(I0, I1, I2, I3, I4, I5, I6, I7, I8, I9) (R0, R1)) + return &caller10x2[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0, R1]{fn: f} + } + reflectx.RegisterFunc(reflect.TypeOf((*func(I0, I1, I2, I3, I4, I5, I6, I7, I8, I9) (R0, R1))(nil)).Elem(), caller) } type genericDoFn0x3[R0, R1, R2 any] interface { @@ -4829,11 +4994,16 @@ func DoFn0x3[R0, R1, R2 any](doFn genericDoFn0x3[R0, R1, R2]) { registerDoFn0x3StructWrappersAndFuncs[R0, R1, R2](doFn) } -// Function0x3[R0, R1, R2 any] registers your non-structural DoFn to optimize execution at runtime. +// Function0x3[R0, R1, R2 any] registers your functional DoFn to optimize execution at runtime. // Function input and output parameter types should be provided in order as the generic constraints. func Function0x3[R0, R1, R2 any](doFn func() (R0, R1, R2)) { runtime.RegisterFunction(doFn) registerMethodTypes(reflect.TypeOf(doFn)) + caller := func(fn interface{}) reflectx.Func { + f := fn.(func() (R0, R1, R2)) + return &caller0x3[R0, R1, R2]{fn: f} + } + reflectx.RegisterFunc(reflect.TypeOf((*func() (R0, R1, R2))(nil)).Elem(), caller) } type genericDoFn1x3[I0, R0, R1, R2 any] interface { @@ -4907,11 +5077,16 @@ func DoFn1x3[I0, R0, R1, R2 any](doFn genericDoFn1x3[I0, R0, R1, R2]) { registerDoFn1x3StructWrappersAndFuncs[I0, R0, R1, R2](doFn) } -// Function1x3[I0, R0, R1, R2 any] registers your non-structural DoFn to optimize execution at runtime. +// Function1x3[I0, R0, R1, R2 any] registers your functional DoFn to optimize execution at runtime. // Function input and output parameter types should be provided in order as the generic constraints. func Function1x3[I0, R0, R1, R2 any](doFn func(I0) (R0, R1, R2)) { runtime.RegisterFunction(doFn) registerMethodTypes(reflect.TypeOf(doFn)) + caller := func(fn interface{}) reflectx.Func { + f := fn.(func(I0) (R0, R1, R2)) + return &caller1x3[I0, R0, R1, R2]{fn: f} + } + reflectx.RegisterFunc(reflect.TypeOf((*func(I0) (R0, R1, R2))(nil)).Elem(), caller) } type genericDoFn2x3[I0, I1, R0, R1, R2 any] interface { @@ -4985,11 +5160,16 @@ func DoFn2x3[I0, I1, R0, R1, R2 any](doFn genericDoFn2x3[I0, I1, R0, R1, R2]) { registerDoFn2x3StructWrappersAndFuncs[I0, I1, R0, R1, R2](doFn) } -// Function2x3[I0, I1, R0, R1, R2 any] registers your non-structural DoFn to optimize execution at runtime. +// Function2x3[I0, I1, R0, R1, R2 any] registers your functional DoFn to optimize execution at runtime. // Function input and output parameter types should be provided in order as the generic constraints. func Function2x3[I0, I1, R0, R1, R2 any](doFn func(I0, I1) (R0, R1, R2)) { runtime.RegisterFunction(doFn) registerMethodTypes(reflect.TypeOf(doFn)) + caller := func(fn interface{}) reflectx.Func { + f := fn.(func(I0, I1) (R0, R1, R2)) + return &caller2x3[I0, I1, R0, R1, R2]{fn: f} + } + reflectx.RegisterFunc(reflect.TypeOf((*func(I0, I1) (R0, R1, R2))(nil)).Elem(), caller) } type genericDoFn3x3[I0, I1, I2, R0, R1, R2 any] interface { @@ -5063,11 +5243,16 @@ func DoFn3x3[I0, I1, I2, R0, R1, R2 any](doFn genericDoFn3x3[I0, I1, I2, R0, R1, registerDoFn3x3StructWrappersAndFuncs[I0, I1, I2, R0, R1, R2](doFn) } -// Function3x3[I0, I1, I2, R0, R1, R2 any] registers your non-structural DoFn to optimize execution at runtime. +// Function3x3[I0, I1, I2, R0, R1, R2 any] registers your functional DoFn to optimize execution at runtime. // Function input and output parameter types should be provided in order as the generic constraints. func Function3x3[I0, I1, I2, R0, R1, R2 any](doFn func(I0, I1, I2) (R0, R1, R2)) { runtime.RegisterFunction(doFn) registerMethodTypes(reflect.TypeOf(doFn)) + caller := func(fn interface{}) reflectx.Func { + f := fn.(func(I0, I1, I2) (R0, R1, R2)) + return &caller3x3[I0, I1, I2, R0, R1, R2]{fn: f} + } + reflectx.RegisterFunc(reflect.TypeOf((*func(I0, I1, I2) (R0, R1, R2))(nil)).Elem(), caller) } type genericDoFn4x3[I0, I1, I2, I3, R0, R1, R2 any] interface { @@ -5141,11 +5326,16 @@ func DoFn4x3[I0, I1, I2, I3, R0, R1, R2 any](doFn genericDoFn4x3[I0, I1, I2, I3, registerDoFn4x3StructWrappersAndFuncs[I0, I1, I2, I3, R0, R1, R2](doFn) } -// Function4x3[I0, I1, I2, I3, R0, R1, R2 any] registers your non-structural DoFn to optimize execution at runtime. +// Function4x3[I0, I1, I2, I3, R0, R1, R2 any] registers your functional DoFn to optimize execution at runtime. // Function input and output parameter types should be provided in order as the generic constraints. func Function4x3[I0, I1, I2, I3, R0, R1, R2 any](doFn func(I0, I1, I2, I3) (R0, R1, R2)) { runtime.RegisterFunction(doFn) registerMethodTypes(reflect.TypeOf(doFn)) + caller := func(fn interface{}) reflectx.Func { + f := fn.(func(I0, I1, I2, I3) (R0, R1, R2)) + return &caller4x3[I0, I1, I2, I3, R0, R1, R2]{fn: f} + } + reflectx.RegisterFunc(reflect.TypeOf((*func(I0, I1, I2, I3) (R0, R1, R2))(nil)).Elem(), caller) } type genericDoFn5x3[I0, I1, I2, I3, I4, R0, R1, R2 any] interface { @@ -5219,11 +5409,16 @@ func DoFn5x3[I0, I1, I2, I3, I4, R0, R1, R2 any](doFn genericDoFn5x3[I0, I1, I2, registerDoFn5x3StructWrappersAndFuncs[I0, I1, I2, I3, I4, R0, R1, R2](doFn) } -// Function5x3[I0, I1, I2, I3, I4, R0, R1, R2 any] registers your non-structural DoFn to optimize execution at runtime. +// Function5x3[I0, I1, I2, I3, I4, R0, R1, R2 any] registers your functional DoFn to optimize execution at runtime. // Function input and output parameter types should be provided in order as the generic constraints. func Function5x3[I0, I1, I2, I3, I4, R0, R1, R2 any](doFn func(I0, I1, I2, I3, I4) (R0, R1, R2)) { runtime.RegisterFunction(doFn) registerMethodTypes(reflect.TypeOf(doFn)) + caller := func(fn interface{}) reflectx.Func { + f := fn.(func(I0, I1, I2, I3, I4) (R0, R1, R2)) + return &caller5x3[I0, I1, I2, I3, I4, R0, R1, R2]{fn: f} + } + reflectx.RegisterFunc(reflect.TypeOf((*func(I0, I1, I2, I3, I4) (R0, R1, R2))(nil)).Elem(), caller) } type genericDoFn6x3[I0, I1, I2, I3, I4, I5, R0, R1, R2 any] interface { @@ -5297,11 +5492,16 @@ func DoFn6x3[I0, I1, I2, I3, I4, I5, R0, R1, R2 any](doFn genericDoFn6x3[I0, I1, registerDoFn6x3StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, R0, R1, R2](doFn) } -// Function6x3[I0, I1, I2, I3, I4, I5, R0, R1, R2 any] registers your non-structural DoFn to optimize execution at runtime. +// Function6x3[I0, I1, I2, I3, I4, I5, R0, R1, R2 any] registers your functional DoFn to optimize execution at runtime. // Function input and output parameter types should be provided in order as the generic constraints. func Function6x3[I0, I1, I2, I3, I4, I5, R0, R1, R2 any](doFn func(I0, I1, I2, I3, I4, I5) (R0, R1, R2)) { runtime.RegisterFunction(doFn) registerMethodTypes(reflect.TypeOf(doFn)) + caller := func(fn interface{}) reflectx.Func { + f := fn.(func(I0, I1, I2, I3, I4, I5) (R0, R1, R2)) + return &caller6x3[I0, I1, I2, I3, I4, I5, R0, R1, R2]{fn: f} + } + reflectx.RegisterFunc(reflect.TypeOf((*func(I0, I1, I2, I3, I4, I5) (R0, R1, R2))(nil)).Elem(), caller) } type genericDoFn7x3[I0, I1, I2, I3, I4, I5, I6, R0, R1, R2 any] interface { @@ -5375,11 +5575,16 @@ func DoFn7x3[I0, I1, I2, I3, I4, I5, I6, R0, R1, R2 any](doFn genericDoFn7x3[I0, registerDoFn7x3StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, I6, R0, R1, R2](doFn) } -// Function7x3[I0, I1, I2, I3, I4, I5, I6, R0, R1, R2 any] registers your non-structural DoFn to optimize execution at runtime. +// Function7x3[I0, I1, I2, I3, I4, I5, I6, R0, R1, R2 any] registers your functional DoFn to optimize execution at runtime. // Function input and output parameter types should be provided in order as the generic constraints. func Function7x3[I0, I1, I2, I3, I4, I5, I6, R0, R1, R2 any](doFn func(I0, I1, I2, I3, I4, I5, I6) (R0, R1, R2)) { runtime.RegisterFunction(doFn) registerMethodTypes(reflect.TypeOf(doFn)) + caller := func(fn interface{}) reflectx.Func { + f := fn.(func(I0, I1, I2, I3, I4, I5, I6) (R0, R1, R2)) + return &caller7x3[I0, I1, I2, I3, I4, I5, I6, R0, R1, R2]{fn: f} + } + reflectx.RegisterFunc(reflect.TypeOf((*func(I0, I1, I2, I3, I4, I5, I6) (R0, R1, R2))(nil)).Elem(), caller) } type genericDoFn8x3[I0, I1, I2, I3, I4, I5, I6, I7, R0, R1, R2 any] interface { @@ -5453,11 +5658,16 @@ func DoFn8x3[I0, I1, I2, I3, I4, I5, I6, I7, R0, R1, R2 any](doFn genericDoFn8x3 registerDoFn8x3StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, I6, I7, R0, R1, R2](doFn) } -// Function8x3[I0, I1, I2, I3, I4, I5, I6, I7, R0, R1, R2 any] registers your non-structural DoFn to optimize execution at runtime. +// Function8x3[I0, I1, I2, I3, I4, I5, I6, I7, R0, R1, R2 any] registers your functional DoFn to optimize execution at runtime. // Function input and output parameter types should be provided in order as the generic constraints. func Function8x3[I0, I1, I2, I3, I4, I5, I6, I7, R0, R1, R2 any](doFn func(I0, I1, I2, I3, I4, I5, I6, I7) (R0, R1, R2)) { runtime.RegisterFunction(doFn) registerMethodTypes(reflect.TypeOf(doFn)) + caller := func(fn interface{}) reflectx.Func { + f := fn.(func(I0, I1, I2, I3, I4, I5, I6, I7) (R0, R1, R2)) + return &caller8x3[I0, I1, I2, I3, I4, I5, I6, I7, R0, R1, R2]{fn: f} + } + reflectx.RegisterFunc(reflect.TypeOf((*func(I0, I1, I2, I3, I4, I5, I6, I7) (R0, R1, R2))(nil)).Elem(), caller) } type genericDoFn9x3[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0, R1, R2 any] interface { @@ -5531,11 +5741,16 @@ func DoFn9x3[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0, R1, R2 any](doFn genericDoF registerDoFn9x3StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0, R1, R2](doFn) } -// Function9x3[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0, R1, R2 any] registers your non-structural DoFn to optimize execution at runtime. +// Function9x3[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0, R1, R2 any] registers your functional DoFn to optimize execution at runtime. // Function input and output parameter types should be provided in order as the generic constraints. func Function9x3[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0, R1, R2 any](doFn func(I0, I1, I2, I3, I4, I5, I6, I7, I8) (R0, R1, R2)) { runtime.RegisterFunction(doFn) registerMethodTypes(reflect.TypeOf(doFn)) + caller := func(fn interface{}) reflectx.Func { + f := fn.(func(I0, I1, I2, I3, I4, I5, I6, I7, I8) (R0, R1, R2)) + return &caller9x3[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0, R1, R2]{fn: f} + } + reflectx.RegisterFunc(reflect.TypeOf((*func(I0, I1, I2, I3, I4, I5, I6, I7, I8) (R0, R1, R2))(nil)).Elem(), caller) } type genericDoFn10x3[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0, R1, R2 any] interface { @@ -5609,11 +5824,16 @@ func DoFn10x3[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0, R1, R2 any](doFn gener registerDoFn10x3StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0, R1, R2](doFn) } -// Function10x3[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0, R1, R2 any] registers your non-structural DoFn to optimize execution at runtime. +// Function10x3[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0, R1, R2 any] registers your functional DoFn to optimize execution at runtime. // Function input and output parameter types should be provided in order as the generic constraints. func Function10x3[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0, R1, R2 any](doFn func(I0, I1, I2, I3, I4, I5, I6, I7, I8, I9) (R0, R1, R2)) { runtime.RegisterFunction(doFn) registerMethodTypes(reflect.TypeOf(doFn)) + caller := func(fn interface{}) reflectx.Func { + f := fn.(func(I0, I1, I2, I3, I4, I5, I6, I7, I8, I9) (R0, R1, R2)) + return &caller10x3[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0, R1, R2]{fn: f} + } + reflectx.RegisterFunc(reflect.TypeOf((*func(I0, I1, I2, I3, I4, I5, I6, I7, I8, I9) (R0, R1, R2))(nil)).Elem(), caller) } type genericDoFn0x4[R0, R1, R2, R3 any] interface { @@ -5687,11 +5907,16 @@ func DoFn0x4[R0, R1, R2, R3 any](doFn genericDoFn0x4[R0, R1, R2, R3]) { registerDoFn0x4StructWrappersAndFuncs[R0, R1, R2, R3](doFn) } -// Function0x4[R0, R1, R2, R3 any] registers your non-structural DoFn to optimize execution at runtime. +// Function0x4[R0, R1, R2, R3 any] registers your functional DoFn to optimize execution at runtime. // Function input and output parameter types should be provided in order as the generic constraints. func Function0x4[R0, R1, R2, R3 any](doFn func() (R0, R1, R2, R3)) { runtime.RegisterFunction(doFn) registerMethodTypes(reflect.TypeOf(doFn)) + caller := func(fn interface{}) reflectx.Func { + f := fn.(func() (R0, R1, R2, R3)) + return &caller0x4[R0, R1, R2, R3]{fn: f} + } + reflectx.RegisterFunc(reflect.TypeOf((*func() (R0, R1, R2, R3))(nil)).Elem(), caller) } type genericDoFn1x4[I0, R0, R1, R2, R3 any] interface { @@ -5765,11 +5990,16 @@ func DoFn1x4[I0, R0, R1, R2, R3 any](doFn genericDoFn1x4[I0, R0, R1, R2, R3]) { registerDoFn1x4StructWrappersAndFuncs[I0, R0, R1, R2, R3](doFn) } -// Function1x4[I0, R0, R1, R2, R3 any] registers your non-structural DoFn to optimize execution at runtime. +// Function1x4[I0, R0, R1, R2, R3 any] registers your functional DoFn to optimize execution at runtime. // Function input and output parameter types should be provided in order as the generic constraints. func Function1x4[I0, R0, R1, R2, R3 any](doFn func(I0) (R0, R1, R2, R3)) { runtime.RegisterFunction(doFn) registerMethodTypes(reflect.TypeOf(doFn)) + caller := func(fn interface{}) reflectx.Func { + f := fn.(func(I0) (R0, R1, R2, R3)) + return &caller1x4[I0, R0, R1, R2, R3]{fn: f} + } + reflectx.RegisterFunc(reflect.TypeOf((*func(I0) (R0, R1, R2, R3))(nil)).Elem(), caller) } type genericDoFn2x4[I0, I1, R0, R1, R2, R3 any] interface { @@ -5843,11 +6073,16 @@ func DoFn2x4[I0, I1, R0, R1, R2, R3 any](doFn genericDoFn2x4[I0, I1, R0, R1, R2, registerDoFn2x4StructWrappersAndFuncs[I0, I1, R0, R1, R2, R3](doFn) } -// Function2x4[I0, I1, R0, R1, R2, R3 any] registers your non-structural DoFn to optimize execution at runtime. +// Function2x4[I0, I1, R0, R1, R2, R3 any] registers your functional DoFn to optimize execution at runtime. // Function input and output parameter types should be provided in order as the generic constraints. func Function2x4[I0, I1, R0, R1, R2, R3 any](doFn func(I0, I1) (R0, R1, R2, R3)) { runtime.RegisterFunction(doFn) registerMethodTypes(reflect.TypeOf(doFn)) + caller := func(fn interface{}) reflectx.Func { + f := fn.(func(I0, I1) (R0, R1, R2, R3)) + return &caller2x4[I0, I1, R0, R1, R2, R3]{fn: f} + } + reflectx.RegisterFunc(reflect.TypeOf((*func(I0, I1) (R0, R1, R2, R3))(nil)).Elem(), caller) } type genericDoFn3x4[I0, I1, I2, R0, R1, R2, R3 any] interface { @@ -5921,11 +6156,16 @@ func DoFn3x4[I0, I1, I2, R0, R1, R2, R3 any](doFn genericDoFn3x4[I0, I1, I2, R0, registerDoFn3x4StructWrappersAndFuncs[I0, I1, I2, R0, R1, R2, R3](doFn) } -// Function3x4[I0, I1, I2, R0, R1, R2, R3 any] registers your non-structural DoFn to optimize execution at runtime. +// Function3x4[I0, I1, I2, R0, R1, R2, R3 any] registers your functional DoFn to optimize execution at runtime. // Function input and output parameter types should be provided in order as the generic constraints. func Function3x4[I0, I1, I2, R0, R1, R2, R3 any](doFn func(I0, I1, I2) (R0, R1, R2, R3)) { runtime.RegisterFunction(doFn) registerMethodTypes(reflect.TypeOf(doFn)) + caller := func(fn interface{}) reflectx.Func { + f := fn.(func(I0, I1, I2) (R0, R1, R2, R3)) + return &caller3x4[I0, I1, I2, R0, R1, R2, R3]{fn: f} + } + reflectx.RegisterFunc(reflect.TypeOf((*func(I0, I1, I2) (R0, R1, R2, R3))(nil)).Elem(), caller) } type genericDoFn4x4[I0, I1, I2, I3, R0, R1, R2, R3 any] interface { @@ -5999,11 +6239,16 @@ func DoFn4x4[I0, I1, I2, I3, R0, R1, R2, R3 any](doFn genericDoFn4x4[I0, I1, I2, registerDoFn4x4StructWrappersAndFuncs[I0, I1, I2, I3, R0, R1, R2, R3](doFn) } -// Function4x4[I0, I1, I2, I3, R0, R1, R2, R3 any] registers your non-structural DoFn to optimize execution at runtime. +// Function4x4[I0, I1, I2, I3, R0, R1, R2, R3 any] registers your functional DoFn to optimize execution at runtime. // Function input and output parameter types should be provided in order as the generic constraints. func Function4x4[I0, I1, I2, I3, R0, R1, R2, R3 any](doFn func(I0, I1, I2, I3) (R0, R1, R2, R3)) { runtime.RegisterFunction(doFn) registerMethodTypes(reflect.TypeOf(doFn)) + caller := func(fn interface{}) reflectx.Func { + f := fn.(func(I0, I1, I2, I3) (R0, R1, R2, R3)) + return &caller4x4[I0, I1, I2, I3, R0, R1, R2, R3]{fn: f} + } + reflectx.RegisterFunc(reflect.TypeOf((*func(I0, I1, I2, I3) (R0, R1, R2, R3))(nil)).Elem(), caller) } type genericDoFn5x4[I0, I1, I2, I3, I4, R0, R1, R2, R3 any] interface { @@ -6077,11 +6322,16 @@ func DoFn5x4[I0, I1, I2, I3, I4, R0, R1, R2, R3 any](doFn genericDoFn5x4[I0, I1, registerDoFn5x4StructWrappersAndFuncs[I0, I1, I2, I3, I4, R0, R1, R2, R3](doFn) } -// Function5x4[I0, I1, I2, I3, I4, R0, R1, R2, R3 any] registers your non-structural DoFn to optimize execution at runtime. +// Function5x4[I0, I1, I2, I3, I4, R0, R1, R2, R3 any] registers your functional DoFn to optimize execution at runtime. // Function input and output parameter types should be provided in order as the generic constraints. func Function5x4[I0, I1, I2, I3, I4, R0, R1, R2, R3 any](doFn func(I0, I1, I2, I3, I4) (R0, R1, R2, R3)) { runtime.RegisterFunction(doFn) registerMethodTypes(reflect.TypeOf(doFn)) + caller := func(fn interface{}) reflectx.Func { + f := fn.(func(I0, I1, I2, I3, I4) (R0, R1, R2, R3)) + return &caller5x4[I0, I1, I2, I3, I4, R0, R1, R2, R3]{fn: f} + } + reflectx.RegisterFunc(reflect.TypeOf((*func(I0, I1, I2, I3, I4) (R0, R1, R2, R3))(nil)).Elem(), caller) } type genericDoFn6x4[I0, I1, I2, I3, I4, I5, R0, R1, R2, R3 any] interface { @@ -6155,11 +6405,16 @@ func DoFn6x4[I0, I1, I2, I3, I4, I5, R0, R1, R2, R3 any](doFn genericDoFn6x4[I0, registerDoFn6x4StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, R0, R1, R2, R3](doFn) } -// Function6x4[I0, I1, I2, I3, I4, I5, R0, R1, R2, R3 any] registers your non-structural DoFn to optimize execution at runtime. +// Function6x4[I0, I1, I2, I3, I4, I5, R0, R1, R2, R3 any] registers your functional DoFn to optimize execution at runtime. // Function input and output parameter types should be provided in order as the generic constraints. func Function6x4[I0, I1, I2, I3, I4, I5, R0, R1, R2, R3 any](doFn func(I0, I1, I2, I3, I4, I5) (R0, R1, R2, R3)) { runtime.RegisterFunction(doFn) registerMethodTypes(reflect.TypeOf(doFn)) + caller := func(fn interface{}) reflectx.Func { + f := fn.(func(I0, I1, I2, I3, I4, I5) (R0, R1, R2, R3)) + return &caller6x4[I0, I1, I2, I3, I4, I5, R0, R1, R2, R3]{fn: f} + } + reflectx.RegisterFunc(reflect.TypeOf((*func(I0, I1, I2, I3, I4, I5) (R0, R1, R2, R3))(nil)).Elem(), caller) } type genericDoFn7x4[I0, I1, I2, I3, I4, I5, I6, R0, R1, R2, R3 any] interface { @@ -6233,11 +6488,16 @@ func DoFn7x4[I0, I1, I2, I3, I4, I5, I6, R0, R1, R2, R3 any](doFn genericDoFn7x4 registerDoFn7x4StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, I6, R0, R1, R2, R3](doFn) } -// Function7x4[I0, I1, I2, I3, I4, I5, I6, R0, R1, R2, R3 any] registers your non-structural DoFn to optimize execution at runtime. +// Function7x4[I0, I1, I2, I3, I4, I5, I6, R0, R1, R2, R3 any] registers your functional DoFn to optimize execution at runtime. // Function input and output parameter types should be provided in order as the generic constraints. func Function7x4[I0, I1, I2, I3, I4, I5, I6, R0, R1, R2, R3 any](doFn func(I0, I1, I2, I3, I4, I5, I6) (R0, R1, R2, R3)) { runtime.RegisterFunction(doFn) registerMethodTypes(reflect.TypeOf(doFn)) + caller := func(fn interface{}) reflectx.Func { + f := fn.(func(I0, I1, I2, I3, I4, I5, I6) (R0, R1, R2, R3)) + return &caller7x4[I0, I1, I2, I3, I4, I5, I6, R0, R1, R2, R3]{fn: f} + } + reflectx.RegisterFunc(reflect.TypeOf((*func(I0, I1, I2, I3, I4, I5, I6) (R0, R1, R2, R3))(nil)).Elem(), caller) } type genericDoFn8x4[I0, I1, I2, I3, I4, I5, I6, I7, R0, R1, R2, R3 any] interface { @@ -6311,11 +6571,16 @@ func DoFn8x4[I0, I1, I2, I3, I4, I5, I6, I7, R0, R1, R2, R3 any](doFn genericDoF registerDoFn8x4StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, I6, I7, R0, R1, R2, R3](doFn) } -// Function8x4[I0, I1, I2, I3, I4, I5, I6, I7, R0, R1, R2, R3 any] registers your non-structural DoFn to optimize execution at runtime. +// Function8x4[I0, I1, I2, I3, I4, I5, I6, I7, R0, R1, R2, R3 any] registers your functional DoFn to optimize execution at runtime. // Function input and output parameter types should be provided in order as the generic constraints. func Function8x4[I0, I1, I2, I3, I4, I5, I6, I7, R0, R1, R2, R3 any](doFn func(I0, I1, I2, I3, I4, I5, I6, I7) (R0, R1, R2, R3)) { runtime.RegisterFunction(doFn) registerMethodTypes(reflect.TypeOf(doFn)) + caller := func(fn interface{}) reflectx.Func { + f := fn.(func(I0, I1, I2, I3, I4, I5, I6, I7) (R0, R1, R2, R3)) + return &caller8x4[I0, I1, I2, I3, I4, I5, I6, I7, R0, R1, R2, R3]{fn: f} + } + reflectx.RegisterFunc(reflect.TypeOf((*func(I0, I1, I2, I3, I4, I5, I6, I7) (R0, R1, R2, R3))(nil)).Elem(), caller) } type genericDoFn9x4[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0, R1, R2, R3 any] interface { @@ -6389,11 +6654,16 @@ func DoFn9x4[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0, R1, R2, R3 any](doFn generi registerDoFn9x4StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0, R1, R2, R3](doFn) } -// Function9x4[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0, R1, R2, R3 any] registers your non-structural DoFn to optimize execution at runtime. +// Function9x4[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0, R1, R2, R3 any] registers your functional DoFn to optimize execution at runtime. // Function input and output parameter types should be provided in order as the generic constraints. func Function9x4[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0, R1, R2, R3 any](doFn func(I0, I1, I2, I3, I4, I5, I6, I7, I8) (R0, R1, R2, R3)) { runtime.RegisterFunction(doFn) registerMethodTypes(reflect.TypeOf(doFn)) + caller := func(fn interface{}) reflectx.Func { + f := fn.(func(I0, I1, I2, I3, I4, I5, I6, I7, I8) (R0, R1, R2, R3)) + return &caller9x4[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0, R1, R2, R3]{fn: f} + } + reflectx.RegisterFunc(reflect.TypeOf((*func(I0, I1, I2, I3, I4, I5, I6, I7, I8) (R0, R1, R2, R3))(nil)).Elem(), caller) } type genericDoFn10x4[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0, R1, R2, R3 any] interface { @@ -6467,11 +6737,16 @@ func DoFn10x4[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0, R1, R2, R3 any](doFn g registerDoFn10x4StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0, R1, R2, R3](doFn) } -// Function10x4[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0, R1, R2, R3 any] registers your non-structural DoFn to optimize execution at runtime. +// Function10x4[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0, R1, R2, R3 any] registers your functional DoFn to optimize execution at runtime. // Function input and output parameter types should be provided in order as the generic constraints. func Function10x4[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0, R1, R2, R3 any](doFn func(I0, I1, I2, I3, I4, I5, I6, I7, I8, I9) (R0, R1, R2, R3)) { runtime.RegisterFunction(doFn) registerMethodTypes(reflect.TypeOf(doFn)) + caller := func(fn interface{}) reflectx.Func { + f := fn.(func(I0, I1, I2, I3, I4, I5, I6, I7, I8, I9) (R0, R1, R2, R3)) + return &caller10x4[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0, R1, R2, R3]{fn: f} + } + reflectx.RegisterFunc(reflect.TypeOf((*func(I0, I1, I2, I3, I4, I5, I6, I7, I8, I9) (R0, R1, R2, R3))(nil)).Elem(), caller) } type genericDoFn0x5[R0, R1, R2, R3, R4 any] interface { @@ -6545,11 +6820,16 @@ func DoFn0x5[R0, R1, R2, R3, R4 any](doFn genericDoFn0x5[R0, R1, R2, R3, R4]) { registerDoFn0x5StructWrappersAndFuncs[R0, R1, R2, R3, R4](doFn) } -// Function0x5[R0, R1, R2, R3, R4 any] registers your non-structural DoFn to optimize execution at runtime. +// Function0x5[R0, R1, R2, R3, R4 any] registers your functional DoFn to optimize execution at runtime. // Function input and output parameter types should be provided in order as the generic constraints. func Function0x5[R0, R1, R2, R3, R4 any](doFn func() (R0, R1, R2, R3, R4)) { runtime.RegisterFunction(doFn) registerMethodTypes(reflect.TypeOf(doFn)) + caller := func(fn interface{}) reflectx.Func { + f := fn.(func() (R0, R1, R2, R3, R4)) + return &caller0x5[R0, R1, R2, R3, R4]{fn: f} + } + reflectx.RegisterFunc(reflect.TypeOf((*func() (R0, R1, R2, R3, R4))(nil)).Elem(), caller) } type genericDoFn1x5[I0, R0, R1, R2, R3, R4 any] interface { @@ -6623,11 +6903,16 @@ func DoFn1x5[I0, R0, R1, R2, R3, R4 any](doFn genericDoFn1x5[I0, R0, R1, R2, R3, registerDoFn1x5StructWrappersAndFuncs[I0, R0, R1, R2, R3, R4](doFn) } -// Function1x5[I0, R0, R1, R2, R3, R4 any] registers your non-structural DoFn to optimize execution at runtime. +// Function1x5[I0, R0, R1, R2, R3, R4 any] registers your functional DoFn to optimize execution at runtime. // Function input and output parameter types should be provided in order as the generic constraints. func Function1x5[I0, R0, R1, R2, R3, R4 any](doFn func(I0) (R0, R1, R2, R3, R4)) { runtime.RegisterFunction(doFn) registerMethodTypes(reflect.TypeOf(doFn)) + caller := func(fn interface{}) reflectx.Func { + f := fn.(func(I0) (R0, R1, R2, R3, R4)) + return &caller1x5[I0, R0, R1, R2, R3, R4]{fn: f} + } + reflectx.RegisterFunc(reflect.TypeOf((*func(I0) (R0, R1, R2, R3, R4))(nil)).Elem(), caller) } type genericDoFn2x5[I0, I1, R0, R1, R2, R3, R4 any] interface { @@ -6701,11 +6986,16 @@ func DoFn2x5[I0, I1, R0, R1, R2, R3, R4 any](doFn genericDoFn2x5[I0, I1, R0, R1, registerDoFn2x5StructWrappersAndFuncs[I0, I1, R0, R1, R2, R3, R4](doFn) } -// Function2x5[I0, I1, R0, R1, R2, R3, R4 any] registers your non-structural DoFn to optimize execution at runtime. +// Function2x5[I0, I1, R0, R1, R2, R3, R4 any] registers your functional DoFn to optimize execution at runtime. // Function input and output parameter types should be provided in order as the generic constraints. func Function2x5[I0, I1, R0, R1, R2, R3, R4 any](doFn func(I0, I1) (R0, R1, R2, R3, R4)) { runtime.RegisterFunction(doFn) registerMethodTypes(reflect.TypeOf(doFn)) + caller := func(fn interface{}) reflectx.Func { + f := fn.(func(I0, I1) (R0, R1, R2, R3, R4)) + return &caller2x5[I0, I1, R0, R1, R2, R3, R4]{fn: f} + } + reflectx.RegisterFunc(reflect.TypeOf((*func(I0, I1) (R0, R1, R2, R3, R4))(nil)).Elem(), caller) } type genericDoFn3x5[I0, I1, I2, R0, R1, R2, R3, R4 any] interface { @@ -6779,11 +7069,16 @@ func DoFn3x5[I0, I1, I2, R0, R1, R2, R3, R4 any](doFn genericDoFn3x5[I0, I1, I2, registerDoFn3x5StructWrappersAndFuncs[I0, I1, I2, R0, R1, R2, R3, R4](doFn) } -// Function3x5[I0, I1, I2, R0, R1, R2, R3, R4 any] registers your non-structural DoFn to optimize execution at runtime. +// Function3x5[I0, I1, I2, R0, R1, R2, R3, R4 any] registers your functional DoFn to optimize execution at runtime. // Function input and output parameter types should be provided in order as the generic constraints. func Function3x5[I0, I1, I2, R0, R1, R2, R3, R4 any](doFn func(I0, I1, I2) (R0, R1, R2, R3, R4)) { runtime.RegisterFunction(doFn) registerMethodTypes(reflect.TypeOf(doFn)) + caller := func(fn interface{}) reflectx.Func { + f := fn.(func(I0, I1, I2) (R0, R1, R2, R3, R4)) + return &caller3x5[I0, I1, I2, R0, R1, R2, R3, R4]{fn: f} + } + reflectx.RegisterFunc(reflect.TypeOf((*func(I0, I1, I2) (R0, R1, R2, R3, R4))(nil)).Elem(), caller) } type genericDoFn4x5[I0, I1, I2, I3, R0, R1, R2, R3, R4 any] interface { @@ -6857,11 +7152,16 @@ func DoFn4x5[I0, I1, I2, I3, R0, R1, R2, R3, R4 any](doFn genericDoFn4x5[I0, I1, registerDoFn4x5StructWrappersAndFuncs[I0, I1, I2, I3, R0, R1, R2, R3, R4](doFn) } -// Function4x5[I0, I1, I2, I3, R0, R1, R2, R3, R4 any] registers your non-structural DoFn to optimize execution at runtime. +// Function4x5[I0, I1, I2, I3, R0, R1, R2, R3, R4 any] registers your functional DoFn to optimize execution at runtime. // Function input and output parameter types should be provided in order as the generic constraints. func Function4x5[I0, I1, I2, I3, R0, R1, R2, R3, R4 any](doFn func(I0, I1, I2, I3) (R0, R1, R2, R3, R4)) { runtime.RegisterFunction(doFn) registerMethodTypes(reflect.TypeOf(doFn)) + caller := func(fn interface{}) reflectx.Func { + f := fn.(func(I0, I1, I2, I3) (R0, R1, R2, R3, R4)) + return &caller4x5[I0, I1, I2, I3, R0, R1, R2, R3, R4]{fn: f} + } + reflectx.RegisterFunc(reflect.TypeOf((*func(I0, I1, I2, I3) (R0, R1, R2, R3, R4))(nil)).Elem(), caller) } type genericDoFn5x5[I0, I1, I2, I3, I4, R0, R1, R2, R3, R4 any] interface { @@ -6935,11 +7235,16 @@ func DoFn5x5[I0, I1, I2, I3, I4, R0, R1, R2, R3, R4 any](doFn genericDoFn5x5[I0, registerDoFn5x5StructWrappersAndFuncs[I0, I1, I2, I3, I4, R0, R1, R2, R3, R4](doFn) } -// Function5x5[I0, I1, I2, I3, I4, R0, R1, R2, R3, R4 any] registers your non-structural DoFn to optimize execution at runtime. +// Function5x5[I0, I1, I2, I3, I4, R0, R1, R2, R3, R4 any] registers your functional DoFn to optimize execution at runtime. // Function input and output parameter types should be provided in order as the generic constraints. func Function5x5[I0, I1, I2, I3, I4, R0, R1, R2, R3, R4 any](doFn func(I0, I1, I2, I3, I4) (R0, R1, R2, R3, R4)) { runtime.RegisterFunction(doFn) registerMethodTypes(reflect.TypeOf(doFn)) + caller := func(fn interface{}) reflectx.Func { + f := fn.(func(I0, I1, I2, I3, I4) (R0, R1, R2, R3, R4)) + return &caller5x5[I0, I1, I2, I3, I4, R0, R1, R2, R3, R4]{fn: f} + } + reflectx.RegisterFunc(reflect.TypeOf((*func(I0, I1, I2, I3, I4) (R0, R1, R2, R3, R4))(nil)).Elem(), caller) } type genericDoFn6x5[I0, I1, I2, I3, I4, I5, R0, R1, R2, R3, R4 any] interface { @@ -7013,11 +7318,16 @@ func DoFn6x5[I0, I1, I2, I3, I4, I5, R0, R1, R2, R3, R4 any](doFn genericDoFn6x5 registerDoFn6x5StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, R0, R1, R2, R3, R4](doFn) } -// Function6x5[I0, I1, I2, I3, I4, I5, R0, R1, R2, R3, R4 any] registers your non-structural DoFn to optimize execution at runtime. +// Function6x5[I0, I1, I2, I3, I4, I5, R0, R1, R2, R3, R4 any] registers your functional DoFn to optimize execution at runtime. // Function input and output parameter types should be provided in order as the generic constraints. func Function6x5[I0, I1, I2, I3, I4, I5, R0, R1, R2, R3, R4 any](doFn func(I0, I1, I2, I3, I4, I5) (R0, R1, R2, R3, R4)) { runtime.RegisterFunction(doFn) registerMethodTypes(reflect.TypeOf(doFn)) + caller := func(fn interface{}) reflectx.Func { + f := fn.(func(I0, I1, I2, I3, I4, I5) (R0, R1, R2, R3, R4)) + return &caller6x5[I0, I1, I2, I3, I4, I5, R0, R1, R2, R3, R4]{fn: f} + } + reflectx.RegisterFunc(reflect.TypeOf((*func(I0, I1, I2, I3, I4, I5) (R0, R1, R2, R3, R4))(nil)).Elem(), caller) } type genericDoFn7x5[I0, I1, I2, I3, I4, I5, I6, R0, R1, R2, R3, R4 any] interface { @@ -7091,11 +7401,16 @@ func DoFn7x5[I0, I1, I2, I3, I4, I5, I6, R0, R1, R2, R3, R4 any](doFn genericDoF registerDoFn7x5StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, I6, R0, R1, R2, R3, R4](doFn) } -// Function7x5[I0, I1, I2, I3, I4, I5, I6, R0, R1, R2, R3, R4 any] registers your non-structural DoFn to optimize execution at runtime. +// Function7x5[I0, I1, I2, I3, I4, I5, I6, R0, R1, R2, R3, R4 any] registers your functional DoFn to optimize execution at runtime. // Function input and output parameter types should be provided in order as the generic constraints. func Function7x5[I0, I1, I2, I3, I4, I5, I6, R0, R1, R2, R3, R4 any](doFn func(I0, I1, I2, I3, I4, I5, I6) (R0, R1, R2, R3, R4)) { runtime.RegisterFunction(doFn) registerMethodTypes(reflect.TypeOf(doFn)) + caller := func(fn interface{}) reflectx.Func { + f := fn.(func(I0, I1, I2, I3, I4, I5, I6) (R0, R1, R2, R3, R4)) + return &caller7x5[I0, I1, I2, I3, I4, I5, I6, R0, R1, R2, R3, R4]{fn: f} + } + reflectx.RegisterFunc(reflect.TypeOf((*func(I0, I1, I2, I3, I4, I5, I6) (R0, R1, R2, R3, R4))(nil)).Elem(), caller) } type genericDoFn8x5[I0, I1, I2, I3, I4, I5, I6, I7, R0, R1, R2, R3, R4 any] interface { @@ -7169,11 +7484,16 @@ func DoFn8x5[I0, I1, I2, I3, I4, I5, I6, I7, R0, R1, R2, R3, R4 any](doFn generi registerDoFn8x5StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, I6, I7, R0, R1, R2, R3, R4](doFn) } -// Function8x5[I0, I1, I2, I3, I4, I5, I6, I7, R0, R1, R2, R3, R4 any] registers your non-structural DoFn to optimize execution at runtime. +// Function8x5[I0, I1, I2, I3, I4, I5, I6, I7, R0, R1, R2, R3, R4 any] registers your functional DoFn to optimize execution at runtime. // Function input and output parameter types should be provided in order as the generic constraints. func Function8x5[I0, I1, I2, I3, I4, I5, I6, I7, R0, R1, R2, R3, R4 any](doFn func(I0, I1, I2, I3, I4, I5, I6, I7) (R0, R1, R2, R3, R4)) { runtime.RegisterFunction(doFn) registerMethodTypes(reflect.TypeOf(doFn)) + caller := func(fn interface{}) reflectx.Func { + f := fn.(func(I0, I1, I2, I3, I4, I5, I6, I7) (R0, R1, R2, R3, R4)) + return &caller8x5[I0, I1, I2, I3, I4, I5, I6, I7, R0, R1, R2, R3, R4]{fn: f} + } + reflectx.RegisterFunc(reflect.TypeOf((*func(I0, I1, I2, I3, I4, I5, I6, I7) (R0, R1, R2, R3, R4))(nil)).Elem(), caller) } type genericDoFn9x5[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0, R1, R2, R3, R4 any] interface { @@ -7247,11 +7567,16 @@ func DoFn9x5[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0, R1, R2, R3, R4 any](doFn ge registerDoFn9x5StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0, R1, R2, R3, R4](doFn) } -// Function9x5[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0, R1, R2, R3, R4 any] registers your non-structural DoFn to optimize execution at runtime. +// Function9x5[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0, R1, R2, R3, R4 any] registers your functional DoFn to optimize execution at runtime. // Function input and output parameter types should be provided in order as the generic constraints. func Function9x5[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0, R1, R2, R3, R4 any](doFn func(I0, I1, I2, I3, I4, I5, I6, I7, I8) (R0, R1, R2, R3, R4)) { runtime.RegisterFunction(doFn) registerMethodTypes(reflect.TypeOf(doFn)) + caller := func(fn interface{}) reflectx.Func { + f := fn.(func(I0, I1, I2, I3, I4, I5, I6, I7, I8) (R0, R1, R2, R3, R4)) + return &caller9x5[I0, I1, I2, I3, I4, I5, I6, I7, I8, R0, R1, R2, R3, R4]{fn: f} + } + reflectx.RegisterFunc(reflect.TypeOf((*func(I0, I1, I2, I3, I4, I5, I6, I7, I8) (R0, R1, R2, R3, R4))(nil)).Elem(), caller) } type genericDoFn10x5[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0, R1, R2, R3, R4 any] interface { @@ -7325,11 +7650,16 @@ func DoFn10x5[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0, R1, R2, R3, R4 any](do registerDoFn10x5StructWrappersAndFuncs[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0, R1, R2, R3, R4](doFn) } -// Function10x5[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0, R1, R2, R3, R4 any] registers your non-structural DoFn to optimize execution at runtime. +// Function10x5[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0, R1, R2, R3, R4 any] registers your functional DoFn to optimize execution at runtime. // Function input and output parameter types should be provided in order as the generic constraints. func Function10x5[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0, R1, R2, R3, R4 any](doFn func(I0, I1, I2, I3, I4, I5, I6, I7, I8, I9) (R0, R1, R2, R3, R4)) { runtime.RegisterFunction(doFn) registerMethodTypes(reflect.TypeOf(doFn)) + caller := func(fn interface{}) reflectx.Func { + f := fn.(func(I0, I1, I2, I3, I4, I5, I6, I7, I8, I9) (R0, R1, R2, R3, R4)) + return &caller10x5[I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, R0, R1, R2, R3, R4]{fn: f} + } + reflectx.RegisterFunc(reflect.TypeOf((*func(I0, I1, I2, I3, I4, I5, I6, I7, I8, I9) (R0, R1, R2, R3, R4))(nil)).Elem(), caller) } type startBundle0x0 interface { diff --git a/sdks/go/pkg/beam/register/register.tmpl b/sdks/go/pkg/beam/register/register.tmpl index 60f63f81fd46..b701be456865 100644 --- a/sdks/go/pkg/beam/register/register.tmpl +++ b/sdks/go/pkg/beam/register/register.tmpl @@ -201,11 +201,16 @@ func registerDoFn{{$processElementIn}}x{{$processElementOut}}StructWrappersAndFu registerDoFn{{$processElementIn}}x{{$processElementOut}}StructWrappersAndFuncs{{(genericTypingRepresentation $processElementIn $processElementOut false)}}(doFn) } -// Function{{$processElementIn}}x{{$processElementOut}}{{(genericTypingRepresentation $processElementIn $processElementOut true)}} registers your non-structural DoFn to optimize execution at runtime. +// Function{{$processElementIn}}x{{$processElementOut}}{{(genericTypingRepresentation $processElementIn $processElementOut true)}} registers your functional DoFn to optimize execution at runtime. {{if (or $processElementIn $processElementOut)}}// Function input and output parameter types should be provided in order as the generic constraints. {{end}}func Function{{$processElementIn}}x{{$processElementOut}}{{(genericTypingRepresentation $processElementIn $processElementOut true)}}(doFn func({{range $in := upto $processElementIn}}{{if $in}}, {{end}}I{{$in}}{{end}}) {{if (gt $processElementOut 1)}}({{end}}{{range $out := upto $processElementOut}}{{if $out}}, {{end}}R{{$out}}{{end}}{{if (gt $processElementOut 1)}}){{end}}) { runtime.RegisterFunction(doFn) registerMethodTypes(reflect.TypeOf(doFn)) + caller := func(fn interface{}) reflectx.Func { + f := fn.(func({{range $in := upto $processElementIn}}{{if $in}}, {{end}}I{{$in}}{{end}}) {{if (gt $processElementOut 1)}}({{end}}{{range $out := upto $processElementOut}}{{if $out}}, {{end}}R{{$out}}{{end}}{{if (gt $processElementOut 1)}}){{end}}) + return &caller{{$processElementIn}}x{{$processElementOut}}{{(genericTypingRepresentation $processElementIn $processElementOut false)}}{fn: f} + } + reflectx.RegisterFunc(reflect.TypeOf((*func({{range $in := upto $processElementIn}}{{if $in}}, {{end}}I{{$in}}{{end}}) {{if (gt $processElementOut 1)}}({{end}}{{range $out := upto $processElementOut}}{{if $out}}, {{end}}R{{$out}}{{end}}{{if (gt $processElementOut 1)}}){{end}})(nil)).Elem(), caller) }{{end}}{{end}} {{range $startFinishBundleOut := upto $startFinishBundleOutRange}}{{range $startFinishBundleIn := upto $startFinishBundleInRange}} diff --git a/sdks/go/pkg/beam/register/register_test.go b/sdks/go/pkg/beam/register/register_test.go index c1099cc4e6f4..62ba828df68e 100644 --- a/sdks/go/pkg/beam/register/register_test.go +++ b/sdks/go/pkg/beam/register/register_test.go @@ -727,11 +727,6 @@ type callerCustomTypeГint struct { fn func(CustomType) int } -func funcMakerCustomTypeГint(fn interface{}) reflectx.Func { - f := fn.(func(CustomType) int) - return &callerCustomTypeГint{fn: f} -} - func (c *callerCustomTypeГint) Name() string { return reflectx.FunctionName(c.fn) } @@ -749,6 +744,37 @@ func (c *callerCustomTypeГint) Call1x1(arg0 interface{}) interface{} { return c.fn(arg0.(CustomType)) } +type callerCustomType2CustomType2ГCustomType2 struct { + fn func(CustomType2, CustomType2) CustomType2 +} + +func (c *callerCustomType2CustomType2ГCustomType2) Name() string { + return reflectx.FunctionName(c.fn) +} + +func (c *callerCustomType2CustomType2ГCustomType2) Type() reflect.Type { + return reflect.TypeOf(c.fn) +} + +func (c *callerCustomType2CustomType2ГCustomType2) Call(args []interface{}) []interface{} { + out0 := c.fn(args[0].(CustomType2), args[0].(CustomType2)) + return []interface{}{out0} +} + +func (c *callerCustomType2CustomType2ГCustomType2) Call2x1(arg0, arg1 interface{}) interface{} { + return c.fn(arg0.(CustomType2), arg1.(CustomType2)) +} + +func funcMakerCustomTypeГint(fn interface{}) reflectx.Func { + f := fn.(func(CustomType) int) + return &callerCustomTypeГint{fn: f} +} + +func funcMakerCustomType2CustomType2ГCustomType2(fn interface{}) reflectx.Func { + f := fn.(func(CustomType2, CustomType2) CustomType2) + return &callerCustomType2CustomType2ГCustomType2{fn: f} +} + func wrapMakerFoo(fn interface{}) map[string]reflectx.Func { dfn := fn.(*Foo) return map[string]reflectx.Func{ @@ -756,12 +782,21 @@ func wrapMakerFoo(fn interface{}) map[string]reflectx.Func { } } +func addCustomType2(a CustomType2, b CustomType2) CustomType2 { + return CustomType2{ + val2: a.val2 + b.val2, + } +} + func GeneratedOptimizationCalls() { runtime.RegisterType(reflect.TypeOf((*Foo)(nil)).Elem()) schema.RegisterType(reflect.TypeOf((*Foo)(nil)).Elem()) runtime.RegisterType(reflect.TypeOf((*CustomType)(nil)).Elem()) schema.RegisterType(reflect.TypeOf((*CustomType)(nil)).Elem()) + runtime.RegisterType(reflect.TypeOf((*CustomType2)(nil)).Elem()) + schema.RegisterType(reflect.TypeOf((*CustomType2)(nil)).Elem()) reflectx.RegisterFunc(reflect.TypeOf((*func(CustomType) int)(nil)).Elem(), funcMakerCustomTypeГint) + reflectx.RegisterFunc(reflect.TypeOf((*func(CustomType2, CustomType2) CustomType2)(nil)).Elem(), funcMakerCustomType2CustomType2ГCustomType2) reflectx.RegisterStructWrapper(reflect.TypeOf((*Foo)(nil)).Elem(), wrapMakerFoo) } @@ -773,23 +808,32 @@ func GeneratedOptimizationCalls() { // recommended path for most users - if these are materially better than the generic benchmarks, // this package requires further optimization. // -// BenchmarkMethodCalls/MakeFunc_Unoptimized-16 11480814 88.35 ns/op -// BenchmarkMethodCalls/MakeFunc.Call_Unoptimized-16 3525211 324.0 ns/op -// BenchmarkMethodCalls/MakeFunc.Call1x1_Unoptimized-16 3450822 343.0 ns/op -// BenchmarkMethodCalls/NewFn_Unoptimized-16 875199 1385 ns/op -// BenchmarkMethodCalls/EncodeMultiEdge_Unoptimized-16 1000000 1063 ns/op +// BenchmarkMethodCalls/MakeFunc_Unoptimized-16 11480814 88.35 ns/op +// BenchmarkMethodCalls/MakeFunc.Call_Unoptimized-16 3525211 324.0 ns/op +// BenchmarkMethodCalls/MakeFunc.Call1x1_Unoptimized-16 3450822 343.0 ns/op +// BenchmarkMethodCalls/NewFn_Unoptimized-16 875199 1385 ns/op +// BenchmarkMethodCalls/EncodeMultiEdge_Unoptimized-16 1000000 1063 ns/op +// BenchmarkMethodCalls/MakeFunc_FunctionalDoFn_Unoptimized-16 11984484 110.6 ns/op +// BenchmarkMethodCalls/MakeFunc_FunctionalDoFn.Call_Unoptimized-16 1574622 744.4 ns/op +// BenchmarkMethodCalls/MakeFunc_FunctionalDoFn.Call1x1_Unoptimized-16 1504969 795.9 ns/op // -// BenchmarkMethodCalls/MakeFunc_GenericRegistration-16 16266259 72.07 ns/op -// BenchmarkMethodCalls/MakeFunc.Call_GenericRegistration-16 38331327 32.70 ns/op -// BenchmarkMethodCalls/MakeFunc.Call1x1_GenericRegistration-16 135934086 8.434 ns/op -// BenchmarkMethodCalls/NewFn_GenericRegistration-16 1000000 1108 ns/op -// BenchmarkMethodCalls/EncodeMultiEdge_GenericRegistration-16 1000000 1052 ns/op +// BenchmarkMethodCalls/MakeFunc_GenericRegistration-16 16266259 72.07 ns/op +// BenchmarkMethodCalls/MakeFunc.Call_GenericRegistration-16 38331327 32.70 ns/op +// BenchmarkMethodCalls/MakeFunc.Call1x1_GenericRegistration-16 135934086 8.434 ns/op +// BenchmarkMethodCalls/NewFn_GenericRegistration-16 1000000 1108 ns/op +// BenchmarkMethodCalls/EncodeMultiEdge_GenericRegistration-16 1000000 1052 ns/op +// BenchmarkMethodCalls/MakeFunc_FunctionalDoFn_GenericRegistration-16 11295202 95.43 ns/op +// BenchmarkMethodCalls/MakeFunc_FunctionalDoFn.Call_GenericRegistration-16 20299956 54.15 ns/op +// BenchmarkMethodCalls/MakeFunc_FunctionalDoFn.Call1x1_GenericRegistration-16 92858212 12.86 ns/op // -// BenchmarkMethodCalls/MakeFunc_GeneratedShims-16 16400914 69.17 ns/op -// BenchmarkMethodCalls/MakeFunc.Call_GeneratedShims-16 37106445 33.69 ns/op -// BenchmarkMethodCalls/MakeFunc.Call1x1_GeneratedShims-16 141127965 8.312 ns/op -// BenchmarkMethodCalls/NewFn_GeneratedShims-16 1000000 1099 ns/op -// BenchmarkMethodCalls/EncodeMultiEdge_GeneratedShims-16 1000000 1071 ns/op +// BenchmarkMethodCalls/MakeFunc_GeneratedShims-16 16400914 69.17 ns/op +// BenchmarkMethodCalls/MakeFunc.Call_GeneratedShims-16 37106445 33.69 ns/op +// BenchmarkMethodCalls/MakeFunc.Call1x1_GeneratedShims-16 141127965 8.312 ns/op +// BenchmarkMethodCalls/NewFn_GeneratedShims-16 1000000 1099 ns/op +// BenchmarkMethodCalls/EncodeMultiEdge_GeneratedShims-16 1000000 1071 ns/op +// BenchmarkMethodCalls/MakeFunc_FunctionalDoFn_Unoptimized-16 12444930 90.77 ns/op +// BenchmarkMethodCalls/MakeFunc_FunctionalDoFn.Call_Unoptimized-16 19462878 51.92 ns/op +// BenchmarkMethodCalls/MakeFunc_FunctionalDoFn.Call1x1_Unoptimized-16 85194289 15.76 ns/op func BenchmarkMethodCalls(b *testing.B) { f := &Foo{A: 3} g, err := graph.NewFn(&Foo{A: 5}) @@ -806,8 +850,11 @@ func BenchmarkMethodCalls(b *testing.B) { var aFn *graph.Fn var aME interface{} var aFnCall int + var aFnCall2 CustomType2 var aFunc1x1 reflectx.Func1x1 + var aFunc2x1 reflectx.Func2x1 funcIn := []interface{}{CustomType{val: 4}} + funcIn2 := []interface{}{CustomType2{val2: 4}, CustomType2{val2: 3}} // We need to do this registration just to get it to not panic when encoding the multi-edge with no additional optimization. // This is currently required of users anyways @@ -818,25 +865,34 @@ func BenchmarkMethodCalls(b *testing.B) { registration func() }{ // No optimization performed at all - {"MakeFunc_Unoptimized", func() { aFunc = reflectx.MakeFunc(f.ProcessElement) }, func() { /*No op*/ }}, // Used in graph deserialization - {"MakeFunc.Call_Unoptimized", func() { aFnCall = aFunc.Call(funcIn)[0].(int) }, func() { /*No op*/ }}, // Used to call the function repeatedly - {"MakeFunc.Call1x1_Unoptimized", func() { aFnCall = aFunc1x1.Call1x1(CustomType{val: 4}).(int) }, func() { aFunc1x1 = reflectx.ToFunc1x1(aFunc) }}, // Used to call the function repeatedly - {"NewFn_Unoptimized", func() { aFn, _ = graph.NewFn(f) }, func() { /*No op*/ }}, // Used in graph construction (less valuable) - {"EncodeMultiEdge_Unoptimized", func() { aME, _ = graphx.EncodeMultiEdge(&me) }, func() { /*No op*/ }}, // Used in graph serialization at execution time + {"MakeFunc_Unoptimized", func() { aFunc = reflectx.MakeFunc(f.ProcessElement) }, func() { /*No op*/ }}, // Used in graph deserialization + {"MakeFunc.Call_Unoptimized", func() { aFnCall = aFunc.Call(funcIn)[0].(int) }, func() { /*No op*/ }}, // Used to call the function repeatedly + {"MakeFunc.Call1x1_Unoptimized", func() { aFnCall = aFunc1x1.Call1x1(CustomType{val: 4}).(int) }, func() { aFunc1x1 = reflectx.ToFunc1x1(aFunc) }}, // Used to call the function repeatedly + {"NewFn_Unoptimized", func() { aFn, _ = graph.NewFn(f) }, func() { /*No op*/ }}, // Used in graph construction (less valuable) + {"EncodeMultiEdge_Unoptimized", func() { aME, _ = graphx.EncodeMultiEdge(&me) }, func() { /*No op*/ }}, // Used in graph serialization at execution time + {"MakeFunc_FunctionalDoFn_Unoptimized", func() { aFunc = reflectx.MakeFunc(addCustomType2) }, func() { /*No op*/ }}, // Used in graph deserialization + {"MakeFunc_FunctionalDoFn.Call_Unoptimized", func() { aFnCall2 = aFunc.Call(funcIn2)[0].(CustomType2) }, func() { /*No op*/ }}, // Used to call the function repeatedly + {"MakeFunc_FunctionalDoFn.Call1x1_Unoptimized", func() { aFnCall2 = aFunc2x1.Call2x1(CustomType2{val2: 4}, CustomType2{val2: 3}).(CustomType2) }, func() { aFunc2x1 = reflectx.ToFunc2x1(aFunc) }}, // Used to call the function repeatedly // Perform some generic registration to optimize execution - {"MakeFunc_GenericRegistration", func() { aFunc = reflectx.MakeFunc(f.ProcessElement) }, func() { DoFn1x1[CustomType, int](f) }}, // Used in graph deserialization - {"MakeFunc.Call_GenericRegistration", func() { aFnCall = aFunc.Call(funcIn)[0].(int) }, func() { DoFn1x1[CustomType, int](f) }}, // Used to call the function repeatedly - {"MakeFunc.Call1x1_GenericRegistration", func() { aFnCall = aFunc1x1.Call1x1(CustomType{val: 3}).(int) }, func() { DoFn1x1[CustomType, int](f); aFunc1x1 = reflectx.ToFunc1x1(aFunc) }}, // Used to call the function repeatedly - {"NewFn_GenericRegistration", func() { aFn, _ = graph.NewFn(f) }, func() { DoFn1x1[CustomType, int](f) }}, // Used in graph construction (less valuable) - {"EncodeMultiEdge_GenericRegistration", func() { aME, _ = graphx.EncodeMultiEdge(&me) }, func() { DoFn1x1[CustomType, int](f) }}, // Used in graph serialization at execution time + {"MakeFunc_GenericRegistration", func() { aFunc = reflectx.MakeFunc(f.ProcessElement) }, func() { DoFn1x1[CustomType, int](f) }}, // Used in graph deserialization + {"MakeFunc.Call_GenericRegistration", func() { aFnCall = aFunc.Call(funcIn)[0].(int) }, func() { DoFn1x1[CustomType, int](f) }}, // Used to call the function repeatedly + {"MakeFunc.Call1x1_GenericRegistration", func() { aFnCall = aFunc1x1.Call1x1(CustomType{val: 3}).(int) }, func() { DoFn1x1[CustomType, int](f); aFunc1x1 = reflectx.ToFunc1x1(aFunc) }}, // Used to call the function repeatedly + {"NewFn_GenericRegistration", func() { aFn, _ = graph.NewFn(f) }, func() { DoFn1x1[CustomType, int](f) }}, // Used in graph construction (less valuable) + {"EncodeMultiEdge_GenericRegistration", func() { aME, _ = graphx.EncodeMultiEdge(&me) }, func() { DoFn1x1[CustomType, int](f) }}, // Used in graph serialization at execution time + {"MakeFunc_FunctionalDoFn_GenericRegistration", func() { aFunc = reflectx.MakeFunc(addCustomType2) }, func() { Function2x1[CustomType2, CustomType2, CustomType2](addCustomType2) }}, // Used in graph deserialization + {"MakeFunc_FunctionalDoFn.Call_GenericRegistration", func() { aFnCall2 = aFunc.Call(funcIn2)[0].(CustomType2) }, func() { Function2x1[CustomType2, CustomType2, CustomType2](addCustomType2) }}, // Used to call the function repeatedly + {"MakeFunc_FunctionalDoFn.Call1x1_GenericRegistration", func() { aFnCall2 = aFunc2x1.Call2x1(CustomType2{val2: 4}, CustomType2{val2: 3}).(CustomType2) }, func() { Function2x1[CustomType2, CustomType2, CustomType2](addCustomType2); aFunc2x1 = reflectx.ToFunc2x1(aFunc) }}, // Used to call the function repeatedly // Perform some registration via copies of the code generator's shims - {"MakeFunc_GeneratedShims", func() { aFunc = reflectx.MakeFunc(f.ProcessElement) }, func() { GeneratedOptimizationCalls() }}, // Used in graph deserialization - {"MakeFunc.Call_GeneratedShims", func() { aFnCall = aFunc.Call(funcIn)[0].(int) }, func() { GeneratedOptimizationCalls() }}, // Used to call the function repeatedly - {"MakeFunc.Call1x1_GeneratedShims", func() { aFnCall = aFunc1x1.Call1x1(CustomType{val: 5}).(int) }, func() { GeneratedOptimizationCalls(); aFunc1x1 = reflectx.ToFunc1x1(aFunc) }}, // Used to call the function repeatedly - {"NewFn_GeneratedShims", func() { aFn, _ = graph.NewFn(f) }, func() { GeneratedOptimizationCalls() }}, // Used in graph construction (less valuable) - {"EncodeMultiEdge_GeneratedShims", func() { aME, err = graphx.EncodeMultiEdge(&me) }, func() { GeneratedOptimizationCalls() }}, // Used in graph serialization at execution time + {"MakeFunc_GeneratedShims", func() { aFunc = reflectx.MakeFunc(f.ProcessElement) }, func() { GeneratedOptimizationCalls() }}, // Used in graph deserialization + {"MakeFunc.Call_GeneratedShims", func() { aFnCall = aFunc.Call(funcIn)[0].(int) }, func() { GeneratedOptimizationCalls() }}, // Used to call the function repeatedly + {"MakeFunc.Call1x1_GeneratedShims", func() { aFnCall = aFunc1x1.Call1x1(CustomType{val: 5}).(int) }, func() { GeneratedOptimizationCalls(); aFunc1x1 = reflectx.ToFunc1x1(aFunc) }}, // Used to call the function repeatedly + {"NewFn_GeneratedShims", func() { aFn, _ = graph.NewFn(f) }, func() { GeneratedOptimizationCalls() }}, // Used in graph construction (less valuable) + {"EncodeMultiEdge_GeneratedShims", func() { aME, err = graphx.EncodeMultiEdge(&me) }, func() { GeneratedOptimizationCalls() }}, // Used in graph serialization at execution time + {"MakeFunc_FunctionalDoFn_Unoptimized", func() { aFunc = reflectx.MakeFunc(addCustomType2) }, func() { GeneratedOptimizationCalls() }}, // Used in graph deserialization + {"MakeFunc_FunctionalDoFn.Call_Unoptimized", func() { aFnCall2 = aFunc.Call(funcIn2)[0].(CustomType2) }, func() { GeneratedOptimizationCalls() }}, // Used to call the function repeatedly + {"MakeFunc_FunctionalDoFn.Call1x1_Unoptimized", func() { aFnCall2 = aFunc2x1.Call2x1(CustomType2{val2: 4}, CustomType2{val2: 3}).(CustomType2) }, func() { GeneratedOptimizationCalls(); aFunc2x1 = reflectx.ToFunc2x1(aFunc) }}, // Used to call the function repeatedly } for _, test := range tests { test.registration() @@ -848,6 +904,7 @@ func BenchmarkMethodCalls(b *testing.B) { } b.Log(aFunc) b.Log(aFnCall) + b.Log(aFnCall2) b.Log(aFn) b.Log(aME) } From a303ae9347fe9100cef0c53cb0434cbcbfbf60de Mon Sep 17 00:00:00 2001 From: Danny McCormick Date: Thu, 12 May 2022 18:49:40 -0400 Subject: [PATCH 3/5] Go fmt --- sdks/go/pkg/beam/register/register_test.go | 47 ++++++++++++---------- 1 file changed, 25 insertions(+), 22 deletions(-) diff --git a/sdks/go/pkg/beam/register/register_test.go b/sdks/go/pkg/beam/register/register_test.go index 62ba828df68e..62212d9ce3ce 100644 --- a/sdks/go/pkg/beam/register/register_test.go +++ b/sdks/go/pkg/beam/register/register_test.go @@ -865,33 +865,36 @@ func BenchmarkMethodCalls(b *testing.B) { registration func() }{ // No optimization performed at all - {"MakeFunc_Unoptimized", func() { aFunc = reflectx.MakeFunc(f.ProcessElement) }, func() { /*No op*/ }}, // Used in graph deserialization - {"MakeFunc.Call_Unoptimized", func() { aFnCall = aFunc.Call(funcIn)[0].(int) }, func() { /*No op*/ }}, // Used to call the function repeatedly - {"MakeFunc.Call1x1_Unoptimized", func() { aFnCall = aFunc1x1.Call1x1(CustomType{val: 4}).(int) }, func() { aFunc1x1 = reflectx.ToFunc1x1(aFunc) }}, // Used to call the function repeatedly - {"NewFn_Unoptimized", func() { aFn, _ = graph.NewFn(f) }, func() { /*No op*/ }}, // Used in graph construction (less valuable) - {"EncodeMultiEdge_Unoptimized", func() { aME, _ = graphx.EncodeMultiEdge(&me) }, func() { /*No op*/ }}, // Used in graph serialization at execution time - {"MakeFunc_FunctionalDoFn_Unoptimized", func() { aFunc = reflectx.MakeFunc(addCustomType2) }, func() { /*No op*/ }}, // Used in graph deserialization - {"MakeFunc_FunctionalDoFn.Call_Unoptimized", func() { aFnCall2 = aFunc.Call(funcIn2)[0].(CustomType2) }, func() { /*No op*/ }}, // Used to call the function repeatedly + {"MakeFunc_Unoptimized", func() { aFunc = reflectx.MakeFunc(f.ProcessElement) }, func() { /*No op*/ }}, // Used in graph deserialization + {"MakeFunc.Call_Unoptimized", func() { aFnCall = aFunc.Call(funcIn)[0].(int) }, func() { /*No op*/ }}, // Used to call the function repeatedly + {"MakeFunc.Call1x1_Unoptimized", func() { aFnCall = aFunc1x1.Call1x1(CustomType{val: 4}).(int) }, func() { aFunc1x1 = reflectx.ToFunc1x1(aFunc) }}, // Used to call the function repeatedly + {"NewFn_Unoptimized", func() { aFn, _ = graph.NewFn(f) }, func() { /*No op*/ }}, // Used in graph construction (less valuable) + {"EncodeMultiEdge_Unoptimized", func() { aME, _ = graphx.EncodeMultiEdge(&me) }, func() { /*No op*/ }}, // Used in graph serialization at execution time + {"MakeFunc_FunctionalDoFn_Unoptimized", func() { aFunc = reflectx.MakeFunc(addCustomType2) }, func() { /*No op*/ }}, // Used in graph deserialization + {"MakeFunc_FunctionalDoFn.Call_Unoptimized", func() { aFnCall2 = aFunc.Call(funcIn2)[0].(CustomType2) }, func() { /*No op*/ }}, // Used to call the function repeatedly {"MakeFunc_FunctionalDoFn.Call1x1_Unoptimized", func() { aFnCall2 = aFunc2x1.Call2x1(CustomType2{val2: 4}, CustomType2{val2: 3}).(CustomType2) }, func() { aFunc2x1 = reflectx.ToFunc2x1(aFunc) }}, // Used to call the function repeatedly // Perform some generic registration to optimize execution - {"MakeFunc_GenericRegistration", func() { aFunc = reflectx.MakeFunc(f.ProcessElement) }, func() { DoFn1x1[CustomType, int](f) }}, // Used in graph deserialization - {"MakeFunc.Call_GenericRegistration", func() { aFnCall = aFunc.Call(funcIn)[0].(int) }, func() { DoFn1x1[CustomType, int](f) }}, // Used to call the function repeatedly - {"MakeFunc.Call1x1_GenericRegistration", func() { aFnCall = aFunc1x1.Call1x1(CustomType{val: 3}).(int) }, func() { DoFn1x1[CustomType, int](f); aFunc1x1 = reflectx.ToFunc1x1(aFunc) }}, // Used to call the function repeatedly - {"NewFn_GenericRegistration", func() { aFn, _ = graph.NewFn(f) }, func() { DoFn1x1[CustomType, int](f) }}, // Used in graph construction (less valuable) - {"EncodeMultiEdge_GenericRegistration", func() { aME, _ = graphx.EncodeMultiEdge(&me) }, func() { DoFn1x1[CustomType, int](f) }}, // Used in graph serialization at execution time - {"MakeFunc_FunctionalDoFn_GenericRegistration", func() { aFunc = reflectx.MakeFunc(addCustomType2) }, func() { Function2x1[CustomType2, CustomType2, CustomType2](addCustomType2) }}, // Used in graph deserialization - {"MakeFunc_FunctionalDoFn.Call_GenericRegistration", func() { aFnCall2 = aFunc.Call(funcIn2)[0].(CustomType2) }, func() { Function2x1[CustomType2, CustomType2, CustomType2](addCustomType2) }}, // Used to call the function repeatedly - {"MakeFunc_FunctionalDoFn.Call1x1_GenericRegistration", func() { aFnCall2 = aFunc2x1.Call2x1(CustomType2{val2: 4}, CustomType2{val2: 3}).(CustomType2) }, func() { Function2x1[CustomType2, CustomType2, CustomType2](addCustomType2); aFunc2x1 = reflectx.ToFunc2x1(aFunc) }}, // Used to call the function repeatedly + {"MakeFunc_GenericRegistration", func() { aFunc = reflectx.MakeFunc(f.ProcessElement) }, func() { DoFn1x1[CustomType, int](f) }}, // Used in graph deserialization + {"MakeFunc.Call_GenericRegistration", func() { aFnCall = aFunc.Call(funcIn)[0].(int) }, func() { DoFn1x1[CustomType, int](f) }}, // Used to call the function repeatedly + {"MakeFunc.Call1x1_GenericRegistration", func() { aFnCall = aFunc1x1.Call1x1(CustomType{val: 3}).(int) }, func() { DoFn1x1[CustomType, int](f); aFunc1x1 = reflectx.ToFunc1x1(aFunc) }}, // Used to call the function repeatedly + {"NewFn_GenericRegistration", func() { aFn, _ = graph.NewFn(f) }, func() { DoFn1x1[CustomType, int](f) }}, // Used in graph construction (less valuable) + {"EncodeMultiEdge_GenericRegistration", func() { aME, _ = graphx.EncodeMultiEdge(&me) }, func() { DoFn1x1[CustomType, int](f) }}, // Used in graph serialization at execution time + {"MakeFunc_FunctionalDoFn_GenericRegistration", func() { aFunc = reflectx.MakeFunc(addCustomType2) }, func() { Function2x1[CustomType2, CustomType2, CustomType2](addCustomType2) }}, // Used in graph deserialization + {"MakeFunc_FunctionalDoFn.Call_GenericRegistration", func() { aFnCall2 = aFunc.Call(funcIn2)[0].(CustomType2) }, func() { Function2x1[CustomType2, CustomType2, CustomType2](addCustomType2) }}, // Used to call the function repeatedly + {"MakeFunc_FunctionalDoFn.Call1x1_GenericRegistration", func() { aFnCall2 = aFunc2x1.Call2x1(CustomType2{val2: 4}, CustomType2{val2: 3}).(CustomType2) }, func() { + Function2x1[CustomType2, CustomType2, CustomType2](addCustomType2) + aFunc2x1 = reflectx.ToFunc2x1(aFunc) + }}, // Used to call the function repeatedly // Perform some registration via copies of the code generator's shims - {"MakeFunc_GeneratedShims", func() { aFunc = reflectx.MakeFunc(f.ProcessElement) }, func() { GeneratedOptimizationCalls() }}, // Used in graph deserialization - {"MakeFunc.Call_GeneratedShims", func() { aFnCall = aFunc.Call(funcIn)[0].(int) }, func() { GeneratedOptimizationCalls() }}, // Used to call the function repeatedly - {"MakeFunc.Call1x1_GeneratedShims", func() { aFnCall = aFunc1x1.Call1x1(CustomType{val: 5}).(int) }, func() { GeneratedOptimizationCalls(); aFunc1x1 = reflectx.ToFunc1x1(aFunc) }}, // Used to call the function repeatedly - {"NewFn_GeneratedShims", func() { aFn, _ = graph.NewFn(f) }, func() { GeneratedOptimizationCalls() }}, // Used in graph construction (less valuable) - {"EncodeMultiEdge_GeneratedShims", func() { aME, err = graphx.EncodeMultiEdge(&me) }, func() { GeneratedOptimizationCalls() }}, // Used in graph serialization at execution time - {"MakeFunc_FunctionalDoFn_Unoptimized", func() { aFunc = reflectx.MakeFunc(addCustomType2) }, func() { GeneratedOptimizationCalls() }}, // Used in graph deserialization - {"MakeFunc_FunctionalDoFn.Call_Unoptimized", func() { aFnCall2 = aFunc.Call(funcIn2)[0].(CustomType2) }, func() { GeneratedOptimizationCalls() }}, // Used to call the function repeatedly + {"MakeFunc_GeneratedShims", func() { aFunc = reflectx.MakeFunc(f.ProcessElement) }, func() { GeneratedOptimizationCalls() }}, // Used in graph deserialization + {"MakeFunc.Call_GeneratedShims", func() { aFnCall = aFunc.Call(funcIn)[0].(int) }, func() { GeneratedOptimizationCalls() }}, // Used to call the function repeatedly + {"MakeFunc.Call1x1_GeneratedShims", func() { aFnCall = aFunc1x1.Call1x1(CustomType{val: 5}).(int) }, func() { GeneratedOptimizationCalls(); aFunc1x1 = reflectx.ToFunc1x1(aFunc) }}, // Used to call the function repeatedly + {"NewFn_GeneratedShims", func() { aFn, _ = graph.NewFn(f) }, func() { GeneratedOptimizationCalls() }}, // Used in graph construction (less valuable) + {"EncodeMultiEdge_GeneratedShims", func() { aME, err = graphx.EncodeMultiEdge(&me) }, func() { GeneratedOptimizationCalls() }}, // Used in graph serialization at execution time + {"MakeFunc_FunctionalDoFn_Unoptimized", func() { aFunc = reflectx.MakeFunc(addCustomType2) }, func() { GeneratedOptimizationCalls() }}, // Used in graph deserialization + {"MakeFunc_FunctionalDoFn.Call_Unoptimized", func() { aFnCall2 = aFunc.Call(funcIn2)[0].(CustomType2) }, func() { GeneratedOptimizationCalls() }}, // Used to call the function repeatedly {"MakeFunc_FunctionalDoFn.Call1x1_Unoptimized", func() { aFnCall2 = aFunc2x1.Call2x1(CustomType2{val2: 4}, CustomType2{val2: 3}).(CustomType2) }, func() { GeneratedOptimizationCalls(); aFunc2x1 = reflectx.ToFunc2x1(aFunc) }}, // Used to call the function repeatedly } for _, test := range tests { From d8863e9bb1bc9a86c5e9bf860e4613fd28823692 Mon Sep 17 00:00:00 2001 From: Danny McCormick Date: Thu, 12 May 2022 21:13:03 -0400 Subject: [PATCH 4/5] Typos --- sdks/go/pkg/beam/register/register_test.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sdks/go/pkg/beam/register/register_test.go b/sdks/go/pkg/beam/register/register_test.go index 62212d9ce3ce..3704c3e6fed1 100644 --- a/sdks/go/pkg/beam/register/register_test.go +++ b/sdks/go/pkg/beam/register/register_test.go @@ -831,9 +831,9 @@ func GeneratedOptimizationCalls() { // BenchmarkMethodCalls/MakeFunc.Call1x1_GeneratedShims-16 141127965 8.312 ns/op // BenchmarkMethodCalls/NewFn_GeneratedShims-16 1000000 1099 ns/op // BenchmarkMethodCalls/EncodeMultiEdge_GeneratedShims-16 1000000 1071 ns/op -// BenchmarkMethodCalls/MakeFunc_FunctionalDoFn_Unoptimized-16 12444930 90.77 ns/op -// BenchmarkMethodCalls/MakeFunc_FunctionalDoFn.Call_Unoptimized-16 19462878 51.92 ns/op -// BenchmarkMethodCalls/MakeFunc_FunctionalDoFn.Call1x1_Unoptimized-16 85194289 15.76 ns/op +// BenchmarkMethodCalls/MakeFunc_FunctionalDoFn_GeneratedShims-16 12444930 90.77 ns/op +// BenchmarkMethodCalls/MakeFunc_FunctionalDoFn.Call_GeneratedShims-16 19462878 51.92 ns/op +// BenchmarkMethodCalls/MakeFunc_FunctionalDoFn.Call2x1_GeneratedShims-16 85194289 15.76 ns/op func BenchmarkMethodCalls(b *testing.B) { f := &Foo{A: 3} g, err := graph.NewFn(&Foo{A: 5}) @@ -872,7 +872,7 @@ func BenchmarkMethodCalls(b *testing.B) { {"EncodeMultiEdge_Unoptimized", func() { aME, _ = graphx.EncodeMultiEdge(&me) }, func() { /*No op*/ }}, // Used in graph serialization at execution time {"MakeFunc_FunctionalDoFn_Unoptimized", func() { aFunc = reflectx.MakeFunc(addCustomType2) }, func() { /*No op*/ }}, // Used in graph deserialization {"MakeFunc_FunctionalDoFn.Call_Unoptimized", func() { aFnCall2 = aFunc.Call(funcIn2)[0].(CustomType2) }, func() { /*No op*/ }}, // Used to call the function repeatedly - {"MakeFunc_FunctionalDoFn.Call1x1_Unoptimized", func() { aFnCall2 = aFunc2x1.Call2x1(CustomType2{val2: 4}, CustomType2{val2: 3}).(CustomType2) }, func() { aFunc2x1 = reflectx.ToFunc2x1(aFunc) }}, // Used to call the function repeatedly + {"MakeFunc_FunctionalDoFn.Call2x1_Unoptimized", func() { aFnCall2 = aFunc2x1.Call2x1(CustomType2{val2: 4}, CustomType2{val2: 3}).(CustomType2) }, func() { aFunc2x1 = reflectx.ToFunc2x1(aFunc) }}, // Used to call the function repeatedly // Perform some generic registration to optimize execution {"MakeFunc_GenericRegistration", func() { aFunc = reflectx.MakeFunc(f.ProcessElement) }, func() { DoFn1x1[CustomType, int](f) }}, // Used in graph deserialization @@ -882,7 +882,7 @@ func BenchmarkMethodCalls(b *testing.B) { {"EncodeMultiEdge_GenericRegistration", func() { aME, _ = graphx.EncodeMultiEdge(&me) }, func() { DoFn1x1[CustomType, int](f) }}, // Used in graph serialization at execution time {"MakeFunc_FunctionalDoFn_GenericRegistration", func() { aFunc = reflectx.MakeFunc(addCustomType2) }, func() { Function2x1[CustomType2, CustomType2, CustomType2](addCustomType2) }}, // Used in graph deserialization {"MakeFunc_FunctionalDoFn.Call_GenericRegistration", func() { aFnCall2 = aFunc.Call(funcIn2)[0].(CustomType2) }, func() { Function2x1[CustomType2, CustomType2, CustomType2](addCustomType2) }}, // Used to call the function repeatedly - {"MakeFunc_FunctionalDoFn.Call1x1_GenericRegistration", func() { aFnCall2 = aFunc2x1.Call2x1(CustomType2{val2: 4}, CustomType2{val2: 3}).(CustomType2) }, func() { + {"MakeFunc_FunctionalDoFn.Call2x1_GenericRegistration", func() { aFnCall2 = aFunc2x1.Call2x1(CustomType2{val2: 4}, CustomType2{val2: 3}).(CustomType2) }, func() { Function2x1[CustomType2, CustomType2, CustomType2](addCustomType2) aFunc2x1 = reflectx.ToFunc2x1(aFunc) }}, // Used to call the function repeatedly @@ -893,9 +893,9 @@ func BenchmarkMethodCalls(b *testing.B) { {"MakeFunc.Call1x1_GeneratedShims", func() { aFnCall = aFunc1x1.Call1x1(CustomType{val: 5}).(int) }, func() { GeneratedOptimizationCalls(); aFunc1x1 = reflectx.ToFunc1x1(aFunc) }}, // Used to call the function repeatedly {"NewFn_GeneratedShims", func() { aFn, _ = graph.NewFn(f) }, func() { GeneratedOptimizationCalls() }}, // Used in graph construction (less valuable) {"EncodeMultiEdge_GeneratedShims", func() { aME, err = graphx.EncodeMultiEdge(&me) }, func() { GeneratedOptimizationCalls() }}, // Used in graph serialization at execution time - {"MakeFunc_FunctionalDoFn_Unoptimized", func() { aFunc = reflectx.MakeFunc(addCustomType2) }, func() { GeneratedOptimizationCalls() }}, // Used in graph deserialization - {"MakeFunc_FunctionalDoFn.Call_Unoptimized", func() { aFnCall2 = aFunc.Call(funcIn2)[0].(CustomType2) }, func() { GeneratedOptimizationCalls() }}, // Used to call the function repeatedly - {"MakeFunc_FunctionalDoFn.Call1x1_Unoptimized", func() { aFnCall2 = aFunc2x1.Call2x1(CustomType2{val2: 4}, CustomType2{val2: 3}).(CustomType2) }, func() { GeneratedOptimizationCalls(); aFunc2x1 = reflectx.ToFunc2x1(aFunc) }}, // Used to call the function repeatedly + {"MakeFunc_FunctionalDoFn_GeneratedShims", func() { aFunc = reflectx.MakeFunc(addCustomType2) }, func() { GeneratedOptimizationCalls() }}, // Used in graph deserialization + {"MakeFunc_FunctionalDoFn.Call_GeneratedShims", func() { aFnCall2 = aFunc.Call(funcIn2)[0].(CustomType2) }, func() { GeneratedOptimizationCalls() }}, // Used to call the function repeatedly + {"MakeFunc_FunctionalDoFn.Call2x1_GeneratedShims", func() { aFnCall2 = aFunc2x1.Call2x1(CustomType2{val2: 4}, CustomType2{val2: 3}).(CustomType2) }, func() { GeneratedOptimizationCalls(); aFunc2x1 = reflectx.ToFunc2x1(aFunc) }}, // Used to call the function repeatedly } for _, test := range tests { test.registration() From 03c6f2b5db0c563b7ff66d64a990ce9d18bfc795 Mon Sep 17 00:00:00 2001 From: Danny McCormick Date: Thu, 12 May 2022 21:17:41 -0400 Subject: [PATCH 5/5] go fmt --- sdks/go/pkg/beam/register/register_test.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sdks/go/pkg/beam/register/register_test.go b/sdks/go/pkg/beam/register/register_test.go index 3704c3e6fed1..39962ab3c421 100644 --- a/sdks/go/pkg/beam/register/register_test.go +++ b/sdks/go/pkg/beam/register/register_test.go @@ -888,11 +888,11 @@ func BenchmarkMethodCalls(b *testing.B) { }}, // Used to call the function repeatedly // Perform some registration via copies of the code generator's shims - {"MakeFunc_GeneratedShims", func() { aFunc = reflectx.MakeFunc(f.ProcessElement) }, func() { GeneratedOptimizationCalls() }}, // Used in graph deserialization - {"MakeFunc.Call_GeneratedShims", func() { aFnCall = aFunc.Call(funcIn)[0].(int) }, func() { GeneratedOptimizationCalls() }}, // Used to call the function repeatedly - {"MakeFunc.Call1x1_GeneratedShims", func() { aFnCall = aFunc1x1.Call1x1(CustomType{val: 5}).(int) }, func() { GeneratedOptimizationCalls(); aFunc1x1 = reflectx.ToFunc1x1(aFunc) }}, // Used to call the function repeatedly - {"NewFn_GeneratedShims", func() { aFn, _ = graph.NewFn(f) }, func() { GeneratedOptimizationCalls() }}, // Used in graph construction (less valuable) - {"EncodeMultiEdge_GeneratedShims", func() { aME, err = graphx.EncodeMultiEdge(&me) }, func() { GeneratedOptimizationCalls() }}, // Used in graph serialization at execution time + {"MakeFunc_GeneratedShims", func() { aFunc = reflectx.MakeFunc(f.ProcessElement) }, func() { GeneratedOptimizationCalls() }}, // Used in graph deserialization + {"MakeFunc.Call_GeneratedShims", func() { aFnCall = aFunc.Call(funcIn)[0].(int) }, func() { GeneratedOptimizationCalls() }}, // Used to call the function repeatedly + {"MakeFunc.Call1x1_GeneratedShims", func() { aFnCall = aFunc1x1.Call1x1(CustomType{val: 5}).(int) }, func() { GeneratedOptimizationCalls(); aFunc1x1 = reflectx.ToFunc1x1(aFunc) }}, // Used to call the function repeatedly + {"NewFn_GeneratedShims", func() { aFn, _ = graph.NewFn(f) }, func() { GeneratedOptimizationCalls() }}, // Used in graph construction (less valuable) + {"EncodeMultiEdge_GeneratedShims", func() { aME, err = graphx.EncodeMultiEdge(&me) }, func() { GeneratedOptimizationCalls() }}, // Used in graph serialization at execution time {"MakeFunc_FunctionalDoFn_GeneratedShims", func() { aFunc = reflectx.MakeFunc(addCustomType2) }, func() { GeneratedOptimizationCalls() }}, // Used in graph deserialization {"MakeFunc_FunctionalDoFn.Call_GeneratedShims", func() { aFnCall2 = aFunc.Call(funcIn2)[0].(CustomType2) }, func() { GeneratedOptimizationCalls() }}, // Used to call the function repeatedly {"MakeFunc_FunctionalDoFn.Call2x1_GeneratedShims", func() { aFnCall2 = aFunc2x1.Call2x1(CustomType2{val2: 4}, CustomType2{val2: 3}).(CustomType2) }, func() { GeneratedOptimizationCalls(); aFunc2x1 = reflectx.ToFunc2x1(aFunc) }}, // Used to call the function repeatedly