Yeppp!  0.9.1
 All Data Structures Functions Variables Enumerations Enumerator Groups Pages
Data Structures | Enumerations | Functions
yepLibrary: library initialization, information, and support functions.

Data Structures

struct  YepLibraryVersion
 Contains information about Yeppp! library version. More...
 

Enumerations

enum  YepStatus {
  YepStatusOk = 0, YepStatusNullPointer = 1, YepStatusMisalignedPointer = 2, YepStatusInvalidArgument = 3,
  YepStatusInvalidData = 4, YepStatusInvalidState = 5, YepStatusUnsupportedHardware = 6, YepStatusUnsupportedSoftware = 7,
  YepStatusInsufficientBuffer = 8, YepStatusOutOfMemory = 9, YepStatusSystemError = 10
}
 Indicates success or failure of Yeppp! functions. More...
 
enum  YepCpuArchitecture {
  YepCpuArchitectureUnknown = 0, YepCpuArchitectureX86 = 1, YepCpuArchitectureARM = 2, YepCpuArchitectureMIPS = 3,
  YepCpuArchitecturePowerPC = 4, YepCpuArchitectureIA64 = 5, YepCpuArchitectureSPARC = 6
}
 The basic instruction set architecture of the processor. More...
 
enum  YepCpuVendor {
  YepCpuVendorUnknown = 0, YepCpuVendorIntel = 1, YepCpuVendorAMD = 2, YepCpuVendorVIA = 3,
  YepCpuVendorTransmeta = 4, YepCpuVendorCyrix = 5, YepCpuVendorRise = 6, YepCpuVendorNSC = 7,
  YepCpuVendorSiS = 8, YepCpuVendorNexGen = 9, YepCpuVendorUMC = 10, YepCpuVendorRDC = 11,
  YepCpuVendorDMP = 12, YepCpuVendorARM = 20, YepCpuVendorMarvell = 21, YepCpuVendorQualcomm = 22,
  YepCpuVendorDEC = 23, YepCpuVendorTI = 24, YepCpuVendorApple = 25, YepCpuVendorIngenic = 40,
  YepCpuVendorICT = 41, YepCpuVendorMIPS = 42, YepCpuVendorIBM = 50, YepCpuVendorMotorola = 51,
  YepCpuVendorPASemi = 52, YepCpuVendorSun = 60, YepCpuVendorOracle = 61, YepCpuVendorFujitsu = 62,
  YepCpuVendorMCST = 63
}
 The company which designed the processor microarchitecture. More...
 
enum  YepCpuMicroarchitecture {
  YepCpuMicroarchitectureUnknown = 0, YepCpuMicroarchitectureP5 = (YepCpuArchitectureX86 << 24) + (YepCpuVendorIntel << 16) + 0x0001, YepCpuMicroarchitectureP6 = (YepCpuArchitectureX86 << 24) + (YepCpuVendorIntel << 16) + 0x0002, YepCpuMicroarchitectureWillamette = (YepCpuArchitectureX86 << 24) + (YepCpuVendorIntel << 16) + 0x0003,
  YepCpuMicroarchitecturePrescott = (YepCpuArchitectureX86 << 24) + (YepCpuVendorIntel << 16) + 0x0004, YepCpuMicroarchitectureDothan = (YepCpuArchitectureX86 << 24) + (YepCpuVendorIntel << 16) + 0x0005, YepCpuMicroarchitectureYonah = (YepCpuArchitectureX86 << 24) + (YepCpuVendorIntel << 16) + 0x0006, YepCpuMicroarchitectureConroe = (YepCpuArchitectureX86 << 24) + (YepCpuVendorIntel << 16) + 0x0007,
  YepCpuMicroarchitecturePenryn = (YepCpuArchitectureX86 << 24) + (YepCpuVendorIntel << 16) + 0x0008, YepCpuMicroarchitectureBonnell = (YepCpuArchitectureX86 << 24) + (YepCpuVendorIntel << 16) + 0x0009, YepCpuMicroarchitectureNehalem = (YepCpuArchitectureX86 << 24) + (YepCpuVendorIntel << 16) + 0x000A, YepCpuMicroarchitectureSandyBridge = (YepCpuArchitectureX86 << 24) + (YepCpuVendorIntel << 16) + 0x000B,
  YepCpuMicroarchitectureSaltwell = (YepCpuArchitectureX86 << 24) + (YepCpuVendorIntel << 16) + 0x000C, YepCpuMicroarchitectureIvyBridge = (YepCpuArchitectureX86 << 24) + (YepCpuVendorIntel << 16) + 0x000D, YepCpuMicroarchitectureHaswell = (YepCpuArchitectureX86 << 24) + (YepCpuVendorIntel << 16) + 0x000E, YepCpuMicroarchitectureKnightsFerry = (YepCpuArchitectureX86 << 24) + (YepCpuVendorIntel << 16) + 0x0100,
  YepCpuMicroarchitectureKnightsCorner = (YepCpuArchitectureX86 << 24) + (YepCpuVendorIntel << 16) + 0x0101, YepCpuMicroarchitectureK5 = (YepCpuArchitectureX86 << 24) + (YepCpuVendorAMD << 16) + 0x0001, YepCpuMicroarchitectureK6 = (YepCpuArchitectureX86 << 24) + (YepCpuVendorAMD << 16) + 0x0002, YepCpuMicroarchitectureK7 = (YepCpuArchitectureX86 << 24) + (YepCpuVendorAMD << 16) + 0x0003,
  YepCpuMicroarchitectureGeode = (YepCpuArchitectureX86 << 24) + (YepCpuVendorAMD << 16) + 0x0004, YepCpuMicroarchitectureK8 = (YepCpuArchitectureX86 << 24) + (YepCpuVendorAMD << 16) + 0x0005, YepCpuMicroarchitectureK10 = (YepCpuArchitectureX86 << 24) + (YepCpuVendorAMD << 16) + 0x0006, YepCpuMicroarchitectureBobcat = (YepCpuArchitectureX86 << 24) + (YepCpuVendorAMD << 16) + 0x0007,
  YepCpuMicroarchitectureBulldozer = (YepCpuArchitectureX86 << 24) + (YepCpuVendorAMD << 16) + 0x0008, YepCpuMicroarchitecturePiledriver = (YepCpuArchitectureX86 << 24) + (YepCpuVendorAMD << 16) + 0x0009, YepCpuMicroarchitectureJaguar = (YepCpuArchitectureX86 << 24) + (YepCpuVendorAMD << 16) + 0x000A, YepCpuMicroarchitectureSteamroller = (YepCpuArchitectureX86 << 24) + (YepCpuVendorAMD << 16) + 0x000B,
  YepCpuMicroarchitectureStrongARM = (YepCpuArchitectureARM << 24) + (YepCpuVendorIntel << 16) + 0x0001, YepCpuMicroarchitectureXScale = (YepCpuArchitectureARM << 24) + (YepCpuVendorIntel << 16) + 0x0002, YepCpuMicroarchitectureARM7 = (YepCpuArchitectureARM << 24) + (YepCpuVendorARM << 16) + 0x0001, YepCpuMicroarchitectureARM9 = (YepCpuArchitectureARM << 24) + (YepCpuVendorARM << 16) + 0x0002,
  YepCpuMicroarchitectureARM11 = (YepCpuArchitectureARM << 24) + (YepCpuVendorARM << 16) + 0x0003, YepCpuMicroarchitectureCortexA5 = (YepCpuArchitectureARM << 24) + (YepCpuVendorARM << 16) + 0x0004, YepCpuMicroarchitectureCortexA7 = (YepCpuArchitectureARM << 24) + (YepCpuVendorARM << 16) + 0x0005, YepCpuMicroarchitectureCortexA8 = (YepCpuArchitectureARM << 24) + (YepCpuVendorARM << 16) + 0x0006,
  YepCpuMicroarchitectureCortexA9 = (YepCpuArchitectureARM << 24) + (YepCpuVendorARM << 16) + 0x0007, YepCpuMicroarchitectureCortexA15 = (YepCpuArchitectureARM << 24) + (YepCpuVendorARM << 16) + 0x0008, YepCpuMicroarchitectureScorpion = (YepCpuArchitectureARM << 24) + (YepCpuVendorQualcomm << 16) + 0x0001, YepCpuMicroarchitectureKrait = (YepCpuArchitectureARM << 24) + (YepCpuVendorQualcomm << 16) + 0x0002,
  YepCpuMicroarchitecturePJ1 = (YepCpuArchitectureARM << 24) + (YepCpuVendorMarvell << 16) + 0x0001, YepCpuMicroarchitecturePJ4 = (YepCpuArchitectureARM << 24) + (YepCpuVendorMarvell << 16) + 0x0002, YepCpuMicroarchitectureSwift = (YepCpuArchitectureARM << 24) + (YepCpuVendorApple << 16) + 0x0001, YepCpuMicroarchitectureItanium = (YepCpuArchitectureIA64 << 24) + (YepCpuVendorIntel << 16) + 0x0001,
  YepCpuMicroarchitectureItanium2 = (YepCpuArchitectureIA64 << 24) + (YepCpuVendorIntel << 16) + 0x0002, YepCpuMicroarchitectureMIPS24K = (YepCpuArchitectureMIPS << 24) + (YepCpuVendorMIPS << 16) + 0x0001, YepCpuMicroarchitectureMIPS34K = (YepCpuArchitectureMIPS << 24) + (YepCpuVendorMIPS << 16) + 0x0002, YepCpuMicroarchitectureMIPS74K = (YepCpuArchitectureMIPS << 24) + (YepCpuVendorMIPS << 16) + 0x0003,
  YepCpuMicroarchitectureXBurst = (YepCpuArchitectureMIPS << 24) + (YepCpuVendorIngenic << 16) + 0x0001, YepCpuMicroarchitectureXBurst2 = (YepCpuArchitectureMIPS << 24) + (YepCpuVendorIngenic << 16) + 0x0002
}
 Type of processor microarchitecture. More...
 
enum  YepEnumeration {
  YepEnumerationStatus = 0, YepEnumerationCpuArchitecture = 1, YepEnumerationCpuVendor = 2, YepEnumerationCpuMicroarchitecture = 3,
  YepEnumerationGenericIsaFeature = YEP_ENUMERATION_ISA_FEATURE_FOR_ARCHITECTURE(YepCpuArchitectureUnknown), YepEnumerationGenericSimdFeature = YEP_ENUMERATION_SIMD_FEATURE_FOR_ARCHITECTURE(YepCpuArchitectureUnknown), YepEnumerationGenericSystemFeature = YEP_ENUMERATION_SYSTEM_FEATURE_FOR_ARCHITECTURE(YepCpuArchitectureUnknown), YepEnumerationX86IsaFeature = YEP_ENUMERATION_ISA_FEATURE_FOR_ARCHITECTURE(YepCpuArchitectureX86),
  YepEnumerationX86SimdFeature = YEP_ENUMERATION_SIMD_FEATURE_FOR_ARCHITECTURE(YepCpuArchitectureX86), YepEnumerationX86SystemFeature = YEP_ENUMERATION_SYSTEM_FEATURE_FOR_ARCHITECTURE(YepCpuArchitectureX86), YepEnumerationARMIsaFeature = YEP_ENUMERATION_ISA_FEATURE_FOR_ARCHITECTURE(YepCpuArchitectureARM), YepEnumerationARMSimdFeature = YEP_ENUMERATION_SIMD_FEATURE_FOR_ARCHITECTURE(YepCpuArchitectureARM),
  YepEnumerationARMSystemFeature = YEP_ENUMERATION_SYSTEM_FEATURE_FOR_ARCHITECTURE(YepCpuArchitectureARM), YepEnumerationMIPSIsaFeature = YEP_ENUMERATION_ISA_FEATURE_FOR_ARCHITECTURE(YepCpuArchitectureMIPS), YepEnumerationMIPSSimdFeature = YEP_ENUMERATION_SIMD_FEATURE_FOR_ARCHITECTURE(YepCpuArchitectureMIPS), YepEnumerationMIPSSystemFeature = YEP_ENUMERATION_SYSTEM_FEATURE_FOR_ARCHITECTURE(YepCpuArchitectureMIPS),
  YepEnumerationPowerPCIsaFeature = YEP_ENUMERATION_ISA_FEATURE_FOR_ARCHITECTURE(YepCpuArchitecturePowerPC), YepEnumerationPowerPCSimdFeature = YEP_ENUMERATION_SIMD_FEATURE_FOR_ARCHITECTURE(YepCpuArchitecturePowerPC), YepEnumerationPowerPCSystemFeature = YEP_ENUMERATION_SYSTEM_FEATURE_FOR_ARCHITECTURE(YepCpuArchitecturePowerPC), YepEnumerationIA64IsaFeature = YEP_ENUMERATION_ISA_FEATURE_FOR_ARCHITECTURE(YepCpuArchitectureIA64),
  YepEnumerationIA64SimdFeature = YEP_ENUMERATION_SIMD_FEATURE_FOR_ARCHITECTURE(YepCpuArchitectureIA64), YepEnumerationIA64SystemFeature = YEP_ENUMERATION_SYSTEM_FEATURE_FOR_ARCHITECTURE(YepCpuArchitectureIA64), YepEnumerationSPARCIsaFeature = YEP_ENUMERATION_ISA_FEATURE_FOR_ARCHITECTURE(YepCpuArchitectureSPARC), YepEnumerationSPARCSimdFeature = YEP_ENUMERATION_SIMD_FEATURE_FOR_ARCHITECTURE(YepCpuArchitectureSPARC),
  YepEnumerationSPARCSystemFeature = YEP_ENUMERATION_SYSTEM_FEATURE_FOR_ARCHITECTURE(YepCpuArchitectureSPARC)
}
 Indicates how to interpret integer value from one of Yeppp! enumerations. More...
 

Functions

enum YepStatus yepLibrary_Init ()
 Initialized the Yeppp! library.
 
enum YepStatus yepLibrary_Release ()
 Deinitialized the Yeppp! library and releases the consumed system resources.
 
struct YepLibraryVersionyepLibrary_GetVersion ()
 Returns basic information about the library version.
 
enum YepStatus yepLibrary_GetString (const enum YepEnumeration *enumerationType, const Yep32u *enumerationValue, void *buffer, YepSize *length)
 Returns a string representation of an integer value in a enumeration.
 
enum YepStatus yepLibrary_GetCpuIsaFeatures (Yep64u *isaFeatures)
 Returns information about the supported ISA extensions (excluding SIMD extensions)
 
enum YepStatus yepLibrary_GetCpuSimdFeatures (Yep64u *simdFeatures)
 Returns information about the supported SIMD extensions.
 
enum YepStatus yepLibrary_GetCpuSystemFeatures (Yep64u *systemFeatures)
 Returns information about processor features other than ISA extensions, and OS features related to CPU.
 
enum YepStatus yepLibrary_GetCpuVendor (enum YepCpuVendor *vendor)
 Returns information about the vendor of the processor.
 
enum YepStatus yepLibrary_GetCpuArchitecture (enum YepCpuArchitecture *architecture)
 Returns the type of processor architecture.
 
enum YepStatus yepLibrary_GetCpuMicroarchitecture (enum YepCpuMicroarchitecture *microarchitecture)
 Returns the type of processor microarchitecture used.
 
enum YepStatus yepLibrary_GetCpuCyclesAcquire (Yep64u *state)
 Initializes the processor cycle counter and starts counting the processor cycles.
 
enum YepStatus yepLibrary_GetCpuCyclesRelease (Yep64u *state, Yep64u *cycles)
 Stops counting the processor cycles, releases the system resources associated with the cycle counter, and returns the number of cycles elapsed.
 
enum YepStatus yepLibrary_GetTimerTicks (Yep64u *ticks)
 Returns the number of ticks of the high-resolution system timer.
 
enum YepStatus yepLibrary_GetTimerFrequency (Yep64u *frequency)
 Returns the number of ticks of the system timer per second.
 
enum YepStatus yepLibrary_GetTimerAccuracy (Yep64u *accuracy)
 Returns the minimum time difference in nanoseconds which can be measured by the high-resolution system timer.
 

Common CPU and System Features

See Also
yepLibrary_GetCpuSystemFeatures
#define YepSystemFeatureCycleCounter   0x0000000000000001ull
 The processor has a built-in cycle counter, and the operating system provides a way to access it.
 
#define YepSystemFeatureCycleCounter64Bit   0x0000000000000002ull
 The processor has a 64-bit cycle counter, or the operating system provides an abstraction of a 64-bit cycle counter.
 
#define YepSystemFeatureAddressSpace64Bit   0x0000000000000004ull
 The processor and the operating system allows to use 64-bit pointers.
 
#define YepSystemFeatureGPRegisters64Bit   0x0000000000000008ull
 The processor and the operating system allows to do 64-bit arithmetical operations on general-purpose registers.
 
#define YepSystemFeatureMisalignedAccess   0x0000000000000010ull
 The processor and the operating system allows misaligned memory reads and writes.
 
#define YepSystemFeatureSingleThreaded   0x0000000000000020ull
 The processor or the operating system support at most one hardware thread.
 

x86 and x86-64 ISA Extensions

See Also
yepLibrary_GetCpuIsaFeatures
#define YepX86IsaFeatureFPU   0x0000000000000001ull
 x87 FPU integrated on chip.
 
#define YepX86IsaFeatureCpuid   0x0000000000000002ull
 x87 CPUID instruction.
 
#define YepX86IsaFeatureRdtsc   0x0000000000000004ull
 RDTSC instruction.
 
#define YepX86IsaFeatureCMOV   0x0000000000000008ull
 CMOV, FCMOV, and FCOMI/FUCOMI instructions.
 
#define YepX86IsaFeatureSYSENTER   0x0000000000000010ull
 SYSENTER and SYSEXIT instructions.
 
#define YepX86IsaFeatureSYSCALL   0x0000000000000020ull
 SYSCALL and SYSRET instructions.
 
#define YepX86IsaFeatureMSR   0x0000000000000040ull
 RDMSR and WRMSR instructions.
 
#define YepX86IsaFeatureClflush   0x0000000000000080ull
 CLFLUSH instruction.
 
#define YepX86IsaFeatureMONITOR   0x0000000000000100ull
 MONITOR and MWAIT instructions.
 
#define YepX86IsaFeatureFXSAVE   0x0000000000000200ull
 FXSAVE and FXRSTOR instructions.
 
#define YepX86IsaFeatureXSAVE   0x0000000000000400ull
 XSAVE, XRSTOR, XGETBV, and XSETBV instructions.
 
#define YepX86IsaFeatureCmpxchg8b   0x0000000000000800ull
 CMPXCHG8B instruction.
 
#define YepX86IsaFeatureCmpxchg16b   0x0000000000001000ull
 CMPXCHG16B instruction.
 
#define YepX86IsaFeatureX64   0x0000000000002000ull
 Support for 64-bit mode.
 
#define YepX86IsaFeatureLahfSahf64   0x0000000000004000ull
 Support for LAHF and SAHF instructions in 64-bit mode.
 
#define YepX86IsaFeatureFsGsBase   0x0000000000008000ull
 RDFSBASE, RDGSBASE, WRFSBASE, and WRGSBASE instructions.
 
#define YepX86IsaFeatureMovbe   0x0000000000010000ull
 MOVBE instruction.
 
#define YepX86IsaFeaturePopcnt   0x0000000000020000ull
 POPCNT instruction.
 
#define YepX86IsaFeatureLzcnt   0x0000000000040000ull
 LZCNT instruction.
 
#define YepX86IsaFeatureBMI   0x0000000000080000ull
 BMI instruction set.
 
#define YepX86IsaFeatureBMI2   0x0000000000100000ull
 BMI 2 instruction set.
 
#define YepX86IsaFeatureTBM   0x0000000000200000ull
 TBM instruction set.
 
#define YepX86IsaFeatureRdrand   0x0000000000400000ull
 RDRAND instruction.
 
#define YepX86IsaFeatureACE   0x0000000000800000ull
 Padlock Advanced Cryptography Engine on chip.
 
#define YepX86IsaFeatureACE2   0x0000000001000000ull
 Padlock Advanced Cryptography Engine 2 on chip.
 
#define YepX86IsaFeatureRNG   0x0000000002000000ull
 Padlock Random Number Generator on chip.
 
#define YepX86IsaFeaturePHE   0x0000000004000000ull
 Padlock Hash Engine on chip.
 
#define YepX86IsaFeaturePMM   0x0000000008000000ull
 Padlock Montgomery Multiplier on chip.
 
#define YepX86IsaFeatureAES   0x0000000010000000ull
 AES instruction set.
 
#define YepX86IsaFeaturePclmulqdq   0x0000000020000000ull
 PCLMULQDQ instruction.
 
#define YepX86IsaFeatureRdtscp   0x0000000040000000ull
 RDTSCP instruction.
 
#define YepX86IsaFeatureLWP   0x0000000080000000ull
 Lightweight Profiling extension.
 
#define YepX86IsaFeatureHLE   0x0000000100000000ull
 Hardware Lock Elision extension.
 
#define YepX86IsaFeatureRTM   0x0000000200000000ull
 Restricted Transactional Memory extension.
 
#define YepX86IsaFeatureXtest   0x0000000400000000ull
 XTEST instruction.
 
#define YepX86IsaFeatureRdseed   0x0000000800000000ull
 RDSEED instruction.
 
#define YepX86IsaFeatureADX   0x0000001000000000ull
 ADCX and ADOX instructions.
 

x86 and x86-64 SIMD Extensions

See Also
yepLibrary_GetCpuSimdFeatures
#define YepX86SimdFeatureMMX   0x0000000000000001ull
 MMX instruction set.
 
#define YepX86SimdFeatureMMXPlus   0x0000000000000002ull
 MMX+ instruction set.
 
#define YepX86SimdFeatureEMMX   0x0000000000000004ull
 EMMX instruction set.
 
#define YepX86SimdFeature3dnow   0x0000000000000008ull
 3dnow! instruction set.
 
#define YepX86SimdFeature3dnowPlus   0x0000000000000010ull
 3dnow!+ instruction set.
 
#define YepX86SimdFeature3dnowPrefetch   0x0000000000000020ull
 3dnow! prefetch instructions.
 
#define YepX86SimdFeature3dnowGeode   0x0000000000000040ull
 Geode 3dnow! instructions.
 
#define YepX86SimdFeatureSSE   0x0000000000000080ull
 SSE instruction set.
 
#define YepX86SimdFeatureSSE2   0x0000000000000100ull
 SSE 2 instruction set.
 
#define YepX86SimdFeatureSSE3   0x0000000000000200ull
 SSE 3 instruction set.
 
#define YepX86SimdFeatureSSSE3   0x0000000000000400ull
 SSSE 3 instruction set.
 
#define YepX86SimdFeatureSSE4_1   0x0000000000000800ull
 SSE 4.1 instruction set.
 
#define YepX86SimdFeatureSSE4_2   0x0000000000001000ull
 SSE 4.2 instruction set.
 
#define YepX86SimdFeatureSSE4A   0x0000000000002000ull
 SSE 4A instruction set.
 
#define YepX86SimdFeatureAVX   0x0000000000004000ull
 AVX instruction set.
 
#define YepX86SimdFeatureAVX2   0x0000000000008000ull
 AVX 2 instruction set.
 
#define YepX86SimdFeatureXOP   0x0000000000010000ull
 XOP instruction set.
 
#define YepX86SimdFeatureF16C   0x0000000000020000ull
 F16C instruction set.
 
#define YepX86SimdFeatureFMA3   0x0000000000040000ull
 FMA3 instruction set.
 
#define YepX86SimdFeatureFMA4   0x0000000000080000ull
 FMA4 instruction set.
 

x86 CPU and System Features

See Also
yepLibrary_GetCpuSystemFeatures
#define YepX86SystemFeatureFPU   0x0000000100000000ull
 The CPU has x87 FPU registers, and the operating systems preserves them during context switch.
 
#define YepX86SystemFeatureSSE   0x0000000200000000ull
 The CPU has SSE registers, and the operating systems preserves them during context switch.
 
#define YepX86SystemFeatureAVX   0x0000000400000000ull
 The CPU has AVX registers, and the operating systems preserves them during context switch.
 
#define YepX86SystemFeatureMisalignedSSE   0x0000000800000000ull
 Processor allows to use misaligned memory operands in SSE instructions other than loads and stores.
 
#define YepX86SystemFeatureACE   0x0000001000000000ull
 Processor and the operating system support the Padlock Advanced Cryptography Engine.
 
#define YepX86SystemFeatureACE2   0x0000002000000000ull
 Processor and the operating system support the Padlock Advanced Cryptography Engine 2.
 
#define YepX86SystemFeatureRNG   0x0000004000000000ull
 Processor and the operating system support the Padlock Random Number Generator.
 
#define YepX86SystemFeaturePHE   0x0000008000000000ull
 Processor and the operating system support the Padlock Hash Engine.
 
#define YepX86SystemFeaturePMM   0x0000010000000000ull
 Processor and the operating system support the Padlock Montgomery Multiplier.
 

IA64 ISA Extensions

See Also
yepLibrary_GetCpuIsaFeatures
#define YepIA64IsaFeatureBrl   0x0000000000000001ull
 Long branch instruction.
 
#define YepIA64IsaFeatureAtomic128   0x0000000000000002ull
 Atomic 128-bit (16-byte) loads, stores, and CAS.
 
#define YepIA64IsaFeatureClz   0x0000000000000004ull
 CLZ (count leading zeros) instruction.
 
#define YepIA64IsaFeatureMpy4   0x0000000000000008ull
 MPY4 and MPYSHL4 (Truncated 32-bit multiplication) instructions.
 

ARM ISA Extensions

See Also
yepLibrary_GetCpuIsaFeatures
#define YepARMIsaFeatureV4   0x0000000000000001ull
 ARMv4 instruction set.
 
#define YepARMIsaFeatureV5   0x0000000000000002ull
 ARMv5 instruciton set.
 
#define YepARMIsaFeatureV5E   0x0000000000000004ull
 ARMv5 DSP instructions.
 
#define YepARMIsaFeatureV6   0x0000000000000008ull
 ARMv6 instruction set.
 
#define YepARMIsaFeatureV6K   0x0000000000000010ull
 ARMv6 Multiprocessing extensions.
 
#define YepARMIsaFeatureV7   0x0000000000000020ull
 ARMv7 instruction set.
 
#define YepARMIsaFeatureV7MP   0x0000000000000040ull
 ARMv7 Multiprocessing extensions.
 
#define YepARMIsaFeatureThumb   0x0000000000000080ull
 Thumb mode.
 
#define YepARMIsaFeatureThumb2   0x0000000000000100ull
 Thumb 2 mode.
 
#define YepARMIsaFeatureThumbEE   0x0000000000000200ull
 Thumb EE mode.
 
#define YepARMIsaFeatureJazelle   0x0000000000000400ull
 Jazelle extensions.
 
#define YepARMIsaFeatureFPA   0x0000000000000800ull
 FPA instructions.
 
#define YepARMIsaFeatureVFP   0x0000000000001000ull
 VFP instruction set.
 
#define YepARMIsaFeatureVFP2   0x0000000000002000ull
 VFPv2 instruction set.
 
#define YepARMIsaFeatureVFP3   0x0000000000004000ull
 VFPv3 instruction set.
 
#define YepARMIsaFeatureVFPd32   0x0000000000008000ull
 VFP implementation with 32 double-precision registers.
 
#define YepARMIsaFeatureVFP3HP   0x0000000000010000ull
 VFPv3 half precision extension.
 
#define YepARMIsaFeatureVFP4   0x0000000000020000ull
 VFPv4 instruction set.
 
#define YepARMIsaFeatureDiv   0x0000000000040000ull
 SDIV and UDIV instructions.
 
#define YepARMIsaFeatureArmada   0x0000000000080000ull
 Marvell Armada instruction extensions.
 

ARM SIMD Extensions

See Also
yepLibrary_GetCpuSimdFeatures
#define YepARMSimdFeatureXScale   0x0000000000000001ull
 XScale instructions.
 
#define YepARMSimdFeatureWMMX   0x0000000000000002ull
 Wireless MMX instruction set.
 
#define YepARMSimdFeatureWMMX2   0x0000000000000004ull
 Wireless MMX 2 instruction set.
 
#define YepARMSimdFeatureNEON   0x0000000000000008ull
 NEON (Advanced SIMD) instruction set.
 
#define YepARMSimdFeatureNEONHP   0x0000000000000010ull
 NEON (Advanced SIMD) half-precision extension.
 
#define YepARMSimdFeatureNEON2   0x0000000000000020ull
 NEON (Advanced SIMD) v2 instruction set.
 

ARM CPU and System Features

See Also
yepLibrary_GetCpuSystemFeatures
#define YepARMSystemFeatureVFPVectorMode   0x0000000100000000ull
 VFP vector mode is supported in hardware.
 

MIPS ISA Extensions

See Also
yepLibrary_GetCpuIsaFeatures
#define YepMIPSIsaFeatureR2   0x0000000000000001ull
 MIPS32/MIPS64 Release 2 architecture.
 
#define YepMIPSIsaFeatureR3   0x0000000000000002ull
 MIPS32/MIPS64 Release 3 architecture.
 
#define YepMIPSIsaFeatureFPU   0x0000000000000004ull
 FPU with S, D, and W formats and instructions.
 
#define YepMIPSIsaFeatureMT   0x0000000000000008ull
 Multi-threading extension.
 
#define YepMIPSIsaFeatureMIPS16   0x0000000000000010ull
 MIPS16 extension.
 
#define YepMIPSIsaFeatureSmartmips   0x0000000000000020ull
 SmartMIPS extension.
 

MIPS SIMD Extensions

See Also
yepLibrary_GetCpuSimdFeatures
#define YepMIPSSimdFeatureMDMX   0x0000000000000001ull
 MDMX instruction set.
 
#define YepMIPSSimdFeatureMIPS3D   0x0000000000000002ull
 MIPS3D instruction set.
 
#define YepMIPSSimdFeaturePairedSingle   0x0000000000000004ull
 Paired-single instructions.
 
#define YepMIPSSimdFeatureDSP   0x0000000000000008ull
 MIPS DSP extension.
 
#define YepMIPSSimdFeatureDSP2   0x0000000000000010ull
 MIPS DSP Release 2 extension.
 
#define YepMIPSSimdFeatureGodsonMMX   0x0000000000000020ull
 Loongson (Godson) MMX instruction set.
 
#define YepMIPSSimdFeatureIMX   0x0000000000000040ull
 Ingenic Media Extension.
 

Detailed Description


Data Structure Documentation

struct YepLibraryVersion

Contains information about Yeppp! library version.

See Also
yepLibrary_GetVersion

Data Fields

Yep32u major
 The major version. Library releases with the same major versions are guaranteed to be API- and ABI-compatible.
 
Yep32u minor
 The minor version. A change in minor versions indicates addition of new features, and major bug-fixes.
 
Yep32u patchLevel
 The patch level. A version with a higher patch level indicates minor bug-fixes.
 
Yep32u build
 The build number. The build number is unique for the fixed combination of major, minor, and patch-level versions.
 
const char * releaseName
 A UTF-8 string with a human-readable name of this release. May contain non-ASCII characters.
 

Macro Definition Documentation

#define YepMIPSIsaFeatureR2   0x0000000000000001ull

MIPS32/MIPS64 Release 2 architecture.

Bug:
Not detected in this Yeppp! release.
#define YepMIPSIsaFeatureR3   0x0000000000000002ull

MIPS32/MIPS64 Release 3 architecture.

Bug:
Not detected in this Yeppp! release.
#define YepMIPSIsaFeatureFPU   0x0000000000000004ull

FPU with S, D, and W formats and instructions.

Bug:
Not detected in this Yeppp! release.
#define YepMIPSSimdFeaturePairedSingle   0x0000000000000004ull

Paired-single instructions.

Bug:
Not detected in this Yeppp! release.
#define YepMIPSSimdFeatureDSP2   0x0000000000000010ull

MIPS DSP Release 2 extension.

Bug:
Not detected in this Yeppp! release.
#define YepMIPSSimdFeatureGodsonMMX   0x0000000000000020ull

Loongson (Godson) MMX instruction set.

Bug:
Not detected in this Yeppp! release.

Enumeration Type Documentation

enum YepStatus

Indicates success or failure of Yeppp! functions.

Enumerator:
YepStatusOk 

Operation finished successfully.

YepStatusNullPointer 

Function call failed because one of the pointer arguments is null.

YepStatusMisalignedPointer 

Function call failed because one of the pointer arguments is not properly aligned.

YepStatusInvalidArgument 

Function call failed because one of the integer arguments has unsupported value.

YepStatusInvalidData 

Function call failed because some of the data passed to the function has invalid format or values.

YepStatusInvalidState 

Function call failed because one of the state objects passed is corrupted.

YepStatusUnsupportedHardware 

Function call failed because the system hardware does not support the requested operation.

YepStatusUnsupportedSoftware 

Function call failed because the operating system does not support the requested operation.

YepStatusInsufficientBuffer 

Function call failed because the provided output buffer is too small or exhausted.

YepStatusOutOfMemory 

Function call failed becuase the library could not allocate the memory.

YepStatusSystemError 

Function call failed because some of the system calls inside the function failed.

The basic instruction set architecture of the processor.

The ISA is always known at compile-time.

See Also
yepLibrary_GetCpuArchitecture
Enumerator:
YepCpuArchitectureUnknown 

Instruction set architecture is not known to the library.

This value is never returned on supported architectures.

YepCpuArchitectureX86 

x86 or x86-64 ISA.

YepCpuArchitectureARM 

ARM ISA.

YepCpuArchitectureMIPS 

MIPS ISA.

YepCpuArchitecturePowerPC 

PowerPC ISA.

YepCpuArchitectureIA64 

IA64 ISA.

YepCpuArchitectureSPARC 

SPARC ISA.

The company which designed the processor microarchitecture.

See Also
yepLibrary_GetCpuVendor
Enumerator:
YepCpuVendorUnknown 

Processor vendor is not known to the library, or the library failed to get vendor information from the OS.

YepCpuVendorIntel 

Intel Corporation. Vendor of x86, x86-64, IA64, and ARM processor microarchitectures.

Sold its ARM design subsidiary in 2006. The last ARM processor design was released in 2004.

YepCpuVendorAMD 

Advanced Micro Devices, Inc. Vendor of x86 and x86-64 processor microarchitectures.

YepCpuVendorVIA 

VIA Technologies, Inc. Vendor of x86 and x86-64 processor microarchitectures.

Processors are designed by Centaur Technology, a subsidiary of VIA Technologies.

YepCpuVendorTransmeta 

Transmeta Corporation. Vendor of x86 processor microarchitectures.

Now defunct. The last processor design was released in 2004. Transmeta processors implemented VLIW ISA and used binary translation to execute x86 code.

YepCpuVendorCyrix 

Cyrix Corporation. Vendor of x86 processor microarchitectures.

Now defunct. The last processor design was released in 1996.

YepCpuVendorRise 

Rise Technology. Vendor of x86 processor microarchitectures.

Now defunct. The last processor design was released in 1999.

YepCpuVendorNSC 

National Semiconductor. Vendor of x86 processor microarchitectures.

Sold its x86 design subsidiary in 1999. The last processor design was released in 1998.

YepCpuVendorSiS 

Silicon Integrated Systems. Vendor of x86 processor microarchitectures.

Sold its x86 design subsidiary in 2001. The last processor design was released in 2001.

YepCpuVendorNexGen 

NexGen. Vendor of x86 processor microarchitectures.

Now defunct. The last processor design was released in 1994. NexGen designed the first x86 microarchitecture which decomposed x86 instructions into simple microoperations.

YepCpuVendorUMC 

United Microelectronics Corporation. Vendor of x86 processor microarchitectures.

Ceased x86 in the early 1990s. The last processor design was released in 1991. Designed U5C and U5D processors. Both are 486 level.

YepCpuVendorRDC 

RDC Semiconductor Co., Ltd. Vendor of x86 processor microarchitectures.

Designes embedded x86 CPUs.

YepCpuVendorDMP 

DM&P Electronics Inc. Vendor of x86 processor microarchitectures.

Mostly embedded x86 designs.

YepCpuVendorARM 

ARM Holdings plc. Vendor of ARM processor microarchitectures.

YepCpuVendorMarvell 

Marvell Technology Group Ltd. Vendor of ARM processor microarchitectures.

YepCpuVendorQualcomm 

Qualcomm Incorporated. Vendor of ARM processor microarchitectures.

YepCpuVendorDEC 

Digital Equipment Corporation. Vendor of ARM processor microarchitecture.

Sold its ARM designs in 1997. The last processor design was released in 1997.

YepCpuVendorTI 

Texas Instruments Inc. Vendor of ARM processor microarchitectures.

YepCpuVendorApple 

Apple Inc. Vendor of ARM processor microarchitectures.

YepCpuVendorIngenic 

Ingenic Semiconductor. Vendor of MIPS processor microarchitectures.

YepCpuVendorICT 

Institute of Computing Technology of the Chinese Academy of Sciences. Vendor of MIPS processor microarchitectures.

YepCpuVendorMIPS 

MIPS Technologies, Inc. Vendor of MIPS processor microarchitectures.

YepCpuVendorIBM 

International Business Machines Corporation. Vendor of PowerPC processor microarchitectures.

YepCpuVendorMotorola 

Motorola, Inc. Vendor of PowerPC and ARM processor microarchitectures.

YepCpuVendorPASemi 

P. A. Semi. Vendor of PowerPC processor microarchitectures.

Now defunct. The last processor design was released in 2007.

YepCpuVendorSun 

Sun Microsystems, Inc. Vendor of SPARC processor microarchitectures.

Now defunct. The last processor design was released in 2008.

YepCpuVendorOracle 

Oracle Corporation. Vendor of SPARC processor microarchitectures.

YepCpuVendorFujitsu 

Fujitsu Limited. Vendor of SPARC processor microarchitectures.

YepCpuVendorMCST 

Moscow Center of SPARC Technologies CJSC. Vendor of SPARC processor microarchitectures.

Type of processor microarchitecture.

Low-level instruction performance characteristics, such as latency and throughput, are constant within microarchitecture. Processors of the same microarchitecture can differ in supported instruction sets and other extensions.

See Also
yepLibrary_GetCpuMicroarchitecture
Enumerator:
YepCpuMicroarchitectureUnknown 

Microarchitecture is unknown, or the library failed to get information about the microarchitecture from OS.

YepCpuMicroarchitectureP5 

Pentium and Pentium MMX microarchitecture.

YepCpuMicroarchitectureP6 

Pentium Pro, Pentium II, and Pentium III.

YepCpuMicroarchitectureWillamette 

Pentium 4 with Willamette, Northwood, or Foster cores.

YepCpuMicroarchitecturePrescott 

Pentium 4 with Prescott and later cores.

YepCpuMicroarchitectureDothan 

Pentium M.

YepCpuMicroarchitectureYonah 

Intel Core microarchitecture.

YepCpuMicroarchitectureConroe 

Intel Core 2 microarchitecture on 65 nm process.

YepCpuMicroarchitecturePenryn 

Intel Core 2 microarchitecture on 45 nm process.

YepCpuMicroarchitectureBonnell 

Intel Atom on 45 nm process.

YepCpuMicroarchitectureNehalem 

Intel Nehalem and Westmere microarchitectures (Core i3/i5/i7 1st gen).

YepCpuMicroarchitectureSandyBridge 

Intel Sandy Bridge microarchitecture (Core i3/i5/i7 2nd gen).

YepCpuMicroarchitectureSaltwell 

Intel Atom on 32 nm process.

YepCpuMicroarchitectureIvyBridge 

Intel Ivy Bridge microarchitecture (Core i3/i5/i7 3rd gen).

YepCpuMicroarchitectureHaswell 

Intel Haswell microarchitecture (Core i3/i5/i7 4th gen)

YepCpuMicroarchitectureKnightsFerry 

Intel Knights Ferry HPC boards.

YepCpuMicroarchitectureKnightsCorner 

Intel Knights Corner HPC boards (aka Xeon Phi).

YepCpuMicroarchitectureK5 

AMD K5.

YepCpuMicroarchitectureK6 

AMD K6 and alike.

YepCpuMicroarchitectureK7 

AMD Athlon and Duron.

YepCpuMicroarchitectureGeode 

AMD Geode GX and LX.

YepCpuMicroarchitectureK8 

AMD Athlon 64, Opteron 64.

YepCpuMicroarchitectureK10 

AMD K10 (Barcelona, Istambul, Magny-Cours).

YepCpuMicroarchitectureBobcat 

AMD Bobcat mobile microarchitecture.

YepCpuMicroarchitectureBulldozer 

AMD Bulldozer microarchitecture (1st gen K15).

YepCpuMicroarchitecturePiledriver 

AMD Piledriver microarchitecture (2nd gen K15).

YepCpuMicroarchitectureJaguar 

AMD Jaguar mobile microarchitecture.

YepCpuMicroarchitectureSteamroller 

AMD Steamroller microarchitecture (3rd gen K15).

YepCpuMicroarchitectureStrongARM 

DEC/Intel StrongARM processors.

YepCpuMicroarchitectureXScale 

Intel/Marvell XScale processors.

YepCpuMicroarchitectureARM7 

ARM7 series.

YepCpuMicroarchitectureARM9 

ARM9 series.

YepCpuMicroarchitectureARM11 

ARM 1136, ARM 1156, ARM 1176, or ARM 11MPCore.

YepCpuMicroarchitectureCortexA5 

ARM Cortex-A5.

YepCpuMicroarchitectureCortexA7 

ARM Cortex-A7.

YepCpuMicroarchitectureCortexA8 

ARM Cortex-A8.

YepCpuMicroarchitectureCortexA9 

ARM Cortex-A9.

YepCpuMicroarchitectureCortexA15 

ARM Cortex-A15.

YepCpuMicroarchitectureScorpion 

Qualcomm Scorpion.

YepCpuMicroarchitectureKrait 

Qualcomm Krait.

YepCpuMicroarchitecturePJ1 

Marvell Sheeva PJ1.

YepCpuMicroarchitecturePJ4 

Marvell Sheeva PJ4.

YepCpuMicroarchitectureSwift 

Apple A6 and A6X processors.

YepCpuMicroarchitectureItanium 

Intel Itanium.

YepCpuMicroarchitectureItanium2 

Intel Itanium 2.

YepCpuMicroarchitectureMIPS24K 

MIPS 24K.

YepCpuMicroarchitectureMIPS34K 

MIPS 34K.

YepCpuMicroarchitectureMIPS74K 

MIPS 74K.

YepCpuMicroarchitectureXBurst 

Ingenic XBurst.

YepCpuMicroarchitectureXBurst2 

Ingenic XBurst 2.

Indicates how to interpret integer value from one of Yeppp! enumerations.

See Also
yepLibrary_GetString
Enumerator:
YepEnumerationStatus 

The enumeration type is YepStatus.

YepEnumerationCpuArchitecture 

The enumeration type is YepCpuArchitecture.

YepEnumerationCpuVendor 

The enumeration type is YepCpuVendor.

YepEnumerationCpuMicroarchitecture 

The enumeration type is YepCpuMicroarchitecture.

YepEnumerationGenericIsaFeature 

The enumeration type is one of the common ISA features constants.

YepEnumerationGenericSimdFeature 

The enumeration type is one of the common SIMD features constants.

YepEnumerationGenericSystemFeature 

The enumeration type is one of the common non-ISA or system features constants.

YepEnumerationX86IsaFeature 

The enumeration type is one of the x86 ISA features constants.

YepEnumerationX86SimdFeature 

The enumeration type is one of the x86 SIMD features constants.

YepEnumerationX86SystemFeature 

The enumeration type is one of the x86 non-ISA or system features constants.

YepEnumerationARMIsaFeature 

The enumeration type is one of the ARM ISA features constants.

YepEnumerationARMSimdFeature 

The enumeration type is one of the ARM SIMD features constants.

YepEnumerationARMSystemFeature 

The enumeration type is one of the ARM non-ISA or system features constants.

YepEnumerationMIPSIsaFeature 

The enumeration type is one of the MIPS ISA features constants.

YepEnumerationMIPSSimdFeature 

The enumeration type is one of the MIPS SIMD features constants.

YepEnumerationMIPSSystemFeature 

The enumeration type is one of the MIPS non-ISA or system features constants.

YepEnumerationPowerPCIsaFeature 

The enumeration type is one of the PowerPC ISA features constants.

YepEnumerationPowerPCSimdFeature 

The enumeration type is one of the PowerPC SIMD features constants.

YepEnumerationPowerPCSystemFeature 

The enumeration type is one of the PowerPC non-ISA or system features constants.

YepEnumerationIA64IsaFeature 

The enumeration type is one of the IA64 ISA features constants.

YepEnumerationIA64SimdFeature 

The enumeration type is one of the IA64 SIMD features constants.

YepEnumerationIA64SystemFeature 

The enumeration type is one of the IA64 non-ISA or system features constants.

YepEnumerationSPARCIsaFeature 

The enumeration type is one of the SPARC ISA features constants.

YepEnumerationSPARCSimdFeature 

The enumeration type is one of the SPARC SIMD features constants.

YepEnumerationSPARCSystemFeature 

The enumeration type is one of the SPARC non-ISA or system features constants.

Examples:
CpuInfo.cpp.

Function Documentation

enum YepStatus yepLibrary_Init ( )

Initialized the Yeppp! library.

Return values
YepStatusOkThe library is successfully initialized.
YepStatusSystemErrorAn uncoverable error inside the OS kernel occurred during library initialization.
See Also
yepLibrary_Release
Examples:
CpuCycles.cpp, CpuInfo.cpp, Entropy.cpp, and SystemTimer.cpp.
enum YepStatus yepLibrary_Release ( )

Deinitialized the Yeppp! library and releases the consumed system resources.

Return values
YepStatusOkThe library is successfully initialized.
YepStatusSystemErrorThe library failed to release some of the resources due to a failed call to the OS kernel.
See Also
yepLibrary_Init
Examples:
CpuCycles.cpp, CpuInfo.cpp, Entropy.cpp, and SystemTimer.cpp.
struct YepLibraryVersion* yepLibrary_GetVersion ( )
read

Returns basic information about the library version.

Returns
A pointer to a structure describing Yeppp! library version.
enum YepStatus yepLibrary_GetString ( const enum YepEnumeration enumerationType,
const Yep32u *  enumerationValue,
void *  buffer,
YepSize *  length 
)

Returns a string representation of an integer value in a enumeration.

Parameters
[in]enumerationTypeIndicates the type of integer value passed to the function in enumerationValue parameter.
[in]enumerationValueThe enumeration value of type specified in enumerationType which must be converted to string.
[out]bufferAn output buffer of size specified by the length parameter. On successfull return the buffer will contain the string representation of enumerationValue. The string representation does not include the terminating zero. If the function fails, the content of the buffer is not changed.
[in,out]lengthOn function call this variable must contain the length (in bytes) of the buffer. On successfull return this variable will contain the length (in bytes) of the string written to the buffer. If the function fails with YepStatusInsufficientBuffer error, on return the length variable will contain the required size of the buffer. In the function fails with any other error, this variable is unchanged.
Return values
YepStatusOkThe string is successfully stored in the buffer.
YepStatusNullPointerOne of the enumerationType, enumerationValue, buffer, or length pointers is null.
YepStatusInvalidArgumentEither enumerationType or enumerationValue contain values unknown to the library.
YepStatusInsufficientBufferThe output buffer is too small for the string. The content of the output buffer is unchanged, and the required size of the buffer is returned in the length variable.
Examples:
CpuInfo.cpp.
enum YepStatus yepLibrary_GetCpuIsaFeatures ( Yep64u *  isaFeatures)

Returns information about the supported ISA extensions (excluding SIMD extensions)

Parameters
[out]isaFeaturesPointer to a 64-bit mask where information about the supported ISA extensions will be stored.
Return values
YepStatusOkThe information successfully stored to the mask pointed by isaFeatures parameter.
YepStatusNullPointerThe isaFeatures pointer is null.
See Also
yepLibrary_GetCpuSimdFeatures, yepLibrary_GetCpuSystemFeatures
Examples:
CpuInfo.cpp.
enum YepStatus yepLibrary_GetCpuSimdFeatures ( Yep64u *  simdFeatures)

Returns information about the supported SIMD extensions.

Parameters
[out]simdFeaturesPointer to a 64-bit mask where information about the supported SIMD extensions will be stored.
Return values
YepStatusOkThe information successfully stored to the mask pointed by simdFeatures parameter.
YepStatusNullPointerThe simdFeatures pointer is null.
See Also
yepLibrary_GetCpuIsaFeatures, yepLibrary_GetCpuSystemFeatures
Examples:
CpuInfo.cpp.
enum YepStatus yepLibrary_GetCpuSystemFeatures ( Yep64u *  systemFeatures)

Returns information about processor features other than ISA extensions, and OS features related to CPU.

Parameters
[out]systemFeaturesPointer to a 64-bit mask where information about extended processor and system features will be stored.
Return values
YepStatusOkThe information successfully stored to the mask pointed by systemFeatures parameter.
YepStatusNullPointerThe systemFeatures pointer is null.
See Also
yepLibrary_GetCpuIsaFeatures, yepLibrary_GetCpuSimdFeatures
Examples:
CpuCycles.cpp, and CpuInfo.cpp.
enum YepStatus yepLibrary_GetCpuVendor ( enum YepCpuVendor vendor)

Returns information about the vendor of the processor.

Parameters
[out]vendorPointer to a variable where information about the processor vendor will be stored.
Return values
YepStatusOkThe information successfully stored to the variable pointed by vendor parameter.
YepStatusNullPointerThe vendor pointer is null.
Examples:
CpuInfo.cpp.
enum YepStatus yepLibrary_GetCpuArchitecture ( enum YepCpuArchitecture architecture)

Returns the type of processor architecture.

Parameters
[out]architecturePointer to a variable where information about the processor architecture will be stored.
Return values
YepStatusOkThe information successfully stored to the variable pointed by architecture parameter.
YepStatusNullPointerThe architecture pointer is null.
Examples:
CpuInfo.cpp.
enum YepStatus yepLibrary_GetCpuMicroarchitecture ( enum YepCpuMicroarchitecture microarchitecture)

Returns the type of processor microarchitecture used.

Parameters
[out]microarchitecturePointer to a variable where information about the processor microarchitecture will be stored.
Return values
YepStatusOkThe information successfully stored to the variable pointed by microarchitecture parameter.
YepStatusNullPointerThe microarchitecture pointer is null.
Examples:
CpuInfo.cpp.
enum YepStatus yepLibrary_GetCpuCyclesAcquire ( Yep64u *  state)

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

In the current implementation this function uses:

  • RDTSC or RDTSCP instructions on x86 and x86-64.
  • ITC register on IA64.
  • Linux perf events subsystem on ARM and MIPS.
    Warning
    The state is not guaranteed to be the current processor cycle counter value, and should not be used as such.
    This function may allocate system resources. To avoid resource leak, always match a successfull call to yepLibrary_GetCpuCyclesAcquire with a call to yepLibrary_GetCpuCyclesRelease.
    Parameters
    [out]statePointer to a variable where the state of the cycle counter will be stored. If the function fails, the value of the state variable is not changed.
    Return values
    YepStatusOkThe cycle counter successfully initialized and its state is stored to the variable pointed by state parameter.
    YepStatusNullPointerThe state pointer is null.
    YepStatusUnsupportedHardwareThe processor does not have cycle counter.
    YepStatusUnsupportedSoftwareThe operating system does not provide access to the CPU cycle counter.
    YepStatusSystemErrorAn attempt to initialize cycle counter failed inside the OS kernel.
    See Also
    yepLibrary_GetCpuCyclesRelease
Examples:
CpuCycles.cpp.
enum YepStatus yepLibrary_GetCpuCyclesRelease ( Yep64u *  state,
Yep64u *  cycles 
)

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

Parameters
[in,out]statePointer to a variable with the state of the cycle counter saved by yepLibrary_GetCpuCyclesAcquire. The cycle counter should be released only once, and the function zeroes out the state variable.
[out]cyclesPointer to a variable where the number of cycles elapsed will be stored. The pointer can be the same as state pointer.
Return values
YepStatusOkThe number of cycles elapsed is saved to the variable pointed by state parameter, and the system resources are successfully released.
YepStatusNullPointerEither the state pointer or the cycles pointer is null.
YepStatusInvalidStateThe state variable does not specify a valid state of the cycle counter. This can happen if the state variable was not initialized, or it was released previously.
YepStatusUnsupportedHardwareThe processor does not have cycle counter.
YepStatusUnsupportedSoftwareThe operating system does not provide access to the CPU cycle counter.
YepStatusSystemErrorAn attempt to read the cycle counter or release the OS resources failed inside the OS kernel.
See Also
yepLibrary_GetCpuCyclesAcquire
Examples:
CpuCycles.cpp.
enum YepStatus yepLibrary_GetTimerTicks ( Yep64u *  ticks)

Returns the number of ticks of the high-resolution system timer.

Parameters
[out]ticksPointer to a variable where the number of timer ticks will be stored. If the function fails, the value of the variable at this address is not changed.
Return values
YepStatusOkThe number of timer ticks is successfully stored to the variable pointed by ticks parameter.
YepStatusNullPointerThe ticks pointer is null.
YepStatusSystemErrorAn attempt to read the high-resolution timer failed inside the OS kernel.
Examples:
Entropy.cpp, and SystemTimer.cpp.
enum YepStatus yepLibrary_GetTimerFrequency ( Yep64u *  frequency)

Returns the number of ticks of the system timer per second.

Parameters
[out]frequencyPointer to a variable where the number of timer ticks per second will be stored.
Return values
YepStatusOkThe number of timer ticks is successfully stored to the variable pointed by frequency parameter.
YepStatusNullPointerThe frequency pointer is null.
YepStatusSystemErrorAn attempt to quenry the high-resolution timer parameters failed inside the OS kernel.
Examples:
Entropy.cpp, and SystemTimer.cpp.
enum YepStatus yepLibrary_GetTimerAccuracy ( Yep64u *  accuracy)

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

Parameters
[out]accuracyPointer to a variable where the timer accuracy will be stored.
Return values
YepStatusOkThe accuracy of the timer is successfully stored to the variable pointed by accuracy parameter.
YepStatusNullPointerThe accuracy pointer is null.
YepStatusSystemErrorAn attempt to measure the accuracy of high-resolution timer failed inside the OS kernel.