vpGetTimer(3)
π vpGetTimer(3) β Library Functions Manual π
okay bestie, gather round, because today we're talking about the interval timer facility in VolPack, and honestly? it's giving stopwatch energy. β±οΈβ¨
π NAME π
vpGetTimer, vpClearTimer β interval timer facility
πΈ SYNOPSIS πΈ
#include <volpack.h>
vpResult
vpGetTimer(vpc, option, iptr)
vpContext *vpc;
int option;
int *iptr;;
vpResult
vpClearTimer(vpc, option)
vpContext *vpc;
int option;
(yes the double semicolon is real, it's canon, we do not touch it π )
π¦ ARGUMENTS π¦
vpcβ the VolPack context, straight fromvpCreateContext. your main character, your whole vibe.optionβ a constant that says which timer we're talking about. pick your fighter.iptrβ the spot where the timer value gets stored. like, the lil jar we pour the number into. π«
β¨ DESCRIPTION β¨
So these two functions are the performance measuring girlies of the VolPack library. they're how you find out how long stuff actually takes. but β and this is the important part β the library has to be compiled with a special flag first, otherwise this whole thing is not happening:
-DHAVE_LORES_TIMERβ for machines that support thegettimeofdayC library call-DHAVE_HIRES_TIMERβ for SGI machines that support high-resolution memory-mapped I/O timers; and on a Challenge or ONYX, you also have to specify-DHAVE_64BIT_TIMER
If one of those flags is given at compile time, then VolPack keeps a table recording the accumulated time spent in various operations. iconic. π
β οΈ but listen β some of the operations can only be timed with a high-resolution timer. if you compiled with a low-resolution timer, those time values will not be recorded and will just appear as zero. not a bug, just the rules. π
vpGetTimer retrieves the accumulated time for one particular operation. the option argument says which one:
VPTIMER_SHADEβ times the routine that computes the contents of the shading lookup table.VPTIMER_RENDERβ times the routine that renders a volume. this one is the big mama: it includesVPTIMER_CLSFY_OCTREE,VPTIMER_COMPOSITE,VPTIMER_DEPTHCUE, andVPTIMER_WARP.VPTIMER_COMPOSITEβ times the routine that computes the intermediate image from the volume. includesVPTIMER_CLEAR,VPTIMER_TRAVERSE_OCTREE,VPTIMER_ERT,VPTIMER_TRAVERSE_RUNS, andVPTIMER_PROCESS_VOXELS.VPTIMER_DEPTHCUEβ times the routine that performs the depth cueing fixup on the intermediate image.VPTIMER_WARPβ times the routine that warps the intermediate image into the final image.VPTIMER_TRAVERSE_RUNSβ times the portion of the compositing routine devoted to traversing the volume data structures.VPTIMER_PROCESS_VOXELSβ times the portion of the compositing routine devoted to compositing voxels into the intermediate image.VPTIMER_ERTβ times the early-ray termination checks during compositing.VPTIMER_CLSFY_OCTREEβ times the octree classification stage.VPTIMER_TRAVERSE_OCTREEβ times the portion of the compositing routine devoted to traversing the octree.VPTIMER_CLEARβ times the routine that clears the intermediate image at the beginning of compositing.
and then β the moment you've been waiting for β the routine stores the accumulated time since the last call to vpClearTimer (or since the beginning of the program, if you never called it) into the location specified by iptr. π the units are microseconds. tiny units, big feelings.
vpClearTimer just sets the specified timer value back to zero. reset era. π§Όβ¨
π ERRORS π
the normal return value is VP_OK. the following error return value is possible:
VPERROR_BAD_OPTIONβ theoptionargument is invalid. you gave it a fake timer, bestie, and it noticed. π
π₯ SEE ALSO π₯
VolPack(3), vpCreateContext(3)
that's the whole page, no notes, you're gonna time everything and it's gonna slay. this was vpGetTimer(3) from VolPack, and that's the vibe check passed with flying colors πβ¨π¦π β catch you in the next manpage, mwah. π
π¦ where this page comes from
- debian bookworm: libvolpack1-dev 1.0b3-9 Β· BSD-3-Clause
- debian trixie: libvolpack1-dev 1.0b3-10 Β· BSD-3-Clause
- ubuntu jammy: libvolpack1-dev 1.0b3-9 Β· BSD-3-Clause
- ubuntu noble: libvolpack1-dev 1.0b3-9.1 Β· BSD-3-Clause
- ubuntu questing: libvolpack1-dev 1.0b3-11
- ubuntu resolute: libvolpack1-dev 1.0b3-11build1 Β· BSD-3-Clause
- ubuntu stonking: libvolpack1-dev 1.0b3-11build1 Β· BSD-3-Clause
- Copyright (c) 1994 The Board of Trustees of The Leland Stanford
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms