Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PABannier/sam3.cpp
/ functions
Functions
893 in github.com/PABannier/sam3.cpp
⨍
Functions
893
◇
Types & classes
184
↓ 144 callers
Function
stbi__get8
stb/stb_image.h:1614
↓ 131 callers
Function
stbi__err
stb/stb_image.h:978
↓ 116 callers
Function
load_ref_f32
tests/test_utils.h:71
↓ 104 callers
Method
numel
tests/test_vit.cpp:18
↓ 50 callers
Function
sam3_load_model
sam3.cpp:3204
↓ 44 callers
Function
stbi__rewind
stb/stb_image.h:886
↓ 41 callers
Function
sam3_dump_state_tensor
sam3.cpp:14408
↓ 40 callers
Function
save_tensor
(path, t)
tests/dump_phase3_reference.py:29
↓ 39 callers
Function
compare_tensors
tests/test_utils.h:107
↓ 39 callers
Function
sam3_layer_norm
sam3.cpp:1041
↓ 39 callers
Function
stbi__get16be
stb/stb_image.h:1694
↓ 38 callers
Function
run_stage_or_die
tests/test_metal_block0_stage_compare.cpp:73
↓ 38 callers
Function
save_tensor
(path, t)
tests/dump_phase5_reference.py:23
↓ 35 callers
Function
sam3_create_state
sam3.cpp:3392
↓ 33 callers
Function
ensure_dir
tests/test_utils.h:161
↓ 33 callers
Function
print_diff_row
tests/test_metal_block_stage_compare.cpp:200
↓ 32 callers
Function
stbi__get32le
stb/stb_image.h:1722
↓ 31 callers
Function
stbi__skip
stb/stb_image.h:1644
↓ 30 callers
Function
sam3_graph_compute
sam3.cpp:1019
↓ 30 callers
Function
stbi__get16le
stb/stb_image.h:1714
↓ 29 callers
Method
n_img_embd
── SAM3 derived helpers ────────────────────────────────────────────
sam3.cpp:179
↓ 26 callers
Function
sam3_encode_image
sam3.cpp:6028
↓ 26 callers
Function
sam3_free_model
sam3.cpp:3350
↓ 23 callers
Function
print_diff_row
tests/test_metal_block0_stage_compare.cpp:139
↓ 23 callers
Function
sam3_name_tensorf
sam3.cpp:1032
↓ 22 callers
Function
save_tensor
Save a tensor as raw float32 binary + shape file.
tests/dump_reference.py:27
↓ 22 callers
Function
save_tensor
Save tensor as .bin + .shape files.
tests/dump_ddec_from_package.py:28
↓ 20 callers
Function
sam3_load_ref_f32_data
sam3.cpp:12559
↓ 20 callers
Function
stbi__get32be
stb/stb_image.h:1704
↓ 20 callers
Function
stbi__malloc
stb/stb_image.h:985
↓ 19 callers
Function
load_ref
tests/test_phase3.cpp:38
↓ 17 callers
Method
numel
tests/test_phase3.cpp:31
↓ 17 callers
Function
sam3_dump_tensor_to_path
sam3.cpp:12433
↓ 17 callers
Function
sam3_load_image
sam3.cpp:12266
↓ 16 callers
Function
compare_vectors
tests/test_metal_win.cpp:113
↓ 16 callers
Function
make_block_name
tests/test_metal_block_stage_compare.cpp:43
↓ 16 callers
Function
now_ms
tests/test_metal_real_profile.cpp:16
↓ 16 callers
Function
stbi__at_eof
stb/stb_image.h:1628
↓ 14 callers
Function
run_prefix_stage_or_die
tests/test_metal_vit_prefix_compare.cpp:37
↓ 13 callers
Function
sam3_sinusoidal_pe_2d
Generates sinusoidal PE matching PositionEmbeddingSine from Python. num_pos_feats = d_model / 2 = 128, temperature = 10000, normalize = true, scale =
sam3.cpp:3601
↓ 13 callers
Function
save
(name, t)
tests/dump_sam2_pvs_reference.py:23
↓ 13 callers
Function
save_tensor
(path, t)
tests/dump_vit_reference.py:122
↓ 13 callers
Function
save_tensor
Save tensor as .bin + .shape (PyTorch native layout).
tests/dump_fenc_from_package.py:122
↓ 12 callers
Function
print_diff_row
tests/test_metal_vit_prefix_compare.cpp:76
↓ 12 callers
Function
save_ggml_sbd
Save [S, B, D] (seq-first) as ggml [D, S, B].
tests/dump_geom_encoder_reference.py:57
↓ 12 callers
Function
slice_first_columns
tests/test_metal_block_stage_compare.cpp:135
↓ 12 callers
Function
stbi__grow_buffer_unsafe
stb/stb_image.h:2075
↓ 12 callers
Function
stbi__zreceive
stb/stb_image.h:4214
↓ 11 callers
Function
run_linear_host_ref_or_die
tests/test_metal_block_stage_compare.cpp:100
↓ 11 callers
Function
run_stage_or_die
tests/test_metal_block_stage_compare.cpp:80
↓ 11 callers
Function
sam3_decode_video_frame
sam3.cpp:12288
↓ 11 callers
Function
sam3_segment_pvs
sam3.cpp:10765
↓ 11 callers
Function
save_ggml_2d
(path: str, t_td: torch.Tensor)
tests/dump_phase4_reference.py:57
↓ 10 callers
Function
fuse_conv_bn
Fuse a standard Conv + BN pair. Returns (weight, bias) as numpy arrays.
convert_edgetam_to_ggml.py:178
↓ 10 callers
Function
load_ref
tests/test_vit.cpp:25
↓ 10 callers
Function
make_block_name
tests/test_metal_vit_upstream_compare.cpp:48
↓ 10 callers
Function
sam3_bilinear_interpolate
Bilinear interpolation of a flat mask [H_in * W_in] to [H_out * W_out]. Uses double for coordinate math to match PyTorch F.interpolate precision.
sam3.cpp:9618
↓ 10 callers
Function
sam3_encode_image_from_preprocessed
Test-only: encode from pre-preprocessed float data (bypasses C++ resize/normalize). chw_data is in [C, H, W] layout, already normalized, with C=3, H=W
sam3.cpp:7001
↓ 10 callers
Function
sam3_read_f32
Read tensor data from backend into a float buffer, handling F32, F16, and quantized types. n = number of float elements to produce.
sam3.cpp:1069
↓ 10 callers
Function
sam3_reorder_nchw_to_ggml_dwh
sam3.cpp:12600
↓ 10 callers
Function
stbi__blinn_8x8
fast 0..255 * 0..255 => 0..255 rounded multiplication
stb/stb_image.h:3859
↓ 10 callers
Function
stbi__malloc_mad3
stb/stb_image.h:1055
↓ 9 callers
Function
_cpu_override
(orig_fn)
tests/dump_fenc_from_package.py:87
↓ 9 callers
Function
edgetam_conv2d_bias
Conv2d bias addition helper: adds bias [ch] to conv output [W, H, ch, B]
sam3.cpp:4681
↓ 9 callers
Method
encode
(self, text, context_length=32)
scripts/verify_tokenizer.py:120
↓ 9 callers
Function
ends_with
tests/test_phase4.cpp:26
↓ 9 callers
Method
is_edgetam
── EdgeTAM derived helpers ────────────────────────────────────────
sam3.cpp:191
↓ 9 callers
Method
is_sam2
── SAM2 derived helpers ────────────────────────────────────────────
sam3.cpp:196
↓ 9 callers
Function
slice_column_range
tests/test_metal_block_stage_compare.cpp:157
↓ 9 callers
Function
stbi__get_marker
if there's a pending marker from the entropy stream, return that otherwise, fetch from the stream and get a marker. if there's no marker, return 0xff,
stb/stb_image.h:2919
↓ 9 callers
Function
stbiw__jpg_processDU
stb/stb_image_write.h:1328
↓ 9 callers
Function
stbiw__jpg_writeBits
stb/stb_image_write.h:1253
↓ 8 callers
Function
add_ref
tests/test_metal_block0_stage_compare.cpp:125
↓ 8 callers
Function
compare_flat
Compare raw flat data (same byte layout between Python and C++)
tests/test_e2e_pcs.cpp:82
↓ 8 callers
Function
print_tensor_info
tests/test_metal_flash_attn_ext_block15_compare.cpp:463
↓ 8 callers
Function
run_conv_2d_dw
tests/test_metal_conv_dw.cpp:19
↓ 8 callers
Function
run_win_part_only
Run win_part only (no roundtrip) — compare intermediate output.
tests/test_metal_win.cpp:70
↓ 8 callers
Function
run_win_roundtrip
Run a graph: build win_part -> win_unpart on the given backend. Returns the final output as a flat float vector.
tests/test_metal_win.cpp:21
↓ 8 callers
Function
sam3_apply_rope
Apply RoPE to Q and K tensors using complex multiplication. x shape: [head_dim, N, num_heads*B] in ggml layout freqs_cis shape: [2, 32, N] in ggml lay
sam3.cpp:3671
↓ 8 callers
Function
sam3_get_model_tensor_info
sam3.cpp:14419
↓ 8 callers
Function
sam3_save_mask
sam3.cpp:12282
↓ 8 callers
Function
sam3_tracker_add_instance
sam3.cpp:12017
↓ 8 callers
Function
save_ggml_nchw
(path: str, x_nchw: torch.Tensor)
tests/dump_phase7_reference.py:101
↓ 8 callers
Function
stbi__clamp
take a -128..127 value and stbi__clamp it and convert to 0..255
stb/stb_image.h:2416
↓ 8 callers
Function
stbi__convert_format
stb/stb_image.h:1755
↓ 8 callers
Function
stbi__mad3sizes_valid
returns 1 if "a*b*c + add" has no negative terms/factors and doesn't overflow
stb/stb_image.h:1031
↓ 8 callers
Function
stbiw__putc
stb/stb_image_write.h:394
↓ 7 callers
Function
attention_forward
( q_in: torch.Tensor, k_in: torch.Tensor, v_in: torch.Tensor, prefix: str, weights: Dict[s
tests/dump_phase7_reference.py:219
↓ 7 callers
Function
compare_tensors
Compare two float arrays with tolerance. Returns max absolute difference.
tests/test_vit.cpp:60
↓ 7 callers
Method
feat_size
Feature size for the active backbone
sam3.cpp:234
↓ 7 callers
Function
sam3_extract_obj_ptr_cpu
Extract object pointer from SAM output token via 3-layer MLP (CPU-side).
sam3.cpp:9348
↓ 7 callers
Function
sam3_store_obj_ptr
sam3.cpp:11717
↓ 7 callers
Function
save_ggml_bnd
(path: str, x_bnd: torch.Tensor)
tests/dump_phase6_reference.py:59
↓ 7 callers
Function
save_raw
(path: str, arr: np.ndarray, shape)
tests/dump_geom_encoder_reference.py:41
↓ 7 callers
Function
stbi__compute_y
stb/stb_image.h:1746
↓ 7 callers
Function
stbi__start_callbacks
initialize a callback-based context
stb/stb_image.h:836
↓ 7 callers
Function
stbi__start_mem
initialize a memory-decode context
stb/stb_image.h:826
↓ 6 callers
Function
compare_tensors
tests/test_phase3.cpp:77
↓ 6 callers
Function
decode_and_track
examples/main_video.cpp:239
↓ 6 callers
Function
edgetam_conv1x1_mulmat
1×1 convolution as mul_mat: avoids im2col+cont overhead. Input x: [W, H, Cin, 1], weight w: [1, 1, Cin, Cout], bias b: [Cout] Returns: [W, H, Cout, 1]
sam3.cpp:4693
next →
1–100 of 893, ranked by callers