函数:destroy_context
C函数原型 |
aclError aclrtDestroyContext(aclrtContext context) |
---|---|
Python函数 |
ret = acl.rt.destroy_context(context) |
函数功能 |
销毁一个Context,释放Context的资源,同步接口。只能销毁通过acl.rt.create_context接口创建的Context。 |
输入说明 |
context:int,指定需要销毁的Context对象指针,通常是通过create,或者get获取到的Context对象。 |
返回值说明 |
ret:int,错误码。
|
约束说明 |
不要重复销毁Context,否则将会发生段错误。 销毁类接口:调用该接口后,不能继续使用已释放或销毁的资源,建议调用该接口后,将相关资源设置为无效值(例如,置为0或None) |
注意事项 |
无 |
参考资源 |
|
父主题: Context管理