Show / Hide Table of Contents

Class OpenCLCompiler

Compiler for OpenCL which will be used to compile kernel created in C# and execute them.

Inheritance
System.Object
BaseCompiler
OpenCLCompiler
Implements
System.IDisposable
Inherited Members
BaseCompiler.Name
BaseCompiler.GetExec<T>()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Amplifier
Assembly: Amplifier.dll
Syntax
public class OpenCLCompiler : BaseCompiler, IDisposable

Constructors

| Improve this Doc View Source

OpenCLCompiler()

Initializes a new instance of the OpenCLCompiler class.

Declaration
public OpenCLCompiler()

Properties

| Improve this Doc View Source

Devices

Gets or sets the devices.

Declaration
public override List<Device> Devices { get; }
Property Value
Type Description
System.Collections.Generic.List<Device>

The devices.

Overrides
BaseCompiler.Devices
| Improve this Doc View Source

Kernels

Gets the kernel functions for the compiler.

Declaration
public override List<string> Kernels { get; }
Property Value
Type Description
System.Collections.Generic.List<System.String>

The kernels.

Overrides
BaseCompiler.Kernels

Methods

| Improve this Doc View Source

CompileKernel(Type)

Compiles the kernel.

Declaration
public override void CompileKernel(Type cls)
Parameters
Type Name Description
System.Type cls

The CLS.

Overrides
BaseCompiler.CompileKernel(Type)
| Improve this Doc View Source

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Declaration
public override void Dispose()
Overrides
BaseCompiler.Dispose()
| Improve this Doc View Source

Execute<TSource>(String, Object[])

Executes the specified kernel function name.

Declaration
public override void Execute<TSource>(string functionName, params object[] args)
    where TSource : struct
Parameters
Type Name Description
System.String functionName

Name of the function.

System.Object[] args
Type Parameters
Name Description
TSource

The type of the source.

Overrides
BaseCompiler.Execute<TSource>(String, Object[])
Exceptions
Type Condition
ExecutionException
| Improve this Doc View Source

UseDevice(Int32)

Uses the device for the compiler.

Declaration
public override void UseDevice(int deviceId = 0)
Parameters
Type Name Description
System.Int32 deviceId

The device identifier.

Overrides
BaseCompiler.UseDevice(Int32)
Exceptions
Type Condition
System.Exception

No device found. Please invoke Accelerator.Init with a device id to initialize. " + "If you have done the Init and still getting the error please check if OpenCL is installed.

System.ArgumentException

Device ID out of range.

Implements

System.IDisposable

See Also

BaseCompiler
  • Improve this Doc
  • View Source
Back to top Generated by DocFX