Skip to content
New issue

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

Fixed definition of LibDevice Modf. #1201

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
ILGPU License
********************************************************************************
University of Illinois/NCSA Open Source License
Copyright (c) 2016-2023 ILGPU Project
Copyright (c) 2016-2024 ILGPU Project
All rights reserved.

Developed by: Marcel Koester ([email protected])
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ ILGPU also provides Source Link support for a better debugging experience. Make
ILGPU is licensed under the University of Illinois/NCSA Open Source License.
Detailed license information can be found in LICENSE.txt.

Copyright (c) 2016-2023 ILGPU Project. All rights reserved.
Copyright (c) 2016-2024 ILGPU Project. All rights reserved.

Originally developed by Marcel Koester.

Expand Down
8 changes: 4 additions & 4 deletions Src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
</PropertyGroup>

<PropertyGroup>
<LibraryVersionPrefix>1.5.1</LibraryVersionPrefix>
<LibraryAssemblyVersion>1.5.1.0</LibraryAssemblyVersion>
<LibraryFileVersion>1.5.1.0</LibraryFileVersion>
<LibraryPackageValidationBaselineVersion>1.5.0</LibraryPackageValidationBaselineVersion>
<LibraryVersionPrefix>1.5.2-beta1</LibraryVersionPrefix>
<LibraryAssemblyVersion>1.5.2.0</LibraryAssemblyVersion>
<LibraryFileVersion>1.5.2.0</LibraryFileVersion>
<LibraryPackageValidationBaselineVersion>1.5.1</LibraryPackageValidationBaselineVersion>
</PropertyGroup>

<!-- Unit Test Project Configuration -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<PackageVersion>$(Version)</PackageVersion>

<Title>ILGPU Algorithms Library</Title>
<Copyright>Copyright (c) 2016-2023 ILGPU Project. All rights reserved.</Copyright>
<Copyright>Copyright (c) 2016-2024 ILGPU Project. All rights reserved.</Copyright>
<Company />
<Authors>ILGPU Algorithms Project</Authors>
<Description>ILGPU Algorithms library for high-level GPU programming.</Description>
Expand Down
25 changes: 19 additions & 6 deletions Src/ILGPU/Backends/PTX/PTXLibDeviceNvvm.tt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ---------------------------------------------------------------------------------------
// ILGPU
// Copyright (c) 2021-2023 ILGPU Project
// Copyright (c) 2021-2024 ILGPU Project
// www.ilgpu.net
//
// File: PTXLibDeviceNvvm.tt/PTXLibDeviceNvvm.cs
Expand Down Expand Up @@ -110,7 +110,7 @@ void WriteLibDeviceFunctionNvvm(LibDeviceFunction func)
for (int i = 0; i < func.Parameters.Length; i++)
{
var param = func.Parameters[i];
WriteNvvmType(param.Type);
WriteNvvmType(param.Type, param.Flags);
Write($" %{param.Name}");
if (i < func.Parameters.Length - 1)
Write(",");
Expand All @@ -128,7 +128,7 @@ void WriteLibDeviceFunctionNvvm(LibDeviceFunction func)
for (int i = 0; i < func.Parameters.Length; i++)
{
var param = func.Parameters[i];
WriteNvvmType(param.Type);
WriteNvvmType(param.Type, param.Flags);
Write($" %{param.Name}");
if (i < func.Parameters.Length - 1)
Write(",");
Expand All @@ -139,15 +139,18 @@ void WriteLibDeviceFunctionNvvm(LibDeviceFunction func)
WriteLine("entry:");

PushIndent();
Write("%call = call ");
if (func.ReturnType == "void")
Write("call ");
else
Write("%call = call ");
WriteNvvmType(func.ReturnType);
Write(" @");
Write(func.Name);
Write("(");
for (int i = 0; i < func.Parameters.Length; i++)
{
var param = func.Parameters[i];
WriteNvvmType(param.Type);
WriteNvvmType(param.Type, param.Flags);
Write($" %{param.Name}");
if (i < func.Parameters.Length - 1)
Write(",");
Expand All @@ -157,7 +160,10 @@ void WriteLibDeviceFunctionNvvm(LibDeviceFunction func)
WriteLine();
Write("ret ");
WriteNvvmType(func.ReturnType);
WriteLine(" %call");
if (func.ReturnType == "void")
WriteLine();
else
WriteLine(" %call");
PopIndent();
WriteLine("}\";");
WriteLine();
Expand All @@ -180,4 +186,11 @@ void WriteNvvmType(string type)
Write(type);
}

void WriteNvvmType(string type, string flags)
{
WriteNvvmType(type);
if (flags == "Out")
Write("*");
}

#>
Loading
Loading