on the tofino chip, yes. what would be the broadcom api on a tomahawk, a P4-based toolchain is for tofino.
P4 is a domain-specific language for packet dataplanes. you can represent the various packet processing pipelines in a broadcom switch chip in P4. broadcom could easily build a P4 to tomahawk API.
P4 has tried very hard to be target independent. there are toolchains targeting GPUs, vSwitches, and FPGAs. you can compile P4 to eBPF.