This website works better with JavaScript.
Home
Issues
Pull Requests
Milestones
AI流水线
Repositories
Datasets
Forum
实训
竞赛
大数据
AI开发
Register
Sign In
scisharp
/
LLamaSharp
Not watched
Unwatch
Watch all
Watch but not notify
1
Star
0
Fork
0
Code
Releases
17
Wiki
evaluate
Activity
Issues
0
Pull Requests
0
Datasets
Model
Cloudbrain
HPC
Browse Source
- Removed one of the constructors of `SafeLLamaHandleBase`, which implicitly states that memory is owned. Better to be explicit about this kind of thing!
- Also fixed `ToString()` in `SafeLLamaHandleBase`
tags/v0.10.0
Martin Evans
2 years ago
parent
f9a9aaabca
commit
5da2a2f64b
3 changed files
with
3 additions
and
10 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+1
-1
LLama/LLamaContext.cs
+1
-1
LLama/Native/SafeLLamaGrammarHandle.cs
+1
-8
LLama/Native/SafeLLamaHandleBase.cs
+ 1
- 1
LLama/LLamaContext.cs
View File
@@ -443,7 +443,7 @@ namespace LLama
: SafeLLamaHandleBase
{
internal State(IntPtr memory)
: base(memory)
: base(memory
, true
)
{
}
+ 1
- 1
LLama/Native/SafeLLamaGrammarHandle.cs
View File
@@ -21,7 +21,7 @@ namespace LLama.Native
/// </summary>
/// <param name="handle"></param>
internal SafeLLamaGrammarHandle(IntPtr handle)
: base(handle)
: base(handle
, true
)
{
}
+ 1
- 8
LLama/Native/SafeLLamaHandleBase.cs
View File
@@ -14,12 +14,6 @@ namespace LLama.Native
{
}
private protected SafeLLamaHandleBase(IntPtr handle)
: base(IntPtr.Zero, ownsHandle: true)
{
SetHandle(handle);
}
private protected SafeLLamaHandleBase(IntPtr handle, bool ownsHandle)
: base(IntPtr.Zero, ownsHandle)
{
@@ -30,7 +24,6 @@ namespace LLama.Native
public override bool IsInvalid => handle == IntPtr.Zero;
/// <inheritdoc />
public override string ToString()
=> $"0x{handle:x16}";
public override string ToString() => handle.ToString();
}
}
Write
Preview
Loading…
Cancel
Save