Workspace

Function Usage

Passes a pointer pointing to gert::ContinuousVector.

Prototype

ContextBuilder &Workspace(gert::ContinuousVector *workspace);

Parameters

Parameter

Input/Output

Description

workspace

Input

void* pointer pointing to the gert::ContinuousVecot class.

Returns

Object of the current ContextBuilder

Constraints

Due to the different internal data sorting of TilingContext, KernelContext, and TilingParseContext, Workspace() can be used only when BuildTilingContext() is called. For other scenarios, the Outputs API is recommended. Otherwise, undefined behavior occurs.

Example

void AddWorkspaceData(gert::ContinuousVector *ws)
{
    ......
    auto builder = context_ascendc::ContextBuilder()
                                    .Workspace(ws);
                                    .BuildTilingContext();
    ......
}