C# 클래스 Yeppp.Library

Non-computational functions for checking library version, quering information about processor, and benchmarking.
파일 보기 프로젝트 열기: wdv4758h/Yeppp

공개 메소드들

메소드 설명
AcquireCycleCounter ( ) : CpuCycleCounterState

Initializes the processor cycle counter and starts counting the processor cycles.

Call ReleaseCycleCounter to get the number of processor cycles passed.The cycle counters are not guaranteed to be syncronized across different processors/cores in a multiprocessor/multicore system. It is recommended to bind the current thread to a particular logical processor before using this function.

GetCpuArchitecture ( ) : CpuArchitecture

Provides information about the architecture of the processor.

GetCpuMicroarchitecture ( ) : CpuMicroarchitecture

Provides information about the microarchitecture of the processor.

GetCpuVendor ( ) : Yeppp.CpuVendor

Provides information about the vendor of the processor.

GetProcessABI ( ) : ABI

Provides information about the ABI of the running process.

GetTimerAccuracy ( ) : ulong

Detects the minimum time difference in nanoseconds which can be measured by the high-resolution system timer.

GetTimerFrequency ( ) : ulong

Queries the frequency (number of ticks per second) of the high-resolution system timer.

The difference in ticks between two time moments divided by timer frequency gives the number of seconds between two time moments.

GetTimerTicks ( ) : ulong

Queries the ticks count of the high-resolution system timer.

The difference in ticks between two time moments divided by timer frequency gives the number of seconds between two time moments.

GetVersion ( ) : Version

Provides information about Yeppp! library version.

IsSupported ( CpuIsaFeature isaFeature ) : bool

Checks if the specified ISA extension is supported by the processor.

IsSupported ( CpuSimdFeature simdFeature ) : bool

Checks if the specified SIMD extension is supported by the processor.

IsSupported ( CpuSystemFeature systemFeature ) : bool

Checks if the specified non-ISA CPU or system extension is supported by the processor.

Release ( ) : void

Deinitializes Yeppp! library and releases all associated resources.

This function is inteded for .Net libraries which might be unloaded (e.g. plugins) and should be called immediately before the module is unloaded.Calling Yeppp! functions after after a call to this method is prohibited and might crash the application.

ReleaseCycleCounter ( CpuCycleCounterState cycleCounter ) : ulong

Stops counting the processor cycles, releases the system resources associated with the cycle counter, and returns the number of cycles elapsed.

비공개 메소드들

메소드 설명
Bind ( NativeLibrary nativeLibrary ) : void
GetException ( Status status ) : System.Exception
GetString ( Enumeration enumeration, uint value, StringType stringType ) : string
Init ( ) : void
IsDefined ( Enumeration enumeration, uint value ) : bool
Unbind ( ) : void
yepLibrary_GetCpuArchitecture ( uint &architecture ) : Status
yepLibrary_GetCpuCyclesAcquire ( ulong &state ) : Status
yepLibrary_GetCpuCyclesRelease ( ulong &state, ulong &cycles ) : Status
yepLibrary_GetCpuIsaFeatures ( ulong &isaFeatures ) : Status
yepLibrary_GetCpuMicroarchitecture ( uint &vendor ) : Status
yepLibrary_GetCpuSimdFeatures ( ulong &simdFeatures ) : Status
yepLibrary_GetCpuSystemFeatures ( ulong &systemFeatures ) : Status
yepLibrary_GetCpuVendor ( uint &vendor ) : Status
yepLibrary_GetString ( Enumeration enumeration, uint value, StringType stringType, System buffer, System &length ) : Status
yepLibrary_GetTimerAccuracy ( ulong &accuracy ) : Status
yepLibrary_GetTimerFrequency ( ulong &frequency ) : Status
yepLibrary_GetTimerTicks ( ulong &ticks ) : Status
yepLibrary_GetVersion ( ) : System.IntPtr
yepLibrary_Init ( ) : Status
yepLibrary_Release ( ) : Status

메소드 상세

AcquireCycleCounter() 공개 정적인 메소드

Initializes the processor cycle counter and starts counting the processor cycles.
Call ReleaseCycleCounter to get the number of processor cycles passed. The cycle counters are not guaranteed to be syncronized across different processors/cores in a multiprocessor/multicore system. It is recommended to bind the current thread to a particular logical processor before using this function.
The processor does not have a cycle counter or the operating system does not provide access to the CPU cycle counter If the attempt to read the cycle counter or release the OS resources failed inside the OS kernel.
public static AcquireCycleCounter ( ) : CpuCycleCounterState
리턴 CpuCycleCounterState

GetCpuArchitecture() 공개 정적인 메소드

Provides information about the architecture of the processor.
public static GetCpuArchitecture ( ) : CpuArchitecture
리턴 CpuArchitecture

GetCpuMicroarchitecture() 공개 정적인 메소드

Provides information about the microarchitecture of the processor.
public static GetCpuMicroarchitecture ( ) : CpuMicroarchitecture
리턴 CpuMicroarchitecture

GetCpuVendor() 공개 정적인 메소드

Provides information about the vendor of the processor.
public static GetCpuVendor ( ) : Yeppp.CpuVendor
리턴 Yeppp.CpuVendor

GetProcessABI() 공개 정적인 메소드

Provides information about the ABI of the running process.
public static GetProcessABI ( ) : ABI
리턴 ABI

GetTimerAccuracy() 공개 정적인 메소드

Detects the minimum time difference in nanoseconds which can be measured by the high-resolution system timer.
If the attempt to measure the accuracy of high-resolution timer failed inside the OS kernel.
public static GetTimerAccuracy ( ) : ulong
리턴 ulong

GetTimerFrequency() 공개 정적인 메소드

Queries the frequency (number of ticks per second) of the high-resolution system timer.
The difference in ticks between two time moments divided by timer frequency gives the number of seconds between two time moments.
The attempt to read the high-resolution timer frequency failed inside the OS kernel.
public static GetTimerFrequency ( ) : ulong
리턴 ulong

GetTimerTicks() 공개 정적인 메소드

Queries the ticks count of the high-resolution system timer.
The difference in ticks between two time moments divided by timer frequency gives the number of seconds between two time moments.
The attempt to read the high-resolution timer failed inside the OS kernel.
public static GetTimerTicks ( ) : ulong
리턴 ulong

GetVersion() 공개 정적인 메소드

Provides information about Yeppp! library version.
public static GetVersion ( ) : Version
리턴 Version

IsSupported() 공개 정적인 메소드

Checks if the specified ISA extension is supported by the processor.
public static IsSupported ( CpuIsaFeature isaFeature ) : bool
isaFeature CpuIsaFeature An object specifying the ISA extension of interest.
리턴 bool

IsSupported() 공개 정적인 메소드

Checks if the specified SIMD extension is supported by the processor.
public static IsSupported ( CpuSimdFeature simdFeature ) : bool
simdFeature CpuSimdFeature An object specifying the SIMD extension of interest.
리턴 bool

IsSupported() 공개 정적인 메소드

Checks if the specified non-ISA CPU or system extension is supported by the processor.
public static IsSupported ( CpuSystemFeature systemFeature ) : bool
systemFeature CpuSystemFeature An object specifying the non-ISA CPU or system extension of interest.
리턴 bool

Release() 공개 정적인 메소드

Deinitializes Yeppp! library and releases all associated resources.
This function is inteded for .Net libraries which might be unloaded (e.g. plugins) and should be called immediately before the module is unloaded. Calling Yeppp! functions after after a call to this method is prohibited and might crash the application.
Resources allocated by Yeppp! library could not be unloaded due to memory corruption. Yeppp! library is already released by this module.
public static Release ( ) : void
리턴 void

ReleaseCycleCounter() 공개 정적인 메소드

Stops counting the processor cycles, releases the system resources associated with the cycle counter, and returns the number of cycles elapsed.
The cycleCounter object is not a valid state of the cycle counter. This can happen if the cycleCounter object was released previously. The processor does not have a cycle counter or the operating system does not provide access to the CPU cycle counter If the attempt to read the cycle counter or release the OS resources failed inside the OS kernel.
public static ReleaseCycleCounter ( CpuCycleCounterState cycleCounter ) : ulong
cycleCounter CpuCycleCounterState An object representing the state of the cycle counter returned by . The cycle counter should be released only once, and this function invalidates the state object.
리턴 ulong