-
Notifications
You must be signed in to change notification settings - Fork 741
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix a few incorrectly mapped instances of
std::unordered_map
for…
… PyTorch (issue #1164)
- Loading branch information
Showing
10 changed files
with
128 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
pytorch/src/gen/java/org/bytedeco/pytorch/ExtraFilesMap.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
// Targeted by JavaCPP version 1.5.8-SNAPSHOT: DO NOT EDIT THIS FILE | ||
|
||
package org.bytedeco.pytorch; | ||
|
||
import org.bytedeco.pytorch.Allocator; | ||
import org.bytedeco.pytorch.Function; | ||
import org.bytedeco.pytorch.Module; | ||
import java.nio.*; | ||
import org.bytedeco.javacpp.*; | ||
import org.bytedeco.javacpp.annotation.*; | ||
|
||
import static org.bytedeco.javacpp.presets.javacpp.*; | ||
import static org.bytedeco.openblas.global.openblas_nolapack.*; | ||
import static org.bytedeco.openblas.global.openblas.*; | ||
|
||
import static org.bytedeco.pytorch.global.torch.*; | ||
|
||
@Name("std::unordered_map<std::string,std::string>") @Properties(inherit = org.bytedeco.pytorch.presets.torch.class) | ||
public class ExtraFilesMap extends Pointer { | ||
static { Loader.load(); } | ||
/** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ | ||
public ExtraFilesMap(Pointer p) { super(p); } | ||
public ExtraFilesMap() { allocate(); } | ||
private native void allocate(); | ||
public native @Name("operator =") @ByRef ExtraFilesMap put(@ByRef ExtraFilesMap x); | ||
|
||
public boolean empty() { return size() == 0; } | ||
public native long size(); | ||
|
||
@Index public native @StdString BytePointer get(@StdString BytePointer i); | ||
public native ExtraFilesMap put(@StdString BytePointer i, BytePointer value); | ||
@ValueSetter @Index public native ExtraFilesMap put(@StdString BytePointer i, @StdString String value); | ||
|
||
public native void erase(@ByVal Iterator pos); | ||
public native @ByVal Iterator begin(); | ||
public native @ByVal Iterator end(); | ||
@NoOffset @Name("iterator") public static class Iterator extends Pointer { | ||
public Iterator(Pointer p) { super(p); } | ||
public Iterator() { } | ||
|
||
public native @Name("operator ++") @ByRef Iterator increment(); | ||
public native @Name("operator ==") boolean equals(@ByRef Iterator it); | ||
public native @Name("operator *().first") @MemberGetter @StdString BytePointer first(); | ||
public native @Name("operator *().second") @MemberGetter @StdString BytePointer second(); | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// Targeted by JavaCPP version 1.5.8-SNAPSHOT: DO NOT EDIT THIS FILE | ||
|
||
package org.bytedeco.pytorch; | ||
|
||
import org.bytedeco.pytorch.Allocator; | ||
import org.bytedeco.pytorch.Function; | ||
import org.bytedeco.pytorch.Module; | ||
import java.nio.*; | ||
import org.bytedeco.javacpp.*; | ||
import org.bytedeco.javacpp.annotation.*; | ||
|
||
import static org.bytedeco.javacpp.presets.javacpp.*; | ||
import static org.bytedeco.openblas.global.openblas_nolapack.*; | ||
import static org.bytedeco.openblas.global.openblas.*; | ||
|
||
import static org.bytedeco.pytorch.global.torch.*; | ||
|
||
@Name("std::unordered_map<std::string,c10::TypePtr>") @Properties(inherit = org.bytedeco.pytorch.presets.torch.class) | ||
public class TypeEnv extends Pointer { | ||
static { Loader.load(); } | ||
/** Pointer cast constructor. Invokes {@link Pointer#Pointer(Pointer)}. */ | ||
public TypeEnv(Pointer p) { super(p); } | ||
public TypeEnv() { allocate(); } | ||
private native void allocate(); | ||
public native @Name("operator =") @ByRef TypeEnv put(@ByRef TypeEnv x); | ||
|
||
public boolean empty() { return size() == 0; } | ||
public native long size(); | ||
|
||
@Index public native @ByRef Type.TypePtr get(@StdString BytePointer i); | ||
public native TypeEnv put(@StdString BytePointer i, Type.TypePtr value); | ||
|
||
public native void erase(@ByVal Iterator pos); | ||
public native @ByVal Iterator begin(); | ||
public native @ByVal Iterator end(); | ||
@NoOffset @Name("iterator") public static class Iterator extends Pointer { | ||
public Iterator(Pointer p) { super(p); } | ||
public Iterator() { } | ||
|
||
public native @Name("operator ++") @ByRef Iterator increment(); | ||
public native @Name("operator ==") boolean equals(@ByRef Iterator it); | ||
public native @Name("operator *().first") @MemberGetter @StdString BytePointer first(); | ||
public native @Name("operator *().second") @MemberGetter @ByRef @Const Type.TypePtr second(); | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters