Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/0b01/tensorscript
/ functions
Functions
219 in github.com/0b01/tensorscript
⨍
Functions
219
◇
Types & classes
73
↓ 45 callers
Method
collect
(&mut self, typed_term: &TyTerm)
trsc/src/typing/constraint.rs:42
↓ 43 callers
Method
as_str
(&self)
trsc/src/typing/type_env.rs:30
↓ 32 callers
Method
add
(&mut self, a: Type, b: Type)
trsc/src/typing/constraint.rs:37
↓ 28 callers
Method
resolve_type
resolve the type of an identifier first check current mod name, if it doesn not exist, then check in the global scope
trsc/src/typing/type_env.rs:155
↓ 23 callers
Method
convert_span
(&self, sp: &PestSpan)
trsc/src/span.rs:22
↓ 16 callers
Method
apply_ty
(&mut self, ty: &Type)
trsc/src/typing/unifier.rs:228
↓ 15 callers
Method
fresh_var
create new type variable
trsc/src/typing/type_env.rs:122
↓ 14 callers
Method
as_num
(&self)
trsc/src/typing/types.rs:244
↓ 12 callers
Method
module
get current module name
trsc/src/typing/type_env.rs:391
↓ 12 callers
Method
span
(&self)
trsc/src/typing/types.rs:129
↓ 11 callers
Method
add_type
add type alias in current scope
trsc/src/typing/type_env.rs:194
↓ 11 callers
Method
consume
(&self, pair: Pair<Rule>)
trsc/src/parsing/ast_builder.rs:80
↓ 10 callers
Method
print_errs
(&self)
trsc/src/errors/emitter.rs:28
↓ 10 callers
Method
to_btreemap
(&self)
trsc/src/typing/typed_term.rs:239
↓ 10 callers
Method
with_span
modifies the span parameter in type to the most relevant
trsc/src/typing/types.rs:206
↓ 9 callers
Method
collect
(&mut self, term: &TyTerm)
trsc/src/codegen/pytorch.rs:390
↓ 9 callers
Method
set_module
set current module name
trsc/src/typing/type_env.rs:396
↓ 8 callers
Method
indent
(&mut self)
trsc/src/codegen/pytorch.rs:58
↓ 8 callers
Method
to_ty
(&self, span: &ByteSpan)
trsc/src/typing/typed_term.rs:225
↓ 8 callers
Method
unify
(&mut self, cs: Constraints)
trsc/src/typing/unifier.rs:26
↓ 6 callers
Method
as_vec
(&self)
trsc/src/typing/types.rs:153
↓ 6 callers
Method
cond
(self, i, _)
misc/tf_fizzbuzz.py:24
↓ 6 callers
Method
ty
(&self)
trsc/src/typing/typed_term.rs:50
↓ 5 callers
Method
annotate
(&self, term: &Term)
trsc/src/typing/annotate.rs:29
↓ 5 callers
Method
as_string
(&self)
trsc/src/typing/types.rs:233
↓ 5 callers
Method
shift_tab
(&mut self)
trsc/src/codegen/pytorch.rs:67
↓ 5 callers
Method
tab
(&mut self)
trsc/src/codegen/pytorch.rs:63
↓ 4 callers
Method
add
(&mut self, e: Diag)
trsc/src/errors/emitter.rs:24
↓ 4 callers
Method
annotate_fn_ty_sig
(&self, modname: String, name: String, sig: &FnTySig, span: &ByteSpan)
trsc/src/typing/annotate.rs:318
↓ 4 callers
Method
build_fn_app
(&self, pair: Pair<Rule>)
trsc/src/parsing/ast_builder.rs:275
↓ 4 callers
Method
build_fn_ty_sig
(&self, pair: Pair<Rule>)
trsc/src/parsing/ast_builder.rs:552
↓ 4 callers
Method
create_tensor
make a new tensor based on type signature
trsc/src/typing/type_env.rs:303
↓ 4 callers
Method
find
(&self, path_name: &str, mod_name: &str)
trsc/src/core/mod.rs:84
↓ 4 callers
Method
is_empty
(&self)
trsc/src/typing/constraint.rs:33
↓ 4 callers
Method
pop_scope
exiting block during tree traversal
trsc/src/typing/type_env.rs:141
↓ 4 callers
Function
subs
(typed_term: &TyTerm, s: &mut Substitution)
trsc/src/typing/inferred_ast.rs:7
↓ 4 callers
Method
unify_var
(&mut self, tvar: TypeId, ty: Type)
trsc/src/typing/unifier.rs:174
↓ 3 callers
Method
annotate_fn_app_arg
(&self, call: &FnAppArg)
trsc/src/typing/annotate.rs:392
↓ 3 callers
Method
as_args_map
(&self)
trsc/src/typing/types.rs:161
↓ 3 callers
Method
build_dim_tsr_assign
(&self, pair: Pair<Rule>)
trsc/src/parsing/ast_builder.rs:501
↓ 3 callers
Method
collect_term
(&mut self, term: &TyTerm, var: Option<String>, is_stmt: bool)
trsc/src/codegen/pytorch.rs:104
↓ 3 callers
Method
is_resolved
(&self)
trsc/src/typing/types.rs:260
↓ 3 callers
Method
run
(self)
misc/tf_fizzbuzz.py:19
↓ 2 callers
Method
_process_level
(&self, curr: Pair<Rule>)
trsc/src/parsing/ast_builder.rs:364
↓ 2 callers
Method
add_dim_alias
tie an alias with a type variable dimension
trsc/src/typing/type_env.rs:264
↓ 2 callers
Method
annotate_field_access
(&self, f_a: &FieldAccess)
trsc/src/typing/annotate.rs:545
↓ 2 callers
Method
annotate_tensor_ty_sig
(&self, sig: &TensorTy, _span: &ByteSpan)
trsc/src/typing/annotate.rs:328
↓ 2 callers
Method
as_rank
(&self)
trsc/src/typing/types.rs:252
↓ 2 callers
Method
build_field_access
(&self, pair: Pair<Rule>)
trsc/src/parsing/ast_builder.rs:140
↓ 2 callers
Method
build_fn_app_args
(&self, pair: Pair<Rule>)
trsc/src/parsing/ast_builder.rs:305
↓ 2 callers
Method
collect_fn_app
(&mut self, fn_app: &TyFnApp)
trsc/src/typing/constraint.rs:191
↓ 2 callers
Method
exists
check if an alias exists
trsc/src/typing/type_env.rs:350
↓ 2 callers
Method
extend_arg
(&mut self, arg: &TyFnAppArg)
trsc/src/typing/typed_term.rs:201
↓ 2 callers
Method
find_mod
(&self, mod_name:&str)
trsc/src/core/mod.rs:89
↓ 2 callers
Method
first_arg_ty
returns the first argument type of a function argument
trsc/src/typing/types.rs:193
↓ 2 callers
Method
fresh_dim
create new dimension type variable
trsc/src/typing/type_env.rs:116
↓ 2 callers
Method
gen_fn_app
(&self, name: &str, args: &[TyFnAppArg])
trsc/src/core/lin.rs:95
↓ 2 callers
Method
generate
(&mut self)
trsc/src/codegen/pytorch.rs:81
↓ 2 callers
Method
generate_fn
(&mut self)
trsc/src/codegen/pytorch.rs:132
↓ 2 callers
Method
generate_fn_decl_head
(&mut self, name: &str, func: &TyFnDecl)
trsc/src/codegen/pytorch.rs:287
↓ 2 callers
Method
get_scoped_types
iterate over scopes and find the alias in each
trsc/src/typing/type_env.rs:167
↓ 2 callers
Function
get_str_attr
(keyname: &'static str, attrs: &'a [syn::Attribute])
trsc_core_derive/src/attrs.rs:38
↓ 2 callers
Method
import_module
import module type and associated methods into type environment
trsc/src/typing/type_env.rs:401
↓ 2 callers
Method
import_node_assign
create aliases for an untyped AST node assign
trsc/src/typing/type_env.rs:356
↓ 2 callers
Method
import_top_level_ty_sig
(&mut self, mod_name: &ModName, ty_sig: &TensorTy)
trsc/src/typing/type_env.rs:376
↓ 2 callers
Function
parse
(path: &str, name: &str, toks: &[Token])
trsc_core_derive/src/parser.rs:74
↓ 2 callers
Method
push_scope
push scope onto stack during tree traversal
trsc/src/typing/type_env.rs:128
↓ 2 callers
Method
push_scope_collection
during constraint collection, push the popped scopes back
trsc/src/typing/type_env.rs:134
↓ 2 callers
Method
resolve_tensor
generate a tensor from untyped ast tensor signature
trsc/src/typing/type_env.rs:335
↓ 2 callers
Method
resolve_unresolved
( &mut self, ty: &Type, fn_name: &str, arg_ty: Type, ret_ty: Type,
trsc/src/typing/type_env.rs:426
↓ 2 callers
Function
subs_fn_app_arg
(a: &TyFnAppArg, s: &mut Substitution)
trsc/src/typing/inferred_ast.rs:112
↓ 2 callers
Function
unexpected_token
(pair: &Pair<Rule>)
trsc/src/parsing/ast_builder.rs:602
↓ 2 callers
Function
unwrap_dim
(in_dim: &TyTerm)
trsc/src/core/lin.rs:122
↓ 1 callers
Method
__init__
(self)
trsc/tests/output/gan.py:27
↓ 1 callers
Method
add_init
add stateful initialization in current scope
trsc/src/typing/type_env.rs:254
↓ 1 callers
Method
add_resolved_dim_alias
tie an alias with a resolved dimension
trsc/src/typing/type_env.rs:270
↓ 1 callers
Method
add_tsr_alias
tie an alias with a tensor
trsc/src/typing/type_env.rs:282
↓ 1 callers
Method
add_type_allow_replace
add type alias in current scope(allows replacement)
trsc/src/typing/type_env.rs:221
↓ 1 callers
Method
annotate_decl
(&self, decl: &Decl)
trsc/src/typing/annotate.rs:199
↓ 1 callers
Method
annotate_fn_app
(&self, fn_app: &FnApp)
trsc/src/typing/annotate.rs:402
↓ 1 callers
Method
annotate_fn_decl
(&self, f: &FnDecl)
trsc/src/typing/annotate.rs:421
↓ 1 callers
Method
annotate_fn_decl_param
(&self, p: &FnDeclParam)
trsc/src/typing/annotate.rs:528
↓ 1 callers
Method
annotate_pipes
(&self, pipes: &[Term])
trsc/src/typing/annotate.rs:115
↓ 1 callers
Method
annotate_tuples
(&self, tup: &[Term], s: &ByteSpan)
trsc/src/typing/annotate.rs:104
↓ 1 callers
Method
annotate_view_fn
(&self, v_fn: &ViewFn, arg: &TyFnAppArg)
trsc/src/typing/annotate.rs:185
↓ 1 callers
Method
annotate_weights_assign
(&self, w_assign: &WeightsAssign)
trsc/src/typing/annotate.rs:348
↓ 1 callers
Method
apply
apply substitution to a set of constraints
trsc/src/typing/unifier.rs:217
↓ 1 callers
Method
as_diagnostic
(&self, code_map: &CodeMap)
trsc/src/errors/diagnostic.rs:20
↓ 1 callers
Method
as_mod_name
(&self)
trsc/src/typing/types.rs:226
↓ 1 callers
Method
build_block
(&self, pair: Pair<Rule>)
trsc/src/parsing/ast_builder.rs:111
↓ 1 callers
Method
build_expr
(&self, pair: Pair<Rule>)
trsc/src/parsing/ast_builder.rs:160
↓ 1 callers
Method
build_float_lit
(&self, pair: Pair<Rule>)
trsc/src/parsing/ast_builder.rs:540
↓ 1 callers
Method
build_fn_app_arg
(&self, pair: Pair<Rule>)
trsc/src/parsing/ast_builder.rs:292
↓ 1 callers
Method
build_fn_app_param
(&self, pair: Pair<Rule>)
trsc/src/parsing/ast_builder.rs:129
↓ 1 callers
Method
build_fn_decl
(&self, pair: Pair<Rule>)
trsc/src/parsing/ast_builder.rs:184
↓ 1 callers
Method
build_fn_decl_param
(&self, pair: Pair<Rule>)
trsc/src/parsing/ast_builder.rs:243
↓ 1 callers
Method
build_fn_decl_params
(&self, pair: Pair<Rule>)
trsc/src/parsing/ast_builder.rs:261
↓ 1 callers
Method
build_fn_decls
(&self, pair: Pair<Rule>)
trsc/src/parsing/ast_builder.rs:237
↓ 1 callers
Method
build_graph_decl
(&self, pair: Pair<Rule>)
trsc/src/parsing/ast_builder.rs:435
↓ 1 callers
Method
build_graph_decl_body
(&self, pair: Pair<Rule>)
trsc/src/parsing/ast_builder.rs:458
next →
1–100 of 219, ranked by callers