-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added base of clBuiltInHelper for future helper functions to be added…
… before the kernel string (optionally)
- Loading branch information
1 parent
78f0b5f
commit 8b7d65b
Showing
2 changed files
with
32 additions
and
0 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
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,31 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
|
||
namespace Cekirdekler | ||
{ | ||
namespace ClBuiltInHelper | ||
{ | ||
/// <summary> | ||
/// <para>Only setting some flags will add some functions to beginning of OpenCL kernel string before compile</para> | ||
/// <para>Not implemented(yet)</para> | ||
/// </summary> | ||
public class ClBuiltInAuxilliaryFunctions | ||
{ | ||
|
||
private StringBuilder selectedFunctionsBuilder = new StringBuilder(@""); | ||
private bool prepared = false; | ||
|
||
private string exampleFunctionString = Environment.NewLine+ @"void exampleFunction(int a,int b){return a+b;}"+Environment.NewLine; | ||
private bool exampleFunctionPrivate = false; | ||
/// <summary> | ||
/// adds "void exampleFunction(int a,int b){return a+b;}" in the beginning of kernel string | ||
/// </summary> | ||
public bool exampleFunction { | ||
get { if (!prepared) { selectedFunctionsBuilder.Append(exampleFunctionString); } return exampleFunctionPrivate; } | ||
set { exampleFunctionPrivate = value; } | ||
} | ||
} | ||
} | ||
} |