├── .editorconfig ├── .gitattributes ├── .github └── workflows │ ├── activation.yaml │ ├── release.yaml │ └── test.yaml ├── .gitignore ├── .releaserc.json ├── Assets ├── .gitkeep ├── Demo.unity ├── Demo.unity.meta ├── DemoBehaviour.cs └── DemoBehaviour.cs.meta ├── LICENSE ├── Packages ├── com.careboo.blinq │ ├── CHANGELOG.md │ ├── CHANGELOG.md.meta │ ├── CareBoo.Blinq.PerformanceTests.meta │ ├── CareBoo.Blinq.PerformanceTests │ │ ├── AggregatePerformanceTest.cs │ │ ├── AggregatePerformanceTest.cs.meta │ │ ├── AllPerformanceTest.cs │ │ ├── AllPerformanceTest.cs.meta │ │ ├── AnyPerformanceTest.cs │ │ ├── AnyPerformanceTest.cs.meta │ │ ├── AppendPerformanceTest.cs │ │ ├── AppendPerformanceTest.cs.meta │ │ ├── AveragePerformanceTest.gen.cs │ │ ├── AveragePerformanceTest.gen.cs.meta │ │ ├── AveragePerformanceTest.tt │ │ ├── AveragePerformanceTest.tt.meta │ │ ├── BaseBlinqPerformanceTest.cs │ │ ├── BaseBlinqPerformanceTest.cs.meta │ │ ├── CareBoo.Blinq.Performance.Tests.asmdef │ │ ├── CareBoo.Blinq.Performance.Tests.asmdef.meta │ │ ├── ConcatPerformanceTest.cs │ │ ├── ConcatPerformanceTest.cs.meta │ │ ├── ContainsPerformanceTest.cs │ │ ├── ContainsPerformanceTest.cs.meta │ │ ├── CountPerformanceTest.cs │ │ ├── CountPerformanceTest.cs.meta │ │ ├── DistinctPerformanceTest.cs │ │ ├── DistinctPerformanceTest.cs.meta │ │ ├── EnumerableValues.cs │ │ ├── EnumerableValues.cs.meta │ │ ├── ExceptPerformanceTest.cs │ │ ├── ExceptPerformanceTest.cs.meta │ │ ├── FirstPerformanceTest.cs │ │ ├── FirstPerformanceTest.cs.meta │ │ ├── GroupByPerformanceTest.cs │ │ ├── GroupByPerformanceTest.cs.meta │ │ ├── GroupJoinPerformanceTest.cs │ │ ├── GroupJoinPerformanceTest.cs.meta │ │ ├── SelectPerformanceTest.cs │ │ └── SelectPerformanceTest.cs.meta │ ├── CareBoo.Blinq.Tests.meta │ ├── CareBoo.Blinq.Tests │ │ ├── AggregateTest.cs │ │ ├── AggregateTest.cs.meta │ │ ├── AllTest.cs │ │ ├── AllTest.cs.meta │ │ ├── AnyTest.cs │ │ ├── AnyTest.cs.meta │ │ ├── AppendTest.cs │ │ ├── AppendTest.cs.meta │ │ ├── ArrayValues.cs │ │ ├── ArrayValues.cs.meta │ │ ├── AssemblyInfo.cs │ │ ├── AssemblyInfo.cs.meta │ │ ├── AverageTest.gen.cs │ │ ├── AverageTest.gen.cs.meta │ │ ├── AverageTest.tt │ │ ├── AverageTest.tt.meta │ │ ├── CareBoo.Blinq.Tests.asmdef │ │ ├── CareBoo.Blinq.Tests.asmdef.meta │ │ ├── ConcatTest.cs │ │ ├── ConcatTest.cs.meta │ │ ├── ContainsTest.cs │ │ ├── ContainsTest.cs.meta │ │ ├── CountTest.cs │ │ ├── CountTest.cs.meta │ │ ├── DefaultIfEmptyTest.cs │ │ ├── DefaultIfEmptyTest.cs.meta │ │ ├── DistinctTest.cs │ │ ├── DistinctTest.cs.meta │ │ ├── ElementAtTest.cs │ │ ├── ElementAtTest.cs.meta │ │ ├── EnumerableExtensions.cs │ │ ├── EnumerableExtensions.cs.meta │ │ ├── ExceptTest.cs │ │ ├── ExceptTest.cs.meta │ │ ├── FirstTest.cs │ │ ├── FirstTest.cs.meta │ │ ├── Functions.cs │ │ ├── Functions.cs.meta │ │ ├── GroupByTest.cs │ │ ├── GroupByTest.cs.meta │ │ ├── GroupJoinTest.cs │ │ ├── GroupJoinTest.cs.meta │ │ ├── IntersectTest.cs │ │ ├── IntersectTest.cs.meta │ │ ├── JoinTest.cs │ │ ├── JoinTest.cs.meta │ │ ├── LastTest.cs │ │ ├── LastTest.cs.meta │ │ ├── LongCountTest.cs │ │ ├── LongCountTest.cs.meta │ │ ├── MaxMinTest.cs │ │ ├── MaxMinTest.cs.meta │ │ ├── MaxMinTest.gen.cs │ │ ├── MaxMinTest.gen.cs.meta │ │ ├── MaxMinTest.tt │ │ ├── MaxMinTest.tt.meta │ │ ├── OrderByTest.cs │ │ ├── OrderByTest.cs.meta │ │ ├── PrependTest.cs │ │ ├── PrependTest.cs.meta │ │ ├── ReverseTest.cs │ │ ├── ReverseTest.cs.meta │ │ ├── SelectManyTest.cs │ │ ├── SelectManyTest.cs.meta │ │ ├── SelectTest.cs │ │ ├── SelectTest.cs.meta │ │ ├── SequenceEqualTest.cs │ │ ├── SequenceEqualTest.cs.meta │ │ ├── SingleTest.cs │ │ ├── SingleTest.cs.meta │ │ ├── SkipTest.cs │ │ ├── SkipTest.cs.meta │ │ ├── SumTest.gen.cs │ │ ├── SumTest.gen.cs.meta │ │ ├── SumTest.tt │ │ ├── SumTest.tt.meta │ │ ├── TakeTest.cs │ │ ├── TakeTest.cs.meta │ │ ├── ThenByTest.cs │ │ ├── ThenByTest.cs.meta │ │ ├── UnionTest.cs │ │ ├── UnionTest.cs.meta │ │ ├── Utils.cs │ │ ├── Utils.cs.meta │ │ ├── WhereTest.cs │ │ ├── WhereTest.cs.meta │ │ ├── ZipTest.cs │ │ └── ZipTest.cs.meta │ ├── CareBoo.Blinq.meta │ ├── CareBoo.Blinq │ │ ├── AssemblyInfo.cs │ │ ├── AssemblyInfo.cs.meta │ │ ├── CareBoo.Blinq.asmdef │ │ ├── CareBoo.Blinq.asmdef.meta │ │ ├── Error.cs │ │ ├── Error.cs.meta │ │ ├── FuncJob.cs │ │ ├── FuncJob.cs.meta │ │ ├── IOrderedSequence.cs │ │ ├── IOrderedSequence.cs.meta │ │ ├── ISequence.cs │ │ ├── ISequence.cs.meta │ │ ├── NativeArray.meta │ │ ├── NativeArray │ │ │ ├── NativeArray.Aggregate.cs │ │ │ ├── NativeArray.Aggregate.cs.meta │ │ │ ├── NativeArray.All.cs │ │ │ ├── NativeArray.All.cs.meta │ │ │ ├── NativeArray.Any.cs │ │ │ ├── NativeArray.Any.cs.meta │ │ │ ├── NativeArray.Append.cs │ │ │ ├── NativeArray.Append.cs.meta │ │ │ ├── NativeArray.Average.meta │ │ │ ├── NativeArray.Average │ │ │ │ ├── NativeArray.Average.gen.cs │ │ │ │ ├── NativeArray.Average.gen.cs.meta │ │ │ │ ├── NativeArray.Average.tt │ │ │ │ └── NativeArray.Average.tt.meta │ │ │ ├── NativeArray.Concat.cs │ │ │ ├── NativeArray.Concat.cs.meta │ │ │ ├── NativeArray.Contains.cs │ │ │ ├── NativeArray.Contains.cs.meta │ │ │ ├── NativeArray.Count.cs │ │ │ ├── NativeArray.Count.cs.meta │ │ │ ├── NativeArray.DefaultIfEmpty.cs │ │ │ ├── NativeArray.DefaultIfEmpty.cs.meta │ │ │ ├── NativeArray.Distinct.cs │ │ │ ├── NativeArray.Distinct.cs.meta │ │ │ ├── NativeArray.ElementAt.cs │ │ │ ├── NativeArray.ElementAt.cs.meta │ │ │ ├── NativeArray.Except.cs │ │ │ ├── NativeArray.Except.cs.meta │ │ │ ├── NativeArray.First.cs │ │ │ ├── NativeArray.First.cs.meta │ │ │ ├── NativeArray.GroupBy.cs │ │ │ ├── NativeArray.GroupBy.cs.meta │ │ │ ├── NativeArray.GroupJoin.cs │ │ │ ├── NativeArray.GroupJoin.cs.meta │ │ │ ├── NativeArray.Intersect.cs │ │ │ ├── NativeArray.Intersect.cs.meta │ │ │ ├── NativeArray.Job.cs │ │ │ ├── NativeArray.Job.cs.meta │ │ │ ├── NativeArray.Join.cs │ │ │ ├── NativeArray.Join.cs.meta │ │ │ ├── NativeArray.Last.cs │ │ │ ├── NativeArray.Last.cs.meta │ │ │ ├── NativeArray.LongCount.cs │ │ │ ├── NativeArray.LongCount.cs.meta │ │ │ ├── NativeArray.MaxMin.meta │ │ │ ├── NativeArray.MaxMin │ │ │ │ ├── NativeArray.MaxMin.cs │ │ │ │ ├── NativeArray.MaxMin.cs.meta │ │ │ │ ├── NativeArray.MaxMin.gen.cs │ │ │ │ ├── NativeArray.MaxMin.gen.cs.meta │ │ │ │ ├── NativeArray.MaxMin.tt │ │ │ │ └── NativeArray.MaxMin.tt.meta │ │ │ ├── NativeArray.OrderBy.cs │ │ │ ├── NativeArray.OrderBy.cs.meta │ │ │ ├── NativeArray.OrderByDescending.cs │ │ │ ├── NativeArray.OrderByDescending.cs.meta │ │ │ ├── NativeArray.Prepend.cs │ │ │ ├── NativeArray.Prepend.cs.meta │ │ │ ├── NativeArray.Reverse.cs │ │ │ ├── NativeArray.Reverse.cs.meta │ │ │ ├── NativeArray.Select.cs │ │ │ ├── NativeArray.Select.cs.meta │ │ │ ├── NativeArray.SelectMany.cs │ │ │ ├── NativeArray.SelectMany.cs.meta │ │ │ ├── NativeArray.SequenceEqual.cs │ │ │ ├── NativeArray.SequenceEqual.cs.meta │ │ │ ├── NativeArray.Single.cs │ │ │ ├── NativeArray.Single.cs.meta │ │ │ ├── NativeArray.Skip.cs │ │ │ ├── NativeArray.Skip.cs.meta │ │ │ ├── NativeArray.SkipWhile.cs │ │ │ ├── NativeArray.SkipWhile.cs.meta │ │ │ ├── NativeArray.Sum.meta │ │ │ ├── NativeArray.Sum │ │ │ │ ├── NativeArray.Sum.gen.cs │ │ │ │ ├── NativeArray.Sum.gen.cs.meta │ │ │ │ ├── NativeArray.Sum.tt │ │ │ │ └── NativeArray.Sum.tt.meta │ │ │ ├── NativeArray.Take.cs │ │ │ ├── NativeArray.Take.cs.meta │ │ │ ├── NativeArray.TakeWhile.cs │ │ │ ├── NativeArray.TakeWhile.cs.meta │ │ │ ├── NativeArray.ToNativeHashMap.cs │ │ │ ├── NativeArray.ToNativeHashMap.cs.meta │ │ │ ├── NativeArray.ToNativeHashSet.cs │ │ │ ├── NativeArray.ToNativeHashSet.cs.meta │ │ │ ├── NativeArray.ToNativeList.cs │ │ │ ├── NativeArray.ToNativeList.cs.meta │ │ │ ├── NativeArray.ToValueSequence.cs │ │ │ ├── NativeArray.ToValueSequence.cs.meta │ │ │ ├── NativeArray.Union.cs │ │ │ ├── NativeArray.Union.cs.meta │ │ │ ├── NativeArray.Where.cs │ │ │ ├── NativeArray.Where.cs.meta │ │ │ ├── NativeArray.Zip.cs │ │ │ └── NativeArray.Zip.cs.meta │ │ ├── Sequence.meta │ │ ├── Sequence │ │ │ ├── Sequence.Empty.cs │ │ │ ├── Sequence.Empty.cs.meta │ │ │ ├── Sequence.Range.cs │ │ │ ├── Sequence.Range.cs.meta │ │ │ ├── Sequence.Repeat.cs │ │ │ └── Sequence.Repeat.cs.meta │ │ ├── SequenceEnumerator.cs │ │ ├── SequenceEnumerator.cs.meta │ │ ├── UtilFunctions.cs │ │ ├── UtilFunctions.cs.meta │ │ ├── ValueGrouping.cs │ │ ├── ValueGrouping.cs.meta │ │ ├── ValueSequence.cs │ │ ├── ValueSequence.cs.meta │ │ ├── ValueSequence.meta │ │ └── ValueSequence │ │ │ ├── ValueSequence.Aggregate.cs │ │ │ ├── ValueSequence.Aggregate.cs.meta │ │ │ ├── ValueSequence.All.cs │ │ │ ├── ValueSequence.All.cs.meta │ │ │ ├── ValueSequence.Any.cs │ │ │ ├── ValueSequence.Any.cs.meta │ │ │ ├── ValueSequence.Append.cs │ │ │ ├── ValueSequence.Append.cs.meta │ │ │ ├── ValueSequence.Average.meta │ │ │ ├── ValueSequence.Average │ │ │ ├── ValueSequence.Average.gen.cs │ │ │ ├── ValueSequence.Average.gen.cs.meta │ │ │ ├── ValueSequence.Average.tt │ │ │ └── ValueSequence.Average.tt.meta │ │ │ ├── ValueSequence.CollectionJob.cs │ │ │ ├── ValueSequence.CollectionJob.cs.meta │ │ │ ├── ValueSequence.Concat.cs │ │ │ ├── ValueSequence.Concat.cs.meta │ │ │ ├── ValueSequence.Contains.cs │ │ │ ├── ValueSequence.Contains.cs.meta │ │ │ ├── ValueSequence.Count.cs │ │ │ ├── ValueSequence.Count.cs.meta │ │ │ ├── ValueSequence.DefaultIfEmpty.cs │ │ │ ├── ValueSequence.DefaultIfEmpty.cs.meta │ │ │ ├── ValueSequence.Distinct.cs │ │ │ ├── ValueSequence.Distinct.cs.meta │ │ │ ├── ValueSequence.ElementAt.cs │ │ │ ├── ValueSequence.ElementAt.cs.meta │ │ │ ├── ValueSequence.Except.cs │ │ │ ├── ValueSequence.Except.cs.meta │ │ │ ├── ValueSequence.First.cs │ │ │ ├── ValueSequence.First.cs.meta │ │ │ ├── ValueSequence.GroupBy.cs │ │ │ ├── ValueSequence.GroupBy.cs.meta │ │ │ ├── ValueSequence.GroupJoin.cs │ │ │ ├── ValueSequence.GroupJoin.cs.meta │ │ │ ├── ValueSequence.Intersect.cs │ │ │ ├── ValueSequence.Intersect.cs.meta │ │ │ ├── ValueSequence.Job.cs │ │ │ ├── ValueSequence.Job.cs.meta │ │ │ ├── ValueSequence.Join.cs │ │ │ ├── ValueSequence.Join.cs.meta │ │ │ ├── ValueSequence.Last.cs │ │ │ ├── ValueSequence.Last.cs.meta │ │ │ ├── ValueSequence.LongCount.cs │ │ │ ├── ValueSequence.LongCount.cs.meta │ │ │ ├── ValueSequence.MaxMin.meta │ │ │ ├── ValueSequence.MaxMin │ │ │ ├── ValueSequence.MaxMin.cs │ │ │ ├── ValueSequence.MaxMin.cs.meta │ │ │ ├── ValueSequence.MaxMin.gen.cs │ │ │ ├── ValueSequence.MaxMin.gen.cs.meta │ │ │ ├── ValueSequence.MaxMin.tt │ │ │ └── ValueSequence.MaxMin.tt.meta │ │ │ ├── ValueSequence.OrderBy.cs │ │ │ ├── ValueSequence.OrderBy.cs.meta │ │ │ ├── ValueSequence.OrderByDescending.cs │ │ │ ├── ValueSequence.OrderByDescending.cs.meta │ │ │ ├── ValueSequence.Prepend.cs │ │ │ ├── ValueSequence.Prepend.cs.meta │ │ │ ├── ValueSequence.Reverse.cs │ │ │ ├── ValueSequence.Reverse.cs.meta │ │ │ ├── ValueSequence.Select.cs │ │ │ ├── ValueSequence.Select.cs.meta │ │ │ ├── ValueSequence.SelectMany.cs │ │ │ ├── ValueSequence.SelectMany.cs.meta │ │ │ ├── ValueSequence.SequenceEqual.cs │ │ │ ├── ValueSequence.SequenceEqual.cs.meta │ │ │ ├── ValueSequence.Single.cs │ │ │ ├── ValueSequence.Single.cs.meta │ │ │ ├── ValueSequence.Skip.cs │ │ │ ├── ValueSequence.Skip.cs.meta │ │ │ ├── ValueSequence.SkipWhile.cs │ │ │ ├── ValueSequence.SkipWhile.cs.meta │ │ │ ├── ValueSequence.Sum.meta │ │ │ ├── ValueSequence.Sum │ │ │ ├── ValueSequence.Sum.gen.cs │ │ │ ├── ValueSequence.Sum.gen.cs.meta │ │ │ ├── ValueSequence.Sum.tt │ │ │ └── ValueSequence.Sum.tt.meta │ │ │ ├── ValueSequence.Take.cs │ │ │ ├── ValueSequence.Take.cs.meta │ │ │ ├── ValueSequence.TakeWhile.cs │ │ │ ├── ValueSequence.TakeWhile.cs.meta │ │ │ ├── ValueSequence.ThenBy.cs │ │ │ ├── ValueSequence.ThenBy.cs.meta │ │ │ ├── ValueSequence.ThenByDescending.cs │ │ │ ├── ValueSequence.ThenByDescending.cs.meta │ │ │ ├── ValueSequence.ToNativeArray.cs │ │ │ ├── ValueSequence.ToNativeArray.cs.meta │ │ │ ├── ValueSequence.ToNativeHashMap.cs │ │ │ ├── ValueSequence.ToNativeHashMap.cs.meta │ │ │ ├── ValueSequence.ToNativeHashSet.cs │ │ │ ├── ValueSequence.ToNativeHashSet.cs.meta │ │ │ ├── ValueSequence.ToNativeList.cs │ │ │ ├── ValueSequence.ToNativeList.cs.meta │ │ │ ├── ValueSequence.Union.cs │ │ │ ├── ValueSequence.Union.cs.meta │ │ │ ├── ValueSequence.Where.cs │ │ │ ├── ValueSequence.Where.cs.meta │ │ │ ├── ValueSequence.Zip.cs │ │ │ └── ValueSequence.Zip.cs.meta │ ├── Documentation~ │ │ ├── Blinq.md │ │ ├── Blinq.md.meta │ │ ├── images.meta │ │ └── images │ │ │ ├── .gitkeep │ │ │ ├── example.png │ │ │ └── example.png.meta │ ├── README.md │ ├── README.md.meta │ ├── package.json │ └── package.json.meta ├── manifest.json └── packages-lock.json ├── ProjectSettings ├── AudioManager.asset ├── BurstAotSettings_StandaloneWindows.json ├── ClusterInputManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── NavMeshAreas.asset ├── PackageManagerSettings.asset ├── Physics2DSettings.asset ├── PresetManager.asset ├── ProjectSettings.asset ├── ProjectVersion.txt ├── QualitySettings.asset ├── TagManager.asset ├── TimeManager.asset ├── UnityConnectSettings.asset ├── VFXManager.asset ├── VersionControlSettings.asset └── XRSettings.asset ├── README.md ├── UserSettings └── EditorUserSettings.asset └── scripts ├── coverageAssemblyFilters └── release /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 4 6 | charset = utf-8 7 | trim_trailing_whitespace = true 8 | insert_final_newline = true -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Convert CRLF to LF on checkout for bash scripts 2 | *.sh text eol=lf 3 | -------------------------------------------------------------------------------- /.github/workflows/activation.yaml: -------------------------------------------------------------------------------- 1 | name: Acquire Unity Activation File 2 | 3 | on: 4 | workflow_dispatch: 5 | inputs: 6 | unityVersion: 7 | description: 'Unity Version to request an activation file from.' 8 | required: true 9 | 10 | jobs: 11 | activation: 12 | name: Request manual activation file 🔑 13 | runs-on: ubuntu-latest 14 | steps: 15 | - name: Request manual activation file 16 | id: getManualLicenseFile 17 | uses: game-ci/unity-request-activation-file@v2.0-alpha-1 18 | with: 19 | unityVersion: ${{ github.event.inputs.unityVersion }} 20 | - name: Expose as artifact 21 | uses: actions/upload-artifact@v1 22 | with: 23 | name: ${{ steps.getManualLicenseFile.outputs.filePath }} 24 | path: ${{ steps.getManualLicenseFile.outputs.filePath }} 25 | -------------------------------------------------------------------------------- /.github/workflows/release.yaml: -------------------------------------------------------------------------------- 1 | name: Create Release 2 | 3 | on: 4 | push: 5 | branches: 6 | - master 7 | - pre 8 | - exp 9 | - '[0-9]+.[0-9]+.[0-9]+' 10 | - '[0-9]+.[0-9]+.x' 11 | - '[0-9]+.x.x' 12 | 13 | jobs: 14 | release: 15 | name: Release New Version 16 | runs-on: ubuntu-latest 17 | steps: 18 | - uses: actions/checkout@v2 19 | 20 | - name: Semantic release 21 | id: semantic 22 | uses: cycjimmy/semantic-release-action@v2.1.3 23 | with: 24 | extra_plugins: | 25 | @semantic-release/changelog 26 | @semantic-release/git 27 | env: 28 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 29 | 30 | - uses: actions/setup-node@v1 31 | with: 32 | node-version: '12.x' 33 | registry-url: 'https://npm.pkg.github.com' 34 | scope: '@careboo' 35 | 36 | - name: Publish to GitHub Package Repository 37 | if: steps.semantic.outputs.new_release_published == 'true' 38 | run: ./scripts/release 39 | env: 40 | NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} 41 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # This .gitignore file should be placed at the root of your Unity project directory 2 | # 3 | # Get latest from https://github.com/github/gitignore/blob/master/Unity.gitignore 4 | # 5 | /[Ll]ibrary/ 6 | /[Tt]emp/ 7 | /[Oo]bj/ 8 | /[Bb]uild/ 9 | /[Bb]uilds/ 10 | /[Ll]ogs/ 11 | /[Mm]emoryCaptures/ 12 | /[Cc]odeCoverage/ 13 | /ProjectSettings/Packages/ 14 | 15 | # Asset meta data should only be ignored when the corresponding asset is also ignored 16 | !/[Aa]ssets/**/*.meta 17 | 18 | # Uncomment this line if you wish to ignore the asset store tools plugin 19 | # /[Aa]ssets/AssetStoreTools* 20 | 21 | # Autogenerated Jetbrains Rider plugin 22 | [Aa]ssets/Plugins/Editor/JetBrains* 23 | 24 | # Visual Studio cache directory 25 | .vs/ 26 | 27 | # Visual Studio Code preferences 28 | .vscode/ 29 | 30 | # Gradle cache directory 31 | .gradle/ 32 | 33 | # Autogenerated VS/MD/Consulo solution and project files 34 | ExportedObj/ 35 | .consulo/ 36 | *.csproj 37 | *.unityproj 38 | *.sln 39 | *.suo 40 | *.tmp 41 | *.user 42 | *.userprefs 43 | *.pidb 44 | *.booproj 45 | *.svd 46 | *.pdb 47 | *.mdb 48 | *.opendb 49 | *.VC.db 50 | 51 | # Unity3D generated meta files 52 | *.pidb.meta 53 | *.pdb.meta 54 | *.mdb.meta 55 | 56 | # Unity3D generated file on crash reports 57 | sysinfo.txt 58 | 59 | # Builds 60 | *.apk 61 | *.unitypackage 62 | 63 | # Crashlytics generated file 64 | crashlytics-build.properties 65 | Documentation~.meta 66 | -------------------------------------------------------------------------------- /.releaserc.json: -------------------------------------------------------------------------------- 1 | { 2 | "tagFormat": "v${version}", 3 | "plugins": [ 4 | [ 5 | "@semantic-release/commit-analyzer", 6 | { 7 | "preset": "angular" 8 | } 9 | ], 10 | "@semantic-release/release-notes-generator", 11 | [ 12 | "@semantic-release/changelog", 13 | { 14 | "preset": "angular", 15 | "changelogFile": "Packages/com.careboo.blinq/CHANGELOG.md" 16 | } 17 | ], 18 | [ 19 | "@semantic-release/npm", 20 | { 21 | "npmPublish": false, 22 | "pkgRoot": "Packages/com.careboo.blinq" 23 | } 24 | ], 25 | [ 26 | "@semantic-release/git", 27 | { 28 | "assets": [ 29 | "Packages/com.careboo.blinq/package.json", 30 | "Packages/com.careboo.blinq/CHANGELOG.md" 31 | ], 32 | "message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}" 33 | } 34 | ], 35 | "@semantic-release/github" 36 | ], 37 | "branches": [ 38 | "+([0-9])?(.{+([0-9]),x}).x", 39 | "master", 40 | { 41 | "name": "pre", 42 | "prerelease": true 43 | }, 44 | { 45 | "name": "exp", 46 | "prerelease": true 47 | } 48 | ] 49 | } -------------------------------------------------------------------------------- /Assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CareBoo/Blinq/e74f89251b56d7b1d374afed01a5b58fa2f49059/Assets/.gitkeep -------------------------------------------------------------------------------- /Assets/Demo.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 917204bf67496814b8a3aaa5a60614a7 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Assets/DemoBehaviour.cs: -------------------------------------------------------------------------------- 1 | using Unity.Jobs; 2 | using UnityEngine; 3 | using CareBoo.Blinq; 4 | using Unity.Collections; 5 | using CareBoo.Burst.Delegates; 6 | using Unity.Burst; 7 | 8 | public class DemoBehaviour : MonoBehaviour 9 | { 10 | [BurstCompile] 11 | public struct SelectJob : IJob 12 | where TSelector : struct, IFunc 13 | { 14 | [ReadOnly] 15 | public NativeArray Source; 16 | 17 | public ValueFunc.Struct Selector; 18 | 19 | [WriteOnly] 20 | public NativeArray Output; 21 | 22 | public void Execute() 23 | { 24 | Source.Select(Selector).ToNativeArray(ref Output); 25 | } 26 | } 27 | 28 | public struct AddOne : IFunc 29 | { 30 | public long Invoke(int val) => val + 1; 31 | } 32 | 33 | NativeArray source; 34 | 35 | void Awake() 36 | { 37 | source = new NativeArray(new int[] { 1, 2, 3 }, Allocator.Persistent); 38 | } 39 | 40 | void Start() 41 | { 42 | var output = new NativeArray(source.Length, Allocator.Persistent); 43 | var job = new SelectJob { Source = source, Selector = ValueFunc.New(), Output = output }; 44 | job.Run(); 45 | Debug.Log($"output: ({string.Join(",", output)})"); 46 | output.Dispose(); 47 | } 48 | 49 | void OnDestroy() 50 | { 51 | source.Dispose(); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /Assets/DemoBehaviour.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 65c5fed5767a5aa4b8bfbf91f713386e 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 CareBoo 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CHANGELOG.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e6909f772cb4f994fa675b3f852eca97 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.PerformanceTests.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1a02ee764b0b7f043bd6f2b4a57f4fd9 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.PerformanceTests/AggregatePerformanceTest.cs: -------------------------------------------------------------------------------- 1 | using CareBoo.Burst.Delegates; 2 | using Unity.Burst; 3 | using Unity.Collections; 4 | using Unity.Jobs; 5 | using Linq = System.Linq.Enumerable; 6 | using Blinq = CareBoo.Blinq.Sequence; 7 | using NUnit.Framework; 8 | using static ValueFuncs; 9 | using Unity.PerformanceTesting; 10 | 11 | [BurstCompile] 12 | internal struct AggregateJob : IJob 13 | where TFunc : struct, IFunc 14 | where TResultSelector : struct, IFunc 15 | { 16 | [ReadOnly] 17 | public NativeArray Source; 18 | 19 | public ValueFunc.Struct Func; 20 | 21 | public ValueFunc.Struct ResultSelector; 22 | 23 | public void Execute() 24 | { 25 | Blinq.Aggregate(Source, 0, Func, ResultSelector); 26 | } 27 | } 28 | 29 | internal class AggregatePerformanceTest : BaseBlinqPerformanceTest 30 | { 31 | [Test, Performance, Category("Performance")] 32 | public void BlinqNativeSequence() 33 | { 34 | MeasureBlinq(() => new AggregateJob { Source = source, Func = Sum, ResultSelector = IntToLong }.Run()).Run(); 35 | } 36 | 37 | [Test, Performance, Category("Performance")] 38 | public void LinqNativeSequence() 39 | { 40 | MeasureLinq(() => Linq.Aggregate(source, 0, Sum.Invoke, IntToLong.Invoke)).Run(); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.PerformanceTests/AggregatePerformanceTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e2bc4ec0818e01a40bedfd7480712462 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.PerformanceTests/AllPerformanceTest.cs: -------------------------------------------------------------------------------- 1 | using CareBoo.Burst.Delegates; 2 | using Unity.Burst; 3 | using Unity.Collections; 4 | using Unity.Jobs; 5 | using Linq = System.Linq.Enumerable; 6 | using Blinq = CareBoo.Blinq.Sequence; 7 | using NUnit.Framework; 8 | using static ValueFuncs; 9 | using Unity.PerformanceTesting; 10 | 11 | [BurstCompile] 12 | internal struct AllJob : IJob 13 | where TPredicate : struct, IFunc 14 | { 15 | [ReadOnly] 16 | public NativeArray Source; 17 | 18 | public ValueFunc.Struct Predicate; 19 | 20 | public void Execute() 21 | { 22 | Blinq.All(Source, Predicate); 23 | } 24 | } 25 | 26 | internal class AllPerformanceTest : BaseBlinqPerformanceTest 27 | { 28 | [Test, Performance, Category("Performance")] 29 | public void BlinqNativeSequence() 30 | { 31 | MeasureBlinq(() => new AllJob { Source = source, Predicate = GreaterThanOrEqualToZero }.Run()).Run(); 32 | } 33 | 34 | [Test, Performance, Category("Performance")] 35 | public void LinqNativeSequence() 36 | { 37 | MeasureLinq(() => Linq.All(source, GreaterThanOrEqualToZero.Invoke)).Run(); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.PerformanceTests/AllPerformanceTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f49788e94e3f2164b8cbe30da8a4111b 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.PerformanceTests/AnyPerformanceTest.cs: -------------------------------------------------------------------------------- 1 | using NUnit.Framework; 2 | using Unity.PerformanceTesting; 3 | using Linq = System.Linq.Enumerable; 4 | using Blinq = CareBoo.Blinq.Sequence; 5 | using static ValueFuncs; 6 | using Unity.Burst; 7 | using Unity.Collections; 8 | using Unity.Jobs; 9 | using CareBoo.Burst.Delegates; 10 | 11 | [BurstCompile] 12 | internal struct AnyJob : IJob 13 | where TPredicate : struct, IFunc 14 | { 15 | [ReadOnly] 16 | public NativeArray Source; 17 | 18 | [ReadOnly] 19 | public ValueFunc.Struct Predicate; 20 | 21 | public void Execute() 22 | { 23 | Blinq.Any(Source, Predicate); 24 | } 25 | } 26 | 27 | internal class AnyPerformanceTest : BaseBlinqPerformanceTest 28 | { 29 | [Test, Performance] 30 | [Category("Performance")] 31 | public void BlinqAnyNativeSequence() 32 | { 33 | bool result; 34 | 35 | MeasureBlinq(() => result = Blinq.Any(source)).Run(); 36 | } 37 | 38 | [Test, Performance] 39 | [Category("Performance")] 40 | public void LinqAnyNativeSequence() 41 | { 42 | bool result; 43 | 44 | MeasureLinq(() => result = Linq.Any(source)).Run(); 45 | } 46 | 47 | 48 | [Test, Performance] 49 | [Category("Performance")] 50 | public void BlinqAnyPredicateNativeSequence() 51 | { 52 | MeasureBlinq(() => new AnyJob { Source = source, Predicate = EqualsOne }.Run()).Run(); 53 | } 54 | 55 | [Test, Performance] 56 | [Category("Performance")] 57 | public void LinqAnyPredicateNativeSequence() 58 | { 59 | bool result; 60 | 61 | MeasureLinq(() => result = Linq.Any(source, EqualsOne.Invoke)).Run(); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.PerformanceTests/AnyPerformanceTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e167847c3b89bc94593c1143a089ef4a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.PerformanceTests/AppendPerformanceTest.cs: -------------------------------------------------------------------------------- 1 | using NUnit.Framework; 2 | using Unity.PerformanceTesting; 3 | using Linq = System.Linq.Enumerable; 4 | using Blinq = CareBoo.Blinq.Sequence; 5 | using Unity.Jobs; 6 | using Unity.Burst; 7 | using Unity.Collections; 8 | 9 | [BurstCompile] 10 | internal struct AppendJob : IJob 11 | { 12 | [ReadOnly] 13 | public NativeArray Source; 14 | 15 | public int Item; 16 | 17 | public void Execute() 18 | { 19 | var result = Blinq.Append(Source, Item).ToNativeList(Allocator.Temp); 20 | result.Dispose(); 21 | } 22 | } 23 | 24 | internal class AppendPerformanceTest : BaseBlinqPerformanceTest 25 | { 26 | [Test, Performance, Category("Performance")] 27 | public void BlinqNativeSequence() 28 | { 29 | var item = 32; 30 | MeasureBlinq(() => new AppendJob { Source = source, Item = item }.Run()).Run(); 31 | } 32 | 33 | [Test, Performance, Category("Performance")] 34 | public void LinqNativeSequence() 35 | { 36 | var item = 32; 37 | MeasureLinq(() => Linq.ToList(Linq.Append(source, item))).Run(); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.PerformanceTests/AppendPerformanceTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 06cd897986c87ac48a504b8b0784417a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.PerformanceTests/AveragePerformanceTest.gen.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 99a5a6afab7258e4ebec60a6c97cada2 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.PerformanceTests/AveragePerformanceTest.tt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9310f4b858465c84ea6b9766f71a6386 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.PerformanceTests/BaseBlinqPerformanceTest.cs: -------------------------------------------------------------------------------- 1 |  2 | using System; 3 | using NUnit.Framework; 4 | using Unity.Collections; 5 | using Unity.PerformanceTesting; 6 | using Unity.PerformanceTesting.Measurements; 7 | 8 | internal class BaseBlinqPerformanceTest 9 | { 10 | protected const int NumElements = 16 << 10; 11 | protected NativeArray source; 12 | 13 | [OneTimeSetUp] 14 | public virtual void SetUpSource() 15 | { 16 | var arr = new int[NumElements]; 17 | for (var i = 0; i < NumElements; i++) 18 | arr[i] = NumElements - 1 - i; 19 | source = new NativeArray(arr, Allocator.Persistent); 20 | } 21 | 22 | [OneTimeTearDown] 23 | public virtual void TearDownSource() 24 | { 25 | source.Dispose(); 26 | } 27 | 28 | protected MethodMeasurement MeasureLinq(Action method) 29 | { 30 | return MakeMeasurement(method, "Linq"); 31 | } 32 | 33 | protected MethodMeasurement MeasureBlinq(Action method) 34 | { 35 | return MakeMeasurement(method, "Blinq"); 36 | } 37 | 38 | protected MethodMeasurement MakeMeasurement(Action method, string name) 39 | { 40 | return Measure.Method(method) 41 | .SampleGroup(name) 42 | .WarmupCount(100) 43 | .MeasurementCount(20) 44 | .IterationsPerMeasurement(100) 45 | .GC(); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.PerformanceTests/BaseBlinqPerformanceTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ea75c62ba87950541942baf3f2d422b8 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.PerformanceTests/CareBoo.Blinq.Performance.Tests.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "CareBoo.Blinq.Performance.Tests", 3 | "references": [ 4 | "CareBoo.Blinq", 5 | "UnityEditor.TestRunner", 6 | "UnityEngine.TestRunner", 7 | "Unity.PerformanceTesting", 8 | "CareBoo.Blinq.Tests", 9 | "Unity.Collections", 10 | "Unity.Burst", 11 | "CareBoo.Burst.Delegates", 12 | "Unity.Mathematics" 13 | ], 14 | "includePlatforms": [], 15 | "excludePlatforms": [], 16 | "allowUnsafeCode": false, 17 | "overrideReferences": true, 18 | "precompiledReferences": [ 19 | "nunit.framework.dll" 20 | ], 21 | "autoReferenced": false, 22 | "defineConstraints": [ 23 | "UNITY_INCLUDE_TESTS" 24 | ], 25 | "versionDefines": [], 26 | "noEngineReferences": false 27 | } -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.PerformanceTests/CareBoo.Blinq.Performance.Tests.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6eef2f57a22baef4cb6ce041e4bfedc6 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.PerformanceTests/ConcatPerformanceTest.cs: -------------------------------------------------------------------------------- 1 | using NUnit.Framework; 2 | using Unity.PerformanceTesting; 3 | using Linq = System.Linq.Enumerable; 4 | using Blinq = CareBoo.Blinq.Sequence; 5 | using Unity.Collections; 6 | 7 | internal class ConcatPerformanceTest : BaseBlinqPerformanceTest 8 | { 9 | [Test, Performance, Category("Performance")] 10 | public void BlinqNativeSequence() 11 | { 12 | var second = new NativeArray(source, Allocator.Persistent); 13 | MeasureBlinq(() => 14 | { 15 | var concat = Blinq.RunToNativeList(Blinq.Concat(in source, in second), Allocator.Persistent); 16 | concat.Dispose(); 17 | }).Run(); 18 | second.Dispose(); 19 | } 20 | 21 | [Test, Performance, Category("Performance")] 22 | public void LinqNativeSequence() 23 | { 24 | var second = new NativeArray(source, Allocator.Persistent); 25 | MeasureLinq(() => Linq.ToList(Linq.Concat(source, second))).Run(); 26 | second.Dispose(); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.PerformanceTests/ConcatPerformanceTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 07631849fdc927b4a81e434c08bedba1 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.PerformanceTests/ContainsPerformanceTest.cs: -------------------------------------------------------------------------------- 1 | using NUnit.Framework; 2 | using Unity.PerformanceTesting; 3 | using Linq = System.Linq.Enumerable; 4 | using Blinq = CareBoo.Blinq.Sequence; 5 | using Unity.Jobs; 6 | using Unity.Burst; 7 | using Unity.Collections; 8 | using static ValueFuncs; 9 | using CareBoo.Burst.Delegates; 10 | 11 | [BurstCompile] 12 | internal struct ArrayContainsJob : IJob 13 | { 14 | [ReadOnly] 15 | public NativeArray Source; 16 | 17 | public int Item; 18 | 19 | public void Execute() 20 | { 21 | Blinq.Contains(Source, Item); 22 | } 23 | } 24 | 25 | [BurstCompile] 26 | internal struct SequenceContainsJob : IJob 27 | { 28 | [ReadOnly] 29 | public NativeArray Source; 30 | 31 | public int Item; 32 | 33 | public void Execute() 34 | { 35 | Blinq.Contains(Blinq.ToValueSequence(Source), Item); 36 | } 37 | } 38 | 39 | internal class ContainsPerformanceTest : BaseBlinqPerformanceTest 40 | { 41 | const int item = 100000; 42 | 43 | [Test, Performance, Category("Performance")] 44 | public void BlinqEquatableNativeSequence() 45 | { 46 | MakeMeasurement(() => new SequenceContainsJob { Source = source, Item = item }.Run(), "Blinq_Sequence").Run(); 47 | } 48 | 49 | [Test, Performance, Category("Performance")] 50 | public void BlinqEquatableNativeArray() 51 | { 52 | MakeMeasurement(() => new ArrayContainsJob { Source = source, Item = item }.Run(), "Blinq_Array").Run(); 53 | } 54 | 55 | [Test, Performance, Category("Performance")] 56 | public void LinqEquatableNativeArray() 57 | { 58 | MeasureLinq(() => Linq.Contains(source, item)).Run(); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.PerformanceTests/ContainsPerformanceTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: df83fca347fd2b7468cc785a9cc4ca4b 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.PerformanceTests/CountPerformanceTest.cs: -------------------------------------------------------------------------------- 1 | using NUnit.Framework; 2 | using Unity.PerformanceTesting; 3 | using Linq = System.Linq.Enumerable; 4 | using Blinq = CareBoo.Blinq.Sequence; 5 | using static ValueFuncs; 6 | using CareBoo.Blinq; 7 | 8 | internal class CountPerformanceTest : BaseBlinqPerformanceTest 9 | { 10 | [Test, Performance, Category("Performance")] 11 | public void BlinqArrayPredicate() 12 | { 13 | MakeMeasurement(() => Blinq.RunCount(in source, EqualsZero), "Blinq_Array").Run(); 14 | } 15 | 16 | [Test, Performance, Category("Performance")] 17 | public void BlinqSequencePredicate() 18 | { 19 | var sourceSequence = source.ToValueSequence(); 20 | MakeMeasurement(() => Blinq.RunCount(in sourceSequence, EqualsZero), "Blinq_Sequence").Run(); 21 | } 22 | 23 | [Test, Performance, Category("Performance")] 24 | public void LinqArrayPredicate() 25 | { 26 | MakeMeasurement(() => Linq.Count(source, EqualsZero.Invoke), "Linq").Run(); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.PerformanceTests/CountPerformanceTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9d9d1b7472cbed64488fd98b963f64af 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.PerformanceTests/DistinctPerformanceTest.cs: -------------------------------------------------------------------------------- 1 | using NUnit.Framework; 2 | using Unity.PerformanceTesting; 3 | using Linq = System.Linq.Enumerable; 4 | using Blinq = CareBoo.Blinq.Sequence; 5 | using Unity.Jobs; 6 | using Unity.Burst; 7 | using Unity.Collections; 8 | 9 | [BurstCompile] 10 | internal struct DistinctPerformanceJob : IJob 11 | { 12 | [ReadOnly] 13 | public NativeArray Source; 14 | 15 | public void Execute() 16 | { 17 | var result = Blinq.Distinct(Source).ToNativeList(Allocator.Temp); 18 | result.Dispose(); 19 | } 20 | } 21 | 22 | internal class DistinctPerformanceTest : BaseBlinqPerformanceTest 23 | { 24 | [Test, Performance, Category("Performance")] 25 | public void BlinqSequence() 26 | { 27 | MakeMeasurement(() => new DistinctPerformanceJob { Source = source }.Run(), "Blinq").Run(); 28 | } 29 | 30 | [Test, Performance, Category("Performance")] 31 | public void LinqSequence() 32 | { 33 | MakeMeasurement(() => Linq.ToList(Linq.Distinct(source)), "Linq").Run(); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.PerformanceTests/DistinctPerformanceTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5db73ff8bd368214782b9478ccecb29e 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.PerformanceTests/EnumerableValues.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Unity.Collections; 3 | using LinqEnumerable = System.Linq.Enumerable; 4 | 5 | internal class EnumerableValues 6 | { 7 | public const int NumElements = 16 << 10; 8 | 9 | public static int[] GetZeroedIntArray() 10 | { 11 | return new int[NumElements]; 12 | } 13 | 14 | public static List GetZeroedIntList() 15 | { 16 | return LinqEnumerable.ToList(GetZeroedIntArray()); 17 | } 18 | 19 | public static NativeArray GetZeroedIntNativeArray(Allocator allocator) 20 | { 21 | return new NativeArray(GetZeroedIntArray(), allocator); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.PerformanceTests/EnumerableValues.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f6fe3463a69ab184dad564064f533a06 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.PerformanceTests/ExceptPerformanceTest.cs: -------------------------------------------------------------------------------- 1 | using NUnit.Framework; 2 | using Unity.PerformanceTesting; 3 | using Linq = System.Linq.Enumerable; 4 | using Blinq = CareBoo.Blinq.Sequence; 5 | using Unity.Jobs; 6 | using Unity.Burst; 7 | using Unity.Collections; 8 | using static ValueFuncs; 9 | using CareBoo.Burst.Delegates; 10 | 11 | [BurstCompile] 12 | internal struct ExceptPerformanceJob : IJob 13 | { 14 | [ReadOnly] 15 | public NativeArray Source; 16 | 17 | [ReadOnly] 18 | public NativeArray Second; 19 | 20 | public void Execute() 21 | { 22 | var result = Blinq.Except(Source, Second).ToNativeList(Allocator.Temp); 23 | result.Dispose(); 24 | } 25 | } 26 | 27 | internal class ExceptPerformanceTest : BaseBlinqPerformanceTest 28 | { 29 | [Test, Performance, Category("Performance")] 30 | public void BlinqSequence() 31 | { 32 | MakeMeasurement(() => new ExceptPerformanceJob { Source = source, Second = source }.Run(), "Blinq").Run(); 33 | } 34 | 35 | [Test, Performance, Category("Performance")] 36 | public void LinqSequence() 37 | { 38 | MakeMeasurement(() => Linq.ToList(Linq.Except(source, source)), "Linq").Run(); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.PerformanceTests/ExceptPerformanceTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7d5df4c9f20796e46952e7050eeabcdf 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.PerformanceTests/FirstPerformanceTest.cs: -------------------------------------------------------------------------------- 1 | using NUnit.Framework; 2 | using Unity.PerformanceTesting; 3 | using Linq = System.Linq.Enumerable; 4 | using Blinq = CareBoo.Blinq.Sequence; 5 | using Unity.Jobs; 6 | using Unity.Burst; 7 | using Unity.Collections; 8 | using static ValueFuncs; 9 | using CareBoo.Burst.Delegates; 10 | 11 | [BurstCompile] 12 | internal struct FirstPerformanceJob : IJob 13 | { 14 | [ReadOnly] 15 | public NativeArray Source; 16 | 17 | public void Execute() 18 | { 19 | Blinq.First(Source); 20 | } 21 | } 22 | 23 | internal class FirstPerformanceTest : BaseBlinqPerformanceTest 24 | { 25 | [Test, Performance, Category("Performance")] 26 | public void BlinqArrayDotnet() 27 | { 28 | MakeMeasurement(() => Blinq.First(source), "Blinq_Dotnet").Run(); 29 | } 30 | 31 | [Test, Performance, Category("Performance")] 32 | public void BlinqArrayBurstJob() 33 | { 34 | MakeMeasurement(() => new FirstPerformanceJob { Source = source }.Run(), "Blinq_BurstJob").Run(); 35 | } 36 | 37 | [Test, Performance, Category("Performance")] 38 | public void LinqArray() 39 | { 40 | MakeMeasurement(() => Linq.First(source), "Linq").Run(); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.PerformanceTests/FirstPerformanceTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1f78bd22c301a7e4db7a9d2c826ff39f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.PerformanceTests/GroupByPerformanceTest.cs: -------------------------------------------------------------------------------- 1 | using NUnit.Framework; 2 | using Unity.PerformanceTesting; 3 | using Linq = System.Linq.Enumerable; 4 | using Blinq = CareBoo.Blinq.Sequence; 5 | using Unity.Jobs; 6 | using Unity.Burst; 7 | using Unity.Collections; 8 | using static ValueFuncs; 9 | using CareBoo.Burst.Delegates; 10 | using System.Collections.Generic; 11 | using CareBoo.Blinq; 12 | 13 | [BurstCompile] 14 | internal struct GroupByPerformanceJob : IJob 15 | where TKeySelector : struct, IFunc 16 | where TResultSelector : struct, IFunc, int> 17 | { 18 | [ReadOnly] 19 | public NativeArray Source; 20 | 21 | public ValueFunc.Struct KeySelector; 22 | 23 | public ValueFunc, int>.Struct ResultSelector; 24 | 25 | public void Execute() 26 | { 27 | var result = Blinq.GroupBy(Source, KeySelector, ResultSelector).ToNativeList(Allocator.Temp); 28 | result.Dispose(); 29 | } 30 | } 31 | 32 | internal class GroupByPerformanceTest : BaseBlinqPerformanceTest 33 | { 34 | int GroupByLinqSelector(int key, IEnumerable values) 35 | { 36 | return key + Linq.Count(values); 37 | } 38 | 39 | [Test, Performance, Category("Performance")] 40 | public void BlinqArray() 41 | { 42 | MakeMeasurement(() => new GroupByPerformanceJob, Functions.SelectGrouping> { Source = source }.Run(), "Blinq").Run(); 43 | } 44 | 45 | [Test, Performance, Category("Performance")] 46 | public void LinqArray() 47 | { 48 | MakeMeasurement(() => Linq.ToList(Linq.GroupBy(source, SelectSelf().Invoke, GroupByLinqSelector)), "Linq").Run(); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.PerformanceTests/GroupByPerformanceTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 99f9c8406be174c4cb21920a0223978c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.PerformanceTests/GroupJoinPerformanceTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6a9c8442f9e1c5b43a1ebe9bc37e57db 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.PerformanceTests/SelectPerformanceTest.cs: -------------------------------------------------------------------------------- 1 | using NUnit.Framework; 2 | using Unity.PerformanceTesting; 3 | using Linq = System.Linq.Enumerable; 4 | using Blinq = CareBoo.Blinq.Sequence; 5 | using Unity.Jobs; 6 | using Unity.Burst; 7 | using Unity.Collections; 8 | using static ValueFuncs; 9 | using CareBoo.Burst.Delegates; 10 | 11 | [BurstCompile] 12 | internal struct SelectJob : IJob 13 | where TSelector : struct, IFunc 14 | { 15 | [ReadOnly] 16 | public NativeArray Source; 17 | [ReadOnly] 18 | public ValueFunc.Struct Selector; 19 | 20 | public void Execute() 21 | { 22 | var result = Blinq.Select(Source, Selector).ToNativeList(Allocator.Temp); 23 | result.Dispose(); 24 | } 25 | } 26 | 27 | internal class SelectPerformanceTest : BaseBlinqPerformanceTest 28 | { 29 | [Test, Performance, Category("Performance")] 30 | public void BlinqSequence() 31 | { 32 | MeasureBlinq(() => new SelectJob { Source = source, Selector = IntToLong }.Run()).Run(); 33 | } 34 | 35 | [Test, Performance, Category("Performance")] 36 | public void LinqSequence() 37 | { 38 | MeasureLinq(() => Linq.ToList(Linq.Select(source, IntToLong.Invoke))).Run(); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.PerformanceTests/SelectPerformanceTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7b3d641067cef724b805fdfdc00e8cbe 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.Tests.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3b350ced4ef9a514bab21712a7edb94f 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.Tests/AggregateTest.cs: -------------------------------------------------------------------------------- 1 | using NUnit.Framework; 2 | using Linq = System.Linq.Enumerable; 3 | using static Utils; 4 | using Blinq = CareBoo.Blinq.Sequence; 5 | using Unity.Collections; 6 | using static ValueFuncs; 7 | 8 | internal class AggregateTest 9 | { 10 | [Test, Parallelizable, Timeout(5000)] 11 | public void BlinqShouldEqualLinqNativeArrayAggregateWithAccumulateAndResult([ArrayValues] int[] sourceArr) 12 | { 13 | var source = new NativeArray(sourceArr, Allocator.Persistent); 14 | var expected = ExceptionAndValue(() => Linq.Aggregate( 15 | source, 16 | 0, 17 | LongSum.Invoke, 18 | LongToDouble.Invoke 19 | )); 20 | var actual = ExceptionAndValue(() => Blinq.Aggregate(source, 0, LongSum, LongToDouble)); 21 | AssertAreEqual(expected, actual); 22 | source.Dispose(); 23 | } 24 | 25 | [Test, Parallelizable, Timeout(5000)] 26 | public void BlinqShouldEqualLinqNativeArrayAggregateWithAccumulate([ArrayValues] int[] sourceArr) 27 | { 28 | var source = new NativeArray(sourceArr, Allocator.Persistent); 29 | var expected = ExceptionAndValue(() => Linq.Aggregate( 30 | source, 31 | 0, 32 | LongSum.Invoke 33 | )); 34 | var actual = ExceptionAndValue(() => Blinq.Aggregate(source, 0, LongSum)); 35 | AssertAreEqual(expected, actual); 36 | source.Dispose(); 37 | } 38 | 39 | [Test, Parallelizable, Timeout(5000)] 40 | public void BlinqShouldEqualLinqNativeArrayAggregate([ArrayValues] int[] sourceArr) 41 | { 42 | var source = new NativeArray(sourceArr, Allocator.Persistent); 43 | var expected = ExceptionAndValue(() => Linq.Aggregate( 44 | source, 45 | Sum.Invoke 46 | )); 47 | var actual = ExceptionAndValue(() => Blinq.Aggregate(source, Sum)); 48 | AssertAreEqual(expected, actual); 49 | source.Dispose(); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.Tests/AggregateTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cfef06ca3711a634d8ce919e796a05e0 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.Tests/AllTest.cs: -------------------------------------------------------------------------------- 1 | using NUnit.Framework; 2 | using Linq = System.Linq.Enumerable; 3 | using static Utils; 4 | using static ValueFuncs; 5 | using Unity.Collections; 6 | using Blinq = CareBoo.Blinq.Sequence; 7 | 8 | internal class AllTest 9 | { 10 | [Test, Parallelizable, Timeout(5000)] 11 | public void BlinqAllShouldEqualLinqNativeArrayAll([ArrayValues] int[] sourceArr) 12 | { 13 | var source = new NativeArray(sourceArr, Allocator.Persistent); 14 | var expected = ExceptionAndValue(() => Linq.All(source, EqualsZero.Invoke)); 15 | var actual = ExceptionAndValue(() => Blinq.All(source, EqualsZero)); 16 | AssertAreEqual(expected, actual); 17 | source.Dispose(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.Tests/AllTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 315568e49725add4e8c73767da942218 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.Tests/AnyTest.cs: -------------------------------------------------------------------------------- 1 | using NUnit.Framework; 2 | using Linq = System.Linq.Enumerable; 3 | using static Utils; 4 | using static ValueFuncs; 5 | using Unity.Collections; 6 | using Blinq = CareBoo.Blinq.Sequence; 7 | 8 | internal class AnyTest 9 | { 10 | [Test, Parallelizable, Timeout(5000)] 11 | public void BlinqShouldEqualLinqNativeArrayAny([ArrayValues] int[] sourceArr) 12 | { 13 | var source = new NativeArray(sourceArr, Allocator.Persistent); 14 | var expected = ExceptionAndValue(() => Linq.Any(source)); 15 | var actual = ExceptionAndValue(() => Blinq.Any(source)); 16 | AssertAreEqual(expected, actual); 17 | source.Dispose(); 18 | } 19 | 20 | [Test, Parallelizable, Timeout(5000)] 21 | public void BlinqShouldEqualLinqNativeArrayAnyPredicate([ArrayValues] int[] sourceArr) 22 | { 23 | var source = new NativeArray(sourceArr, Allocator.Persistent); 24 | var expected = ExceptionAndValue(() => Linq.Any(source, EqualsZero.Invoke)); 25 | var actual = ExceptionAndValue(() => Blinq.Any(source, EqualsZero)); 26 | AssertAreEqual(expected, actual); 27 | source.Dispose(); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.Tests/AnyTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8ca52f7ddd9adf24da5d22dc2bb9a214 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.Tests/AppendTest.cs: -------------------------------------------------------------------------------- 1 | using NUnit.Framework; 2 | using Linq = System.Linq.Enumerable; 3 | using static Utils; 4 | using Unity.Collections; 5 | using Blinq = CareBoo.Blinq.Sequence; 6 | using CareBoo.Blinq; 7 | 8 | internal class AppendTest 9 | { 10 | [Test, Parallelizable, Timeout(5000)] 11 | public void BlinqShouldEqualLinqNativeArrayAppend([ArrayValues] int[] sourceArr) 12 | { 13 | int item = 1; 14 | var source = new NativeArray(sourceArr, Allocator.Persistent); 15 | var expected = ExceptionAndValue(() => Linq.ToArray(Linq.Append(source, item))); 16 | var actual = ExceptionAndValue(() => Linq.ToArray(Blinq.Append(source, item))); 17 | AssertAreEqual(expected, actual); 18 | source.Dispose(); 19 | } 20 | 21 | [Test, Parallelizable, Timeout(5000)] 22 | public void BlinqShouldEqualLinqValueSequenceAppend([ArrayValues] int[] sourceArr) 23 | { 24 | int item = 1; 25 | var sourceNativeArr = new NativeArray(sourceArr, Allocator.Persistent); 26 | var source = sourceNativeArr.ToValueSequence(); 27 | var expected = ExceptionAndValue(() => Linq.ToArray(Linq.Append(source, item))); 28 | var actual = ExceptionAndValue(() => Linq.ToArray(Blinq.Append(source, item))); 29 | AssertAreEqual(expected, actual); 30 | sourceNativeArr.Dispose(); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.Tests/AppendTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: eaa6f1daff158c643813c376e1b09ff4 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.Tests/ArrayValues.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Linq; 4 | using NUnit.Framework; 5 | 6 | [AttributeUsage(AttributeTargets.Parameter, AllowMultiple = true, Inherited = false)] 7 | internal class ArrayValuesAttribute : ValueSourceAttribute 8 | { 9 | public ArrayValuesAttribute() : 10 | base(typeof(ArrayValues), nameof(ArrayValues.Values)) 11 | { } 12 | } 13 | 14 | internal class ArrayValues 15 | { 16 | public static IEnumerable Values 17 | { 18 | get 19 | { 20 | yield return Enumerable.Range(0, 10).ToArray(); 21 | yield return Enumerable.Range(0, 0).ToArray(); 22 | yield return Enumerable.Range(0, 10).Concat(Enumerable.Range(0, 10)).ToArray(); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.Tests/ArrayValues.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9e359fd8d5c766c4e8d2edc9527588c8 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.Tests/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.CompilerServices; 2 | 3 | [assembly: InternalsVisibleTo("CareBoo.Blinq.Performance.Tests")] 4 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.Tests/AssemblyInfo.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f1fe0e0852c487a409c1f431bf049428 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.Tests/AverageTest.gen.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3b7a594f605af964386eafd5ec34d522 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.Tests/AverageTest.tt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4850ca43f9a645d4fbf36dc0c38aa11d 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.Tests/CareBoo.Blinq.Tests.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "CareBoo.Blinq.Tests", 3 | "references": [ 4 | "CareBoo.Blinq", 5 | "UnityEngine.TestRunner", 6 | "UnityEditor.TestRunner", 7 | "Unity.Collections", 8 | "Unity.Burst", 9 | "Unity.Mathematics", 10 | "CareBoo.Burst.Delegates" 11 | ], 12 | "includePlatforms": [], 13 | "excludePlatforms": [], 14 | "allowUnsafeCode": true, 15 | "overrideReferences": true, 16 | "precompiledReferences": [ 17 | "nunit.framework.dll" 18 | ], 19 | "autoReferenced": false, 20 | "defineConstraints": [ 21 | "UNITY_INCLUDE_TESTS" 22 | ], 23 | "versionDefines": [], 24 | "noEngineReferences": false 25 | } -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.Tests/CareBoo.Blinq.Tests.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 576ce965b74219349bdda6698ff63bf7 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.Tests/ConcatTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7efe025b3ef642d4c94ae1c6f29746ed 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.Tests/ContainsTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 25825478aa994114a86c0cc465890cb8 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.Tests/CountTest.cs: -------------------------------------------------------------------------------- 1 | using NUnit.Framework; 2 | using Linq = System.Linq.Enumerable; 3 | using static Utils; 4 | using static ValueFuncs; 5 | using Unity.Collections; 6 | using Blinq = CareBoo.Blinq.Sequence; 7 | using CareBoo.Blinq; 8 | 9 | internal class CountTest 10 | { 11 | [Test, Parallelizable, Timeout(5000)] 12 | public void BlinqShouldEqualLinqNativeArraySequenceCount([ArrayValues] int[] sourceArr) 13 | { 14 | var sourceNativeArr = new NativeArray(sourceArr, Allocator.Persistent); 15 | var expected = ExceptionAndValue(() => Linq.Count(sourceNativeArr)); 16 | var actual = ExceptionAndValue(() => Blinq.Count(sourceNativeArr)); 17 | AssertAreEqual(expected, actual); 18 | sourceNativeArr.Dispose(); 19 | } 20 | 21 | [Test, Parallelizable, Timeout(5000)] 22 | public void BlinqShouldEqualLinqValueSequenceCount([ArrayValues] int[] sourceArr) 23 | { 24 | var sourceNativeArr = new NativeArray(sourceArr, Allocator.Persistent); 25 | var source = sourceNativeArr.ToValueSequence(); 26 | var expected = ExceptionAndValue(() => Linq.Count(source)); 27 | var actual = ExceptionAndValue(() => Blinq.Count(source)); 28 | AssertAreEqual(expected, actual); 29 | sourceNativeArr.Dispose(); 30 | } 31 | 32 | [Test, Parallelizable, Timeout(5000)] 33 | public void BlinqShouldEqualLinqNativeArraySequenceCountPredicate([ArrayValues] int[] sourceArr) 34 | { 35 | var sourceNativeArr = new NativeArray(sourceArr, Allocator.Persistent); 36 | var expected = ExceptionAndValue(() => Linq.Count(sourceNativeArr, EqualsOne.Invoke)); 37 | var actual = ExceptionAndValue(() => Blinq.Count(sourceNativeArr, EqualsOne)); 38 | AssertAreEqual(expected, actual); 39 | sourceNativeArr.Dispose(); 40 | } 41 | 42 | [Test, Parallelizable, Timeout(5000)] 43 | public void BlinqShouldEqualLinqValueSequenceCountPredicate([ArrayValues] int[] sourceArr) 44 | { 45 | var sourceNativeArr = new NativeArray(sourceArr, Allocator.Persistent); 46 | var source = sourceNativeArr.ToValueSequence(); 47 | var expected = ExceptionAndValue(() => Linq.Count(source, EqualsOne.Invoke)); 48 | var actual = ExceptionAndValue(() => Blinq.Count(source, EqualsOne)); 49 | AssertAreEqual(expected, actual); 50 | sourceNativeArr.Dispose(); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.Tests/CountTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ab9af691c63b5954d922d81f4c0df501 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.Tests/DefaultIfEmptyTest.cs: -------------------------------------------------------------------------------- 1 | using NUnit.Framework; 2 | using Linq = System.Linq.Enumerable; 3 | using static Utils; 4 | using Unity.Collections; 5 | using CareBoo.Blinq; 6 | 7 | internal class DefaultIfEmptyTest 8 | { 9 | [Test, Parallelizable, Timeout(5000)] 10 | public void BlinqShouldEqualLinqValueSequenceDefaultIfEmpty([ArrayValues] int[] sourceArr) 11 | { 12 | var sourceNativeArr = new NativeArray(sourceArr, Allocator.Persistent); 13 | var source = sourceNativeArr.ToValueSequence(); 14 | var expected = ExceptionAndValue(() => Linq.ToArray(Linq.DefaultIfEmpty(source, 1))); 15 | var actual = ExceptionAndValue(() => Linq.ToArray(source.DefaultIfEmpty(1))); 16 | AssertAreEqual(expected, actual); 17 | sourceNativeArr.Dispose(); 18 | } 19 | 20 | [Test, Parallelizable, Timeout(5000)] 21 | public void BlinqShouldEqualLinqNativeArrayDefaultIfEmpty([ArrayValues] int[] sourceArr) 22 | { 23 | var source = new NativeArray(sourceArr, Allocator.Persistent); 24 | var expected = ExceptionAndValue(() => Linq.ToArray(Linq.DefaultIfEmpty(source, 1))); 25 | var actual = ExceptionAndValue(() => Linq.ToArray(source.DefaultIfEmpty(1))); 26 | AssertAreEqual(expected, actual); 27 | source.Dispose(); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.Tests/DefaultIfEmptyTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7be62d6494a02ed4fb25f02e54bccc5a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.Tests/DistinctTest.cs: -------------------------------------------------------------------------------- 1 | using NUnit.Framework; 2 | using Unity.Collections; 3 | using Blinq = CareBoo.Blinq.Sequence; 4 | using Linq = System.Linq.Enumerable; 5 | using static Utils; 6 | 7 | internal class DistinctTest 8 | { 9 | [Test, Parallelizable, Timeout(5000)] 10 | public void BlinqShouldEqualLinqNativeArrayDistinct([ArrayValues] int[] sourceArr) 11 | { 12 | var source = new NativeArray(sourceArr, Allocator.Persistent); 13 | var expected = ExceptionAndValue(() => Linq.ToArray(Linq.Distinct(source))); 14 | var actual = ExceptionAndValue(() => Linq.ToArray(Blinq.Distinct(source))); 15 | AssertAreEqual(expected, actual); 16 | source.Dispose(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.Tests/DistinctTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 84a5c4e77db3fcd4d823872fbf64a9b8 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.Tests/ElementAtTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8d6fc93f0375eb44ba7a82e86d40d43b 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.Tests/EnumerableExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using Unity.Collections; 4 | using LinqEnumerable = System.Linq.Enumerable; 5 | 6 | internal static class EnumerableExtensions 7 | { 8 | public static NativeArray ToNativeArray(this IEnumerable source, Allocator allocator) 9 | where T : struct 10 | { 11 | if (source == null) throw new ArgumentNullException(nameof(source)); 12 | 13 | return new NativeArray(LinqEnumerable.ToArray(source), allocator); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.Tests/EnumerableExtensions.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 05418f43a532a7d4fb9d7009962184c5 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.Tests/ExceptTest.cs: -------------------------------------------------------------------------------- 1 | using NUnit.Framework; 2 | using Linq = System.Linq.Enumerable; 3 | using static Utils; 4 | using Unity.Collections; 5 | using Blinq = CareBoo.Blinq.Sequence; 6 | 7 | internal class ExceptTest 8 | { 9 | [Test, Parallelizable, Timeout(5000)] 10 | public void BlinqShouldEqualLinqNativeArrayExcept([ArrayValues] int[] sourceArr, [ArrayValues] int[] secondArr) 11 | { 12 | var source = new NativeArray(sourceArr, Allocator.Persistent); 13 | var second = new NativeArray(secondArr, Allocator.Persistent); 14 | var expected = ExceptionAndValue(() => Linq.ToArray(Linq.Except(source, second))); 15 | var actual = ExceptionAndValue(() => Linq.ToArray(Blinq.Except(source, second))); 16 | AssertAreEqual(expected, actual); 17 | source.Dispose(); 18 | second.Dispose(); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.Tests/ExceptTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 46facdeab59434a4a867e67b04fc7b50 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.Tests/FirstTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4bfd0dcca00498e40b1b685d65e52164 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.Tests/Functions.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bdeeef23588b4ce4283568b38e3f1562 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.Tests/GroupByTest.cs: -------------------------------------------------------------------------------- 1 | using static ValueFuncs; 2 | using static Utils; 3 | using NUnit.Framework; 4 | using Unity.Collections; 5 | using Linq = System.Linq.Enumerable; 6 | using Blinq = CareBoo.Blinq.Sequence; 7 | using System.Linq; 8 | 9 | internal class GroupByTest 10 | { 11 | 12 | [Test, Parallelizable, Timeout(5000)] 13 | public void BlinqShouldEqualLinqNativeArrayGroupByThenSelectCount([ArrayValues] int[] sourceArr) 14 | { 15 | var source = new NativeArray(sourceArr, Allocator.Persistent); 16 | var expected = ExceptionAndValue(() => 17 | { 18 | var groupBy = Linq.GroupBy(source, SelectSelf().Invoke, (key, values) => key + Linq.Count(values)); 19 | return Linq.ToArray(groupBy); 20 | }); 21 | var actual = ExceptionAndValue(() => 22 | { 23 | var groupBy = Blinq.GroupBy(source, SelectSelf(), SelectGrouping); 24 | return Linq.ToArray(groupBy); 25 | }); 26 | AssertAreEqual(expected, actual); 27 | source.Dispose(); 28 | } 29 | 30 | [Test, Parallelizable, Timeout(5000)] 31 | public void BlinqShouldEqualLinqNativeArrayGroupByKey([ArrayValues] int[] sourceArr) 32 | { 33 | var source = new NativeArray(sourceArr, Allocator.Persistent); 34 | var expected = ExceptionAndValue(() => 35 | { 36 | var groupBy = Linq.GroupBy(source, SelectSelf().Invoke); 37 | return Linq.ToArray(groupBy); 38 | }); 39 | var actual = ExceptionAndValue(() => 40 | { 41 | var groupBy = Linq.Cast>(Blinq.GroupBy(source, SelectSelf())); 42 | return Linq.ToArray(groupBy); 43 | }); 44 | AssertAreEqual(expected, actual); 45 | source.Dispose(); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.Tests/GroupByTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4cc8708bb8bf4bd47828f16a0a32ce67 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.Tests/GroupJoinTest.cs: -------------------------------------------------------------------------------- 1 | using static ValueFuncs; 2 | using static Utils; 3 | using System.Collections; 4 | using NUnit.Framework; 5 | using Unity.Collections; 6 | using Linq = System.Linq.Enumerable; 7 | using Blinq = CareBoo.Blinq.Sequence; 8 | using System.Collections.Generic; 9 | 10 | internal class GroupJoinTest 11 | { 12 | internal class GroupJoinOuterValues 13 | { 14 | public static IEnumerable Values 15 | { 16 | get 17 | { 18 | yield return new[] { new JoinA { Id = 1, Val = 'a' }, new JoinA { Id = 2, Val = 'b' }, new JoinA { Id = 3, Val = 'c' } }; 19 | yield return new JoinA[0]; 20 | } 21 | } 22 | } 23 | 24 | internal class GroupJoinInnerValues 25 | { 26 | public static IEnumerable Values 27 | { 28 | get 29 | { 30 | yield return new[] { new JoinB { Id = 1, Val = 'a' }, new JoinB { Id = 1, Val = 'b' }, new JoinB { Id = 3, Val = 'c' } }; 31 | yield return new JoinB[0]; 32 | } 33 | } 34 | } 35 | 36 | public int GroupJoinABLinqSelector(JoinA outer, IEnumerable innerEnum) 37 | { 38 | return Linq.Count(innerEnum); 39 | } 40 | 41 | [Test, Parallelizable, Timeout(5000)] 42 | public void BlinqShouldEqualLinqNativeArrayJoinNativeArray( 43 | [ValueSource(typeof(GroupJoinOuterValues), nameof(GroupJoinOuterValues.Values))] JoinA[] outerArr, 44 | [ValueSource(typeof(GroupJoinInnerValues), nameof(GroupJoinInnerValues.Values))] JoinB[] innerArr 45 | ) 46 | { 47 | var outer = new NativeArray(outerArr, Allocator.Persistent); 48 | var inner = new NativeArray(innerArr, Allocator.Persistent); 49 | var expected = ExceptionAndValue(() => Linq.ToArray(Linq.GroupJoin(outer, inner, JoinAKeySelector.Invoke, JoinBKeySelector.Invoke, GroupJoinABLinqSelector))); 50 | var actual = ExceptionAndValue(() => Linq.ToArray(Blinq.GroupJoin(outer, inner, JoinAKeySelector, JoinBKeySelector, GroupJoinABSelector))); 51 | AssertAreEqual(expected, actual); 52 | outer.Dispose(); 53 | inner.Dispose(); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.Tests/GroupJoinTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 65cc2284abc95fb43942a94c278c60ca 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.Tests/IntersectTest.cs: -------------------------------------------------------------------------------- 1 | using NUnit.Framework; 2 | using Linq = System.Linq.Enumerable; 3 | using static Utils; 4 | using Unity.Collections; 5 | using Blinq = CareBoo.Blinq.Sequence; 6 | 7 | internal class IntersectTest 8 | { 9 | [Test, Parallelizable, Timeout(5000)] 10 | public void BlinqShouldEqualLinqNativeArrayIntersect([ArrayValues] int[] sourceArr, [ArrayValues] int[] secondArr) 11 | { 12 | var source = new NativeArray(sourceArr, Allocator.Persistent); 13 | var second = new NativeArray(secondArr, Allocator.Persistent); 14 | var expected = ExceptionAndValue(() => Linq.ToArray(Linq.Intersect(source, second))); 15 | var actual = ExceptionAndValue(() => Linq.ToArray(Blinq.Intersect(source, second))); 16 | AssertAreEqual(expected, actual); 17 | source.Dispose(); 18 | second.Dispose(); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.Tests/IntersectTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: eb4372d6d2e38ff4dbc021b8ea79634f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.Tests/JoinTest.cs: -------------------------------------------------------------------------------- 1 | using static ValueFuncs; 2 | using static Utils; 3 | using System.Collections; 4 | using NUnit.Framework; 5 | using Unity.Collections; 6 | using Linq = System.Linq.Enumerable; 7 | using Blinq = CareBoo.Blinq.Sequence; 8 | 9 | internal struct JoinA 10 | { 11 | public int Id; 12 | public char Val; 13 | } 14 | 15 | internal struct JoinB 16 | { 17 | public int Id; 18 | public char Val; 19 | } 20 | 21 | internal struct JointAB 22 | { 23 | public char ValA; 24 | public char ValB; 25 | } 26 | 27 | internal class JoinAValues 28 | { 29 | public static IEnumerable Values 30 | { 31 | get 32 | { 33 | yield return new[] { new JoinA { Id = 1, Val = 'a' }, new JoinA { Id = 2, Val = 'b' }, new JoinA { Id = 3, Val = 'c' } }; 34 | yield return new JoinA[0]; 35 | } 36 | } 37 | } 38 | 39 | internal class JoinBValues 40 | { 41 | public static IEnumerable Values 42 | { 43 | get 44 | { 45 | yield return new[] { new JoinB { Id = 1, Val = 'a' }, new JoinB { Id = 2, Val = 'b' }, new JoinB { Id = 3, Val = 'c' } }; 46 | yield return new JoinB[0]; 47 | } 48 | } 49 | } 50 | 51 | internal class JoinTest 52 | { 53 | [Test, Parallelizable, Timeout(5000)] 54 | public void BlinqShouldEqualLinqNativeArrayJoinNativeArray( 55 | [ValueSource(typeof(JoinAValues), nameof(JoinAValues.Values))] JoinA[] outerArr, 56 | [ValueSource(typeof(JoinBValues), nameof(JoinBValues.Values))] JoinB[] innerArr 57 | ) 58 | { 59 | var outer = new NativeArray(outerArr, Allocator.Persistent); 60 | var inner = new NativeArray(innerArr, Allocator.Persistent); 61 | var expected = ExceptionAndValue(() => Linq.ToArray(Linq.Join(outer, inner, JoinAKeySelector.Invoke, JoinBKeySelector.Invoke, JointABSelector.Invoke))); 62 | var actual = ExceptionAndValue(() => Linq.ToArray(Blinq.Join(outer, inner, JoinAKeySelector, JoinBKeySelector, JointABSelector))); 63 | AssertAreEqual(expected, actual); 64 | outer.Dispose(); 65 | inner.Dispose(); 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.Tests/JoinTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8ea778475b59eff40bd66f2960e75051 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.Tests/LastTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 38bbc8ac0acdf1c47a16096921bacf19 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.Tests/LongCountTest.cs: -------------------------------------------------------------------------------- 1 | using NUnit.Framework; 2 | using Linq = System.Linq.Enumerable; 3 | using static Utils; 4 | using static ValueFuncs; 5 | using Unity.Collections; 6 | using Blinq = CareBoo.Blinq.Sequence; 7 | using CareBoo.Blinq; 8 | 9 | internal class LongCountTest 10 | { 11 | [Test, Parallelizable, Timeout(5000)] 12 | public void BlinqShouldEqualLinqNativeArraySequenceLongCount([ArrayValues] int[] sourceArr) 13 | { 14 | var sourceNativeArr = new NativeArray(sourceArr, Allocator.Persistent); 15 | var expected = ExceptionAndValue(() => Linq.LongCount(sourceNativeArr)); 16 | var actual = ExceptionAndValue(() => Blinq.LongCount(sourceNativeArr)); 17 | AssertAreEqual(expected, actual); 18 | sourceNativeArr.Dispose(); 19 | } 20 | 21 | [Test, Parallelizable, Timeout(5000)] 22 | public void BlinqShouldEqualLinqValueSequenceLongCount([ArrayValues] int[] sourceArr) 23 | { 24 | var sourceNativeArr = new NativeArray(sourceArr, Allocator.Persistent); 25 | var source = sourceNativeArr.ToValueSequence(); 26 | var expected = ExceptionAndValue(() => Linq.LongCount(source)); 27 | var actual = ExceptionAndValue(() => Blinq.LongCount(source)); 28 | AssertAreEqual(expected, actual); 29 | sourceNativeArr.Dispose(); 30 | } 31 | 32 | [Test, Parallelizable, Timeout(5000)] 33 | public void BlinqShouldEqualLinqNativeArraySequenceLongCountPredicate([ArrayValues] int[] sourceArr) 34 | { 35 | var sourceNativeArr = new NativeArray(sourceArr, Allocator.Persistent); 36 | var expected = ExceptionAndValue(() => Linq.LongCount(sourceNativeArr, EqualsOne.Invoke)); 37 | var actual = ExceptionAndValue(() => Blinq.LongCount(sourceNativeArr, EqualsOne)); 38 | AssertAreEqual(expected, actual); 39 | sourceNativeArr.Dispose(); 40 | } 41 | 42 | [Test, Parallelizable, Timeout(5000)] 43 | public void BlinqShouldEqualLinqValueSequenceLongCountPredicate([ArrayValues] int[] sourceArr) 44 | { 45 | var sourceNativeArr = new NativeArray(sourceArr, Allocator.Persistent); 46 | var source = sourceNativeArr.ToValueSequence(); 47 | var expected = ExceptionAndValue(() => Linq.LongCount(source, EqualsOne.Invoke)); 48 | var actual = ExceptionAndValue(() => Blinq.LongCount(source, EqualsOne)); 49 | AssertAreEqual(expected, actual); 50 | sourceNativeArr.Dispose(); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.Tests/LongCountTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5e5eead385aa2654cb84fcc97e7d39b3 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.Tests/MaxMinTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 396e9daa88f3f0c44a48090b442f8986 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.Tests/MaxMinTest.gen.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b065e05db1c5e1a44820fc2b1a6c6950 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.Tests/MaxMinTest.tt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 01fcaf44e2a8329429af3ac85e45366b 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.Tests/OrderByTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e55a79d5db27b8a47a67ffa821d743c4 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.Tests/PrependTest.cs: -------------------------------------------------------------------------------- 1 | using NUnit.Framework; 2 | using Linq = System.Linq.Enumerable; 3 | using static Utils; 4 | using Unity.Collections; 5 | using Blinq = CareBoo.Blinq.Sequence; 6 | using CareBoo.Blinq; 7 | 8 | internal class PrependTest 9 | { 10 | [Test, Parallelizable, Timeout(5000)] 11 | public void BlinqShouldEqualLinqNativeArrayPrepend([ArrayValues] int[] sourceArr) 12 | { 13 | int item = 1; 14 | var source = new NativeArray(sourceArr, Allocator.Persistent); 15 | var expected = ExceptionAndValue(() => Linq.ToArray(Linq.Prepend(source, item))); 16 | var actual = ExceptionAndValue(() => Linq.ToArray(Blinq.Prepend(source, item))); 17 | AssertAreEqual(expected, actual); 18 | source.Dispose(); 19 | } 20 | 21 | [Test, Parallelizable, Timeout(5000)] 22 | public void BlinqShouldEqualLinqValueSequencePrepend([ArrayValues] int[] sourceArr) 23 | { 24 | int item = 1; 25 | var sourceNativeArr = new NativeArray(sourceArr, Allocator.Persistent); 26 | var source = sourceNativeArr.ToValueSequence(); 27 | var expected = ExceptionAndValue(() => Linq.ToArray(Linq.Prepend(source, item))); 28 | var actual = ExceptionAndValue(() => Linq.ToArray(Blinq.Prepend(source, item))); 29 | AssertAreEqual(expected, actual); 30 | sourceNativeArr.Dispose(); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.Tests/PrependTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3c0a0ea77bac47640b5458ed361b656d 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.Tests/ReverseTest.cs: -------------------------------------------------------------------------------- 1 | using NUnit.Framework; 2 | using Linq = System.Linq.Enumerable; 3 | using static Utils; 4 | using static ValueFuncs; 5 | using Unity.Collections; 6 | using Blinq = CareBoo.Blinq.Sequence; 7 | using CareBoo.Blinq; 8 | 9 | internal class ReverseTest 10 | { 11 | [Test, Parallelizable, Timeout(5000)] 12 | public void BlinqShouldEqualLinqNativeArrayReverse([ArrayValues] int[] sourceArr) 13 | { 14 | var source = new NativeArray(sourceArr, Allocator.Persistent); 15 | var expected = ExceptionAndValue(() => Linq.ToArray(Linq.Reverse(source))); 16 | var actual = ExceptionAndValue(() => Linq.ToArray(Blinq.Reverse(source))); 17 | AssertAreEqual(expected, actual); 18 | source.Dispose(); 19 | } 20 | 21 | [Test, Parallelizable, Timeout(5000)] 22 | public void BlinqShouldEqualLinqValueSequenceReverse([ArrayValues] int[] sourceArr) 23 | { 24 | var sourceNativeArr = new NativeArray(sourceArr, Allocator.Persistent); 25 | var source = sourceNativeArr.ToValueSequence(); 26 | var expected = ExceptionAndValue(() => Linq.ToArray(Linq.Reverse(source))); 27 | var actual = ExceptionAndValue(() => Linq.ToArray(Blinq.Reverse(source))); 28 | AssertAreEqual(expected, actual); 29 | sourceNativeArr.Dispose(); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.Tests/ReverseTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e42b80a97e94f8c49917d6471e2c446b 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.Tests/SelectManyTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f9e1b6ee369489945a5e4b7c739c1a66 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.Tests/SelectTest.cs: -------------------------------------------------------------------------------- 1 | using NUnit.Framework; 2 | using Linq = System.Linq.Enumerable; 3 | using static Utils; 4 | using static ValueFuncs; 5 | using Unity.Collections; 6 | using Blinq = CareBoo.Blinq.Sequence; 7 | 8 | internal class SelectTest 9 | { 10 | [Test, Parallelizable, Timeout(5000)] 11 | public void BlinqShouldEqualLinqNativeArraySelectWithIndex([ArrayValues] int[] sourceArr) 12 | { 13 | var source = new NativeArray(sourceArr, Allocator.Persistent); 14 | var expected = ExceptionAndValue(() => Linq.ToArray(Linq.Select(source, AddToIndex.Invoke))); 15 | var actual = ExceptionAndValue(() => Linq.ToArray(Blinq.Select(source, AddToIndex))); 16 | AssertAreEqual(expected, actual); 17 | source.Dispose(); 18 | } 19 | 20 | [Test, Parallelizable, Timeout(5000)] 21 | public void BlinqShouldEqualLinqNativeArraySelect([ArrayValues] int[] sourceArr) 22 | { 23 | var source = new NativeArray(sourceArr, Allocator.Persistent); 24 | var expected = ExceptionAndValue(() => Linq.ToArray(Linq.Select(source, IntToLong.Invoke))); 25 | var actual = ExceptionAndValue(() => Linq.ToArray(Blinq.Select(source, IntToLong))); 26 | AssertAreEqual(expected, actual); 27 | source.Dispose(); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.Tests/SelectTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ca1327b6004e2bf438e349b3e22df825 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.Tests/SequenceEqualTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 11a4abc607405974a885c8f487ef6460 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.Tests/SingleTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0b1d0ebd564b12d498ca3af7468ed0b8 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.Tests/SkipTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c49f39b26c93f6749975591e66062e31 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.Tests/SumTest.gen.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 874622c6bc9efdc4f9700a37d72eb4f2 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.Tests/SumTest.tt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1bd7fb46bb1614a4195ea69e40058d33 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.Tests/TakeTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0a6cb12e1cc426d44b5fd62010003574 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.Tests/ThenByTest.cs: -------------------------------------------------------------------------------- 1 | using NUnit.Framework; 2 | using Linq = System.Linq.Enumerable; 3 | using static Utils; 4 | using static ValueFuncs; 5 | using Unity.Collections; 6 | using Blinq = CareBoo.Blinq.Sequence; 7 | using CareBoo.Blinq; 8 | 9 | internal class ThenByTest 10 | { 11 | 12 | [Test, Parallelizable, Timeout(5000)] 13 | public void BlinqShouldEqualLinqValueSequenceThenBy([OrderValues] Order[] sourceArr) 14 | { 15 | var sourceNativeArr = new NativeArray(sourceArr, Allocator.Persistent); 16 | var source = sourceNativeArr.ToValueSequence(); 17 | var expected = ExceptionAndValue(() => Linq.ToArray(Linq.ThenBy(Linq.OrderBy(source, SelectSecond.Invoke), SelectFirst.Invoke))); 18 | var actual = ExceptionAndValue(() => Linq.ToArray(Blinq.ThenBy(Blinq.OrderBy(source, SelectSecond), SelectFirst))); 19 | AssertAreEqual(expected, actual); 20 | sourceNativeArr.Dispose(); 21 | } 22 | 23 | [Test, Parallelizable, Timeout(5000)] 24 | public void BlinqShouldEqualLinqValueSequenceThenByDescending([OrderValues] Order[] sourceArr) 25 | { 26 | var sourceNativeArr = new NativeArray(sourceArr, Allocator.Persistent); 27 | var source = sourceNativeArr.ToValueSequence(); 28 | var expected = ExceptionAndValue(() => Linq.ToArray(Linq.ThenByDescending(Linq.OrderBy(source, SelectFirst.Invoke), SelectSecond.Invoke))); 29 | var actual = ExceptionAndValue(() => Linq.ToArray(Blinq.ThenByDescending(Blinq.OrderBy(source, SelectFirst), SelectSecond))); 30 | AssertAreEqual(expected, actual); 31 | sourceNativeArr.Dispose(); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.Tests/ThenByTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ce60b4edf616837428a83fbaf3b1319c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.Tests/UnionTest.cs: -------------------------------------------------------------------------------- 1 | using NUnit.Framework; 2 | using Linq = System.Linq.Enumerable; 3 | using static Utils; 4 | using Unity.Collections; 5 | using Blinq = CareBoo.Blinq.Sequence; 6 | 7 | internal class UnionTest 8 | { 9 | [Test, Parallelizable, Timeout(5000)] 10 | public void BlinqShouldEqualLinqNativeArrayUnion([ArrayValues] int[] sourceArr, [ArrayValues] int[] secondArr) 11 | { 12 | var source = new NativeArray(sourceArr, Allocator.Persistent); 13 | var second = new NativeArray(secondArr, Allocator.Persistent); 14 | var expected = ExceptionAndValue(() => Linq.ToArray(Linq.Union(source, second))); 15 | var actual = ExceptionAndValue(() => Linq.ToArray(Blinq.Union(source, second))); 16 | AssertAreEqual(expected, actual); 17 | source.Dispose(); 18 | second.Dispose(); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.Tests/UnionTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e1c82dd4d0394dd4289c557440c126ba 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.Tests/Utils.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using NUnit.Framework; 4 | 5 | internal static class Utils 6 | { 7 | public static (Exception exception, T value) ExceptionAndValue(Func func) 8 | { 9 | Exception exception = null; 10 | T value = default; 11 | try 12 | { 13 | value = func.Invoke(); 14 | } 15 | catch (Exception ex) 16 | { 17 | exception = ex; 18 | } 19 | return (exception, value); 20 | } 21 | 22 | public static void AssertAreEqual( 23 | (Exception, T) expected, 24 | (Exception, T) actual 25 | ) 26 | { 27 | if (expected.Item1 != null) 28 | Assert.IsNotNull(actual.Item1); 29 | else 30 | Assert.IsNull(actual.Item1); 31 | Assert.AreEqual(expected.Item2, actual.Item2); 32 | } 33 | 34 | public static string LogEnumerables(IEnumerable expected, IEnumerable actual) 35 | { 36 | return $"Expected: {{{string.Join(",", expected)}}}\nActual: {{{string.Join(",", actual)}}}"; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.Tests/Utils.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c4369226af40a2940885eec03ac2348f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.Tests/WhereTest.cs: -------------------------------------------------------------------------------- 1 | using NUnit.Framework; 2 | using Unity.Collections; 3 | using static ValueFuncs; 4 | using Blinq = CareBoo.Blinq.Sequence; 5 | using Linq = System.Linq.Enumerable; 6 | using static Utils; 7 | 8 | internal class WhereTest 9 | { 10 | [Test, Parallelizable, Timeout(5000)] 11 | public void BlinqShouldEqualLinqNativeArrayWhereWithIndex([ArrayValues] int[] sourceArr) 12 | { 13 | var source = new NativeArray(sourceArr, Allocator.Persistent); 14 | var expected = ExceptionAndValue(() => Linq.ToArray(Linq.Where(source, EqualToIndex.Invoke))); 15 | var actual = ExceptionAndValue(() => Linq.ToArray(Blinq.Where(source, EqualToIndex))); 16 | AssertAreEqual(expected, actual); 17 | source.Dispose(); 18 | } 19 | 20 | [Test, Parallelizable, Timeout(5000)] 21 | public void BlinqShouldEqualLinqNativeArrayWhere([ArrayValues] int[] sourceArr) 22 | { 23 | var source = new NativeArray(sourceArr, Allocator.Persistent); 24 | var expected = ExceptionAndValue(() => Linq.ToArray(Linq.Where(source, EqualsZero.Invoke))); 25 | var actual = ExceptionAndValue(() => Linq.ToArray(Blinq.Where(source, EqualsZero))); 26 | AssertAreEqual(expected, actual); 27 | source.Dispose(); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.Tests/WhereTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ba658826864ae6d44acf842aba5a9b5d 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.Tests/ZipTest.cs: -------------------------------------------------------------------------------- 1 | using NUnit.Framework; 2 | using Unity.Collections; 3 | using Blinq = CareBoo.Blinq.Sequence; 4 | using Linq = System.Linq.Enumerable; 5 | using static Utils; 6 | using static ValueFuncs; 7 | using CareBoo.Blinq; 8 | using static CareBoo.Blinq.Sequence; 9 | 10 | internal class ZipTest 11 | { 12 | [Test, Parallelizable, Timeout(5000)] 13 | public void BlinqShouldEqualLinqNativeArrayZip([ArrayValues] int[] sourceArr, [ArrayValues] int[] secondArr) 14 | { 15 | var source = new NativeArray(sourceArr, Allocator.Persistent); 16 | var second = new NativeArray(secondArr, Allocator.Persistent); 17 | var secondSequence = second.ToValueSequence(); 18 | var expected = ExceptionAndValue(() => Linq.ToArray(Linq.Zip(source, secondSequence, Sum.Invoke))); 19 | var actual = ExceptionAndValue(() => Linq.ToArray(Blinq.Zip(source, secondSequence, Sum))); 20 | AssertAreEqual(expected, actual); 21 | source.Dispose(); 22 | second.Dispose(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.Tests/ZipTest.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: df36199927f6aef459755b3d5749fca1 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 52567fa0675114e46bb0bf7f124c35b2 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Runtime.CompilerServices; 2 | 3 | [assembly: InternalsVisibleTo("CareBoo.Blinq.Tests")] 4 | [assembly: InternalsVisibleTo("CareBoo.Blinq.Performance.Tests")] 5 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/AssemblyInfo.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 145ed79b909359344adb2f7cd205e1dd 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/CareBoo.Blinq.asmdef: -------------------------------------------------------------------------------- 1 | { 2 | "name": "CareBoo.Blinq", 3 | "references": [ 4 | "Unity.Burst", 5 | "Unity.Collections", 6 | "Unity.Mathematics", 7 | "CareBoo.Burst.Delegates" 8 | ], 9 | "includePlatforms": [], 10 | "excludePlatforms": [], 11 | "allowUnsafeCode": true, 12 | "overrideReferences": false, 13 | "precompiledReferences": [], 14 | "autoReferenced": true, 15 | "defineConstraints": [], 16 | "versionDefines": [], 17 | "noEngineReferences": false 18 | } -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/CareBoo.Blinq.asmdef.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 45ab5c0c2cb4a0e4ba897b731349c490 3 | AssemblyDefinitionImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/Error.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | internal static class Error 4 | { 5 | internal static Exception ArgumentNull(string s) { return new ArgumentNullException(s); } 6 | 7 | internal static Exception ArgumentOutOfRange(string s) { return new ArgumentOutOfRangeException(s); } 8 | 9 | internal static Exception MoreThanOneElement() { return new InvalidOperationException("Sequence contains more than one element"); } 10 | 11 | internal static Exception MoreThanOneMatch() { return new InvalidOperationException("Sequence contains more than one matching element"); } 12 | 13 | internal static Exception NoElements() { return new InvalidOperationException("Sequence contains no elements"); } 14 | 15 | internal static Exception NoMatch() { return new InvalidOperationException("Sequence contains no matching element"); } 16 | 17 | internal static Exception NotSupported() { return new NotSupportedException(); } 18 | 19 | internal static Exception NotCodeGenerated() { return new NotImplementedException("Code generation for this method has failed!"); } 20 | 21 | internal static Exception NotImplemented() { return new NotImplementedException(); } 22 | 23 | internal static Exception DuplicateKey() { return new ArgumentException("keySelector produces duplicate keys for two elements."); } 24 | } 25 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/Error.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 868f01159b985b349a02d04a7f6182a4 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/FuncJob.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using CareBoo.Burst.Delegates; 3 | using Unity.Burst; 4 | using Unity.Collections; 5 | using Unity.Jobs; 6 | 7 | namespace CareBoo.Blinq 8 | { 9 | [BurstCompile] 10 | public struct FuncJob : IJob 11 | where T : struct 12 | where TResult : struct 13 | where TFunc : struct, IFunc 14 | { 15 | [ReadOnly] 16 | readonly T arg1; 17 | 18 | [ReadOnly] 19 | readonly ValueFunc.Struct func; 20 | 21 | [WriteOnly] 22 | NativeArray output; 23 | 24 | internal FuncJob( 25 | in T arg1, 26 | ValueFunc.Struct func, 27 | ref NativeArray output 28 | ) 29 | { 30 | this.arg1 = arg1; 31 | this.func = func; 32 | this.output = output; 33 | } 34 | 35 | public void Execute() 36 | { 37 | output[0] = func.Invoke(arg1); 38 | } 39 | } 40 | 41 | public struct JobHandle : IDisposable 42 | where TResult : struct 43 | { 44 | JobHandle jobHandle; 45 | NativeArray output; 46 | 47 | public bool IsCompleted => jobHandle.IsCompleted; 48 | 49 | internal JobHandle(in JobHandle jobHandle, ref NativeArray output) 50 | { 51 | this.jobHandle = jobHandle; 52 | this.output = output; 53 | } 54 | 55 | public TResult Complete() 56 | { 57 | jobHandle.Complete(); 58 | var result = output[0]; 59 | Dispose(); 60 | return result; 61 | } 62 | 63 | public void Dispose() 64 | { 65 | if (output.IsCreated) 66 | output.Dispose(); 67 | } 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/FuncJob.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 928b9803544f4174e9bf85ec7f957d98 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/IOrderedSequence.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Unity.Collections; 3 | 4 | namespace CareBoo.Blinq 5 | { 6 | public interface IOrderedNativeListConvertible 7 | : IComparer 8 | where T : struct 9 | { 10 | NativeList ToUnorderedList(Allocator allocator); 11 | } 12 | public interface IOrderedSequence 13 | : ISequence 14 | , IOrderedNativeListConvertible 15 | where T : struct 16 | where TEnumerator : struct, IEnumerator 17 | { 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/IOrderedSequence.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fd9a54b8ef3c5cd4985c703159423267 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/ISequence.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Unity.Collections; 3 | 4 | namespace CareBoo.Blinq 5 | { 6 | public interface INativeListConvertible 7 | where T : struct 8 | { 9 | NativeList ToNativeList(Allocator allocator); 10 | } 11 | 12 | public interface ISequence 13 | : IEnumerable 14 | , INativeListConvertible 15 | where T : struct 16 | where TEnumerator : struct, IEnumerator 17 | { 18 | new TEnumerator GetEnumerator(); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/ISequence.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6d02c1740e15f3542be000102e65a8d9 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/NativeArray.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fba1fdbad3521ab4bafba8c6a18355ce 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/NativeArray/NativeArray.Aggregate.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b48817c10064fb34a867ccf2b9f32a77 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/NativeArray/NativeArray.All.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1076f337dadf5574f8313ea06a1df703 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/NativeArray/NativeArray.Any.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c260591857ce59844aeb4fce718ad235 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/NativeArray/NativeArray.Append.cs: -------------------------------------------------------------------------------- 1 | using Unity.Collections; 2 | 3 | namespace CareBoo.Blinq 4 | { 5 | public static partial class Sequence 6 | { 7 | public static ValueSequence, NativeArray.Enumerator>, AppendSequence, NativeArray.Enumerator>.Enumerator> Append(this in NativeArray source, T item) 8 | where T : struct 9 | { 10 | var sourceSeq = source.ToValueSequence(); 11 | return sourceSeq.Append(item); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/NativeArray/NativeArray.Append.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 26ace574383a15345a32a34cf81f9116 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/NativeArray/NativeArray.Average.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 670cbcfa71ef67049a5fc7c5ceed8ce7 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/NativeArray/NativeArray.Average/NativeArray.Average.gen.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c7330ffee42d3cd4793b54f9308d7ac9 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/NativeArray/NativeArray.Average/NativeArray.Average.tt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: be725bb70ca7d8d448425e6fe7004240 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/NativeArray/NativeArray.Concat.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Unity.Collections; 3 | 4 | namespace CareBoo.Blinq 5 | { 6 | public static partial class Sequence 7 | { 8 | public static ValueSequence< 9 | T, 10 | ConcatSequence, NativeArray.Enumerator, TSecond, TSecondEnumerator>, 11 | ConcatSequence, NativeArray.Enumerator, TSecond, TSecondEnumerator>.Enumerator> 12 | Concat( 13 | this in NativeArray source, 14 | in ValueSequence second 15 | ) 16 | where T : struct 17 | where TSecond : struct, ISequence 18 | where TSecondEnumerator : struct, IEnumerator 19 | { 20 | return source.ToValueSequence().Concat(second); 21 | } 22 | 23 | public static ValueSequence< 24 | T, 25 | ConcatSequence, NativeArray.Enumerator, NativeArraySequence, NativeArray.Enumerator>, 26 | ConcatSequence, NativeArray.Enumerator, NativeArraySequence, NativeArray.Enumerator>.Enumerator> 27 | Concat( 28 | this in NativeArray source, 29 | in NativeArray second 30 | ) 31 | where T : struct 32 | { 33 | return source.ToValueSequence().Concat(second); 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/NativeArray/NativeArray.Concat.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 70ae406f6d4315a4b9030d28b01d00fd 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/NativeArray/NativeArray.Contains.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 055b6f78e8518d942ac84ccf3ca79000 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/NativeArray/NativeArray.Count.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f3e62cd6ade74264eb98464accb05799 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/NativeArray/NativeArray.DefaultIfEmpty.cs: -------------------------------------------------------------------------------- 1 | using Unity.Collections; 2 | 3 | namespace CareBoo.Blinq 4 | { 5 | public static partial class Sequence 6 | { 7 | public static ValueSequence< 8 | T, 9 | DefaultIfEmptySequence, NativeArray.Enumerator>, 10 | DefaultIfEmptySequence, NativeArray.Enumerator>.Enumerator> 11 | DefaultIfEmpty( 12 | this in NativeArray source, 13 | in T defaultVal = default 14 | ) 15 | where T : struct 16 | { 17 | return source.ToValueSequence().DefaultIfEmpty(in defaultVal); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/NativeArray/NativeArray.DefaultIfEmpty.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 145f83dec4fda374eb65c6a8aeae9ac4 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/NativeArray/NativeArray.Distinct.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Unity.Collections; 3 | 4 | namespace CareBoo.Blinq 5 | { 6 | public static partial class Sequence 7 | { 8 | public static ValueSequence< 9 | T, 10 | DistinctSequence, NativeArray.Enumerator>, 11 | DistinctSequence, NativeArray.Enumerator>.Enumerator> 12 | Distinct( 13 | this in NativeArray source 14 | ) 15 | where T : unmanaged, IEquatable 16 | { 17 | return source.ToValueSequence().Distinct(); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/NativeArray/NativeArray.Distinct.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 113579fff46cab94fbd3bd00358f98f3 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/NativeArray/NativeArray.ElementAt.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c920b03bb91d0064291acc00c95bb4b3 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/NativeArray/NativeArray.Except.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using Unity.Collections; 4 | 5 | namespace CareBoo.Blinq 6 | { 7 | public static partial class Sequence 8 | { 9 | public static ValueSequence< 10 | T, 11 | ExceptSequence, NativeArray.Enumerator, TSecond, TSecondEnumerator>, 12 | ExceptSequence, NativeArray.Enumerator, TSecond, TSecondEnumerator>.Enumerator> 13 | Except( 14 | this in NativeArray source, 15 | in ValueSequence second 16 | ) 17 | where T : unmanaged, IEquatable 18 | where TSecond : struct, ISequence 19 | where TSecondEnumerator : struct, IEnumerator 20 | { 21 | return source.ToValueSequence().Except(second); 22 | } 23 | 24 | public static ValueSequence< 25 | T, 26 | ExceptSequence, NativeArray.Enumerator, NativeArraySequence, NativeArray.Enumerator>, 27 | ExceptSequence, NativeArray.Enumerator, NativeArraySequence, NativeArray.Enumerator>.Enumerator> 28 | Except( 29 | this in NativeArray source, 30 | in NativeArray second 31 | ) 32 | where T : unmanaged, IEquatable 33 | { 34 | return source.ToValueSequence().Except(second); 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/NativeArray/NativeArray.Except.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f499be7e2d49b8e4cb430bfab081615d 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/NativeArray/NativeArray.First.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 702e75cf1b34d824e9d951e59a9e5933 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/NativeArray/NativeArray.GroupBy.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 67ab82860fbdc0f4e8c66db3c5eb0091 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/NativeArray/NativeArray.GroupJoin.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d4297b8ec9cfad0489469cc6344ba011 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/NativeArray/NativeArray.Intersect.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using Unity.Collections; 4 | 5 | namespace CareBoo.Blinq 6 | { 7 | public static partial class Sequence 8 | { 9 | public static ValueSequence< 10 | T, 11 | IntersectSequence, NativeArray.Enumerator, TSecond, TSecondEnumerator>, 12 | IntersectSequence, NativeArray.Enumerator, TSecond, TSecondEnumerator>.Enumerator> 13 | Intersect( 14 | this in NativeArray source, 15 | in ValueSequence second 16 | ) 17 | where T : unmanaged, IEquatable 18 | where TSecond : struct, ISequence 19 | where TSecondEnumerator : struct, IEnumerator 20 | { 21 | return source.ToValueSequence().Intersect(in second); 22 | } 23 | 24 | public static ValueSequence< 25 | T, 26 | IntersectSequence, NativeArray.Enumerator, NativeArraySequence, NativeArray.Enumerator>, 27 | IntersectSequence, NativeArray.Enumerator, NativeArraySequence, NativeArray.Enumerator>.Enumerator> 28 | Intersect( 29 | this in NativeArray source, 30 | in NativeArray second 31 | ) 32 | where T : unmanaged, IEquatable 33 | { 34 | return source.ToValueSequence().Intersect(in second); 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/NativeArray/NativeArray.Intersect.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9678d68fa08c9e14f9d59606513fdaa9 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/NativeArray/NativeArray.Job.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a2047359596523042bd52b06da38c789 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/NativeArray/NativeArray.Join.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 58bbf72b93d42394c9a3a3c829fdecc4 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/NativeArray/NativeArray.Last.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4e0db01bfb9175d4ebad3f9adb2a558d 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/NativeArray/NativeArray.LongCount.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6dcaffa059124d2469e4491c7256750a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/NativeArray/NativeArray.MaxMin.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c5e66b7fd838b3c46bb0bb30ef01a27a 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/NativeArray/NativeArray.MaxMin/NativeArray.MaxMin.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7ab81e7faa2e06a4a9c60ef24770ee53 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/NativeArray/NativeArray.MaxMin/NativeArray.MaxMin.gen.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2cabde551f703b647b4906f20966f8a1 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/NativeArray/NativeArray.MaxMin/NativeArray.MaxMin.tt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 116acf4005b1d1247b4f78787f6d4580 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/NativeArray/NativeArray.OrderBy.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using Unity.Collections; 4 | using CareBoo.Burst.Delegates; 5 | 6 | namespace CareBoo.Blinq 7 | { 8 | public static partial class Sequence 9 | { 10 | public static ValueSequence< 11 | T, 12 | OrderBySequence, KeyComparer>>, 13 | SequenceEnumerator, KeyComparer>>>> 14 | OrderBy( 15 | this in NativeArray source, 16 | ValueFunc.Struct keySelector 17 | ) 18 | where T : struct 19 | where TKey : struct, IComparable 20 | where TKeySelector : struct, IFunc 21 | { 22 | var sourceSeq = source.ToValueSequence(); 23 | return sourceSeq.OrderBy(keySelector); 24 | } 25 | 26 | public static ValueSequence< 27 | T, 28 | OrderBySequence, KeyComparer>, 29 | SequenceEnumerator, KeyComparer>>> 30 | OrderBy( 31 | this in NativeArray source, 32 | ValueFunc.Struct keySelector, 33 | in TComparer comparer 34 | ) 35 | where T : struct 36 | where TKey : struct 37 | where TKeySelector : struct, IFunc 38 | where TComparer : struct, IComparer 39 | { 40 | var sourceSeq = source.ToValueSequence(); 41 | return sourceSeq.OrderBy(keySelector, in comparer); 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/NativeArray/NativeArray.OrderBy.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9d3ced4cbff37c14d8c8c0fd7e8230c3 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/NativeArray/NativeArray.OrderByDescending.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using Unity.Collections; 4 | using CareBoo.Burst.Delegates; 5 | 6 | namespace CareBoo.Blinq 7 | { 8 | public static partial class Sequence 9 | { 10 | public static ValueSequence< 11 | T, 12 | OrderBySequence, Descending>>>, 13 | SequenceEnumerator, Descending>>>>> 14 | OrderByDescending( 15 | this in NativeArray source, 16 | ValueFunc.Struct keySelector 17 | ) 18 | where T : struct 19 | where TKey : struct, IComparable 20 | where TKeySelector : struct, IFunc 21 | { 22 | return source.ToValueSequence().OrderByDescending(keySelector); 23 | } 24 | 25 | public static ValueSequence< 26 | T, 27 | OrderBySequence, Descending>>, 28 | SequenceEnumerator, Descending>>>> 29 | OrderByDescending( 30 | this in NativeArray source, 31 | ValueFunc.Struct keySelector, 32 | in TComparer comparer 33 | ) 34 | where T : struct 35 | where TKey : struct 36 | where TKeySelector : struct, IFunc 37 | where TComparer : struct, IComparer 38 | { 39 | return source.ToValueSequence().OrderByDescending(keySelector, in comparer); 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/NativeArray/NativeArray.OrderByDescending.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 79d227d9219fc644a9dd7de172251197 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/NativeArray/NativeArray.Prepend.cs: -------------------------------------------------------------------------------- 1 | using Unity.Collections; 2 | 3 | namespace CareBoo.Blinq 4 | { 5 | public static partial class Sequence 6 | { 7 | public static ValueSequence, NativeArray.Enumerator>, PrependSequence, NativeArray.Enumerator>.Enumerator> Prepend( 8 | this in NativeArray source, 9 | in T item 10 | ) 11 | where T : struct 12 | { 13 | return source.ToValueSequence().Prepend(in item); 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/NativeArray/NativeArray.Prepend.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fc138629479ecdc4ab3bf1a6d86e2bd8 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/NativeArray/NativeArray.Reverse.cs: -------------------------------------------------------------------------------- 1 | using Unity.Collections; 2 | 3 | namespace CareBoo.Blinq 4 | { 5 | public static partial class Sequence 6 | { 7 | public static ValueSequence>, SequenceEnumerator>>> Reverse( 8 | this in NativeArray source 9 | ) 10 | where T : struct 11 | { 12 | return source.ToValueSequence().Reverse(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/NativeArray/NativeArray.Reverse.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8e6448dd1762f6c46b51b03ec69b61da 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/NativeArray/NativeArray.Select.cs: -------------------------------------------------------------------------------- 1 | using Unity.Collections; 2 | using CareBoo.Burst.Delegates; 3 | 4 | namespace CareBoo.Blinq 5 | { 6 | public static partial class Sequence 7 | { 8 | public static ValueSequence< 9 | TResult, 10 | SelectSequence, NativeArray.Enumerator, TResult, TPredicate>, 11 | SelectSequence, NativeArray.Enumerator, TResult, TPredicate>.Enumerator> 12 | Select( 13 | this in NativeArray source, 14 | ValueFunc.Struct selector 15 | ) 16 | where T : struct 17 | where TResult : struct 18 | where TPredicate : struct, IFunc 19 | { 20 | var sourceSeq = source.ToValueSequence(); 21 | return sourceSeq.Select(selector); 22 | } 23 | 24 | public static ValueSequence< 25 | TResult, 26 | SelectSequence, NativeArray.Enumerator, TResult, IgnoreIndex>, 27 | SelectSequence, NativeArray.Enumerator, TResult, IgnoreIndex>.Enumerator> 28 | Select( 29 | this in NativeArray source, 30 | ValueFunc.Struct selector 31 | ) 32 | where T : struct 33 | where TResult : struct 34 | where TPredicate : struct, IFunc 35 | { 36 | var sourceSeq = source.ToValueSequence(); 37 | return sourceSeq.Select(selector); 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/NativeArray/NativeArray.Select.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cac5ce5fa93fc4943bcbebd261690bac 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/NativeArray/NativeArray.SelectMany.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3e5a52c445c1e1944a5ad54dbba8e891 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/NativeArray/NativeArray.SequenceEqual.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 16bee3c5551992f4898be28fb296fb56 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/NativeArray/NativeArray.Single.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bc3b4136fb2f63f47a1e84bf09b2f79d 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/NativeArray/NativeArray.Skip.cs: -------------------------------------------------------------------------------- 1 | using Unity.Collections; 2 | 3 | namespace CareBoo.Blinq 4 | { 5 | public static partial class Sequence 6 | { 7 | public static ValueSequence, NativeArray.Enumerator>, SkipSequence, NativeArray.Enumerator>.Enumerator> Skip( 8 | this in NativeArray source, 9 | int count 10 | ) 11 | where T : struct 12 | { 13 | var sourceSeq = source.ToValueSequence(); 14 | return sourceSeq.Skip(count); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/NativeArray/NativeArray.Skip.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 98907005b59f56348a773478f4b8be7e 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/NativeArray/NativeArray.SkipWhile.cs: -------------------------------------------------------------------------------- 1 | using Unity.Collections; 2 | using CareBoo.Burst.Delegates; 3 | 4 | namespace CareBoo.Blinq 5 | { 6 | public static partial class Sequence 7 | { 8 | public static ValueSequence< 9 | T, 10 | SkipWhileSequence, NativeArray.Enumerator, TPredicate>, 11 | SkipWhileSequence, NativeArray.Enumerator, TPredicate>.Enumerator> 12 | SkipWhile( 13 | this in NativeArray source, 14 | ValueFunc.Struct predicate 15 | ) 16 | where T : struct 17 | where TPredicate : struct, IFunc 18 | { 19 | return source.ToValueSequence().SkipWhile(predicate); 20 | } 21 | 22 | public static ValueSequence< 23 | T, 24 | SkipWhileSequence, NativeArray.Enumerator, IgnoreIndex>, 25 | SkipWhileSequence, NativeArray.Enumerator, IgnoreIndex>.Enumerator> 26 | SkipWhile( 27 | this in NativeArray source, 28 | ValueFunc.Struct predicate 29 | ) 30 | where T : struct 31 | where TPredicate : struct, IFunc 32 | { 33 | return source.ToValueSequence().SkipWhile(predicate); 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/NativeArray/NativeArray.SkipWhile.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d0d572c16e31ff0419011c9109bee898 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/NativeArray/NativeArray.Sum.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d26543ff8f1328e48ab0e3b2d30c7a6f 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/NativeArray/NativeArray.Sum/NativeArray.Sum.gen.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fe164a61510a9434682ba7f51dbcec8b 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/NativeArray/NativeArray.Sum/NativeArray.Sum.tt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0ef5b819213d2934b80c633246e0b456 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/NativeArray/NativeArray.Take.cs: -------------------------------------------------------------------------------- 1 | using Unity.Collections; 2 | 3 | namespace CareBoo.Blinq 4 | { 5 | public static partial class Sequence 6 | { 7 | public static ValueSequence, NativeArray.Enumerator>, TakeSequence, NativeArray.Enumerator>.Enumerator> Take( 8 | this in NativeArray source, 9 | int count 10 | ) 11 | where T : struct 12 | { 13 | return source.ToValueSequence().Take(count); 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/NativeArray/NativeArray.Take.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1c9a4df6abc9e7849b4cc980e2a7da44 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/NativeArray/NativeArray.TakeWhile.cs: -------------------------------------------------------------------------------- 1 | using Unity.Collections; 2 | using CareBoo.Burst.Delegates; 3 | 4 | namespace CareBoo.Blinq 5 | { 6 | public static partial class Sequence 7 | { 8 | public static ValueSequence< 9 | T, 10 | TakeWhileSequence, NativeArray.Enumerator, TPredicate>, 11 | TakeWhileSequence, NativeArray.Enumerator, TPredicate>.Enumerator> 12 | TakeWhile( 13 | this in NativeArray source, 14 | ValueFunc.Struct predicate 15 | ) 16 | where T : struct 17 | where TPredicate : struct, IFunc 18 | { 19 | var sourceSeq = source.ToValueSequence(); 20 | return sourceSeq.TakeWhile(predicate); 21 | } 22 | 23 | public static ValueSequence< 24 | T, 25 | TakeWhileSequence, NativeArray.Enumerator, IgnoreIndex>, 26 | TakeWhileSequence, NativeArray.Enumerator, IgnoreIndex>.Enumerator> 27 | TakeWhile( 28 | this in NativeArray source, 29 | ValueFunc.Struct predicate 30 | ) 31 | where T : struct 32 | where TPredicate : struct, IFunc 33 | { 34 | var sourceSeq = source.ToValueSequence(); 35 | return sourceSeq.TakeWhile(predicate); 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/NativeArray/NativeArray.TakeWhile.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fe56a17be0d4a72488c2b5f31179399a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/NativeArray/NativeArray.ToNativeHashMap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 91ea63c00f129cd4da6aa864bc648663 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/NativeArray/NativeArray.ToNativeHashSet.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 07509e02c1d31894b95cf323cb518ecc 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/NativeArray/NativeArray.ToNativeList.cs: -------------------------------------------------------------------------------- 1 | using Unity.Collections; 2 | using Unity.Jobs; 3 | 4 | namespace CareBoo.Blinq 5 | { 6 | public static partial class Sequence 7 | { 8 | public static NativeList ToNativeList( 9 | this in NativeArray source, 10 | Allocator allocator 11 | ) 12 | where T : struct 13 | { 14 | var result = new NativeList(source.Length, allocator); 15 | result.CopyFrom(source); 16 | return result; 17 | } 18 | 19 | public static NativeList RunToNativeList( 20 | this in NativeArray source, 21 | Allocator allocator 22 | ) 23 | where T : struct 24 | { 25 | return source.ToValueSequence().RunToNativeList(allocator); 26 | } 27 | 28 | public static JobHandle ScheduleToNativeList( 29 | this in NativeArray source, 30 | ref NativeList output 31 | ) 32 | where T : struct 33 | { 34 | return source.ToValueSequence().ScheduleToNativeList(ref output); 35 | } 36 | 37 | public static CollectionJobHandle> ScheduleToNativeList( 38 | this in NativeArray source, 39 | Allocator allocator 40 | ) 41 | where T : struct 42 | { 43 | return source.ToValueSequence().ScheduleToNativeList(allocator); 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/NativeArray/NativeArray.ToNativeList.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ec50a919c61cba74888e2fd4a1d12df4 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/NativeArray/NativeArray.ToValueSequence.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using Unity.Collections; 5 | 6 | namespace CareBoo.Blinq 7 | { 8 | public struct NativeArraySequence : ISequence.Enumerator> 9 | where T : struct 10 | { 11 | readonly NativeArray source; 12 | 13 | public NativeArraySequence(in NativeArray source) 14 | { 15 | this.source = source; 16 | } 17 | 18 | public NativeArray.Enumerator GetEnumerator() 19 | { 20 | return source.GetEnumerator(); 21 | } 22 | 23 | public NativeList ToNativeList(Allocator allocator) 24 | { 25 | var list = new NativeList(source.Length, allocator); 26 | for (var i = 0; i < source.Length; i++) 27 | list.AddNoResize(source[i]); 28 | return list; 29 | } 30 | 31 | IEnumerator IEnumerable.GetEnumerator() 32 | { 33 | return GetEnumerator(); 34 | } 35 | 36 | IEnumerator IEnumerable.GetEnumerator() 37 | { 38 | return GetEnumerator(); 39 | } 40 | } 41 | 42 | public static partial class Sequence 43 | { 44 | public static ValueSequence, NativeArray.Enumerator> ToValueSequence(this in NativeArray nativeArray) 45 | where T : struct 46 | { 47 | var newSequence = new NativeArraySequence(in nativeArray); 48 | return ValueSequence.Enumerator>.New(in newSequence); 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/NativeArray/NativeArray.ToValueSequence.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: faa5a31c4cf1cd547931112250bc10da 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/NativeArray/NativeArray.Union.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using Unity.Collections; 4 | 5 | namespace CareBoo.Blinq 6 | { 7 | public static partial class Sequence 8 | { 9 | public static ValueSequence< 10 | T, 11 | UnionSequence, NativeArray.Enumerator, TSecond, TSecondEnumerator>, 12 | UnionSequence, NativeArray.Enumerator, TSecond, TSecondEnumerator>.Enumerator> 13 | Union( 14 | this in NativeArray source, 15 | in ValueSequence second 16 | ) 17 | where T : unmanaged, IEquatable 18 | where TSecond : struct, ISequence 19 | where TSecondEnumerator : struct, IEnumerator 20 | { 21 | var sourceSeq = source.ToValueSequence(); 22 | return sourceSeq.Union(in second); 23 | } 24 | 25 | public static ValueSequence< 26 | T, 27 | UnionSequence, NativeArray.Enumerator, NativeArraySequence, NativeArray.Enumerator>, 28 | UnionSequence, NativeArray.Enumerator, NativeArraySequence, NativeArray.Enumerator>.Enumerator> 29 | Union( 30 | this in NativeArray source, 31 | in NativeArray second 32 | ) 33 | where T : unmanaged, IEquatable 34 | { 35 | var sourceSeq = source.ToValueSequence(); 36 | return sourceSeq.Union(in second); 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/NativeArray/NativeArray.Union.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: eb8a58735578b464cb3b7405053009f7 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/NativeArray/NativeArray.Where.cs: -------------------------------------------------------------------------------- 1 | using Unity.Collections; 2 | using CareBoo.Burst.Delegates; 3 | 4 | namespace CareBoo.Blinq 5 | { 6 | public static partial class Sequence 7 | { 8 | public static ValueSequence< 9 | T, 10 | WhereSequence, NativeArray.Enumerator, TPredicate>, 11 | WhereSequence, NativeArray.Enumerator, TPredicate>.Enumerator> 12 | Where( 13 | this in NativeArray source, 14 | ValueFunc.Struct predicate 15 | ) 16 | where T : struct 17 | where TPredicate : struct, IFunc 18 | { 19 | var sourceSeq = source.ToValueSequence(); 20 | return sourceSeq.Where(predicate); 21 | } 22 | 23 | public static ValueSequence< 24 | T, 25 | WhereSequence, NativeArray.Enumerator, IgnoreIndex>, 26 | WhereSequence, NativeArray.Enumerator, IgnoreIndex>.Enumerator> 27 | Where( 28 | this in NativeArray source, 29 | ValueFunc.Struct predicate 30 | ) 31 | where T : struct 32 | where TPredicate : struct, IFunc 33 | { 34 | var sourceSeq = source.ToValueSequence(); 35 | return sourceSeq.Where(predicate); 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/NativeArray/NativeArray.Where.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 89a2a1670d15df745a9b4088f8ff82a7 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/NativeArray/NativeArray.Zip.cs: -------------------------------------------------------------------------------- 1 | using Unity.Collections; 2 | using CareBoo.Burst.Delegates; 3 | using System.Collections.Generic; 4 | 5 | namespace CareBoo.Blinq 6 | { 7 | public static partial class Sequence 8 | { 9 | public static ValueSequence< 10 | TResult, 11 | ZipSequence, NativeArray.Enumerator, TSecondElement, TSecond, TSecondEnumerator, TResult, TResultSelector>, 12 | ZipSequence, NativeArray.Enumerator, TSecondElement, TSecond, TSecondEnumerator, TResult, TResultSelector>.Enumerator> 13 | Zip( 14 | this in NativeArray source, 15 | in ValueSequence secondSequence, 16 | ValueFunc.Struct resultSelector 17 | ) 18 | where T : struct 19 | where TSecondElement : struct 20 | where TSecond : struct, ISequence 21 | where TSecondEnumerator : struct, IEnumerator 22 | where TResult : struct 23 | where TResultSelector : struct, IFunc 24 | { 25 | var sourceSeq = source.ToValueSequence(); 26 | return sourceSeq.Zip(in secondSequence, resultSelector); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/NativeArray/NativeArray.Zip.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ad3cd28e098f5894b8dd3fe69874f90d 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/Sequence.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: db6688a20fd2a764ea524a773f9d8531 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/Sequence/Sequence.Empty.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using Unity.Collections; 4 | 5 | namespace CareBoo.Blinq 6 | { 7 | public static partial class Sequence 8 | { 9 | public static ValueSequence, EmptySequence.Enumerator> Empty() 10 | where T : struct 11 | { 12 | var seq = new EmptySequence(); 13 | return ValueSequence.Enumerator>.New(in seq); 14 | } 15 | } 16 | 17 | public struct EmptySequence 18 | : ISequence.Enumerator> 19 | where T : struct 20 | { 21 | public struct Enumerator : IEnumerator 22 | { 23 | public T Current => default; 24 | 25 | object IEnumerator.Current => Current; 26 | 27 | public void Dispose() 28 | { 29 | } 30 | 31 | public bool MoveNext() 32 | { 33 | return false; 34 | } 35 | 36 | public void Reset() 37 | { 38 | } 39 | 40 | } 41 | 42 | public NativeList ToNativeList(Allocator allocator) 43 | { 44 | return new NativeList(allocator); 45 | } 46 | 47 | public Enumerator GetEnumerator() 48 | { 49 | return new Enumerator(); 50 | } 51 | 52 | IEnumerator IEnumerable.GetEnumerator() 53 | { 54 | return GetEnumerator(); 55 | } 56 | 57 | IEnumerator IEnumerable.GetEnumerator() 58 | { 59 | return GetEnumerator(); 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/Sequence/Sequence.Empty.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b598e3e120d495945817a2da09708c15 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/Sequence/Sequence.Range.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using Unity.Collections; 5 | 6 | namespace CareBoo.Blinq 7 | { 8 | public static partial class Sequence 9 | { 10 | public static ValueSequence Range(int start, int count) 11 | { 12 | var seq = new RangeSequence(in start, in count); 13 | return ValueSequence.New(in seq); 14 | } 15 | } 16 | 17 | public struct RangeSequence 18 | : ISequence 19 | { 20 | public struct Enumerator : IEnumerator 21 | { 22 | int start; 23 | int count; 24 | 25 | public Enumerator(int start, int count) 26 | { 27 | this.start = start - 1; 28 | this.count = count; 29 | } 30 | 31 | public int Current => start; 32 | 33 | object IEnumerator.Current => Current; 34 | 35 | public void Dispose() 36 | { 37 | } 38 | 39 | public bool MoveNext() 40 | { 41 | count -= 1; 42 | start += 1; 43 | return count >= 0; 44 | } 45 | 46 | public void Reset() 47 | { 48 | throw new NotSupportedException(); 49 | } 50 | } 51 | 52 | readonly int start; 53 | readonly int count; 54 | 55 | public RangeSequence(in int start, in int count) 56 | { 57 | this.start = start; 58 | this.count = count; 59 | } 60 | 61 | public NativeList ToNativeList(Allocator allocator) 62 | { 63 | var list = new NativeList(count, allocator); 64 | for (var i = 0; i < count; i++) 65 | list.AddNoResize(i + start); 66 | return list; 67 | } 68 | 69 | public Enumerator GetEnumerator() 70 | { 71 | return new Enumerator(start, count); 72 | } 73 | 74 | IEnumerator IEnumerable.GetEnumerator() 75 | { 76 | return GetEnumerator(); 77 | } 78 | 79 | IEnumerator IEnumerable.GetEnumerator() 80 | { 81 | return GetEnumerator(); 82 | } 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/Sequence/Sequence.Range.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8ec2fb4649a6b614fb962d493da72932 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/Sequence/Sequence.Repeat.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fd3f4837003f1224f9c1aa6bb17e4bdc 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/SequenceEnumerator.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using Unity.Collections; 5 | 6 | namespace CareBoo.Blinq 7 | { 8 | public struct SequenceEnumerator 9 | : IEnumerator 10 | where T : struct 11 | where TSequence : INativeListConvertible 12 | { 13 | NativeList list; 14 | NativeArray.Enumerator listEnumerator; 15 | 16 | public SequenceEnumerator( 17 | in TSequence seq 18 | ) 19 | { 20 | list = seq.ToNativeList(Allocator.Temp); 21 | listEnumerator = list.GetEnumerator(); 22 | } 23 | 24 | public T Current => listEnumerator.Current; 25 | 26 | object IEnumerator.Current => Current; 27 | 28 | public void Dispose() 29 | { 30 | list.Dispose(); 31 | listEnumerator.Dispose(); 32 | } 33 | 34 | public bool MoveNext() 35 | { 36 | return listEnumerator.MoveNext(); 37 | } 38 | 39 | public void Reset() 40 | { 41 | throw new NotSupportedException(); 42 | } 43 | } 44 | 45 | public static class SequenceEnumerator 46 | where T : struct 47 | { 48 | public static SequenceEnumerator New(in TSequence sequence) 49 | where TSequence : struct, INativeListConvertible 50 | { 51 | return new SequenceEnumerator(in sequence); 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/SequenceEnumerator.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 43211b56b5fddcdb9b006983ae6fd126 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/UtilFunctions.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c404398e50babc04dad57f25ce9997f2 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/ValueGrouping.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8b31e41c31915bd4e8598866fae531fb 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/ValueSequence.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using Unity.Collections; 4 | 5 | namespace CareBoo.Blinq 6 | { 7 | public struct ValueSequence 8 | : ISequence 9 | where T : struct 10 | where TSource : struct, ISequence 11 | where TEnumerator : struct, IEnumerator 12 | { 13 | public readonly TSource Source; 14 | 15 | public ValueSequence(in TSource source) 16 | { 17 | Source = source; 18 | } 19 | 20 | public TEnumerator GetEnumerator() 21 | { 22 | return Source.GetEnumerator(); 23 | } 24 | 25 | IEnumerator IEnumerable.GetEnumerator() 26 | { 27 | return GetEnumerator(); 28 | } 29 | 30 | IEnumerator IEnumerable.GetEnumerator() 31 | { 32 | return GetEnumerator(); 33 | } 34 | 35 | public NativeList ToNativeList(Allocator allocator) 36 | { 37 | return Source.ToNativeList(allocator); 38 | } 39 | } 40 | 41 | public static class ValueSequence 42 | where T : struct 43 | where TEnumerator : struct, IEnumerator 44 | { 45 | public static ValueSequence New(in TSource source) 46 | where TSource : struct, ISequence 47 | { 48 | return new ValueSequence(in source); 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/ValueSequence.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 91c3f0807b7e7b545ba0bde4283f17b5 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/ValueSequence.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 76563de1d9ea27447bf598a67209aac7 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/ValueSequence/ValueSequence.Aggregate.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4f59c7194d5fcfb408bad283cfbd6eb4 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/ValueSequence/ValueSequence.All.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b6111afd71440fb43bb663e6d0b6c7b3 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/ValueSequence/ValueSequence.Any.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 387ce91f7df86a84886394286965f4e5 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/ValueSequence/ValueSequence.Append.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 509f2c26296a7c542805fc9ac375caf5 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/ValueSequence/ValueSequence.Average.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e46b9551016db25488e3d89b971d33d9 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/ValueSequence/ValueSequence.Average/ValueSequence.Average.gen.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c4f2ca2473366af46bc52739c10bbe74 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/ValueSequence/ValueSequence.Average/ValueSequence.Average.tt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5b9d3e29f4f0e3e4db5ed5cbefc844c3 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/ValueSequence/ValueSequence.CollectionJob.cs: -------------------------------------------------------------------------------- 1 | using Unity.Jobs; 2 | 3 | namespace CareBoo.Blinq 4 | { 5 | public static partial class Sequence 6 | { 7 | public struct CollectionJobHandle 8 | where TResult : struct 9 | { 10 | JobHandle jobHandle; 11 | TResult output; 12 | 13 | public bool IsCompleted => jobHandle.IsCompleted; 14 | 15 | internal CollectionJobHandle(in JobHandle jobHandle, in TResult output) 16 | { 17 | this.jobHandle = jobHandle; 18 | this.output = output; 19 | } 20 | 21 | public TResult Complete() 22 | { 23 | jobHandle.Complete(); 24 | return output; 25 | } 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/ValueSequence/ValueSequence.CollectionJob.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4e66d573b71bf6e4cb2f271c583e7340 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/ValueSequence/ValueSequence.Concat.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 06faa915f57fa014b8d4454a7d77eadd 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/ValueSequence/ValueSequence.Contains.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 170cef609b3b6e4428712e828984d274 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/ValueSequence/ValueSequence.Count.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b0b7b1d357324d445aba27bc29d28dd1 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/ValueSequence/ValueSequence.DefaultIfEmpty.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3f0acb99bfe20be4083cce2e0aa1e499 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/ValueSequence/ValueSequence.Distinct.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1487d397d164b12499b2c3727cac1e28 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/ValueSequence/ValueSequence.ElementAt.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 78525180c7d8a3b479df626f60e65888 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/ValueSequence/ValueSequence.Except.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bb7533bff5873584e952f9ccfd0bd6b6 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/ValueSequence/ValueSequence.First.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cea5be8fdc3bb0a4aa0bd3dd96dc820c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/ValueSequence/ValueSequence.GroupBy.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1a15aad4121538b4793bb3898d6b755c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/ValueSequence/ValueSequence.GroupJoin.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8387138953d59b24bb4ad2aee22a2d04 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/ValueSequence/ValueSequence.Intersect.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b73905f443634e74e834edd2ac8484a4 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/ValueSequence/ValueSequence.Job.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fbf465602d7066545a5237954861591c 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/ValueSequence/ValueSequence.Join.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: aee753c3fc12063469f17d5c0b34f55b 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/ValueSequence/ValueSequence.Last.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8ddb45b5945bd614b957feefcff6d59e 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/ValueSequence/ValueSequence.LongCount.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5c5da1bafe8b8284d8453afe1ba5d773 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/ValueSequence/ValueSequence.MaxMin.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 209234d341c08904585dd455dd5deae5 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/ValueSequence/ValueSequence.MaxMin/ValueSequence.MaxMin.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fadbbeab582af224992d76619a9528e5 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/ValueSequence/ValueSequence.MaxMin/ValueSequence.MaxMin.gen.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 85ec7e933a61e0141bb1a58c0ab851e5 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/ValueSequence/ValueSequence.MaxMin/ValueSequence.MaxMin.tt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4985669ee6ddfbc47b92f9b8188ba2ec 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/ValueSequence/ValueSequence.OrderBy.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a49bf8529d202d247b4df6c872903e86 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/ValueSequence/ValueSequence.OrderByDescending.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8c2c735ab0dc56e43ad7c0e2459dc4c7 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/ValueSequence/ValueSequence.Prepend.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 17343edd1218e04408cd63d059f7cc8d 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/ValueSequence/ValueSequence.Reverse.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using Unity.Collections; 5 | 6 | namespace CareBoo.Blinq 7 | { 8 | public static partial class Sequence 9 | { 10 | public static ValueSequence, SequenceEnumerator>> Reverse( 11 | this in ValueSequence source 12 | ) 13 | where T : struct 14 | where TSource : struct, ISequence 15 | where TSourceEnumerator : struct, IEnumerator 16 | { 17 | var sourceSeq = source.Source; 18 | var seq = new ReverseSequence(in sourceSeq); 19 | return ValueSequence>>.New(in seq); 20 | } 21 | } 22 | 23 | public struct ReverseSequence 24 | : ISequence>> 25 | where T : struct 26 | where TSource : struct, INativeListConvertible 27 | { 28 | readonly TSource source; 29 | 30 | public ReverseSequence(in TSource source) 31 | { 32 | this.source = source; 33 | } 34 | 35 | public SequenceEnumerator> GetEnumerator() 36 | { 37 | return SequenceEnumerator.New(in this); 38 | } 39 | 40 | public NativeList ToNativeList(Allocator allocator) 41 | { 42 | var list = source.ToNativeList(allocator); 43 | for (var i = 0; i < list.Length / 2; i++) 44 | { 45 | var swap = list.Length - 1 - i; 46 | var tmp = list[i]; 47 | list[i] = list[swap]; 48 | list[swap] = tmp; 49 | } 50 | return list; 51 | } 52 | 53 | IEnumerator IEnumerable.GetEnumerator() 54 | { 55 | return GetEnumerator(); 56 | } 57 | 58 | IEnumerator IEnumerable.GetEnumerator() 59 | { 60 | return GetEnumerator(); 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/ValueSequence/ValueSequence.Reverse.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6f7e2e6a849be214ca9cdd7ff97042ca 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/ValueSequence/ValueSequence.Select.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8391b2b88c79d4c4bbcf371833e8d140 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/ValueSequence/ValueSequence.SelectMany.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c35a6e9f052c7a541bbde1ee93e76847 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/ValueSequence/ValueSequence.SequenceEqual.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5b96969241db2944b88675f2062e7304 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/ValueSequence/ValueSequence.Single.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3b09af0271ae15a46905fc34c25cc12a 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/ValueSequence/ValueSequence.Skip.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 00d47ed34d65daa479bdff1f6780b04d 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/ValueSequence/ValueSequence.SkipWhile.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: be711b8ec5274934c9f6558f0d34b44f 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/ValueSequence/ValueSequence.Sum.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e6f8a3d2651a2184a960ed67fefa216a 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/ValueSequence/ValueSequence.Sum/ValueSequence.Sum.gen.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 20e804ea642e11149a0cbcbb81e80d59 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/ValueSequence/ValueSequence.Sum/ValueSequence.Sum.tt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 637019de1b1ba194ebb5aa23c267c509 3 | DefaultImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/ValueSequence/ValueSequence.Take.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1563b5d3ab3553d4d9c359d8a4b9fbc8 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/ValueSequence/ValueSequence.TakeWhile.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 37bf255ece52d754eae63ef09baf112d 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/ValueSequence/ValueSequence.ThenBy.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 77a1ea3a926e60245b5396d30407a5e5 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/ValueSequence/ValueSequence.ThenByDescending.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9d8314cd7c5051543b4e67a076aa7574 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/ValueSequence/ValueSequence.ToNativeArray.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 96c8272305ef91c44b583875db0a0b89 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/ValueSequence/ValueSequence.ToNativeHashMap.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 80f21dc4706d69049995b3f7e4bed843 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/ValueSequence/ValueSequence.ToNativeHashSet.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6844b228ae6b3b24baa769676ac3ba03 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/ValueSequence/ValueSequence.ToNativeList.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 64f8cb87e2cfd0443ab8938246abcd10 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/ValueSequence/ValueSequence.Union.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1d457ba980d405e4abbf92a1b88db831 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/ValueSequence/ValueSequence.Where.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cbeb968e65b745e468d4e9c0b601d631 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/CareBoo.Blinq/ValueSequence/ValueSequence.Zip.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 22171d6ace02eb54886e9b0005b72377 3 | MonoImporter: 4 | externalObjects: {} 5 | serializedVersion: 2 6 | defaultReferences: [] 7 | executionOrder: 0 8 | icon: {instanceID: 0} 9 | userData: 10 | assetBundleName: 11 | assetBundleVariant: 12 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/Documentation~/Blinq.md: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6ad52f54b8e95df428b85a8dde1c4653 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/Documentation~/Blinq.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 741f360f958d41f4da736464f348325e 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/Documentation~/images.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3a7d3acdfd1719944bc2ef34d6312ad0 3 | folderAsset: yes 4 | DefaultImporter: 5 | externalObjects: {} 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/Documentation~/images/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CareBoo/Blinq/e74f89251b56d7b1d374afed01a5b58fa2f49059/Packages/com.careboo.blinq/Documentation~/images/.gitkeep -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/Documentation~/images/example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CareBoo/Blinq/e74f89251b56d7b1d374afed01a5b58fa2f49059/Packages/com.careboo.blinq/Documentation~/images/example.png -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/Documentation~/images/example.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6590b45c639d8bf479493b0339f79ea7 3 | TextureImporter: 4 | internalIDToNameTable: [] 5 | externalObjects: {} 6 | serializedVersion: 11 7 | mipmaps: 8 | mipMapMode: 0 9 | enableMipMap: 1 10 | sRGBTexture: 1 11 | linearTexture: 0 12 | fadeOut: 0 13 | borderMipMap: 0 14 | mipMapsPreserveCoverage: 0 15 | alphaTestReferenceValue: 0.5 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | streamingMipmaps: 0 25 | streamingMipmapsPriority: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -100 37 | wrapU: -1 38 | wrapV: -1 39 | wrapW: -1 40 | nPOTScale: 1 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 0 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spritePixelsToUnits: 100 49 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 50 | spriteGenerateFallbackPhysicsShape: 1 51 | alphaUsage: 1 52 | alphaIsTransparency: 0 53 | spriteTessellationDetail: -1 54 | textureType: 0 55 | textureShape: 1 56 | singleChannelComponent: 0 57 | maxTextureSizeSet: 0 58 | compressionQualitySet: 0 59 | textureFormatSet: 0 60 | applyGammaDecoding: 0 61 | platformSettings: 62 | - serializedVersion: 3 63 | buildTarget: DefaultTexturePlatform 64 | maxTextureSize: 2048 65 | resizeAlgorithm: 0 66 | textureFormat: -1 67 | textureCompression: 1 68 | compressionQuality: 50 69 | crunchedCompression: 0 70 | allowsAlphaSplitting: 0 71 | overridden: 0 72 | androidETC2FallbackOverride: 0 73 | forceMaximumCompressionQuality_BC6H_BC7: 0 74 | spriteSheet: 75 | serializedVersion: 2 76 | sprites: [] 77 | outline: [] 78 | physicsShape: [] 79 | bones: [] 80 | spriteID: 81 | internalID: 0 82 | vertices: [] 83 | indices: 84 | edges: [] 85 | weights: [] 86 | secondaryTextures: [] 87 | spritePackingTag: 88 | pSDRemoveMatte: 0 89 | pSDShowRemoveMatteOption: 0 90 | userData: 91 | assetBundleName: 92 | assetBundleVariant: 93 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/README.md: -------------------------------------------------------------------------------- 1 | Blinq 2 | ===== 3 | 4 | Burst Compatible, deferred, stack-allocated LINQ extensions for `NativeArray`. 5 | 6 | Installation 7 | ------------ 8 | 9 | This project can be installed as a UPM package. The easiest way to install it right now is using the [OpenUPM](https://openupm.com/packages/com.careboo.blinq/). 10 | 11 | Currently, support for the Github Package Registry is broken. See this thread [here](https://forum.unity.com/threads/unable-to-publish-upm-packages-to-github-package-repo-as-of-07-10-2020.985268/#post-6409311) for more information. 12 | 13 | Differences with Linq 14 | --------------------- 15 | 16 | ### Delegates 17 | 18 | The Burst compiler doesn't support C# delegates. To get around this issue, Blinq requires you to create structs that implement the `IFunc` interface. 19 | 20 | ```cs 21 | /*--- Using Linq ---*/ 22 | var selected = myArray.Select(val => val.Item); 23 | 24 | /*--- Using Blinq ---*/ 25 | 26 | // Must define a struct that implements IFunc first... 27 | public struct MySelector : IFunc 28 | { 29 | public int Invoke(MyVal val) => val.Item; 30 | } 31 | 32 | // Then we have to create a ValueFunc referencing our struct 33 | var selector = ValueFunc.New(); 34 | 35 | // Now we can finally call ``Select`` 36 | var selected = myArray.Select(selector); 37 | ``` 38 | 39 | Current work is being made to allow burstable lambdas in the [Burst.Delegates](https://github.com/CareBoo/Burst.Delegates) project (WIP). 40 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/README.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b817a7cf49b50704e8003b338152f4fa 3 | TextScriptImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "com.careboo.blinq", 3 | "displayName": "Blinq", 4 | "version": "3.1.0", 5 | "unity": "2020.1", 6 | "description": "Adds Burst-compatible, LINQ extension methods like Select, Where, and Any to `NativeArray`.", 7 | "dependencies": { 8 | "com.unity.collections": "0.15.0-preview.21", 9 | "com.careboo.burst-delegates": "1.2.0" 10 | }, 11 | "repository": { 12 | "type": "git", 13 | "url": "ssh://git@github.com/CareBoo/Blinq.git", 14 | "directory": "Packages/com.careboo.blinq" 15 | }, 16 | "publishConfig": { 17 | "registry": "https://npm.pkg.github.com/@careboo" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Packages/com.careboo.blinq/package.json.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 72bf47e41bfa8a54bbce745726416035 3 | PackageManifestImporter: 4 | externalObjects: {} 5 | userData: 6 | assetBundleName: 7 | assetBundleVariant: 8 | -------------------------------------------------------------------------------- /Packages/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "com.careboo.burst-delegates": "1.2.0", 4 | "com.unity.burst": "1.5.1", 5 | "com.unity.collections": "0.14.0-preview.16", 6 | "com.unity.ide.vscode": "1.2.3", 7 | "com.unity.package-validation-suite": "0.19.3-preview", 8 | "com.unity.settings-manager": "1.0.3", 9 | "com.unity.test-framework": "1.1.24", 10 | "com.unity.test-framework.performance": "2.8.0-preview", 11 | "com.unity.testtools.codecoverage": "1.0.0", 12 | "com.unity.upm.develop": "0.2.0-preview", 13 | "com.unity.modules.ai": "1.0.0", 14 | "com.unity.modules.androidjni": "1.0.0", 15 | "com.unity.modules.animation": "1.0.0", 16 | "com.unity.modules.assetbundle": "1.0.0", 17 | "com.unity.modules.audio": "1.0.0", 18 | "com.unity.modules.cloth": "1.0.0", 19 | "com.unity.modules.director": "1.0.0", 20 | "com.unity.modules.imageconversion": "1.0.0", 21 | "com.unity.modules.imgui": "1.0.0", 22 | "com.unity.modules.jsonserialize": "1.0.0", 23 | "com.unity.modules.particlesystem": "1.0.0", 24 | "com.unity.modules.physics": "1.0.0", 25 | "com.unity.modules.physics2d": "1.0.0", 26 | "com.unity.modules.screencapture": "1.0.0", 27 | "com.unity.modules.terrain": "1.0.0", 28 | "com.unity.modules.terrainphysics": "1.0.0", 29 | "com.unity.modules.tilemap": "1.0.0", 30 | "com.unity.modules.ui": "1.0.0", 31 | "com.unity.modules.uielements": "1.0.0", 32 | "com.unity.modules.umbra": "1.0.0", 33 | "com.unity.modules.unityanalytics": "1.0.0", 34 | "com.unity.modules.unitywebrequest": "1.0.0", 35 | "com.unity.modules.unitywebrequestassetbundle": "1.0.0", 36 | "com.unity.modules.unitywebrequestaudio": "1.0.0", 37 | "com.unity.modules.unitywebrequesttexture": "1.0.0", 38 | "com.unity.modules.unitywebrequestwww": "1.0.0", 39 | "com.unity.modules.vehicles": "1.0.0", 40 | "com.unity.modules.video": "1.0.0", 41 | "com.unity.modules.vr": "1.0.0", 42 | "com.unity.modules.wind": "1.0.0", 43 | "com.unity.modules.xr": "1.0.0" 44 | }, 45 | "scopedRegistries": [ 46 | { 47 | "name": "package.openupm.com", 48 | "url": "https://package.openupm.com", 49 | "scopes": [ 50 | "com.careboo.burst-delegates", 51 | "com.openupm" 52 | ] 53 | } 54 | ] 55 | } 56 | -------------------------------------------------------------------------------- /ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!11 &1 4 | AudioManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Volume: 1 8 | Rolloff Scale: 1 9 | Doppler Factor: 1 10 | Default Speaker Mode: 2 11 | m_SampleRate: 0 12 | m_DSPBufferSize: 1024 13 | m_VirtualVoiceCount: 512 14 | m_RealVoiceCount: 32 15 | m_SpatializerPlugin: 16 | m_AmbisonicDecoderPlugin: 17 | m_DisableAudio: 0 18 | m_VirtualizeEffects: 1 19 | m_RequestedDSPBufferSize: 0 20 | -------------------------------------------------------------------------------- /ProjectSettings/BurstAotSettings_StandaloneWindows.json: -------------------------------------------------------------------------------- 1 | { 2 | "MonoBehaviour": { 3 | "Version": 3, 4 | "EnableBurstCompilation": true, 5 | "EnableOptimisations": true, 6 | "EnableSafetyChecks": false, 7 | "EnableDebugInAllBuilds": false, 8 | "UsePlatformSDKLinker": false, 9 | "CpuMinTargetX32": 0, 10 | "CpuMaxTargetX32": 0, 11 | "CpuMinTargetX64": 0, 12 | "CpuMaxTargetX64": 0, 13 | "CpuTargetsX32": 6, 14 | "CpuTargetsX64": 72 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!236 &1 4 | ClusterInputManager: 5 | m_ObjectHideFlags: 0 6 | m_Inputs: [] 7 | -------------------------------------------------------------------------------- /ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!55 &1 4 | PhysicsManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 13 7 | m_Gravity: {x: 0, y: -9.81, z: 0} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_BounceThreshold: 2 10 | m_SleepThreshold: 0.005 11 | m_DefaultContactOffset: 0.01 12 | m_DefaultSolverIterations: 6 13 | m_DefaultSolverVelocityIterations: 1 14 | m_QueriesHitBackfaces: 0 15 | m_QueriesHitTriggers: 1 16 | m_EnableAdaptiveForce: 0 17 | m_ClothInterCollisionDistance: 0.1 18 | m_ClothInterCollisionStiffness: 0.2 19 | m_ContactsGeneration: 1 20 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 21 | m_AutoSimulation: 1 22 | m_AutoSyncTransforms: 0 23 | m_ReuseCollisionCallbacks: 0 24 | m_ClothInterCollisionSettingsToggle: 0 25 | m_ClothGravity: {x: 0, y: -9.81, z: 0} 26 | m_ContactPairsMode: 0 27 | m_BroadphaseType: 0 28 | m_WorldBounds: 29 | m_Center: {x: 0, y: 0, z: 0} 30 | m_Extent: {x: 250, y: 250, z: 250} 31 | m_WorldSubdivisions: 8 32 | m_FrictionType: 0 33 | m_EnableEnhancedDeterminism: 0 34 | m_EnableUnifiedHeightmaps: 1 35 | m_SolverType: 0 36 | m_DefaultMaxAngularSpeed: 50 37 | -------------------------------------------------------------------------------- /ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1045 &1 4 | EditorBuildSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Scenes: 8 | - enabled: 1 9 | path: Assets/Demo.unity 10 | guid: 917204bf67496814b8a3aaa5a60614a7 11 | m_configObjects: {} 12 | -------------------------------------------------------------------------------- /ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!159 &1 4 | EditorSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 9 7 | m_ExternalVersionControlSupport: Visible Meta Files 8 | m_SerializationMode: 2 9 | m_LineEndingsForNewScripts: 2 10 | m_DefaultBehaviorMode: 0 11 | m_PrefabRegularEnvironment: {fileID: 0} 12 | m_PrefabUIEnvironment: {fileID: 0} 13 | m_SpritePackerMode: 0 14 | m_SpritePackerPaddingPower: 1 15 | m_EtcTextureCompressorBehavior: 1 16 | m_EtcTextureFastCompressor: 1 17 | m_EtcTextureNormalCompressor: 2 18 | m_EtcTextureBestCompressor: 4 19 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;asmdef;asmref;rsp 20 | m_ProjectGenerationRootNamespace: 21 | m_CollabEditorSettings: 22 | inProgressEnabled: 1 23 | m_EnableTextureStreamingInEditMode: 1 24 | m_EnableTextureStreamingInPlayMode: 1 25 | m_AsyncShaderCompilation: 1 26 | m_EnterPlayModeOptionsEnabled: 0 27 | m_EnterPlayModeOptions: 3 28 | m_ShowLightmapResolutionOverlay: 1 29 | m_UseLegacyProbeSampleCount: 0 30 | m_AssetPipelineMode: 1 31 | m_CacheServerMode: 0 32 | m_CacheServerEndpoint: 33 | m_CacheServerNamespacePrefix: default 34 | m_CacheServerEnableDownload: 1 35 | m_CacheServerEnableUpload: 1 36 | -------------------------------------------------------------------------------- /ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshProjectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | areas: 8 | - name: Walkable 9 | cost: 1 10 | - name: Not Walkable 11 | cost: 1 12 | - name: Jump 13 | cost: 2 14 | - name: 15 | cost: 1 16 | - name: 17 | cost: 1 18 | - name: 19 | cost: 1 20 | - name: 21 | cost: 1 22 | - name: 23 | cost: 1 24 | - name: 25 | cost: 1 26 | - name: 27 | cost: 1 28 | - name: 29 | cost: 1 30 | - name: 31 | cost: 1 32 | - name: 33 | cost: 1 34 | - name: 35 | cost: 1 36 | - name: 37 | cost: 1 38 | - name: 39 | cost: 1 40 | - name: 41 | cost: 1 42 | - name: 43 | cost: 1 44 | - name: 45 | cost: 1 46 | - name: 47 | cost: 1 48 | - name: 49 | cost: 1 50 | - name: 51 | cost: 1 52 | - name: 53 | cost: 1 54 | - name: 55 | cost: 1 56 | - name: 57 | cost: 1 58 | - name: 59 | cost: 1 60 | - name: 61 | cost: 1 62 | - name: 63 | cost: 1 64 | - name: 65 | cost: 1 66 | - name: 67 | cost: 1 68 | - name: 69 | cost: 1 70 | - name: 71 | cost: 1 72 | m_LastAgentTypeID: -887442657 73 | m_Settings: 74 | - serializedVersion: 2 75 | agentTypeID: 0 76 | agentRadius: 0.5 77 | agentHeight: 2 78 | agentSlope: 45 79 | agentClimb: 0.75 80 | ledgeDropHeight: 0 81 | maxJumpAcrossDistance: 0 82 | minRegionArea: 2 83 | manualCellSize: 0 84 | cellSize: 0.16666667 85 | manualTileSize: 0 86 | tileSize: 256 87 | accuratePlacement: 0 88 | debug: 89 | m_Flags: 0 90 | m_SettingNames: 91 | - Humanoid 92 | -------------------------------------------------------------------------------- /ProjectSettings/PackageManagerSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!114 &1 4 | MonoBehaviour: 5 | m_ObjectHideFlags: 61 6 | m_CorrespondingSourceObject: {fileID: 0} 7 | m_PrefabInstance: {fileID: 0} 8 | m_PrefabAsset: {fileID: 0} 9 | m_GameObject: {fileID: 0} 10 | m_Enabled: 1 11 | m_EditorHideFlags: 0 12 | m_Script: {fileID: 13964, guid: 0000000000000000e000000000000000, type: 0} 13 | m_Name: 14 | m_EditorClassIdentifier: 15 | m_EnablePreviewPackages: 1 16 | m_EnablePackageDependencies: 1 17 | m_AdvancedSettingsExpanded: 1 18 | m_ScopedRegistriesSettingsExpanded: 1 19 | oneTimeWarningShown: 1 20 | m_Registries: 21 | - m_Id: main 22 | m_Name: 23 | m_Url: https://packages.unity.com 24 | m_Scopes: [] 25 | m_IsDefault: 1 26 | m_Capabilities: 7 27 | - m_Id: scoped:package.openupm.com 28 | m_Name: package.openupm.com 29 | m_Url: https://package.openupm.com 30 | m_Scopes: 31 | - com.careboo.burst-delegates 32 | - com.openupm 33 | m_IsDefault: 0 34 | m_Capabilities: 0 35 | m_UserSelectedRegistryName: package.openupm.com 36 | m_UserAddingNewScopedRegistry: 0 37 | m_RegistryInfoDraft: 38 | m_ErrorMessage: 39 | m_Original: 40 | m_Id: scoped:package.openupm.com 41 | m_Name: package.openupm.com 42 | m_Url: https://package.openupm.com 43 | m_Scopes: 44 | - com.careboo.burst-delegates 45 | - com.openupm 46 | m_IsDefault: 0 47 | m_Capabilities: 0 48 | m_Modified: 0 49 | m_Name: package.openupm.com 50 | m_Url: https://package.openupm.com 51 | m_Scopes: 52 | - com.careboo.burst-delegates 53 | - com.openupm 54 | m_SelectedScopeIndex: 0 55 | -------------------------------------------------------------------------------- /ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!19 &1 4 | Physics2DSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 4 7 | m_Gravity: {x: 0, y: -9.81} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_VelocityIterations: 8 10 | m_PositionIterations: 3 11 | m_VelocityThreshold: 1 12 | m_MaxLinearCorrection: 0.2 13 | m_MaxAngularCorrection: 8 14 | m_MaxTranslationSpeed: 100 15 | m_MaxRotationSpeed: 360 16 | m_BaumgarteScale: 0.2 17 | m_BaumgarteTimeOfImpactScale: 0.75 18 | m_TimeToSleep: 0.5 19 | m_LinearSleepTolerance: 0.01 20 | m_AngularSleepTolerance: 2 21 | m_DefaultContactOffset: 0.01 22 | m_JobOptions: 23 | serializedVersion: 2 24 | useMultithreading: 0 25 | useConsistencySorting: 0 26 | m_InterpolationPosesPerJob: 100 27 | m_NewContactsPerJob: 30 28 | m_CollideContactsPerJob: 100 29 | m_ClearFlagsPerJob: 200 30 | m_ClearBodyForcesPerJob: 200 31 | m_SyncDiscreteFixturesPerJob: 50 32 | m_SyncContinuousFixturesPerJob: 50 33 | m_FindNearestContactsPerJob: 100 34 | m_UpdateTriggerContactsPerJob: 100 35 | m_IslandSolverCostThreshold: 100 36 | m_IslandSolverBodyCostScale: 1 37 | m_IslandSolverContactCostScale: 10 38 | m_IslandSolverJointCostScale: 10 39 | m_IslandSolverBodiesPerJob: 50 40 | m_IslandSolverContactsPerJob: 50 41 | m_AutoSimulation: 1 42 | m_QueriesHitTriggers: 1 43 | m_QueriesStartInColliders: 1 44 | m_CallbacksOnDisable: 1 45 | m_ReuseCollisionCallbacks: 0 46 | m_AutoSyncTransforms: 0 47 | m_AlwaysShowColliders: 0 48 | m_ShowColliderSleep: 1 49 | m_ShowColliderContacts: 0 50 | m_ShowColliderAABB: 0 51 | m_ContactArrowScale: 0.2 52 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} 53 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} 54 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} 55 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} 56 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 57 | -------------------------------------------------------------------------------- /ProjectSettings/PresetManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1386491679 &1 4 | PresetManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_DefaultPresets: {} 8 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2020.2.7f1 2 | m_EditorVersionWithRevision: 2020.2.7f1 (c53830e277f1) 3 | -------------------------------------------------------------------------------- /ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!78 &1 4 | TagManager: 5 | serializedVersion: 2 6 | tags: [] 7 | layers: 8 | - Default 9 | - TransparentFX 10 | - Ignore Raycast 11 | - 12 | - Water 13 | - UI 14 | - 15 | - 16 | - 17 | - 18 | - 19 | - 20 | - 21 | - 22 | - 23 | - 24 | - 25 | - 26 | - 27 | - 28 | - 29 | - 30 | - 31 | - 32 | - 33 | - 34 | - 35 | - 36 | - 37 | - 38 | - 39 | - 40 | m_SortingLayers: 41 | - name: Default 42 | uniqueID: 0 43 | locked: 0 44 | -------------------------------------------------------------------------------- /ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!5 &1 4 | TimeManager: 5 | m_ObjectHideFlags: 0 6 | Fixed Timestep: 0.02 7 | Maximum Allowed Timestep: 0.33333334 8 | m_TimeScale: 1 9 | Maximum Particle Timestep: 0.03 10 | -------------------------------------------------------------------------------- /ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!310 &1 4 | UnityConnectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 1 7 | m_Enabled: 0 8 | m_TestMode: 0 9 | m_EventOldUrl: https://api.uca.cloud.unity3d.com/v1/events 10 | m_EventUrl: https://cdp.cloud.unity3d.com/v1/events 11 | m_ConfigUrl: https://config.uca.cloud.unity3d.com 12 | m_TestInitMode: 0 13 | CrashReportingSettings: 14 | m_EventUrl: https://perf-events.cloud.unity3d.com 15 | m_Enabled: 0 16 | m_LogBufferSize: 10 17 | m_CaptureEditorExceptions: 1 18 | UnityPurchasingSettings: 19 | m_Enabled: 0 20 | m_TestMode: 0 21 | UnityAnalyticsSettings: 22 | m_Enabled: 0 23 | m_TestMode: 0 24 | m_InitializeOnStartup: 1 25 | UnityAdsSettings: 26 | m_Enabled: 0 27 | m_InitializeOnStartup: 1 28 | m_TestMode: 0 29 | m_IosGameId: 30 | m_AndroidGameId: 31 | m_GameIds: {} 32 | m_GameId: 33 | PerformanceReportingSettings: 34 | m_Enabled: 0 35 | -------------------------------------------------------------------------------- /ProjectSettings/VFXManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!937362698 &1 4 | VFXManager: 5 | m_ObjectHideFlags: 0 6 | m_IndirectShader: {fileID: 0} 7 | m_CopyBufferShader: {fileID: 0} 8 | m_SortShader: {fileID: 0} 9 | m_StripUpdateShader: {fileID: 0} 10 | m_RenderPipeSettingsPath: 11 | m_FixedTimeStep: 0.016666668 12 | m_MaxDeltaTime: 0.05 13 | -------------------------------------------------------------------------------- /ProjectSettings/VersionControlSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!890905787 &1 4 | VersionControlSettings: 5 | m_ObjectHideFlags: 0 6 | m_Mode: Visible Meta Files 7 | m_CollabEditorSettings: 8 | inProgressEnabled: 1 9 | -------------------------------------------------------------------------------- /ProjectSettings/XRSettings.asset: -------------------------------------------------------------------------------- 1 | { 2 | "m_SettingKeys": [ 3 | "VR Device Disabled", 4 | "VR Device User Alert" 5 | ], 6 | "m_SettingValues": [ 7 | "False", 8 | "False" 9 | ] 10 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Blinq 2 | ===== 3 | 4 | > **IMPORTANT**: Blinq is no longer being developed because of limitations to recursive generics. Instead, I recommend taking a look at the [LinqGen](https://github.com/cathei/LinqGen) project. 5 | 6 | Burst Compatible, deferred, stack-allocated LINQ extensions for `NativeArray`. 7 | 8 | Installation 9 | ------------ 10 | 11 | This project can be installed as a UPM package. The easiest way to install it right now is using the [OpenUPM](https://openupm.com/packages/com.careboo.blinq/). 12 | 13 | Currently, support for the Github Package Registry is broken. See this thread [here](https://forum.unity.com/threads/unable-to-publish-upm-packages-to-github-package-repo-as-of-07-10-2020.985268/#post-6409311) for more information. 14 | 15 | Differences with Linq 16 | --------------------- 17 | 18 | ### Delegates 19 | 20 | The Burst compiler doesn't support C# delegates. To get around this issue, Blinq requires you to create structs that implement the `IFunc` interface. The [Burst.Delegates](https://github.com/CareBoo/Burst.Delegates) project has other useful tools to help you implement the `IFunc` interface. 21 | 22 | ```cs 23 | /*--- Using Linq ---*/ 24 | var selected = myArray.Select(val => val.Item); 25 | 26 | /*--- Using Blinq ---*/ 27 | 28 | // Must define a method that can be used as FunctionPointer 29 | [BurstCompile] 30 | public static int SelectItem(MyVal val) => val.Item; 31 | 32 | public static readonly BurstFunc SelectItemFunc = BustFunc.Compile(SelectItem); 33 | 34 | // Now we can finally call ``Select`` 35 | var selected = myArray.Select(SelectItemFunc); 36 | ``` 37 | 38 | -------------------------------------------------------------------------------- /UserSettings/EditorUserSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!162 &1 4 | EditorUserSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 4 7 | m_ConfigSettings: 8 | vcSharedLogLevel: 9 | value: 0d5e400f0650 10 | flags: 0 11 | m_VCAutomaticAdd: 1 12 | m_VCDebugCom: 0 13 | m_VCDebugCmd: 0 14 | m_VCDebugOut: 0 15 | m_SemanticMergeMode: 2 16 | m_VCShowFailedCheckout: 1 17 | m_VCOverwriteFailedCheckoutAssets: 1 18 | m_VCOverlayIcons: 1 19 | m_VCAllowAsyncUpdate: 0 20 | -------------------------------------------------------------------------------- /scripts/coverageAssemblyFilters: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | echo "::set-output name=result::+CareBoo.Blinq*,-CareBoo.Blinq*.Tests,-CareBoo.Blinq*.Samples*" 4 | -------------------------------------------------------------------------------- /scripts/release: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | npm publish \ 4 | --access=public \ 5 | Packages/com.careboo.blinq 6 | --------------------------------------------------------------------------------