peachsim 0.1.1692 → 0.1.1700
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli/bridge-flow-runner.ts +61 -39
- package/cli/commands/agent-wrapper.ts +21 -10
- package/cli/commands/control.ts +27 -7
- package/cli/commands/coverage.ts +1 -1
- package/cli/commands/detect.ts +17 -4
- package/cli/commands/maestro-compare.ts +25 -99
- package/cli/help-core.ts +3 -4
- package/cli/maestro-compare.ts +172 -4
- package/cli/outbound-endpoints.ts +2 -10
- package/detox/index.ts +15 -0
- package/detox/launch-permissions.ts +169 -0
- package/dist-lib/agent-daemon-client.cjs +2 -2
- package/dist-lib/agent-events.cjs +2 -2
- package/dist-lib/attached-projects.cjs +2 -2
- package/dist-lib/auth/shared-session.cjs +2 -2
- package/dist-lib/backend-origin.cjs +2 -2
- package/dist-lib/beta.cjs +2 -2
- package/dist-lib/beta.mjs +1 -1
- package/dist-lib/bridge-constants.cjs +2 -2
- package/dist-lib/bridge-contract-input.cjs +2 -2
- package/dist-lib/bridge-contract-input.mjs +1 -1
- package/dist-lib/bridge-contract.cjs +2 -2
- package/dist-lib/bridge-contract.mjs +1 -1
- package/dist-lib/bundle-channel.cjs +18273 -15925
- package/dist-lib/capture-contract.cjs +2 -2
- package/dist-lib/capture-contract.mjs +1 -1
- package/dist-lib/cloud-contract.cjs +2 -2
- package/dist-lib/cloud-contract.mjs +1 -1
- package/dist-lib/cloud-test-args.cjs +2 -2
- package/dist-lib/cloud-test-args.mjs +1 -1
- package/dist-lib/cloud.cjs +2 -2
- package/dist-lib/cloud.mjs +1 -1
- package/dist-lib/config.cjs +2 -2
- package/dist-lib/config.mjs +1 -1
- package/dist-lib/detox/index.cjs +104 -3
- package/dist-lib/dev-bundle-resolution.cjs +208 -44
- package/dist-lib/expo-swift-bundle.cjs +2349 -1778
- package/dist-lib/expo-swift-metadata.cjs +2 -2
- package/dist-lib/expo-swift-metadata.mjs +1 -1
- package/dist-lib/home-paths.cjs +2 -2
- package/dist-lib/host/bridge-host.cjs +7885 -3334
- package/dist-lib/host/fetch-proxy-handler.cjs +331 -39
- package/dist-lib/host/fetch-proxy-overrides.cjs +2 -2
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/replacement-module-handler.cjs +2 -2
- package/dist-lib/host/websocket-proxy.cjs +2 -2
- package/dist-lib/index.cjs +297 -77
- package/dist-lib/jump-to-source-babel.cjs +2 -2
- package/dist-lib/jump-to-source-native.cjs +2 -2
- package/dist-lib/kotlin-host.cjs +2 -2
- package/dist-lib/menu.cjs +2 -2
- package/dist-lib/menu.mjs +1 -1
- package/dist-lib/metro-fingerprint-registry.cjs +2 -2
- package/dist-lib/metro-fingerprint-registry.mjs +1 -1
- package/dist-lib/metro-production-bundle.cjs +2 -2
- package/dist-lib/metro-production-bundle.mjs +1 -1
- package/dist-lib/metro.cjs +294 -74
- package/dist-lib/native-app-identity-project.cjs +48 -37
- package/dist-lib/native-app-identity-project.mjs +47 -36
- package/dist-lib/native-app-identity.cjs +2 -2
- package/dist-lib/native-app-identity.mjs +1 -1
- package/dist-lib/native-firebase-metadata.cjs +2 -2
- package/dist-lib/native-firebase-metadata.mjs +1 -1
- package/dist-lib/plist.cjs +2 -2
- package/dist-lib/plist.mjs +1 -1
- package/dist-lib/profiles.cjs +2 -2
- package/dist-lib/public-brand.cjs +2 -2
- package/dist-lib/public-origins-lib-esm.json +24 -23
- package/dist-lib/public-origins-lib.json +199 -79
- package/dist-lib/react-native-host-modules.cjs +2 -2
- package/dist-lib/react-native-host-modules.mjs +1 -1
- package/dist-lib/reap-browser.cjs +2 -2
- package/dist-lib/scripts/dev-server-scanner.cjs +206 -31
- package/dist-lib/sdk.cjs +2 -2
- package/dist-lib/sdk.mjs +1 -1
- package/dist-lib/skills.cjs +19600 -15992
- package/dist-lib/swift-compile.cjs +640 -402
- package/dist-lib/swift-compile.mjs +595 -357
- package/dist-lib/swift-package.cjs +24 -20
- package/dist-lib/swift-package.mjs +23 -19
- package/dist-lib/swift-submit.cjs +2 -2
- package/dist-lib/swift-submit.mjs +1 -1
- package/dist-lib/swift-toolchain.cjs +31 -4
- package/dist-lib/swift.cjs +2 -2
- package/dist-lib/vite-swift.cjs +1559 -1208
- package/dist-lib/vite.cjs +251 -42
- package/dist-lib/worklet-executable.cjs +2 -2
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-engine/src/engine/font-config.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/engine/node.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/engine/scroll-pan-contacts.d.ts +3 -1
- package/dist-types/packages/peach-engine/src/engine/scroll.d.ts +7 -0
- package/dist-types/packages/peach-engine/src/engine/types.d.ts +2 -1
- package/dist-types/packages/peach-engine/src/remote-stream/cloud-display.d.ts +2 -2
- package/dist-types/packages/peach-engine/src/render-worker/host-service-protocol.d.ts +3 -0
- package/dist-types/packages/peach-engine/src/render-worker/protocol.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/render-worker/scroll-mirror.d.ts +17 -0
- package/dist-types/packages/peach-engine/src/render-worker/worker-input-runtime.d.ts +2 -1
- package/dist-types/packages/peach-engine/src/render-worker/worklet-runtime.d.ts +3 -0
- package/dist-types/packages/peach-globals/src/cameraBridgeContract.d.ts +1 -0
- package/dist-types/packages/peach-globals/src/replayBridgeContract.d.ts +1 -0
- package/dist-types/packages/peach-globals/src/shellHostBridgeContract.d.ts +3 -0
- package/dist-types/packages/peach-kit/src/materials/types.d.ts +1 -0
- package/package.json +1 -1
- package/runtime-companion.json +1 -1
- package/scripts/dev-server-scanner.ts +4 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Alpha.h +2282 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/BasicImageTypes.h +55 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Conversion.h +10551 -6
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Convolution.h +4236 -3
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Geometry.h +827 -8
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Histogram.h +1369 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Morphology.h +1243 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/Transform.h +1747 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/vImage.h +291 -2
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/vImage_CVUtilities.h +1283 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/vImage_Types.h +811 -91
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vImage.framework/Headers/vImage_Utilities.h +1342 -25
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/BNNS/bnns.h +2738 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/BNNS/bnns_constants.h +1685 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/BNNS/bnns_graph.h +913 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/BNNS/bnns_structures.h +1917 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/LinearAlgebra.h +23 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/arithmetic.h +209 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/base.h +104 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/linear_systems.h +77 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/matrix.h +554 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/norms.h +58 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/object.h +186 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/splat.h +86 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/LinearAlgebra/vector.h +364 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Quadrature/Integration.h +195 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Quadrature/Quadrature.h +44 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/BLAS/BLAS.h +2330 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/BLAS/Types.h +123 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/Solve.h +8339 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/SolveImplementation.h +520 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/SolveImplementationTyped.h +1893 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/Sparse.h +10 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/blas_new.h +1098 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/cblas.h +859 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/cblas_new.h +1134 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/clapack.h +10555 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/fortran_blas.h +695 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/lapack.h +38526 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/lapack_types.h +60 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/lapack_version.h +20 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/thread_api.h +50 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vBasicOps.h +1218 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vBigNum.h +1458 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vDSP.h +10377 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vDSP_translate.h +167 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vForce.h +1243 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vecLib.h +114 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vecLibTypes.h +146 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vectorOps.h +1106 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vfp.h +294 -0
- package/sdk/ios/System/Library/Frameworks/Accelerate.framework/Headers/Accelerate.h +25 -1
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFArray.h +673 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFAvailability.h +232 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h +827 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFCalendar.h +121 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFCharacterSet.h +387 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFData.h +79 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFDate.h +122 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFDictionary.h +674 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFError.h +182 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFLocale.h +213 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFNotificationCenter.h +82 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFNumber.h +129 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFSet.h +491 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFString.h +883 -2
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CFTimeZone.h +98 -0
- package/sdk/ios/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h +11 -229
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h +2 -6
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h +2 -1
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Headers/QuartzCore.h +1 -0
- package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecBase.h +906 -3
- package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecCertificate.h +613 -0
- package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecItem.h +1284 -29
- package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecPolicy.h +441 -0
- package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/SecTrust.h +845 -0
- package/sdk/ios/System/Library/Frameworks/Security.framework/Headers/Security.h +4 -0
- package/sdk/ios/usr/include/AvailabilityMacros.h +3985 -0
- package/sdk/ios/usr/include/copyfile.h +143 -0
- package/sdk/ios/usr/include/malloc/_malloc.h +143 -0
- package/sdk/ios/usr/include/malloc/_malloc_type.h +153 -0
- package/sdk/ios/usr/include/malloc/_platform.h +80 -0
- package/sdk/ios/usr/include/malloc/_ptrcheck.h +43 -0
- package/sdk/ios/usr/include/malloc/malloc.h +768 -0
- package/sdk/ios/usr/include/os/availability.h +168 -6
- package/sdk/ios/usr/include/os/base.h +351 -0
- package/sdk/ios/usr/include/os/clock.h +18 -0
- package/sdk/ios/usr/include/os/lock.h +232 -10
- package/sdk/ios/usr/include/os/log.h +521 -38
- package/sdk/ios/usr/include/os/object.h +320 -3
- package/sdk/ios/usr/include/os/trace.h +492 -0
- package/sdk/ios/usr/include/os/trace_base.h +167 -0
- package/sdk/ios/usr/include/os/workgroup.h +37 -0
- package/sdk/ios/usr/include/os/workgroup_base.h +91 -0
- package/sdk/ios/usr/include/os/workgroup_interval.h +156 -0
- package/sdk/ios/usr/include/os/workgroup_object.h +359 -0
- package/sdk/ios/usr/include/os/workgroup_parallel.h +76 -0
- package/sdk/ios/usr/include/sys/cdefs.h +38 -0
- package/sdk/ios/wasm/include/unistd.h +3 -0
- package/skills/contrast/SKILL.md +3 -0
- package/src/codex-client.ts +11 -6
- package/src/dev-bundle-resolution.ts +124 -48
- package/src/expo-native-workspace.ts +176 -0
- package/src/expo-swift-host.ts +161 -26
- package/src/expo-swift-ready.ts +14 -28
- package/src/expoSwiftContract.ts +4 -1
- package/src/generated/swift-c-predefines.json +68 -12
- package/src/host/bridge-host.ts +5 -0
- package/src/installed-package-versions.ts +14 -1
- package/src/metro-project-root.ts +44 -33
- package/src/native-app-identity-project.ts +1 -0
- package/src/nitro-adapter.lock.json +916 -10
- package/src/nitro-adapter.ts +33 -24
- package/src/nitro-bundle.ts +108 -22
- package/src/nitro-compile.ts +32 -5
- package/src/nitro-source.ts +13 -3
- package/src/nitroAdapterContract.ts +100 -20
- package/src/node-http-fetch.ts +116 -0
- package/src/packageVersionsContract.ts +46 -0
- package/src/serverDiscoveryContract.ts +1 -0
- package/src/settingsContract.ts +0 -30
- package/src/swift-binary-modules.ts +20 -5
- package/src/swift-compile.ts +168 -48
- package/src/swift-coverage/xcode-assets.ts +4 -3
- package/src/swift-host.ts +14 -3
- package/src/swift-objc-compile.ts +32 -5
- package/src/swift-objc-metadata.ts +2 -2
- package/src/swift-objc-platform.ts +2 -2
- package/src/swift-objc-standin.ts +43 -13
- package/src/swift-package.ts +33 -26
- package/src/swift-source-pods.ts +126 -41
- package/src/swift-standin-digest.ts +77 -0
- package/src/swift-standin-emit.ts +40 -4
- package/src/swift-standins.ts +68 -19
- package/src/swift-toolchain.ts +38 -0
- package/src/swiftContract.ts +8 -0
- package/src/vite-plugin.ts +0 -10
- package/src/xcode-project.ts +62 -42
- package/src/settings-flags.ts +0 -107
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/* Copyright (c) 2014 Apple Inc. All rights reserved. */
|
|
2
|
+
|
|
3
|
+
#ifndef __LINEAR_ALGEBRA_PUBLIC_HEADER__
|
|
4
|
+
#define __LINEAR_ALGEBRA_PUBLIC_HEADER__
|
|
5
|
+
|
|
6
|
+
#ifdef __cplusplus
|
|
7
|
+
extern "C" {
|
|
8
|
+
#endif
|
|
9
|
+
|
|
10
|
+
#include <vecLib/LinearAlgebra/base.h>
|
|
11
|
+
#include <vecLib/LinearAlgebra/object.h>
|
|
12
|
+
#include <vecLib/LinearAlgebra/matrix.h>
|
|
13
|
+
#include <vecLib/LinearAlgebra/vector.h>
|
|
14
|
+
#include <vecLib/LinearAlgebra/splat.h>
|
|
15
|
+
#include <vecLib/LinearAlgebra/arithmetic.h>
|
|
16
|
+
#include <vecLib/LinearAlgebra/linear_systems.h>
|
|
17
|
+
#include <vecLib/LinearAlgebra/norms.h>
|
|
18
|
+
|
|
19
|
+
#ifdef __cplusplus
|
|
20
|
+
}
|
|
21
|
+
#endif
|
|
22
|
+
|
|
23
|
+
#endif // __LINEAR_ALGEBRA_PUBLIC_HEADER__
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
/* Copyright (c) 2014 Apple Inc. All rights reserved. */
|
|
2
|
+
|
|
3
|
+
#ifndef __LA_ARITHMETIC_HEADER__
|
|
4
|
+
#define __LA_ARITHMETIC_HEADER__
|
|
5
|
+
|
|
6
|
+
#include <vecLib/LinearAlgebra/object.h>
|
|
7
|
+
|
|
8
|
+
#if __has_feature(assume_nonnull)
|
|
9
|
+
//// If assume_nonnull is available, use it and use nullability qualifiers.
|
|
10
|
+
_Pragma("clang assume_nonnull begin")
|
|
11
|
+
#else
|
|
12
|
+
//// Otherwise, neuter the nullability qualifiers.
|
|
13
|
+
#define __nullable
|
|
14
|
+
#define __nonnull
|
|
15
|
+
#endif
|
|
16
|
+
|
|
17
|
+
/*!
|
|
18
|
+
@abstract
|
|
19
|
+
Transpose a vector or matrix.
|
|
20
|
+
|
|
21
|
+
@discussion
|
|
22
|
+
Returns a matrix that is the transpose of the source vector or matrix. If the
|
|
23
|
+
source object is not a vector or matrix, the returned object will have status
|
|
24
|
+
LA_INVALID_PARAMETER_ERROR.
|
|
25
|
+
*/
|
|
26
|
+
LA_FUNCTION LA_AVAILABILITY LA_RETURNS_RETAINED
|
|
27
|
+
la_object_t la_transpose(la_object_t matrix);
|
|
28
|
+
|
|
29
|
+
/*!
|
|
30
|
+
@abstract
|
|
31
|
+
Multiply a matrix or vector by a scalar given by a float.
|
|
32
|
+
|
|
33
|
+
@discussion
|
|
34
|
+
Returns a matrix whose entries are the product of the scalar and the
|
|
35
|
+
corresponding element of the source matrix. If the source object is not
|
|
36
|
+
a vector or matrix, the returned object will have status
|
|
37
|
+
LA_INVALID_PARAMETER_ERROR.
|
|
38
|
+
|
|
39
|
+
If the scalar type of matrix is not float LA_PRECISION_MISMATCH_ERROR is
|
|
40
|
+
returned.
|
|
41
|
+
*/
|
|
42
|
+
LA_FUNCTION LA_AVAILABILITY LA_RETURNS_RETAINED
|
|
43
|
+
la_object_t la_scale_with_float(la_object_t matrix, float scalar);
|
|
44
|
+
|
|
45
|
+
/*!
|
|
46
|
+
@abstract
|
|
47
|
+
Multiply a matrix or vector by a scalar given by a double.
|
|
48
|
+
|
|
49
|
+
@discussion
|
|
50
|
+
Returns a matrix whose entries are the product of the scalar and the
|
|
51
|
+
corresponding element of the source matrix. If the source object is not
|
|
52
|
+
a vector or matrix, the returned object will have status
|
|
53
|
+
LA_INVALID_PARAMETER_ERROR.
|
|
54
|
+
|
|
55
|
+
If the scalar type of matrix is not double LA_PRECISION_MISMATCH_ERROR is
|
|
56
|
+
returned.
|
|
57
|
+
*/
|
|
58
|
+
LA_FUNCTION LA_AVAILABILITY LA_RETURNS_RETAINED
|
|
59
|
+
la_object_t la_scale_with_double(la_object_t matrix, double scalar);
|
|
60
|
+
|
|
61
|
+
/*!
|
|
62
|
+
@abstract
|
|
63
|
+
Compute the element-wise sum of two vectors or matrices.
|
|
64
|
+
|
|
65
|
+
@discussion
|
|
66
|
+
If either source operand is not a vector or matrix or splat, or if both
|
|
67
|
+
operands are splats, the result has status LA_INVALID_PARAMETER_ERROR.
|
|
68
|
+
|
|
69
|
+
The two operands must have the same dimensions. If they do not, the result
|
|
70
|
+
will have status LA_DIMENSION_MISMATCH_ERROR. For simplicity, a vector
|
|
71
|
+
of length n, a 1xn matrix, and an nx1 matrix are all treated as having the
|
|
72
|
+
same dimensions. If 1xn and nx1 or nx1 and 1xn vectors are passed, an nx1
|
|
73
|
+
vector will be created, otherwise orientation matches input.
|
|
74
|
+
|
|
75
|
+
The result has the same dimensions as the operands, and each element in
|
|
76
|
+
the result is the sum of the corresponding elements in the source operands.
|
|
77
|
+
*/
|
|
78
|
+
LA_FUNCTION LA_AVAILABILITY LA_RETURNS_RETAINED
|
|
79
|
+
la_object_t la_sum(la_object_t obj_left, la_object_t obj_right);
|
|
80
|
+
|
|
81
|
+
/*!
|
|
82
|
+
@abstract
|
|
83
|
+
Compute the element-wise difference of two vectors or matrices.
|
|
84
|
+
|
|
85
|
+
@discussion
|
|
86
|
+
If either source operand is not a vector or matrix or splat, or if both
|
|
87
|
+
operands are splats, the result has status LA_INVALID_PARAMETER_ERROR.
|
|
88
|
+
|
|
89
|
+
The two operands must have the same dimensions. If they do not, the result
|
|
90
|
+
will have status LA_DIMENSION_MISMATCH_ERROR. For simplicity, a vector
|
|
91
|
+
of length n, a 1xn matrix, and an nx1 matrix are all treated as having the
|
|
92
|
+
same dimensions. If 1xn and nx1 or nx1 and 1xn vectors are passed, an nx1
|
|
93
|
+
vector will be created, otherwise orientation matches input.
|
|
94
|
+
|
|
95
|
+
The result has the same dimensions as the operands, and each element in
|
|
96
|
+
the result is given by subtracting the corresponding element of obj_right
|
|
97
|
+
from the corresponding element of obj_left.
|
|
98
|
+
*/
|
|
99
|
+
LA_FUNCTION LA_AVAILABILITY LA_RETURNS_RETAINED
|
|
100
|
+
la_object_t la_difference(la_object_t obj_left, la_object_t obj_right);
|
|
101
|
+
|
|
102
|
+
/*!
|
|
103
|
+
@abstract
|
|
104
|
+
Compute the element-wise product of two vectors or matrices.
|
|
105
|
+
|
|
106
|
+
@discussion
|
|
107
|
+
If either source operand is not a vector or matrix or splat, or if both
|
|
108
|
+
operands are splats, the result has status LA_INVALID_PARAMETER_ERROR.
|
|
109
|
+
|
|
110
|
+
The two operands must have the same dimensions. If they do not, the result
|
|
111
|
+
will have status LA_DIMENSION_MISMATCH_ERROR. For simplicity, a vector
|
|
112
|
+
of length n, a 1xn matrix, and an nx1 matrix are all treated as having the
|
|
113
|
+
same dimensions. If 1xn and nx1 or nx1 and 1xn vectors are passed, an nx1
|
|
114
|
+
vector will be created, otherwise orientation matches input.
|
|
115
|
+
|
|
116
|
+
The result has the same dimensions as the operands, and each element in
|
|
117
|
+
the result is the product of the corresponding elements in the source operands.
|
|
118
|
+
*/
|
|
119
|
+
LA_FUNCTION LA_AVAILABILITY LA_RETURNS_RETAINED
|
|
120
|
+
la_object_t la_elementwise_product(la_object_t obj_left, la_object_t obj_right);
|
|
121
|
+
|
|
122
|
+
/*!
|
|
123
|
+
@abstract
|
|
124
|
+
Compute the inner product of two vectors.
|
|
125
|
+
|
|
126
|
+
@discussion
|
|
127
|
+
If either operand is a matrix that is not 1xn or nx1, the result has the
|
|
128
|
+
status LA_INVALID_PARAMETER_ERROR.
|
|
129
|
+
|
|
130
|
+
If either operand is not a vector or matrix or splat, or if both operands
|
|
131
|
+
are splats, the result has the status LA_INVALID_PARAMETER_ERROR.
|
|
132
|
+
|
|
133
|
+
If the lengths of the two operands do not match, the result has the status
|
|
134
|
+
LA_DIMENSION_MISMATCH_ERROR.
|
|
135
|
+
|
|
136
|
+
Otherwise the result is a 1x1 matrix containing the inner product:
|
|
137
|
+
|
|
138
|
+
sum_{i=0...length} vector_left[i] * vector_right[i]
|
|
139
|
+
*/
|
|
140
|
+
LA_FUNCTION LA_AVAILABILITY LA_RETURNS_RETAINED
|
|
141
|
+
la_object_t la_inner_product(la_object_t vector_left, la_object_t vector_right);
|
|
142
|
+
|
|
143
|
+
/*!
|
|
144
|
+
@abstract
|
|
145
|
+
Compute the outer product of two vectors.
|
|
146
|
+
|
|
147
|
+
@discussion
|
|
148
|
+
Splats are not supported by this function. If either operand
|
|
149
|
+
is a splat, the result has status LA_INVALID_PARAMETER_ERROR.
|
|
150
|
+
|
|
151
|
+
If either operand is a matrix that is not 1xn or nx1, the result has the
|
|
152
|
+
status LA_INVALID_PARAMETER_ERROR.
|
|
153
|
+
|
|
154
|
+
If either operand is not a vector or matrix, the result has the status
|
|
155
|
+
LA_INVALID_PARAMETER_ERROR.
|
|
156
|
+
|
|
157
|
+
Otherwise the result is a matrix containg the outer product. It has
|
|
158
|
+
length(vector_left) rows and length(vector_right) columns. The i,jth
|
|
159
|
+
element of the matrix is vector_left[i] * vector_right[j].
|
|
160
|
+
*/
|
|
161
|
+
LA_FUNCTION LA_AVAILABILITY LA_RETURNS_RETAINED
|
|
162
|
+
la_object_t la_outer_product(la_object_t vector_left, la_object_t vector_right);
|
|
163
|
+
|
|
164
|
+
/*!
|
|
165
|
+
@abstract
|
|
166
|
+
Compute a matrix product.
|
|
167
|
+
|
|
168
|
+
@discussion
|
|
169
|
+
Left splat operands are treated as 1 x rows(matrix_right) vectors and right
|
|
170
|
+
splat operands are treated as cols(matrix_left) x 1 vectors.
|
|
171
|
+
|
|
172
|
+
For convenience, in certain situations vector operands may be implicitly
|
|
173
|
+
transposed. Specifically,
|
|
174
|
+
|
|
175
|
+
If cols(matrix_left) == rows(matrix_right)
|
|
176
|
+
rows(matrix_left) x cols(matrix_right) = matrix_left * matrix_right
|
|
177
|
+
Else if cols(matrix_left) == 1 and rows(matrix_left) == rows(matrix_right)
|
|
178
|
+
1 x cols(matrix_right) = transpose(matrix_left) * matrix_right
|
|
179
|
+
Else if rows(matrix_right) == 1 and cols(matrix_left) == cols(matrix_right)
|
|
180
|
+
rows(matrix_left) x 1 = matrix_left * transpose(matrix_right)
|
|
181
|
+
Else
|
|
182
|
+
result has the status LA_DIMENSION_MISMATCH_ERROR.
|
|
183
|
+
|
|
184
|
+
If either operand is not a vector or matrix or splat, or if both operands
|
|
185
|
+
are splats, the result has the status LA_INVALID_PARAMETER_ERROR.
|
|
186
|
+
|
|
187
|
+
Otherwise the result is a matrix with 1 row if matrix_left is vector or splat
|
|
188
|
+
and rows(matrix_left) otherwise, and 1 column if matrix_right is vector or
|
|
189
|
+
splat and cols(matrix_right) otherwise.
|
|
190
|
+
|
|
191
|
+
If cols(matrix_left) == rows(matrix_right), the i,jth element of the matrix is:
|
|
192
|
+
sum_{k=0...cols(matrix_left)} matrix_left[i,k] * matrix_right[k,j]
|
|
193
|
+
If cols(matrix_left) == 1 and rows(matrix_left) == rows(matrix_right), the
|
|
194
|
+
0,jth element of matrix is:
|
|
195
|
+
sum_{k=0...rows(matrix_right)} matrix_left[k,0] * matrix_right[k,j]
|
|
196
|
+
If rows(matrix_right) == 1 and cols(matrix_left) == cols(matrix_right), the
|
|
197
|
+
i,0th element of matrix is:
|
|
198
|
+
sum_{k=0...cols(matrix_left)} matrix_left[i,k] * matrix_right[0,k]
|
|
199
|
+
|
|
200
|
+
*/
|
|
201
|
+
LA_FUNCTION LA_AVAILABILITY LA_RETURNS_RETAINED
|
|
202
|
+
la_object_t la_matrix_product(la_object_t matrix_left,
|
|
203
|
+
la_object_t matrix_right);
|
|
204
|
+
|
|
205
|
+
#if __has_feature(assume_nonnull)
|
|
206
|
+
_Pragma("clang assume_nonnull end")
|
|
207
|
+
#endif
|
|
208
|
+
|
|
209
|
+
#endif // __LA_ARITHMETIC_HEADER__
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/* Copyright (c) 2014 Apple Inc. All rights reserved. */
|
|
2
|
+
|
|
3
|
+
#ifndef __LA_BASE_HEADER__
|
|
4
|
+
#define __LA_BASE_HEADER__
|
|
5
|
+
|
|
6
|
+
#include <os/object.h>
|
|
7
|
+
#include <os/availability.h>
|
|
8
|
+
#include <stddef.h>
|
|
9
|
+
|
|
10
|
+
/* Define abstractions for a number of attributes that we wish to be able to
|
|
11
|
+
consisely attach to functions in the LinearAlgebra library. */
|
|
12
|
+
#define LA_AVAILABILITY API_DEPRECATED("This API is deprecated, please use BLAS and LAPACK", macos(10.10,11.0), ios(8.0,14.0), watchos(1.0,7.0), tvos(8.0,14.0))
|
|
13
|
+
#define LA_NONNULL1 OS_NONNULL1
|
|
14
|
+
#define LA_NONNULL OS_NONNULL_ALL
|
|
15
|
+
#define LA_EXPORT OS_EXPORT
|
|
16
|
+
#define LA_NOTHROW OS_NOTHROW
|
|
17
|
+
#define LA_FUNCTION OS_EXPORT OS_NOTHROW
|
|
18
|
+
#define LA_CONST OS_CONST
|
|
19
|
+
|
|
20
|
+
/*!
|
|
21
|
+
@typedef la_attribute_t
|
|
22
|
+
|
|
23
|
+
@abstract
|
|
24
|
+
Attributes to control the behavior of operations in the LinearAlgebra library.
|
|
25
|
+
|
|
26
|
+
@discussion
|
|
27
|
+
These attributes are "sticky"; created objects inherit the inclusive-or of
|
|
28
|
+
the attributes set on their parents at the point that they are created.
|
|
29
|
+
|
|
30
|
+
@constant LA_ENABLE_LOGGING
|
|
31
|
+
Computations performed using objects with this attribute print debugging
|
|
32
|
+
information to stderr.
|
|
33
|
+
*/
|
|
34
|
+
#define LA_DEFAULT_ATTRIBUTES (0)
|
|
35
|
+
#define LA_ATTRIBUTE_ENABLE_LOGGING (1U << 0)
|
|
36
|
+
typedef unsigned long la_attribute_t;
|
|
37
|
+
|
|
38
|
+
/*!
|
|
39
|
+
@typedef la_status_t
|
|
40
|
+
|
|
41
|
+
@abstract
|
|
42
|
+
Status codes for la_object_t objects.
|
|
43
|
+
|
|
44
|
+
@discussion
|
|
45
|
+
Every la_object_t object has a status. If everything has gone well in a
|
|
46
|
+
computation, the status will be LA_STATUS_SUCCESS, which is defined to
|
|
47
|
+
be zero. Status codes greater than zero indicate warnings, and codes less
|
|
48
|
+
than zero indicate errors.
|
|
49
|
+
|
|
50
|
+
Errors and warnings propagate with a computation to all descendants of the
|
|
51
|
+
la_object_t object that produced them. If a la_object_t object receives an
|
|
52
|
+
error or warning from both parents, one of them will take precedence over the
|
|
53
|
+
other. The exact precedence ranking is not defined, but errors always
|
|
54
|
+
supercede warnings.
|
|
55
|
+
|
|
56
|
+
@constant LA_SUCCESS
|
|
57
|
+
There are no errors or warnings associated with the la_object_t object.
|
|
58
|
+
|
|
59
|
+
@constant LA_WARNING_POORLY_CONDITIONED
|
|
60
|
+
One or more parts of the computation was poorly conditioned numerically, and
|
|
61
|
+
the results are signficantly less accurate than might otherwise expected.
|
|
62
|
+
|
|
63
|
+
@constant LA_INTERNAL_ERROR
|
|
64
|
+
An error was encountered internal to the LinearAlgebra library. For example,
|
|
65
|
+
an allocation failed, or memory was corrupted.
|
|
66
|
+
|
|
67
|
+
@constant LA_INVALID_PARAMETER_ERROR
|
|
68
|
+
An invalid parameter was passed to the function that created this object or
|
|
69
|
+
one of it's ancestors.
|
|
70
|
+
|
|
71
|
+
@constant LA_DIMENSION_MISMATCH_ERROR
|
|
72
|
+
The function that created this object or one of its ancestors was passed
|
|
73
|
+
arguments whose dimensions were not compatibile. For example, this error
|
|
74
|
+
might be generated by attempting to add a 63-element vector to a 135-element
|
|
75
|
+
vector, or to multiply a 10x4 matrix by a 7x128 matrix.
|
|
76
|
+
|
|
77
|
+
@constant LA_PRECISION_MISMATCH_ERROR
|
|
78
|
+
The function that created this object or one of its ancestors was passed
|
|
79
|
+
arguments whose underlying scalar types did not match.
|
|
80
|
+
|
|
81
|
+
@constant LA_SINGULAR_ERROR
|
|
82
|
+
One or more parts of the computation attempted to solve a singular system,
|
|
83
|
+
and no correct result is possible.
|
|
84
|
+
*/
|
|
85
|
+
#define LA_SUCCESS (0)
|
|
86
|
+
#define LA_WARNING_POORLY_CONDITIONED (1000)
|
|
87
|
+
#define LA_INTERNAL_ERROR (-1000)
|
|
88
|
+
#define LA_INVALID_PARAMETER_ERROR (-1001)
|
|
89
|
+
#define LA_DIMENSION_MISMATCH_ERROR (-1002)
|
|
90
|
+
#define LA_PRECISION_MISMATCH_ERROR (-1003)
|
|
91
|
+
#define LA_SINGULAR_ERROR (-1004)
|
|
92
|
+
#define LA_SLICE_OUT_OF_BOUNDS_ERROR (-1005)
|
|
93
|
+
typedef long la_status_t;
|
|
94
|
+
|
|
95
|
+
#define LA_SCALAR_TYPE_FLOAT (0x8000)
|
|
96
|
+
#define LA_SCALAR_TYPE_DOUBLE (0x4000)
|
|
97
|
+
typedef unsigned int la_scalar_type_t;
|
|
98
|
+
|
|
99
|
+
typedef unsigned long la_count_t;
|
|
100
|
+
typedef long la_index_t;
|
|
101
|
+
|
|
102
|
+
typedef void (*la_deallocator_t)(void *ptr);
|
|
103
|
+
|
|
104
|
+
#endif // defined __LA_BASE_HEADER__
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/* Copyright (c) 2014 Apple Inc. All rights reserved. */
|
|
2
|
+
|
|
3
|
+
#ifndef __LA_LINEAR_SYSTEMS_HEADER__
|
|
4
|
+
#define __LA_LINEAR_SYSTEMS_HEADER__
|
|
5
|
+
|
|
6
|
+
#include <vecLib/LinearAlgebra/object.h>
|
|
7
|
+
|
|
8
|
+
#if __has_feature(assume_nonnull)
|
|
9
|
+
//// If assume_nonnull is available, use it and use nullability qualifiers.
|
|
10
|
+
_Pragma("clang assume_nonnull begin")
|
|
11
|
+
#else
|
|
12
|
+
//// Otherwise, neuter the nullability qualifiers.
|
|
13
|
+
#define __nullable
|
|
14
|
+
#define __nonnull
|
|
15
|
+
#endif
|
|
16
|
+
|
|
17
|
+
/*!
|
|
18
|
+
@abstract
|
|
19
|
+
Solves a system of linear equations
|
|
20
|
+
|
|
21
|
+
@param matrix_system
|
|
22
|
+
A matrix describing the left-hand side of the system.
|
|
23
|
+
|
|
24
|
+
@param obj_rhs
|
|
25
|
+
A vector or matrix describing one or more right-hand sides for which the
|
|
26
|
+
equations are to be solved.
|
|
27
|
+
|
|
28
|
+
@return
|
|
29
|
+
A matrix of the solution(s) of the system of equations.
|
|
30
|
+
|
|
31
|
+
@discussion
|
|
32
|
+
If matrix_system represents a matrix A, and obj_rhs represents a vector
|
|
33
|
+
B, la_solve returns a vector X representing a solution to the equation
|
|
34
|
+
AX = B, if such a solution exists. If obj_rhs represents a matrix, then
|
|
35
|
+
la_solve returns a matrix representing the solution of the same equation.
|
|
36
|
+
|
|
37
|
+
There are several different cases, and different algorithms are chosen
|
|
38
|
+
depending on the specifics:
|
|
39
|
+
|
|
40
|
+
If the matrix has a special structure that allows us to solve the system
|
|
41
|
+
without factoring (e.g. if the matrix is diagonal or triangular), we may
|
|
42
|
+
use that structure to compute the solution.
|
|
43
|
+
|
|
44
|
+
If the matrix is symmetric and all diagonal entries are positive, or if we
|
|
45
|
+
know, either via a hint parameter or by how earlier computations were
|
|
46
|
+
structured, that the matrix is positive definite, we attempt a Cholesky
|
|
47
|
+
factorization. If this succeeds, it is used to compute the solution via
|
|
48
|
+
forward- and back-substitution.
|
|
49
|
+
|
|
50
|
+
If the matrix is square, we try to perform Gaussian elimination to construct
|
|
51
|
+
a triangular factorization with pivoting. If this factorization succeeds,
|
|
52
|
+
we use it to solve the system. If it fails, the returned object has the
|
|
53
|
+
error status LA_SINGULAR_ERROR.
|
|
54
|
+
|
|
55
|
+
If the matrix is not square, we return a least-squares solution computed by
|
|
56
|
+
performing a QR factorization of the matrix.
|
|
57
|
+
|
|
58
|
+
If the number of rows of the matrix does not match the number of rows of
|
|
59
|
+
the right hand side object, the returned object has status
|
|
60
|
+
LA_DIMENSION_MISMATCH_ERROR.
|
|
61
|
+
|
|
62
|
+
If the object describing the matrix is not a matrix, or if the right hand
|
|
63
|
+
side is not a matrix or vector, the returned object has status
|
|
64
|
+
LA_INVALID_PARAMETER_ERROR.
|
|
65
|
+
|
|
66
|
+
If you want to solve the system XA = B, which is less common (but still
|
|
67
|
+
occurs fairly frequently), you may accomplish this by transposing A and B,
|
|
68
|
+
solving, and then transposing the result of the solve.
|
|
69
|
+
*/
|
|
70
|
+
LA_FUNCTION LA_AVAILABILITY LA_RETURNS_RETAINED
|
|
71
|
+
la_object_t la_solve(la_object_t matrix_system, la_object_t obj_rhs);
|
|
72
|
+
|
|
73
|
+
#if __has_feature(assume_nonnull)
|
|
74
|
+
_Pragma("clang assume_nonnull end")
|
|
75
|
+
#endif
|
|
76
|
+
|
|
77
|
+
#endif // __LA_ARITHMETIC_HEADER__
|