【发布时间】:2020-07-17 01:51:46
【问题描述】:
正如Hybridizer's documentation, 中所述,您不能使用新的 x() 方法在 Hybridizer CUDA 代码中实例化对象。
我尝试使用this method,但它会给出与使用typeof(x)相关的错误
[ERROR] : 0X6079 : EnrichMethodDependencyGraph failed for method System.Type -- Exception: System.NullReferenceException: Object reference not set to an instance of an object.
我也试过像这样使用它:
Activator.CreateInstance<x>()
但这只会给出一个不同的错误,我在网上找不到任何信息。
[ERROR] : 0X6079 : EnrichMethodDependencyGraph failed for method System.Activator -- Exception: System.ArgumentException: A BadImageFormatException has been thrown while parsing the signature. This is likely due to lack of a generic context. Ensure genericTypeArguments and genericMethodArguments are provided and contain enough context. ---> System.BadImageFormatException: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)
实例化一个对象应该是一件很简单的事情,但是我在网上找不到任何方法......有谁知道怎么做?
【问题讨论】:
标签: c# hybridizer