Skip to content

Commit 5b8ac73

Browse files
authored
Merge pull request #668 from zickgraf/precompile_LinearAlgebra
Precompile more operations of LinearAlgebraForCAP
2 parents c95b6ab + b02b07f commit 5b8ac73

File tree

7 files changed

+1465
-262
lines changed

7 files changed

+1465
-262
lines changed

CompilerForCAP/examples/PrecompileLinearAlgebraForCAP.g

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,34 @@ category_constructor := field -> MATRIX_CATEGORY( field );;
1313
given_arguments := [ QQ ];;
1414
compiled_category_name := "MatrixCategoryPrecompiled";;
1515
package_name := "LinearAlgebraForCAP";;
16-
operations := [
17-
"AdditionForMorphisms",
18-
"PreCompose",
19-
"KernelEmbedding",
20-
];;
16+
operations := Intersection(
17+
ListInstalledOperationsOfCategory( category_constructor( QQ ) ),
18+
CAP_JIT_INTERNAL_SAFE_OPERATIONS
19+
);;
20+
# exclude some operations which currently do not yield nice results
21+
operations := Filtered( operations,
22+
o -> PositionSublist( o, "FiberProduct" ) = fail );;
23+
operations := Filtered( operations,
24+
o -> PositionSublist( o, "Pushout" ) = fail );;
25+
operations := Filtered( operations,
26+
o -> PositionSublist( o, "Image" ) = fail );;
27+
operations := Filtered( operations,
28+
o -> PositionSublist( o, "Coimage" ) = fail );;
29+
operations := Filtered( operations,
30+
o -> PositionSublist( o, "DirectProduct" ) = fail );;
31+
operations := Filtered( operations,
32+
o -> PositionSublist( o, "Coproduct" ) = fail );;
33+
operations := Filtered( operations,
34+
o -> PositionSublist( o, "TerminalObject" ) = fail );;
35+
operations := Filtered( operations,
36+
o -> PositionSublist( o, "InitialObject" ) = fail );;
37+
operations := Difference( operations, [ "DirectSumCodiagonalDifference" ] );;
38+
operations := Difference( operations, [ "DirectSumDiagonalDifference" ] );;
39+
operations := Difference( operations, [ "HomologyObject" ] );;
40+
# IsEqualForMorphismsOnMor causes problems in GAP 4.11 (see GAP issue #4449)
41+
operations := Difference( operations, [ "IsEqualForMorphismsOnMor" ] );;
42+
operations := Difference( operations, [ "IsIdenticalToIdentityMorphism" ] );;
43+
operations := Difference( operations, [ "IsIdenticalToZeroMorphism" ] );;
2144

2245
filepath := "precompiled_categories/MatrixCategoryPrecompiled.gi";;
2346
old_file_content := ReadFileFromPackageForHomalg( package_name, filepath );;

0 commit comments

Comments
 (0)