We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nim supports CRTP (Curiously recurring template pattern) in its type system:
type Example*{.bycopy.}[Data, Target] = object data*: Data target*: Target BatchDataset*{.bycopy, pure, inheritable.} = object Dataset*{.bycopy, pure.}[Self, Batch] = object of BatchDataset Mnist*{.bycopy, pure.} = object of Dataset[Mnist, seq[Example[float64, float64]]] func mnist(rootPath: cstring): Mnist = discard let m = mnist("path/to/mnist") echo "Success" echo m
but when this is used for C++ bindings, the compiler exits without producing code or errors, there is not even a nimcache folder created.
type Example*{.bycopy, importcpp: "torch::data::Example".}[Data, Target] = object data*: Data target*: Target BatchDataset*{.bycopy, pure, inheritable, importcpp: "torch::data::datasets::BatchDataset".} = object Dataset*{.bycopy, pure, importcpp: "torch::data::datasets::Dataset".}[Self, Batch] = object of BatchDataset Mnist*{.bycopy, pure, importcpp: "torch::data::datasets::MNIST".} = object of Dataset[Mnist, seq[Example[float64, float64]]] func mnist(rootPath: cstring): Mnist = discard let m = mnist("path/to/mnist") echo "Success" echo m
Note: obviously the C++ compiler will refuse to compile since you don't have the header and DLL, but it shouldn't exit silently at the Nim level.
The text was updated successfully, but these errors were encountered:
Mnist dataset wrapping success! Not sure how to do other datasets wit…
45a2687
…hout nim-lang/Nim#16653 and nim-lang/Nim#16655
No branches or pull requests
Nim supports CRTP (Curiously recurring template pattern) in its type system:
but when this is used for C++ bindings, the compiler exits without producing code or errors, there is not even a nimcache folder created.
Note: obviously the C++ compiler will refuse to compile since you don't have the header and DLL, but it shouldn't exit silently at the Nim level.
The text was updated successfully, but these errors were encountered: