Skip to content

Commit

Permalink
Merge pull request #668 from zickgraf/precompile_LinearAlgebra
Browse files Browse the repository at this point in the history
Precompile more operations of LinearAlgebraForCAP
  • Loading branch information
zickgraf authored May 17, 2021
2 parents c95b6ab + b02b07f commit 5b8ac73
Show file tree
Hide file tree
Showing 7 changed files with 1,465 additions and 262 deletions.
33 changes: 28 additions & 5 deletions CompilerForCAP/examples/PrecompileLinearAlgebraForCAP.g
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,34 @@ category_constructor := field -> MATRIX_CATEGORY( field );;
given_arguments := [ QQ ];;
compiled_category_name := "MatrixCategoryPrecompiled";;
package_name := "LinearAlgebraForCAP";;
operations := [
"AdditionForMorphisms",
"PreCompose",
"KernelEmbedding",
];;
operations := Intersection(
ListInstalledOperationsOfCategory( category_constructor( QQ ) ),
CAP_JIT_INTERNAL_SAFE_OPERATIONS
);;
# exclude some operations which currently do not yield nice results
operations := Filtered( operations,
o -> PositionSublist( o, "FiberProduct" ) = fail );;
operations := Filtered( operations,
o -> PositionSublist( o, "Pushout" ) = fail );;
operations := Filtered( operations,
o -> PositionSublist( o, "Image" ) = fail );;
operations := Filtered( operations,
o -> PositionSublist( o, "Coimage" ) = fail );;
operations := Filtered( operations,
o -> PositionSublist( o, "DirectProduct" ) = fail );;
operations := Filtered( operations,
o -> PositionSublist( o, "Coproduct" ) = fail );;
operations := Filtered( operations,
o -> PositionSublist( o, "TerminalObject" ) = fail );;
operations := Filtered( operations,
o -> PositionSublist( o, "InitialObject" ) = fail );;
operations := Difference( operations, [ "DirectSumCodiagonalDifference" ] );;
operations := Difference( operations, [ "DirectSumDiagonalDifference" ] );;
operations := Difference( operations, [ "HomologyObject" ] );;
# IsEqualForMorphismsOnMor causes problems in GAP 4.11 (see GAP issue #4449)
operations := Difference( operations, [ "IsEqualForMorphismsOnMor" ] );;
operations := Difference( operations, [ "IsIdenticalToIdentityMorphism" ] );;
operations := Difference( operations, [ "IsIdenticalToZeroMorphism" ] );;

filepath := "precompiled_categories/MatrixCategoryPrecompiled.gi";;
old_file_content := ReadFileFromPackageForHomalg( package_name, filepath );;
Expand Down
Loading

0 comments on commit 5b8ac73

Please sign in to comment.