Exemple #1
0
 public InfoPerDevice(Cloo.ComputePlatform inPlatform, Cloo.ComputeDevice inDevice, BlockedMatMulThread inThreadObject)
 {
     platform     = inPlatform;
     device       = inDevice;
     threadObject = inThreadObject;
     thread       = null;
 }
Exemple #2
0
 /// <summary>
 /// Gets the maximum work-group size that can be used to execute the <see cref="ComputeKernel"/> on a <see cref="ComputeDevice"/>.
 /// </summary>
 /// <param name="device"> One of the <see cref="ComputeKernel.Program.Device"/>s. </param>
 /// <returns> The maximum work-group size that can be used to execute the <see cref="ComputeKernel"/> on <paramref name="device"/>. </returns>
 public long GetWorkGroupSize(ComputeDevice device)
 {
     return((long)GetInfo <CLKernelHandle, CLDeviceHandle, ComputeKernelWorkGroupInfo, IntPtr>(
                Handle, device.Handle, ComputeKernelWorkGroupInfo.WorkGroupSize, CL10.GetKernelWorkGroupInfo));
 }
Exemple #3
0
 /// <summary>
 /// Gets the minimum amount of memory, in bytes, used by each work-item in the kernel.
 /// </summary>
 /// <param name="device"> One of the <see cref="ComputeKernel.Program.Device"/>s. </param>
 /// <returns> The minimum amount of memory, in bytes, used by each work-item in the kernel. </returns>
 /// <remarks> The returned value may include any private memory needed by an implementation to execute the kernel, including that used by the language built-ins and variable declared inside the kernel with the <c>__private</c> or <c>private</c> qualifier. </remarks>
 public long GetPrivateMemorySize(ComputeDevice device)
 {
     return(GetInfo <CLKernelHandle, CLDeviceHandle, ComputeKernelWorkGroupInfo, long>(
                Handle, device.Handle, ComputeKernelWorkGroupInfo.PrivateMemorySize, CL10.GetKernelWorkGroupInfo));
 }
Exemple #4
0
 /// <summary>
 /// Gets the compile work-group size specified by the <c>__attribute__((reqd_work_group_size(X, Y, Z)))</c> qualifier.
 /// </summary>
 /// <param name="device"> One of the <see cref="ComputeKernel.Program.Device"/>s. </param>
 /// <returns> The compile work-group size specified by the <c>__attribute__((reqd_work_group_size(X, Y, Z)))</c> qualifier. If no such qualifier is specified, (0, 0, 0) is returned. </returns>
 public long[] GetCompileWorkGroupSize(ComputeDevice device)
 {
     return(ComputeTools.ConvertArray(
                GetArrayInfo <CLKernelHandle, CLDeviceHandle, ComputeKernelWorkGroupInfo, IntPtr>(
                    Handle, device.Handle, ComputeKernelWorkGroupInfo.CompileWorkGroupSize, CL10.GetKernelWorkGroupInfo)));
 }
 /// <summary>
 /// Gets the <see cref="ComputeProgramBuildStatus"/> of the <see cref="ComputeProgram"/> for a specified <see cref="ComputeDevice"/>.
 /// </summary>
 /// <param name="device"> The <see cref="ComputeDevice"/> building the <see cref="ComputeProgram"/>. Must be one of <see cref="ComputeProgram.Devices"/>. </param>
 /// <returns> The <see cref="ComputeProgramBuildStatus"/> of the <see cref="ComputeProgram"/> for <paramref name="device"/>. </returns>
 public ComputeProgramBuildStatus GetBuildStatus(ComputeDevice device)
 {
     return((ComputeProgramBuildStatus)GetInfo <CLProgramHandle, CLDeviceHandle, ComputeProgramBuildInfo, uint>(Handle, device.Handle, ComputeProgramBuildInfo.Status, CL12.GetProgramBuildInfo));
 }
 /// <summary>
 /// Gets the build log of the <see cref="ComputeProgram"/> for a specified <see cref="ComputeDevice"/>.
 /// </summary>
 /// <param name="device"> The <see cref="ComputeDevice"/> building the <see cref="ComputeProgram"/>. Must be one of <see cref="ComputeProgram.Devices"/>. </param>
 /// <returns> The build log of the <see cref="ComputeProgram"/> for <paramref name="device"/>. </returns>
 public string GetBuildLog(ComputeDevice device)
 {
     return(GetStringInfo <CLProgramHandle, CLDeviceHandle, ComputeProgramBuildInfo>(Handle, device.Handle, ComputeProgramBuildInfo.BuildLog, CL12.GetProgramBuildInfo));
 }
Exemple #7
0
 ///<summary>
 ///Gets the preferred multiple of workgroup size for launch.
 ///</summary>
 ///<param name = "device"> One of the <see cref = "ComputeKernel.Program.Device"/> s. </param>
 ///<returns> The preferred multiple of workgroup size for launch. </returns>
 ///<remarks> Specified a workgroup size returned by this query as the value of the local work size argument to Compute Command Queue. Exception will not fail to enqueue the kernel for execution unless   the work-group size specified is larger than the device maximum. </remarks>
 ///<remarks> Requires OpenCL 1.1. </remarks>
 public long GetPreferredWorkGroupSizeMultiple(ComputeDevice device)
 {
     return((long)GetInfo <CLKernelHandle, CLDeviceHandle, ComputeKernelWorkGroupInfo, IntPtr>(
                Handle, device.Handle, ComputeKernelWorkGroupInfo.PreferredWorkGroupSizeMultiple, CL12.GetKernelWorkGroupInfo));
 }