We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 0bd2133 + 7d75948 commit 25c2328Copy full SHA for 25c2328
Orochi/Orochi.cpp
@@ -1219,6 +1219,21 @@ oroError OROAPI oroCtxGetCurrent(oroCtx* pctx)
1219
if ( e != hipSuccess )
1220
return hip2oro(e);
1221
}
1222
+
1223
+ // externally initialized context
1224
+ if( s_oroCtxs.count( ctxt->m_ptr ) == 0 && ctxt->m_ptr )
1225
+ {
1226
+ ioroCtx_t* c = new ioroCtx_t;
1227
+ c->m_ptr = ctxt->m_ptr;
1228
+ c->setApi( s_api );
1229
+ s_oroCtxs[ctxt->m_ptr] = c;
1230
+ }
1231
1232
+ if (s_oroCtxs.count(ctxt->m_ptr) == 0)
1233
1234
+ return oroErrorNotReady;
1235
1236
1237
( *pctx ) = s_oroCtxs[ctxt->m_ptr];
1238
delete ctxt;
1239
return oroSuccess;
0 commit comments