github.com/primecitizens/pcz/std@v0.2.1/plat/js/web/apis42_js_wasm.go (about) 1 // SPDX-License-Identifier: Apache-2.0 2 // Copyright 2023 The Prime Citizens 3 4 package web 5 6 import ( 7 "github.com/primecitizens/pcz/std/ffi/js" 8 "github.com/primecitizens/pcz/std/plat/js/web/bindings" 9 ) 10 11 const ( 12 _ MLOperandType = iota 13 14 MLOperandType_FLOAT32 15 MLOperandType_FLOAT16 16 MLOperandType_INT32 17 MLOperandType_UINT32 18 MLOperandType_INT8 19 MLOperandType_UINT8 20 ) 21 22 func (MLOperandType) FromRef(str js.Ref) MLOperandType { 23 return MLOperandType(bindings.ConstOfMLOperandType(str)) 24 } 25 26 func (x MLOperandType) String() (string, bool) { 27 switch x { 28 case MLOperandType_FLOAT32: 29 return "float32", true 30 case MLOperandType_FLOAT16: 31 return "float16", true 32 case MLOperandType_INT32: 33 return "int32", true 34 case MLOperandType_UINT32: 35 return "uint32", true 36 case MLOperandType_INT8: 37 return "int8", true 38 case MLOperandType_UINT8: 39 return "uint8", true 40 default: 41 return "", false 42 } 43 } 44 45 type MLOperandDescriptor struct { 46 // Type is "MLOperandDescriptor.type" 47 // 48 // Required 49 Type MLOperandType 50 // Dimensions is "MLOperandDescriptor.dimensions" 51 // 52 // Optional 53 Dimensions js.Array[uint32] 54 55 FFI_USE bool 56 } 57 58 // FromRef calls UpdateFrom and returns a MLOperandDescriptor with all fields set. 59 func (p MLOperandDescriptor) FromRef(ref js.Ref) MLOperandDescriptor { 60 p.UpdateFrom(ref) 61 return p 62 } 63 64 // New creates a new MLOperandDescriptor in the application heap. 65 func (p MLOperandDescriptor) New() js.Ref { 66 return bindings.MLOperandDescriptorJSLoad( 67 js.Pointer(&p), js.True, 0, 68 ) 69 } 70 71 // UpdateFrom copies value of all fields of the heap object to p. 72 func (p *MLOperandDescriptor) UpdateFrom(ref js.Ref) { 73 bindings.MLOperandDescriptorJSStore( 74 js.Pointer(p), ref, 75 ) 76 } 77 78 // Update writes all fields of the p to the heap object referenced by ref. 79 func (p *MLOperandDescriptor) Update(ref js.Ref) { 80 bindings.MLOperandDescriptorJSLoad( 81 js.Pointer(p), js.False, ref, 82 ) 83 } 84 85 // FreeMembers frees fields with heap reference, if recursive is true 86 // free all heap references reachable from p. 87 func (p *MLOperandDescriptor) FreeMembers(recursive bool) { 88 js.Free( 89 p.Dimensions.Ref(), 90 ) 91 p.Dimensions = p.Dimensions.FromRef(js.Undefined) 92 } 93 94 type MLNamedOperands = js.Record[MLOperand] 95 96 type MLHardSigmoidOptions struct { 97 // Alpha is "MLHardSigmoidOptions.alpha" 98 // 99 // Optional, defaults to 0.2. 100 // 101 // NOTE: FFI_USE_Alpha MUST be set to true to make this field effective. 102 Alpha float32 103 // Beta is "MLHardSigmoidOptions.beta" 104 // 105 // Optional, defaults to 0.5. 106 // 107 // NOTE: FFI_USE_Beta MUST be set to true to make this field effective. 108 Beta float32 109 110 FFI_USE_Alpha bool // for Alpha. 111 FFI_USE_Beta bool // for Beta. 112 113 FFI_USE bool 114 } 115 116 // FromRef calls UpdateFrom and returns a MLHardSigmoidOptions with all fields set. 117 func (p MLHardSigmoidOptions) FromRef(ref js.Ref) MLHardSigmoidOptions { 118 p.UpdateFrom(ref) 119 return p 120 } 121 122 // New creates a new MLHardSigmoidOptions in the application heap. 123 func (p MLHardSigmoidOptions) New() js.Ref { 124 return bindings.MLHardSigmoidOptionsJSLoad( 125 js.Pointer(&p), js.True, 0, 126 ) 127 } 128 129 // UpdateFrom copies value of all fields of the heap object to p. 130 func (p *MLHardSigmoidOptions) UpdateFrom(ref js.Ref) { 131 bindings.MLHardSigmoidOptionsJSStore( 132 js.Pointer(p), ref, 133 ) 134 } 135 136 // Update writes all fields of the p to the heap object referenced by ref. 137 func (p *MLHardSigmoidOptions) Update(ref js.Ref) { 138 bindings.MLHardSigmoidOptionsJSLoad( 139 js.Pointer(p), js.False, ref, 140 ) 141 } 142 143 // FreeMembers frees fields with heap reference, if recursive is true 144 // free all heap references reachable from p. 145 func (p *MLHardSigmoidOptions) FreeMembers(recursive bool) { 146 } 147 148 type MLGruWeightLayout uint32 149 150 const ( 151 _ MLGruWeightLayout = iota 152 153 MLGruWeightLayout_ZRN 154 MLGruWeightLayout_RZN 155 ) 156 157 func (MLGruWeightLayout) FromRef(str js.Ref) MLGruWeightLayout { 158 return MLGruWeightLayout(bindings.ConstOfMLGruWeightLayout(str)) 159 } 160 161 func (x MLGruWeightLayout) String() (string, bool) { 162 switch x { 163 case MLGruWeightLayout_ZRN: 164 return "zrn", true 165 case MLGruWeightLayout_RZN: 166 return "rzn", true 167 default: 168 return "", false 169 } 170 } 171 172 type MLGruCellOptions struct { 173 // Bias is "MLGruCellOptions.bias" 174 // 175 // Optional 176 Bias MLOperand 177 // RecurrentBias is "MLGruCellOptions.recurrentBias" 178 // 179 // Optional 180 RecurrentBias MLOperand 181 // ResetAfter is "MLGruCellOptions.resetAfter" 182 // 183 // Optional, defaults to true. 184 // 185 // NOTE: FFI_USE_ResetAfter MUST be set to true to make this field effective. 186 ResetAfter bool 187 // Layout is "MLGruCellOptions.layout" 188 // 189 // Optional, defaults to "zrn". 190 Layout MLGruWeightLayout 191 // Activations is "MLGruCellOptions.activations" 192 // 193 // Optional 194 Activations js.Array[MLActivation] 195 196 FFI_USE_ResetAfter bool // for ResetAfter. 197 198 FFI_USE bool 199 } 200 201 // FromRef calls UpdateFrom and returns a MLGruCellOptions with all fields set. 202 func (p MLGruCellOptions) FromRef(ref js.Ref) MLGruCellOptions { 203 p.UpdateFrom(ref) 204 return p 205 } 206 207 // New creates a new MLGruCellOptions in the application heap. 208 func (p MLGruCellOptions) New() js.Ref { 209 return bindings.MLGruCellOptionsJSLoad( 210 js.Pointer(&p), js.True, 0, 211 ) 212 } 213 214 // UpdateFrom copies value of all fields of the heap object to p. 215 func (p *MLGruCellOptions) UpdateFrom(ref js.Ref) { 216 bindings.MLGruCellOptionsJSStore( 217 js.Pointer(p), ref, 218 ) 219 } 220 221 // Update writes all fields of the p to the heap object referenced by ref. 222 func (p *MLGruCellOptions) Update(ref js.Ref) { 223 bindings.MLGruCellOptionsJSLoad( 224 js.Pointer(p), js.False, ref, 225 ) 226 } 227 228 // FreeMembers frees fields with heap reference, if recursive is true 229 // free all heap references reachable from p. 230 func (p *MLGruCellOptions) FreeMembers(recursive bool) { 231 js.Free( 232 p.Bias.Ref(), 233 p.RecurrentBias.Ref(), 234 p.Activations.Ref(), 235 ) 236 p.Bias = p.Bias.FromRef(js.Undefined) 237 p.RecurrentBias = p.RecurrentBias.FromRef(js.Undefined) 238 p.Activations = p.Activations.FromRef(js.Undefined) 239 } 240 241 type MLRoundingType uint32 242 243 const ( 244 _ MLRoundingType = iota 245 246 MLRoundingType_FLOOR 247 MLRoundingType_CEIL 248 ) 249 250 func (MLRoundingType) FromRef(str js.Ref) MLRoundingType { 251 return MLRoundingType(bindings.ConstOfMLRoundingType(str)) 252 } 253 254 func (x MLRoundingType) String() (string, bool) { 255 switch x { 256 case MLRoundingType_FLOOR: 257 return "floor", true 258 case MLRoundingType_CEIL: 259 return "ceil", true 260 default: 261 return "", false 262 } 263 } 264 265 type MLPool2dOptions struct { 266 // WindowDimensions is "MLPool2dOptions.windowDimensions" 267 // 268 // Optional 269 WindowDimensions js.Array[uint32] 270 // Padding is "MLPool2dOptions.padding" 271 // 272 // Optional 273 Padding js.Array[uint32] 274 // Strides is "MLPool2dOptions.strides" 275 // 276 // Optional 277 Strides js.Array[uint32] 278 // Dilations is "MLPool2dOptions.dilations" 279 // 280 // Optional 281 Dilations js.Array[uint32] 282 // AutoPad is "MLPool2dOptions.autoPad" 283 // 284 // Optional, defaults to "explicit". 285 AutoPad MLAutoPad 286 // Layout is "MLPool2dOptions.layout" 287 // 288 // Optional, defaults to "nchw". 289 Layout MLInputOperandLayout 290 // RoundingType is "MLPool2dOptions.roundingType" 291 // 292 // Optional, defaults to "floor". 293 RoundingType MLRoundingType 294 // OutputSizes is "MLPool2dOptions.outputSizes" 295 // 296 // Optional 297 OutputSizes js.Array[uint32] 298 299 FFI_USE bool 300 } 301 302 // FromRef calls UpdateFrom and returns a MLPool2dOptions with all fields set. 303 func (p MLPool2dOptions) FromRef(ref js.Ref) MLPool2dOptions { 304 p.UpdateFrom(ref) 305 return p 306 } 307 308 // New creates a new MLPool2dOptions in the application heap. 309 func (p MLPool2dOptions) New() js.Ref { 310 return bindings.MLPool2dOptionsJSLoad( 311 js.Pointer(&p), js.True, 0, 312 ) 313 } 314 315 // UpdateFrom copies value of all fields of the heap object to p. 316 func (p *MLPool2dOptions) UpdateFrom(ref js.Ref) { 317 bindings.MLPool2dOptionsJSStore( 318 js.Pointer(p), ref, 319 ) 320 } 321 322 // Update writes all fields of the p to the heap object referenced by ref. 323 func (p *MLPool2dOptions) Update(ref js.Ref) { 324 bindings.MLPool2dOptionsJSLoad( 325 js.Pointer(p), js.False, ref, 326 ) 327 } 328 329 // FreeMembers frees fields with heap reference, if recursive is true 330 // free all heap references reachable from p. 331 func (p *MLPool2dOptions) FreeMembers(recursive bool) { 332 js.Free( 333 p.WindowDimensions.Ref(), 334 p.Padding.Ref(), 335 p.Strides.Ref(), 336 p.Dilations.Ref(), 337 p.OutputSizes.Ref(), 338 ) 339 p.WindowDimensions = p.WindowDimensions.FromRef(js.Undefined) 340 p.Padding = p.Padding.FromRef(js.Undefined) 341 p.Strides = p.Strides.FromRef(js.Undefined) 342 p.Dilations = p.Dilations.FromRef(js.Undefined) 343 p.OutputSizes = p.OutputSizes.FromRef(js.Undefined) 344 } 345 346 type MLLinearOptions struct { 347 // Alpha is "MLLinearOptions.alpha" 348 // 349 // Optional, defaults to 1. 350 // 351 // NOTE: FFI_USE_Alpha MUST be set to true to make this field effective. 352 Alpha float32 353 // Beta is "MLLinearOptions.beta" 354 // 355 // Optional, defaults to 0. 356 // 357 // NOTE: FFI_USE_Beta MUST be set to true to make this field effective. 358 Beta float32 359 360 FFI_USE_Alpha bool // for Alpha. 361 FFI_USE_Beta bool // for Beta. 362 363 FFI_USE bool 364 } 365 366 // FromRef calls UpdateFrom and returns a MLLinearOptions with all fields set. 367 func (p MLLinearOptions) FromRef(ref js.Ref) MLLinearOptions { 368 p.UpdateFrom(ref) 369 return p 370 } 371 372 // New creates a new MLLinearOptions in the application heap. 373 func (p MLLinearOptions) New() js.Ref { 374 return bindings.MLLinearOptionsJSLoad( 375 js.Pointer(&p), js.True, 0, 376 ) 377 } 378 379 // UpdateFrom copies value of all fields of the heap object to p. 380 func (p *MLLinearOptions) UpdateFrom(ref js.Ref) { 381 bindings.MLLinearOptionsJSStore( 382 js.Pointer(p), ref, 383 ) 384 } 385 386 // Update writes all fields of the p to the heap object referenced by ref. 387 func (p *MLLinearOptions) Update(ref js.Ref) { 388 bindings.MLLinearOptionsJSLoad( 389 js.Pointer(p), js.False, ref, 390 ) 391 } 392 393 // FreeMembers frees fields with heap reference, if recursive is true 394 // free all heap references reachable from p. 395 func (p *MLLinearOptions) FreeMembers(recursive bool) { 396 } 397 398 type MLLeakyReluOptions struct { 399 // Alpha is "MLLeakyReluOptions.alpha" 400 // 401 // Optional, defaults to 0.01. 402 // 403 // NOTE: FFI_USE_Alpha MUST be set to true to make this field effective. 404 Alpha float32 405 406 FFI_USE_Alpha bool // for Alpha. 407 408 FFI_USE bool 409 } 410 411 // FromRef calls UpdateFrom and returns a MLLeakyReluOptions with all fields set. 412 func (p MLLeakyReluOptions) FromRef(ref js.Ref) MLLeakyReluOptions { 413 p.UpdateFrom(ref) 414 return p 415 } 416 417 // New creates a new MLLeakyReluOptions in the application heap. 418 func (p MLLeakyReluOptions) New() js.Ref { 419 return bindings.MLLeakyReluOptionsJSLoad( 420 js.Pointer(&p), js.True, 0, 421 ) 422 } 423 424 // UpdateFrom copies value of all fields of the heap object to p. 425 func (p *MLLeakyReluOptions) UpdateFrom(ref js.Ref) { 426 bindings.MLLeakyReluOptionsJSStore( 427 js.Pointer(p), ref, 428 ) 429 } 430 431 // Update writes all fields of the p to the heap object referenced by ref. 432 func (p *MLLeakyReluOptions) Update(ref js.Ref) { 433 bindings.MLLeakyReluOptionsJSLoad( 434 js.Pointer(p), js.False, ref, 435 ) 436 } 437 438 // FreeMembers frees fields with heap reference, if recursive is true 439 // free all heap references reachable from p. 440 func (p *MLLeakyReluOptions) FreeMembers(recursive bool) { 441 } 442 443 type MLPaddingMode uint32 444 445 const ( 446 _ MLPaddingMode = iota 447 448 MLPaddingMode_CONSTANT 449 MLPaddingMode_EDGE 450 MLPaddingMode_REFLECTION 451 MLPaddingMode_SYMMETRIC 452 ) 453 454 func (MLPaddingMode) FromRef(str js.Ref) MLPaddingMode { 455 return MLPaddingMode(bindings.ConstOfMLPaddingMode(str)) 456 } 457 458 func (x MLPaddingMode) String() (string, bool) { 459 switch x { 460 case MLPaddingMode_CONSTANT: 461 return "constant", true 462 case MLPaddingMode_EDGE: 463 return "edge", true 464 case MLPaddingMode_REFLECTION: 465 return "reflection", true 466 case MLPaddingMode_SYMMETRIC: 467 return "symmetric", true 468 default: 469 return "", false 470 } 471 } 472 473 type MLPadOptions struct { 474 // Mode is "MLPadOptions.mode" 475 // 476 // Optional, defaults to "constant". 477 Mode MLPaddingMode 478 // Value is "MLPadOptions.value" 479 // 480 // Optional, defaults to 0. 481 // 482 // NOTE: FFI_USE_Value MUST be set to true to make this field effective. 483 Value float32 484 485 FFI_USE_Value bool // for Value. 486 487 FFI_USE bool 488 } 489 490 // FromRef calls UpdateFrom and returns a MLPadOptions with all fields set. 491 func (p MLPadOptions) FromRef(ref js.Ref) MLPadOptions { 492 p.UpdateFrom(ref) 493 return p 494 } 495 496 // New creates a new MLPadOptions in the application heap. 497 func (p MLPadOptions) New() js.Ref { 498 return bindings.MLPadOptionsJSLoad( 499 js.Pointer(&p), js.True, 0, 500 ) 501 } 502 503 // UpdateFrom copies value of all fields of the heap object to p. 504 func (p *MLPadOptions) UpdateFrom(ref js.Ref) { 505 bindings.MLPadOptionsJSStore( 506 js.Pointer(p), ref, 507 ) 508 } 509 510 // Update writes all fields of the p to the heap object referenced by ref. 511 func (p *MLPadOptions) Update(ref js.Ref) { 512 bindings.MLPadOptionsJSLoad( 513 js.Pointer(p), js.False, ref, 514 ) 515 } 516 517 // FreeMembers frees fields with heap reference, if recursive is true 518 // free all heap references reachable from p. 519 func (p *MLPadOptions) FreeMembers(recursive bool) { 520 } 521 522 type MLInstanceNormalizationOptions struct { 523 // Scale is "MLInstanceNormalizationOptions.scale" 524 // 525 // Optional 526 Scale MLOperand 527 // Bias is "MLInstanceNormalizationOptions.bias" 528 // 529 // Optional 530 Bias MLOperand 531 // Epsilon is "MLInstanceNormalizationOptions.epsilon" 532 // 533 // Optional, defaults to 1e-5. 534 // 535 // NOTE: FFI_USE_Epsilon MUST be set to true to make this field effective. 536 Epsilon float32 537 // Layout is "MLInstanceNormalizationOptions.layout" 538 // 539 // Optional, defaults to "nchw". 540 Layout MLInputOperandLayout 541 542 FFI_USE_Epsilon bool // for Epsilon. 543 544 FFI_USE bool 545 } 546 547 // FromRef calls UpdateFrom and returns a MLInstanceNormalizationOptions with all fields set. 548 func (p MLInstanceNormalizationOptions) FromRef(ref js.Ref) MLInstanceNormalizationOptions { 549 p.UpdateFrom(ref) 550 return p 551 } 552 553 // New creates a new MLInstanceNormalizationOptions in the application heap. 554 func (p MLInstanceNormalizationOptions) New() js.Ref { 555 return bindings.MLInstanceNormalizationOptionsJSLoad( 556 js.Pointer(&p), js.True, 0, 557 ) 558 } 559 560 // UpdateFrom copies value of all fields of the heap object to p. 561 func (p *MLInstanceNormalizationOptions) UpdateFrom(ref js.Ref) { 562 bindings.MLInstanceNormalizationOptionsJSStore( 563 js.Pointer(p), ref, 564 ) 565 } 566 567 // Update writes all fields of the p to the heap object referenced by ref. 568 func (p *MLInstanceNormalizationOptions) Update(ref js.Ref) { 569 bindings.MLInstanceNormalizationOptionsJSLoad( 570 js.Pointer(p), js.False, ref, 571 ) 572 } 573 574 // FreeMembers frees fields with heap reference, if recursive is true 575 // free all heap references reachable from p. 576 func (p *MLInstanceNormalizationOptions) FreeMembers(recursive bool) { 577 js.Free( 578 p.Scale.Ref(), 579 p.Bias.Ref(), 580 ) 581 p.Scale = p.Scale.FromRef(js.Undefined) 582 p.Bias = p.Bias.FromRef(js.Undefined) 583 } 584 585 type MLSoftplusOptions struct { 586 // Steepness is "MLSoftplusOptions.steepness" 587 // 588 // Optional, defaults to 1. 589 // 590 // NOTE: FFI_USE_Steepness MUST be set to true to make this field effective. 591 Steepness float32 592 593 FFI_USE_Steepness bool // for Steepness. 594 595 FFI_USE bool 596 } 597 598 // FromRef calls UpdateFrom and returns a MLSoftplusOptions with all fields set. 599 func (p MLSoftplusOptions) FromRef(ref js.Ref) MLSoftplusOptions { 600 p.UpdateFrom(ref) 601 return p 602 } 603 604 // New creates a new MLSoftplusOptions in the application heap. 605 func (p MLSoftplusOptions) New() js.Ref { 606 return bindings.MLSoftplusOptionsJSLoad( 607 js.Pointer(&p), js.True, 0, 608 ) 609 } 610 611 // UpdateFrom copies value of all fields of the heap object to p. 612 func (p *MLSoftplusOptions) UpdateFrom(ref js.Ref) { 613 bindings.MLSoftplusOptionsJSStore( 614 js.Pointer(p), ref, 615 ) 616 } 617 618 // Update writes all fields of the p to the heap object referenced by ref. 619 func (p *MLSoftplusOptions) Update(ref js.Ref) { 620 bindings.MLSoftplusOptionsJSLoad( 621 js.Pointer(p), js.False, ref, 622 ) 623 } 624 625 // FreeMembers frees fields with heap reference, if recursive is true 626 // free all heap references reachable from p. 627 func (p *MLSoftplusOptions) FreeMembers(recursive bool) { 628 } 629 630 type MLSplitOptions struct { 631 // Axis is "MLSplitOptions.axis" 632 // 633 // Optional, defaults to 0. 634 // 635 // NOTE: FFI_USE_Axis MUST be set to true to make this field effective. 636 Axis uint32 637 638 FFI_USE_Axis bool // for Axis. 639 640 FFI_USE bool 641 } 642 643 // FromRef calls UpdateFrom and returns a MLSplitOptions with all fields set. 644 func (p MLSplitOptions) FromRef(ref js.Ref) MLSplitOptions { 645 p.UpdateFrom(ref) 646 return p 647 } 648 649 // New creates a new MLSplitOptions in the application heap. 650 func (p MLSplitOptions) New() js.Ref { 651 return bindings.MLSplitOptionsJSLoad( 652 js.Pointer(&p), js.True, 0, 653 ) 654 } 655 656 // UpdateFrom copies value of all fields of the heap object to p. 657 func (p *MLSplitOptions) UpdateFrom(ref js.Ref) { 658 bindings.MLSplitOptionsJSStore( 659 js.Pointer(p), ref, 660 ) 661 } 662 663 // Update writes all fields of the p to the heap object referenced by ref. 664 func (p *MLSplitOptions) Update(ref js.Ref) { 665 bindings.MLSplitOptionsJSLoad( 666 js.Pointer(p), js.False, ref, 667 ) 668 } 669 670 // FreeMembers frees fields with heap reference, if recursive is true 671 // free all heap references reachable from p. 672 func (p *MLSplitOptions) FreeMembers(recursive bool) { 673 } 674 675 type MLInterpolationMode uint32 676 677 const ( 678 _ MLInterpolationMode = iota 679 680 MLInterpolationMode_NEAREST_NEIGHBOR 681 MLInterpolationMode_LINEAR 682 ) 683 684 func (MLInterpolationMode) FromRef(str js.Ref) MLInterpolationMode { 685 return MLInterpolationMode(bindings.ConstOfMLInterpolationMode(str)) 686 } 687 688 func (x MLInterpolationMode) String() (string, bool) { 689 switch x { 690 case MLInterpolationMode_NEAREST_NEIGHBOR: 691 return "nearest-neighbor", true 692 case MLInterpolationMode_LINEAR: 693 return "linear", true 694 default: 695 return "", false 696 } 697 } 698 699 type MLResample2dOptions struct { 700 // Mode is "MLResample2dOptions.mode" 701 // 702 // Optional, defaults to "nearest-neighbor". 703 Mode MLInterpolationMode 704 // Scales is "MLResample2dOptions.scales" 705 // 706 // Optional 707 Scales js.Array[float32] 708 // Sizes is "MLResample2dOptions.sizes" 709 // 710 // Optional 711 Sizes js.Array[uint32] 712 // Axes is "MLResample2dOptions.axes" 713 // 714 // Optional 715 Axes js.Array[uint32] 716 717 FFI_USE bool 718 } 719 720 // FromRef calls UpdateFrom and returns a MLResample2dOptions with all fields set. 721 func (p MLResample2dOptions) FromRef(ref js.Ref) MLResample2dOptions { 722 p.UpdateFrom(ref) 723 return p 724 } 725 726 // New creates a new MLResample2dOptions in the application heap. 727 func (p MLResample2dOptions) New() js.Ref { 728 return bindings.MLResample2dOptionsJSLoad( 729 js.Pointer(&p), js.True, 0, 730 ) 731 } 732 733 // UpdateFrom copies value of all fields of the heap object to p. 734 func (p *MLResample2dOptions) UpdateFrom(ref js.Ref) { 735 bindings.MLResample2dOptionsJSStore( 736 js.Pointer(p), ref, 737 ) 738 } 739 740 // Update writes all fields of the p to the heap object referenced by ref. 741 func (p *MLResample2dOptions) Update(ref js.Ref) { 742 bindings.MLResample2dOptionsJSLoad( 743 js.Pointer(p), js.False, ref, 744 ) 745 } 746 747 // FreeMembers frees fields with heap reference, if recursive is true 748 // free all heap references reachable from p. 749 func (p *MLResample2dOptions) FreeMembers(recursive bool) { 750 js.Free( 751 p.Scales.Ref(), 752 p.Sizes.Ref(), 753 p.Axes.Ref(), 754 ) 755 p.Scales = p.Scales.FromRef(js.Undefined) 756 p.Sizes = p.Sizes.FromRef(js.Undefined) 757 p.Axes = p.Axes.FromRef(js.Undefined) 758 } 759 760 type MLReduceOptions struct { 761 // Axes is "MLReduceOptions.axes" 762 // 763 // Optional, defaults to null. 764 Axes js.Array[uint32] 765 // KeepDimensions is "MLReduceOptions.keepDimensions" 766 // 767 // Optional, defaults to false. 768 // 769 // NOTE: FFI_USE_KeepDimensions MUST be set to true to make this field effective. 770 KeepDimensions bool 771 772 FFI_USE_KeepDimensions bool // for KeepDimensions. 773 774 FFI_USE bool 775 } 776 777 // FromRef calls UpdateFrom and returns a MLReduceOptions with all fields set. 778 func (p MLReduceOptions) FromRef(ref js.Ref) MLReduceOptions { 779 p.UpdateFrom(ref) 780 return p 781 } 782 783 // New creates a new MLReduceOptions in the application heap. 784 func (p MLReduceOptions) New() js.Ref { 785 return bindings.MLReduceOptionsJSLoad( 786 js.Pointer(&p), js.True, 0, 787 ) 788 } 789 790 // UpdateFrom copies value of all fields of the heap object to p. 791 func (p *MLReduceOptions) UpdateFrom(ref js.Ref) { 792 bindings.MLReduceOptionsJSStore( 793 js.Pointer(p), ref, 794 ) 795 } 796 797 // Update writes all fields of the p to the heap object referenced by ref. 798 func (p *MLReduceOptions) Update(ref js.Ref) { 799 bindings.MLReduceOptionsJSLoad( 800 js.Pointer(p), js.False, ref, 801 ) 802 } 803 804 // FreeMembers frees fields with heap reference, if recursive is true 805 // free all heap references reachable from p. 806 func (p *MLReduceOptions) FreeMembers(recursive bool) { 807 js.Free( 808 p.Axes.Ref(), 809 ) 810 p.Axes = p.Axes.FromRef(js.Undefined) 811 } 812 813 type MLRecurrentNetworkDirection uint32 814 815 const ( 816 _ MLRecurrentNetworkDirection = iota 817 818 MLRecurrentNetworkDirection_FORWARD 819 MLRecurrentNetworkDirection_BACKWARD 820 MLRecurrentNetworkDirection_BOTH 821 ) 822 823 func (MLRecurrentNetworkDirection) FromRef(str js.Ref) MLRecurrentNetworkDirection { 824 return MLRecurrentNetworkDirection(bindings.ConstOfMLRecurrentNetworkDirection(str)) 825 } 826 827 func (x MLRecurrentNetworkDirection) String() (string, bool) { 828 switch x { 829 case MLRecurrentNetworkDirection_FORWARD: 830 return "forward", true 831 case MLRecurrentNetworkDirection_BACKWARD: 832 return "backward", true 833 case MLRecurrentNetworkDirection_BOTH: 834 return "both", true 835 default: 836 return "", false 837 } 838 } 839 840 type MLLstmWeightLayout uint32 841 842 const ( 843 _ MLLstmWeightLayout = iota 844 845 MLLstmWeightLayout_IOFG 846 MLLstmWeightLayout_IFGO 847 ) 848 849 func (MLLstmWeightLayout) FromRef(str js.Ref) MLLstmWeightLayout { 850 return MLLstmWeightLayout(bindings.ConstOfMLLstmWeightLayout(str)) 851 } 852 853 func (x MLLstmWeightLayout) String() (string, bool) { 854 switch x { 855 case MLLstmWeightLayout_IOFG: 856 return "iofg", true 857 case MLLstmWeightLayout_IFGO: 858 return "ifgo", true 859 default: 860 return "", false 861 } 862 } 863 864 type MLLstmOptions struct { 865 // Bias is "MLLstmOptions.bias" 866 // 867 // Optional 868 Bias MLOperand 869 // RecurrentBias is "MLLstmOptions.recurrentBias" 870 // 871 // Optional 872 RecurrentBias MLOperand 873 // PeepholeWeight is "MLLstmOptions.peepholeWeight" 874 // 875 // Optional 876 PeepholeWeight MLOperand 877 // InitialHiddenState is "MLLstmOptions.initialHiddenState" 878 // 879 // Optional 880 InitialHiddenState MLOperand 881 // InitialCellState is "MLLstmOptions.initialCellState" 882 // 883 // Optional 884 InitialCellState MLOperand 885 // ReturnSequence is "MLLstmOptions.returnSequence" 886 // 887 // Optional, defaults to false. 888 // 889 // NOTE: FFI_USE_ReturnSequence MUST be set to true to make this field effective. 890 ReturnSequence bool 891 // Direction is "MLLstmOptions.direction" 892 // 893 // Optional, defaults to "forward". 894 Direction MLRecurrentNetworkDirection 895 // Layout is "MLLstmOptions.layout" 896 // 897 // Optional, defaults to "iofg". 898 Layout MLLstmWeightLayout 899 // Activations is "MLLstmOptions.activations" 900 // 901 // Optional 902 Activations js.Array[MLActivation] 903 904 FFI_USE_ReturnSequence bool // for ReturnSequence. 905 906 FFI_USE bool 907 } 908 909 // FromRef calls UpdateFrom and returns a MLLstmOptions with all fields set. 910 func (p MLLstmOptions) FromRef(ref js.Ref) MLLstmOptions { 911 p.UpdateFrom(ref) 912 return p 913 } 914 915 // New creates a new MLLstmOptions in the application heap. 916 func (p MLLstmOptions) New() js.Ref { 917 return bindings.MLLstmOptionsJSLoad( 918 js.Pointer(&p), js.True, 0, 919 ) 920 } 921 922 // UpdateFrom copies value of all fields of the heap object to p. 923 func (p *MLLstmOptions) UpdateFrom(ref js.Ref) { 924 bindings.MLLstmOptionsJSStore( 925 js.Pointer(p), ref, 926 ) 927 } 928 929 // Update writes all fields of the p to the heap object referenced by ref. 930 func (p *MLLstmOptions) Update(ref js.Ref) { 931 bindings.MLLstmOptionsJSLoad( 932 js.Pointer(p), js.False, ref, 933 ) 934 } 935 936 // FreeMembers frees fields with heap reference, if recursive is true 937 // free all heap references reachable from p. 938 func (p *MLLstmOptions) FreeMembers(recursive bool) { 939 js.Free( 940 p.Bias.Ref(), 941 p.RecurrentBias.Ref(), 942 p.PeepholeWeight.Ref(), 943 p.InitialHiddenState.Ref(), 944 p.InitialCellState.Ref(), 945 p.Activations.Ref(), 946 ) 947 p.Bias = p.Bias.FromRef(js.Undefined) 948 p.RecurrentBias = p.RecurrentBias.FromRef(js.Undefined) 949 p.PeepholeWeight = p.PeepholeWeight.FromRef(js.Undefined) 950 p.InitialHiddenState = p.InitialHiddenState.FromRef(js.Undefined) 951 p.InitialCellState = p.InitialCellState.FromRef(js.Undefined) 952 p.Activations = p.Activations.FromRef(js.Undefined) 953 } 954 955 type MLSqueezeOptions struct { 956 // Axes is "MLSqueezeOptions.axes" 957 // 958 // Optional 959 Axes js.Array[uint32] 960 961 FFI_USE bool 962 } 963 964 // FromRef calls UpdateFrom and returns a MLSqueezeOptions with all fields set. 965 func (p MLSqueezeOptions) FromRef(ref js.Ref) MLSqueezeOptions { 966 p.UpdateFrom(ref) 967 return p 968 } 969 970 // New creates a new MLSqueezeOptions in the application heap. 971 func (p MLSqueezeOptions) New() js.Ref { 972 return bindings.MLSqueezeOptionsJSLoad( 973 js.Pointer(&p), js.True, 0, 974 ) 975 } 976 977 // UpdateFrom copies value of all fields of the heap object to p. 978 func (p *MLSqueezeOptions) UpdateFrom(ref js.Ref) { 979 bindings.MLSqueezeOptionsJSStore( 980 js.Pointer(p), ref, 981 ) 982 } 983 984 // Update writes all fields of the p to the heap object referenced by ref. 985 func (p *MLSqueezeOptions) Update(ref js.Ref) { 986 bindings.MLSqueezeOptionsJSLoad( 987 js.Pointer(p), js.False, ref, 988 ) 989 } 990 991 // FreeMembers frees fields with heap reference, if recursive is true 992 // free all heap references reachable from p. 993 func (p *MLSqueezeOptions) FreeMembers(recursive bool) { 994 js.Free( 995 p.Axes.Ref(), 996 ) 997 p.Axes = p.Axes.FromRef(js.Undefined) 998 } 999 1000 type MLGruOptions struct { 1001 // Bias is "MLGruOptions.bias" 1002 // 1003 // Optional 1004 Bias MLOperand 1005 // RecurrentBias is "MLGruOptions.recurrentBias" 1006 // 1007 // Optional 1008 RecurrentBias MLOperand 1009 // InitialHiddenState is "MLGruOptions.initialHiddenState" 1010 // 1011 // Optional 1012 InitialHiddenState MLOperand 1013 // ResetAfter is "MLGruOptions.resetAfter" 1014 // 1015 // Optional, defaults to true. 1016 // 1017 // NOTE: FFI_USE_ResetAfter MUST be set to true to make this field effective. 1018 ResetAfter bool 1019 // ReturnSequence is "MLGruOptions.returnSequence" 1020 // 1021 // Optional, defaults to false. 1022 // 1023 // NOTE: FFI_USE_ReturnSequence MUST be set to true to make this field effective. 1024 ReturnSequence bool 1025 // Direction is "MLGruOptions.direction" 1026 // 1027 // Optional, defaults to "forward". 1028 Direction MLRecurrentNetworkDirection 1029 // Layout is "MLGruOptions.layout" 1030 // 1031 // Optional, defaults to "zrn". 1032 Layout MLGruWeightLayout 1033 // Activations is "MLGruOptions.activations" 1034 // 1035 // Optional 1036 Activations js.Array[MLActivation] 1037 1038 FFI_USE_ResetAfter bool // for ResetAfter. 1039 FFI_USE_ReturnSequence bool // for ReturnSequence. 1040 1041 FFI_USE bool 1042 } 1043 1044 // FromRef calls UpdateFrom and returns a MLGruOptions with all fields set. 1045 func (p MLGruOptions) FromRef(ref js.Ref) MLGruOptions { 1046 p.UpdateFrom(ref) 1047 return p 1048 } 1049 1050 // New creates a new MLGruOptions in the application heap. 1051 func (p MLGruOptions) New() js.Ref { 1052 return bindings.MLGruOptionsJSLoad( 1053 js.Pointer(&p), js.True, 0, 1054 ) 1055 } 1056 1057 // UpdateFrom copies value of all fields of the heap object to p. 1058 func (p *MLGruOptions) UpdateFrom(ref js.Ref) { 1059 bindings.MLGruOptionsJSStore( 1060 js.Pointer(p), ref, 1061 ) 1062 } 1063 1064 // Update writes all fields of the p to the heap object referenced by ref. 1065 func (p *MLGruOptions) Update(ref js.Ref) { 1066 bindings.MLGruOptionsJSLoad( 1067 js.Pointer(p), js.False, ref, 1068 ) 1069 } 1070 1071 // FreeMembers frees fields with heap reference, if recursive is true 1072 // free all heap references reachable from p. 1073 func (p *MLGruOptions) FreeMembers(recursive bool) { 1074 js.Free( 1075 p.Bias.Ref(), 1076 p.RecurrentBias.Ref(), 1077 p.InitialHiddenState.Ref(), 1078 p.Activations.Ref(), 1079 ) 1080 p.Bias = p.Bias.FromRef(js.Undefined) 1081 p.RecurrentBias = p.RecurrentBias.FromRef(js.Undefined) 1082 p.InitialHiddenState = p.InitialHiddenState.FromRef(js.Undefined) 1083 p.Activations = p.Activations.FromRef(js.Undefined) 1084 } 1085 1086 type MLTransposeOptions struct { 1087 // Permutation is "MLTransposeOptions.permutation" 1088 // 1089 // Optional 1090 Permutation js.Array[uint32] 1091 1092 FFI_USE bool 1093 } 1094 1095 // FromRef calls UpdateFrom and returns a MLTransposeOptions with all fields set. 1096 func (p MLTransposeOptions) FromRef(ref js.Ref) MLTransposeOptions { 1097 p.UpdateFrom(ref) 1098 return p 1099 } 1100 1101 // New creates a new MLTransposeOptions in the application heap. 1102 func (p MLTransposeOptions) New() js.Ref { 1103 return bindings.MLTransposeOptionsJSLoad( 1104 js.Pointer(&p), js.True, 0, 1105 ) 1106 } 1107 1108 // UpdateFrom copies value of all fields of the heap object to p. 1109 func (p *MLTransposeOptions) UpdateFrom(ref js.Ref) { 1110 bindings.MLTransposeOptionsJSStore( 1111 js.Pointer(p), ref, 1112 ) 1113 } 1114 1115 // Update writes all fields of the p to the heap object referenced by ref. 1116 func (p *MLTransposeOptions) Update(ref js.Ref) { 1117 bindings.MLTransposeOptionsJSLoad( 1118 js.Pointer(p), js.False, ref, 1119 ) 1120 } 1121 1122 // FreeMembers frees fields with heap reference, if recursive is true 1123 // free all heap references reachable from p. 1124 func (p *MLTransposeOptions) FreeMembers(recursive bool) { 1125 js.Free( 1126 p.Permutation.Ref(), 1127 ) 1128 p.Permutation = p.Permutation.FromRef(js.Undefined) 1129 } 1130 1131 type MLLstmCellOptions struct { 1132 // Bias is "MLLstmCellOptions.bias" 1133 // 1134 // Optional 1135 Bias MLOperand 1136 // RecurrentBias is "MLLstmCellOptions.recurrentBias" 1137 // 1138 // Optional 1139 RecurrentBias MLOperand 1140 // PeepholeWeight is "MLLstmCellOptions.peepholeWeight" 1141 // 1142 // Optional 1143 PeepholeWeight MLOperand 1144 // Layout is "MLLstmCellOptions.layout" 1145 // 1146 // Optional, defaults to "iofg". 1147 Layout MLLstmWeightLayout 1148 // Activations is "MLLstmCellOptions.activations" 1149 // 1150 // Optional 1151 Activations js.Array[MLActivation] 1152 1153 FFI_USE bool 1154 } 1155 1156 // FromRef calls UpdateFrom and returns a MLLstmCellOptions with all fields set. 1157 func (p MLLstmCellOptions) FromRef(ref js.Ref) MLLstmCellOptions { 1158 p.UpdateFrom(ref) 1159 return p 1160 } 1161 1162 // New creates a new MLLstmCellOptions in the application heap. 1163 func (p MLLstmCellOptions) New() js.Ref { 1164 return bindings.MLLstmCellOptionsJSLoad( 1165 js.Pointer(&p), js.True, 0, 1166 ) 1167 } 1168 1169 // UpdateFrom copies value of all fields of the heap object to p. 1170 func (p *MLLstmCellOptions) UpdateFrom(ref js.Ref) { 1171 bindings.MLLstmCellOptionsJSStore( 1172 js.Pointer(p), ref, 1173 ) 1174 } 1175 1176 // Update writes all fields of the p to the heap object referenced by ref. 1177 func (p *MLLstmCellOptions) Update(ref js.Ref) { 1178 bindings.MLLstmCellOptionsJSLoad( 1179 js.Pointer(p), js.False, ref, 1180 ) 1181 } 1182 1183 // FreeMembers frees fields with heap reference, if recursive is true 1184 // free all heap references reachable from p. 1185 func (p *MLLstmCellOptions) FreeMembers(recursive bool) { 1186 js.Free( 1187 p.Bias.Ref(), 1188 p.RecurrentBias.Ref(), 1189 p.PeepholeWeight.Ref(), 1190 p.Activations.Ref(), 1191 ) 1192 p.Bias = p.Bias.FromRef(js.Undefined) 1193 p.RecurrentBias = p.RecurrentBias.FromRef(js.Undefined) 1194 p.PeepholeWeight = p.PeepholeWeight.FromRef(js.Undefined) 1195 p.Activations = p.Activations.FromRef(js.Undefined) 1196 } 1197 1198 func NewMLGraphBuilder(context MLContext) (ret MLGraphBuilder) { 1199 ret.ref = bindings.NewMLGraphBuilderByMLGraphBuilder( 1200 context.Ref()) 1201 return 1202 } 1203 1204 type MLGraphBuilder struct { 1205 ref js.Ref 1206 } 1207 1208 func (this MLGraphBuilder) Once() MLGraphBuilder { 1209 this.ref.Once() 1210 return this 1211 } 1212 1213 func (this MLGraphBuilder) Ref() js.Ref { 1214 return this.ref 1215 } 1216 1217 func (this MLGraphBuilder) FromRef(ref js.Ref) MLGraphBuilder { 1218 this.ref = ref 1219 return this 1220 } 1221 1222 func (this MLGraphBuilder) Free() { 1223 this.ref.Free() 1224 } 1225 1226 // HasFuncInput returns true if the method "MLGraphBuilder.input" exists. 1227 func (this MLGraphBuilder) HasFuncInput() bool { 1228 return js.True == bindings.HasFuncMLGraphBuilderInput( 1229 this.ref, 1230 ) 1231 } 1232 1233 // FuncInput returns the method "MLGraphBuilder.input". 1234 func (this MLGraphBuilder) FuncInput() (fn js.Func[func(name js.String, descriptor MLOperandDescriptor) MLOperand]) { 1235 bindings.FuncMLGraphBuilderInput( 1236 this.ref, js.Pointer(&fn), 1237 ) 1238 return 1239 } 1240 1241 // Input calls the method "MLGraphBuilder.input". 1242 func (this MLGraphBuilder) Input(name js.String, descriptor MLOperandDescriptor) (ret MLOperand) { 1243 bindings.CallMLGraphBuilderInput( 1244 this.ref, js.Pointer(&ret), 1245 name.Ref(), 1246 js.Pointer(&descriptor), 1247 ) 1248 1249 return 1250 } 1251 1252 // TryInput calls the method "MLGraphBuilder.input" 1253 // in a try/catch block and returns (_, err, ok = false) when it went through 1254 // the catch clause. 1255 func (this MLGraphBuilder) TryInput(name js.String, descriptor MLOperandDescriptor) (ret MLOperand, exception js.Any, ok bool) { 1256 ok = js.True == bindings.TryMLGraphBuilderInput( 1257 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1258 name.Ref(), 1259 js.Pointer(&descriptor), 1260 ) 1261 1262 return 1263 } 1264 1265 // HasFuncConstant returns true if the method "MLGraphBuilder.constant" exists. 1266 func (this MLGraphBuilder) HasFuncConstant() bool { 1267 return js.True == bindings.HasFuncMLGraphBuilderConstant( 1268 this.ref, 1269 ) 1270 } 1271 1272 // FuncConstant returns the method "MLGraphBuilder.constant". 1273 func (this MLGraphBuilder) FuncConstant() (fn js.Func[func(descriptor MLOperandDescriptor, bufferView MLBufferView) MLOperand]) { 1274 bindings.FuncMLGraphBuilderConstant( 1275 this.ref, js.Pointer(&fn), 1276 ) 1277 return 1278 } 1279 1280 // Constant calls the method "MLGraphBuilder.constant". 1281 func (this MLGraphBuilder) Constant(descriptor MLOperandDescriptor, bufferView MLBufferView) (ret MLOperand) { 1282 bindings.CallMLGraphBuilderConstant( 1283 this.ref, js.Pointer(&ret), 1284 js.Pointer(&descriptor), 1285 bufferView.Ref(), 1286 ) 1287 1288 return 1289 } 1290 1291 // TryConstant calls the method "MLGraphBuilder.constant" 1292 // in a try/catch block and returns (_, err, ok = false) when it went through 1293 // the catch clause. 1294 func (this MLGraphBuilder) TryConstant(descriptor MLOperandDescriptor, bufferView MLBufferView) (ret MLOperand, exception js.Any, ok bool) { 1295 ok = js.True == bindings.TryMLGraphBuilderConstant( 1296 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1297 js.Pointer(&descriptor), 1298 bufferView.Ref(), 1299 ) 1300 1301 return 1302 } 1303 1304 // HasFuncConstant1 returns true if the method "MLGraphBuilder.constant" exists. 1305 func (this MLGraphBuilder) HasFuncConstant1() bool { 1306 return js.True == bindings.HasFuncMLGraphBuilderConstant1( 1307 this.ref, 1308 ) 1309 } 1310 1311 // FuncConstant1 returns the method "MLGraphBuilder.constant". 1312 func (this MLGraphBuilder) FuncConstant1() (fn js.Func[func(value float64, typ MLOperandType) MLOperand]) { 1313 bindings.FuncMLGraphBuilderConstant1( 1314 this.ref, js.Pointer(&fn), 1315 ) 1316 return 1317 } 1318 1319 // Constant1 calls the method "MLGraphBuilder.constant". 1320 func (this MLGraphBuilder) Constant1(value float64, typ MLOperandType) (ret MLOperand) { 1321 bindings.CallMLGraphBuilderConstant1( 1322 this.ref, js.Pointer(&ret), 1323 float64(value), 1324 uint32(typ), 1325 ) 1326 1327 return 1328 } 1329 1330 // TryConstant1 calls the method "MLGraphBuilder.constant" 1331 // in a try/catch block and returns (_, err, ok = false) when it went through 1332 // the catch clause. 1333 func (this MLGraphBuilder) TryConstant1(value float64, typ MLOperandType) (ret MLOperand, exception js.Any, ok bool) { 1334 ok = js.True == bindings.TryMLGraphBuilderConstant1( 1335 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1336 float64(value), 1337 uint32(typ), 1338 ) 1339 1340 return 1341 } 1342 1343 // HasFuncConstant2 returns true if the method "MLGraphBuilder.constant" exists. 1344 func (this MLGraphBuilder) HasFuncConstant2() bool { 1345 return js.True == bindings.HasFuncMLGraphBuilderConstant2( 1346 this.ref, 1347 ) 1348 } 1349 1350 // FuncConstant2 returns the method "MLGraphBuilder.constant". 1351 func (this MLGraphBuilder) FuncConstant2() (fn js.Func[func(value float64) MLOperand]) { 1352 bindings.FuncMLGraphBuilderConstant2( 1353 this.ref, js.Pointer(&fn), 1354 ) 1355 return 1356 } 1357 1358 // Constant2 calls the method "MLGraphBuilder.constant". 1359 func (this MLGraphBuilder) Constant2(value float64) (ret MLOperand) { 1360 bindings.CallMLGraphBuilderConstant2( 1361 this.ref, js.Pointer(&ret), 1362 float64(value), 1363 ) 1364 1365 return 1366 } 1367 1368 // TryConstant2 calls the method "MLGraphBuilder.constant" 1369 // in a try/catch block and returns (_, err, ok = false) when it went through 1370 // the catch clause. 1371 func (this MLGraphBuilder) TryConstant2(value float64) (ret MLOperand, exception js.Any, ok bool) { 1372 ok = js.True == bindings.TryMLGraphBuilderConstant2( 1373 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1374 float64(value), 1375 ) 1376 1377 return 1378 } 1379 1380 // HasFuncBuild returns true if the method "MLGraphBuilder.build" exists. 1381 func (this MLGraphBuilder) HasFuncBuild() bool { 1382 return js.True == bindings.HasFuncMLGraphBuilderBuild( 1383 this.ref, 1384 ) 1385 } 1386 1387 // FuncBuild returns the method "MLGraphBuilder.build". 1388 func (this MLGraphBuilder) FuncBuild() (fn js.Func[func(outputs MLNamedOperands) js.Promise[MLGraph]]) { 1389 bindings.FuncMLGraphBuilderBuild( 1390 this.ref, js.Pointer(&fn), 1391 ) 1392 return 1393 } 1394 1395 // Build calls the method "MLGraphBuilder.build". 1396 func (this MLGraphBuilder) Build(outputs MLNamedOperands) (ret js.Promise[MLGraph]) { 1397 bindings.CallMLGraphBuilderBuild( 1398 this.ref, js.Pointer(&ret), 1399 outputs.Ref(), 1400 ) 1401 1402 return 1403 } 1404 1405 // TryBuild calls the method "MLGraphBuilder.build" 1406 // in a try/catch block and returns (_, err, ok = false) when it went through 1407 // the catch clause. 1408 func (this MLGraphBuilder) TryBuild(outputs MLNamedOperands) (ret js.Promise[MLGraph], exception js.Any, ok bool) { 1409 ok = js.True == bindings.TryMLGraphBuilderBuild( 1410 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1411 outputs.Ref(), 1412 ) 1413 1414 return 1415 } 1416 1417 // HasFuncBuildSync returns true if the method "MLGraphBuilder.buildSync" exists. 1418 func (this MLGraphBuilder) HasFuncBuildSync() bool { 1419 return js.True == bindings.HasFuncMLGraphBuilderBuildSync( 1420 this.ref, 1421 ) 1422 } 1423 1424 // FuncBuildSync returns the method "MLGraphBuilder.buildSync". 1425 func (this MLGraphBuilder) FuncBuildSync() (fn js.Func[func(outputs MLNamedOperands) MLGraph]) { 1426 bindings.FuncMLGraphBuilderBuildSync( 1427 this.ref, js.Pointer(&fn), 1428 ) 1429 return 1430 } 1431 1432 // BuildSync calls the method "MLGraphBuilder.buildSync". 1433 func (this MLGraphBuilder) BuildSync(outputs MLNamedOperands) (ret MLGraph) { 1434 bindings.CallMLGraphBuilderBuildSync( 1435 this.ref, js.Pointer(&ret), 1436 outputs.Ref(), 1437 ) 1438 1439 return 1440 } 1441 1442 // TryBuildSync calls the method "MLGraphBuilder.buildSync" 1443 // in a try/catch block and returns (_, err, ok = false) when it went through 1444 // the catch clause. 1445 func (this MLGraphBuilder) TryBuildSync(outputs MLNamedOperands) (ret MLGraph, exception js.Any, ok bool) { 1446 ok = js.True == bindings.TryMLGraphBuilderBuildSync( 1447 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1448 outputs.Ref(), 1449 ) 1450 1451 return 1452 } 1453 1454 // HasFuncHardSigmoid returns true if the method "MLGraphBuilder.hardSigmoid" exists. 1455 func (this MLGraphBuilder) HasFuncHardSigmoid() bool { 1456 return js.True == bindings.HasFuncMLGraphBuilderHardSigmoid( 1457 this.ref, 1458 ) 1459 } 1460 1461 // FuncHardSigmoid returns the method "MLGraphBuilder.hardSigmoid". 1462 func (this MLGraphBuilder) FuncHardSigmoid() (fn js.Func[func(input MLOperand, options MLHardSigmoidOptions) MLOperand]) { 1463 bindings.FuncMLGraphBuilderHardSigmoid( 1464 this.ref, js.Pointer(&fn), 1465 ) 1466 return 1467 } 1468 1469 // HardSigmoid calls the method "MLGraphBuilder.hardSigmoid". 1470 func (this MLGraphBuilder) HardSigmoid(input MLOperand, options MLHardSigmoidOptions) (ret MLOperand) { 1471 bindings.CallMLGraphBuilderHardSigmoid( 1472 this.ref, js.Pointer(&ret), 1473 input.Ref(), 1474 js.Pointer(&options), 1475 ) 1476 1477 return 1478 } 1479 1480 // TryHardSigmoid calls the method "MLGraphBuilder.hardSigmoid" 1481 // in a try/catch block and returns (_, err, ok = false) when it went through 1482 // the catch clause. 1483 func (this MLGraphBuilder) TryHardSigmoid(input MLOperand, options MLHardSigmoidOptions) (ret MLOperand, exception js.Any, ok bool) { 1484 ok = js.True == bindings.TryMLGraphBuilderHardSigmoid( 1485 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1486 input.Ref(), 1487 js.Pointer(&options), 1488 ) 1489 1490 return 1491 } 1492 1493 // HasFuncHardSigmoid1 returns true if the method "MLGraphBuilder.hardSigmoid" exists. 1494 func (this MLGraphBuilder) HasFuncHardSigmoid1() bool { 1495 return js.True == bindings.HasFuncMLGraphBuilderHardSigmoid1( 1496 this.ref, 1497 ) 1498 } 1499 1500 // FuncHardSigmoid1 returns the method "MLGraphBuilder.hardSigmoid". 1501 func (this MLGraphBuilder) FuncHardSigmoid1() (fn js.Func[func(input MLOperand) MLOperand]) { 1502 bindings.FuncMLGraphBuilderHardSigmoid1( 1503 this.ref, js.Pointer(&fn), 1504 ) 1505 return 1506 } 1507 1508 // HardSigmoid1 calls the method "MLGraphBuilder.hardSigmoid". 1509 func (this MLGraphBuilder) HardSigmoid1(input MLOperand) (ret MLOperand) { 1510 bindings.CallMLGraphBuilderHardSigmoid1( 1511 this.ref, js.Pointer(&ret), 1512 input.Ref(), 1513 ) 1514 1515 return 1516 } 1517 1518 // TryHardSigmoid1 calls the method "MLGraphBuilder.hardSigmoid" 1519 // in a try/catch block and returns (_, err, ok = false) when it went through 1520 // the catch clause. 1521 func (this MLGraphBuilder) TryHardSigmoid1(input MLOperand) (ret MLOperand, exception js.Any, ok bool) { 1522 ok = js.True == bindings.TryMLGraphBuilderHardSigmoid1( 1523 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1524 input.Ref(), 1525 ) 1526 1527 return 1528 } 1529 1530 // HasFuncHardSigmoid2 returns true if the method "MLGraphBuilder.hardSigmoid" exists. 1531 func (this MLGraphBuilder) HasFuncHardSigmoid2() bool { 1532 return js.True == bindings.HasFuncMLGraphBuilderHardSigmoid2( 1533 this.ref, 1534 ) 1535 } 1536 1537 // FuncHardSigmoid2 returns the method "MLGraphBuilder.hardSigmoid". 1538 func (this MLGraphBuilder) FuncHardSigmoid2() (fn js.Func[func(options MLHardSigmoidOptions) MLActivation]) { 1539 bindings.FuncMLGraphBuilderHardSigmoid2( 1540 this.ref, js.Pointer(&fn), 1541 ) 1542 return 1543 } 1544 1545 // HardSigmoid2 calls the method "MLGraphBuilder.hardSigmoid". 1546 func (this MLGraphBuilder) HardSigmoid2(options MLHardSigmoidOptions) (ret MLActivation) { 1547 bindings.CallMLGraphBuilderHardSigmoid2( 1548 this.ref, js.Pointer(&ret), 1549 js.Pointer(&options), 1550 ) 1551 1552 return 1553 } 1554 1555 // TryHardSigmoid2 calls the method "MLGraphBuilder.hardSigmoid" 1556 // in a try/catch block and returns (_, err, ok = false) when it went through 1557 // the catch clause. 1558 func (this MLGraphBuilder) TryHardSigmoid2(options MLHardSigmoidOptions) (ret MLActivation, exception js.Any, ok bool) { 1559 ok = js.True == bindings.TryMLGraphBuilderHardSigmoid2( 1560 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1561 js.Pointer(&options), 1562 ) 1563 1564 return 1565 } 1566 1567 // HasFuncHardSigmoid3 returns true if the method "MLGraphBuilder.hardSigmoid" exists. 1568 func (this MLGraphBuilder) HasFuncHardSigmoid3() bool { 1569 return js.True == bindings.HasFuncMLGraphBuilderHardSigmoid3( 1570 this.ref, 1571 ) 1572 } 1573 1574 // FuncHardSigmoid3 returns the method "MLGraphBuilder.hardSigmoid". 1575 func (this MLGraphBuilder) FuncHardSigmoid3() (fn js.Func[func() MLActivation]) { 1576 bindings.FuncMLGraphBuilderHardSigmoid3( 1577 this.ref, js.Pointer(&fn), 1578 ) 1579 return 1580 } 1581 1582 // HardSigmoid3 calls the method "MLGraphBuilder.hardSigmoid". 1583 func (this MLGraphBuilder) HardSigmoid3() (ret MLActivation) { 1584 bindings.CallMLGraphBuilderHardSigmoid3( 1585 this.ref, js.Pointer(&ret), 1586 ) 1587 1588 return 1589 } 1590 1591 // TryHardSigmoid3 calls the method "MLGraphBuilder.hardSigmoid" 1592 // in a try/catch block and returns (_, err, ok = false) when it went through 1593 // the catch clause. 1594 func (this MLGraphBuilder) TryHardSigmoid3() (ret MLActivation, exception js.Any, ok bool) { 1595 ok = js.True == bindings.TryMLGraphBuilderHardSigmoid3( 1596 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1597 ) 1598 1599 return 1600 } 1601 1602 // HasFuncGruCell returns true if the method "MLGraphBuilder.gruCell" exists. 1603 func (this MLGraphBuilder) HasFuncGruCell() bool { 1604 return js.True == bindings.HasFuncMLGraphBuilderGruCell( 1605 this.ref, 1606 ) 1607 } 1608 1609 // FuncGruCell returns the method "MLGraphBuilder.gruCell". 1610 func (this MLGraphBuilder) FuncGruCell() (fn js.Func[func(input MLOperand, weight MLOperand, recurrentWeight MLOperand, hiddenState MLOperand, hiddenSize uint32, options MLGruCellOptions) MLOperand]) { 1611 bindings.FuncMLGraphBuilderGruCell( 1612 this.ref, js.Pointer(&fn), 1613 ) 1614 return 1615 } 1616 1617 // GruCell calls the method "MLGraphBuilder.gruCell". 1618 func (this MLGraphBuilder) GruCell(input MLOperand, weight MLOperand, recurrentWeight MLOperand, hiddenState MLOperand, hiddenSize uint32, options MLGruCellOptions) (ret MLOperand) { 1619 bindings.CallMLGraphBuilderGruCell( 1620 this.ref, js.Pointer(&ret), 1621 input.Ref(), 1622 weight.Ref(), 1623 recurrentWeight.Ref(), 1624 hiddenState.Ref(), 1625 uint32(hiddenSize), 1626 js.Pointer(&options), 1627 ) 1628 1629 return 1630 } 1631 1632 // TryGruCell calls the method "MLGraphBuilder.gruCell" 1633 // in a try/catch block and returns (_, err, ok = false) when it went through 1634 // the catch clause. 1635 func (this MLGraphBuilder) TryGruCell(input MLOperand, weight MLOperand, recurrentWeight MLOperand, hiddenState MLOperand, hiddenSize uint32, options MLGruCellOptions) (ret MLOperand, exception js.Any, ok bool) { 1636 ok = js.True == bindings.TryMLGraphBuilderGruCell( 1637 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1638 input.Ref(), 1639 weight.Ref(), 1640 recurrentWeight.Ref(), 1641 hiddenState.Ref(), 1642 uint32(hiddenSize), 1643 js.Pointer(&options), 1644 ) 1645 1646 return 1647 } 1648 1649 // HasFuncGruCell1 returns true if the method "MLGraphBuilder.gruCell" exists. 1650 func (this MLGraphBuilder) HasFuncGruCell1() bool { 1651 return js.True == bindings.HasFuncMLGraphBuilderGruCell1( 1652 this.ref, 1653 ) 1654 } 1655 1656 // FuncGruCell1 returns the method "MLGraphBuilder.gruCell". 1657 func (this MLGraphBuilder) FuncGruCell1() (fn js.Func[func(input MLOperand, weight MLOperand, recurrentWeight MLOperand, hiddenState MLOperand, hiddenSize uint32) MLOperand]) { 1658 bindings.FuncMLGraphBuilderGruCell1( 1659 this.ref, js.Pointer(&fn), 1660 ) 1661 return 1662 } 1663 1664 // GruCell1 calls the method "MLGraphBuilder.gruCell". 1665 func (this MLGraphBuilder) GruCell1(input MLOperand, weight MLOperand, recurrentWeight MLOperand, hiddenState MLOperand, hiddenSize uint32) (ret MLOperand) { 1666 bindings.CallMLGraphBuilderGruCell1( 1667 this.ref, js.Pointer(&ret), 1668 input.Ref(), 1669 weight.Ref(), 1670 recurrentWeight.Ref(), 1671 hiddenState.Ref(), 1672 uint32(hiddenSize), 1673 ) 1674 1675 return 1676 } 1677 1678 // TryGruCell1 calls the method "MLGraphBuilder.gruCell" 1679 // in a try/catch block and returns (_, err, ok = false) when it went through 1680 // the catch clause. 1681 func (this MLGraphBuilder) TryGruCell1(input MLOperand, weight MLOperand, recurrentWeight MLOperand, hiddenState MLOperand, hiddenSize uint32) (ret MLOperand, exception js.Any, ok bool) { 1682 ok = js.True == bindings.TryMLGraphBuilderGruCell1( 1683 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1684 input.Ref(), 1685 weight.Ref(), 1686 recurrentWeight.Ref(), 1687 hiddenState.Ref(), 1688 uint32(hiddenSize), 1689 ) 1690 1691 return 1692 } 1693 1694 // HasFuncSlice returns true if the method "MLGraphBuilder.slice" exists. 1695 func (this MLGraphBuilder) HasFuncSlice() bool { 1696 return js.True == bindings.HasFuncMLGraphBuilderSlice( 1697 this.ref, 1698 ) 1699 } 1700 1701 // FuncSlice returns the method "MLGraphBuilder.slice". 1702 func (this MLGraphBuilder) FuncSlice() (fn js.Func[func(input MLOperand, starts js.Array[uint32], sizes js.Array[uint32]) MLOperand]) { 1703 bindings.FuncMLGraphBuilderSlice( 1704 this.ref, js.Pointer(&fn), 1705 ) 1706 return 1707 } 1708 1709 // Slice calls the method "MLGraphBuilder.slice". 1710 func (this MLGraphBuilder) Slice(input MLOperand, starts js.Array[uint32], sizes js.Array[uint32]) (ret MLOperand) { 1711 bindings.CallMLGraphBuilderSlice( 1712 this.ref, js.Pointer(&ret), 1713 input.Ref(), 1714 starts.Ref(), 1715 sizes.Ref(), 1716 ) 1717 1718 return 1719 } 1720 1721 // TrySlice calls the method "MLGraphBuilder.slice" 1722 // in a try/catch block and returns (_, err, ok = false) when it went through 1723 // the catch clause. 1724 func (this MLGraphBuilder) TrySlice(input MLOperand, starts js.Array[uint32], sizes js.Array[uint32]) (ret MLOperand, exception js.Any, ok bool) { 1725 ok = js.True == bindings.TryMLGraphBuilderSlice( 1726 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1727 input.Ref(), 1728 starts.Ref(), 1729 sizes.Ref(), 1730 ) 1731 1732 return 1733 } 1734 1735 // HasFuncAveragePool2d returns true if the method "MLGraphBuilder.averagePool2d" exists. 1736 func (this MLGraphBuilder) HasFuncAveragePool2d() bool { 1737 return js.True == bindings.HasFuncMLGraphBuilderAveragePool2d( 1738 this.ref, 1739 ) 1740 } 1741 1742 // FuncAveragePool2d returns the method "MLGraphBuilder.averagePool2d". 1743 func (this MLGraphBuilder) FuncAveragePool2d() (fn js.Func[func(input MLOperand, options MLPool2dOptions) MLOperand]) { 1744 bindings.FuncMLGraphBuilderAveragePool2d( 1745 this.ref, js.Pointer(&fn), 1746 ) 1747 return 1748 } 1749 1750 // AveragePool2d calls the method "MLGraphBuilder.averagePool2d". 1751 func (this MLGraphBuilder) AveragePool2d(input MLOperand, options MLPool2dOptions) (ret MLOperand) { 1752 bindings.CallMLGraphBuilderAveragePool2d( 1753 this.ref, js.Pointer(&ret), 1754 input.Ref(), 1755 js.Pointer(&options), 1756 ) 1757 1758 return 1759 } 1760 1761 // TryAveragePool2d calls the method "MLGraphBuilder.averagePool2d" 1762 // in a try/catch block and returns (_, err, ok = false) when it went through 1763 // the catch clause. 1764 func (this MLGraphBuilder) TryAveragePool2d(input MLOperand, options MLPool2dOptions) (ret MLOperand, exception js.Any, ok bool) { 1765 ok = js.True == bindings.TryMLGraphBuilderAveragePool2d( 1766 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1767 input.Ref(), 1768 js.Pointer(&options), 1769 ) 1770 1771 return 1772 } 1773 1774 // HasFuncAveragePool2d1 returns true if the method "MLGraphBuilder.averagePool2d" exists. 1775 func (this MLGraphBuilder) HasFuncAveragePool2d1() bool { 1776 return js.True == bindings.HasFuncMLGraphBuilderAveragePool2d1( 1777 this.ref, 1778 ) 1779 } 1780 1781 // FuncAveragePool2d1 returns the method "MLGraphBuilder.averagePool2d". 1782 func (this MLGraphBuilder) FuncAveragePool2d1() (fn js.Func[func(input MLOperand) MLOperand]) { 1783 bindings.FuncMLGraphBuilderAveragePool2d1( 1784 this.ref, js.Pointer(&fn), 1785 ) 1786 return 1787 } 1788 1789 // AveragePool2d1 calls the method "MLGraphBuilder.averagePool2d". 1790 func (this MLGraphBuilder) AveragePool2d1(input MLOperand) (ret MLOperand) { 1791 bindings.CallMLGraphBuilderAveragePool2d1( 1792 this.ref, js.Pointer(&ret), 1793 input.Ref(), 1794 ) 1795 1796 return 1797 } 1798 1799 // TryAveragePool2d1 calls the method "MLGraphBuilder.averagePool2d" 1800 // in a try/catch block and returns (_, err, ok = false) when it went through 1801 // the catch clause. 1802 func (this MLGraphBuilder) TryAveragePool2d1(input MLOperand) (ret MLOperand, exception js.Any, ok bool) { 1803 ok = js.True == bindings.TryMLGraphBuilderAveragePool2d1( 1804 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1805 input.Ref(), 1806 ) 1807 1808 return 1809 } 1810 1811 // HasFuncL2Pool2d returns true if the method "MLGraphBuilder.l2Pool2d" exists. 1812 func (this MLGraphBuilder) HasFuncL2Pool2d() bool { 1813 return js.True == bindings.HasFuncMLGraphBuilderL2Pool2d( 1814 this.ref, 1815 ) 1816 } 1817 1818 // FuncL2Pool2d returns the method "MLGraphBuilder.l2Pool2d". 1819 func (this MLGraphBuilder) FuncL2Pool2d() (fn js.Func[func(input MLOperand, options MLPool2dOptions) MLOperand]) { 1820 bindings.FuncMLGraphBuilderL2Pool2d( 1821 this.ref, js.Pointer(&fn), 1822 ) 1823 return 1824 } 1825 1826 // L2Pool2d calls the method "MLGraphBuilder.l2Pool2d". 1827 func (this MLGraphBuilder) L2Pool2d(input MLOperand, options MLPool2dOptions) (ret MLOperand) { 1828 bindings.CallMLGraphBuilderL2Pool2d( 1829 this.ref, js.Pointer(&ret), 1830 input.Ref(), 1831 js.Pointer(&options), 1832 ) 1833 1834 return 1835 } 1836 1837 // TryL2Pool2d calls the method "MLGraphBuilder.l2Pool2d" 1838 // in a try/catch block and returns (_, err, ok = false) when it went through 1839 // the catch clause. 1840 func (this MLGraphBuilder) TryL2Pool2d(input MLOperand, options MLPool2dOptions) (ret MLOperand, exception js.Any, ok bool) { 1841 ok = js.True == bindings.TryMLGraphBuilderL2Pool2d( 1842 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1843 input.Ref(), 1844 js.Pointer(&options), 1845 ) 1846 1847 return 1848 } 1849 1850 // HasFuncL2Pool2d1 returns true if the method "MLGraphBuilder.l2Pool2d" exists. 1851 func (this MLGraphBuilder) HasFuncL2Pool2d1() bool { 1852 return js.True == bindings.HasFuncMLGraphBuilderL2Pool2d1( 1853 this.ref, 1854 ) 1855 } 1856 1857 // FuncL2Pool2d1 returns the method "MLGraphBuilder.l2Pool2d". 1858 func (this MLGraphBuilder) FuncL2Pool2d1() (fn js.Func[func(input MLOperand) MLOperand]) { 1859 bindings.FuncMLGraphBuilderL2Pool2d1( 1860 this.ref, js.Pointer(&fn), 1861 ) 1862 return 1863 } 1864 1865 // L2Pool2d1 calls the method "MLGraphBuilder.l2Pool2d". 1866 func (this MLGraphBuilder) L2Pool2d1(input MLOperand) (ret MLOperand) { 1867 bindings.CallMLGraphBuilderL2Pool2d1( 1868 this.ref, js.Pointer(&ret), 1869 input.Ref(), 1870 ) 1871 1872 return 1873 } 1874 1875 // TryL2Pool2d1 calls the method "MLGraphBuilder.l2Pool2d" 1876 // in a try/catch block and returns (_, err, ok = false) when it went through 1877 // the catch clause. 1878 func (this MLGraphBuilder) TryL2Pool2d1(input MLOperand) (ret MLOperand, exception js.Any, ok bool) { 1879 ok = js.True == bindings.TryMLGraphBuilderL2Pool2d1( 1880 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1881 input.Ref(), 1882 ) 1883 1884 return 1885 } 1886 1887 // HasFuncMaxPool2d returns true if the method "MLGraphBuilder.maxPool2d" exists. 1888 func (this MLGraphBuilder) HasFuncMaxPool2d() bool { 1889 return js.True == bindings.HasFuncMLGraphBuilderMaxPool2d( 1890 this.ref, 1891 ) 1892 } 1893 1894 // FuncMaxPool2d returns the method "MLGraphBuilder.maxPool2d". 1895 func (this MLGraphBuilder) FuncMaxPool2d() (fn js.Func[func(input MLOperand, options MLPool2dOptions) MLOperand]) { 1896 bindings.FuncMLGraphBuilderMaxPool2d( 1897 this.ref, js.Pointer(&fn), 1898 ) 1899 return 1900 } 1901 1902 // MaxPool2d calls the method "MLGraphBuilder.maxPool2d". 1903 func (this MLGraphBuilder) MaxPool2d(input MLOperand, options MLPool2dOptions) (ret MLOperand) { 1904 bindings.CallMLGraphBuilderMaxPool2d( 1905 this.ref, js.Pointer(&ret), 1906 input.Ref(), 1907 js.Pointer(&options), 1908 ) 1909 1910 return 1911 } 1912 1913 // TryMaxPool2d calls the method "MLGraphBuilder.maxPool2d" 1914 // in a try/catch block and returns (_, err, ok = false) when it went through 1915 // the catch clause. 1916 func (this MLGraphBuilder) TryMaxPool2d(input MLOperand, options MLPool2dOptions) (ret MLOperand, exception js.Any, ok bool) { 1917 ok = js.True == bindings.TryMLGraphBuilderMaxPool2d( 1918 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1919 input.Ref(), 1920 js.Pointer(&options), 1921 ) 1922 1923 return 1924 } 1925 1926 // HasFuncMaxPool2d1 returns true if the method "MLGraphBuilder.maxPool2d" exists. 1927 func (this MLGraphBuilder) HasFuncMaxPool2d1() bool { 1928 return js.True == bindings.HasFuncMLGraphBuilderMaxPool2d1( 1929 this.ref, 1930 ) 1931 } 1932 1933 // FuncMaxPool2d1 returns the method "MLGraphBuilder.maxPool2d". 1934 func (this MLGraphBuilder) FuncMaxPool2d1() (fn js.Func[func(input MLOperand) MLOperand]) { 1935 bindings.FuncMLGraphBuilderMaxPool2d1( 1936 this.ref, js.Pointer(&fn), 1937 ) 1938 return 1939 } 1940 1941 // MaxPool2d1 calls the method "MLGraphBuilder.maxPool2d". 1942 func (this MLGraphBuilder) MaxPool2d1(input MLOperand) (ret MLOperand) { 1943 bindings.CallMLGraphBuilderMaxPool2d1( 1944 this.ref, js.Pointer(&ret), 1945 input.Ref(), 1946 ) 1947 1948 return 1949 } 1950 1951 // TryMaxPool2d1 calls the method "MLGraphBuilder.maxPool2d" 1952 // in a try/catch block and returns (_, err, ok = false) when it went through 1953 // the catch clause. 1954 func (this MLGraphBuilder) TryMaxPool2d1(input MLOperand) (ret MLOperand, exception js.Any, ok bool) { 1955 ok = js.True == bindings.TryMLGraphBuilderMaxPool2d1( 1956 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1957 input.Ref(), 1958 ) 1959 1960 return 1961 } 1962 1963 // HasFuncLinear returns true if the method "MLGraphBuilder.linear" exists. 1964 func (this MLGraphBuilder) HasFuncLinear() bool { 1965 return js.True == bindings.HasFuncMLGraphBuilderLinear( 1966 this.ref, 1967 ) 1968 } 1969 1970 // FuncLinear returns the method "MLGraphBuilder.linear". 1971 func (this MLGraphBuilder) FuncLinear() (fn js.Func[func(input MLOperand, options MLLinearOptions) MLOperand]) { 1972 bindings.FuncMLGraphBuilderLinear( 1973 this.ref, js.Pointer(&fn), 1974 ) 1975 return 1976 } 1977 1978 // Linear calls the method "MLGraphBuilder.linear". 1979 func (this MLGraphBuilder) Linear(input MLOperand, options MLLinearOptions) (ret MLOperand) { 1980 bindings.CallMLGraphBuilderLinear( 1981 this.ref, js.Pointer(&ret), 1982 input.Ref(), 1983 js.Pointer(&options), 1984 ) 1985 1986 return 1987 } 1988 1989 // TryLinear calls the method "MLGraphBuilder.linear" 1990 // in a try/catch block and returns (_, err, ok = false) when it went through 1991 // the catch clause. 1992 func (this MLGraphBuilder) TryLinear(input MLOperand, options MLLinearOptions) (ret MLOperand, exception js.Any, ok bool) { 1993 ok = js.True == bindings.TryMLGraphBuilderLinear( 1994 this.ref, js.Pointer(&ret), js.Pointer(&exception), 1995 input.Ref(), 1996 js.Pointer(&options), 1997 ) 1998 1999 return 2000 } 2001 2002 // HasFuncLinear1 returns true if the method "MLGraphBuilder.linear" exists. 2003 func (this MLGraphBuilder) HasFuncLinear1() bool { 2004 return js.True == bindings.HasFuncMLGraphBuilderLinear1( 2005 this.ref, 2006 ) 2007 } 2008 2009 // FuncLinear1 returns the method "MLGraphBuilder.linear". 2010 func (this MLGraphBuilder) FuncLinear1() (fn js.Func[func(input MLOperand) MLOperand]) { 2011 bindings.FuncMLGraphBuilderLinear1( 2012 this.ref, js.Pointer(&fn), 2013 ) 2014 return 2015 } 2016 2017 // Linear1 calls the method "MLGraphBuilder.linear". 2018 func (this MLGraphBuilder) Linear1(input MLOperand) (ret MLOperand) { 2019 bindings.CallMLGraphBuilderLinear1( 2020 this.ref, js.Pointer(&ret), 2021 input.Ref(), 2022 ) 2023 2024 return 2025 } 2026 2027 // TryLinear1 calls the method "MLGraphBuilder.linear" 2028 // in a try/catch block and returns (_, err, ok = false) when it went through 2029 // the catch clause. 2030 func (this MLGraphBuilder) TryLinear1(input MLOperand) (ret MLOperand, exception js.Any, ok bool) { 2031 ok = js.True == bindings.TryMLGraphBuilderLinear1( 2032 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2033 input.Ref(), 2034 ) 2035 2036 return 2037 } 2038 2039 // HasFuncLinear2 returns true if the method "MLGraphBuilder.linear" exists. 2040 func (this MLGraphBuilder) HasFuncLinear2() bool { 2041 return js.True == bindings.HasFuncMLGraphBuilderLinear2( 2042 this.ref, 2043 ) 2044 } 2045 2046 // FuncLinear2 returns the method "MLGraphBuilder.linear". 2047 func (this MLGraphBuilder) FuncLinear2() (fn js.Func[func(options MLLinearOptions) MLActivation]) { 2048 bindings.FuncMLGraphBuilderLinear2( 2049 this.ref, js.Pointer(&fn), 2050 ) 2051 return 2052 } 2053 2054 // Linear2 calls the method "MLGraphBuilder.linear". 2055 func (this MLGraphBuilder) Linear2(options MLLinearOptions) (ret MLActivation) { 2056 bindings.CallMLGraphBuilderLinear2( 2057 this.ref, js.Pointer(&ret), 2058 js.Pointer(&options), 2059 ) 2060 2061 return 2062 } 2063 2064 // TryLinear2 calls the method "MLGraphBuilder.linear" 2065 // in a try/catch block and returns (_, err, ok = false) when it went through 2066 // the catch clause. 2067 func (this MLGraphBuilder) TryLinear2(options MLLinearOptions) (ret MLActivation, exception js.Any, ok bool) { 2068 ok = js.True == bindings.TryMLGraphBuilderLinear2( 2069 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2070 js.Pointer(&options), 2071 ) 2072 2073 return 2074 } 2075 2076 // HasFuncLinear3 returns true if the method "MLGraphBuilder.linear" exists. 2077 func (this MLGraphBuilder) HasFuncLinear3() bool { 2078 return js.True == bindings.HasFuncMLGraphBuilderLinear3( 2079 this.ref, 2080 ) 2081 } 2082 2083 // FuncLinear3 returns the method "MLGraphBuilder.linear". 2084 func (this MLGraphBuilder) FuncLinear3() (fn js.Func[func() MLActivation]) { 2085 bindings.FuncMLGraphBuilderLinear3( 2086 this.ref, js.Pointer(&fn), 2087 ) 2088 return 2089 } 2090 2091 // Linear3 calls the method "MLGraphBuilder.linear". 2092 func (this MLGraphBuilder) Linear3() (ret MLActivation) { 2093 bindings.CallMLGraphBuilderLinear3( 2094 this.ref, js.Pointer(&ret), 2095 ) 2096 2097 return 2098 } 2099 2100 // TryLinear3 calls the method "MLGraphBuilder.linear" 2101 // in a try/catch block and returns (_, err, ok = false) when it went through 2102 // the catch clause. 2103 func (this MLGraphBuilder) TryLinear3() (ret MLActivation, exception js.Any, ok bool) { 2104 ok = js.True == bindings.TryMLGraphBuilderLinear3( 2105 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2106 ) 2107 2108 return 2109 } 2110 2111 // HasFuncLeakyRelu returns true if the method "MLGraphBuilder.leakyRelu" exists. 2112 func (this MLGraphBuilder) HasFuncLeakyRelu() bool { 2113 return js.True == bindings.HasFuncMLGraphBuilderLeakyRelu( 2114 this.ref, 2115 ) 2116 } 2117 2118 // FuncLeakyRelu returns the method "MLGraphBuilder.leakyRelu". 2119 func (this MLGraphBuilder) FuncLeakyRelu() (fn js.Func[func(input MLOperand, options MLLeakyReluOptions) MLOperand]) { 2120 bindings.FuncMLGraphBuilderLeakyRelu( 2121 this.ref, js.Pointer(&fn), 2122 ) 2123 return 2124 } 2125 2126 // LeakyRelu calls the method "MLGraphBuilder.leakyRelu". 2127 func (this MLGraphBuilder) LeakyRelu(input MLOperand, options MLLeakyReluOptions) (ret MLOperand) { 2128 bindings.CallMLGraphBuilderLeakyRelu( 2129 this.ref, js.Pointer(&ret), 2130 input.Ref(), 2131 js.Pointer(&options), 2132 ) 2133 2134 return 2135 } 2136 2137 // TryLeakyRelu calls the method "MLGraphBuilder.leakyRelu" 2138 // in a try/catch block and returns (_, err, ok = false) when it went through 2139 // the catch clause. 2140 func (this MLGraphBuilder) TryLeakyRelu(input MLOperand, options MLLeakyReluOptions) (ret MLOperand, exception js.Any, ok bool) { 2141 ok = js.True == bindings.TryMLGraphBuilderLeakyRelu( 2142 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2143 input.Ref(), 2144 js.Pointer(&options), 2145 ) 2146 2147 return 2148 } 2149 2150 // HasFuncLeakyRelu1 returns true if the method "MLGraphBuilder.leakyRelu" exists. 2151 func (this MLGraphBuilder) HasFuncLeakyRelu1() bool { 2152 return js.True == bindings.HasFuncMLGraphBuilderLeakyRelu1( 2153 this.ref, 2154 ) 2155 } 2156 2157 // FuncLeakyRelu1 returns the method "MLGraphBuilder.leakyRelu". 2158 func (this MLGraphBuilder) FuncLeakyRelu1() (fn js.Func[func(input MLOperand) MLOperand]) { 2159 bindings.FuncMLGraphBuilderLeakyRelu1( 2160 this.ref, js.Pointer(&fn), 2161 ) 2162 return 2163 } 2164 2165 // LeakyRelu1 calls the method "MLGraphBuilder.leakyRelu". 2166 func (this MLGraphBuilder) LeakyRelu1(input MLOperand) (ret MLOperand) { 2167 bindings.CallMLGraphBuilderLeakyRelu1( 2168 this.ref, js.Pointer(&ret), 2169 input.Ref(), 2170 ) 2171 2172 return 2173 } 2174 2175 // TryLeakyRelu1 calls the method "MLGraphBuilder.leakyRelu" 2176 // in a try/catch block and returns (_, err, ok = false) when it went through 2177 // the catch clause. 2178 func (this MLGraphBuilder) TryLeakyRelu1(input MLOperand) (ret MLOperand, exception js.Any, ok bool) { 2179 ok = js.True == bindings.TryMLGraphBuilderLeakyRelu1( 2180 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2181 input.Ref(), 2182 ) 2183 2184 return 2185 } 2186 2187 // HasFuncLeakyRelu2 returns true if the method "MLGraphBuilder.leakyRelu" exists. 2188 func (this MLGraphBuilder) HasFuncLeakyRelu2() bool { 2189 return js.True == bindings.HasFuncMLGraphBuilderLeakyRelu2( 2190 this.ref, 2191 ) 2192 } 2193 2194 // FuncLeakyRelu2 returns the method "MLGraphBuilder.leakyRelu". 2195 func (this MLGraphBuilder) FuncLeakyRelu2() (fn js.Func[func(options MLLeakyReluOptions) MLActivation]) { 2196 bindings.FuncMLGraphBuilderLeakyRelu2( 2197 this.ref, js.Pointer(&fn), 2198 ) 2199 return 2200 } 2201 2202 // LeakyRelu2 calls the method "MLGraphBuilder.leakyRelu". 2203 func (this MLGraphBuilder) LeakyRelu2(options MLLeakyReluOptions) (ret MLActivation) { 2204 bindings.CallMLGraphBuilderLeakyRelu2( 2205 this.ref, js.Pointer(&ret), 2206 js.Pointer(&options), 2207 ) 2208 2209 return 2210 } 2211 2212 // TryLeakyRelu2 calls the method "MLGraphBuilder.leakyRelu" 2213 // in a try/catch block and returns (_, err, ok = false) when it went through 2214 // the catch clause. 2215 func (this MLGraphBuilder) TryLeakyRelu2(options MLLeakyReluOptions) (ret MLActivation, exception js.Any, ok bool) { 2216 ok = js.True == bindings.TryMLGraphBuilderLeakyRelu2( 2217 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2218 js.Pointer(&options), 2219 ) 2220 2221 return 2222 } 2223 2224 // HasFuncLeakyRelu3 returns true if the method "MLGraphBuilder.leakyRelu" exists. 2225 func (this MLGraphBuilder) HasFuncLeakyRelu3() bool { 2226 return js.True == bindings.HasFuncMLGraphBuilderLeakyRelu3( 2227 this.ref, 2228 ) 2229 } 2230 2231 // FuncLeakyRelu3 returns the method "MLGraphBuilder.leakyRelu". 2232 func (this MLGraphBuilder) FuncLeakyRelu3() (fn js.Func[func() MLActivation]) { 2233 bindings.FuncMLGraphBuilderLeakyRelu3( 2234 this.ref, js.Pointer(&fn), 2235 ) 2236 return 2237 } 2238 2239 // LeakyRelu3 calls the method "MLGraphBuilder.leakyRelu". 2240 func (this MLGraphBuilder) LeakyRelu3() (ret MLActivation) { 2241 bindings.CallMLGraphBuilderLeakyRelu3( 2242 this.ref, js.Pointer(&ret), 2243 ) 2244 2245 return 2246 } 2247 2248 // TryLeakyRelu3 calls the method "MLGraphBuilder.leakyRelu" 2249 // in a try/catch block and returns (_, err, ok = false) when it went through 2250 // the catch clause. 2251 func (this MLGraphBuilder) TryLeakyRelu3() (ret MLActivation, exception js.Any, ok bool) { 2252 ok = js.True == bindings.TryMLGraphBuilderLeakyRelu3( 2253 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2254 ) 2255 2256 return 2257 } 2258 2259 // HasFuncPad returns true if the method "MLGraphBuilder.pad" exists. 2260 func (this MLGraphBuilder) HasFuncPad() bool { 2261 return js.True == bindings.HasFuncMLGraphBuilderPad( 2262 this.ref, 2263 ) 2264 } 2265 2266 // FuncPad returns the method "MLGraphBuilder.pad". 2267 func (this MLGraphBuilder) FuncPad() (fn js.Func[func(input MLOperand, beginningPadding js.Array[uint32], endingPadding js.Array[uint32], options MLPadOptions) MLOperand]) { 2268 bindings.FuncMLGraphBuilderPad( 2269 this.ref, js.Pointer(&fn), 2270 ) 2271 return 2272 } 2273 2274 // Pad calls the method "MLGraphBuilder.pad". 2275 func (this MLGraphBuilder) Pad(input MLOperand, beginningPadding js.Array[uint32], endingPadding js.Array[uint32], options MLPadOptions) (ret MLOperand) { 2276 bindings.CallMLGraphBuilderPad( 2277 this.ref, js.Pointer(&ret), 2278 input.Ref(), 2279 beginningPadding.Ref(), 2280 endingPadding.Ref(), 2281 js.Pointer(&options), 2282 ) 2283 2284 return 2285 } 2286 2287 // TryPad calls the method "MLGraphBuilder.pad" 2288 // in a try/catch block and returns (_, err, ok = false) when it went through 2289 // the catch clause. 2290 func (this MLGraphBuilder) TryPad(input MLOperand, beginningPadding js.Array[uint32], endingPadding js.Array[uint32], options MLPadOptions) (ret MLOperand, exception js.Any, ok bool) { 2291 ok = js.True == bindings.TryMLGraphBuilderPad( 2292 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2293 input.Ref(), 2294 beginningPadding.Ref(), 2295 endingPadding.Ref(), 2296 js.Pointer(&options), 2297 ) 2298 2299 return 2300 } 2301 2302 // HasFuncPad1 returns true if the method "MLGraphBuilder.pad" exists. 2303 func (this MLGraphBuilder) HasFuncPad1() bool { 2304 return js.True == bindings.HasFuncMLGraphBuilderPad1( 2305 this.ref, 2306 ) 2307 } 2308 2309 // FuncPad1 returns the method "MLGraphBuilder.pad". 2310 func (this MLGraphBuilder) FuncPad1() (fn js.Func[func(input MLOperand, beginningPadding js.Array[uint32], endingPadding js.Array[uint32]) MLOperand]) { 2311 bindings.FuncMLGraphBuilderPad1( 2312 this.ref, js.Pointer(&fn), 2313 ) 2314 return 2315 } 2316 2317 // Pad1 calls the method "MLGraphBuilder.pad". 2318 func (this MLGraphBuilder) Pad1(input MLOperand, beginningPadding js.Array[uint32], endingPadding js.Array[uint32]) (ret MLOperand) { 2319 bindings.CallMLGraphBuilderPad1( 2320 this.ref, js.Pointer(&ret), 2321 input.Ref(), 2322 beginningPadding.Ref(), 2323 endingPadding.Ref(), 2324 ) 2325 2326 return 2327 } 2328 2329 // TryPad1 calls the method "MLGraphBuilder.pad" 2330 // in a try/catch block and returns (_, err, ok = false) when it went through 2331 // the catch clause. 2332 func (this MLGraphBuilder) TryPad1(input MLOperand, beginningPadding js.Array[uint32], endingPadding js.Array[uint32]) (ret MLOperand, exception js.Any, ok bool) { 2333 ok = js.True == bindings.TryMLGraphBuilderPad1( 2334 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2335 input.Ref(), 2336 beginningPadding.Ref(), 2337 endingPadding.Ref(), 2338 ) 2339 2340 return 2341 } 2342 2343 // HasFuncInstanceNormalization returns true if the method "MLGraphBuilder.instanceNormalization" exists. 2344 func (this MLGraphBuilder) HasFuncInstanceNormalization() bool { 2345 return js.True == bindings.HasFuncMLGraphBuilderInstanceNormalization( 2346 this.ref, 2347 ) 2348 } 2349 2350 // FuncInstanceNormalization returns the method "MLGraphBuilder.instanceNormalization". 2351 func (this MLGraphBuilder) FuncInstanceNormalization() (fn js.Func[func(input MLOperand, options MLInstanceNormalizationOptions) MLOperand]) { 2352 bindings.FuncMLGraphBuilderInstanceNormalization( 2353 this.ref, js.Pointer(&fn), 2354 ) 2355 return 2356 } 2357 2358 // InstanceNormalization calls the method "MLGraphBuilder.instanceNormalization". 2359 func (this MLGraphBuilder) InstanceNormalization(input MLOperand, options MLInstanceNormalizationOptions) (ret MLOperand) { 2360 bindings.CallMLGraphBuilderInstanceNormalization( 2361 this.ref, js.Pointer(&ret), 2362 input.Ref(), 2363 js.Pointer(&options), 2364 ) 2365 2366 return 2367 } 2368 2369 // TryInstanceNormalization calls the method "MLGraphBuilder.instanceNormalization" 2370 // in a try/catch block and returns (_, err, ok = false) when it went through 2371 // the catch clause. 2372 func (this MLGraphBuilder) TryInstanceNormalization(input MLOperand, options MLInstanceNormalizationOptions) (ret MLOperand, exception js.Any, ok bool) { 2373 ok = js.True == bindings.TryMLGraphBuilderInstanceNormalization( 2374 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2375 input.Ref(), 2376 js.Pointer(&options), 2377 ) 2378 2379 return 2380 } 2381 2382 // HasFuncInstanceNormalization1 returns true if the method "MLGraphBuilder.instanceNormalization" exists. 2383 func (this MLGraphBuilder) HasFuncInstanceNormalization1() bool { 2384 return js.True == bindings.HasFuncMLGraphBuilderInstanceNormalization1( 2385 this.ref, 2386 ) 2387 } 2388 2389 // FuncInstanceNormalization1 returns the method "MLGraphBuilder.instanceNormalization". 2390 func (this MLGraphBuilder) FuncInstanceNormalization1() (fn js.Func[func(input MLOperand) MLOperand]) { 2391 bindings.FuncMLGraphBuilderInstanceNormalization1( 2392 this.ref, js.Pointer(&fn), 2393 ) 2394 return 2395 } 2396 2397 // InstanceNormalization1 calls the method "MLGraphBuilder.instanceNormalization". 2398 func (this MLGraphBuilder) InstanceNormalization1(input MLOperand) (ret MLOperand) { 2399 bindings.CallMLGraphBuilderInstanceNormalization1( 2400 this.ref, js.Pointer(&ret), 2401 input.Ref(), 2402 ) 2403 2404 return 2405 } 2406 2407 // TryInstanceNormalization1 calls the method "MLGraphBuilder.instanceNormalization" 2408 // in a try/catch block and returns (_, err, ok = false) when it went through 2409 // the catch clause. 2410 func (this MLGraphBuilder) TryInstanceNormalization1(input MLOperand) (ret MLOperand, exception js.Any, ok bool) { 2411 ok = js.True == bindings.TryMLGraphBuilderInstanceNormalization1( 2412 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2413 input.Ref(), 2414 ) 2415 2416 return 2417 } 2418 2419 // HasFuncSoftplus returns true if the method "MLGraphBuilder.softplus" exists. 2420 func (this MLGraphBuilder) HasFuncSoftplus() bool { 2421 return js.True == bindings.HasFuncMLGraphBuilderSoftplus( 2422 this.ref, 2423 ) 2424 } 2425 2426 // FuncSoftplus returns the method "MLGraphBuilder.softplus". 2427 func (this MLGraphBuilder) FuncSoftplus() (fn js.Func[func(input MLOperand, options MLSoftplusOptions) MLOperand]) { 2428 bindings.FuncMLGraphBuilderSoftplus( 2429 this.ref, js.Pointer(&fn), 2430 ) 2431 return 2432 } 2433 2434 // Softplus calls the method "MLGraphBuilder.softplus". 2435 func (this MLGraphBuilder) Softplus(input MLOperand, options MLSoftplusOptions) (ret MLOperand) { 2436 bindings.CallMLGraphBuilderSoftplus( 2437 this.ref, js.Pointer(&ret), 2438 input.Ref(), 2439 js.Pointer(&options), 2440 ) 2441 2442 return 2443 } 2444 2445 // TrySoftplus calls the method "MLGraphBuilder.softplus" 2446 // in a try/catch block and returns (_, err, ok = false) when it went through 2447 // the catch clause. 2448 func (this MLGraphBuilder) TrySoftplus(input MLOperand, options MLSoftplusOptions) (ret MLOperand, exception js.Any, ok bool) { 2449 ok = js.True == bindings.TryMLGraphBuilderSoftplus( 2450 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2451 input.Ref(), 2452 js.Pointer(&options), 2453 ) 2454 2455 return 2456 } 2457 2458 // HasFuncSoftplus1 returns true if the method "MLGraphBuilder.softplus" exists. 2459 func (this MLGraphBuilder) HasFuncSoftplus1() bool { 2460 return js.True == bindings.HasFuncMLGraphBuilderSoftplus1( 2461 this.ref, 2462 ) 2463 } 2464 2465 // FuncSoftplus1 returns the method "MLGraphBuilder.softplus". 2466 func (this MLGraphBuilder) FuncSoftplus1() (fn js.Func[func(input MLOperand) MLOperand]) { 2467 bindings.FuncMLGraphBuilderSoftplus1( 2468 this.ref, js.Pointer(&fn), 2469 ) 2470 return 2471 } 2472 2473 // Softplus1 calls the method "MLGraphBuilder.softplus". 2474 func (this MLGraphBuilder) Softplus1(input MLOperand) (ret MLOperand) { 2475 bindings.CallMLGraphBuilderSoftplus1( 2476 this.ref, js.Pointer(&ret), 2477 input.Ref(), 2478 ) 2479 2480 return 2481 } 2482 2483 // TrySoftplus1 calls the method "MLGraphBuilder.softplus" 2484 // in a try/catch block and returns (_, err, ok = false) when it went through 2485 // the catch clause. 2486 func (this MLGraphBuilder) TrySoftplus1(input MLOperand) (ret MLOperand, exception js.Any, ok bool) { 2487 ok = js.True == bindings.TryMLGraphBuilderSoftplus1( 2488 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2489 input.Ref(), 2490 ) 2491 2492 return 2493 } 2494 2495 // HasFuncSoftplus2 returns true if the method "MLGraphBuilder.softplus" exists. 2496 func (this MLGraphBuilder) HasFuncSoftplus2() bool { 2497 return js.True == bindings.HasFuncMLGraphBuilderSoftplus2( 2498 this.ref, 2499 ) 2500 } 2501 2502 // FuncSoftplus2 returns the method "MLGraphBuilder.softplus". 2503 func (this MLGraphBuilder) FuncSoftplus2() (fn js.Func[func(options MLSoftplusOptions) MLActivation]) { 2504 bindings.FuncMLGraphBuilderSoftplus2( 2505 this.ref, js.Pointer(&fn), 2506 ) 2507 return 2508 } 2509 2510 // Softplus2 calls the method "MLGraphBuilder.softplus". 2511 func (this MLGraphBuilder) Softplus2(options MLSoftplusOptions) (ret MLActivation) { 2512 bindings.CallMLGraphBuilderSoftplus2( 2513 this.ref, js.Pointer(&ret), 2514 js.Pointer(&options), 2515 ) 2516 2517 return 2518 } 2519 2520 // TrySoftplus2 calls the method "MLGraphBuilder.softplus" 2521 // in a try/catch block and returns (_, err, ok = false) when it went through 2522 // the catch clause. 2523 func (this MLGraphBuilder) TrySoftplus2(options MLSoftplusOptions) (ret MLActivation, exception js.Any, ok bool) { 2524 ok = js.True == bindings.TryMLGraphBuilderSoftplus2( 2525 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2526 js.Pointer(&options), 2527 ) 2528 2529 return 2530 } 2531 2532 // HasFuncSoftplus3 returns true if the method "MLGraphBuilder.softplus" exists. 2533 func (this MLGraphBuilder) HasFuncSoftplus3() bool { 2534 return js.True == bindings.HasFuncMLGraphBuilderSoftplus3( 2535 this.ref, 2536 ) 2537 } 2538 2539 // FuncSoftplus3 returns the method "MLGraphBuilder.softplus". 2540 func (this MLGraphBuilder) FuncSoftplus3() (fn js.Func[func() MLActivation]) { 2541 bindings.FuncMLGraphBuilderSoftplus3( 2542 this.ref, js.Pointer(&fn), 2543 ) 2544 return 2545 } 2546 2547 // Softplus3 calls the method "MLGraphBuilder.softplus". 2548 func (this MLGraphBuilder) Softplus3() (ret MLActivation) { 2549 bindings.CallMLGraphBuilderSoftplus3( 2550 this.ref, js.Pointer(&ret), 2551 ) 2552 2553 return 2554 } 2555 2556 // TrySoftplus3 calls the method "MLGraphBuilder.softplus" 2557 // in a try/catch block and returns (_, err, ok = false) when it went through 2558 // the catch clause. 2559 func (this MLGraphBuilder) TrySoftplus3() (ret MLActivation, exception js.Any, ok bool) { 2560 ok = js.True == bindings.TryMLGraphBuilderSoftplus3( 2561 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2562 ) 2563 2564 return 2565 } 2566 2567 // HasFuncSoftsign returns true if the method "MLGraphBuilder.softsign" exists. 2568 func (this MLGraphBuilder) HasFuncSoftsign() bool { 2569 return js.True == bindings.HasFuncMLGraphBuilderSoftsign( 2570 this.ref, 2571 ) 2572 } 2573 2574 // FuncSoftsign returns the method "MLGraphBuilder.softsign". 2575 func (this MLGraphBuilder) FuncSoftsign() (fn js.Func[func(input MLOperand) MLOperand]) { 2576 bindings.FuncMLGraphBuilderSoftsign( 2577 this.ref, js.Pointer(&fn), 2578 ) 2579 return 2580 } 2581 2582 // Softsign calls the method "MLGraphBuilder.softsign". 2583 func (this MLGraphBuilder) Softsign(input MLOperand) (ret MLOperand) { 2584 bindings.CallMLGraphBuilderSoftsign( 2585 this.ref, js.Pointer(&ret), 2586 input.Ref(), 2587 ) 2588 2589 return 2590 } 2591 2592 // TrySoftsign calls the method "MLGraphBuilder.softsign" 2593 // in a try/catch block and returns (_, err, ok = false) when it went through 2594 // the catch clause. 2595 func (this MLGraphBuilder) TrySoftsign(input MLOperand) (ret MLOperand, exception js.Any, ok bool) { 2596 ok = js.True == bindings.TryMLGraphBuilderSoftsign( 2597 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2598 input.Ref(), 2599 ) 2600 2601 return 2602 } 2603 2604 // HasFuncSoftsign1 returns true if the method "MLGraphBuilder.softsign" exists. 2605 func (this MLGraphBuilder) HasFuncSoftsign1() bool { 2606 return js.True == bindings.HasFuncMLGraphBuilderSoftsign1( 2607 this.ref, 2608 ) 2609 } 2610 2611 // FuncSoftsign1 returns the method "MLGraphBuilder.softsign". 2612 func (this MLGraphBuilder) FuncSoftsign1() (fn js.Func[func() MLActivation]) { 2613 bindings.FuncMLGraphBuilderSoftsign1( 2614 this.ref, js.Pointer(&fn), 2615 ) 2616 return 2617 } 2618 2619 // Softsign1 calls the method "MLGraphBuilder.softsign". 2620 func (this MLGraphBuilder) Softsign1() (ret MLActivation) { 2621 bindings.CallMLGraphBuilderSoftsign1( 2622 this.ref, js.Pointer(&ret), 2623 ) 2624 2625 return 2626 } 2627 2628 // TrySoftsign1 calls the method "MLGraphBuilder.softsign" 2629 // in a try/catch block and returns (_, err, ok = false) when it went through 2630 // the catch clause. 2631 func (this MLGraphBuilder) TrySoftsign1() (ret MLActivation, exception js.Any, ok bool) { 2632 ok = js.True == bindings.TryMLGraphBuilderSoftsign1( 2633 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2634 ) 2635 2636 return 2637 } 2638 2639 // HasFuncSigmoid returns true if the method "MLGraphBuilder.sigmoid" exists. 2640 func (this MLGraphBuilder) HasFuncSigmoid() bool { 2641 return js.True == bindings.HasFuncMLGraphBuilderSigmoid( 2642 this.ref, 2643 ) 2644 } 2645 2646 // FuncSigmoid returns the method "MLGraphBuilder.sigmoid". 2647 func (this MLGraphBuilder) FuncSigmoid() (fn js.Func[func(input MLOperand) MLOperand]) { 2648 bindings.FuncMLGraphBuilderSigmoid( 2649 this.ref, js.Pointer(&fn), 2650 ) 2651 return 2652 } 2653 2654 // Sigmoid calls the method "MLGraphBuilder.sigmoid". 2655 func (this MLGraphBuilder) Sigmoid(input MLOperand) (ret MLOperand) { 2656 bindings.CallMLGraphBuilderSigmoid( 2657 this.ref, js.Pointer(&ret), 2658 input.Ref(), 2659 ) 2660 2661 return 2662 } 2663 2664 // TrySigmoid calls the method "MLGraphBuilder.sigmoid" 2665 // in a try/catch block and returns (_, err, ok = false) when it went through 2666 // the catch clause. 2667 func (this MLGraphBuilder) TrySigmoid(input MLOperand) (ret MLOperand, exception js.Any, ok bool) { 2668 ok = js.True == bindings.TryMLGraphBuilderSigmoid( 2669 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2670 input.Ref(), 2671 ) 2672 2673 return 2674 } 2675 2676 // HasFuncSigmoid1 returns true if the method "MLGraphBuilder.sigmoid" exists. 2677 func (this MLGraphBuilder) HasFuncSigmoid1() bool { 2678 return js.True == bindings.HasFuncMLGraphBuilderSigmoid1( 2679 this.ref, 2680 ) 2681 } 2682 2683 // FuncSigmoid1 returns the method "MLGraphBuilder.sigmoid". 2684 func (this MLGraphBuilder) FuncSigmoid1() (fn js.Func[func() MLActivation]) { 2685 bindings.FuncMLGraphBuilderSigmoid1( 2686 this.ref, js.Pointer(&fn), 2687 ) 2688 return 2689 } 2690 2691 // Sigmoid1 calls the method "MLGraphBuilder.sigmoid". 2692 func (this MLGraphBuilder) Sigmoid1() (ret MLActivation) { 2693 bindings.CallMLGraphBuilderSigmoid1( 2694 this.ref, js.Pointer(&ret), 2695 ) 2696 2697 return 2698 } 2699 2700 // TrySigmoid1 calls the method "MLGraphBuilder.sigmoid" 2701 // in a try/catch block and returns (_, err, ok = false) when it went through 2702 // the catch clause. 2703 func (this MLGraphBuilder) TrySigmoid1() (ret MLActivation, exception js.Any, ok bool) { 2704 ok = js.True == bindings.TryMLGraphBuilderSigmoid1( 2705 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2706 ) 2707 2708 return 2709 } 2710 2711 // HasFuncReshape returns true if the method "MLGraphBuilder.reshape" exists. 2712 func (this MLGraphBuilder) HasFuncReshape() bool { 2713 return js.True == bindings.HasFuncMLGraphBuilderReshape( 2714 this.ref, 2715 ) 2716 } 2717 2718 // FuncReshape returns the method "MLGraphBuilder.reshape". 2719 func (this MLGraphBuilder) FuncReshape() (fn js.Func[func(input MLOperand, newShape js.Array[uint32]) MLOperand]) { 2720 bindings.FuncMLGraphBuilderReshape( 2721 this.ref, js.Pointer(&fn), 2722 ) 2723 return 2724 } 2725 2726 // Reshape calls the method "MLGraphBuilder.reshape". 2727 func (this MLGraphBuilder) Reshape(input MLOperand, newShape js.Array[uint32]) (ret MLOperand) { 2728 bindings.CallMLGraphBuilderReshape( 2729 this.ref, js.Pointer(&ret), 2730 input.Ref(), 2731 newShape.Ref(), 2732 ) 2733 2734 return 2735 } 2736 2737 // TryReshape calls the method "MLGraphBuilder.reshape" 2738 // in a try/catch block and returns (_, err, ok = false) when it went through 2739 // the catch clause. 2740 func (this MLGraphBuilder) TryReshape(input MLOperand, newShape js.Array[uint32]) (ret MLOperand, exception js.Any, ok bool) { 2741 ok = js.True == bindings.TryMLGraphBuilderReshape( 2742 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2743 input.Ref(), 2744 newShape.Ref(), 2745 ) 2746 2747 return 2748 } 2749 2750 // HasFuncConv2d returns true if the method "MLGraphBuilder.conv2d" exists. 2751 func (this MLGraphBuilder) HasFuncConv2d() bool { 2752 return js.True == bindings.HasFuncMLGraphBuilderConv2d( 2753 this.ref, 2754 ) 2755 } 2756 2757 // FuncConv2d returns the method "MLGraphBuilder.conv2d". 2758 func (this MLGraphBuilder) FuncConv2d() (fn js.Func[func(input MLOperand, filter MLOperand, options MLConv2dOptions) MLOperand]) { 2759 bindings.FuncMLGraphBuilderConv2d( 2760 this.ref, js.Pointer(&fn), 2761 ) 2762 return 2763 } 2764 2765 // Conv2d calls the method "MLGraphBuilder.conv2d". 2766 func (this MLGraphBuilder) Conv2d(input MLOperand, filter MLOperand, options MLConv2dOptions) (ret MLOperand) { 2767 bindings.CallMLGraphBuilderConv2d( 2768 this.ref, js.Pointer(&ret), 2769 input.Ref(), 2770 filter.Ref(), 2771 js.Pointer(&options), 2772 ) 2773 2774 return 2775 } 2776 2777 // TryConv2d calls the method "MLGraphBuilder.conv2d" 2778 // in a try/catch block and returns (_, err, ok = false) when it went through 2779 // the catch clause. 2780 func (this MLGraphBuilder) TryConv2d(input MLOperand, filter MLOperand, options MLConv2dOptions) (ret MLOperand, exception js.Any, ok bool) { 2781 ok = js.True == bindings.TryMLGraphBuilderConv2d( 2782 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2783 input.Ref(), 2784 filter.Ref(), 2785 js.Pointer(&options), 2786 ) 2787 2788 return 2789 } 2790 2791 // HasFuncConv2d1 returns true if the method "MLGraphBuilder.conv2d" exists. 2792 func (this MLGraphBuilder) HasFuncConv2d1() bool { 2793 return js.True == bindings.HasFuncMLGraphBuilderConv2d1( 2794 this.ref, 2795 ) 2796 } 2797 2798 // FuncConv2d1 returns the method "MLGraphBuilder.conv2d". 2799 func (this MLGraphBuilder) FuncConv2d1() (fn js.Func[func(input MLOperand, filter MLOperand) MLOperand]) { 2800 bindings.FuncMLGraphBuilderConv2d1( 2801 this.ref, js.Pointer(&fn), 2802 ) 2803 return 2804 } 2805 2806 // Conv2d1 calls the method "MLGraphBuilder.conv2d". 2807 func (this MLGraphBuilder) Conv2d1(input MLOperand, filter MLOperand) (ret MLOperand) { 2808 bindings.CallMLGraphBuilderConv2d1( 2809 this.ref, js.Pointer(&ret), 2810 input.Ref(), 2811 filter.Ref(), 2812 ) 2813 2814 return 2815 } 2816 2817 // TryConv2d1 calls the method "MLGraphBuilder.conv2d" 2818 // in a try/catch block and returns (_, err, ok = false) when it went through 2819 // the catch clause. 2820 func (this MLGraphBuilder) TryConv2d1(input MLOperand, filter MLOperand) (ret MLOperand, exception js.Any, ok bool) { 2821 ok = js.True == bindings.TryMLGraphBuilderConv2d1( 2822 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2823 input.Ref(), 2824 filter.Ref(), 2825 ) 2826 2827 return 2828 } 2829 2830 // HasFuncSplit returns true if the method "MLGraphBuilder.split" exists. 2831 func (this MLGraphBuilder) HasFuncSplit() bool { 2832 return js.True == bindings.HasFuncMLGraphBuilderSplit( 2833 this.ref, 2834 ) 2835 } 2836 2837 // FuncSplit returns the method "MLGraphBuilder.split". 2838 func (this MLGraphBuilder) FuncSplit() (fn js.Func[func(input MLOperand, splits OneOf_Uint32_ArrayUint32, options MLSplitOptions) js.Array[MLOperand]]) { 2839 bindings.FuncMLGraphBuilderSplit( 2840 this.ref, js.Pointer(&fn), 2841 ) 2842 return 2843 } 2844 2845 // Split calls the method "MLGraphBuilder.split". 2846 func (this MLGraphBuilder) Split(input MLOperand, splits OneOf_Uint32_ArrayUint32, options MLSplitOptions) (ret js.Array[MLOperand]) { 2847 bindings.CallMLGraphBuilderSplit( 2848 this.ref, js.Pointer(&ret), 2849 input.Ref(), 2850 splits.Ref(), 2851 js.Pointer(&options), 2852 ) 2853 2854 return 2855 } 2856 2857 // TrySplit calls the method "MLGraphBuilder.split" 2858 // in a try/catch block and returns (_, err, ok = false) when it went through 2859 // the catch clause. 2860 func (this MLGraphBuilder) TrySplit(input MLOperand, splits OneOf_Uint32_ArrayUint32, options MLSplitOptions) (ret js.Array[MLOperand], exception js.Any, ok bool) { 2861 ok = js.True == bindings.TryMLGraphBuilderSplit( 2862 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2863 input.Ref(), 2864 splits.Ref(), 2865 js.Pointer(&options), 2866 ) 2867 2868 return 2869 } 2870 2871 // HasFuncSplit1 returns true if the method "MLGraphBuilder.split" exists. 2872 func (this MLGraphBuilder) HasFuncSplit1() bool { 2873 return js.True == bindings.HasFuncMLGraphBuilderSplit1( 2874 this.ref, 2875 ) 2876 } 2877 2878 // FuncSplit1 returns the method "MLGraphBuilder.split". 2879 func (this MLGraphBuilder) FuncSplit1() (fn js.Func[func(input MLOperand, splits OneOf_Uint32_ArrayUint32) js.Array[MLOperand]]) { 2880 bindings.FuncMLGraphBuilderSplit1( 2881 this.ref, js.Pointer(&fn), 2882 ) 2883 return 2884 } 2885 2886 // Split1 calls the method "MLGraphBuilder.split". 2887 func (this MLGraphBuilder) Split1(input MLOperand, splits OneOf_Uint32_ArrayUint32) (ret js.Array[MLOperand]) { 2888 bindings.CallMLGraphBuilderSplit1( 2889 this.ref, js.Pointer(&ret), 2890 input.Ref(), 2891 splits.Ref(), 2892 ) 2893 2894 return 2895 } 2896 2897 // TrySplit1 calls the method "MLGraphBuilder.split" 2898 // in a try/catch block and returns (_, err, ok = false) when it went through 2899 // the catch clause. 2900 func (this MLGraphBuilder) TrySplit1(input MLOperand, splits OneOf_Uint32_ArrayUint32) (ret js.Array[MLOperand], exception js.Any, ok bool) { 2901 ok = js.True == bindings.TryMLGraphBuilderSplit1( 2902 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2903 input.Ref(), 2904 splits.Ref(), 2905 ) 2906 2907 return 2908 } 2909 2910 // HasFuncResample2d returns true if the method "MLGraphBuilder.resample2d" exists. 2911 func (this MLGraphBuilder) HasFuncResample2d() bool { 2912 return js.True == bindings.HasFuncMLGraphBuilderResample2d( 2913 this.ref, 2914 ) 2915 } 2916 2917 // FuncResample2d returns the method "MLGraphBuilder.resample2d". 2918 func (this MLGraphBuilder) FuncResample2d() (fn js.Func[func(input MLOperand, options MLResample2dOptions) MLOperand]) { 2919 bindings.FuncMLGraphBuilderResample2d( 2920 this.ref, js.Pointer(&fn), 2921 ) 2922 return 2923 } 2924 2925 // Resample2d calls the method "MLGraphBuilder.resample2d". 2926 func (this MLGraphBuilder) Resample2d(input MLOperand, options MLResample2dOptions) (ret MLOperand) { 2927 bindings.CallMLGraphBuilderResample2d( 2928 this.ref, js.Pointer(&ret), 2929 input.Ref(), 2930 js.Pointer(&options), 2931 ) 2932 2933 return 2934 } 2935 2936 // TryResample2d calls the method "MLGraphBuilder.resample2d" 2937 // in a try/catch block and returns (_, err, ok = false) when it went through 2938 // the catch clause. 2939 func (this MLGraphBuilder) TryResample2d(input MLOperand, options MLResample2dOptions) (ret MLOperand, exception js.Any, ok bool) { 2940 ok = js.True == bindings.TryMLGraphBuilderResample2d( 2941 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2942 input.Ref(), 2943 js.Pointer(&options), 2944 ) 2945 2946 return 2947 } 2948 2949 // HasFuncResample2d1 returns true if the method "MLGraphBuilder.resample2d" exists. 2950 func (this MLGraphBuilder) HasFuncResample2d1() bool { 2951 return js.True == bindings.HasFuncMLGraphBuilderResample2d1( 2952 this.ref, 2953 ) 2954 } 2955 2956 // FuncResample2d1 returns the method "MLGraphBuilder.resample2d". 2957 func (this MLGraphBuilder) FuncResample2d1() (fn js.Func[func(input MLOperand) MLOperand]) { 2958 bindings.FuncMLGraphBuilderResample2d1( 2959 this.ref, js.Pointer(&fn), 2960 ) 2961 return 2962 } 2963 2964 // Resample2d1 calls the method "MLGraphBuilder.resample2d". 2965 func (this MLGraphBuilder) Resample2d1(input MLOperand) (ret MLOperand) { 2966 bindings.CallMLGraphBuilderResample2d1( 2967 this.ref, js.Pointer(&ret), 2968 input.Ref(), 2969 ) 2970 2971 return 2972 } 2973 2974 // TryResample2d1 calls the method "MLGraphBuilder.resample2d" 2975 // in a try/catch block and returns (_, err, ok = false) when it went through 2976 // the catch clause. 2977 func (this MLGraphBuilder) TryResample2d1(input MLOperand) (ret MLOperand, exception js.Any, ok bool) { 2978 ok = js.True == bindings.TryMLGraphBuilderResample2d1( 2979 this.ref, js.Pointer(&ret), js.Pointer(&exception), 2980 input.Ref(), 2981 ) 2982 2983 return 2984 } 2985 2986 // HasFuncHardSwish returns true if the method "MLGraphBuilder.hardSwish" exists. 2987 func (this MLGraphBuilder) HasFuncHardSwish() bool { 2988 return js.True == bindings.HasFuncMLGraphBuilderHardSwish( 2989 this.ref, 2990 ) 2991 } 2992 2993 // FuncHardSwish returns the method "MLGraphBuilder.hardSwish". 2994 func (this MLGraphBuilder) FuncHardSwish() (fn js.Func[func(input MLOperand) MLOperand]) { 2995 bindings.FuncMLGraphBuilderHardSwish( 2996 this.ref, js.Pointer(&fn), 2997 ) 2998 return 2999 } 3000 3001 // HardSwish calls the method "MLGraphBuilder.hardSwish". 3002 func (this MLGraphBuilder) HardSwish(input MLOperand) (ret MLOperand) { 3003 bindings.CallMLGraphBuilderHardSwish( 3004 this.ref, js.Pointer(&ret), 3005 input.Ref(), 3006 ) 3007 3008 return 3009 } 3010 3011 // TryHardSwish calls the method "MLGraphBuilder.hardSwish" 3012 // in a try/catch block and returns (_, err, ok = false) when it went through 3013 // the catch clause. 3014 func (this MLGraphBuilder) TryHardSwish(input MLOperand) (ret MLOperand, exception js.Any, ok bool) { 3015 ok = js.True == bindings.TryMLGraphBuilderHardSwish( 3016 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3017 input.Ref(), 3018 ) 3019 3020 return 3021 } 3022 3023 // HasFuncHardSwish1 returns true if the method "MLGraphBuilder.hardSwish" exists. 3024 func (this MLGraphBuilder) HasFuncHardSwish1() bool { 3025 return js.True == bindings.HasFuncMLGraphBuilderHardSwish1( 3026 this.ref, 3027 ) 3028 } 3029 3030 // FuncHardSwish1 returns the method "MLGraphBuilder.hardSwish". 3031 func (this MLGraphBuilder) FuncHardSwish1() (fn js.Func[func() MLActivation]) { 3032 bindings.FuncMLGraphBuilderHardSwish1( 3033 this.ref, js.Pointer(&fn), 3034 ) 3035 return 3036 } 3037 3038 // HardSwish1 calls the method "MLGraphBuilder.hardSwish". 3039 func (this MLGraphBuilder) HardSwish1() (ret MLActivation) { 3040 bindings.CallMLGraphBuilderHardSwish1( 3041 this.ref, js.Pointer(&ret), 3042 ) 3043 3044 return 3045 } 3046 3047 // TryHardSwish1 calls the method "MLGraphBuilder.hardSwish" 3048 // in a try/catch block and returns (_, err, ok = false) when it went through 3049 // the catch clause. 3050 func (this MLGraphBuilder) TryHardSwish1() (ret MLActivation, exception js.Any, ok bool) { 3051 ok = js.True == bindings.TryMLGraphBuilderHardSwish1( 3052 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3053 ) 3054 3055 return 3056 } 3057 3058 // HasFuncSoftmax returns true if the method "MLGraphBuilder.softmax" exists. 3059 func (this MLGraphBuilder) HasFuncSoftmax() bool { 3060 return js.True == bindings.HasFuncMLGraphBuilderSoftmax( 3061 this.ref, 3062 ) 3063 } 3064 3065 // FuncSoftmax returns the method "MLGraphBuilder.softmax". 3066 func (this MLGraphBuilder) FuncSoftmax() (fn js.Func[func(input MLOperand) MLOperand]) { 3067 bindings.FuncMLGraphBuilderSoftmax( 3068 this.ref, js.Pointer(&fn), 3069 ) 3070 return 3071 } 3072 3073 // Softmax calls the method "MLGraphBuilder.softmax". 3074 func (this MLGraphBuilder) Softmax(input MLOperand) (ret MLOperand) { 3075 bindings.CallMLGraphBuilderSoftmax( 3076 this.ref, js.Pointer(&ret), 3077 input.Ref(), 3078 ) 3079 3080 return 3081 } 3082 3083 // TrySoftmax calls the method "MLGraphBuilder.softmax" 3084 // in a try/catch block and returns (_, err, ok = false) when it went through 3085 // the catch clause. 3086 func (this MLGraphBuilder) TrySoftmax(input MLOperand) (ret MLOperand, exception js.Any, ok bool) { 3087 ok = js.True == bindings.TryMLGraphBuilderSoftmax( 3088 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3089 input.Ref(), 3090 ) 3091 3092 return 3093 } 3094 3095 // HasFuncSoftmax1 returns true if the method "MLGraphBuilder.softmax" exists. 3096 func (this MLGraphBuilder) HasFuncSoftmax1() bool { 3097 return js.True == bindings.HasFuncMLGraphBuilderSoftmax1( 3098 this.ref, 3099 ) 3100 } 3101 3102 // FuncSoftmax1 returns the method "MLGraphBuilder.softmax". 3103 func (this MLGraphBuilder) FuncSoftmax1() (fn js.Func[func() MLActivation]) { 3104 bindings.FuncMLGraphBuilderSoftmax1( 3105 this.ref, js.Pointer(&fn), 3106 ) 3107 return 3108 } 3109 3110 // Softmax1 calls the method "MLGraphBuilder.softmax". 3111 func (this MLGraphBuilder) Softmax1() (ret MLActivation) { 3112 bindings.CallMLGraphBuilderSoftmax1( 3113 this.ref, js.Pointer(&ret), 3114 ) 3115 3116 return 3117 } 3118 3119 // TrySoftmax1 calls the method "MLGraphBuilder.softmax" 3120 // in a try/catch block and returns (_, err, ok = false) when it went through 3121 // the catch clause. 3122 func (this MLGraphBuilder) TrySoftmax1() (ret MLActivation, exception js.Any, ok bool) { 3123 ok = js.True == bindings.TryMLGraphBuilderSoftmax1( 3124 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3125 ) 3126 3127 return 3128 } 3129 3130 // HasFuncConvTranspose2d returns true if the method "MLGraphBuilder.convTranspose2d" exists. 3131 func (this MLGraphBuilder) HasFuncConvTranspose2d() bool { 3132 return js.True == bindings.HasFuncMLGraphBuilderConvTranspose2d( 3133 this.ref, 3134 ) 3135 } 3136 3137 // FuncConvTranspose2d returns the method "MLGraphBuilder.convTranspose2d". 3138 func (this MLGraphBuilder) FuncConvTranspose2d() (fn js.Func[func(input MLOperand, filter MLOperand, options MLConvTranspose2dOptions) MLOperand]) { 3139 bindings.FuncMLGraphBuilderConvTranspose2d( 3140 this.ref, js.Pointer(&fn), 3141 ) 3142 return 3143 } 3144 3145 // ConvTranspose2d calls the method "MLGraphBuilder.convTranspose2d". 3146 func (this MLGraphBuilder) ConvTranspose2d(input MLOperand, filter MLOperand, options MLConvTranspose2dOptions) (ret MLOperand) { 3147 bindings.CallMLGraphBuilderConvTranspose2d( 3148 this.ref, js.Pointer(&ret), 3149 input.Ref(), 3150 filter.Ref(), 3151 js.Pointer(&options), 3152 ) 3153 3154 return 3155 } 3156 3157 // TryConvTranspose2d calls the method "MLGraphBuilder.convTranspose2d" 3158 // in a try/catch block and returns (_, err, ok = false) when it went through 3159 // the catch clause. 3160 func (this MLGraphBuilder) TryConvTranspose2d(input MLOperand, filter MLOperand, options MLConvTranspose2dOptions) (ret MLOperand, exception js.Any, ok bool) { 3161 ok = js.True == bindings.TryMLGraphBuilderConvTranspose2d( 3162 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3163 input.Ref(), 3164 filter.Ref(), 3165 js.Pointer(&options), 3166 ) 3167 3168 return 3169 } 3170 3171 // HasFuncConvTranspose2d1 returns true if the method "MLGraphBuilder.convTranspose2d" exists. 3172 func (this MLGraphBuilder) HasFuncConvTranspose2d1() bool { 3173 return js.True == bindings.HasFuncMLGraphBuilderConvTranspose2d1( 3174 this.ref, 3175 ) 3176 } 3177 3178 // FuncConvTranspose2d1 returns the method "MLGraphBuilder.convTranspose2d". 3179 func (this MLGraphBuilder) FuncConvTranspose2d1() (fn js.Func[func(input MLOperand, filter MLOperand) MLOperand]) { 3180 bindings.FuncMLGraphBuilderConvTranspose2d1( 3181 this.ref, js.Pointer(&fn), 3182 ) 3183 return 3184 } 3185 3186 // ConvTranspose2d1 calls the method "MLGraphBuilder.convTranspose2d". 3187 func (this MLGraphBuilder) ConvTranspose2d1(input MLOperand, filter MLOperand) (ret MLOperand) { 3188 bindings.CallMLGraphBuilderConvTranspose2d1( 3189 this.ref, js.Pointer(&ret), 3190 input.Ref(), 3191 filter.Ref(), 3192 ) 3193 3194 return 3195 } 3196 3197 // TryConvTranspose2d1 calls the method "MLGraphBuilder.convTranspose2d" 3198 // in a try/catch block and returns (_, err, ok = false) when it went through 3199 // the catch clause. 3200 func (this MLGraphBuilder) TryConvTranspose2d1(input MLOperand, filter MLOperand) (ret MLOperand, exception js.Any, ok bool) { 3201 ok = js.True == bindings.TryMLGraphBuilderConvTranspose2d1( 3202 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3203 input.Ref(), 3204 filter.Ref(), 3205 ) 3206 3207 return 3208 } 3209 3210 // HasFuncRelu returns true if the method "MLGraphBuilder.relu" exists. 3211 func (this MLGraphBuilder) HasFuncRelu() bool { 3212 return js.True == bindings.HasFuncMLGraphBuilderRelu( 3213 this.ref, 3214 ) 3215 } 3216 3217 // FuncRelu returns the method "MLGraphBuilder.relu". 3218 func (this MLGraphBuilder) FuncRelu() (fn js.Func[func(input MLOperand) MLOperand]) { 3219 bindings.FuncMLGraphBuilderRelu( 3220 this.ref, js.Pointer(&fn), 3221 ) 3222 return 3223 } 3224 3225 // Relu calls the method "MLGraphBuilder.relu". 3226 func (this MLGraphBuilder) Relu(input MLOperand) (ret MLOperand) { 3227 bindings.CallMLGraphBuilderRelu( 3228 this.ref, js.Pointer(&ret), 3229 input.Ref(), 3230 ) 3231 3232 return 3233 } 3234 3235 // TryRelu calls the method "MLGraphBuilder.relu" 3236 // in a try/catch block and returns (_, err, ok = false) when it went through 3237 // the catch clause. 3238 func (this MLGraphBuilder) TryRelu(input MLOperand) (ret MLOperand, exception js.Any, ok bool) { 3239 ok = js.True == bindings.TryMLGraphBuilderRelu( 3240 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3241 input.Ref(), 3242 ) 3243 3244 return 3245 } 3246 3247 // HasFuncRelu1 returns true if the method "MLGraphBuilder.relu" exists. 3248 func (this MLGraphBuilder) HasFuncRelu1() bool { 3249 return js.True == bindings.HasFuncMLGraphBuilderRelu1( 3250 this.ref, 3251 ) 3252 } 3253 3254 // FuncRelu1 returns the method "MLGraphBuilder.relu". 3255 func (this MLGraphBuilder) FuncRelu1() (fn js.Func[func() MLActivation]) { 3256 bindings.FuncMLGraphBuilderRelu1( 3257 this.ref, js.Pointer(&fn), 3258 ) 3259 return 3260 } 3261 3262 // Relu1 calls the method "MLGraphBuilder.relu". 3263 func (this MLGraphBuilder) Relu1() (ret MLActivation) { 3264 bindings.CallMLGraphBuilderRelu1( 3265 this.ref, js.Pointer(&ret), 3266 ) 3267 3268 return 3269 } 3270 3271 // TryRelu1 calls the method "MLGraphBuilder.relu" 3272 // in a try/catch block and returns (_, err, ok = false) when it went through 3273 // the catch clause. 3274 func (this MLGraphBuilder) TryRelu1() (ret MLActivation, exception js.Any, ok bool) { 3275 ok = js.True == bindings.TryMLGraphBuilderRelu1( 3276 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3277 ) 3278 3279 return 3280 } 3281 3282 // HasFuncAdd returns true if the method "MLGraphBuilder.add" exists. 3283 func (this MLGraphBuilder) HasFuncAdd() bool { 3284 return js.True == bindings.HasFuncMLGraphBuilderAdd( 3285 this.ref, 3286 ) 3287 } 3288 3289 // FuncAdd returns the method "MLGraphBuilder.add". 3290 func (this MLGraphBuilder) FuncAdd() (fn js.Func[func(a MLOperand, b MLOperand) MLOperand]) { 3291 bindings.FuncMLGraphBuilderAdd( 3292 this.ref, js.Pointer(&fn), 3293 ) 3294 return 3295 } 3296 3297 // Add calls the method "MLGraphBuilder.add". 3298 func (this MLGraphBuilder) Add(a MLOperand, b MLOperand) (ret MLOperand) { 3299 bindings.CallMLGraphBuilderAdd( 3300 this.ref, js.Pointer(&ret), 3301 a.Ref(), 3302 b.Ref(), 3303 ) 3304 3305 return 3306 } 3307 3308 // TryAdd calls the method "MLGraphBuilder.add" 3309 // in a try/catch block and returns (_, err, ok = false) when it went through 3310 // the catch clause. 3311 func (this MLGraphBuilder) TryAdd(a MLOperand, b MLOperand) (ret MLOperand, exception js.Any, ok bool) { 3312 ok = js.True == bindings.TryMLGraphBuilderAdd( 3313 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3314 a.Ref(), 3315 b.Ref(), 3316 ) 3317 3318 return 3319 } 3320 3321 // HasFuncSub returns true if the method "MLGraphBuilder.sub" exists. 3322 func (this MLGraphBuilder) HasFuncSub() bool { 3323 return js.True == bindings.HasFuncMLGraphBuilderSub( 3324 this.ref, 3325 ) 3326 } 3327 3328 // FuncSub returns the method "MLGraphBuilder.sub". 3329 func (this MLGraphBuilder) FuncSub() (fn js.Func[func(a MLOperand, b MLOperand) MLOperand]) { 3330 bindings.FuncMLGraphBuilderSub( 3331 this.ref, js.Pointer(&fn), 3332 ) 3333 return 3334 } 3335 3336 // Sub calls the method "MLGraphBuilder.sub". 3337 func (this MLGraphBuilder) Sub(a MLOperand, b MLOperand) (ret MLOperand) { 3338 bindings.CallMLGraphBuilderSub( 3339 this.ref, js.Pointer(&ret), 3340 a.Ref(), 3341 b.Ref(), 3342 ) 3343 3344 return 3345 } 3346 3347 // TrySub calls the method "MLGraphBuilder.sub" 3348 // in a try/catch block and returns (_, err, ok = false) when it went through 3349 // the catch clause. 3350 func (this MLGraphBuilder) TrySub(a MLOperand, b MLOperand) (ret MLOperand, exception js.Any, ok bool) { 3351 ok = js.True == bindings.TryMLGraphBuilderSub( 3352 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3353 a.Ref(), 3354 b.Ref(), 3355 ) 3356 3357 return 3358 } 3359 3360 // HasFuncMul returns true if the method "MLGraphBuilder.mul" exists. 3361 func (this MLGraphBuilder) HasFuncMul() bool { 3362 return js.True == bindings.HasFuncMLGraphBuilderMul( 3363 this.ref, 3364 ) 3365 } 3366 3367 // FuncMul returns the method "MLGraphBuilder.mul". 3368 func (this MLGraphBuilder) FuncMul() (fn js.Func[func(a MLOperand, b MLOperand) MLOperand]) { 3369 bindings.FuncMLGraphBuilderMul( 3370 this.ref, js.Pointer(&fn), 3371 ) 3372 return 3373 } 3374 3375 // Mul calls the method "MLGraphBuilder.mul". 3376 func (this MLGraphBuilder) Mul(a MLOperand, b MLOperand) (ret MLOperand) { 3377 bindings.CallMLGraphBuilderMul( 3378 this.ref, js.Pointer(&ret), 3379 a.Ref(), 3380 b.Ref(), 3381 ) 3382 3383 return 3384 } 3385 3386 // TryMul calls the method "MLGraphBuilder.mul" 3387 // in a try/catch block and returns (_, err, ok = false) when it went through 3388 // the catch clause. 3389 func (this MLGraphBuilder) TryMul(a MLOperand, b MLOperand) (ret MLOperand, exception js.Any, ok bool) { 3390 ok = js.True == bindings.TryMLGraphBuilderMul( 3391 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3392 a.Ref(), 3393 b.Ref(), 3394 ) 3395 3396 return 3397 } 3398 3399 // HasFuncDiv returns true if the method "MLGraphBuilder.div" exists. 3400 func (this MLGraphBuilder) HasFuncDiv() bool { 3401 return js.True == bindings.HasFuncMLGraphBuilderDiv( 3402 this.ref, 3403 ) 3404 } 3405 3406 // FuncDiv returns the method "MLGraphBuilder.div". 3407 func (this MLGraphBuilder) FuncDiv() (fn js.Func[func(a MLOperand, b MLOperand) MLOperand]) { 3408 bindings.FuncMLGraphBuilderDiv( 3409 this.ref, js.Pointer(&fn), 3410 ) 3411 return 3412 } 3413 3414 // Div calls the method "MLGraphBuilder.div". 3415 func (this MLGraphBuilder) Div(a MLOperand, b MLOperand) (ret MLOperand) { 3416 bindings.CallMLGraphBuilderDiv( 3417 this.ref, js.Pointer(&ret), 3418 a.Ref(), 3419 b.Ref(), 3420 ) 3421 3422 return 3423 } 3424 3425 // TryDiv calls the method "MLGraphBuilder.div" 3426 // in a try/catch block and returns (_, err, ok = false) when it went through 3427 // the catch clause. 3428 func (this MLGraphBuilder) TryDiv(a MLOperand, b MLOperand) (ret MLOperand, exception js.Any, ok bool) { 3429 ok = js.True == bindings.TryMLGraphBuilderDiv( 3430 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3431 a.Ref(), 3432 b.Ref(), 3433 ) 3434 3435 return 3436 } 3437 3438 // HasFuncMax returns true if the method "MLGraphBuilder.max" exists. 3439 func (this MLGraphBuilder) HasFuncMax() bool { 3440 return js.True == bindings.HasFuncMLGraphBuilderMax( 3441 this.ref, 3442 ) 3443 } 3444 3445 // FuncMax returns the method "MLGraphBuilder.max". 3446 func (this MLGraphBuilder) FuncMax() (fn js.Func[func(a MLOperand, b MLOperand) MLOperand]) { 3447 bindings.FuncMLGraphBuilderMax( 3448 this.ref, js.Pointer(&fn), 3449 ) 3450 return 3451 } 3452 3453 // Max calls the method "MLGraphBuilder.max". 3454 func (this MLGraphBuilder) Max(a MLOperand, b MLOperand) (ret MLOperand) { 3455 bindings.CallMLGraphBuilderMax( 3456 this.ref, js.Pointer(&ret), 3457 a.Ref(), 3458 b.Ref(), 3459 ) 3460 3461 return 3462 } 3463 3464 // TryMax calls the method "MLGraphBuilder.max" 3465 // in a try/catch block and returns (_, err, ok = false) when it went through 3466 // the catch clause. 3467 func (this MLGraphBuilder) TryMax(a MLOperand, b MLOperand) (ret MLOperand, exception js.Any, ok bool) { 3468 ok = js.True == bindings.TryMLGraphBuilderMax( 3469 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3470 a.Ref(), 3471 b.Ref(), 3472 ) 3473 3474 return 3475 } 3476 3477 // HasFuncMin returns true if the method "MLGraphBuilder.min" exists. 3478 func (this MLGraphBuilder) HasFuncMin() bool { 3479 return js.True == bindings.HasFuncMLGraphBuilderMin( 3480 this.ref, 3481 ) 3482 } 3483 3484 // FuncMin returns the method "MLGraphBuilder.min". 3485 func (this MLGraphBuilder) FuncMin() (fn js.Func[func(a MLOperand, b MLOperand) MLOperand]) { 3486 bindings.FuncMLGraphBuilderMin( 3487 this.ref, js.Pointer(&fn), 3488 ) 3489 return 3490 } 3491 3492 // Min calls the method "MLGraphBuilder.min". 3493 func (this MLGraphBuilder) Min(a MLOperand, b MLOperand) (ret MLOperand) { 3494 bindings.CallMLGraphBuilderMin( 3495 this.ref, js.Pointer(&ret), 3496 a.Ref(), 3497 b.Ref(), 3498 ) 3499 3500 return 3501 } 3502 3503 // TryMin calls the method "MLGraphBuilder.min" 3504 // in a try/catch block and returns (_, err, ok = false) when it went through 3505 // the catch clause. 3506 func (this MLGraphBuilder) TryMin(a MLOperand, b MLOperand) (ret MLOperand, exception js.Any, ok bool) { 3507 ok = js.True == bindings.TryMLGraphBuilderMin( 3508 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3509 a.Ref(), 3510 b.Ref(), 3511 ) 3512 3513 return 3514 } 3515 3516 // HasFuncPow returns true if the method "MLGraphBuilder.pow" exists. 3517 func (this MLGraphBuilder) HasFuncPow() bool { 3518 return js.True == bindings.HasFuncMLGraphBuilderPow( 3519 this.ref, 3520 ) 3521 } 3522 3523 // FuncPow returns the method "MLGraphBuilder.pow". 3524 func (this MLGraphBuilder) FuncPow() (fn js.Func[func(a MLOperand, b MLOperand) MLOperand]) { 3525 bindings.FuncMLGraphBuilderPow( 3526 this.ref, js.Pointer(&fn), 3527 ) 3528 return 3529 } 3530 3531 // Pow calls the method "MLGraphBuilder.pow". 3532 func (this MLGraphBuilder) Pow(a MLOperand, b MLOperand) (ret MLOperand) { 3533 bindings.CallMLGraphBuilderPow( 3534 this.ref, js.Pointer(&ret), 3535 a.Ref(), 3536 b.Ref(), 3537 ) 3538 3539 return 3540 } 3541 3542 // TryPow calls the method "MLGraphBuilder.pow" 3543 // in a try/catch block and returns (_, err, ok = false) when it went through 3544 // the catch clause. 3545 func (this MLGraphBuilder) TryPow(a MLOperand, b MLOperand) (ret MLOperand, exception js.Any, ok bool) { 3546 ok = js.True == bindings.TryMLGraphBuilderPow( 3547 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3548 a.Ref(), 3549 b.Ref(), 3550 ) 3551 3552 return 3553 } 3554 3555 // HasFuncReduceL1 returns true if the method "MLGraphBuilder.reduceL1" exists. 3556 func (this MLGraphBuilder) HasFuncReduceL1() bool { 3557 return js.True == bindings.HasFuncMLGraphBuilderReduceL1( 3558 this.ref, 3559 ) 3560 } 3561 3562 // FuncReduceL1 returns the method "MLGraphBuilder.reduceL1". 3563 func (this MLGraphBuilder) FuncReduceL1() (fn js.Func[func(input MLOperand, options MLReduceOptions) MLOperand]) { 3564 bindings.FuncMLGraphBuilderReduceL1( 3565 this.ref, js.Pointer(&fn), 3566 ) 3567 return 3568 } 3569 3570 // ReduceL1 calls the method "MLGraphBuilder.reduceL1". 3571 func (this MLGraphBuilder) ReduceL1(input MLOperand, options MLReduceOptions) (ret MLOperand) { 3572 bindings.CallMLGraphBuilderReduceL1( 3573 this.ref, js.Pointer(&ret), 3574 input.Ref(), 3575 js.Pointer(&options), 3576 ) 3577 3578 return 3579 } 3580 3581 // TryReduceL1 calls the method "MLGraphBuilder.reduceL1" 3582 // in a try/catch block and returns (_, err, ok = false) when it went through 3583 // the catch clause. 3584 func (this MLGraphBuilder) TryReduceL1(input MLOperand, options MLReduceOptions) (ret MLOperand, exception js.Any, ok bool) { 3585 ok = js.True == bindings.TryMLGraphBuilderReduceL1( 3586 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3587 input.Ref(), 3588 js.Pointer(&options), 3589 ) 3590 3591 return 3592 } 3593 3594 // HasFuncReduceL11 returns true if the method "MLGraphBuilder.reduceL1" exists. 3595 func (this MLGraphBuilder) HasFuncReduceL11() bool { 3596 return js.True == bindings.HasFuncMLGraphBuilderReduceL11( 3597 this.ref, 3598 ) 3599 } 3600 3601 // FuncReduceL11 returns the method "MLGraphBuilder.reduceL1". 3602 func (this MLGraphBuilder) FuncReduceL11() (fn js.Func[func(input MLOperand) MLOperand]) { 3603 bindings.FuncMLGraphBuilderReduceL11( 3604 this.ref, js.Pointer(&fn), 3605 ) 3606 return 3607 } 3608 3609 // ReduceL11 calls the method "MLGraphBuilder.reduceL1". 3610 func (this MLGraphBuilder) ReduceL11(input MLOperand) (ret MLOperand) { 3611 bindings.CallMLGraphBuilderReduceL11( 3612 this.ref, js.Pointer(&ret), 3613 input.Ref(), 3614 ) 3615 3616 return 3617 } 3618 3619 // TryReduceL11 calls the method "MLGraphBuilder.reduceL1" 3620 // in a try/catch block and returns (_, err, ok = false) when it went through 3621 // the catch clause. 3622 func (this MLGraphBuilder) TryReduceL11(input MLOperand) (ret MLOperand, exception js.Any, ok bool) { 3623 ok = js.True == bindings.TryMLGraphBuilderReduceL11( 3624 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3625 input.Ref(), 3626 ) 3627 3628 return 3629 } 3630 3631 // HasFuncReduceL2 returns true if the method "MLGraphBuilder.reduceL2" exists. 3632 func (this MLGraphBuilder) HasFuncReduceL2() bool { 3633 return js.True == bindings.HasFuncMLGraphBuilderReduceL2( 3634 this.ref, 3635 ) 3636 } 3637 3638 // FuncReduceL2 returns the method "MLGraphBuilder.reduceL2". 3639 func (this MLGraphBuilder) FuncReduceL2() (fn js.Func[func(input MLOperand, options MLReduceOptions) MLOperand]) { 3640 bindings.FuncMLGraphBuilderReduceL2( 3641 this.ref, js.Pointer(&fn), 3642 ) 3643 return 3644 } 3645 3646 // ReduceL2 calls the method "MLGraphBuilder.reduceL2". 3647 func (this MLGraphBuilder) ReduceL2(input MLOperand, options MLReduceOptions) (ret MLOperand) { 3648 bindings.CallMLGraphBuilderReduceL2( 3649 this.ref, js.Pointer(&ret), 3650 input.Ref(), 3651 js.Pointer(&options), 3652 ) 3653 3654 return 3655 } 3656 3657 // TryReduceL2 calls the method "MLGraphBuilder.reduceL2" 3658 // in a try/catch block and returns (_, err, ok = false) when it went through 3659 // the catch clause. 3660 func (this MLGraphBuilder) TryReduceL2(input MLOperand, options MLReduceOptions) (ret MLOperand, exception js.Any, ok bool) { 3661 ok = js.True == bindings.TryMLGraphBuilderReduceL2( 3662 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3663 input.Ref(), 3664 js.Pointer(&options), 3665 ) 3666 3667 return 3668 } 3669 3670 // HasFuncReduceL21 returns true if the method "MLGraphBuilder.reduceL2" exists. 3671 func (this MLGraphBuilder) HasFuncReduceL21() bool { 3672 return js.True == bindings.HasFuncMLGraphBuilderReduceL21( 3673 this.ref, 3674 ) 3675 } 3676 3677 // FuncReduceL21 returns the method "MLGraphBuilder.reduceL2". 3678 func (this MLGraphBuilder) FuncReduceL21() (fn js.Func[func(input MLOperand) MLOperand]) { 3679 bindings.FuncMLGraphBuilderReduceL21( 3680 this.ref, js.Pointer(&fn), 3681 ) 3682 return 3683 } 3684 3685 // ReduceL21 calls the method "MLGraphBuilder.reduceL2". 3686 func (this MLGraphBuilder) ReduceL21(input MLOperand) (ret MLOperand) { 3687 bindings.CallMLGraphBuilderReduceL21( 3688 this.ref, js.Pointer(&ret), 3689 input.Ref(), 3690 ) 3691 3692 return 3693 } 3694 3695 // TryReduceL21 calls the method "MLGraphBuilder.reduceL2" 3696 // in a try/catch block and returns (_, err, ok = false) when it went through 3697 // the catch clause. 3698 func (this MLGraphBuilder) TryReduceL21(input MLOperand) (ret MLOperand, exception js.Any, ok bool) { 3699 ok = js.True == bindings.TryMLGraphBuilderReduceL21( 3700 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3701 input.Ref(), 3702 ) 3703 3704 return 3705 } 3706 3707 // HasFuncReduceLogSum returns true if the method "MLGraphBuilder.reduceLogSum" exists. 3708 func (this MLGraphBuilder) HasFuncReduceLogSum() bool { 3709 return js.True == bindings.HasFuncMLGraphBuilderReduceLogSum( 3710 this.ref, 3711 ) 3712 } 3713 3714 // FuncReduceLogSum returns the method "MLGraphBuilder.reduceLogSum". 3715 func (this MLGraphBuilder) FuncReduceLogSum() (fn js.Func[func(input MLOperand, options MLReduceOptions) MLOperand]) { 3716 bindings.FuncMLGraphBuilderReduceLogSum( 3717 this.ref, js.Pointer(&fn), 3718 ) 3719 return 3720 } 3721 3722 // ReduceLogSum calls the method "MLGraphBuilder.reduceLogSum". 3723 func (this MLGraphBuilder) ReduceLogSum(input MLOperand, options MLReduceOptions) (ret MLOperand) { 3724 bindings.CallMLGraphBuilderReduceLogSum( 3725 this.ref, js.Pointer(&ret), 3726 input.Ref(), 3727 js.Pointer(&options), 3728 ) 3729 3730 return 3731 } 3732 3733 // TryReduceLogSum calls the method "MLGraphBuilder.reduceLogSum" 3734 // in a try/catch block and returns (_, err, ok = false) when it went through 3735 // the catch clause. 3736 func (this MLGraphBuilder) TryReduceLogSum(input MLOperand, options MLReduceOptions) (ret MLOperand, exception js.Any, ok bool) { 3737 ok = js.True == bindings.TryMLGraphBuilderReduceLogSum( 3738 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3739 input.Ref(), 3740 js.Pointer(&options), 3741 ) 3742 3743 return 3744 } 3745 3746 // HasFuncReduceLogSum1 returns true if the method "MLGraphBuilder.reduceLogSum" exists. 3747 func (this MLGraphBuilder) HasFuncReduceLogSum1() bool { 3748 return js.True == bindings.HasFuncMLGraphBuilderReduceLogSum1( 3749 this.ref, 3750 ) 3751 } 3752 3753 // FuncReduceLogSum1 returns the method "MLGraphBuilder.reduceLogSum". 3754 func (this MLGraphBuilder) FuncReduceLogSum1() (fn js.Func[func(input MLOperand) MLOperand]) { 3755 bindings.FuncMLGraphBuilderReduceLogSum1( 3756 this.ref, js.Pointer(&fn), 3757 ) 3758 return 3759 } 3760 3761 // ReduceLogSum1 calls the method "MLGraphBuilder.reduceLogSum". 3762 func (this MLGraphBuilder) ReduceLogSum1(input MLOperand) (ret MLOperand) { 3763 bindings.CallMLGraphBuilderReduceLogSum1( 3764 this.ref, js.Pointer(&ret), 3765 input.Ref(), 3766 ) 3767 3768 return 3769 } 3770 3771 // TryReduceLogSum1 calls the method "MLGraphBuilder.reduceLogSum" 3772 // in a try/catch block and returns (_, err, ok = false) when it went through 3773 // the catch clause. 3774 func (this MLGraphBuilder) TryReduceLogSum1(input MLOperand) (ret MLOperand, exception js.Any, ok bool) { 3775 ok = js.True == bindings.TryMLGraphBuilderReduceLogSum1( 3776 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3777 input.Ref(), 3778 ) 3779 3780 return 3781 } 3782 3783 // HasFuncReduceLogSumExp returns true if the method "MLGraphBuilder.reduceLogSumExp" exists. 3784 func (this MLGraphBuilder) HasFuncReduceLogSumExp() bool { 3785 return js.True == bindings.HasFuncMLGraphBuilderReduceLogSumExp( 3786 this.ref, 3787 ) 3788 } 3789 3790 // FuncReduceLogSumExp returns the method "MLGraphBuilder.reduceLogSumExp". 3791 func (this MLGraphBuilder) FuncReduceLogSumExp() (fn js.Func[func(input MLOperand, options MLReduceOptions) MLOperand]) { 3792 bindings.FuncMLGraphBuilderReduceLogSumExp( 3793 this.ref, js.Pointer(&fn), 3794 ) 3795 return 3796 } 3797 3798 // ReduceLogSumExp calls the method "MLGraphBuilder.reduceLogSumExp". 3799 func (this MLGraphBuilder) ReduceLogSumExp(input MLOperand, options MLReduceOptions) (ret MLOperand) { 3800 bindings.CallMLGraphBuilderReduceLogSumExp( 3801 this.ref, js.Pointer(&ret), 3802 input.Ref(), 3803 js.Pointer(&options), 3804 ) 3805 3806 return 3807 } 3808 3809 // TryReduceLogSumExp calls the method "MLGraphBuilder.reduceLogSumExp" 3810 // in a try/catch block and returns (_, err, ok = false) when it went through 3811 // the catch clause. 3812 func (this MLGraphBuilder) TryReduceLogSumExp(input MLOperand, options MLReduceOptions) (ret MLOperand, exception js.Any, ok bool) { 3813 ok = js.True == bindings.TryMLGraphBuilderReduceLogSumExp( 3814 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3815 input.Ref(), 3816 js.Pointer(&options), 3817 ) 3818 3819 return 3820 } 3821 3822 // HasFuncReduceLogSumExp1 returns true if the method "MLGraphBuilder.reduceLogSumExp" exists. 3823 func (this MLGraphBuilder) HasFuncReduceLogSumExp1() bool { 3824 return js.True == bindings.HasFuncMLGraphBuilderReduceLogSumExp1( 3825 this.ref, 3826 ) 3827 } 3828 3829 // FuncReduceLogSumExp1 returns the method "MLGraphBuilder.reduceLogSumExp". 3830 func (this MLGraphBuilder) FuncReduceLogSumExp1() (fn js.Func[func(input MLOperand) MLOperand]) { 3831 bindings.FuncMLGraphBuilderReduceLogSumExp1( 3832 this.ref, js.Pointer(&fn), 3833 ) 3834 return 3835 } 3836 3837 // ReduceLogSumExp1 calls the method "MLGraphBuilder.reduceLogSumExp". 3838 func (this MLGraphBuilder) ReduceLogSumExp1(input MLOperand) (ret MLOperand) { 3839 bindings.CallMLGraphBuilderReduceLogSumExp1( 3840 this.ref, js.Pointer(&ret), 3841 input.Ref(), 3842 ) 3843 3844 return 3845 } 3846 3847 // TryReduceLogSumExp1 calls the method "MLGraphBuilder.reduceLogSumExp" 3848 // in a try/catch block and returns (_, err, ok = false) when it went through 3849 // the catch clause. 3850 func (this MLGraphBuilder) TryReduceLogSumExp1(input MLOperand) (ret MLOperand, exception js.Any, ok bool) { 3851 ok = js.True == bindings.TryMLGraphBuilderReduceLogSumExp1( 3852 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3853 input.Ref(), 3854 ) 3855 3856 return 3857 } 3858 3859 // HasFuncReduceMax returns true if the method "MLGraphBuilder.reduceMax" exists. 3860 func (this MLGraphBuilder) HasFuncReduceMax() bool { 3861 return js.True == bindings.HasFuncMLGraphBuilderReduceMax( 3862 this.ref, 3863 ) 3864 } 3865 3866 // FuncReduceMax returns the method "MLGraphBuilder.reduceMax". 3867 func (this MLGraphBuilder) FuncReduceMax() (fn js.Func[func(input MLOperand, options MLReduceOptions) MLOperand]) { 3868 bindings.FuncMLGraphBuilderReduceMax( 3869 this.ref, js.Pointer(&fn), 3870 ) 3871 return 3872 } 3873 3874 // ReduceMax calls the method "MLGraphBuilder.reduceMax". 3875 func (this MLGraphBuilder) ReduceMax(input MLOperand, options MLReduceOptions) (ret MLOperand) { 3876 bindings.CallMLGraphBuilderReduceMax( 3877 this.ref, js.Pointer(&ret), 3878 input.Ref(), 3879 js.Pointer(&options), 3880 ) 3881 3882 return 3883 } 3884 3885 // TryReduceMax calls the method "MLGraphBuilder.reduceMax" 3886 // in a try/catch block and returns (_, err, ok = false) when it went through 3887 // the catch clause. 3888 func (this MLGraphBuilder) TryReduceMax(input MLOperand, options MLReduceOptions) (ret MLOperand, exception js.Any, ok bool) { 3889 ok = js.True == bindings.TryMLGraphBuilderReduceMax( 3890 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3891 input.Ref(), 3892 js.Pointer(&options), 3893 ) 3894 3895 return 3896 } 3897 3898 // HasFuncReduceMax1 returns true if the method "MLGraphBuilder.reduceMax" exists. 3899 func (this MLGraphBuilder) HasFuncReduceMax1() bool { 3900 return js.True == bindings.HasFuncMLGraphBuilderReduceMax1( 3901 this.ref, 3902 ) 3903 } 3904 3905 // FuncReduceMax1 returns the method "MLGraphBuilder.reduceMax". 3906 func (this MLGraphBuilder) FuncReduceMax1() (fn js.Func[func(input MLOperand) MLOperand]) { 3907 bindings.FuncMLGraphBuilderReduceMax1( 3908 this.ref, js.Pointer(&fn), 3909 ) 3910 return 3911 } 3912 3913 // ReduceMax1 calls the method "MLGraphBuilder.reduceMax". 3914 func (this MLGraphBuilder) ReduceMax1(input MLOperand) (ret MLOperand) { 3915 bindings.CallMLGraphBuilderReduceMax1( 3916 this.ref, js.Pointer(&ret), 3917 input.Ref(), 3918 ) 3919 3920 return 3921 } 3922 3923 // TryReduceMax1 calls the method "MLGraphBuilder.reduceMax" 3924 // in a try/catch block and returns (_, err, ok = false) when it went through 3925 // the catch clause. 3926 func (this MLGraphBuilder) TryReduceMax1(input MLOperand) (ret MLOperand, exception js.Any, ok bool) { 3927 ok = js.True == bindings.TryMLGraphBuilderReduceMax1( 3928 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3929 input.Ref(), 3930 ) 3931 3932 return 3933 } 3934 3935 // HasFuncReduceMean returns true if the method "MLGraphBuilder.reduceMean" exists. 3936 func (this MLGraphBuilder) HasFuncReduceMean() bool { 3937 return js.True == bindings.HasFuncMLGraphBuilderReduceMean( 3938 this.ref, 3939 ) 3940 } 3941 3942 // FuncReduceMean returns the method "MLGraphBuilder.reduceMean". 3943 func (this MLGraphBuilder) FuncReduceMean() (fn js.Func[func(input MLOperand, options MLReduceOptions) MLOperand]) { 3944 bindings.FuncMLGraphBuilderReduceMean( 3945 this.ref, js.Pointer(&fn), 3946 ) 3947 return 3948 } 3949 3950 // ReduceMean calls the method "MLGraphBuilder.reduceMean". 3951 func (this MLGraphBuilder) ReduceMean(input MLOperand, options MLReduceOptions) (ret MLOperand) { 3952 bindings.CallMLGraphBuilderReduceMean( 3953 this.ref, js.Pointer(&ret), 3954 input.Ref(), 3955 js.Pointer(&options), 3956 ) 3957 3958 return 3959 } 3960 3961 // TryReduceMean calls the method "MLGraphBuilder.reduceMean" 3962 // in a try/catch block and returns (_, err, ok = false) when it went through 3963 // the catch clause. 3964 func (this MLGraphBuilder) TryReduceMean(input MLOperand, options MLReduceOptions) (ret MLOperand, exception js.Any, ok bool) { 3965 ok = js.True == bindings.TryMLGraphBuilderReduceMean( 3966 this.ref, js.Pointer(&ret), js.Pointer(&exception), 3967 input.Ref(), 3968 js.Pointer(&options), 3969 ) 3970 3971 return 3972 } 3973 3974 // HasFuncReduceMean1 returns true if the method "MLGraphBuilder.reduceMean" exists. 3975 func (this MLGraphBuilder) HasFuncReduceMean1() bool { 3976 return js.True == bindings.HasFuncMLGraphBuilderReduceMean1( 3977 this.ref, 3978 ) 3979 } 3980 3981 // FuncReduceMean1 returns the method "MLGraphBuilder.reduceMean". 3982 func (this MLGraphBuilder) FuncReduceMean1() (fn js.Func[func(input MLOperand) MLOperand]) { 3983 bindings.FuncMLGraphBuilderReduceMean1( 3984 this.ref, js.Pointer(&fn), 3985 ) 3986 return 3987 } 3988 3989 // ReduceMean1 calls the method "MLGraphBuilder.reduceMean". 3990 func (this MLGraphBuilder) ReduceMean1(input MLOperand) (ret MLOperand) { 3991 bindings.CallMLGraphBuilderReduceMean1( 3992 this.ref, js.Pointer(&ret), 3993 input.Ref(), 3994 ) 3995 3996 return 3997 } 3998 3999 // TryReduceMean1 calls the method "MLGraphBuilder.reduceMean" 4000 // in a try/catch block and returns (_, err, ok = false) when it went through 4001 // the catch clause. 4002 func (this MLGraphBuilder) TryReduceMean1(input MLOperand) (ret MLOperand, exception js.Any, ok bool) { 4003 ok = js.True == bindings.TryMLGraphBuilderReduceMean1( 4004 this.ref, js.Pointer(&ret), js.Pointer(&exception), 4005 input.Ref(), 4006 ) 4007 4008 return 4009 } 4010 4011 // HasFuncReduceMin returns true if the method "MLGraphBuilder.reduceMin" exists. 4012 func (this MLGraphBuilder) HasFuncReduceMin() bool { 4013 return js.True == bindings.HasFuncMLGraphBuilderReduceMin( 4014 this.ref, 4015 ) 4016 } 4017 4018 // FuncReduceMin returns the method "MLGraphBuilder.reduceMin". 4019 func (this MLGraphBuilder) FuncReduceMin() (fn js.Func[func(input MLOperand, options MLReduceOptions) MLOperand]) { 4020 bindings.FuncMLGraphBuilderReduceMin( 4021 this.ref, js.Pointer(&fn), 4022 ) 4023 return 4024 } 4025 4026 // ReduceMin calls the method "MLGraphBuilder.reduceMin". 4027 func (this MLGraphBuilder) ReduceMin(input MLOperand, options MLReduceOptions) (ret MLOperand) { 4028 bindings.CallMLGraphBuilderReduceMin( 4029 this.ref, js.Pointer(&ret), 4030 input.Ref(), 4031 js.Pointer(&options), 4032 ) 4033 4034 return 4035 } 4036 4037 // TryReduceMin calls the method "MLGraphBuilder.reduceMin" 4038 // in a try/catch block and returns (_, err, ok = false) when it went through 4039 // the catch clause. 4040 func (this MLGraphBuilder) TryReduceMin(input MLOperand, options MLReduceOptions) (ret MLOperand, exception js.Any, ok bool) { 4041 ok = js.True == bindings.TryMLGraphBuilderReduceMin( 4042 this.ref, js.Pointer(&ret), js.Pointer(&exception), 4043 input.Ref(), 4044 js.Pointer(&options), 4045 ) 4046 4047 return 4048 } 4049 4050 // HasFuncReduceMin1 returns true if the method "MLGraphBuilder.reduceMin" exists. 4051 func (this MLGraphBuilder) HasFuncReduceMin1() bool { 4052 return js.True == bindings.HasFuncMLGraphBuilderReduceMin1( 4053 this.ref, 4054 ) 4055 } 4056 4057 // FuncReduceMin1 returns the method "MLGraphBuilder.reduceMin". 4058 func (this MLGraphBuilder) FuncReduceMin1() (fn js.Func[func(input MLOperand) MLOperand]) { 4059 bindings.FuncMLGraphBuilderReduceMin1( 4060 this.ref, js.Pointer(&fn), 4061 ) 4062 return 4063 } 4064 4065 // ReduceMin1 calls the method "MLGraphBuilder.reduceMin". 4066 func (this MLGraphBuilder) ReduceMin1(input MLOperand) (ret MLOperand) { 4067 bindings.CallMLGraphBuilderReduceMin1( 4068 this.ref, js.Pointer(&ret), 4069 input.Ref(), 4070 ) 4071 4072 return 4073 } 4074 4075 // TryReduceMin1 calls the method "MLGraphBuilder.reduceMin" 4076 // in a try/catch block and returns (_, err, ok = false) when it went through 4077 // the catch clause. 4078 func (this MLGraphBuilder) TryReduceMin1(input MLOperand) (ret MLOperand, exception js.Any, ok bool) { 4079 ok = js.True == bindings.TryMLGraphBuilderReduceMin1( 4080 this.ref, js.Pointer(&ret), js.Pointer(&exception), 4081 input.Ref(), 4082 ) 4083 4084 return 4085 } 4086 4087 // HasFuncReduceProduct returns true if the method "MLGraphBuilder.reduceProduct" exists. 4088 func (this MLGraphBuilder) HasFuncReduceProduct() bool { 4089 return js.True == bindings.HasFuncMLGraphBuilderReduceProduct( 4090 this.ref, 4091 ) 4092 } 4093 4094 // FuncReduceProduct returns the method "MLGraphBuilder.reduceProduct". 4095 func (this MLGraphBuilder) FuncReduceProduct() (fn js.Func[func(input MLOperand, options MLReduceOptions) MLOperand]) { 4096 bindings.FuncMLGraphBuilderReduceProduct( 4097 this.ref, js.Pointer(&fn), 4098 ) 4099 return 4100 } 4101 4102 // ReduceProduct calls the method "MLGraphBuilder.reduceProduct". 4103 func (this MLGraphBuilder) ReduceProduct(input MLOperand, options MLReduceOptions) (ret MLOperand) { 4104 bindings.CallMLGraphBuilderReduceProduct( 4105 this.ref, js.Pointer(&ret), 4106 input.Ref(), 4107 js.Pointer(&options), 4108 ) 4109 4110 return 4111 } 4112 4113 // TryReduceProduct calls the method "MLGraphBuilder.reduceProduct" 4114 // in a try/catch block and returns (_, err, ok = false) when it went through 4115 // the catch clause. 4116 func (this MLGraphBuilder) TryReduceProduct(input MLOperand, options MLReduceOptions) (ret MLOperand, exception js.Any, ok bool) { 4117 ok = js.True == bindings.TryMLGraphBuilderReduceProduct( 4118 this.ref, js.Pointer(&ret), js.Pointer(&exception), 4119 input.Ref(), 4120 js.Pointer(&options), 4121 ) 4122 4123 return 4124 } 4125 4126 // HasFuncReduceProduct1 returns true if the method "MLGraphBuilder.reduceProduct" exists. 4127 func (this MLGraphBuilder) HasFuncReduceProduct1() bool { 4128 return js.True == bindings.HasFuncMLGraphBuilderReduceProduct1( 4129 this.ref, 4130 ) 4131 } 4132 4133 // FuncReduceProduct1 returns the method "MLGraphBuilder.reduceProduct". 4134 func (this MLGraphBuilder) FuncReduceProduct1() (fn js.Func[func(input MLOperand) MLOperand]) { 4135 bindings.FuncMLGraphBuilderReduceProduct1( 4136 this.ref, js.Pointer(&fn), 4137 ) 4138 return 4139 } 4140 4141 // ReduceProduct1 calls the method "MLGraphBuilder.reduceProduct". 4142 func (this MLGraphBuilder) ReduceProduct1(input MLOperand) (ret MLOperand) { 4143 bindings.CallMLGraphBuilderReduceProduct1( 4144 this.ref, js.Pointer(&ret), 4145 input.Ref(), 4146 ) 4147 4148 return 4149 } 4150 4151 // TryReduceProduct1 calls the method "MLGraphBuilder.reduceProduct" 4152 // in a try/catch block and returns (_, err, ok = false) when it went through 4153 // the catch clause. 4154 func (this MLGraphBuilder) TryReduceProduct1(input MLOperand) (ret MLOperand, exception js.Any, ok bool) { 4155 ok = js.True == bindings.TryMLGraphBuilderReduceProduct1( 4156 this.ref, js.Pointer(&ret), js.Pointer(&exception), 4157 input.Ref(), 4158 ) 4159 4160 return 4161 } 4162 4163 // HasFuncReduceSum returns true if the method "MLGraphBuilder.reduceSum" exists. 4164 func (this MLGraphBuilder) HasFuncReduceSum() bool { 4165 return js.True == bindings.HasFuncMLGraphBuilderReduceSum( 4166 this.ref, 4167 ) 4168 } 4169 4170 // FuncReduceSum returns the method "MLGraphBuilder.reduceSum". 4171 func (this MLGraphBuilder) FuncReduceSum() (fn js.Func[func(input MLOperand, options MLReduceOptions) MLOperand]) { 4172 bindings.FuncMLGraphBuilderReduceSum( 4173 this.ref, js.Pointer(&fn), 4174 ) 4175 return 4176 } 4177 4178 // ReduceSum calls the method "MLGraphBuilder.reduceSum". 4179 func (this MLGraphBuilder) ReduceSum(input MLOperand, options MLReduceOptions) (ret MLOperand) { 4180 bindings.CallMLGraphBuilderReduceSum( 4181 this.ref, js.Pointer(&ret), 4182 input.Ref(), 4183 js.Pointer(&options), 4184 ) 4185 4186 return 4187 } 4188 4189 // TryReduceSum calls the method "MLGraphBuilder.reduceSum" 4190 // in a try/catch block and returns (_, err, ok = false) when it went through 4191 // the catch clause. 4192 func (this MLGraphBuilder) TryReduceSum(input MLOperand, options MLReduceOptions) (ret MLOperand, exception js.Any, ok bool) { 4193 ok = js.True == bindings.TryMLGraphBuilderReduceSum( 4194 this.ref, js.Pointer(&ret), js.Pointer(&exception), 4195 input.Ref(), 4196 js.Pointer(&options), 4197 ) 4198 4199 return 4200 } 4201 4202 // HasFuncReduceSum1 returns true if the method "MLGraphBuilder.reduceSum" exists. 4203 func (this MLGraphBuilder) HasFuncReduceSum1() bool { 4204 return js.True == bindings.HasFuncMLGraphBuilderReduceSum1( 4205 this.ref, 4206 ) 4207 } 4208 4209 // FuncReduceSum1 returns the method "MLGraphBuilder.reduceSum". 4210 func (this MLGraphBuilder) FuncReduceSum1() (fn js.Func[func(input MLOperand) MLOperand]) { 4211 bindings.FuncMLGraphBuilderReduceSum1( 4212 this.ref, js.Pointer(&fn), 4213 ) 4214 return 4215 } 4216 4217 // ReduceSum1 calls the method "MLGraphBuilder.reduceSum". 4218 func (this MLGraphBuilder) ReduceSum1(input MLOperand) (ret MLOperand) { 4219 bindings.CallMLGraphBuilderReduceSum1( 4220 this.ref, js.Pointer(&ret), 4221 input.Ref(), 4222 ) 4223 4224 return 4225 } 4226 4227 // TryReduceSum1 calls the method "MLGraphBuilder.reduceSum" 4228 // in a try/catch block and returns (_, err, ok = false) when it went through 4229 // the catch clause. 4230 func (this MLGraphBuilder) TryReduceSum1(input MLOperand) (ret MLOperand, exception js.Any, ok bool) { 4231 ok = js.True == bindings.TryMLGraphBuilderReduceSum1( 4232 this.ref, js.Pointer(&ret), js.Pointer(&exception), 4233 input.Ref(), 4234 ) 4235 4236 return 4237 } 4238 4239 // HasFuncReduceSumSquare returns true if the method "MLGraphBuilder.reduceSumSquare" exists. 4240 func (this MLGraphBuilder) HasFuncReduceSumSquare() bool { 4241 return js.True == bindings.HasFuncMLGraphBuilderReduceSumSquare( 4242 this.ref, 4243 ) 4244 } 4245 4246 // FuncReduceSumSquare returns the method "MLGraphBuilder.reduceSumSquare". 4247 func (this MLGraphBuilder) FuncReduceSumSquare() (fn js.Func[func(input MLOperand, options MLReduceOptions) MLOperand]) { 4248 bindings.FuncMLGraphBuilderReduceSumSquare( 4249 this.ref, js.Pointer(&fn), 4250 ) 4251 return 4252 } 4253 4254 // ReduceSumSquare calls the method "MLGraphBuilder.reduceSumSquare". 4255 func (this MLGraphBuilder) ReduceSumSquare(input MLOperand, options MLReduceOptions) (ret MLOperand) { 4256 bindings.CallMLGraphBuilderReduceSumSquare( 4257 this.ref, js.Pointer(&ret), 4258 input.Ref(), 4259 js.Pointer(&options), 4260 ) 4261 4262 return 4263 } 4264 4265 // TryReduceSumSquare calls the method "MLGraphBuilder.reduceSumSquare" 4266 // in a try/catch block and returns (_, err, ok = false) when it went through 4267 // the catch clause. 4268 func (this MLGraphBuilder) TryReduceSumSquare(input MLOperand, options MLReduceOptions) (ret MLOperand, exception js.Any, ok bool) { 4269 ok = js.True == bindings.TryMLGraphBuilderReduceSumSquare( 4270 this.ref, js.Pointer(&ret), js.Pointer(&exception), 4271 input.Ref(), 4272 js.Pointer(&options), 4273 ) 4274 4275 return 4276 } 4277 4278 // HasFuncReduceSumSquare1 returns true if the method "MLGraphBuilder.reduceSumSquare" exists. 4279 func (this MLGraphBuilder) HasFuncReduceSumSquare1() bool { 4280 return js.True == bindings.HasFuncMLGraphBuilderReduceSumSquare1( 4281 this.ref, 4282 ) 4283 } 4284 4285 // FuncReduceSumSquare1 returns the method "MLGraphBuilder.reduceSumSquare". 4286 func (this MLGraphBuilder) FuncReduceSumSquare1() (fn js.Func[func(input MLOperand) MLOperand]) { 4287 bindings.FuncMLGraphBuilderReduceSumSquare1( 4288 this.ref, js.Pointer(&fn), 4289 ) 4290 return 4291 } 4292 4293 // ReduceSumSquare1 calls the method "MLGraphBuilder.reduceSumSquare". 4294 func (this MLGraphBuilder) ReduceSumSquare1(input MLOperand) (ret MLOperand) { 4295 bindings.CallMLGraphBuilderReduceSumSquare1( 4296 this.ref, js.Pointer(&ret), 4297 input.Ref(), 4298 ) 4299 4300 return 4301 } 4302 4303 // TryReduceSumSquare1 calls the method "MLGraphBuilder.reduceSumSquare" 4304 // in a try/catch block and returns (_, err, ok = false) when it went through 4305 // the catch clause. 4306 func (this MLGraphBuilder) TryReduceSumSquare1(input MLOperand) (ret MLOperand, exception js.Any, ok bool) { 4307 ok = js.True == bindings.TryMLGraphBuilderReduceSumSquare1( 4308 this.ref, js.Pointer(&ret), js.Pointer(&exception), 4309 input.Ref(), 4310 ) 4311 4312 return 4313 } 4314 4315 // HasFuncLstm returns true if the method "MLGraphBuilder.lstm" exists. 4316 func (this MLGraphBuilder) HasFuncLstm() bool { 4317 return js.True == bindings.HasFuncMLGraphBuilderLstm( 4318 this.ref, 4319 ) 4320 } 4321 4322 // FuncLstm returns the method "MLGraphBuilder.lstm". 4323 func (this MLGraphBuilder) FuncLstm() (fn js.Func[func(input MLOperand, weight MLOperand, recurrentWeight MLOperand, steps uint32, hiddenSize uint32, options MLLstmOptions) js.Array[MLOperand]]) { 4324 bindings.FuncMLGraphBuilderLstm( 4325 this.ref, js.Pointer(&fn), 4326 ) 4327 return 4328 } 4329 4330 // Lstm calls the method "MLGraphBuilder.lstm". 4331 func (this MLGraphBuilder) Lstm(input MLOperand, weight MLOperand, recurrentWeight MLOperand, steps uint32, hiddenSize uint32, options MLLstmOptions) (ret js.Array[MLOperand]) { 4332 bindings.CallMLGraphBuilderLstm( 4333 this.ref, js.Pointer(&ret), 4334 input.Ref(), 4335 weight.Ref(), 4336 recurrentWeight.Ref(), 4337 uint32(steps), 4338 uint32(hiddenSize), 4339 js.Pointer(&options), 4340 ) 4341 4342 return 4343 } 4344 4345 // TryLstm calls the method "MLGraphBuilder.lstm" 4346 // in a try/catch block and returns (_, err, ok = false) when it went through 4347 // the catch clause. 4348 func (this MLGraphBuilder) TryLstm(input MLOperand, weight MLOperand, recurrentWeight MLOperand, steps uint32, hiddenSize uint32, options MLLstmOptions) (ret js.Array[MLOperand], exception js.Any, ok bool) { 4349 ok = js.True == bindings.TryMLGraphBuilderLstm( 4350 this.ref, js.Pointer(&ret), js.Pointer(&exception), 4351 input.Ref(), 4352 weight.Ref(), 4353 recurrentWeight.Ref(), 4354 uint32(steps), 4355 uint32(hiddenSize), 4356 js.Pointer(&options), 4357 ) 4358 4359 return 4360 } 4361 4362 // HasFuncLstm1 returns true if the method "MLGraphBuilder.lstm" exists. 4363 func (this MLGraphBuilder) HasFuncLstm1() bool { 4364 return js.True == bindings.HasFuncMLGraphBuilderLstm1( 4365 this.ref, 4366 ) 4367 } 4368 4369 // FuncLstm1 returns the method "MLGraphBuilder.lstm". 4370 func (this MLGraphBuilder) FuncLstm1() (fn js.Func[func(input MLOperand, weight MLOperand, recurrentWeight MLOperand, steps uint32, hiddenSize uint32) js.Array[MLOperand]]) { 4371 bindings.FuncMLGraphBuilderLstm1( 4372 this.ref, js.Pointer(&fn), 4373 ) 4374 return 4375 } 4376 4377 // Lstm1 calls the method "MLGraphBuilder.lstm". 4378 func (this MLGraphBuilder) Lstm1(input MLOperand, weight MLOperand, recurrentWeight MLOperand, steps uint32, hiddenSize uint32) (ret js.Array[MLOperand]) { 4379 bindings.CallMLGraphBuilderLstm1( 4380 this.ref, js.Pointer(&ret), 4381 input.Ref(), 4382 weight.Ref(), 4383 recurrentWeight.Ref(), 4384 uint32(steps), 4385 uint32(hiddenSize), 4386 ) 4387 4388 return 4389 } 4390 4391 // TryLstm1 calls the method "MLGraphBuilder.lstm" 4392 // in a try/catch block and returns (_, err, ok = false) when it went through 4393 // the catch clause. 4394 func (this MLGraphBuilder) TryLstm1(input MLOperand, weight MLOperand, recurrentWeight MLOperand, steps uint32, hiddenSize uint32) (ret js.Array[MLOperand], exception js.Any, ok bool) { 4395 ok = js.True == bindings.TryMLGraphBuilderLstm1( 4396 this.ref, js.Pointer(&ret), js.Pointer(&exception), 4397 input.Ref(), 4398 weight.Ref(), 4399 recurrentWeight.Ref(), 4400 uint32(steps), 4401 uint32(hiddenSize), 4402 ) 4403 4404 return 4405 } 4406 4407 // HasFuncMatmul returns true if the method "MLGraphBuilder.matmul" exists. 4408 func (this MLGraphBuilder) HasFuncMatmul() bool { 4409 return js.True == bindings.HasFuncMLGraphBuilderMatmul( 4410 this.ref, 4411 ) 4412 } 4413 4414 // FuncMatmul returns the method "MLGraphBuilder.matmul". 4415 func (this MLGraphBuilder) FuncMatmul() (fn js.Func[func(a MLOperand, b MLOperand) MLOperand]) { 4416 bindings.FuncMLGraphBuilderMatmul( 4417 this.ref, js.Pointer(&fn), 4418 ) 4419 return 4420 } 4421 4422 // Matmul calls the method "MLGraphBuilder.matmul". 4423 func (this MLGraphBuilder) Matmul(a MLOperand, b MLOperand) (ret MLOperand) { 4424 bindings.CallMLGraphBuilderMatmul( 4425 this.ref, js.Pointer(&ret), 4426 a.Ref(), 4427 b.Ref(), 4428 ) 4429 4430 return 4431 } 4432 4433 // TryMatmul calls the method "MLGraphBuilder.matmul" 4434 // in a try/catch block and returns (_, err, ok = false) when it went through 4435 // the catch clause. 4436 func (this MLGraphBuilder) TryMatmul(a MLOperand, b MLOperand) (ret MLOperand, exception js.Any, ok bool) { 4437 ok = js.True == bindings.TryMLGraphBuilderMatmul( 4438 this.ref, js.Pointer(&ret), js.Pointer(&exception), 4439 a.Ref(), 4440 b.Ref(), 4441 ) 4442 4443 return 4444 } 4445 4446 // HasFuncSqueeze returns true if the method "MLGraphBuilder.squeeze" exists. 4447 func (this MLGraphBuilder) HasFuncSqueeze() bool { 4448 return js.True == bindings.HasFuncMLGraphBuilderSqueeze( 4449 this.ref, 4450 ) 4451 } 4452 4453 // FuncSqueeze returns the method "MLGraphBuilder.squeeze". 4454 func (this MLGraphBuilder) FuncSqueeze() (fn js.Func[func(input MLOperand, options MLSqueezeOptions) MLOperand]) { 4455 bindings.FuncMLGraphBuilderSqueeze( 4456 this.ref, js.Pointer(&fn), 4457 ) 4458 return 4459 } 4460 4461 // Squeeze calls the method "MLGraphBuilder.squeeze". 4462 func (this MLGraphBuilder) Squeeze(input MLOperand, options MLSqueezeOptions) (ret MLOperand) { 4463 bindings.CallMLGraphBuilderSqueeze( 4464 this.ref, js.Pointer(&ret), 4465 input.Ref(), 4466 js.Pointer(&options), 4467 ) 4468 4469 return 4470 } 4471 4472 // TrySqueeze calls the method "MLGraphBuilder.squeeze" 4473 // in a try/catch block and returns (_, err, ok = false) when it went through 4474 // the catch clause. 4475 func (this MLGraphBuilder) TrySqueeze(input MLOperand, options MLSqueezeOptions) (ret MLOperand, exception js.Any, ok bool) { 4476 ok = js.True == bindings.TryMLGraphBuilderSqueeze( 4477 this.ref, js.Pointer(&ret), js.Pointer(&exception), 4478 input.Ref(), 4479 js.Pointer(&options), 4480 ) 4481 4482 return 4483 } 4484 4485 // HasFuncSqueeze1 returns true if the method "MLGraphBuilder.squeeze" exists. 4486 func (this MLGraphBuilder) HasFuncSqueeze1() bool { 4487 return js.True == bindings.HasFuncMLGraphBuilderSqueeze1( 4488 this.ref, 4489 ) 4490 } 4491 4492 // FuncSqueeze1 returns the method "MLGraphBuilder.squeeze". 4493 func (this MLGraphBuilder) FuncSqueeze1() (fn js.Func[func(input MLOperand) MLOperand]) { 4494 bindings.FuncMLGraphBuilderSqueeze1( 4495 this.ref, js.Pointer(&fn), 4496 ) 4497 return 4498 } 4499 4500 // Squeeze1 calls the method "MLGraphBuilder.squeeze". 4501 func (this MLGraphBuilder) Squeeze1(input MLOperand) (ret MLOperand) { 4502 bindings.CallMLGraphBuilderSqueeze1( 4503 this.ref, js.Pointer(&ret), 4504 input.Ref(), 4505 ) 4506 4507 return 4508 } 4509 4510 // TrySqueeze1 calls the method "MLGraphBuilder.squeeze" 4511 // in a try/catch block and returns (_, err, ok = false) when it went through 4512 // the catch clause. 4513 func (this MLGraphBuilder) TrySqueeze1(input MLOperand) (ret MLOperand, exception js.Any, ok bool) { 4514 ok = js.True == bindings.TryMLGraphBuilderSqueeze1( 4515 this.ref, js.Pointer(&ret), js.Pointer(&exception), 4516 input.Ref(), 4517 ) 4518 4519 return 4520 } 4521 4522 // HasFuncTanh returns true if the method "MLGraphBuilder.tanh" exists. 4523 func (this MLGraphBuilder) HasFuncTanh() bool { 4524 return js.True == bindings.HasFuncMLGraphBuilderTanh( 4525 this.ref, 4526 ) 4527 } 4528 4529 // FuncTanh returns the method "MLGraphBuilder.tanh". 4530 func (this MLGraphBuilder) FuncTanh() (fn js.Func[func(input MLOperand) MLOperand]) { 4531 bindings.FuncMLGraphBuilderTanh( 4532 this.ref, js.Pointer(&fn), 4533 ) 4534 return 4535 } 4536 4537 // Tanh calls the method "MLGraphBuilder.tanh". 4538 func (this MLGraphBuilder) Tanh(input MLOperand) (ret MLOperand) { 4539 bindings.CallMLGraphBuilderTanh( 4540 this.ref, js.Pointer(&ret), 4541 input.Ref(), 4542 ) 4543 4544 return 4545 } 4546 4547 // TryTanh calls the method "MLGraphBuilder.tanh" 4548 // in a try/catch block and returns (_, err, ok = false) when it went through 4549 // the catch clause. 4550 func (this MLGraphBuilder) TryTanh(input MLOperand) (ret MLOperand, exception js.Any, ok bool) { 4551 ok = js.True == bindings.TryMLGraphBuilderTanh( 4552 this.ref, js.Pointer(&ret), js.Pointer(&exception), 4553 input.Ref(), 4554 ) 4555 4556 return 4557 } 4558 4559 // HasFuncTanh1 returns true if the method "MLGraphBuilder.tanh" exists. 4560 func (this MLGraphBuilder) HasFuncTanh1() bool { 4561 return js.True == bindings.HasFuncMLGraphBuilderTanh1( 4562 this.ref, 4563 ) 4564 } 4565 4566 // FuncTanh1 returns the method "MLGraphBuilder.tanh". 4567 func (this MLGraphBuilder) FuncTanh1() (fn js.Func[func() MLActivation]) { 4568 bindings.FuncMLGraphBuilderTanh1( 4569 this.ref, js.Pointer(&fn), 4570 ) 4571 return 4572 } 4573 4574 // Tanh1 calls the method "MLGraphBuilder.tanh". 4575 func (this MLGraphBuilder) Tanh1() (ret MLActivation) { 4576 bindings.CallMLGraphBuilderTanh1( 4577 this.ref, js.Pointer(&ret), 4578 ) 4579 4580 return 4581 } 4582 4583 // TryTanh1 calls the method "MLGraphBuilder.tanh" 4584 // in a try/catch block and returns (_, err, ok = false) when it went through 4585 // the catch clause. 4586 func (this MLGraphBuilder) TryTanh1() (ret MLActivation, exception js.Any, ok bool) { 4587 ok = js.True == bindings.TryMLGraphBuilderTanh1( 4588 this.ref, js.Pointer(&ret), js.Pointer(&exception), 4589 ) 4590 4591 return 4592 } 4593 4594 // HasFuncGru returns true if the method "MLGraphBuilder.gru" exists. 4595 func (this MLGraphBuilder) HasFuncGru() bool { 4596 return js.True == bindings.HasFuncMLGraphBuilderGru( 4597 this.ref, 4598 ) 4599 } 4600 4601 // FuncGru returns the method "MLGraphBuilder.gru". 4602 func (this MLGraphBuilder) FuncGru() (fn js.Func[func(input MLOperand, weight MLOperand, recurrentWeight MLOperand, steps uint32, hiddenSize uint32, options MLGruOptions) js.Array[MLOperand]]) { 4603 bindings.FuncMLGraphBuilderGru( 4604 this.ref, js.Pointer(&fn), 4605 ) 4606 return 4607 } 4608 4609 // Gru calls the method "MLGraphBuilder.gru". 4610 func (this MLGraphBuilder) Gru(input MLOperand, weight MLOperand, recurrentWeight MLOperand, steps uint32, hiddenSize uint32, options MLGruOptions) (ret js.Array[MLOperand]) { 4611 bindings.CallMLGraphBuilderGru( 4612 this.ref, js.Pointer(&ret), 4613 input.Ref(), 4614 weight.Ref(), 4615 recurrentWeight.Ref(), 4616 uint32(steps), 4617 uint32(hiddenSize), 4618 js.Pointer(&options), 4619 ) 4620 4621 return 4622 } 4623 4624 // TryGru calls the method "MLGraphBuilder.gru" 4625 // in a try/catch block and returns (_, err, ok = false) when it went through 4626 // the catch clause. 4627 func (this MLGraphBuilder) TryGru(input MLOperand, weight MLOperand, recurrentWeight MLOperand, steps uint32, hiddenSize uint32, options MLGruOptions) (ret js.Array[MLOperand], exception js.Any, ok bool) { 4628 ok = js.True == bindings.TryMLGraphBuilderGru( 4629 this.ref, js.Pointer(&ret), js.Pointer(&exception), 4630 input.Ref(), 4631 weight.Ref(), 4632 recurrentWeight.Ref(), 4633 uint32(steps), 4634 uint32(hiddenSize), 4635 js.Pointer(&options), 4636 ) 4637 4638 return 4639 } 4640 4641 // HasFuncGru1 returns true if the method "MLGraphBuilder.gru" exists. 4642 func (this MLGraphBuilder) HasFuncGru1() bool { 4643 return js.True == bindings.HasFuncMLGraphBuilderGru1( 4644 this.ref, 4645 ) 4646 } 4647 4648 // FuncGru1 returns the method "MLGraphBuilder.gru". 4649 func (this MLGraphBuilder) FuncGru1() (fn js.Func[func(input MLOperand, weight MLOperand, recurrentWeight MLOperand, steps uint32, hiddenSize uint32) js.Array[MLOperand]]) { 4650 bindings.FuncMLGraphBuilderGru1( 4651 this.ref, js.Pointer(&fn), 4652 ) 4653 return 4654 } 4655 4656 // Gru1 calls the method "MLGraphBuilder.gru". 4657 func (this MLGraphBuilder) Gru1(input MLOperand, weight MLOperand, recurrentWeight MLOperand, steps uint32, hiddenSize uint32) (ret js.Array[MLOperand]) { 4658 bindings.CallMLGraphBuilderGru1( 4659 this.ref, js.Pointer(&ret), 4660 input.Ref(), 4661 weight.Ref(), 4662 recurrentWeight.Ref(), 4663 uint32(steps), 4664 uint32(hiddenSize), 4665 ) 4666 4667 return 4668 } 4669 4670 // TryGru1 calls the method "MLGraphBuilder.gru" 4671 // in a try/catch block and returns (_, err, ok = false) when it went through 4672 // the catch clause. 4673 func (this MLGraphBuilder) TryGru1(input MLOperand, weight MLOperand, recurrentWeight MLOperand, steps uint32, hiddenSize uint32) (ret js.Array[MLOperand], exception js.Any, ok bool) { 4674 ok = js.True == bindings.TryMLGraphBuilderGru1( 4675 this.ref, js.Pointer(&ret), js.Pointer(&exception), 4676 input.Ref(), 4677 weight.Ref(), 4678 recurrentWeight.Ref(), 4679 uint32(steps), 4680 uint32(hiddenSize), 4681 ) 4682 4683 return 4684 } 4685 4686 // HasFuncAbs returns true if the method "MLGraphBuilder.abs" exists. 4687 func (this MLGraphBuilder) HasFuncAbs() bool { 4688 return js.True == bindings.HasFuncMLGraphBuilderAbs( 4689 this.ref, 4690 ) 4691 } 4692 4693 // FuncAbs returns the method "MLGraphBuilder.abs". 4694 func (this MLGraphBuilder) FuncAbs() (fn js.Func[func(input MLOperand) MLOperand]) { 4695 bindings.FuncMLGraphBuilderAbs( 4696 this.ref, js.Pointer(&fn), 4697 ) 4698 return 4699 } 4700 4701 // Abs calls the method "MLGraphBuilder.abs". 4702 func (this MLGraphBuilder) Abs(input MLOperand) (ret MLOperand) { 4703 bindings.CallMLGraphBuilderAbs( 4704 this.ref, js.Pointer(&ret), 4705 input.Ref(), 4706 ) 4707 4708 return 4709 } 4710 4711 // TryAbs calls the method "MLGraphBuilder.abs" 4712 // in a try/catch block and returns (_, err, ok = false) when it went through 4713 // the catch clause. 4714 func (this MLGraphBuilder) TryAbs(input MLOperand) (ret MLOperand, exception js.Any, ok bool) { 4715 ok = js.True == bindings.TryMLGraphBuilderAbs( 4716 this.ref, js.Pointer(&ret), js.Pointer(&exception), 4717 input.Ref(), 4718 ) 4719 4720 return 4721 } 4722 4723 // HasFuncCeil returns true if the method "MLGraphBuilder.ceil" exists. 4724 func (this MLGraphBuilder) HasFuncCeil() bool { 4725 return js.True == bindings.HasFuncMLGraphBuilderCeil( 4726 this.ref, 4727 ) 4728 } 4729 4730 // FuncCeil returns the method "MLGraphBuilder.ceil". 4731 func (this MLGraphBuilder) FuncCeil() (fn js.Func[func(input MLOperand) MLOperand]) { 4732 bindings.FuncMLGraphBuilderCeil( 4733 this.ref, js.Pointer(&fn), 4734 ) 4735 return 4736 } 4737 4738 // Ceil calls the method "MLGraphBuilder.ceil". 4739 func (this MLGraphBuilder) Ceil(input MLOperand) (ret MLOperand) { 4740 bindings.CallMLGraphBuilderCeil( 4741 this.ref, js.Pointer(&ret), 4742 input.Ref(), 4743 ) 4744 4745 return 4746 } 4747 4748 // TryCeil calls the method "MLGraphBuilder.ceil" 4749 // in a try/catch block and returns (_, err, ok = false) when it went through 4750 // the catch clause. 4751 func (this MLGraphBuilder) TryCeil(input MLOperand) (ret MLOperand, exception js.Any, ok bool) { 4752 ok = js.True == bindings.TryMLGraphBuilderCeil( 4753 this.ref, js.Pointer(&ret), js.Pointer(&exception), 4754 input.Ref(), 4755 ) 4756 4757 return 4758 } 4759 4760 // HasFuncCos returns true if the method "MLGraphBuilder.cos" exists. 4761 func (this MLGraphBuilder) HasFuncCos() bool { 4762 return js.True == bindings.HasFuncMLGraphBuilderCos( 4763 this.ref, 4764 ) 4765 } 4766 4767 // FuncCos returns the method "MLGraphBuilder.cos". 4768 func (this MLGraphBuilder) FuncCos() (fn js.Func[func(input MLOperand) MLOperand]) { 4769 bindings.FuncMLGraphBuilderCos( 4770 this.ref, js.Pointer(&fn), 4771 ) 4772 return 4773 } 4774 4775 // Cos calls the method "MLGraphBuilder.cos". 4776 func (this MLGraphBuilder) Cos(input MLOperand) (ret MLOperand) { 4777 bindings.CallMLGraphBuilderCos( 4778 this.ref, js.Pointer(&ret), 4779 input.Ref(), 4780 ) 4781 4782 return 4783 } 4784 4785 // TryCos calls the method "MLGraphBuilder.cos" 4786 // in a try/catch block and returns (_, err, ok = false) when it went through 4787 // the catch clause. 4788 func (this MLGraphBuilder) TryCos(input MLOperand) (ret MLOperand, exception js.Any, ok bool) { 4789 ok = js.True == bindings.TryMLGraphBuilderCos( 4790 this.ref, js.Pointer(&ret), js.Pointer(&exception), 4791 input.Ref(), 4792 ) 4793 4794 return 4795 } 4796 4797 // HasFuncExp returns true if the method "MLGraphBuilder.exp" exists. 4798 func (this MLGraphBuilder) HasFuncExp() bool { 4799 return js.True == bindings.HasFuncMLGraphBuilderExp( 4800 this.ref, 4801 ) 4802 } 4803 4804 // FuncExp returns the method "MLGraphBuilder.exp". 4805 func (this MLGraphBuilder) FuncExp() (fn js.Func[func(input MLOperand) MLOperand]) { 4806 bindings.FuncMLGraphBuilderExp( 4807 this.ref, js.Pointer(&fn), 4808 ) 4809 return 4810 } 4811 4812 // Exp calls the method "MLGraphBuilder.exp". 4813 func (this MLGraphBuilder) Exp(input MLOperand) (ret MLOperand) { 4814 bindings.CallMLGraphBuilderExp( 4815 this.ref, js.Pointer(&ret), 4816 input.Ref(), 4817 ) 4818 4819 return 4820 } 4821 4822 // TryExp calls the method "MLGraphBuilder.exp" 4823 // in a try/catch block and returns (_, err, ok = false) when it went through 4824 // the catch clause. 4825 func (this MLGraphBuilder) TryExp(input MLOperand) (ret MLOperand, exception js.Any, ok bool) { 4826 ok = js.True == bindings.TryMLGraphBuilderExp( 4827 this.ref, js.Pointer(&ret), js.Pointer(&exception), 4828 input.Ref(), 4829 ) 4830 4831 return 4832 } 4833 4834 // HasFuncFloor returns true if the method "MLGraphBuilder.floor" exists. 4835 func (this MLGraphBuilder) HasFuncFloor() bool { 4836 return js.True == bindings.HasFuncMLGraphBuilderFloor( 4837 this.ref, 4838 ) 4839 } 4840 4841 // FuncFloor returns the method "MLGraphBuilder.floor". 4842 func (this MLGraphBuilder) FuncFloor() (fn js.Func[func(input MLOperand) MLOperand]) { 4843 bindings.FuncMLGraphBuilderFloor( 4844 this.ref, js.Pointer(&fn), 4845 ) 4846 return 4847 } 4848 4849 // Floor calls the method "MLGraphBuilder.floor". 4850 func (this MLGraphBuilder) Floor(input MLOperand) (ret MLOperand) { 4851 bindings.CallMLGraphBuilderFloor( 4852 this.ref, js.Pointer(&ret), 4853 input.Ref(), 4854 ) 4855 4856 return 4857 } 4858 4859 // TryFloor calls the method "MLGraphBuilder.floor" 4860 // in a try/catch block and returns (_, err, ok = false) when it went through 4861 // the catch clause. 4862 func (this MLGraphBuilder) TryFloor(input MLOperand) (ret MLOperand, exception js.Any, ok bool) { 4863 ok = js.True == bindings.TryMLGraphBuilderFloor( 4864 this.ref, js.Pointer(&ret), js.Pointer(&exception), 4865 input.Ref(), 4866 ) 4867 4868 return 4869 } 4870 4871 // HasFuncLog returns true if the method "MLGraphBuilder.log" exists. 4872 func (this MLGraphBuilder) HasFuncLog() bool { 4873 return js.True == bindings.HasFuncMLGraphBuilderLog( 4874 this.ref, 4875 ) 4876 } 4877 4878 // FuncLog returns the method "MLGraphBuilder.log". 4879 func (this MLGraphBuilder) FuncLog() (fn js.Func[func(input MLOperand) MLOperand]) { 4880 bindings.FuncMLGraphBuilderLog( 4881 this.ref, js.Pointer(&fn), 4882 ) 4883 return 4884 } 4885 4886 // Log calls the method "MLGraphBuilder.log". 4887 func (this MLGraphBuilder) Log(input MLOperand) (ret MLOperand) { 4888 bindings.CallMLGraphBuilderLog( 4889 this.ref, js.Pointer(&ret), 4890 input.Ref(), 4891 ) 4892 4893 return 4894 } 4895 4896 // TryLog calls the method "MLGraphBuilder.log" 4897 // in a try/catch block and returns (_, err, ok = false) when it went through 4898 // the catch clause. 4899 func (this MLGraphBuilder) TryLog(input MLOperand) (ret MLOperand, exception js.Any, ok bool) { 4900 ok = js.True == bindings.TryMLGraphBuilderLog( 4901 this.ref, js.Pointer(&ret), js.Pointer(&exception), 4902 input.Ref(), 4903 ) 4904 4905 return 4906 } 4907 4908 // HasFuncNeg returns true if the method "MLGraphBuilder.neg" exists. 4909 func (this MLGraphBuilder) HasFuncNeg() bool { 4910 return js.True == bindings.HasFuncMLGraphBuilderNeg( 4911 this.ref, 4912 ) 4913 } 4914 4915 // FuncNeg returns the method "MLGraphBuilder.neg". 4916 func (this MLGraphBuilder) FuncNeg() (fn js.Func[func(input MLOperand) MLOperand]) { 4917 bindings.FuncMLGraphBuilderNeg( 4918 this.ref, js.Pointer(&fn), 4919 ) 4920 return 4921 } 4922 4923 // Neg calls the method "MLGraphBuilder.neg". 4924 func (this MLGraphBuilder) Neg(input MLOperand) (ret MLOperand) { 4925 bindings.CallMLGraphBuilderNeg( 4926 this.ref, js.Pointer(&ret), 4927 input.Ref(), 4928 ) 4929 4930 return 4931 } 4932 4933 // TryNeg calls the method "MLGraphBuilder.neg" 4934 // in a try/catch block and returns (_, err, ok = false) when it went through 4935 // the catch clause. 4936 func (this MLGraphBuilder) TryNeg(input MLOperand) (ret MLOperand, exception js.Any, ok bool) { 4937 ok = js.True == bindings.TryMLGraphBuilderNeg( 4938 this.ref, js.Pointer(&ret), js.Pointer(&exception), 4939 input.Ref(), 4940 ) 4941 4942 return 4943 } 4944 4945 // HasFuncSin returns true if the method "MLGraphBuilder.sin" exists. 4946 func (this MLGraphBuilder) HasFuncSin() bool { 4947 return js.True == bindings.HasFuncMLGraphBuilderSin( 4948 this.ref, 4949 ) 4950 } 4951 4952 // FuncSin returns the method "MLGraphBuilder.sin". 4953 func (this MLGraphBuilder) FuncSin() (fn js.Func[func(input MLOperand) MLOperand]) { 4954 bindings.FuncMLGraphBuilderSin( 4955 this.ref, js.Pointer(&fn), 4956 ) 4957 return 4958 } 4959 4960 // Sin calls the method "MLGraphBuilder.sin". 4961 func (this MLGraphBuilder) Sin(input MLOperand) (ret MLOperand) { 4962 bindings.CallMLGraphBuilderSin( 4963 this.ref, js.Pointer(&ret), 4964 input.Ref(), 4965 ) 4966 4967 return 4968 } 4969 4970 // TrySin calls the method "MLGraphBuilder.sin" 4971 // in a try/catch block and returns (_, err, ok = false) when it went through 4972 // the catch clause. 4973 func (this MLGraphBuilder) TrySin(input MLOperand) (ret MLOperand, exception js.Any, ok bool) { 4974 ok = js.True == bindings.TryMLGraphBuilderSin( 4975 this.ref, js.Pointer(&ret), js.Pointer(&exception), 4976 input.Ref(), 4977 ) 4978 4979 return 4980 } 4981 4982 // HasFuncTan returns true if the method "MLGraphBuilder.tan" exists. 4983 func (this MLGraphBuilder) HasFuncTan() bool { 4984 return js.True == bindings.HasFuncMLGraphBuilderTan( 4985 this.ref, 4986 ) 4987 } 4988 4989 // FuncTan returns the method "MLGraphBuilder.tan". 4990 func (this MLGraphBuilder) FuncTan() (fn js.Func[func(input MLOperand) MLOperand]) { 4991 bindings.FuncMLGraphBuilderTan( 4992 this.ref, js.Pointer(&fn), 4993 ) 4994 return 4995 } 4996 4997 // Tan calls the method "MLGraphBuilder.tan". 4998 func (this MLGraphBuilder) Tan(input MLOperand) (ret MLOperand) { 4999 bindings.CallMLGraphBuilderTan( 5000 this.ref, js.Pointer(&ret), 5001 input.Ref(), 5002 ) 5003 5004 return 5005 } 5006 5007 // TryTan calls the method "MLGraphBuilder.tan" 5008 // in a try/catch block and returns (_, err, ok = false) when it went through 5009 // the catch clause. 5010 func (this MLGraphBuilder) TryTan(input MLOperand) (ret MLOperand, exception js.Any, ok bool) { 5011 ok = js.True == bindings.TryMLGraphBuilderTan( 5012 this.ref, js.Pointer(&ret), js.Pointer(&exception), 5013 input.Ref(), 5014 ) 5015 5016 return 5017 } 5018 5019 // HasFuncTranspose returns true if the method "MLGraphBuilder.transpose" exists. 5020 func (this MLGraphBuilder) HasFuncTranspose() bool { 5021 return js.True == bindings.HasFuncMLGraphBuilderTranspose( 5022 this.ref, 5023 ) 5024 } 5025 5026 // FuncTranspose returns the method "MLGraphBuilder.transpose". 5027 func (this MLGraphBuilder) FuncTranspose() (fn js.Func[func(input MLOperand, options MLTransposeOptions) MLOperand]) { 5028 bindings.FuncMLGraphBuilderTranspose( 5029 this.ref, js.Pointer(&fn), 5030 ) 5031 return 5032 } 5033 5034 // Transpose calls the method "MLGraphBuilder.transpose". 5035 func (this MLGraphBuilder) Transpose(input MLOperand, options MLTransposeOptions) (ret MLOperand) { 5036 bindings.CallMLGraphBuilderTranspose( 5037 this.ref, js.Pointer(&ret), 5038 input.Ref(), 5039 js.Pointer(&options), 5040 ) 5041 5042 return 5043 } 5044 5045 // TryTranspose calls the method "MLGraphBuilder.transpose" 5046 // in a try/catch block and returns (_, err, ok = false) when it went through 5047 // the catch clause. 5048 func (this MLGraphBuilder) TryTranspose(input MLOperand, options MLTransposeOptions) (ret MLOperand, exception js.Any, ok bool) { 5049 ok = js.True == bindings.TryMLGraphBuilderTranspose( 5050 this.ref, js.Pointer(&ret), js.Pointer(&exception), 5051 input.Ref(), 5052 js.Pointer(&options), 5053 ) 5054 5055 return 5056 } 5057 5058 // HasFuncTranspose1 returns true if the method "MLGraphBuilder.transpose" exists. 5059 func (this MLGraphBuilder) HasFuncTranspose1() bool { 5060 return js.True == bindings.HasFuncMLGraphBuilderTranspose1( 5061 this.ref, 5062 ) 5063 } 5064 5065 // FuncTranspose1 returns the method "MLGraphBuilder.transpose". 5066 func (this MLGraphBuilder) FuncTranspose1() (fn js.Func[func(input MLOperand) MLOperand]) { 5067 bindings.FuncMLGraphBuilderTranspose1( 5068 this.ref, js.Pointer(&fn), 5069 ) 5070 return 5071 } 5072 5073 // Transpose1 calls the method "MLGraphBuilder.transpose". 5074 func (this MLGraphBuilder) Transpose1(input MLOperand) (ret MLOperand) { 5075 bindings.CallMLGraphBuilderTranspose1( 5076 this.ref, js.Pointer(&ret), 5077 input.Ref(), 5078 ) 5079 5080 return 5081 } 5082 5083 // TryTranspose1 calls the method "MLGraphBuilder.transpose" 5084 // in a try/catch block and returns (_, err, ok = false) when it went through 5085 // the catch clause. 5086 func (this MLGraphBuilder) TryTranspose1(input MLOperand) (ret MLOperand, exception js.Any, ok bool) { 5087 ok = js.True == bindings.TryMLGraphBuilderTranspose1( 5088 this.ref, js.Pointer(&ret), js.Pointer(&exception), 5089 input.Ref(), 5090 ) 5091 5092 return 5093 } 5094 5095 // HasFuncPrelu returns true if the method "MLGraphBuilder.prelu" exists. 5096 func (this MLGraphBuilder) HasFuncPrelu() bool { 5097 return js.True == bindings.HasFuncMLGraphBuilderPrelu( 5098 this.ref, 5099 ) 5100 } 5101 5102 // FuncPrelu returns the method "MLGraphBuilder.prelu". 5103 func (this MLGraphBuilder) FuncPrelu() (fn js.Func[func(input MLOperand, slope MLOperand) MLOperand]) { 5104 bindings.FuncMLGraphBuilderPrelu( 5105 this.ref, js.Pointer(&fn), 5106 ) 5107 return 5108 } 5109 5110 // Prelu calls the method "MLGraphBuilder.prelu". 5111 func (this MLGraphBuilder) Prelu(input MLOperand, slope MLOperand) (ret MLOperand) { 5112 bindings.CallMLGraphBuilderPrelu( 5113 this.ref, js.Pointer(&ret), 5114 input.Ref(), 5115 slope.Ref(), 5116 ) 5117 5118 return 5119 } 5120 5121 // TryPrelu calls the method "MLGraphBuilder.prelu" 5122 // in a try/catch block and returns (_, err, ok = false) when it went through 5123 // the catch clause. 5124 func (this MLGraphBuilder) TryPrelu(input MLOperand, slope MLOperand) (ret MLOperand, exception js.Any, ok bool) { 5125 ok = js.True == bindings.TryMLGraphBuilderPrelu( 5126 this.ref, js.Pointer(&ret), js.Pointer(&exception), 5127 input.Ref(), 5128 slope.Ref(), 5129 ) 5130 5131 return 5132 } 5133 5134 // HasFuncConcat returns true if the method "MLGraphBuilder.concat" exists. 5135 func (this MLGraphBuilder) HasFuncConcat() bool { 5136 return js.True == bindings.HasFuncMLGraphBuilderConcat( 5137 this.ref, 5138 ) 5139 } 5140 5141 // FuncConcat returns the method "MLGraphBuilder.concat". 5142 func (this MLGraphBuilder) FuncConcat() (fn js.Func[func(inputs js.Array[MLOperand], axis uint32) MLOperand]) { 5143 bindings.FuncMLGraphBuilderConcat( 5144 this.ref, js.Pointer(&fn), 5145 ) 5146 return 5147 } 5148 5149 // Concat calls the method "MLGraphBuilder.concat". 5150 func (this MLGraphBuilder) Concat(inputs js.Array[MLOperand], axis uint32) (ret MLOperand) { 5151 bindings.CallMLGraphBuilderConcat( 5152 this.ref, js.Pointer(&ret), 5153 inputs.Ref(), 5154 uint32(axis), 5155 ) 5156 5157 return 5158 } 5159 5160 // TryConcat calls the method "MLGraphBuilder.concat" 5161 // in a try/catch block and returns (_, err, ok = false) when it went through 5162 // the catch clause. 5163 func (this MLGraphBuilder) TryConcat(inputs js.Array[MLOperand], axis uint32) (ret MLOperand, exception js.Any, ok bool) { 5164 ok = js.True == bindings.TryMLGraphBuilderConcat( 5165 this.ref, js.Pointer(&ret), js.Pointer(&exception), 5166 inputs.Ref(), 5167 uint32(axis), 5168 ) 5169 5170 return 5171 } 5172 5173 // HasFuncGemm returns true if the method "MLGraphBuilder.gemm" exists. 5174 func (this MLGraphBuilder) HasFuncGemm() bool { 5175 return js.True == bindings.HasFuncMLGraphBuilderGemm( 5176 this.ref, 5177 ) 5178 } 5179 5180 // FuncGemm returns the method "MLGraphBuilder.gemm". 5181 func (this MLGraphBuilder) FuncGemm() (fn js.Func[func(a MLOperand, b MLOperand, options MLGemmOptions) MLOperand]) { 5182 bindings.FuncMLGraphBuilderGemm( 5183 this.ref, js.Pointer(&fn), 5184 ) 5185 return 5186 } 5187 5188 // Gemm calls the method "MLGraphBuilder.gemm". 5189 func (this MLGraphBuilder) Gemm(a MLOperand, b MLOperand, options MLGemmOptions) (ret MLOperand) { 5190 bindings.CallMLGraphBuilderGemm( 5191 this.ref, js.Pointer(&ret), 5192 a.Ref(), 5193 b.Ref(), 5194 js.Pointer(&options), 5195 ) 5196 5197 return 5198 } 5199 5200 // TryGemm calls the method "MLGraphBuilder.gemm" 5201 // in a try/catch block and returns (_, err, ok = false) when it went through 5202 // the catch clause. 5203 func (this MLGraphBuilder) TryGemm(a MLOperand, b MLOperand, options MLGemmOptions) (ret MLOperand, exception js.Any, ok bool) { 5204 ok = js.True == bindings.TryMLGraphBuilderGemm( 5205 this.ref, js.Pointer(&ret), js.Pointer(&exception), 5206 a.Ref(), 5207 b.Ref(), 5208 js.Pointer(&options), 5209 ) 5210 5211 return 5212 } 5213 5214 // HasFuncGemm1 returns true if the method "MLGraphBuilder.gemm" exists. 5215 func (this MLGraphBuilder) HasFuncGemm1() bool { 5216 return js.True == bindings.HasFuncMLGraphBuilderGemm1( 5217 this.ref, 5218 ) 5219 } 5220 5221 // FuncGemm1 returns the method "MLGraphBuilder.gemm". 5222 func (this MLGraphBuilder) FuncGemm1() (fn js.Func[func(a MLOperand, b MLOperand) MLOperand]) { 5223 bindings.FuncMLGraphBuilderGemm1( 5224 this.ref, js.Pointer(&fn), 5225 ) 5226 return 5227 } 5228 5229 // Gemm1 calls the method "MLGraphBuilder.gemm". 5230 func (this MLGraphBuilder) Gemm1(a MLOperand, b MLOperand) (ret MLOperand) { 5231 bindings.CallMLGraphBuilderGemm1( 5232 this.ref, js.Pointer(&ret), 5233 a.Ref(), 5234 b.Ref(), 5235 ) 5236 5237 return 5238 } 5239 5240 // TryGemm1 calls the method "MLGraphBuilder.gemm" 5241 // in a try/catch block and returns (_, err, ok = false) when it went through 5242 // the catch clause. 5243 func (this MLGraphBuilder) TryGemm1(a MLOperand, b MLOperand) (ret MLOperand, exception js.Any, ok bool) { 5244 ok = js.True == bindings.TryMLGraphBuilderGemm1( 5245 this.ref, js.Pointer(&ret), js.Pointer(&exception), 5246 a.Ref(), 5247 b.Ref(), 5248 ) 5249 5250 return 5251 } 5252 5253 // HasFuncLstmCell returns true if the method "MLGraphBuilder.lstmCell" exists. 5254 func (this MLGraphBuilder) HasFuncLstmCell() bool { 5255 return js.True == bindings.HasFuncMLGraphBuilderLstmCell( 5256 this.ref, 5257 ) 5258 } 5259 5260 // FuncLstmCell returns the method "MLGraphBuilder.lstmCell". 5261 func (this MLGraphBuilder) FuncLstmCell() (fn js.Func[func(input MLOperand, weight MLOperand, recurrentWeight MLOperand, hiddenState MLOperand, cellState MLOperand, hiddenSize uint32, options MLLstmCellOptions) js.Array[MLOperand]]) { 5262 bindings.FuncMLGraphBuilderLstmCell( 5263 this.ref, js.Pointer(&fn), 5264 ) 5265 return 5266 } 5267 5268 // LstmCell calls the method "MLGraphBuilder.lstmCell". 5269 func (this MLGraphBuilder) LstmCell(input MLOperand, weight MLOperand, recurrentWeight MLOperand, hiddenState MLOperand, cellState MLOperand, hiddenSize uint32, options MLLstmCellOptions) (ret js.Array[MLOperand]) { 5270 bindings.CallMLGraphBuilderLstmCell( 5271 this.ref, js.Pointer(&ret), 5272 input.Ref(), 5273 weight.Ref(), 5274 recurrentWeight.Ref(), 5275 hiddenState.Ref(), 5276 cellState.Ref(), 5277 uint32(hiddenSize), 5278 js.Pointer(&options), 5279 ) 5280 5281 return 5282 } 5283 5284 // TryLstmCell calls the method "MLGraphBuilder.lstmCell" 5285 // in a try/catch block and returns (_, err, ok = false) when it went through 5286 // the catch clause. 5287 func (this MLGraphBuilder) TryLstmCell(input MLOperand, weight MLOperand, recurrentWeight MLOperand, hiddenState MLOperand, cellState MLOperand, hiddenSize uint32, options MLLstmCellOptions) (ret js.Array[MLOperand], exception js.Any, ok bool) { 5288 ok = js.True == bindings.TryMLGraphBuilderLstmCell( 5289 this.ref, js.Pointer(&ret), js.Pointer(&exception), 5290 input.Ref(), 5291 weight.Ref(), 5292 recurrentWeight.Ref(), 5293 hiddenState.Ref(), 5294 cellState.Ref(), 5295 uint32(hiddenSize), 5296 js.Pointer(&options), 5297 ) 5298 5299 return 5300 } 5301 5302 // HasFuncLstmCell1 returns true if the method "MLGraphBuilder.lstmCell" exists. 5303 func (this MLGraphBuilder) HasFuncLstmCell1() bool { 5304 return js.True == bindings.HasFuncMLGraphBuilderLstmCell1( 5305 this.ref, 5306 ) 5307 } 5308 5309 // FuncLstmCell1 returns the method "MLGraphBuilder.lstmCell". 5310 func (this MLGraphBuilder) FuncLstmCell1() (fn js.Func[func(input MLOperand, weight MLOperand, recurrentWeight MLOperand, hiddenState MLOperand, cellState MLOperand, hiddenSize uint32) js.Array[MLOperand]]) { 5311 bindings.FuncMLGraphBuilderLstmCell1( 5312 this.ref, js.Pointer(&fn), 5313 ) 5314 return 5315 } 5316 5317 // LstmCell1 calls the method "MLGraphBuilder.lstmCell". 5318 func (this MLGraphBuilder) LstmCell1(input MLOperand, weight MLOperand, recurrentWeight MLOperand, hiddenState MLOperand, cellState MLOperand, hiddenSize uint32) (ret js.Array[MLOperand]) { 5319 bindings.CallMLGraphBuilderLstmCell1( 5320 this.ref, js.Pointer(&ret), 5321 input.Ref(), 5322 weight.Ref(), 5323 recurrentWeight.Ref(), 5324 hiddenState.Ref(), 5325 cellState.Ref(), 5326 uint32(hiddenSize), 5327 ) 5328 5329 return 5330 } 5331 5332 // TryLstmCell1 calls the method "MLGraphBuilder.lstmCell" 5333 // in a try/catch block and returns (_, err, ok = false) when it went through 5334 // the catch clause. 5335 func (this MLGraphBuilder) TryLstmCell1(input MLOperand, weight MLOperand, recurrentWeight MLOperand, hiddenState MLOperand, cellState MLOperand, hiddenSize uint32) (ret js.Array[MLOperand], exception js.Any, ok bool) { 5336 ok = js.True == bindings.TryMLGraphBuilderLstmCell1( 5337 this.ref, js.Pointer(&ret), js.Pointer(&exception), 5338 input.Ref(), 5339 weight.Ref(), 5340 recurrentWeight.Ref(), 5341 hiddenState.Ref(), 5342 cellState.Ref(), 5343 uint32(hiddenSize), 5344 ) 5345 5346 return 5347 } 5348 5349 // HasFuncBatchNormalization returns true if the method "MLGraphBuilder.batchNormalization" exists. 5350 func (this MLGraphBuilder) HasFuncBatchNormalization() bool { 5351 return js.True == bindings.HasFuncMLGraphBuilderBatchNormalization( 5352 this.ref, 5353 ) 5354 } 5355 5356 // FuncBatchNormalization returns the method "MLGraphBuilder.batchNormalization". 5357 func (this MLGraphBuilder) FuncBatchNormalization() (fn js.Func[func(input MLOperand, mean MLOperand, variance MLOperand, options MLBatchNormalizationOptions) MLOperand]) { 5358 bindings.FuncMLGraphBuilderBatchNormalization( 5359 this.ref, js.Pointer(&fn), 5360 ) 5361 return 5362 } 5363 5364 // BatchNormalization calls the method "MLGraphBuilder.batchNormalization". 5365 func (this MLGraphBuilder) BatchNormalization(input MLOperand, mean MLOperand, variance MLOperand, options MLBatchNormalizationOptions) (ret MLOperand) { 5366 bindings.CallMLGraphBuilderBatchNormalization( 5367 this.ref, js.Pointer(&ret), 5368 input.Ref(), 5369 mean.Ref(), 5370 variance.Ref(), 5371 js.Pointer(&options), 5372 ) 5373 5374 return 5375 } 5376 5377 // TryBatchNormalization calls the method "MLGraphBuilder.batchNormalization" 5378 // in a try/catch block and returns (_, err, ok = false) when it went through 5379 // the catch clause. 5380 func (this MLGraphBuilder) TryBatchNormalization(input MLOperand, mean MLOperand, variance MLOperand, options MLBatchNormalizationOptions) (ret MLOperand, exception js.Any, ok bool) { 5381 ok = js.True == bindings.TryMLGraphBuilderBatchNormalization( 5382 this.ref, js.Pointer(&ret), js.Pointer(&exception), 5383 input.Ref(), 5384 mean.Ref(), 5385 variance.Ref(), 5386 js.Pointer(&options), 5387 ) 5388 5389 return 5390 } 5391 5392 // HasFuncBatchNormalization1 returns true if the method "MLGraphBuilder.batchNormalization" exists. 5393 func (this MLGraphBuilder) HasFuncBatchNormalization1() bool { 5394 return js.True == bindings.HasFuncMLGraphBuilderBatchNormalization1( 5395 this.ref, 5396 ) 5397 } 5398 5399 // FuncBatchNormalization1 returns the method "MLGraphBuilder.batchNormalization". 5400 func (this MLGraphBuilder) FuncBatchNormalization1() (fn js.Func[func(input MLOperand, mean MLOperand, variance MLOperand) MLOperand]) { 5401 bindings.FuncMLGraphBuilderBatchNormalization1( 5402 this.ref, js.Pointer(&fn), 5403 ) 5404 return 5405 } 5406 5407 // BatchNormalization1 calls the method "MLGraphBuilder.batchNormalization". 5408 func (this MLGraphBuilder) BatchNormalization1(input MLOperand, mean MLOperand, variance MLOperand) (ret MLOperand) { 5409 bindings.CallMLGraphBuilderBatchNormalization1( 5410 this.ref, js.Pointer(&ret), 5411 input.Ref(), 5412 mean.Ref(), 5413 variance.Ref(), 5414 ) 5415 5416 return 5417 } 5418 5419 // TryBatchNormalization1 calls the method "MLGraphBuilder.batchNormalization" 5420 // in a try/catch block and returns (_, err, ok = false) when it went through 5421 // the catch clause. 5422 func (this MLGraphBuilder) TryBatchNormalization1(input MLOperand, mean MLOperand, variance MLOperand) (ret MLOperand, exception js.Any, ok bool) { 5423 ok = js.True == bindings.TryMLGraphBuilderBatchNormalization1( 5424 this.ref, js.Pointer(&ret), js.Pointer(&exception), 5425 input.Ref(), 5426 mean.Ref(), 5427 variance.Ref(), 5428 ) 5429 5430 return 5431 } 5432 5433 // HasFuncElu returns true if the method "MLGraphBuilder.elu" exists. 5434 func (this MLGraphBuilder) HasFuncElu() bool { 5435 return js.True == bindings.HasFuncMLGraphBuilderElu( 5436 this.ref, 5437 ) 5438 } 5439 5440 // FuncElu returns the method "MLGraphBuilder.elu". 5441 func (this MLGraphBuilder) FuncElu() (fn js.Func[func(input MLOperand, options MLEluOptions) MLOperand]) { 5442 bindings.FuncMLGraphBuilderElu( 5443 this.ref, js.Pointer(&fn), 5444 ) 5445 return 5446 } 5447 5448 // Elu calls the method "MLGraphBuilder.elu". 5449 func (this MLGraphBuilder) Elu(input MLOperand, options MLEluOptions) (ret MLOperand) { 5450 bindings.CallMLGraphBuilderElu( 5451 this.ref, js.Pointer(&ret), 5452 input.Ref(), 5453 js.Pointer(&options), 5454 ) 5455 5456 return 5457 } 5458 5459 // TryElu calls the method "MLGraphBuilder.elu" 5460 // in a try/catch block and returns (_, err, ok = false) when it went through 5461 // the catch clause. 5462 func (this MLGraphBuilder) TryElu(input MLOperand, options MLEluOptions) (ret MLOperand, exception js.Any, ok bool) { 5463 ok = js.True == bindings.TryMLGraphBuilderElu( 5464 this.ref, js.Pointer(&ret), js.Pointer(&exception), 5465 input.Ref(), 5466 js.Pointer(&options), 5467 ) 5468 5469 return 5470 } 5471 5472 // HasFuncElu1 returns true if the method "MLGraphBuilder.elu" exists. 5473 func (this MLGraphBuilder) HasFuncElu1() bool { 5474 return js.True == bindings.HasFuncMLGraphBuilderElu1( 5475 this.ref, 5476 ) 5477 } 5478 5479 // FuncElu1 returns the method "MLGraphBuilder.elu". 5480 func (this MLGraphBuilder) FuncElu1() (fn js.Func[func(input MLOperand) MLOperand]) { 5481 bindings.FuncMLGraphBuilderElu1( 5482 this.ref, js.Pointer(&fn), 5483 ) 5484 return 5485 } 5486 5487 // Elu1 calls the method "MLGraphBuilder.elu". 5488 func (this MLGraphBuilder) Elu1(input MLOperand) (ret MLOperand) { 5489 bindings.CallMLGraphBuilderElu1( 5490 this.ref, js.Pointer(&ret), 5491 input.Ref(), 5492 ) 5493 5494 return 5495 } 5496 5497 // TryElu1 calls the method "MLGraphBuilder.elu" 5498 // in a try/catch block and returns (_, err, ok = false) when it went through 5499 // the catch clause. 5500 func (this MLGraphBuilder) TryElu1(input MLOperand) (ret MLOperand, exception js.Any, ok bool) { 5501 ok = js.True == bindings.TryMLGraphBuilderElu1( 5502 this.ref, js.Pointer(&ret), js.Pointer(&exception), 5503 input.Ref(), 5504 ) 5505 5506 return 5507 } 5508 5509 // HasFuncElu2 returns true if the method "MLGraphBuilder.elu" exists. 5510 func (this MLGraphBuilder) HasFuncElu2() bool { 5511 return js.True == bindings.HasFuncMLGraphBuilderElu2( 5512 this.ref, 5513 ) 5514 } 5515 5516 // FuncElu2 returns the method "MLGraphBuilder.elu". 5517 func (this MLGraphBuilder) FuncElu2() (fn js.Func[func(options MLEluOptions) MLActivation]) { 5518 bindings.FuncMLGraphBuilderElu2( 5519 this.ref, js.Pointer(&fn), 5520 ) 5521 return 5522 } 5523 5524 // Elu2 calls the method "MLGraphBuilder.elu". 5525 func (this MLGraphBuilder) Elu2(options MLEluOptions) (ret MLActivation) { 5526 bindings.CallMLGraphBuilderElu2( 5527 this.ref, js.Pointer(&ret), 5528 js.Pointer(&options), 5529 ) 5530 5531 return 5532 } 5533 5534 // TryElu2 calls the method "MLGraphBuilder.elu" 5535 // in a try/catch block and returns (_, err, ok = false) when it went through 5536 // the catch clause. 5537 func (this MLGraphBuilder) TryElu2(options MLEluOptions) (ret MLActivation, exception js.Any, ok bool) { 5538 ok = js.True == bindings.TryMLGraphBuilderElu2( 5539 this.ref, js.Pointer(&ret), js.Pointer(&exception), 5540 js.Pointer(&options), 5541 ) 5542 5543 return 5544 } 5545 5546 // HasFuncElu3 returns true if the method "MLGraphBuilder.elu" exists. 5547 func (this MLGraphBuilder) HasFuncElu3() bool { 5548 return js.True == bindings.HasFuncMLGraphBuilderElu3( 5549 this.ref, 5550 ) 5551 } 5552 5553 // FuncElu3 returns the method "MLGraphBuilder.elu". 5554 func (this MLGraphBuilder) FuncElu3() (fn js.Func[func() MLActivation]) { 5555 bindings.FuncMLGraphBuilderElu3( 5556 this.ref, js.Pointer(&fn), 5557 ) 5558 return 5559 } 5560 5561 // Elu3 calls the method "MLGraphBuilder.elu". 5562 func (this MLGraphBuilder) Elu3() (ret MLActivation) { 5563 bindings.CallMLGraphBuilderElu3( 5564 this.ref, js.Pointer(&ret), 5565 ) 5566 5567 return 5568 } 5569 5570 // TryElu3 calls the method "MLGraphBuilder.elu" 5571 // in a try/catch block and returns (_, err, ok = false) when it went through 5572 // the catch clause. 5573 func (this MLGraphBuilder) TryElu3() (ret MLActivation, exception js.Any, ok bool) { 5574 ok = js.True == bindings.TryMLGraphBuilderElu3( 5575 this.ref, js.Pointer(&ret), js.Pointer(&exception), 5576 ) 5577 5578 return 5579 } 5580 5581 // HasFuncClamp returns true if the method "MLGraphBuilder.clamp" exists. 5582 func (this MLGraphBuilder) HasFuncClamp() bool { 5583 return js.True == bindings.HasFuncMLGraphBuilderClamp( 5584 this.ref, 5585 ) 5586 } 5587 5588 // FuncClamp returns the method "MLGraphBuilder.clamp". 5589 func (this MLGraphBuilder) FuncClamp() (fn js.Func[func(operand MLOperand, options MLClampOptions) MLOperand]) { 5590 bindings.FuncMLGraphBuilderClamp( 5591 this.ref, js.Pointer(&fn), 5592 ) 5593 return 5594 } 5595 5596 // Clamp calls the method "MLGraphBuilder.clamp". 5597 func (this MLGraphBuilder) Clamp(operand MLOperand, options MLClampOptions) (ret MLOperand) { 5598 bindings.CallMLGraphBuilderClamp( 5599 this.ref, js.Pointer(&ret), 5600 operand.Ref(), 5601 js.Pointer(&options), 5602 ) 5603 5604 return 5605 } 5606 5607 // TryClamp calls the method "MLGraphBuilder.clamp" 5608 // in a try/catch block and returns (_, err, ok = false) when it went through 5609 // the catch clause. 5610 func (this MLGraphBuilder) TryClamp(operand MLOperand, options MLClampOptions) (ret MLOperand, exception js.Any, ok bool) { 5611 ok = js.True == bindings.TryMLGraphBuilderClamp( 5612 this.ref, js.Pointer(&ret), js.Pointer(&exception), 5613 operand.Ref(), 5614 js.Pointer(&options), 5615 ) 5616 5617 return 5618 } 5619 5620 // HasFuncClamp1 returns true if the method "MLGraphBuilder.clamp" exists. 5621 func (this MLGraphBuilder) HasFuncClamp1() bool { 5622 return js.True == bindings.HasFuncMLGraphBuilderClamp1( 5623 this.ref, 5624 ) 5625 } 5626 5627 // FuncClamp1 returns the method "MLGraphBuilder.clamp". 5628 func (this MLGraphBuilder) FuncClamp1() (fn js.Func[func(operand MLOperand) MLOperand]) { 5629 bindings.FuncMLGraphBuilderClamp1( 5630 this.ref, js.Pointer(&fn), 5631 ) 5632 return 5633 } 5634 5635 // Clamp1 calls the method "MLGraphBuilder.clamp". 5636 func (this MLGraphBuilder) Clamp1(operand MLOperand) (ret MLOperand) { 5637 bindings.CallMLGraphBuilderClamp1( 5638 this.ref, js.Pointer(&ret), 5639 operand.Ref(), 5640 ) 5641 5642 return 5643 } 5644 5645 // TryClamp1 calls the method "MLGraphBuilder.clamp" 5646 // in a try/catch block and returns (_, err, ok = false) when it went through 5647 // the catch clause. 5648 func (this MLGraphBuilder) TryClamp1(operand MLOperand) (ret MLOperand, exception js.Any, ok bool) { 5649 ok = js.True == bindings.TryMLGraphBuilderClamp1( 5650 this.ref, js.Pointer(&ret), js.Pointer(&exception), 5651 operand.Ref(), 5652 ) 5653 5654 return 5655 } 5656 5657 // HasFuncClamp2 returns true if the method "MLGraphBuilder.clamp" exists. 5658 func (this MLGraphBuilder) HasFuncClamp2() bool { 5659 return js.True == bindings.HasFuncMLGraphBuilderClamp2( 5660 this.ref, 5661 ) 5662 } 5663 5664 // FuncClamp2 returns the method "MLGraphBuilder.clamp". 5665 func (this MLGraphBuilder) FuncClamp2() (fn js.Func[func(options MLClampOptions) MLActivation]) { 5666 bindings.FuncMLGraphBuilderClamp2( 5667 this.ref, js.Pointer(&fn), 5668 ) 5669 return 5670 } 5671 5672 // Clamp2 calls the method "MLGraphBuilder.clamp". 5673 func (this MLGraphBuilder) Clamp2(options MLClampOptions) (ret MLActivation) { 5674 bindings.CallMLGraphBuilderClamp2( 5675 this.ref, js.Pointer(&ret), 5676 js.Pointer(&options), 5677 ) 5678 5679 return 5680 } 5681 5682 // TryClamp2 calls the method "MLGraphBuilder.clamp" 5683 // in a try/catch block and returns (_, err, ok = false) when it went through 5684 // the catch clause. 5685 func (this MLGraphBuilder) TryClamp2(options MLClampOptions) (ret MLActivation, exception js.Any, ok bool) { 5686 ok = js.True == bindings.TryMLGraphBuilderClamp2( 5687 this.ref, js.Pointer(&ret), js.Pointer(&exception), 5688 js.Pointer(&options), 5689 ) 5690 5691 return 5692 } 5693 5694 // HasFuncClamp3 returns true if the method "MLGraphBuilder.clamp" exists. 5695 func (this MLGraphBuilder) HasFuncClamp3() bool { 5696 return js.True == bindings.HasFuncMLGraphBuilderClamp3( 5697 this.ref, 5698 ) 5699 } 5700 5701 // FuncClamp3 returns the method "MLGraphBuilder.clamp". 5702 func (this MLGraphBuilder) FuncClamp3() (fn js.Func[func() MLActivation]) { 5703 bindings.FuncMLGraphBuilderClamp3( 5704 this.ref, js.Pointer(&fn), 5705 ) 5706 return 5707 } 5708 5709 // Clamp3 calls the method "MLGraphBuilder.clamp". 5710 func (this MLGraphBuilder) Clamp3() (ret MLActivation) { 5711 bindings.CallMLGraphBuilderClamp3( 5712 this.ref, js.Pointer(&ret), 5713 ) 5714 5715 return 5716 } 5717 5718 // TryClamp3 calls the method "MLGraphBuilder.clamp" 5719 // in a try/catch block and returns (_, err, ok = false) when it went through 5720 // the catch clause. 5721 func (this MLGraphBuilder) TryClamp3() (ret MLActivation, exception js.Any, ok bool) { 5722 ok = js.True == bindings.TryMLGraphBuilderClamp3( 5723 this.ref, js.Pointer(&ret), js.Pointer(&exception), 5724 ) 5725 5726 return 5727 } 5728 5729 type MagnetometerLocalCoordinateSystem uint32 5730 5731 const ( 5732 _ MagnetometerLocalCoordinateSystem = iota 5733 5734 MagnetometerLocalCoordinateSystem_DEVICE 5735 MagnetometerLocalCoordinateSystem_SCREEN 5736 ) 5737 5738 func (MagnetometerLocalCoordinateSystem) FromRef(str js.Ref) MagnetometerLocalCoordinateSystem { 5739 return MagnetometerLocalCoordinateSystem(bindings.ConstOfMagnetometerLocalCoordinateSystem(str)) 5740 } 5741 5742 func (x MagnetometerLocalCoordinateSystem) String() (string, bool) { 5743 switch x { 5744 case MagnetometerLocalCoordinateSystem_DEVICE: 5745 return "device", true 5746 case MagnetometerLocalCoordinateSystem_SCREEN: 5747 return "screen", true 5748 default: 5749 return "", false 5750 } 5751 } 5752 5753 type MagnetometerSensorOptions struct { 5754 // ReferenceFrame is "MagnetometerSensorOptions.referenceFrame" 5755 // 5756 // Optional, defaults to "device". 5757 ReferenceFrame MagnetometerLocalCoordinateSystem 5758 // Frequency is "MagnetometerSensorOptions.frequency" 5759 // 5760 // Optional 5761 // 5762 // NOTE: FFI_USE_Frequency MUST be set to true to make this field effective. 5763 Frequency float64 5764 5765 FFI_USE_Frequency bool // for Frequency. 5766 5767 FFI_USE bool 5768 } 5769 5770 // FromRef calls UpdateFrom and returns a MagnetometerSensorOptions with all fields set. 5771 func (p MagnetometerSensorOptions) FromRef(ref js.Ref) MagnetometerSensorOptions { 5772 p.UpdateFrom(ref) 5773 return p 5774 } 5775 5776 // New creates a new MagnetometerSensorOptions in the application heap. 5777 func (p MagnetometerSensorOptions) New() js.Ref { 5778 return bindings.MagnetometerSensorOptionsJSLoad( 5779 js.Pointer(&p), js.True, 0, 5780 ) 5781 } 5782 5783 // UpdateFrom copies value of all fields of the heap object to p. 5784 func (p *MagnetometerSensorOptions) UpdateFrom(ref js.Ref) { 5785 bindings.MagnetometerSensorOptionsJSStore( 5786 js.Pointer(p), ref, 5787 ) 5788 } 5789 5790 // Update writes all fields of the p to the heap object referenced by ref. 5791 func (p *MagnetometerSensorOptions) Update(ref js.Ref) { 5792 bindings.MagnetometerSensorOptionsJSLoad( 5793 js.Pointer(p), js.False, ref, 5794 ) 5795 } 5796 5797 // FreeMembers frees fields with heap reference, if recursive is true 5798 // free all heap references reachable from p. 5799 func (p *MagnetometerSensorOptions) FreeMembers(recursive bool) { 5800 } 5801 5802 func NewMagnetometer(sensorOptions MagnetometerSensorOptions) (ret Magnetometer) { 5803 ret.ref = bindings.NewMagnetometerByMagnetometer( 5804 js.Pointer(&sensorOptions)) 5805 return 5806 } 5807 5808 func NewMagnetometerByMagnetometer1() (ret Magnetometer) { 5809 ret.ref = bindings.NewMagnetometerByMagnetometer1() 5810 return 5811 } 5812 5813 type Magnetometer struct { 5814 Sensor 5815 } 5816 5817 func (this Magnetometer) Once() Magnetometer { 5818 this.ref.Once() 5819 return this 5820 } 5821 5822 func (this Magnetometer) Ref() js.Ref { 5823 return this.Sensor.Ref() 5824 } 5825 5826 func (this Magnetometer) FromRef(ref js.Ref) Magnetometer { 5827 this.Sensor = this.Sensor.FromRef(ref) 5828 return this 5829 } 5830 5831 func (this Magnetometer) Free() { 5832 this.ref.Free() 5833 } 5834 5835 // X returns the value of property "Magnetometer.x". 5836 // 5837 // It returns ok=false if there is no such property. 5838 func (this Magnetometer) X() (ret float64, ok bool) { 5839 ok = js.True == bindings.GetMagnetometerX( 5840 this.ref, js.Pointer(&ret), 5841 ) 5842 return 5843 } 5844 5845 // Y returns the value of property "Magnetometer.y". 5846 // 5847 // It returns ok=false if there is no such property. 5848 func (this Magnetometer) Y() (ret float64, ok bool) { 5849 ok = js.True == bindings.GetMagnetometerY( 5850 this.ref, js.Pointer(&ret), 5851 ) 5852 return 5853 } 5854 5855 // Z returns the value of property "Magnetometer.z". 5856 // 5857 // It returns ok=false if there is no such property. 5858 func (this Magnetometer) Z() (ret float64, ok bool) { 5859 ok = js.True == bindings.GetMagnetometerZ( 5860 this.ref, js.Pointer(&ret), 5861 ) 5862 return 5863 } 5864 5865 type MagnetometerReadingValues struct { 5866 // X is "MagnetometerReadingValues.x" 5867 // 5868 // Required 5869 X float64 5870 // Y is "MagnetometerReadingValues.y" 5871 // 5872 // Required 5873 Y float64 5874 // Z is "MagnetometerReadingValues.z" 5875 // 5876 // Required 5877 Z float64 5878 5879 FFI_USE bool 5880 } 5881 5882 // FromRef calls UpdateFrom and returns a MagnetometerReadingValues with all fields set. 5883 func (p MagnetometerReadingValues) FromRef(ref js.Ref) MagnetometerReadingValues { 5884 p.UpdateFrom(ref) 5885 return p 5886 } 5887 5888 // New creates a new MagnetometerReadingValues in the application heap. 5889 func (p MagnetometerReadingValues) New() js.Ref { 5890 return bindings.MagnetometerReadingValuesJSLoad( 5891 js.Pointer(&p), js.True, 0, 5892 ) 5893 } 5894 5895 // UpdateFrom copies value of all fields of the heap object to p. 5896 func (p *MagnetometerReadingValues) UpdateFrom(ref js.Ref) { 5897 bindings.MagnetometerReadingValuesJSStore( 5898 js.Pointer(p), ref, 5899 ) 5900 } 5901 5902 // Update writes all fields of the p to the heap object referenced by ref. 5903 func (p *MagnetometerReadingValues) Update(ref js.Ref) { 5904 bindings.MagnetometerReadingValuesJSLoad( 5905 js.Pointer(p), js.False, ref, 5906 ) 5907 } 5908 5909 // FreeMembers frees fields with heap reference, if recursive is true 5910 // free all heap references reachable from p. 5911 func (p *MagnetometerReadingValues) FreeMembers(recursive bool) { 5912 } 5913 5914 type MathMLElement struct { 5915 Element 5916 } 5917 5918 func (this MathMLElement) Once() MathMLElement { 5919 this.ref.Once() 5920 return this 5921 } 5922 5923 func (this MathMLElement) Ref() js.Ref { 5924 return this.Element.Ref() 5925 } 5926 5927 func (this MathMLElement) FromRef(ref js.Ref) MathMLElement { 5928 this.Element = this.Element.FromRef(ref) 5929 return this 5930 } 5931 5932 func (this MathMLElement) Free() { 5933 this.ref.Free() 5934 } 5935 5936 // Style returns the value of property "MathMLElement.style". 5937 // 5938 // It returns ok=false if there is no such property. 5939 func (this MathMLElement) Style() (ret CSSStyleDeclaration, ok bool) { 5940 ok = js.True == bindings.GetMathMLElementStyle( 5941 this.ref, js.Pointer(&ret), 5942 ) 5943 return 5944 } 5945 5946 // AttributeStyleMap returns the value of property "MathMLElement.attributeStyleMap". 5947 // 5948 // It returns ok=false if there is no such property. 5949 func (this MathMLElement) AttributeStyleMap() (ret StylePropertyMap, ok bool) { 5950 ok = js.True == bindings.GetMathMLElementAttributeStyleMap( 5951 this.ref, js.Pointer(&ret), 5952 ) 5953 return 5954 } 5955 5956 // Dataset returns the value of property "MathMLElement.dataset". 5957 // 5958 // It returns ok=false if there is no such property. 5959 func (this MathMLElement) Dataset() (ret DOMStringMap, ok bool) { 5960 ok = js.True == bindings.GetMathMLElementDataset( 5961 this.ref, js.Pointer(&ret), 5962 ) 5963 return 5964 } 5965 5966 // Nonce returns the value of property "MathMLElement.nonce". 5967 // 5968 // It returns ok=false if there is no such property. 5969 func (this MathMLElement) Nonce() (ret js.String, ok bool) { 5970 ok = js.True == bindings.GetMathMLElementNonce( 5971 this.ref, js.Pointer(&ret), 5972 ) 5973 return 5974 } 5975 5976 // SetNonce sets the value of property "MathMLElement.nonce" to val. 5977 // 5978 // It returns false if the property cannot be set. 5979 func (this MathMLElement) SetNonce(val js.String) bool { 5980 return js.True == bindings.SetMathMLElementNonce( 5981 this.ref, 5982 val.Ref(), 5983 ) 5984 } 5985 5986 // Autofocus returns the value of property "MathMLElement.autofocus". 5987 // 5988 // It returns ok=false if there is no such property. 5989 func (this MathMLElement) Autofocus() (ret bool, ok bool) { 5990 ok = js.True == bindings.GetMathMLElementAutofocus( 5991 this.ref, js.Pointer(&ret), 5992 ) 5993 return 5994 } 5995 5996 // SetAutofocus sets the value of property "MathMLElement.autofocus" to val. 5997 // 5998 // It returns false if the property cannot be set. 5999 func (this MathMLElement) SetAutofocus(val bool) bool { 6000 return js.True == bindings.SetMathMLElementAutofocus( 6001 this.ref, 6002 js.Bool(bool(val)), 6003 ) 6004 } 6005 6006 // TabIndex returns the value of property "MathMLElement.tabIndex". 6007 // 6008 // It returns ok=false if there is no such property. 6009 func (this MathMLElement) TabIndex() (ret int32, ok bool) { 6010 ok = js.True == bindings.GetMathMLElementTabIndex( 6011 this.ref, js.Pointer(&ret), 6012 ) 6013 return 6014 } 6015 6016 // SetTabIndex sets the value of property "MathMLElement.tabIndex" to val. 6017 // 6018 // It returns false if the property cannot be set. 6019 func (this MathMLElement) SetTabIndex(val int32) bool { 6020 return js.True == bindings.SetMathMLElementTabIndex( 6021 this.ref, 6022 int32(val), 6023 ) 6024 } 6025 6026 // HasFuncFocus returns true if the method "MathMLElement.focus" exists. 6027 func (this MathMLElement) HasFuncFocus() bool { 6028 return js.True == bindings.HasFuncMathMLElementFocus( 6029 this.ref, 6030 ) 6031 } 6032 6033 // FuncFocus returns the method "MathMLElement.focus". 6034 func (this MathMLElement) FuncFocus() (fn js.Func[func(options FocusOptions)]) { 6035 bindings.FuncMathMLElementFocus( 6036 this.ref, js.Pointer(&fn), 6037 ) 6038 return 6039 } 6040 6041 // Focus calls the method "MathMLElement.focus". 6042 func (this MathMLElement) Focus(options FocusOptions) (ret js.Void) { 6043 bindings.CallMathMLElementFocus( 6044 this.ref, js.Pointer(&ret), 6045 js.Pointer(&options), 6046 ) 6047 6048 return 6049 } 6050 6051 // TryFocus calls the method "MathMLElement.focus" 6052 // in a try/catch block and returns (_, err, ok = false) when it went through 6053 // the catch clause. 6054 func (this MathMLElement) TryFocus(options FocusOptions) (ret js.Void, exception js.Any, ok bool) { 6055 ok = js.True == bindings.TryMathMLElementFocus( 6056 this.ref, js.Pointer(&ret), js.Pointer(&exception), 6057 js.Pointer(&options), 6058 ) 6059 6060 return 6061 } 6062 6063 // HasFuncFocus1 returns true if the method "MathMLElement.focus" exists. 6064 func (this MathMLElement) HasFuncFocus1() bool { 6065 return js.True == bindings.HasFuncMathMLElementFocus1( 6066 this.ref, 6067 ) 6068 } 6069 6070 // FuncFocus1 returns the method "MathMLElement.focus". 6071 func (this MathMLElement) FuncFocus1() (fn js.Func[func()]) { 6072 bindings.FuncMathMLElementFocus1( 6073 this.ref, js.Pointer(&fn), 6074 ) 6075 return 6076 } 6077 6078 // Focus1 calls the method "MathMLElement.focus". 6079 func (this MathMLElement) Focus1() (ret js.Void) { 6080 bindings.CallMathMLElementFocus1( 6081 this.ref, js.Pointer(&ret), 6082 ) 6083 6084 return 6085 } 6086 6087 // TryFocus1 calls the method "MathMLElement.focus" 6088 // in a try/catch block and returns (_, err, ok = false) when it went through 6089 // the catch clause. 6090 func (this MathMLElement) TryFocus1() (ret js.Void, exception js.Any, ok bool) { 6091 ok = js.True == bindings.TryMathMLElementFocus1( 6092 this.ref, js.Pointer(&ret), js.Pointer(&exception), 6093 ) 6094 6095 return 6096 } 6097 6098 // HasFuncBlur returns true if the method "MathMLElement.blur" exists. 6099 func (this MathMLElement) HasFuncBlur() bool { 6100 return js.True == bindings.HasFuncMathMLElementBlur( 6101 this.ref, 6102 ) 6103 } 6104 6105 // FuncBlur returns the method "MathMLElement.blur". 6106 func (this MathMLElement) FuncBlur() (fn js.Func[func()]) { 6107 bindings.FuncMathMLElementBlur( 6108 this.ref, js.Pointer(&fn), 6109 ) 6110 return 6111 } 6112 6113 // Blur calls the method "MathMLElement.blur". 6114 func (this MathMLElement) Blur() (ret js.Void) { 6115 bindings.CallMathMLElementBlur( 6116 this.ref, js.Pointer(&ret), 6117 ) 6118 6119 return 6120 } 6121 6122 // TryBlur calls the method "MathMLElement.blur" 6123 // in a try/catch block and returns (_, err, ok = false) when it went through 6124 // the catch clause. 6125 func (this MathMLElement) TryBlur() (ret js.Void, exception js.Any, ok bool) { 6126 ok = js.True == bindings.TryMathMLElementBlur( 6127 this.ref, js.Pointer(&ret), js.Pointer(&exception), 6128 ) 6129 6130 return 6131 } 6132 6133 type MediaCapabilitiesInfo struct { 6134 // Supported is "MediaCapabilitiesInfo.supported" 6135 // 6136 // Required 6137 Supported bool 6138 // Smooth is "MediaCapabilitiesInfo.smooth" 6139 // 6140 // Required 6141 Smooth bool 6142 // PowerEfficient is "MediaCapabilitiesInfo.powerEfficient" 6143 // 6144 // Required 6145 PowerEfficient bool 6146 6147 FFI_USE bool 6148 } 6149 6150 // FromRef calls UpdateFrom and returns a MediaCapabilitiesInfo with all fields set. 6151 func (p MediaCapabilitiesInfo) FromRef(ref js.Ref) MediaCapabilitiesInfo { 6152 p.UpdateFrom(ref) 6153 return p 6154 } 6155 6156 // New creates a new MediaCapabilitiesInfo in the application heap. 6157 func (p MediaCapabilitiesInfo) New() js.Ref { 6158 return bindings.MediaCapabilitiesInfoJSLoad( 6159 js.Pointer(&p), js.True, 0, 6160 ) 6161 } 6162 6163 // UpdateFrom copies value of all fields of the heap object to p. 6164 func (p *MediaCapabilitiesInfo) UpdateFrom(ref js.Ref) { 6165 bindings.MediaCapabilitiesInfoJSStore( 6166 js.Pointer(p), ref, 6167 ) 6168 } 6169 6170 // Update writes all fields of the p to the heap object referenced by ref. 6171 func (p *MediaCapabilitiesInfo) Update(ref js.Ref) { 6172 bindings.MediaCapabilitiesInfoJSLoad( 6173 js.Pointer(p), js.False, ref, 6174 ) 6175 } 6176 6177 // FreeMembers frees fields with heap reference, if recursive is true 6178 // free all heap references reachable from p. 6179 func (p *MediaCapabilitiesInfo) FreeMembers(recursive bool) { 6180 } 6181 6182 type MediaConfiguration struct { 6183 // Video is "MediaConfiguration.video" 6184 // 6185 // Optional 6186 // 6187 // NOTE: Video.FFI_USE MUST be set to true to get Video used. 6188 Video VideoConfiguration 6189 // Audio is "MediaConfiguration.audio" 6190 // 6191 // Optional 6192 // 6193 // NOTE: Audio.FFI_USE MUST be set to true to get Audio used. 6194 Audio AudioConfiguration 6195 6196 FFI_USE bool 6197 } 6198 6199 // FromRef calls UpdateFrom and returns a MediaConfiguration with all fields set. 6200 func (p MediaConfiguration) FromRef(ref js.Ref) MediaConfiguration { 6201 p.UpdateFrom(ref) 6202 return p 6203 } 6204 6205 // New creates a new MediaConfiguration in the application heap. 6206 func (p MediaConfiguration) New() js.Ref { 6207 return bindings.MediaConfigurationJSLoad( 6208 js.Pointer(&p), js.True, 0, 6209 ) 6210 } 6211 6212 // UpdateFrom copies value of all fields of the heap object to p. 6213 func (p *MediaConfiguration) UpdateFrom(ref js.Ref) { 6214 bindings.MediaConfigurationJSStore( 6215 js.Pointer(p), ref, 6216 ) 6217 } 6218 6219 // Update writes all fields of the p to the heap object referenced by ref. 6220 func (p *MediaConfiguration) Update(ref js.Ref) { 6221 bindings.MediaConfigurationJSLoad( 6222 js.Pointer(p), js.False, ref, 6223 ) 6224 } 6225 6226 // FreeMembers frees fields with heap reference, if recursive is true 6227 // free all heap references reachable from p. 6228 func (p *MediaConfiguration) FreeMembers(recursive bool) { 6229 if recursive { 6230 p.Video.FreeMembers(true) 6231 p.Audio.FreeMembers(true) 6232 } 6233 } 6234 6235 type MediaEncryptedEventInit struct { 6236 // InitDataType is "MediaEncryptedEventInit.initDataType" 6237 // 6238 // Optional, defaults to "". 6239 InitDataType js.String 6240 // InitData is "MediaEncryptedEventInit.initData" 6241 // 6242 // Optional, defaults to null. 6243 InitData js.ArrayBuffer 6244 // Bubbles is "MediaEncryptedEventInit.bubbles" 6245 // 6246 // Optional, defaults to false. 6247 // 6248 // NOTE: FFI_USE_Bubbles MUST be set to true to make this field effective. 6249 Bubbles bool 6250 // Cancelable is "MediaEncryptedEventInit.cancelable" 6251 // 6252 // Optional, defaults to false. 6253 // 6254 // NOTE: FFI_USE_Cancelable MUST be set to true to make this field effective. 6255 Cancelable bool 6256 // Composed is "MediaEncryptedEventInit.composed" 6257 // 6258 // Optional, defaults to false. 6259 // 6260 // NOTE: FFI_USE_Composed MUST be set to true to make this field effective. 6261 Composed bool 6262 6263 FFI_USE_Bubbles bool // for Bubbles. 6264 FFI_USE_Cancelable bool // for Cancelable. 6265 FFI_USE_Composed bool // for Composed. 6266 6267 FFI_USE bool 6268 } 6269 6270 // FromRef calls UpdateFrom and returns a MediaEncryptedEventInit with all fields set. 6271 func (p MediaEncryptedEventInit) FromRef(ref js.Ref) MediaEncryptedEventInit { 6272 p.UpdateFrom(ref) 6273 return p 6274 } 6275 6276 // New creates a new MediaEncryptedEventInit in the application heap. 6277 func (p MediaEncryptedEventInit) New() js.Ref { 6278 return bindings.MediaEncryptedEventInitJSLoad( 6279 js.Pointer(&p), js.True, 0, 6280 ) 6281 } 6282 6283 // UpdateFrom copies value of all fields of the heap object to p. 6284 func (p *MediaEncryptedEventInit) UpdateFrom(ref js.Ref) { 6285 bindings.MediaEncryptedEventInitJSStore( 6286 js.Pointer(p), ref, 6287 ) 6288 } 6289 6290 // Update writes all fields of the p to the heap object referenced by ref. 6291 func (p *MediaEncryptedEventInit) Update(ref js.Ref) { 6292 bindings.MediaEncryptedEventInitJSLoad( 6293 js.Pointer(p), js.False, ref, 6294 ) 6295 } 6296 6297 // FreeMembers frees fields with heap reference, if recursive is true 6298 // free all heap references reachable from p. 6299 func (p *MediaEncryptedEventInit) FreeMembers(recursive bool) { 6300 js.Free( 6301 p.InitDataType.Ref(), 6302 p.InitData.Ref(), 6303 ) 6304 p.InitDataType = p.InitDataType.FromRef(js.Undefined) 6305 p.InitData = p.InitData.FromRef(js.Undefined) 6306 } 6307 6308 func NewMediaEncryptedEvent(typ js.String, eventInitDict MediaEncryptedEventInit) (ret MediaEncryptedEvent) { 6309 ret.ref = bindings.NewMediaEncryptedEventByMediaEncryptedEvent( 6310 typ.Ref(), 6311 js.Pointer(&eventInitDict)) 6312 return 6313 } 6314 6315 func NewMediaEncryptedEventByMediaEncryptedEvent1(typ js.String) (ret MediaEncryptedEvent) { 6316 ret.ref = bindings.NewMediaEncryptedEventByMediaEncryptedEvent1( 6317 typ.Ref()) 6318 return 6319 } 6320 6321 type MediaEncryptedEvent struct { 6322 Event 6323 } 6324 6325 func (this MediaEncryptedEvent) Once() MediaEncryptedEvent { 6326 this.ref.Once() 6327 return this 6328 } 6329 6330 func (this MediaEncryptedEvent) Ref() js.Ref { 6331 return this.Event.Ref() 6332 } 6333 6334 func (this MediaEncryptedEvent) FromRef(ref js.Ref) MediaEncryptedEvent { 6335 this.Event = this.Event.FromRef(ref) 6336 return this 6337 } 6338 6339 func (this MediaEncryptedEvent) Free() { 6340 this.ref.Free() 6341 } 6342 6343 // InitDataType returns the value of property "MediaEncryptedEvent.initDataType". 6344 // 6345 // It returns ok=false if there is no such property. 6346 func (this MediaEncryptedEvent) InitDataType() (ret js.String, ok bool) { 6347 ok = js.True == bindings.GetMediaEncryptedEventInitDataType( 6348 this.ref, js.Pointer(&ret), 6349 ) 6350 return 6351 } 6352 6353 // InitData returns the value of property "MediaEncryptedEvent.initData". 6354 // 6355 // It returns ok=false if there is no such property. 6356 func (this MediaEncryptedEvent) InitData() (ret js.ArrayBuffer, ok bool) { 6357 ok = js.True == bindings.GetMediaEncryptedEventInitData( 6358 this.ref, js.Pointer(&ret), 6359 ) 6360 return 6361 } 6362 6363 type MediaKeyMessageType uint32 6364 6365 const ( 6366 _ MediaKeyMessageType = iota 6367 6368 MediaKeyMessageType_LICENSE_REQUEST 6369 MediaKeyMessageType_LICENSE_RENEWAL 6370 MediaKeyMessageType_LICENSE_RELEASE 6371 MediaKeyMessageType_INDIVIDUALIZATION_REQUEST 6372 ) 6373 6374 func (MediaKeyMessageType) FromRef(str js.Ref) MediaKeyMessageType { 6375 return MediaKeyMessageType(bindings.ConstOfMediaKeyMessageType(str)) 6376 } 6377 6378 func (x MediaKeyMessageType) String() (string, bool) { 6379 switch x { 6380 case MediaKeyMessageType_LICENSE_REQUEST: 6381 return "license-request", true 6382 case MediaKeyMessageType_LICENSE_RENEWAL: 6383 return "license-renewal", true 6384 case MediaKeyMessageType_LICENSE_RELEASE: 6385 return "license-release", true 6386 case MediaKeyMessageType_INDIVIDUALIZATION_REQUEST: 6387 return "individualization-request", true 6388 default: 6389 return "", false 6390 } 6391 } 6392 6393 type MediaKeyMessageEventInit struct { 6394 // MessageType is "MediaKeyMessageEventInit.messageType" 6395 // 6396 // Required 6397 MessageType MediaKeyMessageType 6398 // Message is "MediaKeyMessageEventInit.message" 6399 // 6400 // Required 6401 Message js.ArrayBuffer 6402 // Bubbles is "MediaKeyMessageEventInit.bubbles" 6403 // 6404 // Optional, defaults to false. 6405 // 6406 // NOTE: FFI_USE_Bubbles MUST be set to true to make this field effective. 6407 Bubbles bool 6408 // Cancelable is "MediaKeyMessageEventInit.cancelable" 6409 // 6410 // Optional, defaults to false. 6411 // 6412 // NOTE: FFI_USE_Cancelable MUST be set to true to make this field effective. 6413 Cancelable bool 6414 // Composed is "MediaKeyMessageEventInit.composed" 6415 // 6416 // Optional, defaults to false. 6417 // 6418 // NOTE: FFI_USE_Composed MUST be set to true to make this field effective. 6419 Composed bool 6420 6421 FFI_USE_Bubbles bool // for Bubbles. 6422 FFI_USE_Cancelable bool // for Cancelable. 6423 FFI_USE_Composed bool // for Composed. 6424 6425 FFI_USE bool 6426 } 6427 6428 // FromRef calls UpdateFrom and returns a MediaKeyMessageEventInit with all fields set. 6429 func (p MediaKeyMessageEventInit) FromRef(ref js.Ref) MediaKeyMessageEventInit { 6430 p.UpdateFrom(ref) 6431 return p 6432 } 6433 6434 // New creates a new MediaKeyMessageEventInit in the application heap. 6435 func (p MediaKeyMessageEventInit) New() js.Ref { 6436 return bindings.MediaKeyMessageEventInitJSLoad( 6437 js.Pointer(&p), js.True, 0, 6438 ) 6439 } 6440 6441 // UpdateFrom copies value of all fields of the heap object to p. 6442 func (p *MediaKeyMessageEventInit) UpdateFrom(ref js.Ref) { 6443 bindings.MediaKeyMessageEventInitJSStore( 6444 js.Pointer(p), ref, 6445 ) 6446 } 6447 6448 // Update writes all fields of the p to the heap object referenced by ref. 6449 func (p *MediaKeyMessageEventInit) Update(ref js.Ref) { 6450 bindings.MediaKeyMessageEventInitJSLoad( 6451 js.Pointer(p), js.False, ref, 6452 ) 6453 } 6454 6455 // FreeMembers frees fields with heap reference, if recursive is true 6456 // free all heap references reachable from p. 6457 func (p *MediaKeyMessageEventInit) FreeMembers(recursive bool) { 6458 js.Free( 6459 p.Message.Ref(), 6460 ) 6461 p.Message = p.Message.FromRef(js.Undefined) 6462 } 6463 6464 func NewMediaKeyMessageEvent(typ js.String, eventInitDict MediaKeyMessageEventInit) (ret MediaKeyMessageEvent) { 6465 ret.ref = bindings.NewMediaKeyMessageEventByMediaKeyMessageEvent( 6466 typ.Ref(), 6467 js.Pointer(&eventInitDict)) 6468 return 6469 } 6470 6471 type MediaKeyMessageEvent struct { 6472 Event 6473 } 6474 6475 func (this MediaKeyMessageEvent) Once() MediaKeyMessageEvent { 6476 this.ref.Once() 6477 return this 6478 } 6479 6480 func (this MediaKeyMessageEvent) Ref() js.Ref { 6481 return this.Event.Ref() 6482 } 6483 6484 func (this MediaKeyMessageEvent) FromRef(ref js.Ref) MediaKeyMessageEvent { 6485 this.Event = this.Event.FromRef(ref) 6486 return this 6487 } 6488 6489 func (this MediaKeyMessageEvent) Free() { 6490 this.ref.Free() 6491 } 6492 6493 // MessageType returns the value of property "MediaKeyMessageEvent.messageType". 6494 // 6495 // It returns ok=false if there is no such property. 6496 func (this MediaKeyMessageEvent) MessageType() (ret MediaKeyMessageType, ok bool) { 6497 ok = js.True == bindings.GetMediaKeyMessageEventMessageType( 6498 this.ref, js.Pointer(&ret), 6499 ) 6500 return 6501 } 6502 6503 // Message returns the value of property "MediaKeyMessageEvent.message". 6504 // 6505 // It returns ok=false if there is no such property. 6506 func (this MediaKeyMessageEvent) Message() (ret js.ArrayBuffer, ok bool) { 6507 ok = js.True == bindings.GetMediaKeyMessageEventMessage( 6508 this.ref, js.Pointer(&ret), 6509 ) 6510 return 6511 } 6512 6513 type MediaQueryListEventInit struct { 6514 // Media is "MediaQueryListEventInit.media" 6515 // 6516 // Optional, defaults to "". 6517 Media js.String 6518 // Matches is "MediaQueryListEventInit.matches" 6519 // 6520 // Optional, defaults to false. 6521 // 6522 // NOTE: FFI_USE_Matches MUST be set to true to make this field effective. 6523 Matches bool 6524 // Bubbles is "MediaQueryListEventInit.bubbles" 6525 // 6526 // Optional, defaults to false. 6527 // 6528 // NOTE: FFI_USE_Bubbles MUST be set to true to make this field effective. 6529 Bubbles bool 6530 // Cancelable is "MediaQueryListEventInit.cancelable" 6531 // 6532 // Optional, defaults to false. 6533 // 6534 // NOTE: FFI_USE_Cancelable MUST be set to true to make this field effective. 6535 Cancelable bool 6536 // Composed is "MediaQueryListEventInit.composed" 6537 // 6538 // Optional, defaults to false. 6539 // 6540 // NOTE: FFI_USE_Composed MUST be set to true to make this field effective. 6541 Composed bool 6542 6543 FFI_USE_Matches bool // for Matches. 6544 FFI_USE_Bubbles bool // for Bubbles. 6545 FFI_USE_Cancelable bool // for Cancelable. 6546 FFI_USE_Composed bool // for Composed. 6547 6548 FFI_USE bool 6549 } 6550 6551 // FromRef calls UpdateFrom and returns a MediaQueryListEventInit with all fields set. 6552 func (p MediaQueryListEventInit) FromRef(ref js.Ref) MediaQueryListEventInit { 6553 p.UpdateFrom(ref) 6554 return p 6555 } 6556 6557 // New creates a new MediaQueryListEventInit in the application heap. 6558 func (p MediaQueryListEventInit) New() js.Ref { 6559 return bindings.MediaQueryListEventInitJSLoad( 6560 js.Pointer(&p), js.True, 0, 6561 ) 6562 } 6563 6564 // UpdateFrom copies value of all fields of the heap object to p. 6565 func (p *MediaQueryListEventInit) UpdateFrom(ref js.Ref) { 6566 bindings.MediaQueryListEventInitJSStore( 6567 js.Pointer(p), ref, 6568 ) 6569 } 6570 6571 // Update writes all fields of the p to the heap object referenced by ref. 6572 func (p *MediaQueryListEventInit) Update(ref js.Ref) { 6573 bindings.MediaQueryListEventInitJSLoad( 6574 js.Pointer(p), js.False, ref, 6575 ) 6576 } 6577 6578 // FreeMembers frees fields with heap reference, if recursive is true 6579 // free all heap references reachable from p. 6580 func (p *MediaQueryListEventInit) FreeMembers(recursive bool) { 6581 js.Free( 6582 p.Media.Ref(), 6583 ) 6584 p.Media = p.Media.FromRef(js.Undefined) 6585 } 6586 6587 func NewMediaQueryListEvent(typ js.String, eventInitDict MediaQueryListEventInit) (ret MediaQueryListEvent) { 6588 ret.ref = bindings.NewMediaQueryListEventByMediaQueryListEvent( 6589 typ.Ref(), 6590 js.Pointer(&eventInitDict)) 6591 return 6592 } 6593 6594 func NewMediaQueryListEventByMediaQueryListEvent1(typ js.String) (ret MediaQueryListEvent) { 6595 ret.ref = bindings.NewMediaQueryListEventByMediaQueryListEvent1( 6596 typ.Ref()) 6597 return 6598 } 6599 6600 type MediaQueryListEvent struct { 6601 Event 6602 } 6603 6604 func (this MediaQueryListEvent) Once() MediaQueryListEvent { 6605 this.ref.Once() 6606 return this 6607 } 6608 6609 func (this MediaQueryListEvent) Ref() js.Ref { 6610 return this.Event.Ref() 6611 } 6612 6613 func (this MediaQueryListEvent) FromRef(ref js.Ref) MediaQueryListEvent { 6614 this.Event = this.Event.FromRef(ref) 6615 return this 6616 } 6617 6618 func (this MediaQueryListEvent) Free() { 6619 this.ref.Free() 6620 } 6621 6622 // Media returns the value of property "MediaQueryListEvent.media". 6623 // 6624 // It returns ok=false if there is no such property. 6625 func (this MediaQueryListEvent) Media() (ret js.String, ok bool) { 6626 ok = js.True == bindings.GetMediaQueryListEventMedia( 6627 this.ref, js.Pointer(&ret), 6628 ) 6629 return 6630 } 6631 6632 // Matches returns the value of property "MediaQueryListEvent.matches". 6633 // 6634 // It returns ok=false if there is no such property. 6635 func (this MediaQueryListEvent) Matches() (ret bool, ok bool) { 6636 ok = js.True == bindings.GetMediaQueryListEventMatches( 6637 this.ref, js.Pointer(&ret), 6638 ) 6639 return 6640 } 6641 6642 type MediaRecorderOptions struct { 6643 // MimeType is "MediaRecorderOptions.mimeType" 6644 // 6645 // Optional, defaults to "". 6646 MimeType js.String 6647 // AudioBitsPerSecond is "MediaRecorderOptions.audioBitsPerSecond" 6648 // 6649 // Optional 6650 // 6651 // NOTE: FFI_USE_AudioBitsPerSecond MUST be set to true to make this field effective. 6652 AudioBitsPerSecond uint32 6653 // VideoBitsPerSecond is "MediaRecorderOptions.videoBitsPerSecond" 6654 // 6655 // Optional 6656 // 6657 // NOTE: FFI_USE_VideoBitsPerSecond MUST be set to true to make this field effective. 6658 VideoBitsPerSecond uint32 6659 // BitsPerSecond is "MediaRecorderOptions.bitsPerSecond" 6660 // 6661 // Optional 6662 // 6663 // NOTE: FFI_USE_BitsPerSecond MUST be set to true to make this field effective. 6664 BitsPerSecond uint32 6665 // AudioBitrateMode is "MediaRecorderOptions.audioBitrateMode" 6666 // 6667 // Optional, defaults to "variable". 6668 AudioBitrateMode BitrateMode 6669 // VideoKeyFrameIntervalDuration is "MediaRecorderOptions.videoKeyFrameIntervalDuration" 6670 // 6671 // Optional 6672 // 6673 // NOTE: FFI_USE_VideoKeyFrameIntervalDuration MUST be set to true to make this field effective. 6674 VideoKeyFrameIntervalDuration DOMHighResTimeStamp 6675 // VideoKeyFrameIntervalCount is "MediaRecorderOptions.videoKeyFrameIntervalCount" 6676 // 6677 // Optional 6678 // 6679 // NOTE: FFI_USE_VideoKeyFrameIntervalCount MUST be set to true to make this field effective. 6680 VideoKeyFrameIntervalCount uint32 6681 6682 FFI_USE_AudioBitsPerSecond bool // for AudioBitsPerSecond. 6683 FFI_USE_VideoBitsPerSecond bool // for VideoBitsPerSecond. 6684 FFI_USE_BitsPerSecond bool // for BitsPerSecond. 6685 FFI_USE_VideoKeyFrameIntervalDuration bool // for VideoKeyFrameIntervalDuration. 6686 FFI_USE_VideoKeyFrameIntervalCount bool // for VideoKeyFrameIntervalCount. 6687 6688 FFI_USE bool 6689 } 6690 6691 // FromRef calls UpdateFrom and returns a MediaRecorderOptions with all fields set. 6692 func (p MediaRecorderOptions) FromRef(ref js.Ref) MediaRecorderOptions { 6693 p.UpdateFrom(ref) 6694 return p 6695 } 6696 6697 // New creates a new MediaRecorderOptions in the application heap. 6698 func (p MediaRecorderOptions) New() js.Ref { 6699 return bindings.MediaRecorderOptionsJSLoad( 6700 js.Pointer(&p), js.True, 0, 6701 ) 6702 } 6703 6704 // UpdateFrom copies value of all fields of the heap object to p. 6705 func (p *MediaRecorderOptions) UpdateFrom(ref js.Ref) { 6706 bindings.MediaRecorderOptionsJSStore( 6707 js.Pointer(p), ref, 6708 ) 6709 } 6710 6711 // Update writes all fields of the p to the heap object referenced by ref. 6712 func (p *MediaRecorderOptions) Update(ref js.Ref) { 6713 bindings.MediaRecorderOptionsJSLoad( 6714 js.Pointer(p), js.False, ref, 6715 ) 6716 } 6717 6718 // FreeMembers frees fields with heap reference, if recursive is true 6719 // free all heap references reachable from p. 6720 func (p *MediaRecorderOptions) FreeMembers(recursive bool) { 6721 js.Free( 6722 p.MimeType.Ref(), 6723 ) 6724 p.MimeType = p.MimeType.FromRef(js.Undefined) 6725 } 6726 6727 type RecordingState uint32