---
title: "ClikaRT::EagerScope"
sidebar_label: "EagerScope"
description: "While alive, forces EAGER execution on the calling thread: every op runs its kernel and produces a real value before dispatch returns, even when nested inside a TracingScope."
---

<!-- Generated by tools/doxygen2mdx from Doxygen XML. Do not edit. -->

<span class="api-kind api-kind--class">class</span>

**Header:** `ClikaRT/compute/scope.h`

While alive, forces EAGER execution on the calling thread: every op runs its kernel and produces a real value before dispatch returns, even when nested inside a [`TracingScope`](./TracingScope.md). Use it to guard a region that must compute concrete values (a metric, a running average, a control-flow decision read back to the host) so a caller who wrapped the surrounding code in a [`TracingScope`](./TracingScope.md) cannot turn those ops into un-materialized placeholders. Outside any scope execution is already eager, so this is a no-op there. Non-copyable, non-movable.

## Member functions

### EagerScope() {#EagerScope}

<div class="api-signature">

**`EagerScope`**()

</div>

Enter: forces eager execution on this thread (overriding an outer tracing scope) until exit.

<div class="api-declared">

Declared in `ClikaRT/compute/scope.h`, line 92

</div>

### \~EagerScope() {#EagerScope-2}

<div class="api-signature">

**`~EagerScope`**()

</div>

Exit: restores the surrounding mode.

<div class="api-declared">

Declared in `ClikaRT/compute/scope.h`, line 94

</div>

### EagerScope(EagerScope) {#EagerScope-3}

<div class="api-signature">

**`EagerScope`**(`const EagerScope&`) `=delete`

</div>

<div class="api-declared">

Declared in `ClikaRT/compute/scope.h`, line 95

</div>

### operator=() {#operator-assign}

<div class="api-signature">

[`EagerScope`](./EagerScope.md)`&` **`operator=`**(`const` [`EagerScope`](./EagerScope.md)`&`) `=delete`

</div>

<div class="api-declared">

Declared in `ClikaRT/compute/scope.h`, line 96

</div>
