---
title: SetRecompute接口
description: "设置请求是否是重计算类型。"
url: https://www.hiascend.com/document/detail/zh/mindie/latest/mindiellm/llmdev/mindie_llm0075.html
sourcePath: /source/zh/mindie/310/mindiellm/llmdev/mindie_llm0075.html
indexId: 9905c6cf394295fae9de56ab0a9fa623ed20df47f67116748284a86b34e935c458
---
# SetRecompute接口

#### 接口功能

设置请求是否是重计算类型。


#### 接口格式

```
void SetRecompute(bool isRecompute);
```


#### 接口参数

| 参数 | 是否必选 | 说明 | 取值要求 |
| --- | --- | --- | --- |
| isRecompute | 是 | 请求是否是重计算请求 | bool类型 |


#### 使用样例

构造一个请求对象后，为该请求对象设置重计算类型，然后获取该请求是否为重计算请求。

```
mindie_llm::InferRequestId runtimeReqId(0);
std::shared_ptr<mindie_llm::InferRequest> runtimeRequest(runtimeReqId);
runtimeRequest->SetRecompute(true);
bool isRecompute = runtimeRequest->IsRecompute();
```


#### 返回值

无。
