Goto Chapter: Top 1 2 3 4 5 6 7 8 Ind
 [Top of Book]  [Contents]   [Previous Chapter]   [Next Chapter] 

4 Precompilation

4 Precompilation

#@if ValueOption( "no_precompiled_code" ) <> true
gap> LoadPackage( "FpCategories", false );
true
gap> LoadPackage( "CompilerForCAP", ">= 2024.07-09", false );
true
gap> ReadPackageOnce( "FpCategories", "gap/CompilerLogic.gi" );
true
gap> ReadPackageOnce( "FinSetsForCAP", "gap/CompilerLogic.gi" );
true
gap> category_constructor :=
>   function( quiver )
>     local sFinSets; sFinSets := SkeletalCategoryOfFiniteSets( : FinalizeCategory := true ); return CategoryFromNerveData( PathCategory( quiver : range_of_HomStructure := sFinSets, FinalizeCategory := true ) ); end;;
gap> given_arguments := [ FinQuiver( "q(a,b)[m:a->b]" ) ];;
gap> compiled_category_name := "CategoryFromNerveDataPrecompiled";;
gap> package_name := "FpCategories";;
gap> CapJitPrecompileCategoryAndCompareResult(
>     category_constructor,
>     given_arguments,
>     package_name,
>     compiled_category_name
>         : operations := Difference( ListPrimitivelyInstalledOperationsOfCategory( category_constructor( given_arguments[1] : no_precompiled_code := true ) ),
>                                 [ "HomomorphismStructureOnMorphismsWithGivenObjects" ] ) );;
gap> CategoryFromNerveDataPrecompiled( given_arguments[1] );
PathCategory( FinQuiver( "q(a,b)[m:a-≻b]" ) )
gap> CategoryFromNerveData( PathCategory( given_arguments[1] ) )!.precompiled_functions_added;
true
#@fi
 [Top of Book]  [Contents]   [Previous Chapter]   [Next Chapter] 
Goto Chapter: Top 1 2 3 4 5 6 7 8 Ind

generated by GAPDoc2HTML