Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.DS_Store
/.build
/Packages
xcuserdata/
DerivedData/
.swiftpm/configuration/registries.json
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
.netrc
.vscode
Package.resolved
.swift-version
41 changes: 41 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// swift-tools-version: 6.0

import PackageDescription

let package = Package(
name: "swift-numerics-differentiable",
products: [
.library(
name: "NumericsDifferentiable",
targets: ["NumericsDifferentiable"]
),
.library(
name: "RealModuleDifferentiable",
targets: ["RealModuleDifferentiable"]
),
],
dependencies: [
.package(url: "https://github.com/apple/swift-numerics", from: "1.0.2"),
],
targets: [
.target(
name: "NumericsDifferentiable",
dependencies: [
.product(name: "Numerics", package: "swift-numerics"),
"RealModuleDifferentiable",
]
),
.target(
name: "RealModuleDifferentiable",
dependencies: [
.product(name: "RealModule", package: "swift-numerics"),
]
),
.testTarget(
name: "RealModuleDifferentiableTests",
dependencies: [
"RealModuleDifferentiable",
]
),
]
)
6 changes: 6 additions & 0 deletions Sources/NumericsDifferentiable/Numerics.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// A module that re-exports Swift Numerics API and the Differentiable extensions to the Swift Numerics API
@_exported import Numerics
// Swift Numerics modules with Differentiable extensions
@_exported import RealModuleDifferentiable
// No differentiable implementations for the `ComplexModule` yet
//@_exported import ComplexModuleDifferentiable
2 changes: 2 additions & 0 deletions Sources/RealModuleDifferentiable/RealModule.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// Export the RealModule API from Swift Numerics which this module extends with `Differentiable` support
@_exported import RealModule
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import Testing
@testable import RealModuleDifferentiable

@Test func example() async throws {
// Write your test here and use APIs like `#expect(...)` to check expected conditions.
}