View source: R/kernel_registry.R
| register_kernel | R Documentation |
Registers a named kernel implementation that can be selected by
shard_map(..., kernel = "name").
register_kernel(
name,
impl,
signature = NULL,
footprint = NULL,
supports_views = TRUE,
description = NULL
)
name |
Kernel name (string). |
impl |
Function implementing the kernel. It must accept the shard descriptor as its first argument. |
signature |
Optional short signature string for documentation. |
footprint |
Optional footprint hint. Either a constant (bytes) or a
function |
supports_views |
Logical. Whether the kernel is intended to operate on shard views without slice materialization. |
description |
Optional human-readable description. |
A "kernel" is just a function that shard_map can call for each shard. The registry lets shard_map attach additional metadata (footprint hints, supports_views) for scheduling/autotuning.
Invisibly, the registered kernel metadata.
list_kernels()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.