Пример #1
0
        /// <summary>
        /// Calculate number of words to fit complete instruction bytecode.
        /// </summary>
        /// <returns>Number of words in instruction bytecode.</returns>
        public override uint GetWordCount()
        {
            uint wordCount = 0;

            wordCount += Event.GetWordCount();
            wordCount += ProfilingInfo.GetWordCount();
            wordCount += Value.GetWordCount();
            return(wordCount);
        }
Пример #2
0
        /// <summary>
        /// Returns the specified profiling counter
        /// </summary>
        /// <param name="paramName"></param>
        /// <param name="paramValue"></param>
        public unsafe void GetEventProfilingInfo(ProfilingInfo paramName, out ulong paramValue)
        {
            IntPtr paramValueSizeRet;
            ulong v;
            ErrorCode errorCode;

            errorCode = OpenCL.GetEventProfilingInfo(EventID, paramName, (IntPtr)sizeof(ulong), &v, out paramValueSizeRet);
            if (errorCode != ErrorCode.SUCCESS)
                throw new OpenCLException("GetEventProfilingInfo failed with error code "+errorCode, errorCode );
            paramValue = v;
        }
Пример #3
0
        /// <summary>
        ///     Returns the specified profiling counter
        /// </summary>
        public unsafe void GetEventProfilingInfo(ProfilingInfo paramName, out UInt64 paramValue)
        {
            IntPtr    paramValueSizeRet;
            UInt64    v;
            ErrorCode errorCode;

            errorCode = OpenCL.GetEventProfilingInfo(this.EventID, paramName, (IntPtr)sizeof(UInt64), &v, out paramValueSizeRet);
            if (errorCode != ErrorCode.SUCCESS)
            {
                throw new OpenCLException("GetEventProfilingInfo failed with error code " + errorCode, errorCode);
            }
            paramValue = v;
        }
Пример #4
0
 internal extern static unsafe int GetEventProfilingInfo(IntPtr @event, ProfilingInfo param_name, IntPtr param_value_size, IntPtr param_value, [OutAttribute] IntPtr *param_value_size_ret);
Пример #5
0
 public static InfoBuffer GetEventProfilingInfo(Event e, ProfilingInfo paramName, out ErrorCode error)
 {
     return(GetInfo(GetEventProfilingInfo, e, paramName, out error));
 }
Пример #6
0
        /// <summary>
        /// Returns the specified profiling counter
        /// </summary>
        /// <param name="paramName"></param>
        /// <param name="paramValue"></param>
        public unsafe void GetEventProfilingInfo(ProfilingInfo paramName, out ulong paramValue)
        {
            IntPtr paramValueSizeRet;
            ulong v;
            ErrorCode errorCode;

            errorCode = OpenCL.GetEventProfilingInfo(EventID, paramName, (IntPtr)sizeof(ulong), &v, out paramValueSizeRet);
            if (errorCode != ErrorCode.SUCCESS)
                throw new OpenCLException("GetEventProfilingInfo failed with error code "+errorCode, errorCode );
            paramValue = v;
        }
Пример #7
0
 public static InfoBuffer GetEventProfilingInfo(Event e, ProfilingInfo paramName, out ErrorCode error)
 {
     return GetInfo(GetEventProfilingInfo, e, paramName, out error);
 }
Пример #8
0
 public static ErrorCode GetEventProfilingInfo(cl_event _event, ProfilingInfo param_name, IntPtr param_value_size, void* param_value, out IntPtr param_value_size_ret)
 {
     return (ErrorCode)OpenCLAPI.clGetEventProfilingInfo(_event, (uint)param_name, param_value_size, param_value, out param_value_size_ret);
 }
Пример #9
0
 unsafe ErrorCode IHasInfo <ProfilingInfo> .GetInfo(ProfilingInfo param_name, IntPtr param_value_size, IntPtr param_value, IntPtr *param_value_size_ret)
 {
     return(Native.GetEventProfilingInfo(this.Handle, param_name, param_value_size, param_value, param_value_size_ret));
 }
Пример #10
0
 public static ErrorCode GetEventProfilingInfo(cl_event _event, ProfilingInfo param_name, IntPtr param_value_size, void *param_value, out IntPtr param_value_size_ret)
 {
     return((ErrorCode)OpenCLAPI.clGetEventProfilingInfo(_event, (uint)param_name, param_value_size, param_value, out param_value_size_ret));
 }
Пример #11
0
 /// <summary>
 /// Write instruction operands into bytecode stream.
 /// </summary>
 /// <param name="writer">Bytecode writer.</param>
 public override void WriteOperands(WordWriter writer)
 {
     Event.Write(writer);
     ProfilingInfo.Write(writer);
     Value.Write(writer);
 }
Пример #12
0
 public extern static int clGetEventProfilingInfo(
     IntPtr event_handle,
     ProfilingInfo param_name,
     IntPtr param_value_size,
     byte[] param_value,
     out IntPtr param_value_size_ret);
Пример #13
0
 public static Error clGetEventProfilingInfo(OpenCLEvent e, ProfilingInfo param_name, IntPtr param_value_size, [Out] Byte[] param_value, out IntPtr param_value_size_ret)
 {
     param_value_size_ret = default(IntPtr);
     Console.WriteLine("Calling Error clGetEventProfilingInfo(OpenCLEvent e, ProfilingInfo param_name, IntPtr param_value_size, [Out] Byte[] param_value, out IntPtr param_value_size_ret)");
     return default(Error);
 }
Пример #14
0
 public static extern Error clGetEventProfilingInfo(OpenCLEvent e, ProfilingInfo param_name, IntPtr param_value_size, [Out] Byte[] param_value, out IntPtr param_value_size_ret);
Пример #15
0
 internal extern static unsafe ErrorCode GetEventProfilingInfo(IntPtr @event, ProfilingInfo param_name, IntPtr param_value_size, IntPtr param_value, [Out] IntPtr *param_value_size_ret);
Пример #16
0
 internal extern static unsafe int GetEventProfilingInfo(IntPtr @event, ProfilingInfo param_name, IntPtr param_value_size, IntPtr param_value, [OutAttribute] IntPtr* param_value_size_ret);
Пример #17
0
		public extern static int clGetEventProfilingInfo (
			IntPtr event_handle,
			ProfilingInfo param_name,
			IntPtr param_value_size,
			byte[] param_value,
			out IntPtr param_value_size_ret);