package processor

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Expresses a logical CPU/thread.

type kind =
  1. | P_core
    (*

    Performance cpu, faster, power hungry one

    *)
  2. | E_core
    (*

    Energy efficient, slower, global warming aware one

    *)

The kind of a Cpu.t

type t = {
  1. id : int;
    (*

    A monotonically increasing id

    *)
  2. kind : kind;
    (*

    Performance or Energy Efficient

    *)
  3. smt : int;
    (*

    The smt/thread id

    *)
  4. core : int;
    (*

    The core id, a core can have multiple smt/threads

    *)
  5. socket : int;
    (*

    The socked id, a socket can have multiple cores

    *)
}

A logical CPU

val id : t -> int

id t is t.id

val from_smt : int -> t list -> t list

from_smt smt cpulist are all Cpu.t of cpulist of smt smt

val from_core : int -> t list -> t list

from_core core cpulist are all Cpu.t of cpulist of core core

val from_socket : int -> t list -> t list

from_socket cpulist are all Cpu.t of cpulist of socket socket

val dump : t -> unit

dump cpu Outputs the contents of Cpu.t to stdout

val make : kind:kind -> id:int -> smt:int -> core:int -> socket:int -> t

make kind id smt core socket is a constructor for Cpu.t

OCaml

Innovation. Community. Security.