Logo von Onetbb Quickstart

Onetbb Quickstart

Organisation
intel
onetbb-quickstart

Getting started with Intel oneTBB for C++ parallelism on Intel CPUs. Use when a C++ loop or reduction should run on multiple threads with oneTBB, including a request to make an existing loop or function use all cores with oneTBB or TBB; when the user needs the headers, namespace, or CMake wiring for a first oneTBB program; when a parallel_for body has a data race; or when a reduction is accumulating into a shared variable. Covers parallel_for and parallel_reduce over blocked_range, the build setup, and the pitfalls of the task-based model. Not for tuning grain size or partitioners in a working oneTBB program, OpenMP, std::thread, or GPU offload.

Übersicht

Herausgeberintel
Repositoryskills
Skill-Nameonetbb-quickstart
Sterne
31
Forks
14
Mitgelieferte Dateien
3
LizenzApache-2.0
Links
  • Anweisungen in Markdown

    Eine SKILL.md-Datei, die das Modell bei Bedarf lädt. So werden nur dann Token verbraucht, wenn eine Anfrage tatsächlich dazu passt.

  • Funktioniert mit jedem LLM

    KI-Skills bestehen aus reinem Markdown, nicht aus anbieterspezifischem Code. Daher funktionieren sie mit GPT, Claude, Gemini, Grok oder einem lokalen Modell.

  • 3 mitgelieferte Dateien

    Skripte, Vorlagen und Referenzmaterial, die das Modell bei der Arbeit lesen kann. Die Dateien sind schreibgeschützt und werden niemals ausgeführt.

  • Open Source

    Von intel auf GitHub veröffentlicht. Prüfen Sie den Quellinhalt vor der Installation.

Installation

Installieren Sie den KI-Skill Onetbb Quickstart in TypingMind, um ihn mit jedem LLM zu nutzen, oder fügen Sie ihn einem anderen Agenten hinzu, der SKILL.md lesen kann.

1

In TypingMind installieren

TypingMind installiert einen Skill direkt aus seinem GitHub-Ordner — liest SKILL.md, bündelt die Ressourcendateien und speichert das Ergebnis lokal.

  1. Öffnen Sie die App und gehen Sie zu Plugins → Skills.
  2. Wählen Sie „Von GitHub installieren“.
  3. Fügen Sie die unten angegebene URL des Skill-Ordners ein und bestätigen Sie.
    https://github.com/intel/skills/tree/main/skills/onetbb-quickstart
  4. Aktivieren Sie den Skill in jedem Chat, in dem er verfügbar sein soll.
Plugins → Skills → Skill anlegen → Über GitHub-URL. Fügen Sie dann die Ordner-URL ein und klicken Sie auf „Weiter“.
2

In einem anderen Agenten installieren

Jeder Agent, der das Agent-Skills-Format lesen kann, kann diesen Skill nutzen — kopieren Sie den Ordner in das Skill-Verzeichnis des jeweiligen Agenten.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/intel/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/skills/onetbb-quickstart .claude/skills/onetbb-quickstart
Starten Sie Claude Code nach dem Kopieren neu, damit der neue Skill erkannt wird.

In TypingMind verwenden

Aktivieren Sie Onetbb Quickstart in einem beliebigen Chat in TypingMind. Den Rest übernimmt das Modell. Name und Beschreibung des Skills stehen im System-Prompt. Sobald eine Anfrage passt, lädt das Modell selbstständig die vollständigen Anweisungen — Sie müssen den Skill nie manuell aufrufen, und er verbraucht erst Token, wenn er tatsächlich genutzt wird.

Das Modell lädt Onetbb Quickstart automatisch, sobald eine passende Anfrage gestellt wird.

Funktioniert mit jedem KI-Modell

KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher ist Onetbb Quickstart nicht an das Modell gebunden, für das der Skill geschrieben wurde. Installieren Sie ihn einmal in TypingMind und nutzen Sie ihn mit GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder einem selbst betriebenen lokalen Modell — alles mit Ihren eigenen API-Keys.

  • Wird nur bei Bedarf geladen

    Der System-Prompt enthält nur den Namen und die Beschreibung. Die Anweisungen werden bei der ersten passenden Anfrage geladen. Ein ungenutzter Skill verursacht daher keine Kosten.

  • Modell im laufenden Chat wechseln

    Da der Skill aus Anweisungen statt aus Code besteht, funktioniert er auch nach einem Modellwechsel — das nächste Modell liest dieselbe SKILL.md-Datei.

Skill-Anweisungen

Dies ist der Inhalt von SKILL.md, den das Modell lädt. Lesen Sie ihn vor der Installation — ein Skill besteht aus Anweisungen, denen Ihr Modell folgt.

oneTBB quickstart

Purpose

Parallelizes C++ loops and reductions with Intel oneAPI Threading Building Blocks on Intel CPUs: the umbrella header, parallel_for and parallel_reduce over a blocked_range, the CMake lines that link it, and the assumptions the task-based model breaks.

Prefer oneTBB over hand-rolled threads when the work is a bounded loop or a reduction over a container: the partitioner decides the split, and the runtime composes with other oneTBB-based libraries in the same process instead of oversubscribing the machine.

When to Use This Skill

Use this skill when:

  • A C++ loop or reduction is a candidate for multithreading.
  • A first oneTBB program needs headers, namespace, and CMake wiring.
  • A parallel_for body has a race on shared state.
  • A reduction accumulates into one variable from many threads.

Do not use this skill for GPU offload, for OpenMP or std::thread questions, or for tuning an existing oneTBB program's grain size and partitioners — that is past "getting started" and belongs with a profile in hand.

Quick Start

cpp
#include <oneapi/tbb.h>            // umbrella header

int main() {
    oneapi::tbb::parallel_for(
        oneapi::tbb::blocked_range<size_t>(0, n),
        [&](const oneapi::tbb::blocked_range<size_t>& r) {
            for (size_t i = r.begin(); i != r.end(); ++i)
                out[i] = f(in[i]);
        });
}

using namespace oneapi::tbb; shortens the calls; qualifying them keeps the origin visible in code that mixes threading libraries.

Implementation Guide

  1. Parallelize a loop with parallel_for over a range. The body receives a subrange, not a single index — iterate inside it, as above. The range type carries the index type, so blocked_range<size_t> and blocked_range<int> are different instantiations.

  2. Reduce with parallel_reduce, not a shared accumulator. The body folds a subrange into a partial result and the last argument combines two partials:

    cpp
    double sum = oneapi::tbb::parallel_reduce(
        oneapi::tbb::blocked_range<size_t>(0, n), 0.0,
        [&](const auto& r, double acc) {
            for (size_t i = r.begin(); i != r.end(); ++i) acc += a[i];
            return acc;
        },
        std::plus<double>());
  3. Link it in CMake. oneTBB ships a package config, so the two lines are the whole build change:

    cmake
    find_package(TBB REQUIRED)
    target_link_libraries(my_app PRIVATE TBB::tbb)
  4. Leave the grain size alone at first. The auto-partitioner chooses the split; a hand-set grain size is a tuning decision that needs a measurement behind it, and a wrong one is worse than none.

  5. Make shared state safe or remove it. If the body must write to a shared structure, use one of the concurrent_* containers or restructure as a reduction. A mutex around the body of a parallel_for usually gives back the parallelism it was added to protect.

Performance

No measured numbers ship with this skill, and a parallel version is not automatically a faster one. What to measure:

  • Compare against the serial loop on the same input, with the same compiler flags and optimization level.
  • Watch for a body too small to cover the task overhead: at that size the partitioner's fixed cost shows up as a slowdown.
  • Check whether the loop is memory-bandwidth bound before adding threads — more threads on a saturated bus do not help.
  • Count the threads in the process. Nested parallelism from another library, or an OpenMP region around a oneTBB call, oversubscribes the cores and the slowdown is not in either loop.

Gotchas & Limitations

  • The body runs many times, concurrently. It is not called once per loop and not once per thread; the range is split as the runtime sees fit. Anything captured by reference and written to is shared mutable state.
  • parallel_reduce is not deterministic in floating point. The combination order varies between runs, so sums can differ in the last bits. Use parallel_deterministic_reduce when a reproducible result matters more than speed.
  • Exceptions propagate out of the algorithm, not out of the body where they were thrown — one is rethrown on the caller's thread and the rest are lost.
  • find_package(TBB) needs oneTBB's own config, which the environment script or the package install puts on CMAKE_PREFIX_PATH. A build that cannot find it usually has not sourced the environment.
  • Not covered: flow graph, task groups, arenas and thread affinity, and the deprecated tbb:: (pre-oneAPI) spellings.

References

FileLoad it when
references/official-sources.mdyou need the current oneTBB API for an algorithm, the deprecation status of a tbb:: name, or the supported CMake integration for the installed version

Two things here should not be answered from memory: the current name and signature of an algorithm (oneTBB renamed and dropped parts of the pre-oneAPI API, and the old spellings still compile in some builds) and how the package is found by CMake in the installed layout.

Mitgelieferte Dateien

Das Modell liest diese Dateien bei Bedarf, während der Skill geladen ist. Sie werden als lesbare Dateien bereitgestellt und niemals ausgeführt.

Häufig gestellte Fragen

Was macht der KI-Skill Onetbb Quickstart?

Getting started with Intel oneTBB for C++ parallelism on Intel CPUs. Use when a C++ loop or reduction should run on multiple threads with oneTBB, including a request to make an existing loop or function use all cores with oneTBB or TBB; when the user needs the headers, namespace, or CMake wiring for a first oneTBB program; when a parallel_for body has a data race; or when a reduction is accumulating into a shared variable. Covers parallel_for and parallel_reduce over blocked_range, the build setup, and the pitfalls of the task-based model. Not for tuning grain size or partitioners in a work...

Warum Onetbb Quickstart in TypingMind nutzen?

Weil Sie den Skill einmal installieren und mit jedem Modell verwenden können. Onetbb Quickstart besteht aus reinem Markdown statt aus anbieterspezifischem Code. So funktioniert derselbe Skill mit GPT-5, Claude, Gemini, Grok oder einem lokalen Modell – und Sie können das Modell mitten im Chat wechseln, ohne dass der Skill seine Funktion verliert. TypingMind verwendet Ihre eigenen API-Schlüssel. Sie bezahlen die Anbieter daher direkt statt über ein Abonnement pro Nutzerplatz, und Ihre Skills und Chats bleiben in Ihrem eigenen Speicher.

Wie installiere ich Onetbb Quickstart in TypingMind?

Öffnen Sie in TypingMind Plugins → Skills → Von GitHub installieren und fügen Sie https://github.com/intel/skills/tree/main/skills/onetbb-quickstart ein. TypingMind liest die Datei SKILL.md, bündelt die zugehörigen Dateien und installiert alles als Skill, den Sie für jeden Chat einzeln aktivieren können.

Welche KI-Modelle können Onetbb Quickstart nutzen?

Jedes Modell, das Sie in TypingMind verbinden. KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher können GPT, Claude, Gemini, Grok und lokale Modelle diesen Skill laden, wenn eine Anfrage dazu passt.

Wie viele KI-Modelle kann ich mit Onetbb Quickstart verwenden?

So viele Sie möchten. Solange ein Modell Skills unterstützt, können Sie Onetbb Quickstart damit verwenden – GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama und weitere – alles in TypingMind mit Ihren eigenen API-Schlüsseln.

Ist der KI-Skill Onetbb Quickstart kostenlos?

Ja. Der Skill wird von intel auf GitHub unter der Lizenz Apache-2.0 veröffentlicht. Sie bezahlen nur Ihren eigenen KI-Anbieter für die verwendeten Token.

Was sind KI-Skills?

Ein KI-Skill ist ein wiederverwendbares Anweisungspaket, das einem KI-Modell vermittelt, wie es eine bestimmte Aufgabe erledigt. Es folgt dem offenen Format Agent Skills: eine Datei namens SKILL.md mit einem Namen und einer Beschreibung sowie allen Skripten, Vorlagen oder Referenzdateien, die das Modell möglicherweise benötigt. Das Modell liest die Anweisungen nur, wenn Ihre Anfrage zum Skill passt. Ein installierter Skill verursacht daher erst Kosten, wenn er verwendet wird.

Wie unterscheiden sich KI-Skills von Plugins oder MCP-Servern?

Ein Plugin oder MCP-Server stellt einem Modell neue aufrufbare Tools bereit – Code, der auf einem System ausgeführt wird und ein Ergebnis zurückgibt. Ein KI-Skill vermittelt dem Modell stattdessen Wissen und Vorgehensweisen: wie es eine Aufgabe angeht, welche Schritte es befolgt und wie eine gute Ausgabe aussieht. Skills bestehen aus reinem Markdown und benötigen daher weder Server noch API-Schlüssel oder Laufzeitumgebung. Sie funktionieren mit jedem Modell.

Alle

Jetzt eigenen KI-Arbeitsbereich einrichten

Abonnieren Sie unseren Newsletter und erfahren Sie mehr über neue Funktionen und kommende Gewinnspiele 👇