11.12. Only NTTP
The ONLY_NTTP module provides the [only_nttp] function annotation — a
guard for benchmark kernels. Compilation fails if the annotated function
calls a call-based extern that is not bound through addExternInline
(the NTTP interpreter node flavor), naming the offending call. This keeps a
measured fastpath honest: a silently downgraded binding cannot skew the
benchmark.
All functions and symbols are in “only_nttp” module, use require to get access to it.
require daslib/only_nttp
11.12.1. Function annotations
- only_nttp
Fails the compile when the annotated function calls an extern not bound with addExternInline.
11.12.2. Classes
- OnlyNttpAnnotation : AstFunctionAnnotation
class OnlyNttpAnnotation
- OnlyNttpAnnotation.patch(func: FunctionPtr; group: ModuleGroup; args: AnnotationArgumentList; progArgs: AnnotationArgumentList; errors: das_string; astChanged: bool& ): bool
def patch : function<(var self:ast::AstFunctionAnnotation;var func:ast_core::Function? aka FunctionPtr -const;var group:rtti_core::ModuleGroup -const;args:rtti_core::AnnotationArgumentList const;progArgs:rtti_core::AnnotationArgumentList const;var errors:$::das_string -const;var astChanged:bool& -const):bool>
- Arguments:
func : FunctionPtr
group : ModuleGroup
args : AnnotationArgumentList
progArgs : AnnotationArgumentList
errors : das_string
astChanged : bool&