|
NAME
PAPI_overflow - set up an event set to begin registering overflows
_papi_overflow_handler - user defined function to process overflow events
CONTENTS
Synopsis
Description
Arguments
Return Values
Errors
Examples
Bugs
See Also
SYNOPSIS
C Interface
#include <papi.h>
int PAPI_overflow
(int EventSet, int EventCode, int threshold, int flags, PAPI_overflow_handler_t handler);
(*PAPI_overflow_handler_t) _papi_overflow_handler
(int EventSet, void * address, long_long overflow_vector, void * context);
Fortran Interface
Not implemented
DESCRIPTION
PAPI_overflow() marks a specific
EventCode in an
EventSet to generate an overflow signal after every
threshold events are counted. More than one event in an event set can be used to trigger
overflows. In such cases, the user must call this function once
for each overflowing event. To turn off overflow on a specified event,
call this function with a
threshold value of 0.
Overflows can be implemented in either software or hardware, but the
scope is the entire event set. PAPI defaults to hardware overflow if it is available.
In the case of software overflow, a periodic timer
interrupt causes PAPI to compare the event counts against the
threshold values and call the overflow handler if one or more events have exceeded their
threshold. In the case of hardware overflow, the counters are typically set to the negative of the
threshold value and count up to 0. This zero-crossing triggers a hardware interrupt
that calls the overflow handler. Because of this counter interrupt, the counter values
for overflowing counters may be very small or even negative numbers, and cannot be relied upon
as accurate. In such cases the overflow handler can approximate the counts by supplying the
threshold value whenever an overflow occurs.
_papi_overflow_handler() is a placeholder for a user-defined function to process overflow events.
A pointer to this function is passed to the
PAPI_overflow routine, where it is invoked whenever a software or hardware overflow occurs.
This handler receives the
EventSet of the overflowing event, the Program Counter
address when the interrupt occured, an
overflow_vector that can be processed to determined which event(s) caused the overflow,
and a pointer to the machine
context, which can be used in a platform-specific manor
to extract register information about what was happening when the overflow occured.
ARGUMENTS
EventSet -- an integer handle to a PAPI event set as created by
PAPI_create_eventset (3)
EventCode -- the preset or native event code to be set for overflow detection.
This event must have already been added to the
EvenSet.
threshold -- the overflow threshold value for this
EventCode.
flags -- bit map that controls the overflow mode of operation. Set to PAPI_OVERFLOW_FORCE_SW
to force software overflowing, even if hardware overflow support is available.
If hardware overflow support is available on a given system,
it will be the default mode of operation. There are situations where it
is advantageous to use software overflow instead. Although software overflow
is inherently less accurate, with more latency and processing overhead, it does
allow for overflowing on derived events, and for the accurate recording of
overflowing event counts. These two features are typically not available with
hardware overflow. Only one type of overflow is allowed
per event set, so setting one event to hardware overflow and another to
forced software overflow will result in an error being returned.
handler -- pointer to the user supplied handler function to call upon overflow
address -- the Program Counter address at the time of the overflow
overflow_vector -- a long_long word containing flag bits to indicate which hardware counter(s) caused the overflow
*context -- pointer to a machine specific structure that defines the register context at the time of overflow.
This parameter is often unused and can be ignored in the user function.
RETURN VALUES
On success,
PAPI_overflow returns
PAPI_OK. On error, a non-zero error code is returned.
_papi_overflow_handler is a void function and returns nothing.
ERRORS
|
PAPI_EINVAL | | |
One or more of the arguments is invalid.
Specifically, a bad threshold value.
|
|
PAPI_ENOMEM | | |
Insufficient memory to complete the operation.
|
|
PAPI_ENOEVST | | |
The EventSet specified does not exist.
|
|
PAPI_EISRUN | | |
The EventSet is currently counting events.
|
|
PAPI_ECNFLCT | | |
The underlying counter hardware cannot count this event and other events
in the EventSet simultaneously. Or you are trying to overflow both by
hardware and by forced software at the same time.
|
|
PAPI_ENOEVNT | | |
The PAPI preset is not available on the underlying hardware.
|
|
EXAMPLES
Define a simple overflow handler:
void handler(int EventSet, void *address, long_long overflow_vector, void *context)
{
fprintf(stderr,"Overflow at %p! bit=0x%llx \n",
address,overflow_vector);
}
Call PAPI_overflow for an event set containing the PAPI_TOT_INS event,
setting the threshold to 100000. Use the handler defined above.
retval = PAPI_overflow(EventSet, PAPI_TOT_INS, 100000, 0, handler);
BUGS
This function has no known bugs.
SEE ALSO
PAPI_get_overflow_event_index (3)
| PAPI Programmers Reference | PAPI_overflow (3) | September, 2004 |
|
|


#include <Race.h>
◆ Calculate_cars_loop_position()
| void Race::Calculate_cars_loop_position |
( |
| ) |
|
|
static |
Calculate the position of all the cars in the race
◆ Car_progress()
| char * Race::Car_progress |
( |
float |
elapsed_time, |
|
|
float |
Total_time |
|
) |
| |
|
staticprivate |
Our anim is a progress bar that has 10 progress point
when a car has done 1/10 of the lap it add an "#"
exemple : [##_______] when the car has done more than 2/10 of the lap ( "_" are space )
◆ Display_learderboard()
| void Race::Display_learderboard |
( |
| ) |
|
|
static |
Display a ranking of all the cars in the race
◆ Display_Times()
| void Race::Display_Times |
( |
| ) |
|
|
staticprivate |
Display the time of the player's cars and their position in the race
◆ Lap_anim()
Display an animation of the progress of the player's cars in the lap
◆ Loop_time()
| float Race::Loop_time |
( |
float |
Circuit_length, |
|
|
float |
Car_speed, |
|
|
float |
penality |
|
) |
| |
|
staticprivate |
calculates the time it took a car to complete the lap.
loop time equal travel time + time penality
◆ random_collid()
| void Race::random_collid |
( |
| ) |
|
|
staticprivate |
Generate random collision between cars
1 in 50 chance that there will be a collision this lap
If the impact is too violent, colliding vehicles may crash.
Can have multiple collision
◆ start_race()
| void Race::start_race |
( |
| ) |
|
|
static |
The documentation for this class was generated from the following files:


[#include "/admin/common/commons.html"] [#include "/tenant/common/site.html"] [@baseHead /]
[#include "/admin/common/nav.html"]
首页
重置
确定
[#include "/admin/common/footer.html"] [#include "/admin/common/aside.html"]
[@baseScript /]


cumulative change impact impacts ocean human stressors CHI global marine (Fig. ecosystems stressor {border-style increasing pace px;} #ffffff;} climate data ecosystem values high coastal increases intensity increase S). activities low management Halpern Supplementary countries declines information px; regions {font-family Marine areas calculated decreasing font-size impacts. resolution significant significantly used vulnerability years (Table CHI, Nature Ocean, Science commercial conservation current double; drivers ecosystems, included indicate known linear new pressures raster results sea spatial Conservation Given Pacific SST Sea annual area border-color border-width demersal distribution fast fastest include increased individual land-based magnitude model multiple pollution, solid; support thresholds understanding uses using {font-style {font-weight (). (e.g., ./science. Atlantic Black Commons Creative Ecological Figure However, Information. Micheli Ocean S), Table [], acidification assess average bars bold bycatch, cell changes condition coral courier; describing did different em; estimated exist experienced fishing focus future globally highest impact, impacts, including likely local nearly need oceans overall parts pelagic pollution protected pt;} quantile rasters regression shipping stressors, time trends year years. zero


Font Awesome Icons
Mutography
About
Contact
Login
This is a title
This is a short description
This is a title
This is a short description
This is a title
This is a short description
This is a title
This is a short description
This is a title
This is a short description
This is a title
This is a short description
This is a title
This is a short description
This is a title
This is a short description
This is a title
This is a short description
This is a title
This is a short description
This is a title
This is a short description
This is a title
This is a short description
This is a title
This is a short description
This is a title
This is a short description
This is a title
This is a short description
This is a title
This is a short description
This is a title
This is a short description
This is a title
This is a short description
This is a title
This is a short description
This is a title
This is a short description
This is a title
This is a short description
This is a title
This is a short description
This is a title
This is a short description
This is a title
This is a short description
This is a title
This is a short description
This is a title
This is a short description
This is a title
This is a short description
March 4,2018
Click for full screen image
Canon EF 75-300mm f/4-5.6 III Lens
March 4,2018
Click for full screen image
Canon EF 75-300mm f/4-5.6 III Lens
March 4,2018
Click for full screen image
Canon EF 75-300mm f/4-5.6 III Lens
March 4,2018
Click for full screen image
Canon EF 75-300mm f/4-5.6 III Lens
March 4,2018
Click for full screen image
Canon EF 75-300mm f/4-5.6 III Lens
March 4,2018
Click for full screen image
Canon EF 75-300mm f/4-5.6 III Lens
Previous Page


Rylo Rodriguez Arrested in Florida for Alleged Firearm & Drug Possession
by VladTVAccording to reports, Alabama rapper Rylo Rodriguez was arrested in Florida last night for an alleged drug and firearm possession.
News of this comes after the rapper was involved in an incident where he appeared to be yanked off stage as someone attempted an alleged chain snatching that was unsuccessful. Stay tuned for more details in this situation.


Main directive for registering table sections. Can optionally have
macTableSectionModels, macTableSectionController, or macTableSectionBlankRow.
macTable
Inserts a blank row with keys matching those of the tables columns.
macTable, macTableSection
Watches a models expression and loads them into the section
macTable, macTableSection
Watches a controller expression and loads the controller into the section
macTable, macTableSection


R/SHAP_funcs.R
shap.plot.dependence.Rd
This function by default makes a simple dependence plot with feature values
on the x-axis and SHAP values on the y-axis, optional to color by another
feature. It is optional to use a different variable for SHAP values on the
y-axis, and color the points by the feature value of a designated variable.
Not colored if color_feature
is not supplied. If data_int
(the
SHAP interaction values dataset) is supplied, it will plot the interaction
effect between y
and x
on the y-axis. Dependence plot is easy
to make if you have the SHAP values dataset from predict.xgb.Booster
or predict.lgb.Booster
.
It is not necessary to start with the long format data, but since that is
used for the summary plot, we just continue to use it here.
shap.plot.dependence( data_long, x, y = NULL, color_feature = NULL, data_int = NULL, dilute = FALSE, smooth = TRUE, size0 = NULL, add_hist = FALSE, add_stat_cor = FALSE, alpha = NULL, jitter_height = 0, jitter_width = 0, ... )
| data_long | the long format SHAP values from |
|---|---|
| x | which feature to show on x-axis, it will plot the feature value |
| y | which shap values to show on y-axis, it will plot the SHAP value of that feature. y is default to x, if y is not provided, just plot the SHAP values of x on the y-axis |
| color_feature | which feature value to use for coloring, color by the feature value. If "auto", will select the feature "c" minimizing the variance of the shap value given x and c, which can be viewed as a heuristic for the strongest interaction. |
| data_int | the 3-dimention SHAP interaction values array. if |
| dilute | a number or logical, dafault to TRUE, will plot
|
| smooth | optional to add a loess smooth line, default to TRUE. |
| size0 | point size, default to 1 if nobs<1000, 0.4 if nobs>1000 |
| add_hist | whether to add histogram using |
| add_stat_cor | add correlation and p-value from |
| alpha | point transparancy, default to 1 if nobs<1000 else 0.6 |
| jitter_height | amount of vertical jitter (see hight in |
| jitter_width | amount of horizontal jitter (see width in |
| ... | additional parameters passed to |
be default a ggplot2
object, based on which you could add more geom
layers.
# **SHAP dependence plot** # 1. simple dependence plot with SHAP values of x on the y axis shap.plot.dependence(data_long = shap_long_iris, x="Petal.Length", add_hist = TRUE, add_stat_cor = TRUE)#>#># 2. can choose a different SHAP values on the y axis shap.plot.dependence(data_long = shap_long_iris, x="Petal.Length", y = "Petal.Width")#># 3. color by another feature's feature values shap.plot.dependence(data_long = shap_long_iris, x="Petal.Length", color_feature = "Petal.Width")#># 4. choose 3 different variables for x, y, and color shap.plot.dependence(data_long = shap_long_iris, x="Petal.Length", y = "Petal.Width", color_feature = "Petal.Width")#># Optional to add hist or remove smooth line, optional to plot fewer data (make plot quicker) shap.plot.dependence(data_long = shap_long_iris, x="Petal.Length", y = "Petal.Width", color_feature = "Petal.Width", add_hist = TRUE, smooth = FALSE, dilute = 3)# to make a list of plot plot_list <- lapply(names(iris)[2:3], shap.plot.dependence, data_long = shap_long_iris) # **SHAP interaction effect plot ** # To get the interaction SHAP dataset for plotting, need to get `shap_int` first: mod1 = xgboost::xgboost( data = as.matrix(iris[,-5]), label = iris$Species, gamma = 0, eta = 1, lambda = 0,nrounds = 1, verbose = FALSE) # Use either: data_int <- shap.prep.interaction(xgb_mod = mod1, X_train = as.matrix(iris[,-5])) # or: shap_int <- predict(mod1, as.matrix(iris[,-5]), predinteraction = TRUE) # if data_int is supplied, y axis will plot the interaction values of y (vs. x) shap.plot.dependence(data_long = shap_long_iris, data_int = shap_int_iris, x="Petal.Length", y = "Petal.Width", color_feature = "Petal.Width")#>