38e250b4d5
Includes all the files which required no manual treatment. Change-Id: I3d493bcbc238a2016579a0f804d32f4829efb87b Cq-Include-Trybots: dart/try:vm-aot-android-release-arm_x64-try,vm-aot-linux-debug-x64-try,vm-aot-linux-debug-x64c-try,vm-aot-mac-release-arm64-try,vm-aot-mac-release-x64-try,vm-aot-win-debug-x64c-try,vm-checked-mac-release-arm64-try,vm-ffi-qemu-linux-release-arm-try,vm-ffi-qemu-linux-release-riscv64-try,vm-linux-debug-ia32-try,vm-linux-debug-x64-try,vm-linux-debug-x64c-try,vm-mac-debug-arm64-try,vm-reload-linux-debug-x64-try,vm-reload-rollback-linux-debug-x64-try,vm-win-release-ia32-try Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/399102 Reviewed-by: Bob Nystrom <rnystrom@google.com> Commit-Queue: Daco Harkes <dacoharkes@google.com>
789 lines
18 KiB
Dart
789 lines
18 KiB
Dart
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
|
|
// for details. All rights reserved. Use of this source code is governed by a
|
|
// BSD-style license that can be found in the LICENSE file.
|
|
//
|
|
// This file has been automatically generated. Please do not edit it manually.
|
|
// Generated by tests/ffi/generator/address_of_test_generator.dart.
|
|
//
|
|
// SharedObjects=ffi_test_functions
|
|
// VMOptions=
|
|
// VMOptions=--deterministic --optimization-counter-threshold=90
|
|
// VMOptions=--use-slow-path
|
|
// VMOptions=--use-slow-path --stacktrace-every=100
|
|
|
|
// ignore_for_file: unused_import
|
|
|
|
import 'dart:ffi';
|
|
import 'dart:typed_data';
|
|
|
|
import 'package:expect/expect.dart';
|
|
|
|
import 'address_of_generated_shared.dart';
|
|
import 'address_of_shared.dart';
|
|
import 'dylib_utils.dart';
|
|
|
|
final ffiTestFunctions = dlopenPlatformSpecific('ffi_test_functions');
|
|
|
|
@Native<Int8 Function(Pointer<Int8>, Size)>(
|
|
symbol: 'TakeInt8Pointer',
|
|
isLeaf: true,
|
|
)
|
|
external int takeInt8Pointer(Pointer<Int8> pointer, int length);
|
|
|
|
@Native<
|
|
Int8 Function(
|
|
Pointer<Int8>,
|
|
Pointer<Int8>,
|
|
Pointer<Int8>,
|
|
Pointer<Int8>,
|
|
Pointer<Int8>,
|
|
Pointer<Int8>,
|
|
Pointer<Int8>,
|
|
Pointer<Int8>,
|
|
Pointer<Int8>,
|
|
Pointer<Int8>,
|
|
Pointer<Int8>,
|
|
Pointer<Int8>,
|
|
Pointer<Int8>,
|
|
Pointer<Int8>,
|
|
Pointer<Int8>,
|
|
Pointer<Int8>,
|
|
Pointer<Int8>,
|
|
Pointer<Int8>,
|
|
Pointer<Int8>,
|
|
Pointer<Int8>,
|
|
)
|
|
>(symbol: 'TakeInt8PointerMany', isLeaf: true)
|
|
external int takeInt8PointerMany(
|
|
Pointer<Int8> pointer0,
|
|
Pointer<Int8> pointer1,
|
|
Pointer<Int8> pointer2,
|
|
Pointer<Int8> pointer3,
|
|
Pointer<Int8> pointer4,
|
|
Pointer<Int8> pointer5,
|
|
Pointer<Int8> pointer6,
|
|
Pointer<Int8> pointer7,
|
|
Pointer<Int8> pointer8,
|
|
Pointer<Int8> pointer9,
|
|
Pointer<Int8> pointer10,
|
|
Pointer<Int8> pointer11,
|
|
Pointer<Int8> pointer12,
|
|
Pointer<Int8> pointer13,
|
|
Pointer<Int8> pointer14,
|
|
Pointer<Int8> pointer15,
|
|
Pointer<Int8> pointer16,
|
|
Pointer<Int8> pointer17,
|
|
Pointer<Int8> pointer18,
|
|
Pointer<Int8> pointer19,
|
|
);
|
|
|
|
Int8List makeInt8List(int length) {
|
|
final typedData = Int8List(length);
|
|
for (int i = 0; i < length; i++) {
|
|
final value = i % 2 == 0 ? i : -i;
|
|
typedData[i] = value;
|
|
}
|
|
return typedData;
|
|
}
|
|
|
|
int makeExpectedResultInt8(int start, int end) {
|
|
int expectedResult = 0;
|
|
for (int i = start; i < end; i++) {
|
|
final value = i % 2 == 0 ? i : -i;
|
|
expectedResult += value;
|
|
}
|
|
return expectedResult;
|
|
}
|
|
|
|
@Native<Int16 Function(Pointer<Int16>, Size)>(
|
|
symbol: 'TakeInt16Pointer',
|
|
isLeaf: true,
|
|
)
|
|
external int takeInt16Pointer(Pointer<Int16> pointer, int length);
|
|
|
|
@Native<
|
|
Int16 Function(
|
|
Pointer<Int16>,
|
|
Pointer<Int16>,
|
|
Pointer<Int16>,
|
|
Pointer<Int16>,
|
|
Pointer<Int16>,
|
|
Pointer<Int16>,
|
|
Pointer<Int16>,
|
|
Pointer<Int16>,
|
|
Pointer<Int16>,
|
|
Pointer<Int16>,
|
|
Pointer<Int16>,
|
|
Pointer<Int16>,
|
|
Pointer<Int16>,
|
|
Pointer<Int16>,
|
|
Pointer<Int16>,
|
|
Pointer<Int16>,
|
|
Pointer<Int16>,
|
|
Pointer<Int16>,
|
|
Pointer<Int16>,
|
|
Pointer<Int16>,
|
|
)
|
|
>(symbol: 'TakeInt16PointerMany', isLeaf: true)
|
|
external int takeInt16PointerMany(
|
|
Pointer<Int16> pointer0,
|
|
Pointer<Int16> pointer1,
|
|
Pointer<Int16> pointer2,
|
|
Pointer<Int16> pointer3,
|
|
Pointer<Int16> pointer4,
|
|
Pointer<Int16> pointer5,
|
|
Pointer<Int16> pointer6,
|
|
Pointer<Int16> pointer7,
|
|
Pointer<Int16> pointer8,
|
|
Pointer<Int16> pointer9,
|
|
Pointer<Int16> pointer10,
|
|
Pointer<Int16> pointer11,
|
|
Pointer<Int16> pointer12,
|
|
Pointer<Int16> pointer13,
|
|
Pointer<Int16> pointer14,
|
|
Pointer<Int16> pointer15,
|
|
Pointer<Int16> pointer16,
|
|
Pointer<Int16> pointer17,
|
|
Pointer<Int16> pointer18,
|
|
Pointer<Int16> pointer19,
|
|
);
|
|
|
|
Int16List makeInt16List(int length) {
|
|
final typedData = Int16List(length);
|
|
for (int i = 0; i < length; i++) {
|
|
final value = i % 2 == 0 ? i : -i;
|
|
typedData[i] = value;
|
|
}
|
|
return typedData;
|
|
}
|
|
|
|
int makeExpectedResultInt16(int start, int end) {
|
|
int expectedResult = 0;
|
|
for (int i = start; i < end; i++) {
|
|
final value = i % 2 == 0 ? i : -i;
|
|
expectedResult += value;
|
|
}
|
|
return expectedResult;
|
|
}
|
|
|
|
@Native<Int32 Function(Pointer<Int32>, Size)>(
|
|
symbol: 'TakeInt32Pointer',
|
|
isLeaf: true,
|
|
)
|
|
external int takeInt32Pointer(Pointer<Int32> pointer, int length);
|
|
|
|
@Native<
|
|
Int32 Function(
|
|
Pointer<Int32>,
|
|
Pointer<Int32>,
|
|
Pointer<Int32>,
|
|
Pointer<Int32>,
|
|
Pointer<Int32>,
|
|
Pointer<Int32>,
|
|
Pointer<Int32>,
|
|
Pointer<Int32>,
|
|
Pointer<Int32>,
|
|
Pointer<Int32>,
|
|
Pointer<Int32>,
|
|
Pointer<Int32>,
|
|
Pointer<Int32>,
|
|
Pointer<Int32>,
|
|
Pointer<Int32>,
|
|
Pointer<Int32>,
|
|
Pointer<Int32>,
|
|
Pointer<Int32>,
|
|
Pointer<Int32>,
|
|
Pointer<Int32>,
|
|
)
|
|
>(symbol: 'TakeInt32PointerMany', isLeaf: true)
|
|
external int takeInt32PointerMany(
|
|
Pointer<Int32> pointer0,
|
|
Pointer<Int32> pointer1,
|
|
Pointer<Int32> pointer2,
|
|
Pointer<Int32> pointer3,
|
|
Pointer<Int32> pointer4,
|
|
Pointer<Int32> pointer5,
|
|
Pointer<Int32> pointer6,
|
|
Pointer<Int32> pointer7,
|
|
Pointer<Int32> pointer8,
|
|
Pointer<Int32> pointer9,
|
|
Pointer<Int32> pointer10,
|
|
Pointer<Int32> pointer11,
|
|
Pointer<Int32> pointer12,
|
|
Pointer<Int32> pointer13,
|
|
Pointer<Int32> pointer14,
|
|
Pointer<Int32> pointer15,
|
|
Pointer<Int32> pointer16,
|
|
Pointer<Int32> pointer17,
|
|
Pointer<Int32> pointer18,
|
|
Pointer<Int32> pointer19,
|
|
);
|
|
|
|
Int32List makeInt32List(int length) {
|
|
final typedData = Int32List(length);
|
|
for (int i = 0; i < length; i++) {
|
|
final value = i % 2 == 0 ? i : -i;
|
|
typedData[i] = value;
|
|
}
|
|
return typedData;
|
|
}
|
|
|
|
int makeExpectedResultInt32(int start, int end) {
|
|
int expectedResult = 0;
|
|
for (int i = start; i < end; i++) {
|
|
final value = i % 2 == 0 ? i : -i;
|
|
expectedResult += value;
|
|
}
|
|
return expectedResult;
|
|
}
|
|
|
|
@Native<Int64 Function(Pointer<Int64>, Size)>(
|
|
symbol: 'TakeInt64Pointer',
|
|
isLeaf: true,
|
|
)
|
|
external int takeInt64Pointer(Pointer<Int64> pointer, int length);
|
|
|
|
@Native<
|
|
Int64 Function(
|
|
Pointer<Int64>,
|
|
Pointer<Int64>,
|
|
Pointer<Int64>,
|
|
Pointer<Int64>,
|
|
Pointer<Int64>,
|
|
Pointer<Int64>,
|
|
Pointer<Int64>,
|
|
Pointer<Int64>,
|
|
Pointer<Int64>,
|
|
Pointer<Int64>,
|
|
Pointer<Int64>,
|
|
Pointer<Int64>,
|
|
Pointer<Int64>,
|
|
Pointer<Int64>,
|
|
Pointer<Int64>,
|
|
Pointer<Int64>,
|
|
Pointer<Int64>,
|
|
Pointer<Int64>,
|
|
Pointer<Int64>,
|
|
Pointer<Int64>,
|
|
)
|
|
>(symbol: 'TakeInt64PointerMany', isLeaf: true)
|
|
external int takeInt64PointerMany(
|
|
Pointer<Int64> pointer0,
|
|
Pointer<Int64> pointer1,
|
|
Pointer<Int64> pointer2,
|
|
Pointer<Int64> pointer3,
|
|
Pointer<Int64> pointer4,
|
|
Pointer<Int64> pointer5,
|
|
Pointer<Int64> pointer6,
|
|
Pointer<Int64> pointer7,
|
|
Pointer<Int64> pointer8,
|
|
Pointer<Int64> pointer9,
|
|
Pointer<Int64> pointer10,
|
|
Pointer<Int64> pointer11,
|
|
Pointer<Int64> pointer12,
|
|
Pointer<Int64> pointer13,
|
|
Pointer<Int64> pointer14,
|
|
Pointer<Int64> pointer15,
|
|
Pointer<Int64> pointer16,
|
|
Pointer<Int64> pointer17,
|
|
Pointer<Int64> pointer18,
|
|
Pointer<Int64> pointer19,
|
|
);
|
|
|
|
Int64List makeInt64List(int length) {
|
|
final typedData = Int64List(length);
|
|
for (int i = 0; i < length; i++) {
|
|
final value = i % 2 == 0 ? i : -i;
|
|
typedData[i] = value;
|
|
}
|
|
return typedData;
|
|
}
|
|
|
|
int makeExpectedResultInt64(int start, int end) {
|
|
int expectedResult = 0;
|
|
for (int i = start; i < end; i++) {
|
|
final value = i % 2 == 0 ? i : -i;
|
|
expectedResult += value;
|
|
}
|
|
return expectedResult;
|
|
}
|
|
|
|
@Native<Uint8 Function(Pointer<Uint8>, Size)>(
|
|
symbol: 'TakeUint8Pointer',
|
|
isLeaf: true,
|
|
)
|
|
external int takeUint8Pointer(Pointer<Uint8> pointer, int length);
|
|
|
|
@Native<
|
|
Uint8 Function(
|
|
Pointer<Uint8>,
|
|
Pointer<Uint8>,
|
|
Pointer<Uint8>,
|
|
Pointer<Uint8>,
|
|
Pointer<Uint8>,
|
|
Pointer<Uint8>,
|
|
Pointer<Uint8>,
|
|
Pointer<Uint8>,
|
|
Pointer<Uint8>,
|
|
Pointer<Uint8>,
|
|
Pointer<Uint8>,
|
|
Pointer<Uint8>,
|
|
Pointer<Uint8>,
|
|
Pointer<Uint8>,
|
|
Pointer<Uint8>,
|
|
Pointer<Uint8>,
|
|
Pointer<Uint8>,
|
|
Pointer<Uint8>,
|
|
Pointer<Uint8>,
|
|
Pointer<Uint8>,
|
|
)
|
|
>(symbol: 'TakeUint8PointerMany', isLeaf: true)
|
|
external int takeUint8PointerMany(
|
|
Pointer<Uint8> pointer0,
|
|
Pointer<Uint8> pointer1,
|
|
Pointer<Uint8> pointer2,
|
|
Pointer<Uint8> pointer3,
|
|
Pointer<Uint8> pointer4,
|
|
Pointer<Uint8> pointer5,
|
|
Pointer<Uint8> pointer6,
|
|
Pointer<Uint8> pointer7,
|
|
Pointer<Uint8> pointer8,
|
|
Pointer<Uint8> pointer9,
|
|
Pointer<Uint8> pointer10,
|
|
Pointer<Uint8> pointer11,
|
|
Pointer<Uint8> pointer12,
|
|
Pointer<Uint8> pointer13,
|
|
Pointer<Uint8> pointer14,
|
|
Pointer<Uint8> pointer15,
|
|
Pointer<Uint8> pointer16,
|
|
Pointer<Uint8> pointer17,
|
|
Pointer<Uint8> pointer18,
|
|
Pointer<Uint8> pointer19,
|
|
);
|
|
|
|
Uint8List makeUint8List(int length) {
|
|
final typedData = Uint8List(length);
|
|
for (int i = 0; i < length; i++) {
|
|
final value = i;
|
|
typedData[i] = value;
|
|
}
|
|
return typedData;
|
|
}
|
|
|
|
int makeExpectedResultUint8(int start, int end) {
|
|
int expectedResult = 0;
|
|
for (int i = start; i < end; i++) {
|
|
final value = i;
|
|
expectedResult += value;
|
|
}
|
|
return expectedResult;
|
|
}
|
|
|
|
@Native<Uint16 Function(Pointer<Uint16>, Size)>(
|
|
symbol: 'TakeUint16Pointer',
|
|
isLeaf: true,
|
|
)
|
|
external int takeUint16Pointer(Pointer<Uint16> pointer, int length);
|
|
|
|
@Native<
|
|
Uint16 Function(
|
|
Pointer<Uint16>,
|
|
Pointer<Uint16>,
|
|
Pointer<Uint16>,
|
|
Pointer<Uint16>,
|
|
Pointer<Uint16>,
|
|
Pointer<Uint16>,
|
|
Pointer<Uint16>,
|
|
Pointer<Uint16>,
|
|
Pointer<Uint16>,
|
|
Pointer<Uint16>,
|
|
Pointer<Uint16>,
|
|
Pointer<Uint16>,
|
|
Pointer<Uint16>,
|
|
Pointer<Uint16>,
|
|
Pointer<Uint16>,
|
|
Pointer<Uint16>,
|
|
Pointer<Uint16>,
|
|
Pointer<Uint16>,
|
|
Pointer<Uint16>,
|
|
Pointer<Uint16>,
|
|
)
|
|
>(symbol: 'TakeUint16PointerMany', isLeaf: true)
|
|
external int takeUint16PointerMany(
|
|
Pointer<Uint16> pointer0,
|
|
Pointer<Uint16> pointer1,
|
|
Pointer<Uint16> pointer2,
|
|
Pointer<Uint16> pointer3,
|
|
Pointer<Uint16> pointer4,
|
|
Pointer<Uint16> pointer5,
|
|
Pointer<Uint16> pointer6,
|
|
Pointer<Uint16> pointer7,
|
|
Pointer<Uint16> pointer8,
|
|
Pointer<Uint16> pointer9,
|
|
Pointer<Uint16> pointer10,
|
|
Pointer<Uint16> pointer11,
|
|
Pointer<Uint16> pointer12,
|
|
Pointer<Uint16> pointer13,
|
|
Pointer<Uint16> pointer14,
|
|
Pointer<Uint16> pointer15,
|
|
Pointer<Uint16> pointer16,
|
|
Pointer<Uint16> pointer17,
|
|
Pointer<Uint16> pointer18,
|
|
Pointer<Uint16> pointer19,
|
|
);
|
|
|
|
Uint16List makeUint16List(int length) {
|
|
final typedData = Uint16List(length);
|
|
for (int i = 0; i < length; i++) {
|
|
final value = i;
|
|
typedData[i] = value;
|
|
}
|
|
return typedData;
|
|
}
|
|
|
|
int makeExpectedResultUint16(int start, int end) {
|
|
int expectedResult = 0;
|
|
for (int i = start; i < end; i++) {
|
|
final value = i;
|
|
expectedResult += value;
|
|
}
|
|
return expectedResult;
|
|
}
|
|
|
|
@Native<Uint32 Function(Pointer<Uint32>, Size)>(
|
|
symbol: 'TakeUint32Pointer',
|
|
isLeaf: true,
|
|
)
|
|
external int takeUint32Pointer(Pointer<Uint32> pointer, int length);
|
|
|
|
@Native<
|
|
Uint32 Function(
|
|
Pointer<Uint32>,
|
|
Pointer<Uint32>,
|
|
Pointer<Uint32>,
|
|
Pointer<Uint32>,
|
|
Pointer<Uint32>,
|
|
Pointer<Uint32>,
|
|
Pointer<Uint32>,
|
|
Pointer<Uint32>,
|
|
Pointer<Uint32>,
|
|
Pointer<Uint32>,
|
|
Pointer<Uint32>,
|
|
Pointer<Uint32>,
|
|
Pointer<Uint32>,
|
|
Pointer<Uint32>,
|
|
Pointer<Uint32>,
|
|
Pointer<Uint32>,
|
|
Pointer<Uint32>,
|
|
Pointer<Uint32>,
|
|
Pointer<Uint32>,
|
|
Pointer<Uint32>,
|
|
)
|
|
>(symbol: 'TakeUint32PointerMany', isLeaf: true)
|
|
external int takeUint32PointerMany(
|
|
Pointer<Uint32> pointer0,
|
|
Pointer<Uint32> pointer1,
|
|
Pointer<Uint32> pointer2,
|
|
Pointer<Uint32> pointer3,
|
|
Pointer<Uint32> pointer4,
|
|
Pointer<Uint32> pointer5,
|
|
Pointer<Uint32> pointer6,
|
|
Pointer<Uint32> pointer7,
|
|
Pointer<Uint32> pointer8,
|
|
Pointer<Uint32> pointer9,
|
|
Pointer<Uint32> pointer10,
|
|
Pointer<Uint32> pointer11,
|
|
Pointer<Uint32> pointer12,
|
|
Pointer<Uint32> pointer13,
|
|
Pointer<Uint32> pointer14,
|
|
Pointer<Uint32> pointer15,
|
|
Pointer<Uint32> pointer16,
|
|
Pointer<Uint32> pointer17,
|
|
Pointer<Uint32> pointer18,
|
|
Pointer<Uint32> pointer19,
|
|
);
|
|
|
|
Uint32List makeUint32List(int length) {
|
|
final typedData = Uint32List(length);
|
|
for (int i = 0; i < length; i++) {
|
|
final value = i;
|
|
typedData[i] = value;
|
|
}
|
|
return typedData;
|
|
}
|
|
|
|
int makeExpectedResultUint32(int start, int end) {
|
|
int expectedResult = 0;
|
|
for (int i = start; i < end; i++) {
|
|
final value = i;
|
|
expectedResult += value;
|
|
}
|
|
return expectedResult;
|
|
}
|
|
|
|
@Native<Uint64 Function(Pointer<Uint64>, Size)>(
|
|
symbol: 'TakeUint64Pointer',
|
|
isLeaf: true,
|
|
)
|
|
external int takeUint64Pointer(Pointer<Uint64> pointer, int length);
|
|
|
|
@Native<
|
|
Uint64 Function(
|
|
Pointer<Uint64>,
|
|
Pointer<Uint64>,
|
|
Pointer<Uint64>,
|
|
Pointer<Uint64>,
|
|
Pointer<Uint64>,
|
|
Pointer<Uint64>,
|
|
Pointer<Uint64>,
|
|
Pointer<Uint64>,
|
|
Pointer<Uint64>,
|
|
Pointer<Uint64>,
|
|
Pointer<Uint64>,
|
|
Pointer<Uint64>,
|
|
Pointer<Uint64>,
|
|
Pointer<Uint64>,
|
|
Pointer<Uint64>,
|
|
Pointer<Uint64>,
|
|
Pointer<Uint64>,
|
|
Pointer<Uint64>,
|
|
Pointer<Uint64>,
|
|
Pointer<Uint64>,
|
|
)
|
|
>(symbol: 'TakeUint64PointerMany', isLeaf: true)
|
|
external int takeUint64PointerMany(
|
|
Pointer<Uint64> pointer0,
|
|
Pointer<Uint64> pointer1,
|
|
Pointer<Uint64> pointer2,
|
|
Pointer<Uint64> pointer3,
|
|
Pointer<Uint64> pointer4,
|
|
Pointer<Uint64> pointer5,
|
|
Pointer<Uint64> pointer6,
|
|
Pointer<Uint64> pointer7,
|
|
Pointer<Uint64> pointer8,
|
|
Pointer<Uint64> pointer9,
|
|
Pointer<Uint64> pointer10,
|
|
Pointer<Uint64> pointer11,
|
|
Pointer<Uint64> pointer12,
|
|
Pointer<Uint64> pointer13,
|
|
Pointer<Uint64> pointer14,
|
|
Pointer<Uint64> pointer15,
|
|
Pointer<Uint64> pointer16,
|
|
Pointer<Uint64> pointer17,
|
|
Pointer<Uint64> pointer18,
|
|
Pointer<Uint64> pointer19,
|
|
);
|
|
|
|
Uint64List makeUint64List(int length) {
|
|
final typedData = Uint64List(length);
|
|
for (int i = 0; i < length; i++) {
|
|
final value = i;
|
|
typedData[i] = value;
|
|
}
|
|
return typedData;
|
|
}
|
|
|
|
int makeExpectedResultUint64(int start, int end) {
|
|
int expectedResult = 0;
|
|
for (int i = start; i < end; i++) {
|
|
final value = i;
|
|
expectedResult += value;
|
|
}
|
|
return expectedResult;
|
|
}
|
|
|
|
@Native<Float Function(Pointer<Float>, Size)>(
|
|
symbol: 'TakeFloatPointer',
|
|
isLeaf: true,
|
|
)
|
|
external double takeFloatPointer(Pointer<Float> pointer, int length);
|
|
|
|
@Native<
|
|
Float Function(
|
|
Pointer<Float>,
|
|
Pointer<Float>,
|
|
Pointer<Float>,
|
|
Pointer<Float>,
|
|
Pointer<Float>,
|
|
Pointer<Float>,
|
|
Pointer<Float>,
|
|
Pointer<Float>,
|
|
Pointer<Float>,
|
|
Pointer<Float>,
|
|
Pointer<Float>,
|
|
Pointer<Float>,
|
|
Pointer<Float>,
|
|
Pointer<Float>,
|
|
Pointer<Float>,
|
|
Pointer<Float>,
|
|
Pointer<Float>,
|
|
Pointer<Float>,
|
|
Pointer<Float>,
|
|
Pointer<Float>,
|
|
)
|
|
>(symbol: 'TakeFloatPointerMany', isLeaf: true)
|
|
external double takeFloatPointerMany(
|
|
Pointer<Float> pointer0,
|
|
Pointer<Float> pointer1,
|
|
Pointer<Float> pointer2,
|
|
Pointer<Float> pointer3,
|
|
Pointer<Float> pointer4,
|
|
Pointer<Float> pointer5,
|
|
Pointer<Float> pointer6,
|
|
Pointer<Float> pointer7,
|
|
Pointer<Float> pointer8,
|
|
Pointer<Float> pointer9,
|
|
Pointer<Float> pointer10,
|
|
Pointer<Float> pointer11,
|
|
Pointer<Float> pointer12,
|
|
Pointer<Float> pointer13,
|
|
Pointer<Float> pointer14,
|
|
Pointer<Float> pointer15,
|
|
Pointer<Float> pointer16,
|
|
Pointer<Float> pointer17,
|
|
Pointer<Float> pointer18,
|
|
Pointer<Float> pointer19,
|
|
);
|
|
|
|
Float32List makeFloat32List(int length) {
|
|
final typedData = Float32List(length);
|
|
for (int i = 0; i < length; i++) {
|
|
final value = (i % 2 == 0 ? i : -i).toDouble();
|
|
typedData[i] = value;
|
|
}
|
|
return typedData;
|
|
}
|
|
|
|
double makeExpectedResultFloat(int start, int end) {
|
|
double expectedResult = 0;
|
|
for (int i = start; i < end; i++) {
|
|
final value = (i % 2 == 0 ? i : -i).toDouble();
|
|
expectedResult += value;
|
|
}
|
|
return expectedResult;
|
|
}
|
|
|
|
@Native<Double Function(Pointer<Double>, Size)>(
|
|
symbol: 'TakeDoublePointer',
|
|
isLeaf: true,
|
|
)
|
|
external double takeDoublePointer(Pointer<Double> pointer, int length);
|
|
|
|
@Native<
|
|
Double Function(
|
|
Pointer<Double>,
|
|
Pointer<Double>,
|
|
Pointer<Double>,
|
|
Pointer<Double>,
|
|
Pointer<Double>,
|
|
Pointer<Double>,
|
|
Pointer<Double>,
|
|
Pointer<Double>,
|
|
Pointer<Double>,
|
|
Pointer<Double>,
|
|
Pointer<Double>,
|
|
Pointer<Double>,
|
|
Pointer<Double>,
|
|
Pointer<Double>,
|
|
Pointer<Double>,
|
|
Pointer<Double>,
|
|
Pointer<Double>,
|
|
Pointer<Double>,
|
|
Pointer<Double>,
|
|
Pointer<Double>,
|
|
)
|
|
>(symbol: 'TakeDoublePointerMany', isLeaf: true)
|
|
external double takeDoublePointerMany(
|
|
Pointer<Double> pointer0,
|
|
Pointer<Double> pointer1,
|
|
Pointer<Double> pointer2,
|
|
Pointer<Double> pointer3,
|
|
Pointer<Double> pointer4,
|
|
Pointer<Double> pointer5,
|
|
Pointer<Double> pointer6,
|
|
Pointer<Double> pointer7,
|
|
Pointer<Double> pointer8,
|
|
Pointer<Double> pointer9,
|
|
Pointer<Double> pointer10,
|
|
Pointer<Double> pointer11,
|
|
Pointer<Double> pointer12,
|
|
Pointer<Double> pointer13,
|
|
Pointer<Double> pointer14,
|
|
Pointer<Double> pointer15,
|
|
Pointer<Double> pointer16,
|
|
Pointer<Double> pointer17,
|
|
Pointer<Double> pointer18,
|
|
Pointer<Double> pointer19,
|
|
);
|
|
|
|
Float64List makeFloat64List(int length) {
|
|
final typedData = Float64List(length);
|
|
for (int i = 0; i < length; i++) {
|
|
final value = (i % 2 == 0 ? i : -i).toDouble();
|
|
typedData[i] = value;
|
|
}
|
|
return typedData;
|
|
}
|
|
|
|
double makeExpectedResultDouble(int start, int end) {
|
|
double expectedResult = 0;
|
|
for (int i = start; i < end; i++) {
|
|
final value = (i % 2 == 0 ? i : -i).toDouble();
|
|
expectedResult += value;
|
|
}
|
|
return expectedResult;
|
|
}
|
|
|
|
@Native<Bool Function(Pointer<Bool>, Size)>(
|
|
symbol: 'TakeBoolPointer',
|
|
isLeaf: true,
|
|
)
|
|
external bool takeBoolPointer(Pointer<Bool> pointer, int length);
|
|
|
|
@Native<
|
|
Bool Function(
|
|
Pointer<Bool>,
|
|
Pointer<Bool>,
|
|
Pointer<Bool>,
|
|
Pointer<Bool>,
|
|
Pointer<Bool>,
|
|
Pointer<Bool>,
|
|
Pointer<Bool>,
|
|
Pointer<Bool>,
|
|
Pointer<Bool>,
|
|
Pointer<Bool>,
|
|
Pointer<Bool>,
|
|
Pointer<Bool>,
|
|
Pointer<Bool>,
|
|
Pointer<Bool>,
|
|
Pointer<Bool>,
|
|
Pointer<Bool>,
|
|
Pointer<Bool>,
|
|
Pointer<Bool>,
|
|
Pointer<Bool>,
|
|
Pointer<Bool>,
|
|
)
|
|
>(symbol: 'TakeBoolPointerMany', isLeaf: true)
|
|
external bool takeBoolPointerMany(
|
|
Pointer<Bool> pointer0,
|
|
Pointer<Bool> pointer1,
|
|
Pointer<Bool> pointer2,
|
|
Pointer<Bool> pointer3,
|
|
Pointer<Bool> pointer4,
|
|
Pointer<Bool> pointer5,
|
|
Pointer<Bool> pointer6,
|
|
Pointer<Bool> pointer7,
|
|
Pointer<Bool> pointer8,
|
|
Pointer<Bool> pointer9,
|
|
Pointer<Bool> pointer10,
|
|
Pointer<Bool> pointer11,
|
|
Pointer<Bool> pointer12,
|
|
Pointer<Bool> pointer13,
|
|
Pointer<Bool> pointer14,
|
|
Pointer<Bool> pointer15,
|
|
Pointer<Bool> pointer16,
|
|
Pointer<Bool> pointer17,
|
|
Pointer<Bool> pointer18,
|
|
Pointer<Bool> pointer19,
|
|
);
|