# Documentation Mapping DIS Stressmark Parameters to WSS This details exactly how the input parameters of each Stressmark translate to their dynamic allocations size. With some algebra, we then convert those equations such that we can determine the needed parameters for a specific desired dynamic allocation size. The equations teased out here are implemented in `gen_input.py`. ## Field 1 allocation in main() f = 1st input param sizeof(unsigned char) * f ## Matrix 6 allocations in main(), 7 allocations in biConjugateGradient() *Allocations in main()* dim = 2nd input param numberNonzero = 3nd input param sizeof(double) * (dim^2+3dim+numberNonzero) + sizeof(int) * (2dim+1+numberNonzero) *Allocations in biConjugateGradient()* sizeof(double) * 7dim *Vectors* sizeof(double) * 8dim *Matrix* sizeof(double) * dim * dim *Helpers* sizeof(int) * dim+1 sizeof(int) + (nnZR + dim) sizeof(double) + (nnZR + dim) ## Neighborhood 1 allocation in createImage, 2 allocations in neighborhoodCalculation *Allocations in createImage()* dimension = 3rd input param sizeof(short int) * dimension^2 *Allocations in neighborhoodCalculation()* bitDepth = 2nd param sizeof(int) * (2^(bitDepth + 1) - 1) ## Pointer n = 5th input param f = 1st input param sizeof(unsigned int) * 4n + sizeof(int) * f ## Transitive n = 1st input param sizeof(unsigned int) * 2n^2 ## Update f = 1st input param sizeof(int) * f ## Testplan *Problem!* Larger WSS = more computations Use testcase #1 for non-specified parameters Below math computed for x86_64 - Test WSS at powers of 2: 16 KiB, 32, 64, 128, 256, 512, 1MiB, 2, 4, 8, 16, 32 - For each WSS, measure cache allocation of 0, 1, 2, 4, 8, 16 ### Field Just vary first param f = WSS ### Matrix 0.3 - 16% number nonzero - Fixed at 8% Just vary dim (matrix size) sizeof(double) * (dim^2+10dim+numberNonzero) + sizeof(int) * (2dim+1+numberNonzero) = WSS ### Neighborhood 8 or 15 bit depth - Fix at 12? Just vary dim (image size) ### Pointer 10 for n Just vary f ### Transitive Just vary n ### Update Just vary f