Workspace

Function

Pass a pointer pointing to gert::ContinuousVector.

Prototype

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

Parameters

Parameter

Input/Output

Description

workspace

Input

void* pointer pointing to the gert::ContinuousVector class

Returns

Object of the current ContextBuilder

Restrictions

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

1
2
3
4
5
6
7
8
void AddWorkspaceData(gert::ContinuousVector *ws)
{
    ......
    auto builder = context_ascendc::ContextBuilder()
                                    .Workspace(ws);
                                    .BuildTilingContext();
    ......
}