diff
stringlengths
41
2.03M
msg
stringlengths
1
1.5k
repo
stringlengths
5
40
sha
stringlengths
40
40
time
stringlengths
20
20
mmm a / dbms / include / DB / Core / Block . h <nl> ppp b / dbms / include / DB / Core / Block . h <nl> class Block <nl> IndexByPosition_t index_by_position ; <nl> IndexByName_t index_by_name ; <nl> <nl> - void rebuildIndexByPosition ( ) ; <nl> - <nl> public : <nl> Block ( ) { } <nl> <nl> mmm a / dbms / src / Core / Block . cpp <nl> ppp b / dbms / src / Core / Block . cpp <nl> void Block : : addDefaults ( NamesAndTypesListPtr required_columns ) <nl> Block & Block : : operator = ( const Block & other ) <nl> { <nl> data = other . data ; <nl> - rebuildIndexByPosition ( ) ; <nl> - index_by_name . clear ( ) ; <nl> - <nl> - for ( IndexByName_t : : const_iterator it = other . index_by_name . begin ( ) ; it ! = other . index_by_name . end ( ) ; + + it ) <nl> - { <nl> - Container_t : : iterator value = data . begin ( ) ; <nl> - std : : advance ( value , std : : distance ( const_cast < Block & > ( other ) . data . begin ( ) , it - > second ) ) ; <nl> - index_by_name [ it - > first ] = value ; <nl> - } <nl> - <nl> - return * this ; <nl> - } <nl> - <nl> <nl> - void Block : : rebuildIndexByPosition ( ) <nl> - { <nl> index_by_position . resize ( data . size ( ) ) ; <nl> + index_by_name . clear ( ) ; <nl> + <nl> size_t pos = 0 ; <nl> for ( Container_t : : iterator it = data . begin ( ) ; it ! = data . end ( ) ; + + it , + + pos ) <nl> + { <nl> index_by_position [ pos ] = it ; <nl> - } <nl> + index_by_name [ it - > name ] = it ; <nl> + } <nl> <nl> + return * this ; <nl> + } <nl> <nl> void Block : : insert ( size_t position , const ColumnWithNameAndType & elem ) <nl> { <nl>
dbms : improved performance on short queries [ # METR - 11571 ] .
ClickHouse/ClickHouse
d42048652213fcc425347762054dc2d457f03ab5
2014-06-20T19:56:45Z
mmm a / apps / annotation / opencv_annotation . cpp <nl> ppp b / apps / annotation / opencv_annotation . cpp <nl> <nl> <nl> / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * <nl> USAGE : <nl> - . / opencv_annotation - images < folder location > - annotations < ouput file > <nl> + . / opencv_annotation - images < folder location > - annotations < output file > <nl> <nl> Created by : Puttemans Steven - February 2015 <nl> Adapted by : Puttemans Steven - April 2016 - Vectorize the process to enable better processing <nl> mmm a / apps / interactive - calibration / parametersController . cpp <nl> ppp b / apps / interactive - calibration / parametersController . cpp <nl> bool calib : : parametersController : : loadFromParser ( cv : : CommandLineParser & parser ) <nl> <nl> if ( ! checkAssertion ( mCapParams . squareSize > 0 , " Distance between corners or circles must be positive " ) ) <nl> return false ; <nl> - if ( ! checkAssertion ( mCapParams . templDst > 0 , " Distance betwen parts of dual template must be positive " ) ) <nl> + if ( ! checkAssertion ( mCapParams . templDst > 0 , " Distance between parts of dual template must be positive " ) ) <nl> return false ; <nl> <nl> if ( parser . has ( " v " ) ) { <nl> mmm a / apps / traincascade / HOGfeatures . cpp <nl> ppp b / apps / traincascade / HOGfeatures . cpp <nl> void CvHOGEvaluator : : Feature : : write ( FileStorage & fs ) const <nl> / / } <nl> <nl> / / cell [ 0 ] and featComponent idx writing . By cell [ 0 ] it ' s possible to recover all block <nl> - / / All block is nessesary for block normalization <nl> + / / All block is necessary for block normalization <nl> void CvHOGEvaluator : : Feature : : write ( FileStorage & fs , int featComponentIdx ) const <nl> { <nl> fs < < CC_RECT < < " [ : " < < rect [ 0 ] . x < < rect [ 0 ] . y < < <nl> mmm a / apps / traincascade / old_ml . hpp <nl> ppp b / apps / traincascade / old_ml . hpp <nl> <nl> # include < iostream > <nl> <nl> / / Apple defines a check ( ) macro somewhere in the debug headers <nl> - / / that interferes with a method definiton in this header <nl> + / / that interferes with a method definition in this header <nl> # undef check <nl> <nl> / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * \ <nl> struct CvGBTreesParams : public CvDTreeParams <nl> / / weak - array [ 0 . . ( class_count - 1 ) ] of CvSeq <nl> / / for storing tree ensembles <nl> / / orig_response - original responses of the training set samples <nl> - / / sum_response - predicitons of the current model on the training dataset . <nl> + / / sum_response - predictions of the current model on the training dataset . <nl> / / this matrix is updated on every iteration . <nl> - / / sum_response_tmp - predicitons of the model on the training set on the next <nl> + / / sum_response_tmp - predictions of the model on the training set on the next <nl> / / step . On every iteration values of sum_responses_tmp are <nl> / / computed via sum_responses values . When the current <nl> / / step is complete sum_response values become equal to <nl> struct CvGBTreesParams : public CvDTreeParams <nl> / / matrix has the same size as train_data . 1 - missing <nl> / / value , 0 - not a missing value . <nl> / / class_labels - output class labels map . <nl> - / / rng - random number generator . Used for spliting the <nl> + / / rng - random number generator . Used for splitting the <nl> / / training set . <nl> / / class_count - count of output classes . <nl> / / class_count = = 1 in the case of regression , <nl> class CvGBTrees : public CvStatModel <nl> / / type - defines which error is to compute : train ( CV_TRAIN_ERROR ) or <nl> / / test ( CV_TEST_ERROR ) . <nl> / / OUTPUT <nl> - / / resp - vector of predicitons <nl> + / / resp - vector of predictions <nl> / / RESULT <nl> / / Error value . <nl> * / <nl> mmm a / apps / traincascade / old_ml_precomp . hpp <nl> ppp b / apps / traincascade / old_ml_precomp . hpp <nl> CvMat * icvGenerateRandomClusterCenters ( int seed , <nl> / * Fills the < labels > using < probs > by choosing the maximal probability . Outliers are <nl> fixed by < oulier_tresh > and have cluster label ( - 1 ) . Function also controls that there <nl> weren ' t " empty " clusters by filling empty clusters with the maximal probability vector . <nl> - If probs_sums ! = NULL , filles it with the sums of probabilities for each sample ( it is <nl> + If probs_sums ! = NULL , fills it with the sums of probabilities for each sample ( it is <nl> useful for normalizing probabilities ' matrice of FCM ) * / <nl> void icvFindClusterLabels ( const CvMat * probs , float outlier_thresh , float r , <nl> const CvMat * labels ) ; <nl> mmm a / doc / js_tutorials / js_assets / js_fourier_transform_dft . html <nl> ppp b / doc / js_tutorials / js_assets / js_fourier_transform_dft . html <nl> < h2 > Image DFT Example < / h2 > <nl> planes . push_back ( plane1 ) ; <nl> cv . merge ( planes , complexI ) ; <nl> <nl> - / / in - place dft transfrom <nl> + / / in - place dft transform <nl> cv . dft ( complexI , complexI ) ; <nl> <nl> / / compute log ( 1 + sqrt ( Re ( DFT ( img ) ) * * 2 + Im ( DFT ( img ) ) * * 2 ) ) <nl> mmm a / doc / js_tutorials / js_gui / js_video_display / js_video_display . markdown <nl> ppp b / doc / js_tutorials / js_gui / js_video_display / js_video_display . markdown <nl> navigator . mediaDevices . getUserMedia ( { video : true , audio : false } ) <nl> video . play ( ) ; <nl> } ) <nl> . catch ( function ( err ) { <nl> - console . log ( " An error occured ! " + err ) ; <nl> + console . log ( " An error occurred ! " + err ) ; <nl> } ) ; <nl> @ endcode <nl> <nl> mmm a / doc / js_tutorials / js_imgproc / js_pyramids / js_pyramids . markdown <nl> ppp b / doc / js_tutorials / js_imgproc / js_pyramids / js_pyramids . markdown <nl> Goal <nl> Theory <nl> mmmmmm <nl> <nl> - Normally , we used to work with an image of constant size . But in some occassions , we need to work <nl> - with images of different resolution of the same image . For example , while searching for something in <nl> - an image , like face , we are not sure at what size the object will be present in the image . In that <nl> - case , we will need to create a set of images with different resolution and search for object in all <nl> - the images . These set of images with different resolution are called Image Pyramids ( because when <nl> - they are kept in a stack with biggest image at bottom and smallest image at top look like a <nl> - pyramid ) . <nl> + Normally , we used to work with an image of constant size . But on some occasions , we need to work <nl> + with ( the same ) images in different resolution . For example , while searching for something in <nl> + an image , like face , we are not sure at what size the object will be present in said image . In that <nl> + case , we will need to create a set of the same image with different resolutions and search for object <nl> + in all of them . These set of images with different resolutions are called * * Image Pyramids * * ( because <nl> + when they are kept in a stack with the highest resolution image at the bottom and the lowest resolution <nl> + image at top , it looks like a pyramid ) . <nl> <nl> - There are two kinds of Image Pyramids . 1 ) Gaussian Pyramid and 2 ) Laplacian Pyramids <nl> + There are two kinds of Image Pyramids . 1 ) * * Gaussian Pyramid * * and 2 ) * * Laplacian Pyramids * * <nl> <nl> Higher level ( Low resolution ) in a Gaussian Pyramid is formed by removing consecutive rows and <nl> columns in Lower level ( higher resolution ) image . Then each pixel in higher level is formed by the <nl> mmm a / doc / js_tutorials / js_imgproc / js_thresholding / js_thresholding . markdown <nl> ppp b / doc / js_tutorials / js_imgproc / js_thresholding / js_thresholding . markdown <nl> results for images with varying illumination . <nl> <nl> We use the function : * * cv . adaptiveThreshold ( src , dst , maxValue , adaptiveMethod , thresholdType , blockSize , C ) * * <nl> @ param src source 8 - bit single - channel image . <nl> - @ param dst dstination image of the same size and the same type as src . <nl> + @ param dst destination image of the same size and the same type as src . <nl> @ param maxValue non - zero value assigned to the pixels for which the condition is satisfied <nl> @ param adaptiveMethod adaptive thresholding algorithm to use . <nl> @ param thresholdType thresholding type that must be either cv . THRESH_BINARY or cv . THRESH_BINARY_INV . <nl> mmm a / doc / js_tutorials / js_video / js_bg_subtraction / js_bg_subtraction . markdown <nl> ppp b / doc / js_tutorials / js_video / js_bg_subtraction / js_bg_subtraction . markdown <nl> BackgroundSubtractorMOG2 <nl> mmmmmmmmmmmmmmmmmmmmmmmm <nl> <nl> It is a Gaussian Mixture - based Background / Foreground Segmentation Algorithm . It is based on two <nl> - papers by Z . Zivkovic , " Improved adaptive Gausian mixture model for background subtraction " in 2004 <nl> + papers by Z . Zivkovic , " Improved adaptive Gaussian mixture model for background subtraction " in 2004 <nl> and " Efficient Adaptive Density Estimation per Image Pixel for the Task of Background Subtraction " <nl> in 2006 . One important feature of this algorithm is that it selects the appropriate number of <nl> gaussian distribution for each pixel . It provides better adaptibility to varying scenes due illumination <nl> mmm a / doc / pattern_tools / svgfig . py <nl> ppp b / doc / pattern_tools / svgfig . py <nl> class Poly : <nl> piecewise - linear segments joining the ( x , y ) points <nl> " bezier " / " B " d = [ ( x , y , c1x , c1y , c2x , c2y ) , . . . ] <nl> Bezier curve with two control points ( control points <nl> - preceed ( x , y ) , as in SVG paths ) . If ( c1x , c1y ) and <nl> + precede ( x , y ) , as in SVG paths ) . If ( c1x , c1y ) and <nl> ( c2x , c2y ) both equal ( x , y ) , you get a linear <nl> interpolation ( " lines " ) <nl> " velocity " / " V " d = [ ( x , y , vx , vy ) , . . . ] <nl> mmm a / doc / py_tutorials / py_core / py_optimization / py_optimization . markdown <nl> ppp b / doc / py_tutorials / py_core / py_optimization / py_optimization . markdown <nl> Apart from OpenCV , Python also provides a module * * time * * which is helpful in me <nl> execution . Another module * * profile * * helps to get detailed report on the code , like how much time <nl> each function in the code took , how many times the function was called etc . But , if you are using <nl> IPython , all these features are integrated in an user - friendly manner . We will see some important <nl> - ones , and for more details , check links in * * Additional Resouces * * section . <nl> + ones , and for more details , check links in * * Additional Resources * * section . <nl> <nl> Measuring Performance with OpenCV <nl> mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm <nl> mmm a / doc / py_tutorials / py_feature2d / py_fast / py_fast . markdown <nl> ppp b / doc / py_tutorials / py_feature2d / py_fast / py_fast . markdown <nl> Non - maximum Suppression . <nl> <nl> It is several times faster than other existing corner detectors . <nl> <nl> - But it is not robust to high levels of noise . It is dependant on a threshold . <nl> + But it is not robust to high levels of noise . It is dependent on a threshold . <nl> <nl> FAST Feature Detector in OpenCV <nl> mmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - <nl> mmm a / doc / py_tutorials / py_feature2d / py_matcher / py_matcher . markdown <nl> ppp b / doc / py_tutorials / py_feature2d / py_matcher / py_matcher . markdown <nl> used . <nl> Second param is boolean variable , crossCheck which is false by default . If it is true , Matcher <nl> returns only those matches with value ( i , j ) such that i - th descriptor in set A has j - th descriptor <nl> in set B as the best match and vice - versa . That is , the two features in both sets should match each <nl> - other . It provides consistant result , and is a good alternative to ratio test proposed by D . Lowe in <nl> + other . It provides consistent result , and is a good alternative to ratio test proposed by D . Lowe in <nl> SIFT paper . <nl> <nl> Once it is created , two important methods are * BFMatcher . match ( ) * and * BFMatcher . knnMatch ( ) * . First <nl> Second dictionary is the SearchParams . It specifies the number of times the tree <nl> should be recursively traversed . Higher values gives better precision , but also takes more time . If <nl> you want to change the value , pass search_params = dict ( checks = 100 ) . <nl> <nl> - With these informations , we are good to go . <nl> + With this information , we are good to go . <nl> @ code { . py } <nl> import numpy as np <nl> import cv2 as cv <nl> mmm a / doc / py_tutorials / py_feature2d / py_shi_tomasi / py_shi_tomasi . markdown <nl> ppp b / doc / py_tutorials / py_feature2d / py_shi_tomasi / py_shi_tomasi . markdown <nl> grayscale image . Then you specify number of corners you want to find . Then you s <nl> level , which is a value between 0 - 1 , which denotes the minimum quality of corner below which <nl> everyone is rejected . Then we provide the minimum euclidean distance between corners detected . <nl> <nl> - With all these informations , the function finds corners in the image . All corners below quality <nl> + With all this information , the function finds corners in the image . All corners below quality <nl> level are rejected . Then it sorts the remaining corners based on quality in the descending order . <nl> Then function takes first strongest corner , throws away all the nearby corners in the range of <nl> minimum distance and returns N strongest corners . <nl> mmm a / doc / py_tutorials / py_feature2d / py_sift_intro / py_sift_intro . markdown <nl> ppp b / doc / py_tutorials / py_feature2d / py_sift_intro / py_sift_intro . markdown <nl> different scale . It is OK with small corner . But to detect larger corners we nee <nl> For this , scale - space filtering is used . In it , Laplacian of Gaussian is found for the image with <nl> various \ f $ \ sigma \ f $ values . LoG acts as a blob detector which detects blobs in various sizes due to <nl> change in \ f $ \ sigma \ f $ . In short , \ f $ \ sigma \ f $ acts as a scaling parameter . For eg , in the above image , <nl> - gaussian kernel with low \ f $ \ sigma \ f $ gives high value for small corner while guassian kernel with high <nl> + gaussian kernel with low \ f $ \ sigma \ f $ gives high value for small corner while gaussian kernel with high <nl> \ f $ \ sigma \ f $ fits well for larger corner . So , we can find the local maxima across the scale and space <nl> which gives us a list of \ f $ ( x , y , \ sigma ) \ f $ values which means there is a potential keypoint at ( x , y ) at <nl> \ f $ \ sigma \ f $ scale . <nl> the intensity at this extrema is less than a threshold value ( 0 . 03 as per the pa <nl> rejected . This threshold is called * * contrastThreshold * * in OpenCV <nl> <nl> DoG has higher response for edges , so edges also need to be removed . For this , a concept similar to <nl> - Harris corner detector is used . They used a 2x2 Hessian matrix ( H ) to compute the pricipal <nl> + Harris corner detector is used . They used a 2x2 Hessian matrix ( H ) to compute the principal <nl> curvature . We know from Harris corner detector that for edges , one eigen value is larger than the <nl> other . So here they used a simple function , <nl> <nl> points . <nl> # # # 3 . Orientation Assignment <nl> <nl> Now an orientation is assigned to each keypoint to achieve invariance to image rotation . A <nl> - neigbourhood is taken around the keypoint location depending on the scale , and the gradient <nl> + neighbourhood is taken around the keypoint location depending on the scale , and the gradient <nl> magnitude and direction is calculated in that region . An orientation histogram with 36 bins covering <nl> 360 degrees is created . ( It is weighted by gradient magnitude and gaussian - weighted circular window <nl> with \ f $ \ sigma \ f $ equal to 1 . 5 times the scale of keypoint . The highest peak in the histogram is taken <nl> with same location and scale , but different directions . It contribute to stabili <nl> # # # 4 . Keypoint Descriptor <nl> <nl> Now keypoint descriptor is created . A 16x16 neighbourhood around the keypoint is taken . It is <nl> - devided into 16 sub - blocks of 4x4 size . For each sub - block , 8 bin orientation histogram is created . <nl> + divided into 16 sub - blocks of 4x4 size . For each sub - block , 8 bin orientation histogram is created . <nl> So a total of 128 bin values are available . It is represented as a vector to form keypoint <nl> descriptor . In addition to this , several measures are taken to achieve robustness against <nl> illumination changes , rotation etc . <nl> mmm a / doc / py_tutorials / py_feature2d / py_surf_intro / py_surf_intro . markdown <nl> ppp b / doc / py_tutorials / py_feature2d / py_surf_intro / py_surf_intro . markdown <nl> and location . <nl> ! [ image ] ( images / surf_boxfilter . jpg ) <nl> <nl> For orientation assignment , SURF uses wavelet responses in horizontal and vertical direction for a <nl> - neighbourhood of size 6s . Adequate guassian weights are also applied to it . Then they are plotted in <nl> + neighbourhood of size 6s . Adequate gaussian weights are also applied to it . Then they are plotted in <nl> a space as given in below image . The dominant orientation is estimated by calculating the sum of all <nl> responses within a sliding orientation window of angle 60 degrees . Interesting thing is that , <nl> wavelet response can be found out using integral images very easily at any scale . For many <nl> mmm a / doc / py_tutorials / py_imgproc / py_colorspaces / py_colorspaces . markdown <nl> ppp b / doc / py_tutorials / py_imgproc / py_colorspaces / py_colorspaces . markdown <nl> commands in your Python terminal : <nl> > > > print ( flags ) <nl> @ endcode <nl> @ note For HSV , Hue range is [ 0 , 179 ] , Saturation range is [ 0 , 255 ] and Value range is [ 0 , 255 ] . <nl> - Different softwares use different scales . So if you are comparing OpenCV values with them , you need <nl> + Different software use different scales . So if you are comparing OpenCV values with them , you need <nl> to normalize these ranges . <nl> <nl> Object Tracking <nl> mmm a / doc / py_tutorials / py_imgproc / py_grabcut / py_grabcut . markdown <nl> ppp b / doc / py_tutorials / py_imgproc / py_grabcut / py_grabcut . markdown <nl> got with corresponding values in newly added mask image . Check the code below : * <nl> # newmask is the mask image I manually labelled <nl> newmask = cv . imread ( ' newmask . png ' , 0 ) <nl> <nl> - # whereever it is marked white ( sure foreground ) , change mask = 1 <nl> - # whereever it is marked black ( sure background ) , change mask = 0 <nl> + # wherever it is marked white ( sure foreground ) , change mask = 1 <nl> + # wherever it is marked black ( sure background ) , change mask = 0 <nl> mask [ newmask = = 0 ] = 0 <nl> mask [ newmask = = 255 ] = 1 <nl> <nl> mmm a / doc / py_tutorials / py_imgproc / py_pyramids / py_pyramids . markdown <nl> ppp b / doc / py_tutorials / py_imgproc / py_pyramids / py_pyramids . markdown <nl> In this chapter , <nl> Theory <nl> mmmmmm <nl> <nl> - Normally , we used to work with an image of constant size . But in some occassions , we need to work <nl> - with images of different resolution of the same image . For example , while searching for something in <nl> - an image , like face , we are not sure at what size the object will be present in the image . In that <nl> - case , we will need to create a set of images with different resolution and search for object in all <nl> - the images . These set of images with different resolution are called Image Pyramids ( because when <nl> - they are kept in a stack with biggest image at bottom and smallest image at top look like a <nl> - pyramid ) . <nl> - <nl> - There are two kinds of Image Pyramids . 1 ) Gaussian Pyramid and 2 ) Laplacian Pyramids <nl> + Normally , we used to work with an image of constant size . But on some occasions , we need to work <nl> + with ( the same ) images in different resolution . For example , while searching for something in <nl> + an image , like face , we are not sure at what size the object will be present in said image . In that <nl> + case , we will need to create a set of the same image with different resolutions and search for object <nl> + in all of them . These set of images with different resolutions are called * * Image Pyramids * * ( because <nl> + when they are kept in a stack with the highest resolution image at the bottom and the lowest resolution <nl> + image at top , it looks like a pyramid ) . <nl> + <nl> + There are two kinds of Image Pyramids . 1 ) * * Gaussian Pyramid * * and 2 ) * * Laplacian Pyramids * * <nl> <nl> Higher level ( Low resolution ) in a Gaussian Pyramid is formed by removing consecutive rows and <nl> columns in Lower level ( higher resolution ) image . Then each pixel in higher level is formed by the <nl> mmm a / doc / py_tutorials / py_imgproc / py_template_matching / py_template_matching . markdown <nl> ppp b / doc / py_tutorials / py_imgproc / py_template_matching / py_template_matching . markdown <nl> Template Matching with Multiple Objects <nl> mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm <nl> <nl> In the previous section , we searched image for Messi ' s face , which occurs only once in the image . <nl> - Suppose you are searching for an object which has multiple occurances , * * cv . minMaxLoc ( ) * * won ' t <nl> + Suppose you are searching for an object which has multiple occurrences , * * cv . minMaxLoc ( ) * * won ' t <nl> give you all the locations . In that case , we will use thresholding . So in this example , we will use <nl> a screenshot of the famous game * * Mario * * and we will find the coins in it . <nl> @ code { . py } <nl> mmm a / doc / py_tutorials / py_imgproc / py_transforms / py_fourier_transform / py_fourier_transform . markdown <nl> ppp b / doc / py_tutorials / py_imgproc / py_transforms / py_fourier_transform / py_fourier_transform . markdown <nl> from matplotlib import pyplot as plt <nl> # simple averaging filter without scaling parameter <nl> mean_filter = np . ones ( ( 3 , 3 ) ) <nl> <nl> - # creating a guassian filter <nl> + # creating a gaussian filter <nl> x = cv . getGaussianKernel ( 5 , 10 ) <nl> gaussian = x * x . T <nl> <nl> mmm a / doc / py_tutorials / py_imgproc / py_watershed / py_watershed . markdown <nl> ppp b / doc / py_tutorials / py_imgproc / py_watershed / py_watershed . markdown <nl> some , they are not . <nl> Additional Resources <nl> mmmmmmmmmmmmmmmmmm - - <nl> <nl> - - # CMM page on [ Watershed Tranformation ] ( http : / / cmm . ensmp . fr / ~ beucher / wtshed . html ) <nl> + - # CMM page on [ Watershed Transformation ] ( http : / / cmm . ensmp . fr / ~ beucher / wtshed . html ) <nl> <nl> Exercises <nl> mmmmmmmmm <nl> mmm a / doc / py_tutorials / py_photo / py_inpainting / py_inpainting . markdown <nl> ppp b / doc / py_tutorials / py_photo / py_inpainting / py_inpainting . markdown <nl> Most of you will have some old degraded photos at your home with some black spot <nl> on it . Have you ever thought of restoring it back ? We can ' t simply erase them in a paint tool <nl> because it is will simply replace black structures with white structures which is of no use . In <nl> these cases , a technique called image inpainting is used . The basic idea is simple : Replace those <nl> - bad marks with its neighbouring pixels so that it looks like the neigbourhood . Consider the image <nl> + bad marks with its neighbouring pixels so that it looks like the neighbourhood . Consider the image <nl> shown below ( taken from [ Wikipedia ] ( http : / / en . wikipedia . org / wiki / Inpainting ) ) : <nl> <nl> ! [ image ] ( images / inpaint_basics . jpg ) <nl> First algorithm is based on the paper * * " An Image Inpainting Technique Based on <nl> Method " * * by Alexandru Telea in 2004 . It is based on Fast Marching Method . Consider a region in the <nl> image to be inpainted . Algorithm starts from the boundary of this region and goes inside the region <nl> gradually filling everything in the boundary first . It takes a small neighbourhood around the pixel <nl> - on the neigbourhood to be inpainted . This pixel is replaced by normalized weighted sum of all the <nl> - known pixels in the neigbourhood . Selection of the weights is an important matter . More weightage is <nl> + on the neighbourhood to be inpainted . This pixel is replaced by normalized weighted sum of all the <nl> + known pixels in the neighbourhood . Selection of the weights is an important matter . More weightage is <nl> given to those pixels lying near to the point , near to the normal of the boundary and those lying on <nl> the boundary contours . Once a pixel is inpainted , it moves to next nearest pixel using Fast Marching <nl> Method . FMM ensures those pixels near the known pixels are inpainted first , so that it just works <nl> mmm a / doc / py_tutorials / py_photo / py_non_local_means / py_non_local_means . markdown <nl> ppp b / doc / py_tutorials / py_photo / py_non_local_means / py_non_local_means . markdown <nl> one noisy image available . <nl> <nl> So idea is simple , we need a set of similar images to average out the noise . Consider a small window <nl> ( say 5x5 window ) in the image . Chance is large that the same patch may be somewhere else in the <nl> - image . Sometimes in a small neigbourhood around it . What about using these similar patches together <nl> + image . Sometimes in a small neighbourhood around it . What about using these similar patches together <nl> and find their average ? For that particular window , that is fine . See an example image below : <nl> <nl> ! [ image ] ( images / nlm_patch . jpg ) <nl> mmm a / doc / py_tutorials / py_video / py_bg_subtraction / py_bg_subtraction . markdown <nl> ppp b / doc / py_tutorials / py_video / py_bg_subtraction / py_bg_subtraction . markdown <nl> cv . destroyAllWindows ( ) <nl> # # # BackgroundSubtractorMOG2 <nl> <nl> It is also a Gaussian Mixture - based Background / Foreground Segmentation Algorithm . It is based on two <nl> - papers by Z . Zivkovic , " Improved adaptive Gausian mixture model for background subtraction " in 2004 <nl> + papers by Z . Zivkovic , " Improved adaptive Gaussian mixture model for background subtraction " in 2004 <nl> and " Efficient Adaptive Density Estimation per Image Pixel for the Task of Background Subtraction " <nl> in 2006 . One important feature of this algorithm is that it selects the appropriate number of <nl> gaussian distribution for each pixel . ( Remember , in last case , we took a K gaussian distributions <nl> mmm a / doc / tutorials / core / file_input_output_with_xml_yml / file_input_output_with_xml_yml . markdown <nl> ppp b / doc / tutorials / core / file_input_output_with_xml_yml / file_input_output_with_xml_yml . markdown <nl> you may access it . For sequences you need to go through them to query a specific <nl> for ( ; it ! = it_end ; + + it ) <nl> cout < < ( string ) * it < < endl ; <nl> @ endcode <nl> - For maps you can use the [ ] operator again to acces the given item ( or the \ > \ > operator too ) : <nl> + For maps you can use the [ ] operator again to access the given item ( or the \ > \ > operator too ) : <nl> @ code { . cpp } <nl> n = fs [ " Mapping " ] ; / / Read mappings from a sequence <nl> cout < < " Two " < < ( int ) ( n [ " Two " ] ) < < " ; " ; <nl> mmm a / doc / tutorials / core / how_to_use_OpenCV_parallel_for_ / how_to_use_OpenCV_parallel_for_ . markdown <nl> ppp b / doc / tutorials / core / how_to_use_OpenCV_parallel_for_ / how_to_use_OpenCV_parallel_for_ . markdown <nl> In OpenCV 3 . 2 , the following parallel frameworks are available in that order : <nl> 7 . Pthreads ( if available ) <nl> <nl> As you can see , several parallel frameworks can be used in the OpenCV library . Some parallel libraries <nl> - are third party libraries and have to be explictly built and enabled in CMake ( e . g . TBB , C = ) , others are <nl> + are third party libraries and have to be explicitly built and enabled in CMake ( e . g . TBB , C = ) , others are <nl> automatically available with the platform ( e . g . APPLE GCD ) but chances are that you should be enable to <nl> have access to a parallel framework either directly or by enabling the option in CMake and rebuild the library . <nl> <nl> The second ( weak ) precondition is more related to the task you want to achieve as not all computations <nl> - are suitable / can be adatapted to be run in a parallel way . To remain simple , tasks that can be splitted <nl> + are suitable / can be adatapted to be run in a parallel way . To remain simple , tasks that can be split <nl> into multiple elementary operations with no memory dependency ( no possible race condition ) are easily <nl> parallelizable . Computer vision processing are often easily parallelizable as most of the time the processing of <nl> one pixel does not depend to the state of other pixels . <nl> Simple example : drawing a Mandelbrot set <nl> mmm - <nl> <nl> We will use the example of drawing a Mandelbrot set to show how from a regular sequential code you can easily adapt <nl> - the code to parallize the computation . <nl> + the code to parallelize the computation . <nl> <nl> Theory <nl> mmmmmmmmm - - <nl> mmm a / doc / tutorials / core / mat_operations . markdown <nl> ppp b / doc / tutorials / core / mat_operations . markdown <nl> Selecting a region of interest : <nl> Rect r ( 10 , 10 , 100 , 100 ) ; <nl> Mat smallImg = img ( r ) ; <nl> @ endcode <nl> - A convertion from Mat to C API data structures : <nl> + A conversion from Mat to C API data structures : <nl> @ code { . cpp } <nl> Mat img = imread ( " image . jpg " ) ; <nl> IplImage img1 = img ; <nl> mmm a / doc / tutorials / features2d / feature_flann_matcher / feature_flann_matcher . markdown <nl> ppp b / doc / tutorials / features2d / feature_flann_matcher / feature_flann_matcher . markdown <nl> int main ( int argc , char * * argv ) <nl> printf ( " - - Min dist : % f \ n " , min_dist ) ; <nl> <nl> / / - - Draw only " good " matches ( i . e . whose distance is less than 2 * min_dist , <nl> - / / - - or a small arbitary value ( 0 . 02 ) in the event that min_dist is very <nl> + / / - - or a small arbitrary value ( 0 . 02 ) in the event that min_dist is very <nl> / / - - small ) <nl> / / - - PS . - radiusMatch can also be used here . <nl> std : : vector < DMatch > good_matches ; <nl> mmm a / doc / tutorials / imgproc / histograms / histogram_equalization / histogram_equalization . markdown <nl> ppp b / doc / tutorials / imgproc / histograms / histogram_equalization / histogram_equalization . markdown <nl> Theory <nl> # # # How does it work ? <nl> <nl> - Equalization implies * mapping * one distribution ( the given histogram ) to another distribution ( a <nl> - wider and more uniform distribution of intensity values ) so the intensity values are spreaded <nl> + wider and more uniform distribution of intensity values ) so the intensity values are spread <nl> over the whole range . <nl> - To accomplish the equalization effect , the remapping should be the * cumulative distribution <nl> function ( cdf ) * ( more details , refer to * Learning OpenCV * ) . For the histogram \ f $ H ( i ) \ f $ , its <nl> mmm a / doc / tutorials / imgproc / imgtrans / distance_transformation / distance_transform . markdown <nl> ppp b / doc / tutorials / imgproc / imgtrans / distance_transformation / distance_transform . markdown <nl> Explanation / Result <nl> @ snippet samples / cpp / tutorial_code / ImgTrans / imageSegmentation . cpp load_image <nl> ! [ ] ( images / source . jpeg ) <nl> <nl> - - # Then if we have an image with white background , it is good to tranform it black . This will help us to desciminate the foreground objects easier when we will apply the Distance Transform : <nl> + - # Then if we have an image with a white background , it is good to transform it to black . This will help us to descriminate the foreground objects easier when we will apply the Distance Transform : <nl> @ snippet samples / cpp / tutorial_code / ImgTrans / imageSegmentation . cpp black_bg <nl> ! [ ] ( images / black_bg . jpeg ) <nl> <nl> Explanation / Result <nl> ! [ ] ( images / laplace . jpeg ) <nl> ! [ ] ( images / sharp . jpeg ) <nl> <nl> - - # Now we tranfrom our new sharped source image to a grayscale and a binary one , respectively : <nl> + - # Now we transfrom our new sharped source image to a grayscale and a binary one , respectively : <nl> @ snippet samples / cpp / tutorial_code / ImgTrans / imageSegmentation . cpp bin <nl> ! [ ] ( images / bin . jpeg ) <nl> <nl> - - # We are ready now to apply the Distance Tranform on the binary image . Moreover , we normalize the output image in order to be able visualize and threshold the result : <nl> + - # We are ready now to apply the Distance Transform on the binary image . Moreover , we normalize the output image in order to be able visualize and threshold the result : <nl> @ snippet samples / cpp / tutorial_code / ImgTrans / imageSegmentation . cpp dist <nl> ! [ ] ( images / dist_transf . jpeg ) <nl> <nl> mmm a / doc / tutorials / imgproc / imgtrans / sobel_derivatives / sobel_derivatives . markdown <nl> ppp b / doc / tutorials / imgproc / imgtrans / sobel_derivatives / sobel_derivatives . markdown <nl> Assuming that the image to be operated is \ f $ I \ f $ : <nl> When the size of the kernel is ` 3 ` , the Sobel kernel shown above may produce noticeable <nl> inaccuracies ( after all , Sobel is only an approximation of the derivative ) . OpenCV addresses <nl> this inaccuracy for kernels of size 3 by using the * * Scharr ( ) * * function . This is as fast <nl> - but more accurate than the standar Sobel function . It implements the following kernels : <nl> + but more accurate than the standard Sobel function . It implements the following kernels : <nl> \ f [ G_ { x } = \ begin { bmatrix } <nl> - 3 & 0 & + 3 \ \ <nl> - 10 & 0 & + 10 \ \ <nl> mmm a / doc / tutorials / imgproc / opening_closing_hats / opening_closing_hats . markdown <nl> ppp b / doc / tutorials / imgproc / opening_closing_hats / opening_closing_hats . markdown <nl> discuss briefly 5 operations offered by OpenCV : <nl> foreground ) <nl> - For instance , check out the example below . The image at the left is the original and the image <nl> at the right is the result after applying the opening transformation . We can observe that the <nl> - small spaces in the corners of the letter tend to dissapear . <nl> + small spaces in the corners of the letter tend to disappear . <nl> <nl> ! [ ] ( images / Morphology_2_Tutorial_Theory_Opening . png ) <nl> <nl> mmm a / doc / tutorials / imgproc / threshold / threshold . markdown <nl> ppp b / doc / tutorials / imgproc / threshold / threshold . markdown <nl> Results <nl> <nl> ! [ ] ( images / Threshold_Tutorial_Original_Image . jpg ) <nl> <nl> - - # First , we try to threshold our image with a * binary threhold inverted * . We expect that the <nl> + - # First , we try to threshold our image with a * binary threshold inverted * . We expect that the <nl> pixels brighter than the \ f $ thresh \ f $ will turn dark , which is what actually happens , as we can see <nl> in the snapshot below ( notice from the original image , that the doggie ' s tongue and eyes are <nl> particularly bright in comparison with the image , this is reflected in the output image ) . <nl> mmm a / doc / tutorials / introduction / android_binary_package / O4A_SDK . markdown <nl> ppp b / doc / tutorials / introduction / android_binary_package / O4A_SDK . markdown <nl> Well , running samples from Eclipse is very simple : <nl> @ code { . sh } <nl> adb shell getprop ro . product . cpu . abi <nl> @ endcode <nl> - If you ' re using an AVD emulator , go Window \ > AVD Manager to see the list of availible devices . <nl> + If you ' re using an AVD emulator , go Window \ > AVD Manager to see the list of available devices . <nl> Click Edit in the context menu of the selected device . In the window , which then pop - ups , find <nl> the CPU field . <nl> <nl> mmm a / doc / tutorials / introduction / android_binary_package / android_dev_intro . markdown <nl> ppp b / doc / tutorials / introduction / android_binary_package / android_dev_intro . markdown <nl> key topis : <nl> - # [ Android <nl> Activity ] ( http : / / developer . android . com / training / basics / activity - lifecycle / starting . html ) and its <nl> lifecycle , that is an essential Android API class . <nl> - - # OpenCV development will certainly require some knowlege of the [ Android <nl> + - # OpenCV development will certainly require some knowledge of the [ Android <nl> Camera ] ( http : / / developer . android . com / guide / topics / media / camera . html ) specifics . <nl> <nl> Quick environment setup for Android development <nl> Here is the standard way to compile C + + part of an Android application : <nl> <nl> * * warning * * <nl> <nl> - We strongly reccomend using cmd . exe ( standard Windows console ) instead of Cygwin on <nl> + We strongly recommend using cmd . exe ( standard Windows console ) instead of Cygwin on <nl> * * Windows * * . Use the latter if only you ' re absolutely sure about , what you ' re doing . Cygwin is <nl> not really supported and we are unlikely to help you in case you encounter some problems with <nl> it . So , use it only if you ' re capable of handling the consequences yourself . <nl> application , but sure the most uncomplicated one to configure . <nl> <nl> ! [ ] ( images / AVD_create . png ) <nl> <nl> - - # When you click the Create AVD button , your new AVD will be availible in AVD Manager . <nl> + - # When you click the Create AVD button , your new AVD will be available in AVD Manager . <nl> - # Press Start to launch the device . Be aware that any AVD ( a . k . a . Emulator ) is usually much slower <nl> than a hardware Android device , so it may take up to several minutes to start . <nl> - # Go Run - \ > Run / Debug in Eclipse IDE to run your application in regular or debugging mode . <nl> mmm a / doc / tutorials / introduction / android_binary_package / dev_with_OCV_on_Android . markdown <nl> ppp b / doc / tutorials / introduction / android_binary_package / dev_with_OCV_on_Android . markdown <nl> application . It will be capable of accessing camera output , processing it and di <nl> @ endcode <nl> - # Defines that your activity implements CvCameraViewListener2 interface and fix activity related <nl> errors by defining missed methods . For this activity define onCreate , onDestroy and onPause and <nl> - implement them according code snippet bellow . Fix errors by adding required imports . <nl> + implement them according to the code snippet below . Fix errors by adding required imports . <nl> @ code { . java } <nl> private CameraBridgeViewBase mOpenCvCameraView ; <nl> <nl> mmm a / doc / tutorials / introduction / clojure_dev_intro / clojure_dev_intro . markdown <nl> ppp b / doc / tutorials / introduction / clojure_dev_intro / clojure_dev_intro . markdown <nl> user = > ( . area sq - 100 ) <nl> 100 . 0 <nl> @ endcode <nl> If you find yourself not remembering a OpenCV class behavior , the REPL gives you the opportunity to <nl> - easily search the corresponding javadoc documention : <nl> + easily search the corresponding javadoc documentation : <nl> @ code { . clojure } <nl> user = > ( javadoc Rect ) <nl> " http : / / www . google . com / search ? btnI = I % 27m % 20Feeling % 20Lucky & q = allinurl : org / opencv / core / Rect . html " <nl> org . opencv . core . Scalar <nl> @ endcode <nl> We ' re going to mimic almost verbatim the original OpenCV java tutorial to : <nl> <nl> - - create a 5x10 matrix with all its elements intialized to 0 <nl> + - create a 5x10 matrix with all its elements initialized to 0 <nl> - change the value of every element of the second row to 1 <nl> - change the value of every element of the 6th column to 5 <nl> - print the content of the obtained matrix <nl> mmm a / doc / tutorials / introduction / load_save_image / load_save_image . markdown <nl> ppp b / doc / tutorials / introduction / load_save_image / load_save_image . markdown <nl> Explanation <nl> order in case of color images ) . <nl> <nl> - # So now we have our new * gray_image * and want to save it on disk ( otherwise it will get lost <nl> - after the program ends ) . To save it , we will use a function analagous to @ ref cv : : imread : @ ref <nl> + after the program ends ) . To save it , we will use a function analogous to @ ref cv : : imread : @ ref <nl> cv : : imwrite <nl> @ code { . cpp } <nl> imwrite ( " . . / . . / images / Gray_Image . jpg " , gray_image ) ; <nl> mmm a / doc / tutorials / introduction / transition_guide / transition_guide . markdown <nl> ppp b / doc / tutorials / introduction / transition_guide / transition_guide . markdown <nl> OpenCL { # tutorial_transition_hints_opencl } <nl> mmmmmm <nl> All specialized ` ocl ` implemetations has been hidden behind general C + + algorithm interface . Now the function execution path can be selected dynamically at runtime : CPU or OpenCL ; this mechanism is also called " Transparent API " . <nl> <nl> - New class cv : : UMat is intended to hide data exchange with OpenCL device in a convinient way . <nl> + New class cv : : UMat is intended to hide data exchange with OpenCL device in a convenient way . <nl> <nl> Following example illustrate API modifications ( from [ OpenCV site ] ( http : / / opencv . org / platforms / opencl . html ) ) : <nl> <nl> mmm a / doc / tutorials / ml / introduction_to_svm / introduction_to_svm . markdown <nl> ppp b / doc / tutorials / ml / introduction_to_svm / introduction_to_svm . markdown <nl> Let ' s introduce the notation used to define formally a hyperplane : <nl> <nl> where \ f $ \ beta \ f $ is known as the * weight vector * and \ f $ \ beta_ { 0 } \ f $ as the * bias * . <nl> <nl> - @ sa A more in depth description of this and hyperplanes you can find in the section 4 . 5 ( * Seperating <nl> + @ sa A more in depth description of this and hyperplanes you can find in the section 4 . 5 ( * Separating <nl> Hyperplanes * ) of the book : * Elements of Statistical Learning * by T . Hastie , R . Tibshirani and J . H . <nl> Friedman ( @ cite HTF01 ) . <nl> <nl> mmm a / doc / tutorials / ml / non_linear_svms / non_linear_svms . markdown <nl> ppp b / doc / tutorials / ml / non_linear_svms / non_linear_svms . markdown <nl> Explanation <nl> - # __Set up SVM ' s parameters__ <nl> <nl> @ note In the previous tutorial @ ref tutorial_introduction_to_svm there is an explanation of the <nl> - atributes of the class @ ref cv : : ml : : SVM that we configure here before training the SVM . <nl> + attributes of the class @ ref cv : : ml : : SVM that we configure here before training the SVM . <nl> <nl> @ snippet cpp / tutorial_code / ml / non_linear_svms / non_linear_svms . cpp init <nl> <nl> mmm a / doc / tutorials / ml / table_of_content_ml . markdown <nl> ppp b / doc / tutorials / ml / table_of_content_ml . markdown <nl> of data . <nl> <nl> * Author : * Fernando Iglesias García <nl> <nl> - Learn what a Suport Vector Machine is . <nl> + Learn what a Support Vector Machine is . <nl> <nl> - @ subpage tutorial_non_linear_svms <nl> <nl> mmm a / doc / tutorials / objdetect / traincascade . markdown <nl> ppp b / doc / tutorials / objdetect / traincascade . markdown <nl> To support this tutorial , several official OpenCV applications will be used : [ op <nl> <nl> # # # Important notes <nl> <nl> - - If you come accross any tutorial mentioning the old opencv_haartraining tool < i > ( which is deprecated and still using the OpenCV1 . x interface ) < / i > , then please ignore that tutorial and stick to the opencv_traincascade tool . This tool is a newer version , written in C + + in accordance to the OpenCV 2 . x and OpenCV 3 . x API . The opencv_traincascade supports both HAAR like wavelet features @ cite Viola01 and LBP ( Local Binary Patterns ) @ cite Liao2007 features . LBP features yield integer precision in contrast to HAAR features , yielding floating point precision , so both training and detection with LBP are several times faster then with HAAR features . Regarding the LBP and HAAR detection quality , it mainly depends on the training data used and the training parameters selected . It ' s possible to train a LBP - based classifier that will provide almost the same quality as HAAR - based one , within a percentage of the training time . <nl> + - If you come across any tutorial mentioning the old opencv_haartraining tool < i > ( which is deprecated and still using the OpenCV1 . x interface ) < / i > , then please ignore that tutorial and stick to the opencv_traincascade tool . This tool is a newer version , written in C + + in accordance to the OpenCV 2 . x and OpenCV 3 . x API . The opencv_traincascade supports both HAAR like wavelet features @ cite Viola01 and LBP ( Local Binary Patterns ) @ cite Liao2007 features . LBP features yield integer precision in contrast to HAAR features , yielding floating point precision , so both training and detection with LBP are several times faster then with HAAR features . Regarding the LBP and HAAR detection quality , it mainly depends on the training data used and the training parameters selected . It ' s possible to train a LBP - based classifier that will provide almost the same quality as HAAR - based one , within a percentage of the training time . <nl> <nl> - The newer cascade classifier detection interface from OpenCV 2 . x and OpenCV 3 . x ( @ ref cv : : CascadeClassifier ) supports working with both old and new model formats . opencv_traincascade can even save ( export ) a trained cascade in the older format if for some reason you are stuck using the old interface . At least training the model could then be done in the most stable interface . <nl> <nl> Command line arguments : <nl> <nl> - ` - num < number_of_samples > ` : Number of positive samples to generate . <nl> <nl> - - ` - bgcolor < background_color > ` : Background color ( currently grayscale images are assumed ) ; the background color denotes the transparent color . Since there might be compression artifacts , the amount of color tolerance can be specified by - bgthresh . All pixels withing bgcolor - bgthresh and bgcolor + bgthresh range are interpreted as transparent . <nl> + - ` - bgcolor < background_color > ` : Background color ( currently grayscale images are assumed ) ; the background color denotes the transparent color . Since there might be compression artifacts , the amount of color tolerance can be specified by - bgthresh . All pixels within bgcolor - bgthresh and bgcolor + bgthresh range are interpreted as transparent . <nl> <nl> - ` - bgthresh < background_color_threshold > ` <nl> - ` - inv ` : If specified , colors will be inverted . <nl> Training is finished and you can test your cascade classifier ! <nl> Visualising Cascade Classifiers <nl> mmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - <nl> <nl> - From time to time it can be usefull to visualise the trained cascade , to see which features it selected and how complex its stages are . For this OpenCV supplies a opencv_visualisation application . This application has the following commands : <nl> + From time to time it can be useful to visualise the trained cascade , to see which features it selected and how complex its stages are . For this OpenCV supplies a opencv_visualisation application . This application has the following commands : <nl> <nl> - ` - - image ` < b > ( required ) < / b > : path to a reference image for your object model . This should be an annotation with dimensions [ ` - w ` , ` - h ` ] as passed to both opencv_createsamples and opencv_traincascade application . <nl> - ` - - model ` < b > ( required ) < / b > : path to the trained model , which should be in the folder supplied to the ` - data ` parameter of the opencv_traincascade application . <nl> mmm a / doc / tutorials / videoio / kinect_openni . markdown <nl> ppp b / doc / tutorials / videoio / kinect_openni . markdown <nl> get CAP_OPENNI_IMAGE_GENERATOR_PRESENT property . <nl> @ code { . cpp } <nl> bool isImageGeneratorPresent = capture . get ( CAP_PROP_OPENNI_IMAGE_GENERATOR_PRESENT ) ! = 0 ; / / or = = 1 <nl> @ endcode <nl> - Flags specifing the needed generator type must be used in combination with particular generator <nl> + Flags specifying the needed generator type must be used in combination with particular generator <nl> property . The following properties of cameras available through OpenNI interfaces are supported : <nl> <nl> - For image generator : <nl> mmm a / doc / tutorials / videoio / video - input - psnr - ssim / video_input_psnr_ssim . markdown <nl> ppp b / doc / tutorials / videoio / video - input - psnr - ssim / video_input_psnr_ssim . markdown <nl> C + + class . This on itself builds on the FFmpeg open source library . This is a ba <nl> dependency of OpenCV so you shouldn ' t need to worry about this . A video is composed of a succession <nl> of images , we refer to these in the literature as frames . In case of a video file there is a * frame <nl> rate * specifying just how long is between two frames . While for the video cameras usually there is a <nl> - limit of just how many frames they can digitalize per second , this property is less important as at <nl> + limit of just how many frames they can digitize per second , this property is less important as at <nl> any time the camera sees the current snapshot of the world . <nl> <nl> The first task you need to do is to assign to a @ ref cv : : VideoCapture class its source . You can do <nl> mmm a / platforms / android / build_sdk . py <nl> ppp b / platforms / android / build_sdk . py <nl> def gather_results ( self , engines ) : <nl> parser . add_argument ( ' - - ndk_path ' , help = " Path to Android NDK to use for build " ) <nl> parser . add_argument ( ' - - sdk_path ' , help = " Path to Android SDK to use for build " ) <nl> parser . add_argument ( " - - extra_modules_path " , help = " Path to extra modules to use for build " ) <nl> - parser . add_argument ( ' - - sign_with ' , help = " Sertificate to sign the Manager apk " ) <nl> + parser . add_argument ( ' - - sign_with ' , help = " Certificate to sign the Manager apk " ) <nl> parser . add_argument ( ' - - build_doc ' , action = " store_true " , help = " Build javadoc " ) <nl> parser . add_argument ( ' - - no_ccache ' , action = " store_true " , help = " Do not use ccache during library build " ) <nl> parser . add_argument ( ' - - extra_pack ' , action = ' append ' , help = " provide extra OpenCV libraries for Manager apk in form < version > : < path - to - native - libs > , for example ' 2 . 4 . 11 : unpacked / sdk / native / libs ' " ) <nl> mmm a / platforms / android / service / engine / src / org / opencv / engine / manager / ManagerActivity . java <nl> ppp b / platforms / android / service / engine / src / org / opencv / engine / manager / ManagerActivity . java <nl> public void onCreate ( Bundle savedInstanceState ) { <nl> public void onClick ( View v ) { <nl> if ( ! mMarket . InstallAppFromMarket ( packageName ) ) { <nl> Toast toast = Toast . makeText ( getApplicationContext ( ) , <nl> - " Google Play is not avaliable " , Toast . LENGTH_SHORT ) ; <nl> + " Google Play is not available " , Toast . LENGTH_SHORT ) ; <nl> toast . show ( ) ; <nl> } <nl> } <nl> public void onClick ( View v ) { <nl> if ( ! bindService ( new Intent ( this , c ) , <nl> new OpenCVEngineServiceConnection ( ) , Context . BIND_AUTO_CREATE ) ) { <nl> Log . e ( TAG , " Failed to bind to service : " + c . getName ( ) ) ; <nl> - mVersionText . setText ( " not avaliable " ) ; <nl> + mVersionText . setText ( " not available " ) ; <nl> } else { <nl> Log . d ( TAG , " Successfully bound to service : " + c . getName ( ) ) ; <nl> mVersionText . setText ( " available " ) ; <nl> mmm a / platforms / linux / arm . toolchain . cmake <nl> ppp b / platforms / linux / arm . toolchain . cmake <nl> if ( NOT DEFINED ARM_LINUX_SYSROOT AND DEFINED GNU_MACHINE ) <nl> endif ( ) <nl> <nl> if ( NOT DEFINED CMAKE_CXX_FLAGS ) <nl> - set ( CMAKE_CXX_FLAGS " " CACHE INTERAL " " ) <nl> - set ( CMAKE_C_FLAGS " " CACHE INTERAL " " ) <nl> - set ( CMAKE_SHARED_LINKER_FLAGS " " CACHE INTERAL " " ) <nl> - set ( CMAKE_MODULE_LINKER_FLAGS " " CACHE INTERAL " " ) <nl> - set ( CMAKE_EXE_LINKER_FLAGS " " CACHE INTERAL " " ) <nl> + set ( CMAKE_CXX_FLAGS " " CACHE INTERNAL " " ) <nl> + set ( CMAKE_C_FLAGS " " CACHE INTERNAL " " ) <nl> + set ( CMAKE_SHARED_LINKER_FLAGS " " CACHE INTERNAL " " ) <nl> + set ( CMAKE_MODULE_LINKER_FLAGS " " CACHE INTERNAL " " ) <nl> + set ( CMAKE_EXE_LINKER_FLAGS " " CACHE INTERNAL " " ) <nl> <nl> set ( CMAKE_CXX_FLAGS " $ { CMAKE_CXX_FLAGS } - fdata - sections - Wa , - - noexecstack - fsigned - char - Wno - psabi " ) <nl> set ( CMAKE_C_FLAGS " $ { CMAKE_C_FLAGS } - fdata - sections - Wa , - - noexecstack - fsigned - char - Wno - psabi " ) <nl> mmm a / platforms / linux / ppcat . toolchain . cmake <nl> ppp b / platforms / linux / ppcat . toolchain . cmake <nl> if ( NOT DEFINED AT_SYSROOT_PATH ) <nl> endif ( ) <nl> <nl> if ( NOT DEFINED CMAKE_EXE_LINKER_FLAGS ) <nl> - set ( CMAKE_CXX_FLAGS " " CACHE INTERAL " " ) <nl> - set ( CMAKE_C_FLAGS " " CACHE INTERAL " " ) <nl> - set ( CMAKE_EXE_LINKER_FLAGS " " CACHE INTERAL " " ) <nl> - set ( CMAKE_SHARED_LINKER_FLAGS " " CACHE INTERAL " " ) <nl> - set ( CMAKE_MODULE_LINKER_FLAGS " " CACHE INTERAL " " ) <nl> + set ( CMAKE_CXX_FLAGS " " CACHE INTERNAL " " ) <nl> + set ( CMAKE_C_FLAGS " " CACHE INTERNAL " " ) <nl> + set ( CMAKE_EXE_LINKER_FLAGS " " CACHE INTERNAL " " ) <nl> + set ( CMAKE_SHARED_LINKER_FLAGS " " CACHE INTERNAL " " ) <nl> + set ( CMAKE_MODULE_LINKER_FLAGS " " CACHE INTERNAL " " ) <nl> <nl> if ( AT_RPATH ) <nl> string ( REPLACE " , " " ; " RPATH_LIST $ { AT_RPATH } ) <nl> mmm a / platforms / maven / README . md <nl> ppp b / platforms / maven / README . md <nl> Generally all that is required is the standard Maven command : <nl> <nl> One of the first things the build will do is check the required native dependencies . The Maven build indicates the status of the required dependencies and will fail at this point if any are missing . Install using the package manager e . g . aptitude or apt - get , and restart the build with the above command . <nl> <nl> - Once the build succesfully completes the OSGi compatible artifacts are available as described above in ' Build Directory ' . <nl> + Once the build successfully completes the OSGi compatible artifacts are available as described above in ' Build Directory ' . <nl> <nl> # # # # 3 . 4 - ARM 32 - bit Architecture - Raspbian Distribution <nl> Similar to the x86 architecture the native dependencies are first checked so install any that are missing , however at the time of writing there are no official ` libtbb2 ` and ` libtbb - dev ` packages in Raspbian . Version 4 . 4 . 3 of Intel ' s Thread Building Blocks library are available [ here ] ( http : / / www . javatechnics . com / thread - building - blocks - tbb - 4 - 4 - 3 - for - raspbian ) as a Raspbian - compatible Debian packages . <nl> mmm a / platforms / maven / opencv / scripts / properties <nl> ppp b / platforms / maven / opencv / scripts / properties <nl> <nl> # <nl> # Returns : <nl> # 0 - Successfully written the properties file . <nl> - # 1 - Error occured such as build directory does not exist <nl> + # 1 - Error occurred such as build directory does not exist <nl> # or OpenCV version could not be determined or an <nl> # unexpected error . <nl> # <nl> mmm a / platforms / winrt / setup_winrt . ps1 <nl> ppp b / platforms / winrt / setup_winrt . ps1 <nl> Function Execute ( ) { <nl> } <nl> <nl> Function ShowHelp ( ) { <nl> - Write - Host " Configures OpenCV and generates projects for specified verion of Visual Studio / platforms / architectures . " <nl> + Write - Host " Configures OpenCV and generates projects for specified version of Visual Studio / platforms / architectures . " <nl> Write - Host " Must be executed from the sources folder containing main CMakeLists configuration . " <nl> Write - Host " Parameter keys can be shortened down to a single symbol ( e . g . ' - a ' ) and are not case sensitive . " <nl> Write - Host " Proper parameter sequencing is required when omitting keys . " <nl> Function ShowHelp ( ) { <nl> Write - Host " setup_winrt - a x86 - g ' Visual Studio 15 2017 ' - pl WP " <nl> Write - Host " WHERE : " <nl> Write - Host " options - Options to call " <nl> - Write - Host " - h : diplays command line help " <nl> + Write - Host " - h : displays command line help " <nl> Write - Host " - b : builds BUILD_ALL and INSTALL projects for each generated configuration in both Debug and Release modes . " <nl> Write - Host " platform - Array of target platforms . " <nl> Write - Host " Default : WP " <nl>
Misc . . / apps . / doc . / platoforms typos
opencv/opencv
d47b1f3b70f9f797c16008e59d37e592e789cd79
2018-02-08T18:04:34Z
mmm a / hphp / runtime / base / apc - local - array . cpp <nl> ppp b / hphp / runtime / base / apc - local - array . cpp <nl> ssize_t APCLocalArray : : IterRewind ( const ArrayData * ad , ssize_t prev ) { <nl> return next > = 0 ? next : invalid_index ; <nl> } <nl> <nl> - bool APCLocalArray : : ValidFullPos ( const ArrayData * ad , const FullPos & fp ) { <nl> + bool APCLocalArray : : ValidMArrayIter ( const ArrayData * ad , const MArrayIter & fp ) { <nl> assert ( fp . getContainer ( ) = = ad ) ; <nl> return false ; <nl> } <nl> <nl> - bool APCLocalArray : : AdvanceFullPos ( ArrayData * ad , FullPos & fp ) { <nl> + bool APCLocalArray : : AdvanceMArrayIter ( ArrayData * ad , MArrayIter & fp ) { <nl> return false ; <nl> } <nl> <nl> mmm a / hphp / runtime / base / apc - local - array . h <nl> ppp b / hphp / runtime / base / apc - local - array . h <nl> class APCLocalArray : public ArrayData , Sweepable { <nl> static ssize_t IterAdvance ( const ArrayData * , ssize_t prev ) ; <nl> static ssize_t IterRewind ( const ArrayData * , ssize_t prev ) ; <nl> <nl> - static bool ValidFullPos ( const ArrayData * , const FullPos & fp ) ; <nl> - static bool AdvanceFullPos ( ArrayData * , FullPos & fp ) ; <nl> + static bool ValidMArrayIter ( const ArrayData * , const MArrayIter & fp ) ; <nl> + static bool AdvanceMArrayIter ( ArrayData * , MArrayIter & fp ) ; <nl> <nl> static void Release ( ArrayData * ) ; <nl> <nl> mmm a / hphp / runtime / base / array - data - defs . h <nl> ppp b / hphp / runtime / base / array - data - defs . h <nl> inline ssize_t ArrayData : : iter_rewind ( ssize_t pos ) const { <nl> return g_array_funcs . iterRewind [ m_kind ] ( this , pos ) ; <nl> } <nl> <nl> - inline bool ArrayData : : validFullPos ( const FullPos & fp ) const { <nl> - return g_array_funcs . validFullPos [ m_kind ] ( this , fp ) ; <nl> + inline bool ArrayData : : validMArrayIter ( const MArrayIter & fp ) const { <nl> + return g_array_funcs . validMArrayIter [ m_kind ] ( this , fp ) ; <nl> } <nl> <nl> - inline bool ArrayData : : advanceFullPos ( FullPos & fp ) { <nl> - return g_array_funcs . advanceFullPos [ m_kind ] ( this , fp ) ; <nl> + inline bool ArrayData : : advanceMArrayIter ( MArrayIter & fp ) { <nl> + return g_array_funcs . advanceMArrayIter [ m_kind ] ( this , fp ) ; <nl> } <nl> <nl> inline ArrayData * ArrayData : : escalateForSort ( ) { <nl> mmm a / hphp / runtime / base / array - data . cpp <nl> ppp b / hphp / runtime / base / array - data . cpp <nl> extern const ArrayFunctions g_array_funcs = { <nl> & APCLocalArray : : IterRewind , <nl> & NameValueTableWrapper : : IterRewind , <nl> & ProxyArray : : IterRewind } , <nl> - / / validFullPos <nl> - { & HphpArray : : ValidFullPos , & HphpArray : : ValidFullPos , <nl> - & APCLocalArray : : ValidFullPos , <nl> - & NameValueTableWrapper : : ValidFullPos , <nl> - & ProxyArray : : ValidFullPos } , <nl> - / / advanceFullPos <nl> - { & HphpArray : : AdvanceFullPos , & HphpArray : : AdvanceFullPos , <nl> - & APCLocalArray : : AdvanceFullPos , <nl> - & NameValueTableWrapper : : AdvanceFullPos , <nl> - & ProxyArray : : AdvanceFullPos } , <nl> + / / validMArrayIter <nl> + { & HphpArray : : ValidMArrayIter , & HphpArray : : ValidMArrayIter , <nl> + & APCLocalArray : : ValidMArrayIter , <nl> + & NameValueTableWrapper : : ValidMArrayIter , <nl> + & ProxyArray : : ValidMArrayIter } , <nl> + / / advanceMArrayIter <nl> + { & HphpArray : : AdvanceMArrayIter , & HphpArray : : AdvanceMArrayIter , <nl> + & APCLocalArray : : AdvanceMArrayIter , <nl> + & NameValueTableWrapper : : AdvanceMArrayIter , <nl> + & ProxyArray : : AdvanceMArrayIter } , <nl> / / escalateForSort <nl> { & HphpArray : : EscalateForSort , & HphpArray : : EscalateForSort , <nl> & APCLocalArray : : EscalateForSort , <nl> ArrayData * ArrayData : : Dequeue ( ArrayData * a , Variant & value ) { <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> / / MutableArrayIter related functions <nl> <nl> - void ArrayData : : newFullPos ( FullPos & fp ) { <nl> + void ArrayData : : newMArrayIter ( MArrayIter & fp ) { <nl> assert ( ! fp . getContainer ( ) ) ; <nl> fp . setContainer ( this ) ; <nl> fp . setNext ( strongIterators ( ) ) ; <nl> void ArrayData : : newFullPos ( FullPos & fp ) { <nl> fp . m_pos = m_pos ; <nl> } <nl> <nl> - void ArrayData : : freeFullPos ( FullPos & fp ) { <nl> + void ArrayData : : freeMArrayIter ( MArrayIter & fp ) { <nl> assert ( strongIterators ( ) & & fp . getContainer ( ) = = this ) ; <nl> / / search for fp in our list , then remove it . Usually its the first one . <nl> - FullPos * p = strongIterators ( ) ; <nl> + MArrayIter * p = strongIterators ( ) ; <nl> if ( p = = & fp ) { <nl> setStrongIterators ( p - > getNext ( ) ) ; <nl> fp . setContainer ( nullptr ) ; <nl> void ArrayData : : freeFullPos ( FullPos & fp ) { <nl> } <nl> <nl> void ArrayData : : freeStrongIterators ( ) { <nl> - for ( FullPosRange r ( strongIterators ( ) ) ; ! r . empty ( ) ; r . popFront ( ) ) { <nl> + for ( MArrayIterRange r ( strongIterators ( ) ) ; ! r . empty ( ) ; r . popFront ( ) ) { <nl> r . front ( ) - > setContainer ( nullptr ) ; <nl> } <nl> setStrongIterators ( nullptr ) ; <nl> mmm a / hphp / runtime / base / array - data . h <nl> ppp b / hphp / runtime / base / array - data . h <nl> struct ArrayData { <nl> / * * <nl> * Mutable iteration APIs <nl> * <nl> - * The following six methods are used for mutable iteration . For all methods <nl> - * except newFullPos ( ) , it is the caller ' s responsibility to ensure that the <nl> - * specified FullPos ' fp ' is registered with this array and hasn ' t already <nl> - * been freed . <nl> + * The following six methods are used for mutable iteration . For all <nl> + * methods except newMArrayIter ( ) , it is the caller ' s responsibility <nl> + * to ensure that the specified MArrayIter ' fp ' is registered with <nl> + * this array and hasn ' t already been freed . <nl> * / <nl> <nl> / * * <nl> struct ArrayData { <nl> * array keeps track of all mutable iterators that have registered with it . <nl> * <nl> * A mutable iterator remains live until one of the following happens : <nl> - * ( 1 ) The mutable iterator is freed by calling the freeFullPos ( ) method . <nl> + * ( 1 ) The mutable iterator is freed by calling the freeMArrayIter ( ) method . <nl> * ( 2 ) The array ' s refcount drops to 0 and the array frees all mutable <nl> * iterators that were registered with it . <nl> * ( 3 ) Some other kind of " invalidation " event happens to the array that <nl> * causes it to free all mutable iterators that were registered with <nl> * it ( ex . array_shift ( ) is called on the array ) . <nl> * / <nl> - void newFullPos ( FullPos & fp ) ; <nl> + void newMArrayIter ( MArrayIter & fp ) ; <nl> <nl> / * * <nl> * Frees a mutable iterator that was registered with this array . <nl> * / <nl> - void freeFullPos ( FullPos & fp ) ; <nl> + void freeMArrayIter ( MArrayIter & fp ) ; <nl> <nl> / * * <nl> * Checks if a mutable iterator points to a valid element within this array . <nl> * This will return false if the iterator points past the last element , or <nl> * if the iterator points before the first element . <nl> * / <nl> - bool validFullPos ( const FullPos & fp ) const ; <nl> + bool validMArrayIter ( const MArrayIter & fp ) const ; <nl> <nl> / * * <nl> * Advances the mutable iterator to the next element in the array . Returns <nl> * false if the iterator has moved past the last element , otherwise returns <nl> * true . <nl> * / <nl> - bool advanceFullPos ( FullPos & fp ) ; <nl> + bool advanceMArrayIter ( MArrayIter & fp ) ; <nl> <nl> const Variant & endRef ( ) ; <nl> <nl> struct ArrayData { <nl> protected : <nl> void freeStrongIterators ( ) ; <nl> static void moveStrongIterators ( ArrayData * dest , ArrayData * src ) ; <nl> - FullPos * strongIterators ( ) const { <nl> + MArrayIter * strongIterators ( ) const { <nl> return m_strongIterators ; <nl> } <nl> - void setStrongIterators ( FullPos * p ) { <nl> + void setStrongIterators ( MArrayIter * p ) { <nl> m_strongIterators = p ; <nl> } <nl> / / error - handling helpers <nl> struct ArrayData { <nl> } ; <nl> uint64_t m_posAndCount ; / / be careful , m_pos is signed <nl> } ; <nl> - FullPos * m_strongIterators ; / / head of linked list <nl> + MArrayIter * m_strongIterators ; / / head of linked list <nl> } ; <nl> <nl> / * <nl> struct ArrayFunctions { <nl> ssize_t ( * iterEnd [ NK ] ) ( const ArrayData * ) ; <nl> ssize_t ( * iterAdvance [ NK ] ) ( const ArrayData * , ssize_t pos ) ; <nl> ssize_t ( * iterRewind [ NK ] ) ( const ArrayData * , ssize_t pos ) ; <nl> - bool ( * validFullPos [ NK ] ) ( const ArrayData * , const FullPos & ) ; <nl> - bool ( * advanceFullPos [ NK ] ) ( ArrayData * , FullPos & ) ; <nl> + bool ( * validMArrayIter [ NK ] ) ( const ArrayData * , const MArrayIter & ) ; <nl> + bool ( * advanceMArrayIter [ NK ] ) ( ArrayData * , MArrayIter & ) ; <nl> ArrayData * ( * escalateForSort [ NK ] ) ( ArrayData * ) ; <nl> void ( * ksort [ NK ] ) ( ArrayData * ad , int sort_flags , bool ascending ) ; <nl> void ( * sort [ NK ] ) ( ArrayData * ad , int sort_flags , bool ascending ) ; <nl> mmm a / hphp / runtime / base / array - iterator . cpp <nl> ppp b / hphp / runtime / base / array - iterator . cpp <nl> RefData * ArrayIter : : zSecond ( ) { <nl> } <nl> <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - / / FullPos <nl> + / / MArrayIter <nl> <nl> - bool FullPos : : end ( ) const { <nl> - return ! const_cast < FullPos * > ( this ) - > prepare ( ) ; <nl> + bool MArrayIter : : end ( ) const { <nl> + return ! const_cast < MArrayIter * > ( this ) - > prepare ( ) ; <nl> } <nl> <nl> - bool FullPos : : advance ( ) { <nl> + bool MArrayIter : : advance ( ) { <nl> ArrayData * data = getArray ( ) ; <nl> ArrayData * container = getContainer ( ) ; <nl> if ( ! data ) { <nl> if ( container ) { <nl> - container - > freeFullPos ( * this ) ; <nl> + container - > freeMArrayIter ( * this ) ; <nl> } <nl> setResetFlag ( false ) ; <nl> return false ; <nl> } <nl> if ( container = = data ) { <nl> - return cowCheck ( ) - > advanceFullPos ( * this ) ; <nl> + return cowCheck ( ) - > advanceMArrayIter ( * this ) ; <nl> } <nl> data = reregister ( ) ; <nl> assert ( data & & data = = getContainer ( ) ) ; <nl> assert ( ! getResetFlag ( ) ) ; <nl> - if ( ! data - > validFullPos ( * this ) ) return false ; <nl> + if ( ! data - > validMArrayIter ( * this ) ) return false ; <nl> / / To conform to PHP behavior , we need to set the internal <nl> / / cursor to point to the next element . <nl> data - > next ( ) ; <nl> return true ; <nl> } <nl> <nl> - bool FullPos : : prepare ( ) { <nl> + bool MArrayIter : : prepare ( ) { <nl> ArrayData * data = getArray ( ) ; <nl> ArrayData * container = getContainer ( ) ; <nl> if ( ! data ) { <nl> if ( container ) { <nl> - container - > freeFullPos ( * this ) ; <nl> + container - > freeMArrayIter ( * this ) ; <nl> } <nl> setResetFlag ( false ) ; <nl> return false ; <nl> bool FullPos : : prepare ( ) { <nl> if ( container ! = data ) { <nl> data = reregister ( ) ; <nl> } <nl> - return data - > validFullPos ( * this ) ; <nl> + return data - > validMArrayIter ( * this ) ; <nl> } <nl> <nl> - void FullPos : : escalateCheck ( ) { <nl> + void MArrayIter : : escalateCheck ( ) { <nl> if ( hasRef ( ) ) { <nl> auto const data = getData ( ) ; <nl> if ( ! data ) return ; <nl> void FullPos : : escalateCheck ( ) { <nl> } <nl> } <nl> <nl> - ArrayData * FullPos : : cowCheck ( ) { <nl> + ArrayData * MArrayIter : : cowCheck ( ) { <nl> if ( hasRef ( ) ) { <nl> auto data = getData ( ) ; <nl> if ( ! data ) return nullptr ; <nl> ArrayData * FullPos : : cowCheck ( ) { <nl> return data ; <nl> } <nl> <nl> - ArrayData * FullPos : : reregister ( ) { <nl> + ArrayData * MArrayIter : : reregister ( ) { <nl> ArrayData * container = getContainer ( ) ; <nl> assert ( getArray ( ) ! = nullptr & & container ! = getArray ( ) ) ; <nl> if ( container ! = nullptr ) { <nl> - container - > freeFullPos ( * this ) ; <nl> + container - > freeMArrayIter ( * this ) ; <nl> } <nl> setResetFlag ( false ) ; <nl> assert ( getContainer ( ) = = nullptr ) ; <nl> escalateCheck ( ) ; <nl> ArrayData * data = cowCheck ( ) ; <nl> - data - > newFullPos ( * this ) ; <nl> + data - > newMArrayIter ( * this ) ; <nl> return data ; <nl> } <nl> <nl> - / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - / / MArrayIter <nl> + / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> <nl> - MArrayIter : : MArrayIter ( RefData * ref ) { <nl> + MArrayIter : : MArrayIter ( RefData * ref ) <nl> + : m_pos ( 0 ) <nl> + , m_container ( nullptr ) <nl> + , m_next ( nullptr ) <nl> + { <nl> ref - > incRefCount ( ) ; <nl> setRef ( ref ) ; <nl> assert ( hasRef ( ) ) ; <nl> MArrayIter : : MArrayIter ( RefData * ref ) { <nl> auto const data = cowCheck ( ) ; <nl> if ( ! data ) return ; <nl> data - > reset ( ) ; <nl> - data - > newFullPos ( * this ) ; <nl> + data - > newMArrayIter ( * this ) ; <nl> setResetFlag ( true ) ; <nl> data - > next ( ) ; <nl> assert ( getContainer ( ) = = data ) ; <nl> } <nl> <nl> - MArrayIter : : MArrayIter ( ArrayData * data ) { <nl> - m_ref = nullptr ; <nl> + MArrayIter : : MArrayIter ( ArrayData * data ) <nl> + : m_ref ( nullptr ) <nl> + , m_pos ( 0 ) <nl> + , m_container ( nullptr ) <nl> + , m_next ( nullptr ) <nl> + { <nl> if ( ! data ) return ; <nl> assert ( ! data - > isStatic ( ) ) ; <nl> setAd ( data ) ; <nl> escalateCheck ( ) ; <nl> data = cowCheck ( ) ; <nl> data - > reset ( ) ; <nl> - data - > newFullPos ( * this ) ; <nl> + data - > newMArrayIter ( * this ) ; <nl> setResetFlag ( true ) ; <nl> data - > next ( ) ; <nl> assert ( getContainer ( ) = = data ) ; <nl> MArrayIter : : MArrayIter ( ArrayData * data ) { <nl> MArrayIter : : ~ MArrayIter ( ) { <nl> auto const container = getContainer ( ) ; <nl> if ( container ) { <nl> - container - > freeFullPos ( * this ) ; <nl> + container - > freeMArrayIter ( * this ) ; <nl> assert ( getContainer ( ) = = nullptr ) ; <nl> } <nl> if ( hasRef ( ) ) { <nl> mmm a / hphp / runtime / base / array - iterator . h <nl> ppp b / hphp / runtime / base / array - iterator . h <nl> <nl> # ifndef incl_HPHP_ARRAY_ITERATOR_H_ <nl> # define incl_HPHP_ARRAY_ITERATOR_H_ <nl> <nl> + # include " hphp / util / min - max - macros . h " <nl> # include " hphp / runtime / base / types . h " <nl> # include " hphp / runtime / base / smart - ptr . h " <nl> # include " hphp / runtime / base / complex - types . h " <nl> # include " hphp / runtime / base / hphp - array . h " <nl> - # include " hphp / util / min - max - macros . h " <nl> <nl> namespace HPHP { <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> class ArrayIter { <nl> <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> <nl> - / * * <nl> - * FullPos provides the necessary functionality for supporting <nl> - * " foreach by reference " ( also called " strong foreach " ) . Note that <nl> - * the runtime does not use FullPos directly , but instead uses a class <nl> - * derived from FullPos ( MArrayIter ) . ( This separation is <nl> - * historicalmmmthere used to be another subclass . ) <nl> + / * <nl> + * MArrayIter provides the necessary functionality for supporting <nl> + * " foreach by reference " ( also called " strong foreach " ) . <nl> * <nl> - * In the common case , a FullPos is bound to a variable ( m_var ) when it is <nl> - * initialized . m_var points to an inner cell which points to the array to <nl> - * iterate over . For certain use cases , a FullPos is instead bound directly to <nl> - * an array which m_data points to . <nl> + * In the common case , a MArrayIter is bound to a RefData when it is <nl> + * initialized . When iterating objects with foreach by reference , a <nl> + * MArrayIter may instead be bound directly to an array which m_data <nl> + * points to . ( This is because the array is created as a temporary . ) <nl> * <nl> - * Foreach by reference is a pain . Iteration needs to be robust in the face of <nl> - * two challenges : ( 1 ) the case where an element is unset during iteration , and <nl> - * ( 2 ) the case where user code modifies the inner cell to be a different array <nl> - * or a non - array value . In such cases , we should never crash and ideally when <nl> - * an element is unset we should be able to keep track of where we are in the <nl> - * array . <nl> + * Foreach by reference is a pain . Iteration needs to be robust in the <nl> + * face of two challenges : ( 1 ) the case where an element is unset <nl> + * during iteration , and ( 2 ) the case where user code modifies the <nl> + * inner cell to be a different array or a non - array value . In such <nl> + * cases , we should never crash and ideally when an element is unset <nl> + * we should be able to keep track of where we are in the array . <nl> * <nl> - * FullPos works by " registering " itself with the array being iterated over . <nl> - * The array maintains a linked list of the FullPos ' s actively iterating over <nl> - * it . When an element is unset , the FullPos ' s that were pointing to that <nl> - * element are moved back one position before the element is unset . Note that <nl> - * it is possible for an iterator to point to the position before the first <nl> - * element ( this is what the " reset " flag is for ) . This dance allows FullPos to <nl> - * keep track of where it is in the array even when elements are unset . <nl> + * MArrayIter works by " registering " itself with the array being <nl> + * iterated over . The array maintains a linked list of the <nl> + * MArrayIter ' s actively iterating over it . When an element is unset , <nl> + * the MArrayIter ' s that were pointing to that element are moved back <nl> + * one position before the element is unset . Note that it is possible <nl> + * for an iterator to point to the position before the first element <nl> + * ( this is what the " reset " flag is for ) . This dance allows <nl> + * MArrayIter to keep track of where it is in the array even when <nl> + * elements are unset . <nl> * <nl> - * FullPos has also has a m_container field to keep track of which array it has <nl> - * " registered " itself with . By comparing the array pointed to by m_var with <nl> - * the array pointed to by m_container , FullPos can detect if user code has <nl> - * modified the inner cell to be a different array or a non - array value . When <nl> - * this happens , the FullPos unregisters itself with the old array ( pointed to <nl> - * by m_container ) and registers itself with the new array ( pointed to <nl> - * by m_var - > m_data . parr ) and resumes iteration at the position pointed to by <nl> - * the new array ' s internal cursor ( ArrayData : : m_pos ) . If m_var points to a <nl> - * non - array value , iteration terminates . <nl> + * MArrayIter has also has a m_container field to keep track of which <nl> + * array it has " registered " itself with . By comparing the array <nl> + * pointed to by m_var with the array pointed to by m_container , <nl> + * MArrayIter can detect if user code has modified the inner cell to <nl> + * be a different array or a non - array value . When this happens , the <nl> + * MArrayIter unregisters itself with the old array ( pointed to by <nl> + * m_container ) and registers itself with the new array ( pointed to by <nl> + * m_var - > m_data . parr ) and resumes iteration at the position pointed <nl> + * to by the new array ' s internal cursor ( ArrayData : : m_pos ) . If m_var <nl> + * points to a non - array value , iteration terminates . <nl> * / <nl> - class FullPos { <nl> - protected : <nl> - FullPos ( ) : m_pos ( 0 ) , m_container ( NULL ) , m_next ( NULL ) { } <nl> + struct MArrayIter { <nl> + MArrayIter ( ) <nl> + : m_data ( nullptr ) <nl> + , m_pos ( 0 ) <nl> + , m_container ( nullptr ) <nl> + , m_next ( nullptr ) <nl> + { } <nl> + <nl> + explicit MArrayIter ( RefData * ref ) ; <nl> + explicit MArrayIter ( ArrayData * data ) ; <nl> + ~ MArrayIter ( ) ; <nl> + <nl> + MArrayIter ( const MArrayIter & ) = delete ; <nl> + MArrayIter & operator = ( const MArrayIter & ) = delete ; <nl> + <nl> + / * <nl> + * It is only safe to call key ( ) and val ( ) if all of the following <nl> + * conditions are met : <nl> + * 1 ) The calls to key ( ) and / or val ( ) are immediately preceded by <nl> + * a call to advance ( ) , prepare ( ) , or end ( ) . <nl> + * 2 ) The iterator points to a valid position in the array . <nl> + * / <nl> + Variant key ( ) { <nl> + ArrayData * data = getArray ( ) ; <nl> + assert ( data & & data = = getContainer ( ) ) ; <nl> + assert ( ! getResetFlag ( ) & & data - > validMArrayIter ( * this ) ) ; <nl> + return data - > getKey ( m_pos ) ; <nl> + } <nl> + <nl> + const Variant & val ( ) { <nl> + ArrayData * data = getArray ( ) ; <nl> + assert ( data & & data = = getContainer ( ) ) ; <nl> + assert ( ! data - > hasMultipleRefs ( ) | | data - > noCopyOnWrite ( ) ) ; <nl> + assert ( ! getResetFlag ( ) ) ; <nl> + assert ( data - > validMArrayIter ( * this ) ) ; <nl> + return data - > getValueRef ( m_pos ) ; <nl> + } <nl> <nl> - public : <nl> void release ( ) { delete this ; } <nl> <nl> / / Returns true if the iterator points past the last element ( or if <nl> class FullPos { <nl> void setContainer ( ArrayData * arr ) { <nl> m_container = arr ; <nl> } <nl> - FullPos * getNext ( ) const { <nl> - return ( FullPos * ) ( m_resetBits & ~ 1 ) ; <nl> + MArrayIter * getNext ( ) const { <nl> + return ( MArrayIter * ) ( m_resetBits & ~ 1 ) ; <nl> } <nl> - void setNext ( FullPos * fp ) { <nl> + void setNext ( MArrayIter * fp ) { <nl> assert ( ( intptr_t ( fp ) & 1 ) = = 0 ) ; <nl> m_resetBits = intptr_t ( fp ) | intptr_t ( getResetFlag ( ) ) ; <nl> } <nl> class FullPos { <nl> m_resetBits = intptr_t ( getNext ( ) ) | intptr_t ( reset ) ; <nl> } <nl> <nl> - protected : <nl> + private : <nl> ArrayData * getData ( ) const { <nl> assert ( hasRef ( ) ) ; <nl> return m_ref - > tv ( ) - > m_type = = KindOfArray <nl> ? m_ref - > tv ( ) - > m_data . parr <nl> : nullptr ; <nl> } <nl> + <nl> ArrayData * cowCheck ( ) ; <nl> void escalateCheck ( ) ; <nl> ArrayData * reregister ( ) ; <nl> <nl> + private : <nl> / * <nl> * m_ref / m_data are used to keep track of the array that we ' re <nl> * supposed to be iterating over . The low bit is used to indicate <nl> class FullPos { <nl> * <nl> * Mutable array iteration usually iterates over m_refmmmthe m_data <nl> * case here occurs is when we ' ve converted an object to an array <nl> - * before iterating it ( and this FullPos object actually owns a <nl> + * before iterating it ( and this MArrayIter object actually owns a <nl> * temporary array ) . <nl> * / <nl> union { <nl> RefData * m_ref ; <nl> ArrayData * m_data ; <nl> } ; <nl> - public : <nl> + public : <nl> / / m_pos is an opaque value used by the array implementation to track the <nl> / / current position in the array . <nl> ssize_t m_pos ; <nl> - private : <nl> + private : <nl> / / m_container keeps track of which array we ' re " registered " with . Normally <nl> / / getArray ( ) and m_container refer to the same array . However , the two may <nl> / / differ in cases where user code has modified the inner cell to be a <nl> / / different array or non - array value . <nl> ArrayData * m_container ; <nl> - / / m_next is used so that multiple FullPos ' s iterating over the same array <nl> + / / m_next is used so that multiple MArrayIter ' s iterating over the same array <nl> / / can be chained together into a singly linked list . The low bit of m_next <nl> / / is used to track the state of the " reset " flag . <nl> union { <nl> - FullPos * m_next ; <nl> + MArrayIter * m_next ; <nl> intptr_t m_resetBits ; <nl> } ; <nl> } ; <nl> <nl> - / * * <nl> - * Range which visits each entry in a list of FullPos . Removing the <nl> + / * <nl> + * Range which visits each entry in a list of MArrayIter . Removing the <nl> * front element will crash but removing an already - visited element <nl> * or future element will work . <nl> * / <nl> - class FullPosRange { <nl> - public : <nl> - explicit FullPosRange ( FullPos * list ) : m_fpos ( list ) { } <nl> - FullPosRange ( const FullPosRange & other ) : m_fpos ( other . m_fpos ) { } <nl> + struct MArrayIterRange { <nl> + explicit MArrayIterRange ( MArrayIter * list ) : m_fpos ( list ) { } <nl> + MArrayIterRange ( const MArrayIterRange & other ) : m_fpos ( other . m_fpos ) { } <nl> bool empty ( ) const { return m_fpos = = 0 ; } <nl> - FullPos * front ( ) const { assert ( ! empty ( ) ) ; return m_fpos ; } <nl> + MArrayIter * front ( ) const { assert ( ! empty ( ) ) ; return m_fpos ; } <nl> void popFront ( ) { assert ( ! empty ( ) ) ; m_fpos = m_fpos - > getNext ( ) ; } <nl> - private : <nl> - FullPos * m_fpos ; <nl> - } ; <nl> - <nl> - / * * <nl> - * MArrayIter is used by the VM to handle the MIter * instructions <nl> - * / <nl> - class MArrayIter : public FullPos { <nl> - public : <nl> - MArrayIter ( ) { m_data = NULL ; } <nl> - explicit MArrayIter ( RefData * ref ) ; <nl> - explicit MArrayIter ( ArrayData * data ) ; <nl> - ~ MArrayIter ( ) ; <nl> - <nl> - / * * <nl> - * It is only safe to call key ( ) and val ( ) if all of the following <nl> - * conditions are met : <nl> - * 1 ) The calls to key ( ) and / or val ( ) are immediately preceded by <nl> - * a call to advance ( ) , prepare ( ) , or end ( ) . <nl> - * 2 ) The iterator points to a valid position in the array . <nl> - * / <nl> - Variant key ( ) { <nl> - ArrayData * data = getArray ( ) ; <nl> - assert ( data & & data = = getContainer ( ) ) ; <nl> - assert ( ! getResetFlag ( ) & & data - > validFullPos ( * this ) ) ; <nl> - return data - > getKey ( m_pos ) ; <nl> - } <nl> - <nl> - const Variant & val ( ) { <nl> - ArrayData * data = getArray ( ) ; <nl> - assert ( data & & data = = getContainer ( ) ) ; <nl> - assert ( ! data - > hasMultipleRefs ( ) | | data - > noCopyOnWrite ( ) ) ; <nl> - assert ( ! getResetFlag ( ) ) ; <nl> - assert ( data - > validFullPos ( * this ) ) ; <nl> - return data - > getValueRef ( m_pos ) ; <nl> - } <nl> - <nl> - friend struct Iter ; <nl> + private : <nl> + MArrayIter * m_fpos ; <nl> } ; <nl> <nl> class CufIter { <nl> mmm a / hphp / runtime / base / hphp - array - defs . h <nl> ppp b / hphp / runtime / base / hphp - array - defs . h <nl> inline size_t HphpArray : : computeDataSize ( uint32_t tableMask ) { <nl> } <nl> <nl> inline void ArrayData : : moveStrongIterators ( ArrayData * dest , ArrayData * src ) { <nl> - for ( FullPosRange r ( src - > strongIterators ( ) ) ; ! r . empty ( ) ; r . popFront ( ) ) { <nl> + for ( MArrayIterRange r ( src - > strongIterators ( ) ) ; ! r . empty ( ) ; r . popFront ( ) ) { <nl> r . front ( ) - > setContainer ( dest ) ; <nl> } <nl> dest - > m_strongIterators = src - > m_strongIterators ; <nl> mmm a / hphp / runtime / base / hphp - array . cpp <nl> ppp b / hphp / runtime / base / hphp - array . cpp <nl> HphpArray * HphpArray : : packedToMixed ( ) { <nl> * Zombie state : <nl> * <nl> * m_used = = UINT32_MAX <nl> - * no FullPos ' s are pointing to this array <nl> + * no MArrayIter ' s are pointing to this array <nl> * <nl> * Non - zombie : <nl> * <nl> void HphpArray : : compact ( bool renumber / * = false * / ) { <nl> mPos . key = nullptr ; <nl> } <nl> TinyVector < ElmKey , 3 > siKeys ; <nl> - for ( FullPosRange r ( strongIterators ( ) ) ; ! r . empty ( ) ; r . popFront ( ) ) { <nl> + for ( MArrayIterRange r ( strongIterators ( ) ) ; ! r . empty ( ) ; r . popFront ( ) ) { <nl> auto ei = r . front ( ) - > m_pos ; <nl> if ( ei ! = invalid_index ) { <nl> auto & e = data ( ) [ ei ] ; <nl> void HphpArray : : compact ( bool renumber / * = false * / ) { <nl> } <nl> / / Update strong iterators , now that compaction is complete . <nl> int key = 0 ; <nl> - for ( FullPosRange r ( strongIterators ( ) ) ; ! r . empty ( ) ; r . popFront ( ) ) { <nl> - FullPos * fp = r . front ( ) ; <nl> + for ( MArrayIterRange r ( strongIterators ( ) ) ; ! r . empty ( ) ; r . popFront ( ) ) { <nl> + MArrayIter * fp = r . front ( ) ; <nl> if ( fp - > m_pos ! = invalid_index ) { <nl> auto & k = siKeys [ key ] ; <nl> key + + ; <nl> HphpArray : : ZAppend ( ArrayData * ad , RefData * v ) { <nl> / / Delete . <nl> <nl> NEVER_INLINE <nl> - void HphpArray : : adjustFullPos ( ssize_t pos ) { <nl> + void HphpArray : : adjustMArrayIter ( ssize_t pos ) { <nl> ssize_t eIPrev = Tombstone ; <nl> - for ( FullPosRange r ( strongIterators ( ) ) ; ! r . empty ( ) ; r . popFront ( ) ) { <nl> - FullPos * fp = r . front ( ) ; <nl> + for ( MArrayIterRange r ( strongIterators ( ) ) ; ! r . empty ( ) ; r . popFront ( ) ) { <nl> + MArrayIter * fp = r . front ( ) ; <nl> if ( fp - > m_pos = = pos ) { <nl> if ( eIPrev = = Tombstone ) { <nl> / / eIPrev will actually be used , so properly initialize it with the <nl> void HphpArray : : erase ( ssize_t pos ) { <nl> assert ( validPos ( pos ) ) ; <nl> <nl> / / move strong iterators to the previous element <nl> - if ( strongIterators ( ) ) adjustFullPos ( pos ) ; <nl> + if ( strongIterators ( ) ) adjustMArrayIter ( pos ) ; <nl> <nl> / / If the internal pointer points to this element , advance it . <nl> Elm * elms = data ( ) ; <nl> ArrayData * HphpArray : : PopPacked ( ArrayData * ad , Variant & value ) { <nl> auto i = a - > m_size - 1 ; <nl> auto & tv = a - > data ( ) [ i ] . data ; <nl> value = tvAsCVarRef ( & tv ) ; <nl> - if ( a - > strongIterators ( ) ) a - > adjustFullPos ( i ) ; <nl> + if ( a - > strongIterators ( ) ) a - > adjustMArrayIter ( i ) ; <nl> auto oldType = tv . m_type ; <nl> auto oldDatum = tv . m_data . num ; <nl> a - > m_size = a - > m_used = i ; <nl> void HphpArray : : OnSetEvalScalar ( ArrayData * ad ) { <nl> } <nl> } <nl> <nl> - bool HphpArray : : ValidFullPos ( const ArrayData * ad , const FullPos & fp ) { <nl> + bool HphpArray : : ValidMArrayIter ( const ArrayData * ad , const MArrayIter & fp ) { <nl> assert ( fp . getContainer ( ) = = asHphpArray ( ad ) ) ; <nl> if ( fp . getResetFlag ( ) ) return false ; <nl> return fp . m_pos ! = invalid_index ; <nl> } <nl> <nl> - bool HphpArray : : AdvanceFullPos ( ArrayData * ad , FullPos & fp ) { <nl> + bool HphpArray : : AdvanceMArrayIter ( ArrayData * ad , MArrayIter & fp ) { <nl> auto a = asHphpArray ( ad ) ; <nl> Elm * elms = a - > data ( ) ; <nl> if ( fp . getResetFlag ( ) ) { <nl> mmm a / hphp / runtime / base / hphp - array . h <nl> ppp b / hphp / runtime / base / hphp - array . h <nl> class HphpArray : public ArrayData { <nl> static void ReleaseUncounted ( ArrayData * ) ; <nl> <nl> / / overrides ArrayData <nl> - static bool ValidFullPos ( const ArrayData * , const FullPos & fp ) ; <nl> - static bool AdvanceFullPos ( ArrayData * , FullPos & fp ) ; <nl> + static bool ValidMArrayIter ( const ArrayData * , const MArrayIter & fp ) ; <nl> + static bool AdvanceMArrayIter ( ArrayData * , MArrayIter & fp ) ; <nl> <nl> HphpArray * copyImpl ( ) const ; <nl> HphpArray * copyPacked ( ) const ; <nl> class HphpArray : public ArrayData { <nl> template < class K > ArrayData * zSetImpl ( K k , RefData * data ) ; <nl> ArrayData * zAppendImpl ( RefData * data ) ; <nl> <nl> - void adjustFullPos ( ssize_t pos ) ; <nl> + void adjustMArrayIter ( ssize_t pos ) ; <nl> void erase ( ssize_t pos ) ; <nl> <nl> HphpArray * copyImpl ( HphpArray * target ) const ; <nl> mmm a / hphp / runtime / base / proxy - array . cpp <nl> ppp b / hphp / runtime / base / proxy - array . cpp <nl> ssize_t ProxyArray : : IterRewind ( const ArrayData * ad , ssize_t prev ) { <nl> } <nl> <nl> bool <nl> - ProxyArray : : ValidFullPos ( const ArrayData * ad , const FullPos & fp ) { <nl> - return innerArr ( ad ) - > validFullPos ( fp ) ; <nl> + ProxyArray : : ValidMArrayIter ( const ArrayData * ad , const MArrayIter & fp ) { <nl> + return innerArr ( ad ) - > validMArrayIter ( fp ) ; <nl> } <nl> <nl> - bool ProxyArray : : AdvanceFullPos ( ArrayData * ad , FullPos & fp ) { <nl> - return innerArr ( ad ) - > advanceFullPos ( fp ) ; <nl> + bool ProxyArray : : AdvanceMArrayIter ( ArrayData * ad , MArrayIter & fp ) { <nl> + return innerArr ( ad ) - > advanceMArrayIter ( fp ) ; <nl> } <nl> <nl> ArrayData * ProxyArray : : EscalateForSort ( ArrayData * ad ) { <nl> mmm a / hphp / runtime / base / proxy - array . h <nl> ppp b / hphp / runtime / base / proxy - array . h <nl> struct ProxyArray : public ArrayData { <nl> static ssize_t IterAdvance ( const ArrayData * , ssize_t prev ) ; <nl> static ssize_t IterRewind ( const ArrayData * , ssize_t prev ) ; <nl> <nl> - static bool ValidFullPos ( const ArrayData * , const FullPos & fp ) ; <nl> - static bool AdvanceFullPos ( ArrayData * , FullPos & ) ; <nl> + static bool ValidMArrayIter ( const ArrayData * , const MArrayIter & fp ) ; <nl> + static bool AdvanceMArrayIter ( ArrayData * , MArrayIter & ) ; <nl> static bool IsVectorData ( const ArrayData * ) ; <nl> static APCHandle * GetAPCHandle ( const ArrayData * ad ) ; <nl> <nl> mmm a / hphp / runtime / base / types . h <nl> ppp b / hphp / runtime / base / types . h <nl> class StringData ; <nl> class ArrayData ; <nl> class ObjectData ; <nl> class ResourceData ; <nl> - class FullPos ; <nl> + class MArrayIter ; <nl> <nl> class VariableSerializer ; <nl> class VariableUnserializer ; <nl> mmm a / hphp / runtime / vm / name - value - table - wrapper . cpp <nl> ppp b / hphp / runtime / vm / name - value - table - wrapper . cpp <nl> ssize_t NameValueTableWrapper : : IterRewind ( const ArrayData * ad , ssize_t prev ) { <nl> } <nl> <nl> bool <nl> - NameValueTableWrapper : : ValidFullPos ( const ArrayData * ad , const FullPos & fp ) { <nl> + NameValueTableWrapper : : ValidMArrayIter ( const ArrayData * ad , <nl> + const MArrayIter & fp ) { <nl> assert ( fp . getContainer ( ) = = ad ) ; <nl> auto a = asNVTW ( ad ) ; <nl> if ( fp . getResetFlag ( ) ) return false ; <nl> NameValueTableWrapper : : ValidFullPos ( const ArrayData * ad , const FullPos & fp ) { <nl> return iter . valid ( ) ; <nl> } <nl> <nl> - bool NameValueTableWrapper : : AdvanceFullPos ( ArrayData * ad , FullPos & fp ) { <nl> + bool NameValueTableWrapper : : AdvanceMArrayIter ( ArrayData * ad , MArrayIter & fp ) { <nl> auto a = asNVTW ( ad ) ; <nl> bool reset = fp . getResetFlag ( ) ; <nl> NameValueTable : : Iterator iter = reset ? <nl> mmm a / hphp / runtime / vm / name - value - table - wrapper . h <nl> ppp b / hphp / runtime / vm / name - value - table - wrapper . h <nl> struct NameValueTableWrapper : public ArrayData { <nl> static ssize_t IterAdvance ( const ArrayData * , ssize_t prev ) ; <nl> static ssize_t IterRewind ( const ArrayData * , ssize_t prev ) ; <nl> <nl> - static bool ValidFullPos ( const ArrayData * , const FullPos & fp ) ; <nl> - static bool AdvanceFullPos ( ArrayData * , FullPos & ) ; <nl> + static bool ValidMArrayIter ( const ArrayData * , const MArrayIter & fp ) ; <nl> + static bool AdvanceMArrayIter ( ArrayData * , MArrayIter & ) ; <nl> static bool IsVectorData ( const ArrayData * ) ; <nl> <nl> static ArrayData * EscalateForSort ( ArrayData * ) ; <nl>
Combine MArrayIter and FullPos into one class
facebook/hhvm
e69a50a79c58db58523d70ae2bb0e29522cad3ae
2014-03-20T05:31:30Z
mmm a / tensorflow / tools / ci_build / ci_parameterized_build . sh <nl> ppp b / tensorflow / tools / ci_build / ci_parameterized_build . sh <nl> else <nl> EXTRA_ARGS = " $ { TF_BUILD_APPEND_ARGUMENTS } - - test_tag_filters = - benchmark - test " <nl> fi <nl> <nl> + # For any " tool " dependencies in genrules , Bazel will build them for host <nl> + # instead of the target configuration . We can save some build time by setting <nl> + # this flag , and it only affects a few tests . <nl> + EXTRA_ARGS = " $ { EXTRA_ARGS } - - distinct_host_configuration = false " <nl> + <nl> # Process PIP install - test option <nl> if [ [ $ { TF_BUILD_IS_PIP } = = " no_pip " ] ] | | <nl> [ [ $ { TF_BUILD_IS_PIP } = = " both " ] ] ; then <nl>
Set - - distinct_host_configuration = false to save CI build times .
tensorflow/tensorflow
aa22f93fc85467f3d8aa388e8ee6fdd932ee74cb
2017-01-18T20:28:50Z
new file mode 100644 <nl> index 0000000000 . . af37958012 <nl> mmm / dev / null <nl> ppp b / code / bit - manipulation / count_set_bits . py <nl> <nl> + def count_set_bit ( number ) : <nl> + count = 0 <nl> + <nl> + while number : <nl> + count = count + ( number & 1 ) <nl> + number = number > > 1 <nl> + <nl> + return count <nl> + <nl> + print count_set_bit ( 9 ) <nl> \ No newline at end of file <nl>
count set bits in python
OpenGenus/cosmos
94c1f32ab1796a21b67a9b3aa6af6d57943a5ba0
2017-10-05T18:08:32Z
mmm a / benchmark / single - source / Exclusivity . swift <nl> ppp b / benchmark / single - source / Exclusivity . swift <nl> public func run_accessGlobal ( _ N : Int ) { <nl> / / Hopefully the optimizer will not see this as " final " and optimize away the <nl> / / materializeForSet . <nl> public class C { <nl> - var counter = 0 <nl> + public var counter = 0 <nl> <nl> func inc ( ) { <nl> counter + = 1 <nl>
Merge pull request from atrick / exclusivity - bench
apple/swift
fd438d572785b665630f25fb405433a6a31df04c
2018-06-25T19:10:00Z
mmm a / aten / src / ATen / native / cpu / FillKernel . cpp <nl> ppp b / aten / src / ATen / native / cpu / FillKernel . cpp <nl> static void fill_non_native_type ( TensorIterator & iter , Scalar value_scalar ) { <nl> using H = typename std : : make_signed < decltype ( value ) > : : type ; / / Signed type has more acceleration <nl> / / Reserve the representation of value . static_cast < H > ( value ) is implementation defined . <nl> H val = * reinterpret_cast < H * > ( std : : addressof ( value ) ) ; <nl> - cpu_kernel_vec ( <nl> + cpu_kernel_vec < / * check_dynamic_cast = * / false > ( <nl> iter , <nl> [ val ] ( ) - > H { return val ; } , <nl> [ val ] ( ) { return Vec256 < H > ( val ) ; } ) ; <nl> mmm a / aten / src / ATen / native / cpu / Loops . h <nl> ppp b / aten / src / ATen / native / cpu / Loops . h <nl> <nl> # include < ATen / detail / FunctionTraits . h > <nl> # include < ATen / native / cpu / IsContiguous . h > <nl> # include < ATen / native / TensorIterator . h > <nl> + # include < ATen / native / TensorIteratorDynamicCasting . h > <nl> # include < ATen / cpu / vec256 / vec256 . h > <nl> <nl> # ifndef _MSC_VER <nl> void cpu_kernel ( TensorIterator & iter , func_t & & op ) { <nl> / / this could be extended to work with void return types <nl> TORCH_INTERNAL_ASSERT ( iter . ninputs ( ) = = traits : : arity ) ; <nl> TORCH_INTERNAL_ASSERT ( iter . noutputs ( ) = = 1 ) ; <nl> + / / dynamic casting not currently supported on CPU <nl> + TORCH_INTERNAL_ASSERT ( ! needs_dynamic_casting < func_t > : : check ( iter ) ) ; <nl> <nl> iter . for_each ( [ & ] ( char * * data , const int64_t * strides , int64_t n ) { <nl> if ( is_contiguous < traits > ( strides ) ) { <nl> void cpu_kernel ( TensorIterator & iter , func_t & & op ) { <nl> iter . cast_outputs ( ) ; <nl> } <nl> <nl> - template < typename func_t , typename vec_func_t > <nl> + template < bool check_dynamic_cast = true , typename func_t , typename vec_func_t > <nl> void cpu_kernel_vec ( TensorIterator & iter , func_t & & op , vec_func_t & & vop ) { <nl> using traits = function_traits < func_t > ; <nl> / / this could be extended to work with void return types <nl> TORCH_INTERNAL_ASSERT ( iter . ninputs ( ) = = traits : : arity ) ; <nl> TORCH_INTERNAL_ASSERT ( iter . noutputs ( ) = = 1 ) ; <nl> + / / dynamic casting not currently supported on CPU , but some kernels ( like Fill ) <nl> + / / explicitly dynamic_cast , so we give the opt - out of checking . <nl> + c10 : : guts : : if_constexpr < check_dynamic_cast > ( [ & ] { <nl> + TORCH_INTERNAL_ASSERT ( ! needs_dynamic_casting < func_t > : : check ( iter ) ) ; <nl> + } ) ; <nl> <nl> iter . for_each ( [ & ] ( char * * data , const int64_t * strides , int64_t n ) { <nl> if ( is_contiguous < traits > ( strides ) ) { <nl> void cpu_serial_kernel ( TensorIterator & iter , func_t & & op , const Range & range ) { <nl> constexpr bool result_void = std : : is_void < typename traits : : result_type > : : value ; <nl> TORCH_INTERNAL_ASSERT ( iter . ninputs ( ) = = traits : : arity & & <nl> ( ( result_void & & iter . noutputs ( ) = = 0 ) | | ( ! result_void & & iter . noutputs ( ) = = 1 ) ) ) ; <nl> + / / dynamic casting not currently supported on CPU <nl> + TORCH_INTERNAL_ASSERT ( ! needs_dynamic_casting < func_t > : : check ( iter ) ) ; <nl> <nl> iter . serial_for_each ( [ & ] ( char * * data , const int64_t * strides , int64_t n ) { <nl> if ( is_contiguous < traits > ( strides ) ) { <nl> void cpu_serial_kernel_vec ( TensorIterator & iter , func_t & & op , vec_func_t & & vop , <nl> / / this could be extended to work with void return types <nl> TORCH_INTERNAL_ASSERT ( iter . ninputs ( ) = = traits : : arity ) ; <nl> TORCH_INTERNAL_ASSERT ( iter . noutputs ( ) = = 1 ) ; <nl> + / / dynamic casting not currently supported on CPU <nl> + TORCH_INTERNAL_ASSERT ( ! needs_dynamic_casting < func_t > : : check ( iter ) ) ; <nl> <nl> iter . serial_for_each ( [ & ] ( char * * data , const int64_t * strides , int64_t n ) { <nl> if ( is_contiguous < traits > ( strides ) ) { <nl>
Add dynamic_cast asserts to CPU Loops . ( )
pytorch/pytorch
aa5afbdb927be294e61f34436aeb42983c0e35e8
2020-06-01T14:23:51Z
mmm a / folly / Conv . cpp <nl> ppp b / folly / Conv . cpp <nl> static_assert ( sizeof ( unsigned long ) > = 4 , <nl> " please update . " ) ; <nl> template < > const char * const MaxString < unsigned long long > : : value = <nl> " 18446744073709551615 " ; <nl> + template < > const char * const MaxString < unsigned __int128 > : : value = <nl> + " 340282366920938463463374607431768211455 " ; <nl> static_assert ( sizeof ( unsigned long long ) > = 8 , <nl> " Wrong value for MaxString < unsigned long long > : : value " <nl> " , please update . " ) ; <nl>
[ Conv ] MaxString specialization for __int128
facebook/folly
5ec53c6ffeb49e5dedb929562822aaf78f835de5
2012-12-16T22:41:56Z
mmm a / tensorflow / g3doc / api_docs / python / functions_and_classes / shard5 / tf . train . Saver . md <nl> ppp b / tensorflow / g3doc / api_docs / python / functions_and_classes / shard5 / tf . train . Saver . md <nl> protocol buffer file in the call to ` save ( ) ` . <nl> <nl> - - - <nl> <nl> - # # # # ` tf . train . Saver . __init__ ( var_list = None , reshape = False , sharded = False , max_to_keep = 5 , keep_checkpoint_every_n_hours = 10000 . 0 , name = None , restore_sequentially = False , saver_def = None , builder = None , defer_build = False ) ` { # Saver . __init__ } <nl> + # # # # ` tf . train . Saver . __init__ ( var_list = None , reshape = False , sharded = False , max_to_keep = 5 , keep_checkpoint_every_n_hours = 10000 . 0 , name = None , restore_sequentially = False , saver_def = None , builder = None , defer_build = False , allow_empty = False ) ` { # Saver . __init__ } <nl> <nl> Creates a ` Saver ` . <nl> <nl> checkpoints per device . <nl> * < b > ` defer_build ` < / b > : If ` True ` , defer adding the save and restore ops to the <nl> ` build ( ) ` call . In that case ` build ( ) ` should be called before <nl> finalizing the graph or using the saver . <nl> + * < b > ` allow_empty ` < / b > : If ` False ` ( default ) raise an error if there are no <nl> + variables in the graph . Otherwise , construct the saver anyway and make <nl> + it a no - op . <nl> <nl> # # # # # Raises : <nl> <nl> path can be passed directly to a call to ` restore ( ) ` . <nl> A string : path at which the variables were saved . If the saver is <nl> sharded , this string ends with : ' - ? ? ? ? ? - of - nnnnn ' where ' nnnnn ' <nl> is the number of shards created . <nl> + If the saver is empty , returns None . <nl> <nl> # # # # # Raises : <nl> <nl> mmm a / tensorflow / g3doc / api_docs / python / state_ops . md <nl> ppp b / tensorflow / g3doc / api_docs / python / state_ops . md <nl> protocol buffer file in the call to ` save ( ) ` . <nl> <nl> - - - <nl> <nl> - # # # # ` tf . train . Saver . __init__ ( var_list = None , reshape = False , sharded = False , max_to_keep = 5 , keep_checkpoint_every_n_hours = 10000 . 0 , name = None , restore_sequentially = False , saver_def = None , builder = None , defer_build = False ) ` { # Saver . __init__ } <nl> + # # # # ` tf . train . Saver . __init__ ( var_list = None , reshape = False , sharded = False , max_to_keep = 5 , keep_checkpoint_every_n_hours = 10000 . 0 , name = None , restore_sequentially = False , saver_def = None , builder = None , defer_build = False , allow_empty = False ) ` { # Saver . __init__ } <nl> <nl> Creates a ` Saver ` . <nl> <nl> checkpoints per device . <nl> * < b > ` defer_build ` < / b > : If ` True ` , defer adding the save and restore ops to the <nl> ` build ( ) ` call . In that case ` build ( ) ` should be called before <nl> finalizing the graph or using the saver . <nl> + * < b > ` allow_empty ` < / b > : If ` False ` ( default ) raise an error if there are no <nl> + variables in the graph . Otherwise , construct the saver anyway and make <nl> + it a no - op . <nl> <nl> # # # # # Raises : <nl> <nl> path can be passed directly to a call to ` restore ( ) ` . <nl> A string : path at which the variables were saved . If the saver is <nl> sharded , this string ends with : ' - ? ? ? ? ? - of - nnnnn ' where ' nnnnn ' <nl> is the number of shards created . <nl> + If the saver is empty , returns None . <nl> <nl> # # # # # Raises : <nl> <nl>
Update generated Python Op docs .
tensorflow/tensorflow
dce14921a25dc784f96d724d54edbcba12dbb4ad
2016-08-25T17:17:05Z
mmm a / src / input_common / sdl / sdl_impl . cpp <nl> ppp b / src / input_common / sdl / sdl_impl . cpp <nl> SDLState : : SDLState ( ) { <nl> if ( start_thread ) { <nl> poll_thread = std : : thread ( [ & ] { <nl> using namespace std : : chrono_literals ; <nl> - SDL_Event event ; <nl> while ( initialized ) { <nl> SDL_PumpEvents ( ) ; <nl> std : : this_thread : : sleep_for ( std : : chrono : : duration ( 10ms ) ) ; <nl>
input_common / sdl_impl : Remove unused variable in SDLState constructor
yuzu-emu/yuzu
834d3fe336b066776c53b43b5682699622911acc
2019-03-17T08:02:48Z
mmm a / tensorflow / compiler / xla / service / buffer_assignment . cc <nl> ppp b / tensorflow / compiler / xla / service / buffer_assignment . cc <nl> void BufferAssigner : : AssignBuffersFromHeapSimulator ( <nl> const HeapSimulator : : Chunk & chunk = buffer_chunk . second ; <nl> assignment - > AddAssignment ( allocation , value , chunk . offset , chunk . size ) ; <nl> } <nl> - / / Compute peak_buffers only when the multiheap mode is off . Simply return <nl> - / / an empty vector in the multiheap mode . <nl> allocation - > peak_buffers_ = <nl> ComputePeakMemoryLogicalBuffers ( * allocation , result . debug_trace ) ; <nl> <nl>
[ XLA / GPU ] Minor cleanup .
tensorflow/tensorflow
e187a800956e263f33dfcce05af586b715f597b0
2020-10-13T19:37:44Z
mmm a / CHANGELOG . md <nl> ppp b / CHANGELOG . md <nl> <nl> + # # ClickHouse release 19 . 5 . 1 . 246 , 2019 - 04 - 15 <nl> + <nl> + # # # New Features <nl> + <nl> + * Hyperscan string search matching was added . [ # 4780 ] ( https : / / github . com / yandex / ClickHouse / pull / 4780 ) ( [ Danila Kutenin ] ( https : / / github . com / danlark1 ) ) <nl> + * Implement the predefined expression filter per row for tables . [ # 4792 ] ( https : / / github . com / yandex / ClickHouse / pull / 4792 ) ( [ Ivan ] ( https : / / github . com / abyss7 ) ) <nl> + * Added hyperscan fuzzy search . [ # 4841 ] ( https : / / github . com / yandex / ClickHouse / pull / 4841 ) ( [ Danila Kutenin ] ( https : / / github . com / danlark1 ) ) <nl> + * A new type of data skipping indices based on bloom filters ( can be used for ` equal ` , ` in ` and ` like ` functions ) . [ # 4499 ] ( https : / / github . com / yandex / ClickHouse / pull / 4499 ) ( [ Nikita Vasilev ] ( https : / / github . com / nikvas0 ) ) <nl> + * Added ` ASOF JOIN ` which allows to run queries that join to the most recent value known . [ # 4774 ] ( https : / / github . com / yandex / ClickHouse / pull / 4774 ) ( [ Martijn Bakker ] ( https : / / github . com / Gladdy ) ) <nl> + * Rewrite multiple ` COMMA JOINS ` to ` CROSS JOINS ` . Then rewrite them to INNER JOINs if possible . [ # 4661 ] ( https : / / github . com / yandex / ClickHouse / pull / 4661 ) ( [ Artem Zuikov ] ( https : / / github . com / 4ertus2 ) ) <nl> + <nl> + # # # Improvement <nl> + <nl> + * ` topK ` and ` topKWeighted ` now supports custom ` loadFactor ` ( fixes # 4252 ) . [ # 4634 ] ( https : / / github . com / yandex / ClickHouse / pull / 4634 ) ( [ Kirill Danshin ] ( https : / / github . com / kirillDanshin ) ) <nl> + * Allow to use ` parallel_replicas_count > 1 ` even for tables without sampling ( the setting is simply ignored for them ) . In previous versions it was lead to exception . [ # 4637 ] ( https : / / github . com / yandex / ClickHouse / pull / 4637 ) ( [ Alexey Elymanov ] ( https : / / github . com / digitalist ) ) <nl> + * Support for ` CREATE OR REPLACE VIEW ` . Allow to create a view or set a new definition in a single statement . [ # 4654 ] ( https : / / github . com / yandex / ClickHouse / pull / 4654 ) ( [ Boris Granveaud ] ( https : / / github . com / bgranvea ) ) <nl> + * ` Buffer ` table engine now supports ` PREWHERE ` . [ # 4671 ] ( https : / / github . com / yandex / ClickHouse / pull / 4671 ) ( [ Yangkuan Liu ] ( https : / / github . com / LiuYangkuan ) ) <nl> + * Add ability to start replicated table without metadata in zookeeper in ` readonly ` mode . [ # 4691 ] ( https : / / github . com / yandex / ClickHouse / pull / 4691 ) ( [ alesapin ] ( https : / / github . com / alesapin ) ) <nl> + * Fixed flicker of progress bar in clickhouse - client . The issue was most noticeable when using ` FORMAT Null ` with streaming queries . [ # 4811 ] ( https : / / github . com / yandex / ClickHouse / pull / 4811 ) ( [ alexey - milovidov ] ( https : / / github . com / alexey - milovidov ) ) <nl> + * Allow to disable functions with ` hyperscan ` library on per user basis to limit potentially excessive and uncontrolled resource usage . [ # 4816 ] ( https : / / github . com / yandex / ClickHouse / pull / 4816 ) ( [ alexey - milovidov ] ( https : / / github . com / alexey - milovidov ) ) <nl> + * Print version number in all errors [ # 4824 ] ( https : / / github . com / yandex / ClickHouse / pull / 4824 ) ( [ proller ] ( https : / / github . com / proller ) ) <nl> + * Hyperscan API requires string sizes to fit in unsigned int . Throw an exception if not . Added restriction to the multiSearch functions . [ # 4834 ] ( https : / / github . com / yandex / ClickHouse / pull / 4834 ) ( [ Danila Kutenin ] ( https : / / github . com / danlark1 ) ) <nl> + * Adapt the ASOF join strictness to support multiple column types . [ # 4863 ] ( https : / / github . com / yandex / ClickHouse / pull / 4863 ) ( [ Martijn Bakker ] ( https : / / github . com / Gladdy ) ) <nl> + * Improved usage of scratch space and error handling Hyperscan . [ # 4866 ] ( https : / / github . com / yandex / ClickHouse / pull / 4866 ) ( [ Danila Kutenin ] ( https : / / github . com / danlark1 ) ) <nl> + * Fill ` system . graphite_detentions ` from a table config of ` * GraphiteMergeTree ` engine tables . [ # 4584 ] ( https : / / github . com / yandex / ClickHouse / pull / 4584 ) ( [ Mikhail f . Shiryaev ] ( https : / / github . com / Felixoid ) ) <nl> + * Rename ` trigramDistance ` function to ` ngramDistance ` and add more functions with ` CaseInsensitive ` and ` UTF ` . [ # 4602 ] ( https : / / github . com / yandex / ClickHouse / pull / 4602 ) ( [ Danila Kutenin ] ( https : / / github . com / danlark1 ) ) <nl> + * Improved data skipping indices calculation . [ # 4640 ] ( https : / / github . com / yandex / ClickHouse / pull / 4640 ) ( [ Nikita Vasilev ] ( https : / / github . com / nikvas0 ) <nl> + <nl> + # # # Bug Fix <nl> + <nl> + * Avoid ` std : : terminate ` in case of memory allocation failure . Now ` std : : bad_alloc ` exception is thrown as expected . [ # 4665 ] ( https : / / github . com / yandex / ClickHouse / pull / 4665 ) ( [ alexey - milovidov ] ( https : / / github . com / alexey - milovidov ) ) <nl> + * Fixes capnproto reading from buffer . Sometimes files wasn ' t loaded successfully by HTTP . [ # 4674 ] ( https : / / github . com / yandex / ClickHouse / pull / 4674 ) ( [ Vladislav ] ( https : / / github . com / smirnov - vs ) ) <nl> + * Fix error ` Unknown log entry type : 0 ` after ` OPTIMIZE TABLE FINAL ` query . [ # 4683 ] ( https : / / github . com / yandex / ClickHouse / pull / 4683 ) ( [ Amos Bird ] ( https : / / github . com / amosbird ) ) <nl> + * Wrong arguments to ` hasAny ` or ` hasAll ` functions may lead to segfault . [ # 4698 ] ( https : / / github . com / yandex / ClickHouse / pull / 4698 ) ( [ alexey - milovidov ] ( https : / / github . com / alexey - milovidov ) ) <nl> + * Deadlock may happen while executing ` DROP DATABASE dictionary ` query . [ # 4701 ] ( https : / / github . com / yandex / ClickHouse / pull / 4701 ) ( [ alexey - milovidov ] ( https : / / github . com / alexey - milovidov ) ) <nl> + * Fix undefinied behavior in ` median ` and ` quantile ` functions . [ # 4702 ] ( https : / / github . com / yandex / ClickHouse / pull / 4702 ) ( [ hcz ] ( https : / / github . com / hczhcz ) ) <nl> + * Fix compression level detection when ` network_compression_method ` in lowercase . Broken in v19 . 1 . [ # 4706 ] ( https : / / github . com / yandex / ClickHouse / pull / 4706 ) ( [ proller ] ( https : / / github . com / proller ) ) <nl> + * Keep ordinary , ` DEFAULT ` , ` MATERIALIZED ` and ` ALIAS ` columns in a single list . Fixes # 2867 [ # 4707 ] ( https : / / github . com / yandex / ClickHouse / pull / 4707 ) ( [ Alex Zatelepin ] ( https : / / github . com / ztlpn ) ) <nl> + * Fixed ignorance of ` < timezone > UTC < / timezone > ` setting ( fixes issue # 4658 ) . [ # 4718 ] ( https : / / github . com / yandex / ClickHouse / pull / 4718 ) ( [ proller ] ( https : / / github . com / proller ) ) <nl> + * Fix ` histogram ` function behaviour with ` Distributed ` tables . [ # 4741 ] ( https : / / github . com / yandex / ClickHouse / pull / 4741 ) ( [ olegkv ] ( https : / / github . com / olegkv ) ) <nl> + * Fixed tsan report ` destroy of a locked mutex ` . [ # 4742 ] ( https : / / github . com / yandex / ClickHouse / pull / 4742 ) ( [ alexey - milovidov ] ( https : / / github . com / alexey - milovidov ) ) <nl> + * Fixed TSan report on shutdown due to race condition in system logs usage . Fixed potential use - after - free on shutdown when part_log is enabled . [ # 4758 ] ( https : / / github . com / yandex / ClickHouse / pull / 4758 ) ( [ alexey - milovidov ] ( https : / / github . com / alexey - milovidov ) ) <nl> + * Fix recheck parts in ReplicatedMergeTreeAlterThread in case of error . [ # 4772 ] ( https : / / github . com / yandex / ClickHouse / pull / 4772 ) ( [ Nikolai Kochetov ] ( https : / / github . com / KochetovNicolai ) ) <nl> + * Arithmetic operations on intermediate aggregate function states were not working for constant arguments ( such as subquery results ) . [ # 4776 ] ( https : / / github . com / yandex / ClickHouse / pull / 4776 ) ( [ alexey - milovidov ] ( https : / / github . com / alexey - milovidov ) ) <nl> + * Always backquote column names in metadata . Otherwise it ' s impossible to create a table with column named ` index ` ( server won ' t restart due to malformed ` ATTACH ` query in metadata ) . [ # 4782 ] ( https : / / github . com / yandex / ClickHouse / pull / 4782 ) ( [ alexey - milovidov ] ( https : / / github . com / alexey - milovidov ) ) <nl> + * Fix crash in ` ALTER . . . MODIFY ORDER BY ` on Distributed table . [ # 4790 ] ( https : / / github . com / yandex / ClickHouse / pull / 4790 ) ( [ TCeason ] ( https : / / github . com / TCeason ) ) <nl> + * Fix segfault in ` JOIN ON ` with enabled ` enable_optimize_predicate_expression ` . [ # 4794 ] ( https : / / github . com / yandex / ClickHouse / pull / 4794 ) ( [ Winter Zhang ] ( https : / / github . com / zhang2014 ) ) <nl> + * Fix MacOs build [ # 4804 ] ( https : / / github . com / yandex / ClickHouse / pull / 4804 ) ( [ Danila Kutenin ] ( https : / / github . com / danlark1 ) ) <nl> + * Fix bug with adding an extraneous row after consuming a protobuf message from Kafka . [ # 4808 ] ( https : / / github . com / yandex / ClickHouse / pull / 4808 ) ( [ Vitaly Baranov ] ( https : / / github . com / vitlibar ) ) <nl> + * Fix crash of JOIN on not - nullable vs nullable column . Fix NULLs in right keys in ANY JOIN + join_use_nulls . [ # 4815 ] ( https : / / github . com / yandex / ClickHouse / pull / 4815 ) ( [ Artem Zuikov ] ( https : / / github . com / 4ertus2 ) ) <nl> + * Fix segmentation fault in clickhouse - copier . [ # 4835 ] ( https : / / github . com / yandex / ClickHouse / pull / 4835 ) ( [ proller ] ( https : / / github . com / proller ) ) <nl> + * Fixed race condition in ` SELECT ` from ` system . tables ` if the table is renamed or altered concurrently . [ # 4836 ] ( https : / / github . com / yandex / ClickHouse / pull / 4836 ) ( [ alexey - milovidov ] ( https : / / github . com / alexey - milovidov ) ) <nl> + * Fixed data race when fetching data part that is already obsolete . [ # 4839 ] ( https : / / github . com / yandex / ClickHouse / pull / 4839 ) ( [ alexey - milovidov ] ( https : / / github . com / alexey - milovidov ) ) <nl> + * Fixed rare data race that can happen during ` RENAME ` table of MergeTree family . [ # 4844 ] ( https : / / github . com / yandex / ClickHouse / pull / 4844 ) ( [ alexey - milovidov ] ( https : / / github . com / alexey - milovidov ) ) <nl> + * Fixed segmentation fault in function ` arrayIntersect ` . Segmentation fault could happen if function was called with mixed constant and ordinary arguments . [ # 4847 ] ( https : / / github . com / yandex / ClickHouse / pull / 4847 ) ( [ Lixiang Qian ] ( https : / / github . com / fancyqlx ) ) <nl> + * Fixed reading from ` Array ( LowCardinality ) ` column in rare case when column contained a long sequence of empty arrays . [ # 4850 ] ( https : / / github . com / yandex / ClickHouse / pull / 4850 ) ( [ Nikolai Kochetov ] ( https : / / github . com / KochetovNicolai ) ) <nl> + * Fix crash in ` FULL / RIGHT JOIN ` when we joining on nullable vs not nullable [ # 4855 ] ( https : / / github . com / yandex / ClickHouse / pull / 4855 ) ( [ Artem Zuikov ] ( https : / / github . com / 4ertus2 ) ) <nl> + * Fix ` No message received ` exception while fetching parts between replicas . [ # 4856 ] ( https : / / github . com / yandex / ClickHouse / pull / 4856 ) ( [ alesapin ] ( https : / / github . com / alesapin ) ) <nl> + * Fix bug with incorrect timestamp for the right - hand table of the ASOF join . [ # 4867 ] ( https : / / github . com / yandex / ClickHouse / pull / 4867 ) ( [ Martijn Bakker ] ( https : / / github . com / Gladdy ) ) <nl> + * Fixed ` arrayIntersect ` function wrong result in case of several repeated values in single array . [ # 4871 ] ( https : / / github . com / yandex / ClickHouse / pull / 4871 ) ( [ Nikolai Kochetov ] ( https : / / github . com / KochetovNicolai ) ) <nl> + * Fix a race condition during concurrent ` ALTER COLUMN ` queries that could lead to a server crash ( fixes issue # 3421 ) . [ # 4592 ] ( https : / / github . com / yandex / ClickHouse / pull / 4592 ) ( [ Alex Zatelepin ] ( https : / / github . com / ztlpn ) ) <nl> + * Fix incorrect result in ` FULL / RIGHT JOIN ` with const column . [ # 4723 ] ( https : / / github . com / yandex / ClickHouse / pull / 4723 ) ( [ Artem Zuikov ] ( https : / / github . com / 4ertus2 ) ) <nl> + * Fix duplicates in ` GLOBAL JOIN ` with asterisk . [ # 4705 ] ( https : / / github . com / yandex / ClickHouse / pull / 4705 ) ( [ Artem Zuikov ] ( https : / / github . com / 4ertus2 ) ) <nl> + <nl> + # # # Backward Incompatible Change <nl> + <nl> + * Rename setting ` insert_sample_with_metadata ` to setting ` input_format_defaults_for_omitted_fields ` . [ # 4771 ] ( https : / / github . com / yandex / ClickHouse / pull / 4771 ) ( [ Artem Zuikov ] ( https : / / github . com / 4ertus2 ) ) <nl> + * Added setting ` max_partitions_per_insert_block ` ( with value 100 by default ) . If inserted block contains larger number of partitions , an exception is thrown . Set it to 0 if you want to remove the limit ( not recommended ) . [ # 4845 ] ( https : / / github . com / yandex / ClickHouse / pull / 4845 ) ( [ alexey - milovidov ] ( https : / / github . com / alexey - milovidov ) ) <nl> + <nl> + # # # Performance Improvement <nl> + <nl> + * Optimize Volnitsky searcher by inlining , giving about 5 - 10 % search improvement for queries with many needles or many similar bigrams . [ # 4862 ] ( https : / / github . com / yandex / ClickHouse / pull / 4862 ) ( [ Danila Kutenin ] ( https : / / github . com / danlark1 ) ) <nl> + <nl> + # # # Build / Testing / Packaging Improvement <nl> + <nl> + * Hardening debug build : more granular memory mappings and ASLR ; add memory protection for mark cache and index . This allows to find more memory stomping bugs in case when ASan and MSan cannot do it . [ # 4632 ] ( https : / / github . com / yandex / ClickHouse / pull / 4632 ) ( [ alexey - milovidov ] ( https : / / github . com / alexey - milovidov ) ) <nl> + * Add support for cmake variables ENABLE_PROTOBUF , ENABLE_PARQUET and ENABLE_BROTLI which allows to enable / disable the above features ( same as we can do for librdkafka , mysql , etc ) . [ # 4669 ] ( https : / / github . com / yandex / ClickHouse / pull / 4669 ) ( [ Silviu Caragea ] ( https : / / github . com / silviucpp ) ) <nl> + * Add ability to print process list and stacktraces of all threads if some queries are hung after test run . [ # 4675 ] ( https : / / github . com / yandex / ClickHouse / pull / 4675 ) ( [ alesapin ] ( https : / / github . com / alesapin ) ) <nl> + * Add retries on ` Connection loss ` error in ` clickhouse - test ` . [ # 4682 ] ( https : / / github . com / yandex / ClickHouse / pull / 4682 ) ( [ alesapin ] ( https : / / github . com / alesapin ) ) <nl> + * Add freebsd build with vagrant and build with thread sanitizer to packager script . [ # 4712 ] ( https : / / github . com / yandex / ClickHouse / pull / 4712 ) [ # 4748 ] ( https : / / github . com / yandex / ClickHouse / pull / 4748 ) ( [ alesapin ] ( https : / / github . com / alesapin ) ) <nl> + * Remove old packages ` clickhouse - server - base ` and ` clickhouse - server - common ` from clickhouse . [ # 4721 ] ( https : / / github . com / yandex / ClickHouse / pull / 4721 ) ( [ alesapin ] ( https : / / github . com / alesapin ) ) <nl> + * Now user asked for password for user ' default ' during installation . [ # 4725 ] ( https : / / github . com / yandex / ClickHouse / pull / 4725 ) ( [ proller ] ( https : / / github . com / proller ) ) <nl> + * Suppress warning in ` rdkafka ` library . [ # 4740 ] ( https : / / github . com / yandex / ClickHouse / pull / 4740 ) ( [ alexey - milovidov ] ( https : / / github . com / alexey - milovidov ) ) <nl> + * Allow ability to build without ssl . [ # 4750 ] ( https : / / github . com / yandex / ClickHouse / pull / 4750 ) ( [ proller ] ( https : / / github . com / proller ) ) <nl> + * Add a way to launch clickhouse - server image from a custom user [ # 4753 ] ( https : / / github . com / yandex / ClickHouse / pull / 4753 ) ( [ Mikhail f . Shiryaev ] ( https : / / github . com / Felixoid ) ) <nl> + * Upgrade contrib boost to 1 . 69 . [ # 4793 ] ( https : / / github . com / yandex / ClickHouse / pull / 4793 ) ( [ proller ] ( https : / / github . com / proller ) ) <nl> + * Disable usage of ` mremap ` when compiled with Thread Sanitizer . Surprisingly enough , TSan does not intercept ` mremap ` ( though it does intercept ` mmap ` , ` munmap ` ) that leads to false positives . Fixed TSan report in stateful tests . [ # 4859 ] ( https : / / github . com / yandex / ClickHouse / pull / 4859 ) ( [ alexey - milovidov ] ( https : / / github . com / alexey - milovidov ) ) <nl> + * Add test checking using format schema via HTTP interface . [ # 4864 ] ( https : / / github . com / yandex / ClickHouse / pull / 4864 ) ( [ Vitaly Baranov ] ( https : / / github . com / vitlibar ) ) <nl> + <nl> + <nl> # # ClickHouse release 19 . 4 . 2 . 7 , 2019 - 03 - 30 <nl> <nl> # # # Bug Fixes <nl>
Changelog for 19 . 5 . 1 . 246
ClickHouse/ClickHouse
2c6a6420d29e179388eca0b8b4a89ee136f99fc3
2019-04-11T17:16:42Z
mmm a / docs / ABI / Mangling . rst <nl> ppp b / docs / ABI / Mangling . rst <nl> Globals <nl> global : : = type ' Wc ' INDEX / / Outlined InitializeWithCopy Function Type <nl> global : : = type ' Wd ' INDEX / / Outlined AssignWithTake Function Type <nl> global : : = type ' Wf ' INDEX / / Outlined AssignWithCopy Function Type <nl> + global : : = type ' Wh ' INDEX / / Outlined Destroy Function Type <nl> <nl> assoc_type_path : : = identifier ' _ ' identifier * <nl> <nl> mmm a / include / swift / AST / Decl . h <nl> ppp b / include / swift / AST / Decl . h <nl> class alignas ( 1 < < DeclAlignInBits ) Decl { <nl> unsigned : NumDeclBits ; <nl> <nl> unsigned NumberOfVTableEntries : 2 ; <nl> + unsigned NumberOfFieldOffsetVectorEntries : 1 ; <nl> } ; <nl> - enum { NumMissingMemberDeclBits = NumDeclBits + 2 } ; <nl> + enum { NumMissingMemberDeclBits = NumDeclBits + 3 } ; <nl> static_assert ( NumMissingMemberDeclBits < = 32 , " fits in an unsigned " ) ; <nl> <nl> protected : <nl> class NominalTypeDecl : public GenericTypeDecl , public IterableDeclContext { <nl> ToStoredProperty ( skipInaccessible ) ) ; <nl> } <nl> <nl> + private : <nl> + / / / Predicate used to filter StoredPropertyRange . <nl> + struct ToStoredPropertyOrMissingMemberPlaceholder { <nl> + Optional < Decl * > operator ( ) ( Decl * decl ) const ; <nl> + } ; <nl> + <nl> + public : <nl> + / / / A range for iterating the stored member variables of a structure . <nl> + using StoredPropertyOrMissingMemberPlaceholderRange <nl> + = OptionalTransformRange < DeclRange , <nl> + ToStoredPropertyOrMissingMemberPlaceholder > ; <nl> + <nl> + / / / Return a collection of the stored member variables of this type , along <nl> + / / / with placeholders for unimportable stored properties . <nl> + StoredPropertyOrMissingMemberPlaceholderRange <nl> + getStoredPropertiesAndMissingMemberPlaceholders ( ) const { <nl> + return StoredPropertyOrMissingMemberPlaceholderRange ( getMembers ( ) , <nl> + ToStoredPropertyOrMissingMemberPlaceholder ( ) ) ; <nl> + } <nl> + <nl> / / Implement isa / cast / dyncast / etc . <nl> static bool classof ( const Decl * D ) { <nl> return D - > getKind ( ) > = DeclKind : : First_NominalTypeDecl & & <nl> class PostfixOperatorDecl : public OperatorDecl { <nl> class MissingMemberDecl : public Decl { <nl> DeclName Name ; <nl> <nl> - MissingMemberDecl ( DeclContext * DC , DeclName name , unsigned vtableEntries ) <nl> + MissingMemberDecl ( DeclContext * DC , DeclName name , <nl> + unsigned vtableEntries , <nl> + unsigned fieldOffsetVectorEntries ) <nl> : Decl ( DeclKind : : MissingMember , DC ) , Name ( name ) { <nl> MissingMemberDeclBits . NumberOfVTableEntries = vtableEntries ; <nl> assert ( getNumberOfVTableEntries ( ) = = vtableEntries & & " not enough bits " ) ; <nl> + MissingMemberDeclBits . NumberOfFieldOffsetVectorEntries = <nl> + fieldOffsetVectorEntries ; <nl> + assert ( getNumberOfFieldOffsetVectorEntries ( ) = = fieldOffsetVectorEntries <nl> + & & " not enough bits " ) ; <nl> setImplicit ( ) ; <nl> } <nl> public : <nl> class MissingMemberDecl : public Decl { <nl> forMethod ( ASTContext & ctx , DeclContext * DC , DeclName name , <nl> bool hasNormalVTableEntry ) { <nl> assert ( ! name | | name . isCompoundName ( ) ) ; <nl> - return new ( ctx ) MissingMemberDecl ( DC , name , hasNormalVTableEntry ) ; <nl> + return new ( ctx ) MissingMemberDecl ( DC , name , hasNormalVTableEntry , 0 ) ; <nl> } <nl> <nl> static MissingMemberDecl * <nl> class MissingMemberDecl : public Decl { <nl> bool hasNormalVTableEntry , <nl> bool hasAllocatingVTableEntry ) { <nl> unsigned entries = hasNormalVTableEntry + hasAllocatingVTableEntry ; <nl> - return new ( ctx ) MissingMemberDecl ( DC , name , entries ) ; <nl> + return new ( ctx ) MissingMemberDecl ( DC , name , entries , 0 ) ; <nl> + } <nl> + <nl> + static MissingMemberDecl * <nl> + forStoredProperty ( ASTContext & ctx , DeclContext * DC , DeclName name ) { <nl> + return new ( ctx ) MissingMemberDecl ( DC , name , 0 , 1 ) ; <nl> } <nl> <nl> DeclName getFullName ( ) const { <nl> class MissingMemberDecl : public Decl { <nl> return MissingMemberDeclBits . NumberOfVTableEntries ; <nl> } <nl> <nl> + unsigned getNumberOfFieldOffsetVectorEntries ( ) const { <nl> + return MissingMemberDeclBits . NumberOfFieldOffsetVectorEntries ; <nl> + } <nl> + <nl> SourceLoc getLoc ( ) const { <nl> return SourceLoc ( ) ; <nl> } <nl> NominalTypeDecl : : ToStoredProperty : : operator ( ) ( Decl * decl ) const { <nl> return None ; <nl> } <nl> <nl> + inline Optional < Decl * > <nl> + NominalTypeDecl : : ToStoredPropertyOrMissingMemberPlaceholder <nl> + : : operator ( ) ( Decl * decl ) const { <nl> + if ( auto var = dyn_cast < VarDecl > ( decl ) ) { <nl> + if ( ! var - > isStatic ( ) & & var - > hasStorage ( ) ) <nl> + return var ; <nl> + } <nl> + if ( auto missing = dyn_cast < MissingMemberDecl > ( decl ) ) { <nl> + if ( missing - > getNumberOfFieldOffsetVectorEntries ( ) > 0 ) <nl> + return missing ; <nl> + } <nl> + <nl> + return None ; <nl> + } <nl> + <nl> inline void <nl> AbstractStorageDecl : : overwriteSetterAccess ( AccessLevel accessLevel ) { <nl> GetSetInfo . setInt ( accessLevel ) ; <nl> mmm a / include / swift / Demangling / DemangleNodes . def <nl> ppp b / include / swift / Demangling / DemangleNodes . def <nl> NODE ( OutlinedInitializeWithTake ) <nl> NODE ( OutlinedInitializeWithCopy ) <nl> NODE ( OutlinedAssignWithTake ) <nl> NODE ( OutlinedAssignWithCopy ) <nl> + NODE ( OutlinedDestroy ) <nl> NODE ( OutlinedVariable ) <nl> NODE ( AssocTypePath ) <nl> # undef CONTEXT_NODE <nl> mmm a / include / swift / Serialization / ModuleFormat . h <nl> ppp b / include / swift / Serialization / ModuleFormat . h <nl> const uint16_t VERSION_MAJOR = 0 ; <nl> / / / in source control , you should also update the comment to briefly <nl> / / / describe what change you made . The content of this comment isn ' t important ; <nl> / / / it just ensures a conflict if two people change the module format . <nl> - const uint16_t VERSION_MINOR = 387 ; / / Last change : dependencies for typealiases <nl> + const uint16_t VERSION_MINOR = 388 ; / / Last change : Outlined Destroy <nl> <nl> using DeclIDField = BCFixed < 31 > ; <nl> <nl> mmm a / lib / Demangling / Demangler . cpp <nl> ppp b / lib / Demangling / Demangler . cpp <nl> NodePointer Demangler : : demangleWitness ( ) { <nl> return createWithChildren ( Node : : Kind : : OutlinedAssignWithCopy , <nl> popNode ( Node : : Kind : : Type ) , IndexChild ) ; <nl> } <nl> + case ' h ' : { <nl> + NodePointer IndexChild = demangleIndexAsNode ( ) ; <nl> + return createWithChildren ( Node : : Kind : : OutlinedDestroy , <nl> + popNode ( Node : : Kind : : Type ) , IndexChild ) ; <nl> + } <nl> <nl> default : <nl> return nullptr ; <nl> mmm a / lib / Demangling / NodePrinter . cpp <nl> ppp b / lib / Demangling / NodePrinter . cpp <nl> class NodePrinter { <nl> case Node : : Kind : : OutlinedInitializeWithCopy : <nl> case Node : : Kind : : OutlinedAssignWithTake : <nl> case Node : : Kind : : OutlinedAssignWithCopy : <nl> + case Node : : Kind : : OutlinedDestroy : <nl> case Node : : Kind : : OutlinedVariable : <nl> case Node : : Kind : : AssocTypePath : <nl> return false ; <nl> NodePointer NodePrinter : : print ( NodePointer Node , bool asPrefixContext ) { <nl> Printer < < " outlined assign with copy of " ; <nl> print ( Node - > getChild ( 0 ) ) ; <nl> return nullptr ; <nl> + case Node : : Kind : : OutlinedDestroy : <nl> + Printer < < " outlined destroy of " ; <nl> + print ( Node - > getChild ( 0 ) ) ; <nl> + return nullptr ; <nl> case Node : : Kind : : OutlinedVariable : <nl> Printer < < " outlined variable # " < < Node - > getIndex ( ) < < " of " ; <nl> return nullptr ; <nl> mmm a / lib / Demangling / OldRemangler . cpp <nl> ppp b / lib / Demangling / OldRemangler . cpp <nl> void Remangler : : mangleOutlinedAssignWithCopy ( Node * node ) { <nl> mangleSingleChildNode ( node ) ; <nl> } <nl> <nl> + void Remangler : : mangleOutlinedDestroy ( Node * node ) { <nl> + Out < < " Wh " ; <nl> + mangleSingleChildNode ( node ) ; <nl> + } <nl> + <nl> void Remangler : : mangleOutlinedVariable ( Node * node ) { <nl> Out < < " Tv " < < node - > getIndex ( ) ; <nl> mangleSingleChildNode ( node ) ; <nl> mmm a / lib / Demangling / Remangler . cpp <nl> ppp b / lib / Demangling / Remangler . cpp <nl> void Remangler : : mangleOutlinedAssignWithCopy ( Node * node ) { <nl> mangleChildNode ( node , 1 ) ; <nl> } <nl> <nl> + void Remangler : : mangleOutlinedDestroy ( Node * node ) { <nl> + mangleChildNode ( node , 0 ) ; <nl> + Buffer < < " Wh " ; <nl> + mangleChildNode ( node , 1 ) ; <nl> + } <nl> + <nl> void Remangler : : mangleOutlinedVariable ( Node * node ) { <nl> Buffer < < " Tv " ; <nl> mangleIndex ( node - > getIndex ( ) ) ; <nl> mmm a / lib / IRGen / ClassMetadataVisitor . h <nl> ppp b / lib / IRGen / ClassMetadataVisitor . h <nl> template < class Impl > class ClassMetadataVisitor <nl> / / But we currently always give classes field - offset vectors , <nl> / / whether they need them or not . <nl> asImpl ( ) . noteStartOfFieldOffsets ( theClass ) ; <nl> - for ( auto field : theClass - > getStoredProperties ( ) ) { <nl> + for ( auto field : <nl> + theClass - > getStoredPropertiesAndMissingMemberPlaceholders ( ) ) { <nl> addFieldEntries ( field ) ; <nl> } <nl> asImpl ( ) . noteEndOfFieldOffsets ( theClass ) ; <nl> } <nl> <nl> private : <nl> - void addFieldEntries ( VarDecl * field ) { <nl> - asImpl ( ) . addFieldOffset ( field ) ; <nl> + void addFieldEntries ( Decl * field ) { <nl> + if ( auto var = dyn_cast < VarDecl > ( field ) ) { <nl> + asImpl ( ) . addFieldOffset ( var ) ; <nl> + return ; <nl> + } <nl> + if ( auto placeholder = dyn_cast < MissingMemberDecl > ( field ) ) { <nl> + asImpl ( ) . addFieldOffsetPlaceholders ( placeholder ) ; <nl> + return ; <nl> + } <nl> } <nl> } ; <nl> <nl> class ClassMetadataScanner : public ClassMetadataVisitor < Impl > { <nl> } <nl> void addMethodOverride ( SILDeclRef baseRef , SILDeclRef declRef ) { } <nl> void addFieldOffset ( VarDecl * var ) { addPointer ( ) ; } <nl> + void addFieldOffsetPlaceholders ( MissingMemberDecl * mmd ) { <nl> + for ( unsigned i = 0 , e = mmd - > getNumberOfFieldOffsetVectorEntries ( ) ; <nl> + i < e ; + + i ) { <nl> + addPointer ( ) ; <nl> + } <nl> + } <nl> void addGenericArgument ( CanType argument , ClassDecl * forClass ) { <nl> addPointer ( ) ; <nl> } <nl> mmm a / lib / IRGen / FixedTypeInfo . h <nl> ppp b / lib / IRGen / FixedTypeInfo . h <nl> class FixedTypeInfo : public TypeInfo { <nl> StackAddress allocateStack ( IRGenFunction & IGF , SILType T , bool isEntryBlock , <nl> const llvm : : Twine & name ) const override ; <nl> void deallocateStack ( IRGenFunction & IGF , StackAddress addr , SILType T ) const override ; <nl> - void destroyStack ( IRGenFunction & IGF , StackAddress addr , SILType T ) const override ; <nl> + void destroyStack ( IRGenFunction & IGF , StackAddress addr , SILType T , <nl> + bool isOutlined ) const override ; <nl> <nl> / / We can give these reasonable default implementations . <nl> <nl> mmm a / lib / IRGen / GenClass . cpp <nl> ppp b / lib / IRGen / GenClass . cpp <nl> namespace { <nl> { <nl> / / Start by adding a heap header . <nl> switch ( refcounting ) { <nl> - case swift : : irgen : : ReferenceCounting : : Native : <nl> + case ReferenceCounting : : Native : <nl> / / For native classes , place a full object header . <nl> addHeapHeader ( ) ; <nl> break ; <nl> - case swift : : irgen : : ReferenceCounting : : ObjC : <nl> + case ReferenceCounting : : ObjC : <nl> / / For ObjC - inheriting classes , we don ' t reliably know the size of the <nl> / / base class , but NSObject only has an ` isa ` pointer at most . <nl> addNSObjectHeader ( ) ; <nl> break ; <nl> - case swift : : irgen : : ReferenceCounting : : Block : <nl> - case swift : : irgen : : ReferenceCounting : : Unknown : <nl> - case swift : : irgen : : ReferenceCounting : : Bridge : <nl> - case swift : : irgen : : ReferenceCounting : : Error : <nl> + case ReferenceCounting : : Block : <nl> + case ReferenceCounting : : Unknown : <nl> + case ReferenceCounting : : Bridge : <nl> + case ReferenceCounting : : Error : <nl> llvm_unreachable ( " not a class refcounting kind " ) ; <nl> } <nl> <nl> namespace { <nl> NumInherited = Elements . size ( ) ; <nl> } <nl> } <nl> + <nl> + / / If this class was imported from another module , assume that we may <nl> + / / not know its exact layout . <nl> + if ( theClass - > getModuleContext ( ) ! = IGM . getSwiftModule ( ) ) { <nl> + ClassHasFixedSize = false ; <nl> + } <nl> <nl> / / Access strategies should be set by the abstract class layout , <nl> / / not using the concrete type information we have . <nl> mmm a / lib / IRGen / GenDecl . cpp <nl> ppp b / lib / IRGen / GenDecl . cpp <nl> void IRGenModule : : generateCallToOutlinedCopyAddr ( <nl> call - > setCallingConv ( DefaultCC ) ; <nl> } <nl> <nl> + void IRGenModule : : generateCallToOutlinedDestroy ( <nl> + IRGenFunction & IGF , const TypeInfo & objectTI , Address addr , SILType T , <nl> + const llvm : : MapVector < CanType , llvm : : Value * > * typeToMetadataVec ) { <nl> + IRGenMangler mangler ; <nl> + CanType canType = T . getSwiftRValueType ( ) ; <nl> + std : : string funcName = mangler . mangleOutlinedDestroyFunction ( canType , this ) ; <nl> + <nl> + llvm : : SmallVector < llvm : : Type * , 4 > argsTysVec ; <nl> + llvm : : SmallVector < llvm : : Value * , 4 > argsVec ; <nl> + llvm : : Type * llvmType = addr . getType ( ) ; <nl> + argsTysVec . push_back ( llvmType ) ; <nl> + argsVec . push_back ( addr . getAddress ( ) ) ; <nl> + if ( typeToMetadataVec ) { <nl> + for ( auto & typeDataPair : * typeToMetadataVec ) { <nl> + auto * metadata = typeDataPair . second ; <nl> + assert ( metadata & & metadata - > getType ( ) = = IGF . IGM . TypeMetadataPtrTy & & <nl> + " Expeceted TypeMetadataPtrTy " ) ; <nl> + argsTysVec . push_back ( metadata - > getType ( ) ) ; <nl> + argsVec . push_back ( metadata ) ; <nl> + } <nl> + } <nl> + <nl> + auto * outlinedF = getOrCreateHelperFunction ( <nl> + funcName , llvmType , argsTysVec , <nl> + [ & ] ( IRGenFunction & IGF ) { <nl> + auto it = IGF . CurFn - > arg_begin ( ) ; <nl> + Address addr ( & * it + + , objectTI . getBestKnownAlignment ( ) ) ; <nl> + if ( typeToMetadataVec ) { <nl> + for ( auto & typeDataPair : * typeToMetadataVec ) { <nl> + llvm : : Value * arg = & * it + + ; <nl> + CanType abstractType = typeDataPair . first ; <nl> + getArgAsLocalSelfTypeMetadata ( IGF , arg , abstractType ) ; <nl> + } <nl> + } <nl> + objectTI . destroy ( IGF , addr , T , true ) ; <nl> + IGF . Builder . CreateRet ( addr . getAddress ( ) ) ; <nl> + } , <nl> + true / * setIsNoInline * / ) ; <nl> + <nl> + if ( T . hasArchetype ( ) ) { <nl> + llvm : : Function * fn = dyn_cast < llvm : : Function > ( outlinedF ) ; <nl> + assert ( fn & & " Expected llvm : : Function " ) ; <nl> + fn - > setLinkage ( llvm : : GlobalValue : : InternalLinkage ) ; <nl> + } <nl> + <nl> + llvm : : CallInst * call = IGF . Builder . CreateCall ( outlinedF , argsVec ) ; <nl> + call - > setCallingConv ( DefaultCC ) ; <nl> + } <nl> + <nl> llvm : : Constant * IRGenModule : : getOrCreateOutlinedCopyAddrHelperFunction ( <nl> const TypeInfo & objectTI , llvm : : Type * llvmType , SILType addrTy , <nl> std : : string funcName , <nl> mmm a / lib / IRGen / GenEnum . cpp <nl> ppp b / lib / IRGen / GenEnum . cpp <nl> namespace { <nl> if ( getLoadableSingleton ( ) ) getLoadableSingleton ( ) - > fixLifetime ( IGF , src ) ; <nl> } <nl> <nl> - void destroy ( IRGenFunction & IGF , Address addr , SILType T ) const override { <nl> + void destroy ( IRGenFunction & IGF , Address addr , SILType T , <nl> + bool isOutlined ) const override { <nl> if ( getSingleton ( ) & & <nl> - ! getSingleton ( ) - > isPOD ( ResilienceExpansion : : Maximal ) ) <nl> - getSingleton ( ) - > destroy ( IGF , getSingletonAddress ( IGF , addr ) , <nl> - getSingletonType ( IGF . IGM , T ) ) ; <nl> + ! getSingleton ( ) - > isPOD ( ResilienceExpansion : : Maximal ) ) { <nl> + if ( isOutlined | | T . hasOpenedExistential ( ) ) { <nl> + getSingleton ( ) - > destroy ( IGF , getSingletonAddress ( IGF , addr ) , <nl> + getSingletonType ( IGF . IGM , T ) , isOutlined ) ; <nl> + } else { <nl> + llvm : : MapVector < CanType , llvm : : Value * > typeToMetadataVec ; <nl> + if ( T . hasArchetype ( ) ) { <nl> + collectArchetypeMetadata ( IGF , typeToMetadataVec , T ) ; <nl> + } <nl> + IGF . IGM . generateCallToOutlinedDestroy ( IGF , * TI , addr , T , <nl> + & typeToMetadataVec ) ; <nl> + } <nl> + } <nl> } <nl> <nl> void packIntoEnumPayload ( IRGenFunction & IGF , EnumPayload & payload , <nl> namespace { <nl> llvm : : Function : : Create ( consumeTy , llvm : : GlobalValue : : InternalLinkage , <nl> llvm : : StringRef ( name ) , IGM . getModule ( ) ) ; <nl> func - > setAttributes ( IGM . constructInitialAttributes ( ) ) ; <nl> + func - > setDoesNotThrow ( ) ; <nl> + func - > setCallingConv ( IGM . DefaultCC ) ; <nl> + func - > addFnAttr ( llvm : : Attribute : : NoInline ) ; <nl> return func ; <nl> } <nl> <nl> namespace { <nl> <nl> } <nl> <nl> - void destroy ( IRGenFunction & IGF , Address addr , SILType T ) const override { <nl> - switch ( CopyDestroyKind ) { <nl> - case POD : <nl> + void destroy ( IRGenFunction & IGF , Address addr , SILType T , <nl> + bool isOutlined ) const override { <nl> + if ( CopyDestroyKind = = POD ) { <nl> return ; <nl> + } <nl> + if ( isOutlined | | T . hasOpenedExistential ( ) ) { <nl> + switch ( CopyDestroyKind ) { <nl> + case POD : <nl> + return ; <nl> <nl> - case Normal : { <nl> - / / Check that there is a payload at the address . <nl> - llvm : : BasicBlock * endBB = testEnumContainsPayload ( IGF , addr , T ) ; <nl> + case Normal : { <nl> + / / Check that there is a payload at the address . <nl> + llvm : : BasicBlock * endBB = testEnumContainsPayload ( IGF , addr , T ) ; <nl> <nl> - ConditionalDominanceScope condition ( IGF ) ; <nl> + ConditionalDominanceScope condition ( IGF ) ; <nl> <nl> - / / If there is , project and destroy it . <nl> - Address payloadAddr = projectPayloadData ( IGF , addr ) ; <nl> - getPayloadTypeInfo ( ) . destroy ( IGF , payloadAddr , <nl> - getPayloadType ( IGF . IGM , T ) ) ; <nl> + / / If there is , project and destroy it . <nl> + Address payloadAddr = projectPayloadData ( IGF , addr ) ; <nl> + getPayloadTypeInfo ( ) . destroy ( IGF , payloadAddr , <nl> + getPayloadType ( IGF . IGM , T ) , <nl> + true / * isOutlined * / ) ; <nl> <nl> - IGF . Builder . CreateBr ( endBB ) ; <nl> - IGF . Builder . emitBlock ( endBB ) ; <nl> - return ; <nl> - } <nl> + IGF . Builder . CreateBr ( endBB ) ; <nl> + IGF . Builder . emitBlock ( endBB ) ; <nl> + return ; <nl> + } <nl> <nl> - case NullableRefcounted : { <nl> - / / Load the value as swift . refcounted , then hand to swift_release . <nl> - addr = IGF . Builder . CreateBitCast ( addr , <nl> - getRefcountedPtrType ( IGF . IGM ) - > getPointerTo ( ) ) ; <nl> - llvm : : Value * ptr = IGF . Builder . CreateLoad ( addr ) ; <nl> - releaseRefcountedPayload ( IGF , ptr ) ; <nl> - return ; <nl> - } <nl> + case NullableRefcounted : { <nl> + / / Load the value as swift . refcounted , then hand to swift_release . <nl> + addr = IGF . Builder . CreateBitCast ( <nl> + addr , getRefcountedPtrType ( IGF . IGM ) - > getPointerTo ( ) ) ; <nl> + llvm : : Value * ptr = IGF . Builder . CreateLoad ( addr ) ; <nl> + releaseRefcountedPayload ( IGF , ptr ) ; <nl> + return ; <nl> + } <nl> + } <nl> + } else { <nl> + llvm : : MapVector < CanType , llvm : : Value * > typeToMetadataVec ; <nl> + if ( T . hasArchetype ( ) ) { <nl> + collectArchetypeMetadata ( IGF , typeToMetadataVec , T ) ; <nl> + } <nl> + IGF . IGM . generateCallToOutlinedDestroy ( IGF , * TI , addr , T , <nl> + & typeToMetadataVec ) ; <nl> } <nl> } <nl> <nl> namespace { <nl> IGF . Builder . emitBlock ( destNoSrcPayloadBB ) ; <nl> { <nl> ConditionalDominanceScope destNoSrcCondition ( IGF ) ; <nl> - getPayloadTypeInfo ( ) . destroy ( IGF , destData , PayloadT ) ; <nl> + getPayloadTypeInfo ( ) . destroy ( IGF , destData , PayloadT , <nl> + false / * outline calling outline * / ) ; <nl> emitPrimitiveCopy ( IGF , dest , src , T ) ; <nl> IGF . Builder . CreateBr ( endBB ) ; <nl> } <nl> namespace { <nl> ConditionalDominanceScope condition ( IGF ) ; <nl> <nl> / / Destroy the old value . <nl> - destroy ( IGF , dest , T ) ; <nl> + destroy ( IGF , dest , T , false / * outline calling outline * / ) ; <nl> <nl> / / Reinitialize with the new value . <nl> emitIndirectInitialize ( IGF , dest , src , T , isTake , isOutlined ) ; <nl> namespace { <nl> } <nl> } <nl> <nl> - void destroy ( IRGenFunction & IGF , Address addr , SILType T ) const override { <nl> - switch ( CopyDestroyKind ) { <nl> - case POD : <nl> + void destroy ( IRGenFunction & IGF , Address addr , SILType T , <nl> + bool isOutlined ) const override { <nl> + if ( CopyDestroyKind = = POD ) { <nl> return ; <nl> - <nl> - case BitwiseTakable : <nl> - case Normal : <nl> - case TaggedRefcounted : { <nl> - / / If loadable , it ' s better to do this directly to the value than <nl> - / / in place , so we don ' t need to RMW out the tag bits in memory . <nl> - if ( TI - > isLoadable ( ) ) { <nl> - Explosion tmp ; <nl> - loadAsTake ( IGF , addr , tmp ) ; <nl> - consume ( IGF , tmp , IGF . getDefaultAtomicity ( ) ) ; <nl> + } <nl> + if ( isOutlined | | T . hasOpenedExistential ( ) ) { <nl> + switch ( CopyDestroyKind ) { <nl> + case POD : <nl> return ; <nl> - } <nl> <nl> - auto tag = loadPayloadTag ( IGF , addr , T ) ; <nl> + case BitwiseTakable : <nl> + case Normal : <nl> + case TaggedRefcounted : { <nl> + / / If loadable , it ' s better to do this directly to the value than <nl> + / / in place , so we don ' t need to RMW out the tag bits in memory . <nl> + if ( TI - > isLoadable ( ) ) { <nl> + Explosion tmp ; <nl> + loadAsTake ( IGF , addr , tmp ) ; <nl> + consume ( IGF , tmp , IGF . getDefaultAtomicity ( ) ) ; <nl> + return ; <nl> + } <nl> <nl> - forNontrivialPayloads ( IGF , tag , <nl> - [ & ] ( unsigned tagIndex , EnumImplStrategy : : Element elt ) { <nl> - / / Clear tag bits out of the payload area , if any . <nl> - destructiveProjectDataForLoad ( IGF , T , addr ) ; <nl> - / / Destroy the data . <nl> - Address dataAddr = IGF . Builder . CreateBitCast ( addr , <nl> - elt . ti - > getStorageType ( ) - > getPointerTo ( ) ) ; <nl> - SILType payloadT = <nl> - T . getEnumElementType ( elt . decl , IGF . getSILModule ( ) ) ; <nl> - elt . ti - > destroy ( IGF , dataAddr , payloadT ) ; <nl> - } ) ; <nl> - return ; <nl> - } <nl> + auto tag = loadPayloadTag ( IGF , addr , T ) ; <nl> + <nl> + forNontrivialPayloads ( <nl> + IGF , tag , [ & ] ( unsigned tagIndex , EnumImplStrategy : : Element elt ) { <nl> + / / Clear tag bits out of the payload area , if any . <nl> + destructiveProjectDataForLoad ( IGF , T , addr ) ; <nl> + / / Destroy the data . <nl> + Address dataAddr = IGF . Builder . CreateBitCast ( <nl> + addr , elt . ti - > getStorageType ( ) - > getPointerTo ( ) ) ; <nl> + SILType payloadT = <nl> + T . getEnumElementType ( elt . decl , IGF . getSILModule ( ) ) ; <nl> + elt . ti - > destroy ( IGF , dataAddr , payloadT , true / * isOutlined * / ) ; <nl> + } ) ; <nl> + return ; <nl> + } <nl> + } <nl> + } else { <nl> + llvm : : MapVector < CanType , llvm : : Value * > typeToMetadataVec ; <nl> + if ( T . hasArchetype ( ) ) { <nl> + collectArchetypeMetadata ( IGF , typeToMetadataVec , T ) ; <nl> + } <nl> + IGF . IGM . generateCallToOutlinedDestroy ( IGF , * TI , addr , T , <nl> + & typeToMetadataVec ) ; <nl> } <nl> } <nl> <nl> namespace { <nl> typeToMetadataVec . insert ( std : : make_pair ( canType , metadata ) ) ; <nl> } <nl> <nl> - void destroy ( IRGenFunction & IGF , Address addr , SILType T ) const override { <nl> + void destroy ( IRGenFunction & IGF , Address addr , SILType T , <nl> + bool isOutlined ) const override { <nl> emitDestroyCall ( IGF , T , addr ) ; <nl> } <nl> <nl> namespace { <nl> void getSchema ( ExplosionSchema & s ) const override { <nl> return Strategy . getSchema ( s ) ; <nl> } <nl> - void destroy ( IRGenFunction & IGF , Address addr , SILType T ) const override { <nl> - return Strategy . destroy ( IGF , addr , T ) ; <nl> + void destroy ( IRGenFunction & IGF , Address addr , SILType T , <nl> + bool isOutlined ) const override { <nl> + return Strategy . destroy ( IGF , addr , T , isOutlined ) ; <nl> } <nl> void initializeFromParams ( IRGenFunction & IGF , Explosion & params , <nl> Address dest , SILType T , <nl> mmm a / lib / IRGen / GenEnum . h <nl> ppp b / lib / IRGen / GenEnum . h <nl> class EnumImplStrategy { <nl> virtual void addToAggLowering ( IRGenModule & IGM , SwiftAggLowering & lowering , <nl> Size offset ) const = 0 ; <nl> virtual void getSchema ( ExplosionSchema & schema ) const = 0 ; <nl> - virtual void destroy ( IRGenFunction & IGF , Address addr , SILType T ) const = 0 ; <nl> + virtual void destroy ( IRGenFunction & IGF , Address addr , SILType T , <nl> + bool isOutlined ) const = 0 ; <nl> <nl> virtual void initializeFromParams ( IRGenFunction & IGF , Explosion & params , <nl> Address dest , SILType T , <nl> mmm a / lib / IRGen / GenExistential . cpp <nl> ppp b / lib / IRGen / GenExistential . cpp <nl> class OpaqueExistentialTypeInfo final : <nl> } <nl> } <nl> <nl> - void destroy ( IRGenFunction & IGF , Address addr , SILType T ) const override { <nl> - <nl> + void destroy ( IRGenFunction & IGF , Address addr , SILType T , <nl> + bool isOutlined ) const override { <nl> / / Use copy - on - write existentials ? <nl> auto fn = getDestroyBoxedOpaqueExistentialBufferFunction ( <nl> IGF . IGM , getLayout ( ) , addr . getAddress ( ) - > getType ( ) ) ; <nl> class AddressOnlyClassExistentialTypeInfoBase : <nl> } <nl> } <nl> <nl> - void destroy ( IRGenFunction & IGF , Address existential , <nl> - SILType T ) const override { <nl> - Address valueAddr = projectValue ( IGF , existential ) ; <nl> - asDerived ( ) . emitValueDestroy ( IGF , valueAddr ) ; <nl> + void destroy ( IRGenFunction & IGF , Address existential , SILType T , <nl> + bool isOutlined ) const override { <nl> + if ( isOutlined ) { <nl> + Address valueAddr = projectValue ( IGF , existential ) ; <nl> + asDerived ( ) . emitValueDestroy ( IGF , valueAddr ) ; <nl> + } else { <nl> + IGF . IGM . generateCallToOutlinedDestroy ( IGF , * this , existential , T ) ; <nl> + } <nl> } <nl> <nl> / / / Given an explosion with multiple pointer elements in them , pack them <nl> class ScalarExistentialTypeInfoBase : <nl> ( void ) src . claim ( getNumStoredProtocols ( ) ) ; <nl> } <nl> <nl> - void destroy ( IRGenFunction & IGF , Address addr , SILType T ) const override { <nl> + void destroy ( IRGenFunction & IGF , Address addr , SILType T , <nl> + bool isOutlined ) const override { <nl> + / / Small type ( scalar ) do not create outlined function <nl> llvm : : Value * value = asDerived ( ) . loadValue ( IGF , addr ) ; <nl> asDerived ( ) . emitValueRelease ( IGF , value , IGF . getDefaultAtomicity ( ) ) ; <nl> } <nl> mmm a / lib / IRGen / GenFunc . cpp <nl> ppp b / lib / IRGen / GenFunc . cpp <nl> namespace { <nl> llvm_unreachable ( " unowned references to functions are not supported " ) ; <nl> } <nl> <nl> - void destroy ( IRGenFunction & IGF , Address addr , SILType T ) const override { <nl> + void destroy ( IRGenFunction & IGF , Address addr , SILType T , <nl> + bool isOutlined ) const override { <nl> auto data = IGF . Builder . CreateLoad ( projectData ( IGF , addr ) ) ; <nl> if ( ! isPOD ( ResilienceExpansion : : Maximal ) ) <nl> IGF . emitNativeStrongRelease ( data , IGF . getDefaultAtomicity ( ) ) ; <nl> namespace { <nl> SILType T , bool isOutlined ) const override { <nl> IGF . unimplemented ( SourceLoc ( ) , " copying @ block_storage " ) ; <nl> } <nl> - void destroy ( IRGenFunction & IGF , Address addr , SILType T ) const override { <nl> + void destroy ( IRGenFunction & IGF , Address addr , SILType T , <nl> + bool isOutlined ) const override { <nl> IGF . unimplemented ( SourceLoc ( ) , " destroying @ block_storage " ) ; <nl> } <nl> } ; <nl> static llvm : : Function * emitBlockDisposeHelper ( IRGenModule & IGM , <nl> auto storage = Address ( params . claimNext ( ) , blockTL . getFixedAlignment ( ) ) ; <nl> auto capture = blockTL . projectCapture ( IGF , storage ) ; <nl> auto & captureTL = IGM . getTypeInfoForLowered ( blockTy - > getCaptureType ( ) ) ; <nl> - captureTL . destroy ( IGF , capture , blockTy - > getCaptureAddressType ( ) ) ; <nl> + captureTL . destroy ( IGF , capture , blockTy - > getCaptureAddressType ( ) , <nl> + false / * block storage code path : never outlined * / ) ; <nl> IGF . Builder . CreateRetVoid ( ) ; <nl> <nl> return func ; <nl> mmm a / lib / IRGen / GenHeap . cpp <nl> ppp b / lib / IRGen / GenHeap . cpp <nl> static llvm : : Function * createDtorFn ( IRGenModule & IGM , <nl> continue ; <nl> <nl> field . getType ( ) . destroy ( IGF , field . project ( IGF , structAddr , offsets ) , <nl> - fieldTy ) ; <nl> + fieldTy , <nl> + false / * not outlined in heap ' s code paths * / ) ; <nl> } <nl> <nl> emitDeallocateHeapObject ( IGF , & * fn - > arg_begin ( ) , offsets . getSize ( ) , <nl> namespace { <nl> IGF . emitNativeWeakTakeAssign ( destAddr , srcAddr ) ; <nl> } <nl> <nl> - void destroy ( IRGenFunction & IGF , Address addr , SILType T ) const override { <nl> + void destroy ( IRGenFunction & IGF , Address addr , SILType T , <nl> + bool isOutlined ) const override { <nl> IGF . emitNativeWeakDestroy ( addr ) ; <nl> } <nl> <nl> namespace { <nl> IGF . emitUnknownUnownedTakeInit ( dest , src ) ; <nl> } <nl> <nl> - void destroy ( IRGenFunction & IGF , Address addr , <nl> - SILType type ) const override { <nl> + void destroy ( IRGenFunction & IGF , Address addr , SILType type , <nl> + bool isOutlined ) const override { <nl> IGF . emitUnknownUnownedDestroy ( addr ) ; <nl> } <nl> <nl> namespace { <nl> IGF . emitUnknownWeakTakeAssign ( destAddr , srcAddr ) ; <nl> } <nl> <nl> - void destroy ( IRGenFunction & IGF , Address addr , SILType T ) const override { <nl> + void destroy ( IRGenFunction & IGF , Address addr , SILType T , <nl> + bool isOutlined ) const override { <nl> IGF . emitUnknownWeakDestroy ( addr ) ; <nl> } <nl> <nl> mmm a / lib / IRGen / GenInit . cpp <nl> ppp b / lib / IRGen / GenInit . cpp <nl> StackAddress FixedTypeInfo : : allocateStack ( IRGenFunction & IGF , SILType T , <nl> } <nl> <nl> void FixedTypeInfo : : destroyStack ( IRGenFunction & IGF , StackAddress addr , <nl> - SILType T ) const { <nl> - destroy ( IGF , addr . getAddress ( ) , T ) ; <nl> + SILType T , bool isOutlined ) const { <nl> + destroy ( IGF , addr . getAddress ( ) , T , isOutlined ) ; <nl> FixedTypeInfo : : deallocateStack ( IGF , addr , T ) ; <nl> } <nl> <nl> mmm a / lib / IRGen / GenKeyPath . cpp <nl> ppp b / lib / IRGen / GenKeyPath . cpp <nl> getWitnessTableForComputedComponent ( IRGenModule & IGM , <nl> auto elt = IGF . Builder . CreateInBoundsGEP ( componentArgsBuf , offset ) ; <nl> auto eltAddr = ti . getAddressForPointer ( <nl> IGF . Builder . CreateBitCast ( elt , ti . getStorageType ( ) - > getPointerTo ( ) ) ) ; <nl> - ti . destroy ( IGF , eltAddr , ty ) ; <nl> + ti . destroy ( IGF , eltAddr , ty , <nl> + true / * witness table : need it to be fast * / ) ; <nl> auto size = ti . getSize ( IGF , ty ) ; <nl> offset = IGF . Builder . CreateAdd ( offset , size ) ; <nl> } <nl> mmm a / lib / IRGen / GenMeta . cpp <nl> ppp b / lib / IRGen / GenMeta . cpp <nl> namespace { <nl> } <nl> } <nl> } <nl> + <nl> + void addFieldOffsetPlaceholders ( MissingMemberDecl * placeholder ) { <nl> + for ( unsigned i = 0 , <nl> + e = placeholder - > getNumberOfFieldOffsetVectorEntries ( ) ; <nl> + i < e ; + + i ) { <nl> + / / Emit placeholder values for some number of stored properties we <nl> + / / know exist but aren ' t able to reference directly . <nl> + B . addInt ( IGM . SizeTy , 0 ) ; <nl> + } <nl> + } <nl> <nl> void addMethod ( SILDeclRef fn ) { <nl> / / Find the vtable entry . <nl> namespace { <nl> B . addBitCast ( IGM . getDeletedMethodErrorFn ( ) , IGM . FunctionPtrTy ) ; <nl> } <nl> <nl> - void addPlaceholder ( MissingMemberDecl * ) { <nl> - llvm_unreachable ( " cannot generate metadata with placeholders in it " ) ; <nl> + void addPlaceholder ( MissingMemberDecl * m ) { <nl> + assert ( m - > getNumberOfVTableEntries ( ) = = 0 <nl> + & & " cannot generate metadata with placeholders in it " ) ; <nl> } <nl> <nl> void addMethodOverride ( SILDeclRef baseRef , SILDeclRef declRef ) { } <nl> irgen : : emitClassFragileInstanceSizeAndAlignMask ( IRGenFunction & IGF , <nl> / / FIXME : The below checks should capture this property already , but <nl> / / resilient class metadata layout is not fully implemented yet . <nl> auto expansion = IGF . IGM . getResilienceExpansionForLayout ( theClass ) ; <nl> - if ( IGF . IGM . isResilient ( theClass , expansion ) ) { <nl> + if ( theClass - > getParentModule ( ) ! = IGF . IGM . getSwiftModule ( ) ) { <nl> return emitClassResilientInstanceSizeAndAlignMask ( IGF , theClass , metadata ) ; <nl> } <nl> <nl> mmm a / lib / IRGen / GenRecord . h <nl> ppp b / lib / IRGen / GenRecord . h <nl> class RecordTypeInfoImpl : public Base , <nl> } <nl> } <nl> <nl> - void destroy ( IRGenFunction & IGF , Address addr , SILType T ) const override { <nl> - auto offsets = asImpl ( ) . getNonFixedOffsets ( IGF , T ) ; <nl> - for ( auto & field : getFields ( ) ) { <nl> - if ( field . isPOD ( ) ) continue ; <nl> + void destroy ( IRGenFunction & IGF , Address addr , SILType T , <nl> + bool isOutlined ) const override { <nl> + if ( isOutlined | | T . hasOpenedExistential ( ) ) { <nl> + auto offsets = asImpl ( ) . getNonFixedOffsets ( IGF , T ) ; <nl> + for ( auto & field : getFields ( ) ) { <nl> + if ( field . isPOD ( ) ) <nl> + continue ; <nl> <nl> - field . getTypeInfo ( ) . destroy ( IGF , field . projectAddress ( IGF , addr , offsets ) , <nl> - field . getType ( IGF . IGM , T ) ) ; <nl> + field . getTypeInfo ( ) . destroy ( IGF , <nl> + field . projectAddress ( IGF , addr , offsets ) , <nl> + field . getType ( IGF . IGM , T ) , isOutlined ) ; <nl> + } <nl> + } else { <nl> + llvm : : MapVector < CanType , llvm : : Value * > typeToMetadataVec ; <nl> + collectArchetypeMetadata ( IGF , typeToMetadataVec , T ) ; <nl> + IGF . IGM . generateCallToOutlinedDestroy ( IGF , * this , addr , T , <nl> + & typeToMetadataVec ) ; <nl> } <nl> } <nl> <nl> mmm a / lib / IRGen / GenType . cpp <nl> ppp b / lib / IRGen / GenType . cpp <nl> namespace { <nl> void consume ( IRGenFunction & IGF , Explosion & src , <nl> Atomicity atomicity ) const override { } <nl> void fixLifetime ( IRGenFunction & IGF , Explosion & src ) const override { } <nl> - void destroy ( IRGenFunction & IGF , Address addr , SILType T ) const override { } <nl> + void destroy ( IRGenFunction & IGF , Address addr , SILType T , <nl> + bool isOutlined ) const override { } <nl> void packIntoEnumPayload ( IRGenFunction & IGF , EnumPayload & payload , <nl> Explosion & src , unsigned offset ) const override { } <nl> void unpackFromEnumPayload ( IRGenFunction & IGF , <nl> namespace { <nl> explosion . claimNext ( ) ; <nl> } <nl> <nl> - void destroy ( IRGenFunction & IGF , Address address , SILType T ) const override { <nl> + void destroy ( IRGenFunction & IGF , Address address , SILType T , <nl> + bool isOutlined ) const override { <nl> / * nop * / <nl> } <nl> <nl> namespace { <nl> llvm_unreachable ( " cannot opaquely manipulate immovable types ! " ) ; <nl> } <nl> <nl> - void destroy ( IRGenFunction & IGF , Address address , <nl> - SILType T ) const override { <nl> + void destroy ( IRGenFunction & IGF , Address address , SILType T , <nl> + bool isOutlined ) const override { <nl> llvm_unreachable ( " cannot opaquely manipulate immovable types ! " ) ; <nl> } <nl> } ; <nl> mmm a / lib / IRGen / GenValueWitness . cpp <nl> ppp b / lib / IRGen / GenValueWitness . cpp <nl> static void buildValueWitnessFunction ( IRGenModule & IGM , <nl> case ValueWitness : : Destroy : { <nl> Address object = getArgAs ( IGF , argv , type , " object " ) ; <nl> getArgAsLocalSelfTypeMetadata ( IGF , argv , abstractType ) ; <nl> - type . destroy ( IGF , object , concreteType ) ; <nl> + type . destroy ( IGF , object , concreteType , true ) ; <nl> IGF . Builder . CreateRetVoid ( ) ; <nl> return ; <nl> } <nl> mmm a / lib / IRGen / IRGenMangler . h <nl> ppp b / lib / IRGen / IRGenMangler . h <nl> class IRGenMangler : public Mangle : : ASTMangler { <nl> } <nl> return finalize ( ) ; <nl> } <nl> + std : : string mangleOutlinedDestroyFunction ( const CanType t , IRGenModule * mod ) { <nl> + beginMangling ( ) ; <nl> + if ( ! t - > hasArchetype ( ) ) { <nl> + appendType ( t ) ; <nl> + appendOperator ( " Wh " , Index ( 1 ) ) ; <nl> + } else { <nl> + appendModule ( mod - > getSwiftModule ( ) ) ; <nl> + appendOperator ( " y " ) ; <nl> + appendOperator ( " t " ) ; <nl> + appendOperator ( " Wh " , Index ( mod - > getCanTypeID ( t ) ) ) ; <nl> + } <nl> + return finalize ( ) ; <nl> + } <nl> <nl> std : : string manglePartialApplyForwarder ( StringRef FuncName ) ; <nl> <nl> mmm a / lib / IRGen / IRGenModule . h <nl> ppp b / lib / IRGen / IRGenModule . h <nl> class IRGenModule { <nl> const llvm : : MapVector < CanType , llvm : : Value * > * typeToMetadataVec = <nl> nullptr ) ; <nl> <nl> + void generateCallToOutlinedDestroy ( <nl> + IRGenFunction & IGF , const TypeInfo & objectTI , Address addr , SILType T , <nl> + const llvm : : MapVector < CanType , llvm : : Value * > * typeToMetadataVec = <nl> + nullptr ) ; <nl> + <nl> unsigned getCanTypeID ( const CanType type ) ; <nl> <nl> private : <nl> mmm a / lib / IRGen / IRGenSIL . cpp <nl> ppp b / lib / IRGen / IRGenSIL . cpp <nl> void IRGenSILFunction : : visitDestroyAddrInst ( swift : : DestroyAddrInst * i ) { <nl> <nl> / / Otherwise , do the normal thing . <nl> Address base = getLoweredAddress ( i - > getOperand ( ) ) ; <nl> - addrTI . destroy ( * this , base , addrTy ) ; <nl> + addrTI . destroy ( * this , base , addrTy , false / * isOutlined * / ) ; <nl> } <nl> <nl> void IRGenSILFunction : : visitCondFailInst ( swift : : CondFailInst * i ) { <nl> mmm a / lib / IRGen / IndirectTypeInfo . h <nl> ppp b / lib / IRGen / IndirectTypeInfo . h <nl> class IndirectTypeInfo : public Base { <nl> <nl> void assignWithTake ( IRGenFunction & IGF , Address dest , Address src , SILType T , <nl> bool isOutlined ) const override { <nl> - asDerived ( ) . Derived : : destroy ( IGF , dest , T ) ; <nl> + asDerived ( ) . Derived : : destroy ( IGF , dest , T , isOutlined ) ; <nl> asDerived ( ) . Derived : : initializeWithTake ( IGF , dest , src , T , isOutlined ) ; <nl> } <nl> } ; <nl> mmm a / lib / IRGen / NonFixedTypeInfo . h <nl> ppp b / lib / IRGen / NonFixedTypeInfo . h <nl> class WitnessSizedTypeInfo : public IndirectTypeInfo < Impl , TypeInfo > { <nl> emitDeallocateDynamicAlloca ( IGF , stackAddress ) ; <nl> } <nl> <nl> - void destroyStack ( IRGenFunction & IGF , StackAddress stackAddress , <nl> - SILType T ) const override { <nl> + void destroyStack ( IRGenFunction & IGF , StackAddress stackAddress , SILType T , <nl> + bool isOutlined ) const override { <nl> emitDestroyCall ( IGF , T , stackAddress . getAddress ( ) ) ; <nl> deallocateStack ( IGF , stackAddress , T ) ; <nl> } <nl> mmm a / lib / IRGen / ResilientTypeInfo . h <nl> ppp b / lib / IRGen / ResilientTypeInfo . h <nl> class ResilientTypeInfo : public WitnessSizedTypeInfo < Impl > { <nl> emitInitializeArrayWithTakeBackToFrontCall ( IGF , T , dest , src , count ) ; <nl> } <nl> <nl> - void destroy ( IRGenFunction & IGF , Address addr , SILType T ) const override { <nl> + void destroy ( IRGenFunction & IGF , Address addr , SILType T , <nl> + bool isOutlined ) const override { <nl> emitDestroyCall ( IGF , T , addr ) ; <nl> } <nl> <nl> mmm a / lib / IRGen / ScalarTypeInfo . h <nl> ppp b / lib / IRGen / ScalarTypeInfo . h <nl> class SingleScalarTypeInfo : public ScalarTypeInfo < Derived , Base > { <nl> asDerived ( ) . emitScalarFixLifetime ( IGF , value ) ; <nl> } <nl> <nl> - void destroy ( IRGenFunction & IGF , Address addr , SILType T ) const override { <nl> + void destroy ( IRGenFunction & IGF , Address addr , SILType T , <nl> + bool isOutlined ) const override { <nl> if ( ! Derived : : IsScalarPOD ) { <nl> addr = asDerived ( ) . projectScalar ( IGF , addr ) ; <nl> llvm : : Value * value = IGF . Builder . CreateLoad ( addr , " toDestroy " ) ; <nl> mmm a / lib / IRGen / TypeInfo . h <nl> ppp b / lib / IRGen / TypeInfo . h <nl> class TypeInfo { <nl> <nl> / / / Destroy the value of a variable of this type , then deallocate its <nl> / / / memory . <nl> - virtual void destroyStack ( IRGenFunction & IGF , StackAddress addr , <nl> - SILType T ) const = 0 ; <nl> + virtual void destroyStack ( IRGenFunction & IGF , StackAddress addr , SILType T , <nl> + bool isOutlined ) const = 0 ; <nl> <nl> / / / Copy or take a value out of one address and into another , destroying <nl> / / / old value in the destination . Equivalent to either assignWithCopy <nl> class TypeInfo { <nl> bool isOutlined ) const = 0 ; <nl> <nl> / / / Destroy an object of this type in memory . <nl> - virtual void destroy ( IRGenFunction & IGF , Address address , SILType T ) const = 0 ; <nl> + virtual void destroy ( IRGenFunction & IGF , Address address , SILType T , <nl> + bool isOutlined ) const = 0 ; <nl> <nl> / / / Should optimizations be enabled which rely on the representation <nl> / / / for this type being a single object pointer ? <nl> mmm a / lib / SILGen / SILGenType . cpp <nl> ppp b / lib / SILGen / SILGenType . cpp <nl> class SILGenVTable : public SILVTableVisitor < SILGenVTable > { <nl> } <nl> } <nl> <nl> - void addPlaceholder ( MissingMemberDecl * ) { <nl> - llvm_unreachable ( " Should not be emitting class with missing members " ) ; <nl> + void addPlaceholder ( MissingMemberDecl * m ) { <nl> + assert ( m - > getNumberOfVTableEntries ( ) = = 0 <nl> + & & " Should not be emitting class with missing members " ) ; <nl> } <nl> } ; <nl> <nl> mmm a / lib / SILOptimizer / IPO / DeadFunctionElimination . cpp <nl> ppp b / lib / SILOptimizer / IPO / DeadFunctionElimination . cpp <nl> STATISTIC ( NumDeadFunc , " Number of dead functions eliminated " ) ; <nl> <nl> namespace { <nl> <nl> + / / / Returns true if a given function should always be emitted into client . <nl> + / / / Such functions cannot be referenced from outside . <nl> + / / / NOTE : Global initializers are never serialized ( even if e . g . the <nl> + / / / unsafeMutableAddressor is marked as transparent ) and thus they cannot be <nl> + / / / emitted into clients . They should always be emitted into the defining <nl> + / / / module . <nl> + static bool shouldBeAlwaysEmittedIntoClient ( SILFunction * F ) { <nl> + return F - > isTransparent ( ) & & ! F - > isGlobalInit ( ) ; <nl> + } <nl> + <nl> / / / Returns true if a function should be SIL serialized or emitted by IRGen . <nl> static bool shouldBeSerializedOrEmitted ( SILFunction * F ) { <nl> + / / global initializers are always emitted into the defining module and <nl> + / / their bodies are never SIL serialized . <nl> + if ( F - > isGlobalInit ( ) ) <nl> + return true ; <nl> + <nl> / / public_external functions are never SIL serialized or emitted by IRGen . <nl> if ( F - > isAvailableExternally ( ) & & hasPublicVisibility ( F - > getLinkage ( ) ) & & <nl> - ! F - > isTransparent ( ) ) <nl> + ! shouldBeAlwaysEmittedIntoClient ( F ) ) <nl> return false ; <nl> <nl> / / [ serialized ] functions should always be SIL serialized . <nl> class FunctionLivenessComputation { <nl> if ( F - > getRepresentation ( ) = = SILFunctionTypeRepresentation : : ObjCMethod ) <nl> return true ; <nl> <nl> + / / Functions that may be used externally cannot be removed . <nl> + / / But there is one exception from this rule : <nl> + / / If it is a whole - module compilation and the function is supposed to <nl> + / / always be emitted into client then is does not need to be an anchor as <nl> + / / it cannot be invoked from outside the module . <nl> + if ( isPossiblyUsedExternally ( F - > getLinkage ( ) , Module - > isWholeModule ( ) ) & & <nl> + ! shouldBeAlwaysEmittedIntoClient ( F ) ) <nl> + return true ; <nl> + <nl> / / If function is marked as " keep - as - public " , don ' t remove it . <nl> / / Change its linkage to public , so that other applications can refer to it . <nl> / / It is important that this transformation is done at the end of <nl> mmm a / lib / Serialization / Deserialization . cpp <nl> ppp b / lib / Serialization / Deserialization . cpp <nl> ModuleFile : : getDeclCheckedImpl ( DeclID DID , Optional < DeclContext * > ForcedContext <nl> for ( TypeID dependencyID : dependencyIDs ) { <nl> auto dependency = getTypeChecked ( dependencyID ) ; <nl> if ( ! dependency ) { <nl> + / / Stored properties in classes still impact class object layout because <nl> + / / their offset is computed and stored in the field offset vector . <nl> + DeclDeserializationError : : Flags flags ; <nl> + <nl> + if ( ! isStatic ) { <nl> + switch ( ( StorageKind ) storageKind ) { <nl> + case StorageKind : : Stored : <nl> + case StorageKind : : StoredWithObservers : <nl> + case StorageKind : : StoredWithTrivialAccessors : <nl> + flags | = DeclDeserializationError : : Flag : : NeedsFieldOffsetVectorEntry ; <nl> + break ; <nl> + <nl> + case StorageKind : : Addressed : <nl> + case StorageKind : : AddressedWithObservers : <nl> + case StorageKind : : AddressedWithTrivialAccessors : <nl> + case StorageKind : : Computed : <nl> + case StorageKind : : ComputedWithMutableAddress : <nl> + case StorageKind : : InheritedWithObservers : <nl> + break ; <nl> + } <nl> + } <nl> + <nl> return llvm : : make_error < TypeError > ( <nl> - name , takeErrorInfo ( dependency . takeError ( ) ) ) ; <nl> + name , takeErrorInfo ( dependency . takeError ( ) ) , flags ) ; <nl> } <nl> } <nl> <nl> Decl * handleErrorAndSupplyMissingClassMember ( ASTContext & context , <nl> } else if ( error . needsVTableEntry ( ) ) { <nl> suppliedMissingMember = MissingMemberDecl : : forMethod ( <nl> context , containingClass , error . getName ( ) , error . needsVTableEntry ( ) ) ; <nl> + } else if ( error . needsFieldOffsetVectorEntry ( ) ) { <nl> + suppliedMissingMember = MissingMemberDecl : : forStoredProperty ( <nl> + context , containingClass , error . getName ( ) ) ; <nl> } <nl> / / FIXME : Handle other kinds of missing members : properties , <nl> / / subscripts , and methods that don ' t need vtable entries . <nl> mmm a / lib / Serialization / DeserializationErrors . h <nl> ppp b / lib / Serialization / DeserializationErrors . h <nl> class DeclDeserializationError : public llvm : : ErrorInfoBase { <nl> DesignatedInitializer = 1 < < 0 , <nl> NeedsVTableEntry = 1 < < 1 , <nl> NeedsAllocatingVTableEntry = 1 < < 2 , <nl> + NeedsFieldOffsetVectorEntry = 1 < < 3 , <nl> } ; <nl> using Flags = OptionSet < Flag > ; <nl> <nl> class DeclDeserializationError : public llvm : : ErrorInfoBase { <nl> bool needsAllocatingVTableEntry ( ) const { <nl> return flags . contains ( Flag : : NeedsAllocatingVTableEntry ) ; <nl> } <nl> + bool needsFieldOffsetVectorEntry ( ) const { <nl> + return flags . contains ( Flag : : NeedsFieldOffsetVectorEntry ) ; <nl> + } <nl> <nl> bool isA ( const void * const ClassID ) const override { <nl> return ClassID = = classID ( ) | | ErrorInfoBase : : isA ( ClassID ) ; <nl> mmm a / test / DebugInfo / linetable - cleanups . swift <nl> ppp b / test / DebugInfo / linetable - cleanups . swift <nl> func main ( ) { <nl> / / CHECK : call { { . * } } void @ _T04main8markUsedyxlF <nl> / / CHECK : br label <nl> / / CHECK : < label > : <nl> - / / CHECK : , ! dbg ! [ [ LOOPHEADER_LOC : . * ] ] <nl> - / / CHECK : call void { { . * [ rR ] } } elease { { . * } } { { # [ 0 - 9 ] + } } , ! dbg ! [ [ LOOPHEADER_LOC ] ] <nl> + / / CHECK : call % Ts16IndexingIteratorVySaySiGG * @ _T0s16IndexingIteratorVySaySiGGWh0_ ( % Ts16IndexingIteratorVySaySiGG * % " $ element $ generator " ) , ! dbg ! [ [ LOOPHEADER_LOC : . * ] ] <nl> / / CHECK : call { { . * } } void @ _T04main8markUsedyxlF <nl> / / The cleanups should share the line number with the ret stmt . <nl> - / / CHECK : call void @ swift_bridgeObjectRelease ( { { . * } } ) { { # [ 0 - 9 ] + } } , ! dbg ! [ [ CLEANUPS : . * ] ] <nl> + / / CHECK : call % TSa * @ _T0SaySiGWh0_ ( % TSa * % b ) , ! dbg ! [ [ CLEANUPS : . * ] ] <nl> / / CHECK - NEXT : ! dbg ! [ [ CLEANUPS ] ] <nl> / / CHECK - NEXT : llvm . lifetime . end <nl> / / CHECK - NEXT : load <nl> new file mode 100644 <nl> index 000000000000 . . 4593a930436d <nl> mmm / dev / null <nl> ppp b / test / IRGen / Inputs / mixed_mode / ObjCStuff . apinotes <nl> <nl> + Name : ObjCStuff <nl> + SwiftVersions : <nl> + - Version : 4 <nl> + Typedefs : <nl> + - Name : OJCCloudButt <nl> + SwiftName : OJCCloud . Butt <nl> + - Version : 3 <nl> + Typedefs : <nl> + - Name : OJCCloudButt <nl> + SwiftWrapper : none <nl> new file mode 100644 <nl> index 000000000000 . . 63a9d7968a9e <nl> mmm / dev / null <nl> ppp b / test / IRGen / Inputs / mixed_mode / ObjCStuff . h <nl> <nl> + @ import Foundation ; <nl> + <nl> + @ interface OJCCloud : NSObject <nl> + @ end <nl> + <nl> + typedef int OJCCloudButt __attribute__ ( ( swift_wrapper ( struct ) ) ) ; <nl> + <nl> new file mode 100644 <nl> index 000000000000 . . 07871951c1eb <nl> mmm / dev / null <nl> ppp b / test / IRGen / Inputs / mixed_mode / UsingObjCStuff . swift <nl> <nl> + import Foundation <nl> + import ObjCStuff <nl> + <nl> + open class ButtHolder { <nl> + public final var x : Int <nl> + public final var y : [ OJCCloud . Butt : String ] <nl> + @ NSManaged public var magic : [ OJCCloud . Butt : String ] <nl> + public final var z : String <nl> + <nl> + open func virtual ( ) { } <nl> + <nl> + public init ( ) { fatalError ( ) } <nl> + } <nl> new file mode 100644 <nl> index 000000000000 . . 16dd422364d9 <nl> mmm / dev / null <nl> ppp b / test / IRGen / Inputs / mixed_mode / module . modulemap <nl> <nl> + module ObjCStuff { <nl> + header " ObjCStuff . h " <nl> + export * <nl> + } <nl> mmm a / test / IRGen / big_types_corner_cases . sil <nl> ppp b / test / IRGen / big_types_corner_cases . sil <nl> entry ( % b : $ ( BitfieldOne , @ convention ( block ) ( BitfieldOne ) - > ( BitfieldOne ) ) , % x <nl> return % r : $ BitfieldOne <nl> } <nl> <nl> - / / CHECK - LABEL : define { { ( protected ) ? } } swiftcc void @ testBigTempStruct ( % T22big_types_corner_cases13BigTempStructV * noalias nocapture sret , % swift . bridge * , % swift . type * % Element ) # 0 { <nl> + / / CHECK - LABEL : define { { ( protected ) ? } } swiftcc void @ testBigTempStruct ( % T22big_types_corner_cases13BigTempStructV * noalias nocapture sret , % swift . bridge * , % swift . type * % Element ) <nl> / / CHECK : [ [ ALLOC : % . * ] ] = alloca % T22big_types_corner_cases13BigTempStructV <nl> / / CHECK : call swiftcc void @ testBigTempStruct ( % T22big_types_corner_cases13BigTempStructV * noalias nocapture sret [ [ ALLOC ] ] , % swift . bridge * % 1 , % swift . type * % Element ) <nl> / / CHECK : ret void <nl> bb0 ( % 0 : $ _ArrayBuffer < Element > ) : <nl> return % 9 : $ BigTempStruct < Element > <nl> } <nl> <nl> - / / CHECK - LABEL : define { { ( protected ) ? } } swiftcc void @ testTryApply ( % T22big_types_corner_cases9BigStructV * noalias nocapture sret , i8 * , % swift . refcounted * , % swift . refcounted * swiftself , % swift . error * * swifterror ) # 0 { <nl> + / / CHECK - LABEL : define { { ( protected ) ? } } swiftcc void @ testTryApply ( % T22big_types_corner_cases9BigStructV * noalias nocapture sret , i8 * , % swift . refcounted * , % swift . refcounted * swiftself , % swift . error * * swifterror ) <nl> / / CHECK : [ [ ALLOC : % . * ] ] = alloca % T22big_types_corner_cases9BigStructV <nl> / / CHECK : call swiftcc void { { . * } } ( % T22big_types_corner_cases9BigStructV * noalias nocapture sret [ [ ALLOC ] ] <nl> / / CHECK : ret void <nl> bb2 ( % err : $ Error ) : <nl> throw % err : $ Error <nl> } <nl> <nl> - / / CHECK - LABEL : define { { ( protected ) ? } } swiftcc i8 * @ testThinFuncPointer ( % swift . type * % " BigTempStruct < Element > " , % T22big_types_corner_cases13BigTempStructV * noalias nocapture swiftself dereferenceable ( { { . * } } ) # 0 { <nl> + / / CHECK - LABEL : define { { ( protected ) ? } } swiftcc i8 * @ testThinFuncPointer ( % swift . type * % " BigTempStruct < Element > " , % T22big_types_corner_cases13BigTempStructV * noalias nocapture swiftself dereferenceable ( { { . * } } ) <nl> / / CHECK - NEXT : entry <nl> / / CHECK - NEXT : ret i8 * bitcast ( i8 * ( % swift . type * , % T22big_types_corner_cases13BigTempStructV * ) * @ testThinFuncPointer to i8 * ) <nl> sil @ testThinFuncPointer : $ @ convention ( method ) < Element > ( @ guaranteed BigTempStruct < Element > ) - > @ owned Builtin . RawPointer { <nl> bb0 ( % 0 : $ BigTempStruct < Element > ) : <nl> return % ret : $ Builtin . RawPointer <nl> } <nl> <nl> - / / CHECK - LABEL : define { { ( protected ) ? } } swiftcc void @ testFuncWithModBlockStorageApply ( { % objc_block , % swift . function } * nocapture dereferenceable ( { { . * } } ) , % T22big_types_corner_cases9BigStructV * noalias nocapture dereferenceable ( { { . * } } ) # 0 { <nl> + / / CHECK - LABEL : define { { ( protected ) ? } } swiftcc void @ testFuncWithModBlockStorageApply ( { % objc_block , % swift . function } * nocapture dereferenceable ( { { . * } } ) , % T22big_types_corner_cases9BigStructV * noalias nocapture dereferenceable ( { { . * } } ) <nl> / / CHECK : call swiftcc void { { . * } } ( % T22big_types_corner_cases9BigStructV * noalias nocapture dereferenceable ( { { . * } } ) % 1 <nl> / / CHECK : ret void <nl> sil @ testFuncWithModBlockStorageApply : $ @ convention ( thin ) ( @ inout_aliasable @ block_storage @ callee_owned ( @ owned BigStruct ) - > ( ) , BigStruct ) - > ( ) { <nl> bb0 ( % 0 : $ * @ block_storage @ callee_owned ( @ owned BigStruct ) - > ( ) , % 1 : $ BigStruc <nl> <nl> sil public_external @ c_return_func : $ @ convention ( thin ) ( ) - > ( ) - > @ owned BigStruct <nl> <nl> - / / CHECK - LABEL : define { { ( protected ) ? } } swiftcc { i8 * , % swift . refcounted * } @ part_apply_caller ( ) # 0 { <nl> + / / CHECK - LABEL : define { { ( protected ) ? } } swiftcc { i8 * , % swift . refcounted * } @ part_apply_caller ( ) <nl> / / CHECK : [ [ CALLEXT : % . * ] ] = call swiftcc { i8 * , % swift . refcounted * } @ c_return_func ( ) <nl> / / CHECK : [ [ VALEXT : % . * ] ] = extractvalue { i8 * , % swift . refcounted * } [ [ CALLEXT ] ] , 1 <nl> / / CHECK : store % swift . refcounted * [ [ VALEXT ] ] , % swift . refcounted * * <nl> / / CHECK : [ [ RET : % . * ] ] = insertvalue { i8 * , % swift . refcounted * } { i8 * bitcast ( void ( % T22big_types_corner_cases9BigStructV * , i64 , % swift . refcounted * ) * @ _T017part_apply_calleeTA to i8 * ) , % swift . refcounted * undef } , % swift . refcounted * <nl> / / CHECK : ret { i8 * , % swift . refcounted * } [ [ RET ] ] <nl> <nl> - / / CHECK - LABEL : define internal swiftcc void @ _T017part_apply_calleeTA ( % T22big_types_corner_cases9BigStructV * noalias nocapture sret , i64 , % swift . refcounted * swiftself ) # 0 { <nl> + / / CHECK - LABEL : define internal swiftcc void @ _T017part_apply_calleeTA ( % T22big_types_corner_cases9BigStructV * noalias nocapture sret , i64 , % swift . refcounted * swiftself ) <nl> / / CHECK : bitcast % swift . refcounted * % 2 to < { % swift . refcounted , % swift . function } > * <nl> / / CHECK : ret void <nl> <nl> bb0 ( % 0 : $ Builtin . Int64 , % 1 : $ ( ) - > @ owned BigStruct ) : <nl> return undef : $ BigStruct <nl> } <nl> <nl> - / / CHECK - LABEL : define swiftcc void @ poninter_to_mod_ret ( i8 * , % swift . refcounted * ) # 0 { <nl> + / / CHECK - LABEL : define swiftcc void @ poninter_to_mod_ret ( i8 * , % swift . refcounted * ) <nl> / / CHECK : [ [ BITCAST : % . * ] ] = bitcast i8 * % 0 to { i8 * , % swift . refcounted * } ( % swift . refcounted * ) * <nl> / / CHECK : [ [ CALL : % . * ] ] = call swiftcc { i8 * , % swift . refcounted * } [ [ BITCAST ] ] ( % swift . refcounted * swiftself % 1 ) <nl> / / CHECK : extractvalue { i8 * , % swift . refcounted * } [ [ CALL ] ] , 0 <nl> bb0 ( % funcpointer : $ @ callee_owned ( ) - > @ owned @ callee_owned ( @ owned Builtin . Int <nl> return % ret : $ ( ) <nl> } <nl> <nl> - / / CHECK - LABEL : define swiftcc { i64 , i64 } @ ret_pointer_to_mod ( ) # 0 { <nl> + / / CHECK - LABEL : define swiftcc { i64 , i64 } @ ret_pointer_to_mod ( ) <nl> / / CHECK - NEXT : entry <nl> / / CHECK - NEXT : ret { i64 , i64 } zeroinitializer <nl> sil @ ret_pointer_to_mod : $ @ convention ( thin ) ( ) - > @ owned Optional < @ callee_owned ( ) - > @ owned Optional < BigStruct > > { <nl> sil @ get_optional_none : $ @ convention ( method ) < τ_0_0 > ( @ thin Optional < τ_0_0 > . T <nl> sil @ short_circuit_operation : $ @ convention ( thin ) < τ_0_0 > ( @ in Optional < τ_0_0 > , @ owned @ callee_owned ( ) - > ( @ out τ_0_0 , @ error Error ) ) - > ( @ out τ_0_0 , @ error Error ) <nl> sil @ autoclosure_partialapply : $ @ convention ( thin ) ( @ owned @ callee_owned ( ) - > ( BigStruct , @ error Error ) ) - > ( @ out BigStruct , @ error Error ) <nl> <nl> - / / CHECK - LABEL : define { { ( protected ) ? } } swiftcc void @ closure ( % T22big_types_corner_cases9BigStructV * noalias nocapture sret , % T22big_types_corner_cases8SuperSubC * ) # 0 { <nl> + / / CHECK - LABEL : define { { ( protected ) ? } } swiftcc void @ closure ( % T22big_types_corner_cases9BigStructV * noalias nocapture sret , % T22big_types_corner_cases8SuperSubC * ) <nl> / / CHECK - 64 : [ [ ALLOC1 : % . * ] ] = alloca % T22big_types_corner_cases9BigStructV <nl> / / CHECK - 64 : [ [ ALLOC2 : % . * ] ] = alloca % T22big_types_corner_cases9BigStructV <nl> / / CHECK - 64 : [ [ ALLOC3 : % . * ] ] = alloca % T22big_types_corner_cases9BigStructVSg <nl> bb2 ( % 24 : $ Error ) : <nl> <nl> sil @ returnBigStruct : $ @ convention ( thin ) ( ) - > @ owned BigStruct <nl> <nl> - / / CHECK - LABEL : define { { ( protected ) ? } } swiftcc void @ closureToConvert ( ) # 0 { <nl> + / / CHECK - LABEL : define { { ( protected ) ? } } swiftcc void @ closureToConvert ( ) <nl> / / CHECK : entry : <nl> / / CHECK : [ [ ALLOC : % . * ] ] = alloca % T22big_types_corner_cases9BigStructV <nl> / / CHECK : call swiftcc void @ returnBigStruct ( % T22big_types_corner_cases9BigStructV * noalias nocapture sret [ [ ALLOC ] ] ) <nl> bb0 : <nl> return % 99 : $ ( ) <nl> } <nl> <nl> - / / CHECK - LABEL : define { { ( protected ) ? } } swiftcc void @ testConvertFunc ( ) # 0 { <nl> + / / CHECK - LABEL : define { { ( protected ) ? } } swiftcc void @ testConvertFunc ( ) <nl> / / CHECK : entry : <nl> / / CHECK : call swiftcc void bitcast ( void ( ) * @ closureToConvert to void ( % swift . refcounted * ) * ) ( % swift . refcounted * swiftself null ) <nl> / / CHECK : ret void <nl> bb0 : <nl> <nl> sil @ convertToThickHelper : $ @ convention ( thin ) ( @ owned BigStruct ) - > ( ) <nl> <nl> - / / CHECK - LABAL : define { { . * } } swiftcc void @ convertToThick ( % T22big_types_corner_cases9BigStructV * noalias nocapture dereferenceable ( { { . * } } ) ) # 0 { <nl> + / / CHECK - LABAL : define { { . * } } swiftcc void @ convertToThick ( % T22big_types_corner_cases9BigStructV * noalias nocapture dereferenceable ( { { . * } } ) ) <nl> / / CHECK : entry : <nl> / / CHECK : [ [ ALLOC : % . * ] ] = alloca % T22big_types_corner_cases9BigStructV , align 4 <nl> / / CHECK : call void @ llvm . memcpy . p0i8 . p0i8 . i64 <nl> mmm a / test / IRGen / big_types_corner_cases . swift <nl> ppp b / test / IRGen / big_types_corner_cases . swift <nl> class OptionalInoutFuncType { <nl> } <nl> } <nl> <nl> - / / CHECK - LABEL : define { { ( protected ) ? } } i32 @ main ( i32 , i8 * * ) # 0 { <nl> + / / CHECK - LABEL : define { { ( protected ) ? } } i32 @ main ( i32 , i8 * * ) <nl> / / CHECK : call void @ llvm . lifetime . start <nl> / / CHECK : call void @ llvm . memcpy <nl> / / CHECK : call void @ llvm . lifetime . end <nl> public class BigClass { <nl> } <nl> } <nl> <nl> - / / CHECK - LABEL : define { { ( protected ) ? } } hidden swiftcc void @ _T022big_types_corner_cases8BigClassC03useE6StructyAA0eH0V0aH0_tF ( % T22big_types_corner_cases9BigStructV * noalias nocapture dereferenceable ( { { . * } } ) , % T22big_types_corner_cases8BigClassC * swiftself ) # 0 { <nl> + / / CHECK - LABEL : define { { ( protected ) ? } } hidden swiftcc void @ _T022big_types_corner_cases8BigClassC03useE6StructyAA0eH0V0aH0_tF ( % T22big_types_corner_cases9BigStructV * noalias nocapture dereferenceable ( { { . * } } ) , % T22big_types_corner_cases8BigClassC * swiftself ) <nl> / / CHECK : getelementptr inbounds % T22big_types_corner_cases8BigClassC , % T22big_types_corner_cases8BigClassC * <nl> / / CHECK : call void @ _T0SqWy <nl> / / CHECK : [ [ BITCAST : % . * ] ] = bitcast i8 * { { . * } } to void ( % T22big_types_corner_cases9BigStructV * , % swift . refcounted * ) * <nl> public func enumCallee ( _ x : LargeEnum ) { <nl> / / CHECK - 64 : _T0s5printyypd_SS9separatorSS10terminatortF <nl> / / CHECK - 64 : ret void <nl> <nl> - / / CHECK - LABEL : define { { ( protected ) ? } } internal swiftcc void @ _T022big_types_corner_cases8SuperSubC1fyyFAA9BigStructVycfU_ ( % T22big_types_corner_cases9BigStructV * noalias nocapture sret , % T22big_types_corner_cases8SuperSubC * ) # 0 { <nl> + / / CHECK - LABEL : define { { ( protected ) ? } } internal swiftcc void @ _T022big_types_corner_cases8SuperSubC1fyyFAA9BigStructVycfU_ ( % T22big_types_corner_cases9BigStructV * noalias nocapture sret , % T22big_types_corner_cases8SuperSubC * ) <nl> / / CHECK - 64 : [ [ ALLOC1 : % . * ] ] = alloca % T22big_types_corner_cases9BigStructV <nl> / / CHECK - 64 : [ [ ALLOC2 : % . * ] ] = alloca % T22big_types_corner_cases9BigStructV <nl> / / CHECK - 64 : [ [ ALLOC3 : % . * ] ] = alloca % T22big_types_corner_cases9BigStructVSg <nl> class SuperSub : SuperBase { <nl> } <nl> } <nl> <nl> - / / CHECK - LABEL : define { { ( protected ) ? } } swiftcc void @ _T022big_types_corner_cases10MUseStructV16superclassMirrorAA03BigF0VSgvg ( % T22big_types_corner_cases9BigStructVSg * noalias nocapture sret , % T22big_types_corner_cases10MUseStructV * noalias nocapture swiftself dereferenceable ( { { . * } } ) ) # 0 { <nl> + / / CHECK - LABEL : define { { ( protected ) ? } } swiftcc void @ _T022big_types_corner_cases10MUseStructV16superclassMirrorAA03BigF0VSgvg ( % T22big_types_corner_cases9BigStructVSg * noalias nocapture sret , % T22big_types_corner_cases10MUseStructV * noalias nocapture swiftself dereferenceable ( { { . * } } ) ) <nl> / / CHECK : [ [ ALLOC : % . * ] ] = alloca % T22big_types_corner_cases9BigStructVSg <nl> / / CHECK : [ [ LOAD : % . * ] ] = load % swift . refcounted * , % swift . refcounted * * % . callInternalLet . data <nl> / / CHECK : call swiftcc void % 7 ( % T22big_types_corner_cases9BigStructVSg * noalias nocapture sret [ [ ALLOC ] ] , % swift . refcounted * swiftself [ [ LOAD ] ] ) <nl> func bigStructGet ( ) - > BigStruct { <nl> return BigStruct ( ) <nl> } <nl> <nl> - / / CHECK - LABEL : define { { ( protected ) ? } } swiftcc void @ _T022big_types_corner_cases11testGetFuncyyF ( ) # 0 { <nl> + / / CHECK - LABEL : define { { ( protected ) ? } } swiftcc void @ _T022big_types_corner_cases11testGetFuncyyF ( ) <nl> / / CHECK : ret void <nl> public func testGetFunc ( ) { <nl> let testGetPtr : @ convention ( thin ) ( ) - > BigStruct = bigStructGet <nl> mmm a / test / IRGen / big_types_tests . sil <nl> ppp b / test / IRGen / big_types_tests . sil <nl> public struct BigStruct { <nl> <nl> / / CHECK - LABEL : define { { ( protected ) ? } } swiftcc void @ testDestroyValue ( % T15big_types_tests9BigStructV * noalias nocapture dereferenceable ( { { . * } } ) # 0 { <nl> / / CHECK - NEXT : entry <nl> + / / CHECK - NEXT : call % T15big_types_tests9BigStructV * @ _T015big_types_tests9BigStructVWh0_ ( % T15big_types_tests9BigStructV * % 0 ) <nl> / / CHECK - NEXT : ret void <nl> sil @ testDestroyValue : $ @ convention ( thin ) ( @ owned BigStruct ) - > ( ) { <nl> entry ( % x : $ BigStruct ) : <nl> mmm a / test / IRGen / existentials . sil <nl> ppp b / test / IRGen / existentials . sil <nl> entry ( % w : $ * @ sil_weak CP ? , % a : $ CP ? ) : <nl> / / CHECK : call { % swift . weak , i8 * * } * @ _T012existentials2CP_pSgXwWf0_ ( { % swift . weak , i8 * * } * % 0 , { % swift . weak , i8 * * } * [ [ V ] ] ) <nl> copy_addr % w to % v : $ * @ sil_weak CP ? <nl> <nl> - / / CHECK : [ [ REF_ADDR : % . * ] ] = getelementptr inbounds { % swift . weak , i8 * * } , { % swift . weak , i8 * * } * [ [ V ] ] , i32 0 , i32 0 <nl> - / / CHECK : call void @ swift_weakDestroy ( % swift . weak * [ [ REF_ADDR ] ] ) <nl> + / / CHECK : call { % swift . weak , i8 * * } * @ _T012existentials2CP_pSgXwWh0_ ( { % swift . weak , i8 * * } * [ [ V ] ] ) <nl> destroy_addr % v : $ * @ sil_weak CP ? <nl> <nl> dealloc_stack % v : $ * @ sil_weak CP ? <nl> mmm a / test / IRGen / existentials_objc . sil <nl> ppp b / test / IRGen / existentials_objc . sil <nl> entry ( % w : $ * @ sil_weak CP ? , % a : $ CP ? ) : <nl> / / CHECK : call { % swift . weak , i8 * * } * @ _T017existentials_objc2CP_pSgXwWf0_ ( { % swift . weak , i8 * * } * % 0 , { % swift . weak , i8 * * } * [ [ V ] ] ) <nl> copy_addr % w to % v : $ * @ sil_weak CP ? <nl> <nl> - / / CHECK : [ [ REF_ADDR : % . * ] ] = getelementptr inbounds { % swift . weak , i8 * * } , { % swift . weak , i8 * * } * [ [ V ] ] , i32 0 , i32 0 <nl> - / / CHECK : call void @ swift_unknownWeakDestroy ( % swift . weak * [ [ REF_ADDR ] ] ) <nl> + / / CHECK : call { % swift . weak , i8 * * } * @ _T017existentials_objc2CP_pSgXwWh0_ ( { % swift . weak , i8 * * } * [ [ V ] ] ) <nl> destroy_addr % v : $ * @ sil_weak CP ? <nl> <nl> dealloc_stack % v : $ * @ sil_weak CP ? <nl> new file mode 100644 <nl> index 000000000000 . . a9f1f294036d <nl> mmm / dev / null <nl> ppp b / test / IRGen / mixed_mode_class_with_unimportable_fields . sil <nl> <nl> + / / RUN : rm - rf % t <nl> + / / RUN : mkdir - p % t <nl> + / / RUN : % target - swift - frontend - emit - module - o % t / UsingObjCStuff . swiftmodule - module - name UsingObjCStuff - I % t - I % S / Inputs / mixed_mode - swift - version 4 % S / Inputs / mixed_mode / UsingObjCStuff . swift <nl> + / / RUN : % target - swift - frontend - emit - ir - I % t - I % S / Inputs / mixed_mode - module - name main - swift - version 3 % s | % FileCheck % s - - check - prefix = CHECK - - check - prefix = CHECK - % target - ptrsize <nl> + / / RUN : % target - swift - frontend - emit - ir - I % t - I % S / Inputs / mixed_mode - module - name main - swift - version 4 % s | % FileCheck % s - - check - prefix = CHECK - - check - prefix = CHECK - % target - ptrsize <nl> + <nl> + / / REQUIRES : objc_interop <nl> + <nl> + import Swift <nl> + import UsingObjCStuff <nl> + <nl> + class SubButtHolder : ButtHolder { <nl> + var w : Double = 0 <nl> + } <nl> + <nl> + sil_vtable SubButtHolder { } <nl> + <nl> + / / CHECK - LABEL : define { { . * } } @ getHolder <nl> + sil @ getHolder : $ @ convention ( thin ) ( ) - > @ owned ButtHolder { <nl> + entry : <nl> + / / We should load the dimensions of the class instance from metadata , not try <nl> + / / to hardcode constants . <nl> + / / CHECK : [ [ METADATA : % . * ] ] = call % swift . type * @ _T014UsingObjCStuff10ButtHolderCMa ( ) <nl> + / / CHECK - 64 : [ [ SIZE32 : % . * ] ] = load i32 <nl> + / / CHECK - 64 : [ [ SIZE : % . * ] ] = zext i32 [ [ SIZE32 ] ] to <nl> + / / CHECK - 32 : [ [ SIZE : % . * ] ] = load i32 <nl> + / / CHECK : [ [ ALIGN16 : % . * ] ] = load i16 <nl> + / / CHECK : [ [ ALIGN : % . * ] ] = zext i16 [ [ ALIGN16 ] ] to [ [ WORD : i32 | i64 ] ] <nl> + / / CHECK : call noalias % swift . refcounted * @ swift_rt_swift_allocObject ( % swift . type * [ [ METADATA ] ] , [ [ WORD ] ] [ [ SIZE ] ] , [ [ WORD ] ] [ [ ALIGN ] ] ) <nl> + % x = alloc_ref $ ButtHolder <nl> + return % x : $ ButtHolder <nl> + } <nl> new file mode 100644 <nl> index 000000000000 . . 88fb626a7ec8 <nl> mmm / dev / null <nl> ppp b / test / IRGen / mixed_mode_class_with_unimportable_fields . swift <nl> <nl> + / / RUN : rm - rf % t <nl> + / / RUN : mkdir - p % t <nl> + / / RUN : % target - swift - frontend - emit - module - o % t / UsingObjCStuff . swiftmodule - module - name UsingObjCStuff - I % t - I % S / Inputs / mixed_mode - swift - version 4 % S / Inputs / mixed_mode / UsingObjCStuff . swift <nl> + / / RUN : % target - swift - frontend - emit - ir - I % t - I % S / Inputs / mixed_mode - module - name main - swift - version 3 % s | % FileCheck % s - - check - prefix = CHECK - - check - prefix = CHECK - % target - ptrsize <nl> + / / RUN : % target - swift - frontend - emit - ir - I % t - I % S / Inputs / mixed_mode - module - name main - swift - version 4 % s | % FileCheck % s - - check - prefix = CHECK - - check - prefix = CHECK - % target - ptrsize <nl> + <nl> + / / REQUIRES : objc_interop <nl> + <nl> + import UsingObjCStuff <nl> + <nl> + public class SubButtHolder : ButtHolder { <nl> + final var w : Double = 0 <nl> + <nl> + override public func virtual ( ) { } <nl> + <nl> + public func subVirtual ( ) { } <nl> + } <nl> + <nl> + public class SubSubButtHolder : SubButtHolder { <nl> + public override func virtual ( ) { } <nl> + public override func subVirtual ( ) { } <nl> + } <nl> + <nl> + / / CHECK - LABEL : define { { . * } } @ { { . * } } accessFinalFields <nl> + public func accessFinalFields ( of holder : ButtHolder ) - > ( Any , Any ) { <nl> + / / x and z came from the other module , so we should use their accessors . <nl> + / / CHECK : [ [ OFFSET : % . * ] ] = load [ [ WORD : i [ 0 - 9 ] + ] ] , [ [ WORD ] ] * @ _T014UsingObjCStuff10ButtHolderC1xSivpWvd <nl> + / / CHECK : [ [ INSTANCE_RAW : % . * ] ] = bitcast { { . * } } to i8 * <nl> + / / CHECK : getelementptr inbounds i8 , i8 * [ [ INSTANCE_RAW ] ] , [ [ WORD ] ] [ [ OFFSET ] ] <nl> + <nl> + / / CHECK : [ [ OFFSET : % . * ] ] = load [ [ WORD ] ] , [ [ WORD ] ] * @ _T014UsingObjCStuff10ButtHolderC1zSSvpWvd <nl> + / / CHECK : [ [ INSTANCE_RAW : % . * ] ] = bitcast { { . * } } to i8 * <nl> + / / CHECK : getelementptr inbounds i8 , i8 * [ [ INSTANCE_RAW ] ] , [ [ WORD ] ] [ [ OFFSET ] ] <nl> + return ( holder . x , holder . z ) <nl> + } <nl> + <nl> + / / CHECK - LABEL : define { { . * } } @ { { . * } } accessFinalFields <nl> + public func accessFinalFields ( ofSub holder : SubButtHolder ) - > ( Any , Any , Any ) { <nl> + / / We should use the runtime - adjusted ivar offsets since we may not have <nl> + / / a full picture of the layout in mixed Swift language version modes . <nl> + / / CHECK : [ [ OFFSET : % . * ] ] = load [ [ WORD ] ] , [ [ WORD ] ] * @ _T014UsingObjCStuff10ButtHolderC1xSivpWvd <nl> + / / CHECK : [ [ INSTANCE_RAW : % . * ] ] = bitcast { { . * } } to i8 * <nl> + / / CHECK : getelementptr inbounds i8 , i8 * [ [ INSTANCE_RAW ] ] , [ [ WORD ] ] [ [ OFFSET ] ] <nl> + <nl> + / / CHECK : [ [ OFFSET : % . * ] ] = load [ [ WORD ] ] , [ [ WORD ] ] * @ _T014UsingObjCStuff10ButtHolderC1zSSvpWvd <nl> + / / CHECK : [ [ INSTANCE_RAW : % . * ] ] = bitcast { { . * } } to i8 * <nl> + / / CHECK : getelementptr inbounds i8 , i8 * [ [ INSTANCE_RAW ] ] , [ [ WORD ] ] [ [ OFFSET ] ] <nl> + <nl> + / / CHECK : [ [ OFFSET : % . * ] ] = load [ [ WORD ] ] , [ [ WORD ] ] * @ _T04main13SubButtHolderC1wSdvpWvd <nl> + <nl> + / / CHECK : [ [ INSTANCE_RAW : % . * ] ] = bitcast { { . * } } to i8 * <nl> + / / CHECK : getelementptr inbounds i8 , i8 * [ [ INSTANCE_RAW ] ] , [ [ WORD ] ] [ [ OFFSET ] ] <nl> + return ( holder . x , holder . z , holder . w ) <nl> + } <nl> + <nl> + / / CHECK - LABEL : define { { . * } } @ { { . * } } invokeMethod <nl> + public func invokeMethod ( on holder : SubButtHolder ) { <nl> + / / CHECK - 64 : [ [ IMPL_ADDR : % . * ] ] = getelementptr inbounds { { . * } } , [ [ WORD ] ] 10 <nl> + / / CHECK - 32 : [ [ IMPL_ADDR : % . * ] ] = getelementptr inbounds { { . * } } , [ [ WORD ] ] 13 <nl> + / / CHECK : [ [ IMPL : % . * ] ] = load { { . * } } [ [ IMPL_ADDR ] ] <nl> + / / CHECK : call swiftcc void [ [ IMPL ] ] <nl> + holder . virtual ( ) <nl> + / / CHECK - 64 : [ [ IMPL_ADDR : % . * ] ] = getelementptr inbounds { { . * } } , [ [ WORD ] ] 15 <nl> + / / CHECK - 32 : [ [ IMPL_ADDR : % . * ] ] = getelementptr inbounds { { . * } } , [ [ WORD ] ] 18 <nl> + / / CHECK : [ [ IMPL : % . * ] ] = load { { . * } } [ [ IMPL_ADDR ] ] <nl> + / / CHECK : call swiftcc void [ [ IMPL ] ] <nl> + holder . subVirtual ( ) <nl> + } <nl> mmm a / test / IRGen / partial_apply . sil <nl> ppp b / test / IRGen / partial_apply . sil <nl> sil public_external @ generic_indirect_return2 : $ @ convention ( thin ) < T > ( Int ) - > <nl> / / CHECK - LABEL : define { { . * } } @ partial_apply_generic_indirect_return2 <nl> / / CHECK : insertvalue { { . * } } _T024generic_indirect_return2TA <nl> <nl> - / / CHECK - LABEL : define internal swiftcc void @ _T024generic_indirect_return2TA ( % T13partial_apply12GenericEnum2OySiG * noalias nocapture sret , % swift . refcounted * swiftself ) # 0 { <nl> + / / CHECK - LABEL : define internal swiftcc void @ _T024generic_indirect_return2TA ( % T13partial_apply12GenericEnum2OySiG * noalias nocapture sret , % swift . refcounted * swiftself ) <nl> / / CHECK : [ [ CASTED_ADDR : % . * ] ] = bitcast % T13partial_apply12GenericEnum2OySiG * % 0 to % T13partial_apply12GenericEnum2O * <nl> / / CHECK : call swiftcc void @ generic_indirect_return2 ( % T13partial_apply12GenericEnum2O * noalias nocapture sret [ [ CASTED_ADDR ] ] <nl> / / CHECK : ret void <nl> mmm a / test / IRGen / unowned_objc . sil <nl> ppp b / test / IRGen / unowned_objc . sil <nl> bb0 ( % p : $ P , % q : $ P ) : <nl> / / CHECK - NEXT : call void @ swift_unknownRelease ( [ [ UNKNOWN ] ] * [ [ TV ] ] ) <nl> strong_release % t1 : $ P <nl> <nl> - / / CHECK - NEXT : [ [ T0 : % . * ] ] = getelementptr inbounds [ [ UREF ] ] , [ [ UREF ] ] * [ [ X ] ] , i32 0 , i32 0 <nl> - / / CHECK - NEXT : call void @ swift_unknownUnownedDestroy ( % swift . unowned * [ [ T0 ] ] ) <nl> + / / CHECK - NEXT : call { % swift . unowned , i8 * * } * @ _T012unowned_objc1P_pXoWh0_ ( { % swift . unowned , i8 * * } * <nl> destroy_addr % x : $ * @ sil_unowned P <nl> <nl> / / CHECK - NEXT : bitcast <nl> mmm a / test / IRGen / weak . sil <nl> ppp b / test / IRGen / weak . sil <nl> bb0 ( % 0 : $ Optional < P > ) : <nl> / / CHECK - NEXT : store i8 * * [ [ TMPTAB : % . * ] ] , i8 * * * [ [ T0 ] ] , align 8 <nl> / / CHECK - NEXT : [ [ T0 : % . * ] ] = getelementptr inbounds { [ [ WEAK ] ] , i8 * * } , { [ [ WEAK ] ] , i8 * * } * [ [ X ] ] , i32 0 , i32 0 <nl> / / CHECK - NEXT : call [ [ WEAK ] ] * @ swift_unknownWeakInit ( [ [ WEAK ] ] * returned [ [ T0 ] ] , [ [ UNKNOWN ] ] * [ [ TMPOBJ : % . * ] ] ) <nl> - / / CHECK - NEXT : [ [ T0 : % . * ] ] = getelementptr inbounds { [ [ WEAK ] ] , i8 * * } , { [ [ WEAK ] ] , i8 * * } * [ [ X ] ] , i32 0 , i32 0 <nl> - / / CHECK - NEXT : call void @ swift_unknownWeakDestroy ( [ [ WEAK ] ] * [ [ T0 ] ] ) <nl> + / / CHECK - NEXT : call { % swift . weak , i8 * * } * @ _T04weak1P_pSgXwWh0_ ( { % swift . weak , i8 * * } * [ [ X ] ] ) <nl> / / CHECK - NEXT : bitcast <nl> / / CHECK - NEXT : llvm . lifetime . end <nl> / / CHECK - NEXT : ret void <nl> new file mode 100644 <nl> index 000000000000 . . 4593a930436d <nl> mmm / dev / null <nl> ppp b / test / Interpreter / SDK / Inputs / mixed_mode / ObjCStuff . apinotes <nl> <nl> + Name : ObjCStuff <nl> + SwiftVersions : <nl> + - Version : 4 <nl> + Typedefs : <nl> + - Name : OJCCloudButt <nl> + SwiftName : OJCCloud . Butt <nl> + - Version : 3 <nl> + Typedefs : <nl> + - Name : OJCCloudButt <nl> + SwiftWrapper : none <nl> new file mode 100644 <nl> index 000000000000 . . 63a9d7968a9e <nl> mmm / dev / null <nl> ppp b / test / Interpreter / SDK / Inputs / mixed_mode / ObjCStuff . h <nl> <nl> + @ import Foundation ; <nl> + <nl> + @ interface OJCCloud : NSObject <nl> + @ end <nl> + <nl> + typedef int OJCCloudButt __attribute__ ( ( swift_wrapper ( struct ) ) ) ; <nl> + <nl> new file mode 100644 <nl> index 000000000000 . . 8e7c3727e338 <nl> mmm / dev / null <nl> ppp b / test / Interpreter / SDK / Inputs / mixed_mode / UsingObjCStuff . swift <nl> <nl> + import Foundation <nl> + import ObjCStuff <nl> + <nl> + open class ButtHolder { <nl> + public final var x : Int <nl> + public final var y : [ OJCCloud . Butt : String ] <nl> + public final var z : String <nl> + <nl> + open func virtual ( ) { <nl> + print ( " \ ( x ) \ ( y ) \ ( z ) " ) <nl> + } <nl> + <nl> + public init ( ) { x = 0 ; y = [ : ] ; z = " " } <nl> + } <nl> new file mode 100644 <nl> index 000000000000 . . 16dd422364d9 <nl> mmm / dev / null <nl> ppp b / test / Interpreter / SDK / Inputs / mixed_mode / module . modulemap <nl> <nl> + module ObjCStuff { <nl> + header " ObjCStuff . h " <nl> + export * <nl> + } <nl> new file mode 100644 <nl> index 000000000000 . . be9b2bb15500 <nl> mmm / dev / null <nl> ppp b / test / Interpreter / SDK / mixed_mode_class_with_missing_properties . swift <nl> <nl> + / / RUN : rm - rf % t <nl> + / / RUN : mkdir - p % t <nl> + / / RUN : cp % s % t / main . swift <nl> + / / RUN : % target - build - swift - whole - module - optimization - emit - module - path % t / UsingObjCStuff . swiftmodule - c - o % t / UsingObjCStuff . o - module - name UsingObjCStuff - I % t - I % S / Inputs / mixed_mode - swift - version 4 - parse - as - library % S / Inputs / mixed_mode / UsingObjCStuff . swift <nl> + / / RUN : % target - build - swift - o % t / a . out . v3 - I % t - I % S / Inputs / mixed_mode - module - name main - swift - version 3 % t / main . swift % t / UsingObjCStuff . o <nl> + / / RUN : % target - build - swift - o % t / a . out . v4 - I % t - I % S / Inputs / mixed_mode - module - name main - swift - version 4 % t / main . swift % t / UsingObjCStuff . o <nl> + / / RUN : % target - run % t / a . out . v3 | % FileCheck % s <nl> + / / RUN : % target - run % t / a . out . v4 | % FileCheck % s <nl> + <nl> + / / REQUIRES : objc_interop <nl> + / / REQUIRES : executable_test <nl> + <nl> + import UsingObjCStuff <nl> + <nl> + print ( " Let ' s go " ) / / CHECK : Let ' s go <nl> + <nl> + let holder = ButtHolder ( ) <nl> + holder . x + = 17 <nl> + print ( holder . x ) / / CHECK - NEXT : 17 <nl> + holder . x + = 38 <nl> + print ( holder . x ) / / CHECK - NEXT : 55 <nl> + holder . z + = " hello " <nl> + print ( holder . z ) / / CHECK - NEXT : hello <nl> + holder . z + = " world " <nl> + print ( holder . z ) / / CHECK - NEXT : hello world <nl> + <nl> + holder . virtual ( ) / / CHECK - NEXT : 55 [ : ] hello world <nl> + <nl> + class SubButtHolder : ButtHolder { <nl> + final var w : Double = 0 <nl> + <nl> + override func virtual ( ) { <nl> + print ( " ~ * " , terminator : " " ) <nl> + super . virtual ( ) <nl> + print ( " \ ( w ) * ~ " ) <nl> + } <nl> + <nl> + func subVirtual ( ) { <nl> + print ( " ~ * \ ( x ) ~ * ~ \ ( z ) ~ * ~ \ ( w ) * ~ " ) <nl> + } <nl> + } <nl> + <nl> + class SubSubButtHolder : SubButtHolder { <nl> + override func virtual ( ) { <nl> + print ( " ! ! ! " , terminator : " " ) <nl> + super . virtual ( ) <nl> + print ( " ! ! ! " ) <nl> + } <nl> + override func subVirtual ( ) { <nl> + print ( " ! ! ! " , terminator : " " ) <nl> + super . subVirtual ( ) <nl> + print ( " ! ! ! " ) <nl> + } <nl> + } <nl> + <nl> + @ inline ( never ) <nl> + func exerciseSubHolder ( with subHolder : SubButtHolder ) { <nl> + subHolder . x = 679 <nl> + subHolder . z = " goodbye folks " <nl> + subHolder . w = 90 . 5 <nl> + <nl> + subHolder . virtual ( ) / / CHECK - NEXT : ! ! ! ~ * 679 [ : ] goodbye folks <nl> + / / CHECK - NEXT : 90 . 5 * ~ <nl> + / / CHECK - NEXT : ! ! ! <nl> + subHolder . subVirtual ( ) / / CHECK - NEXT : ! ! ! ~ * 679 ~ * ~ goodbye folks ~ * ~ 90 . 5 * ~ <nl> + / / CHECK - NEXT : ! ! ! <nl> + } <nl> + <nl> + exerciseSubHolder ( with : SubSubButtHolder ( ) ) <nl> + <nl> + <nl> + print ( " OK that ' s it " ) / / CHECK - NEXT : OK that ' s it <nl> mmm a / test / RemoteAST / member_offsets . swift <nl> ppp b / test / RemoteAST / member_offsets . swift <nl> printTypeMemberOffset ( B < Float > . self , " e " ) <nl> <nl> printTypeMemberOffset ( B < Float > . self , " f " ) <nl> / / CHECK - NEXT : type has no member named ' f ' <nl> - <nl> - <nl> - class C { <nl> - var a : Int <nl> - var b : Bool <nl> - var c : Float <nl> - var d : Bool <nl> - var e : Int16 <nl> - <nl> - init ( ) { <nl> - a = 0 ; b = false ; c = 0 ; d = false ; e = 0 <nl> - } <nl> - } <nl> - <nl> - printTypeMemberOffset ( C . self , " a " ) <nl> - / / CHECK - NEXT : found offset : 16 <nl> - <nl> - printTypeMemberOffset ( C . self , " b " ) <nl> - / / CHECK - NEXT : found offset : 24 <nl> - <nl> - printTypeMemberOffset ( C . self , " c " ) <nl> - / / CHECK - NEXT : found offset : 28 <nl> - <nl> - printTypeMemberOffset ( C . self , " d " ) <nl> - / / CHECK - NEXT : found offset : 32 <nl> - <nl> - printTypeMemberOffset ( C . self , " e " ) <nl> - / / CHECK - NEXT : found offset : 34 <nl> - <nl> - printTypeMemberOffset ( C . self , " f " ) <nl> - / / CHECK - NEXT : type has no member named ' f ' <nl> - <nl> - class D < T > { <nl> - var a : Int <nl> - var b : Bool <nl> - var c : T <nl> - var d : Bool <nl> - var e : Int16 <nl> - <nl> - init ( v : T ) { <nl> - a = 0 ; b = false ; c = v ; d = false ; e = 0 <nl> - } <nl> - } <nl> - <nl> - printTypeMemberOffset ( D < Float > . self , " a " ) <nl> - / / CHECK - NEXT : found offset : 16 <nl> - <nl> - printTypeMemberOffset ( D < Float > . self , " b " ) <nl> - / / CHECK - NEXT : found offset : 24 <nl> - <nl> - printTypeMemberOffset ( D < Float > . self , " c " ) <nl> - / / CHECK - NEXT : found offset : 28 <nl> - <nl> - printTypeMemberOffset ( D < Float > . self , " d " ) <nl> - / / CHECK - NEXT : found offset : 32 <nl> - <nl> - printTypeMemberOffset ( D < Float > . self , " e " ) <nl> - / / CHECK - NEXT : found offset : 34 <nl> - <nl> - printTypeMemberOffset ( D < Float > . self , " f " ) <nl> - / / CHECK - NEXT : type has no member named ' f ' <nl>
Merge remote - tracking branch ' origin / master ' into master - next
apple/swift
219b2a543a3659376842d610b875d53c3aa1d302
2017-11-18T03:32:42Z
mmm a / . clang - tidy <nl> ppp b / . clang - tidy <nl> Checks : ' - * , <nl> readability - function - size , <nl> - readability - inconsistent - declaration - parameter - name , <nl> - readability - redundant - control - flow , <nl> - - readability - redundant - smartptr - get , <nl> + readability - redundant - smartptr - get , <nl> - readability - string - compare ' <nl> WarningsAsErrors : ' * ' <nl> CheckOptions : <nl>
Enable readability - redundant - smartptr - get
grpc/grpc
e4049632701755d5ea145c330672c032bd0c6f31
2020-10-16T21:11:26Z
mmm a / editor / plugins / canvas_item_editor_plugin . cpp <nl> ppp b / editor / plugins / canvas_item_editor_plugin . cpp <nl> CanvasItemEditor : : DragType CanvasItemEditor : : _get_resize_handle_drag_type ( const <nl> return DRAG_NONE ; <nl> } <nl> <nl> - Vector2 CanvasItemEditor : : _anchor_snap ( const Vector2 anchor , bool * snapped_x , bool * snapped_y ) { <nl> - Vector2 result = anchor ; <nl> - if ( snapped_x ) <nl> - * snapped_x = false ; <nl> - if ( snapped_y ) <nl> - * snapped_y = false ; <nl> + float CanvasItemEditor : : _anchor_snap ( const float anchor , bool * snapped ) { <nl> + float result = anchor ; <nl> + if ( snapped ) <nl> + * snapped = false ; <nl> float radius = 0 . 05 / zoom ; <nl> - if ( fabs ( result . x - ANCHOR_BEGIN ) < radius ) { <nl> - result . x = ANCHOR_BEGIN ; <nl> - if ( snapped_x ) <nl> - * snapped_x = true ; <nl> - } else if ( fabs ( result . x - ANCHOR_CENTER ) < radius ) { <nl> - result . x = ANCHOR_CENTER ; <nl> - if ( snapped_x ) <nl> - * snapped_x = true ; <nl> - } else if ( fabs ( result . x - ANCHOR_END ) < radius ) { <nl> - result . x = ANCHOR_END ; <nl> - if ( snapped_x ) <nl> - * snapped_x = true ; <nl> - } <nl> - if ( fabs ( result . y - ANCHOR_BEGIN ) < radius ) { <nl> - result . y = ANCHOR_BEGIN ; <nl> - if ( snapped_y ) <nl> - * snapped_y = true ; <nl> - } else if ( fabs ( result . y - ANCHOR_CENTER ) < radius ) { <nl> - result . y = ANCHOR_CENTER ; <nl> - if ( snapped_y ) <nl> - * snapped_y = true ; <nl> - } else if ( fabs ( result . y - ANCHOR_END ) < radius ) { <nl> - result . y = ANCHOR_END ; <nl> - if ( snapped_y ) <nl> - * snapped_y = true ; <nl> + if ( fabs ( result - ANCHOR_BEGIN ) < radius ) { <nl> + result = ANCHOR_BEGIN ; <nl> + if ( snapped ) <nl> + * snapped = true ; <nl> + } else if ( fabs ( result - ANCHOR_CENTER ) < radius ) { <nl> + result = ANCHOR_CENTER ; <nl> + if ( snapped ) <nl> + * snapped = true ; <nl> + } else if ( fabs ( result - ANCHOR_END ) < radius ) { <nl> + result = ANCHOR_END ; <nl> + if ( snapped ) <nl> + * snapped = true ; <nl> } <nl> return result ; <nl> } <nl> + <nl> Vector2 CanvasItemEditor : : _anchor_to_position ( Control * p_control , Vector2 anchor ) { <nl> ERR_FAIL_COND_V ( ! p_control , Vector2 ( ) ) ; <nl> <nl> void CanvasItemEditor : : _viewport_gui_input ( const Ref < InputEvent > & p_event ) { <nl> if ( control ) { <nl> / / Drag and snap the anchor <nl> Vector2 anchor = _position_to_anchor ( control , canvas_item - > get_global_transform_with_canvas ( ) . affine_inverse ( ) . xform ( dto - drag_from + drag_point_from ) ) ; <nl> - anchor = _anchor_snap ( anchor ) ; <nl> <nl> switch ( drag ) { <nl> case DRAG_ANCHOR_TOP_LEFT : <nl> - control - > set_anchor ( MARGIN_LEFT , anchor . x ) ; <nl> - control - > set_anchor ( MARGIN_TOP , anchor . y ) ; <nl> + control - > set_anchor ( MARGIN_LEFT , _anchor_snap ( anchor . x ) ) ; <nl> + control - > set_anchor ( MARGIN_TOP , _anchor_snap ( anchor . y ) ) ; <nl> continue ; <nl> break ; <nl> case DRAG_ANCHOR_TOP_RIGHT : <nl> - control - > set_anchor ( MARGIN_RIGHT , anchor . x ) ; <nl> - control - > set_anchor ( MARGIN_TOP , anchor . y ) ; <nl> + control - > set_anchor ( MARGIN_RIGHT , _anchor_snap ( anchor . x ) ) ; <nl> + control - > set_anchor ( MARGIN_TOP , _anchor_snap ( anchor . y ) ) ; <nl> continue ; <nl> break ; <nl> case DRAG_ANCHOR_BOTTOM_RIGHT : <nl> - control - > set_anchor ( MARGIN_RIGHT , anchor . x ) ; <nl> - control - > set_anchor ( MARGIN_BOTTOM , anchor . y ) ; <nl> + control - > set_anchor ( MARGIN_RIGHT , _anchor_snap ( anchor . x ) ) ; <nl> + control - > set_anchor ( MARGIN_BOTTOM , _anchor_snap ( anchor . y ) ) ; <nl> continue ; <nl> break ; <nl> case DRAG_ANCHOR_BOTTOM_LEFT : <nl> - control - > set_anchor ( MARGIN_LEFT , anchor . x ) ; <nl> - control - > set_anchor ( MARGIN_BOTTOM , anchor . y ) ; <nl> + control - > set_anchor ( MARGIN_LEFT , _anchor_snap ( anchor . x ) ) ; <nl> + control - > set_anchor ( MARGIN_BOTTOM , _anchor_snap ( anchor . y ) ) ; <nl> continue ; <nl> break ; <nl> } <nl> void CanvasItemEditor : : _viewport_draw ( ) { <nl> pivot_found = true ; <nl> <nl> if ( tool = = TOOL_SELECT ) { <nl> + float anchors_values [ 4 ] ; <nl> + anchors_values [ 0 ] = control - > get_anchor ( MARGIN_LEFT ) ; <nl> + anchors_values [ 1 ] = control - > get_anchor ( MARGIN_TOP ) ; <nl> + anchors_values [ 2 ] = control - > get_anchor ( MARGIN_RIGHT ) ; <nl> + anchors_values [ 3 ] = control - > get_anchor ( MARGIN_BOTTOM ) ; <nl> + <nl> / / Draw the anchors <nl> Vector2 anchors [ 4 ] ; <nl> - anchors [ 0 ] = Vector2 ( control - > get_anchor ( MARGIN_LEFT ) , control - > get_anchor ( MARGIN_TOP ) ) ; <nl> - anchors [ 1 ] = Vector2 ( control - > get_anchor ( MARGIN_RIGHT ) , control - > get_anchor ( MARGIN_TOP ) ) ; <nl> - anchors [ 2 ] = Vector2 ( control - > get_anchor ( MARGIN_RIGHT ) , control - > get_anchor ( MARGIN_BOTTOM ) ) ; <nl> - anchors [ 3 ] = Vector2 ( control - > get_anchor ( MARGIN_LEFT ) , control - > get_anchor ( MARGIN_BOTTOM ) ) ; <nl> - <nl> Vector2 anchors_pos [ 4 ] ; <nl> for ( int i = 0 ; i < 4 ; i + + ) { <nl> + anchors [ i ] = Vector2 ( ( i % 2 = = 0 ) ? anchors_values [ i ] : anchors_values [ ( i + 1 ) % 4 ] , ( i % 2 = = 1 ) ? anchors_values [ i ] : anchors_values [ ( i + 1 ) % 4 ] ) ; <nl> anchors_pos [ i ] = xform . xform ( _anchor_to_position ( control , anchors [ i ] ) ) ; <nl> } <nl> <nl> void CanvasItemEditor : : _viewport_draw ( ) { <nl> <nl> if ( dragged_anchor > = 0 ) { <nl> / / Draw the 4 lines when dragged <nl> - bool snapped_x , snapped_y ; <nl> + bool snapped ; <nl> Color color_snapped = Color ( 0 . 64 , 0 . 93 , 0 . 67 , 0 . 5 ) ; <nl> Color color_base = Color ( 0 . 8 , 0 . 8 , 0 . 8 , 0 . 5 ) ; <nl> <nl> void CanvasItemEditor : : _viewport_draw ( ) { <nl> } <nl> <nl> for ( int i = 0 ; i < 4 ; i + + ) { <nl> - float anchor_val = ( i % 2 = = 0 ) ? anchors [ i ] . x : anchors [ i ] . y ; <nl> - anchor_val = ( i > = 2 ) ? ANCHOR_END - anchor_val : anchor_val ; <nl> + float anchor_val = ( i > = 2 ) ? ANCHOR_END - anchors_values [ i ] : anchors_values [ i ] ; <nl> Vector2 line_start = Vector2 : : linear_interpolate ( corners_pos [ i ] , corners_pos [ ( i + 1 ) % 4 ] , anchor_val ) ; <nl> Vector2 line_end = Vector2 : : linear_interpolate ( corners_pos [ ( i + 3 ) % 4 ] , corners_pos [ ( i + 2 ) % 4 ] , anchor_val ) ; <nl> - _anchor_snap ( anchors [ i ] , & snapped_x , & snapped_y ) ; <nl> - viewport - > draw_line ( line_start , line_end , ( ( i % 2 = = 0 & & snapped_x ) | | ( i % 2 = = 1 & & snapped_y ) ) ? color_snapped : color_base , ( i = = dragged_anchor | | ( i + 3 ) % 4 = = dragged_anchor ) ? 2 : 1 ) ; <nl> + _anchor_snap ( anchors_values [ i ] , & snapped ) ; <nl> + viewport - > draw_line ( line_start , line_end , snapped ? color_snapped : color_base , ( i = = dragged_anchor | | ( i + 3 ) % 4 = = dragged_anchor ) ? 2 : 1 ) ; <nl> } <nl> <nl> } <nl> mmm a / editor / plugins / canvas_item_editor_plugin . h <nl> ppp b / editor / plugins / canvas_item_editor_plugin . h <nl> class CanvasItemEditor : public VBoxContainer { <nl> void _prepare_drag ( const Point2 & p_click_pos ) ; <nl> DragType _get_anchor_handle_drag_type ( const Point2 & p_click , Vector2 & r_point ) ; <nl> <nl> - Vector2 _anchor_snap ( const Vector2 anchor , bool * snapped_x = NULL , bool * snapped_y = NULL ) ; <nl> + float _anchor_snap ( const float anchor , bool * snapped = NULL ) ; <nl> Vector2 _anchor_to_position ( Control * p_control , Vector2 anchor ) ; <nl> Vector2 _position_to_anchor ( Control * p_control , Vector2 position ) ; <nl> <nl>
Simplifies the canvas editor code
godotengine/godot
2032cb25221bb4388b9875a49fd4c882ee400af8
2017-08-13T19:20:13Z
mmm a / javanano / src / main / java / com / google / protobuf / nano / Extension . java <nl> ppp b / javanano / src / main / java / com / google / protobuf / nano / Extension . java <nl> <nl> public static final int TYPE_SINT64 = InternalNano . TYPE_SINT64 ; <nl> <nl> / / Note : these create . . . ( ) methods take a long for the tag parameter , <nl> - / / because tags are represented as unsigned longs , and these values exist <nl> + / / because tags are represented as unsigned ints , and these values exist <nl> / / in generated code as long values . However , they can fit in 32 - bits , so <nl> / / it ' s safe to cast them to int without loss of precision . <nl> <nl> <nl> protected final Class < T > clazz ; <nl> <nl> / * * <nl> - * Tag number of this extension . <nl> + * Tag number of this extension . The data should be viewed as an unsigned 32 - bit value . <nl> * / <nl> public final int tag ; <nl> <nl>
Fix comments .
protocolbuffers/protobuf
9ffaa50d55bf377f4693eae45483e26ca136f878
2015-04-28T19:14:54Z
mmm a / js / server / modules / org / arangodb / foxx / manager . js <nl> ppp b / js / server / modules / org / arangodb / foxx / manager . js <nl> function checkManifest ( filename , mf ) { <nl> <nl> if ( failed ) { <nl> throw new ArangoError ( { <nl> - errorNum : errors . ERROR_MANIFEST_FILE_ATTRIBUTE_MISSING . code , <nl> - errorMessage : errors . ERROR_MANIFEST_FILE_ATTRIBUTE_MISSING . message <nl> + errorNum : errors . MANIFEST_FILE_ATTRIBUTE_MISSING . code , <nl> + errorMessage : errors . MANIFEST_FILE_ATTRIBUTE_MISSING . message <nl> } ) ; <nl> } <nl> <nl>
Started to tear appart the error handling in current devel mode . It will now print with a much closer relation to their source
arangodb/arangodb
ed30a2a0231d770f3499b8fc8f19c83ecb683716
2015-01-26T10:39:13Z
mmm a / tensorflow / contrib / lite / toco / export_tensorflow . cc <nl> ppp b / tensorflow / contrib / lite / toco / export_tensorflow . cc <nl> void ConvertDepthwiseConvOperator ( const Model & model , <nl> strides . mutable_list ( ) - > add_i ( src_op . stride_height ) ; <nl> strides . mutable_list ( ) - > add_i ( src_op . stride_width ) ; <nl> strides . mutable_list ( ) - > add_i ( 1 ) ; <nl> - / / TODO ( b / ) : To return a working TF GraphDef , we should be returning the <nl> - / / correct SpaceToBatchNd and BatchToSpaceND operation before and after the <nl> - / / conv since TF doesn ' t support dilations . <nl> + / / TODO ( b / 116063589 ) : To return a working TF GraphDef , we should be returning <nl> + / / the correct SpaceToBatchNd and BatchToSpaceND operation before and after <nl> + / / the conv since TF doesn ' t support dilations . <nl> if ( ( src_op . dilation_width_factor ! = 1 ) | | <nl> ( src_op . dilation_height_factor ! = 1 ) ) { <nl> auto & dilations = ( * dc2d_op - > mutable_attr ( ) ) [ " dilations " ] ; <nl>
Fix missing TODO .
tensorflow/tensorflow
800cc654de0bb99c5753fc4ab26a9293547ee0b3
2018-09-20T21:46:13Z
mmm a / tools / docker / Dockerfile <nl> ppp b / tools / docker / Dockerfile <nl> RUN apt - get update & & apt - get install - y \ <nl> libgtest - dev \ <nl> libtool \ <nl> make \ <nl> + parallel \ <nl> strace \ <nl> python - dev \ <nl> python - setuptools \ <nl> mmm a / tools / run_tests / jenkins . sh <nl> ppp b / tools / run_tests / jenkins . sh <nl> BUILD_DIR = / tmp / protobuf <nl> # Set value used in tests . sh . <nl> PARALLELISM = - j8 <nl> <nl> + set - e # exit immediately on error <nl> set - x # display all commands <nl> <nl> rm - rf $ BUILD_DIR <nl> cd $ BUILD_DIR <nl> git clone / var / local / jenkins / protobuf <nl> cd protobuf <nl> <nl> - # If protoc fails to build , we can ' t test anything else . <nl> - $ TEST_SCRIPT cpp | | exit 1 <nl> + OUTPUT_DIR = ` mktemp - d ` <nl> + mkdir - p $ OUTPUT_DIR / 1 <nl> <nl> - # Other tests can fail and we keep on going . <nl> - # $ TEST_SCRIPT java_jdk6 <nl> - $ TEST_SCRIPT java_jdk7 <nl> + # cpp build needs to run first , non - parallelized , so that protoc is available <nl> + # for other builds . <nl> + $ TEST_SCRIPT cpp | tee $ OUTPUT_DIR / 1 / cpp <nl> + <nl> + # Other tests are run in parallel . The overall run fails if any one of them <nl> + # fails . <nl> + <nl> + # java_jdk6 <nl> + parallel $ TEST_SCRIPT : : : java_jdk7 javanano_jdk7 <nl>
Add another test ( javanano ) , but run it in parallel .
protocolbuffers/protobuf
0b931bcd53897954cf96cd8075bb6fc16651559d
2016-03-02T22:51:09Z
new file mode 100644 <nl> index 000000000000 . . 62713bd14d4f <nl> mmm / dev / null <nl> ppp b / cocos2dx / proj . win32 / cocos2dx . props <nl> <nl> +  < ? xml version = " 1 . 0 " encoding = " utf - 8 " ? > <nl> + < Project ToolsVersion = " 4 . 0 " xmlns = " http : / / schemas . microsoft . com / developer / msbuild / 2003 " > <nl> + < ImportGroup Label = " PropertySheets " / > <nl> + < PropertyGroup Label = " UserMacros " / > <nl> + < PropertyGroup > <nl> + < LinkIncremental > false < / LinkIncremental > <nl> + < / PropertyGroup > <nl> + < ItemDefinitionGroup > <nl> + < Link > <nl> + < AdditionalDependencies > opengl32 . lib ; glew32 . lib ; libzlib . lib ; libpng . lib ; libjpeg . lib ; libtiff . lib ; libwebp . lib ; libiconv . lib ; pthreadVCE2 . lib ; winmm . lib ; % ( AdditionalDependencies ) < / AdditionalDependencies > <nl> + < AdditionalLibraryDirectories > $ ( OutDir ) ; % ( AdditionalLibraryDirectories ) < / AdditionalLibraryDirectories > <nl> + < IgnoreAllDefaultLibraries > false < / IgnoreAllDefaultLibraries > <nl> + < / Link > <nl> + < ClCompile / > <nl> + < / ItemDefinitionGroup > <nl> + < ItemGroup / > <nl> + < / Project > <nl> \ No newline at end of file <nl>
issue : Adding Property Sheet cocos2dx . props for sharing project configuration . Now it ' s only for linking libraries .
cocos2d/cocos2d-x
aaeb4e13b01e6f42ad937315b069ffea10e9f369
2013-06-23T09:20:12Z
mmm a / core / reference . cpp <nl> ppp b / core / reference . cpp <nl> <nl> / * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE . * / <nl> / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * / <nl> # include " reference . h " <nl> - <nl> + # include " script_language . h " <nl> <nl> <nl> bool Reference : : init_ref ( ) { <nl> int Reference : : reference_get_count ( ) const { <nl> void Reference : : reference ( ) { <nl> <nl> refcount . ref ( ) ; <nl> + if ( get_script_instance ( ) ) { <nl> + get_script_instance ( ) - > refcount_incremented ( ) ; <nl> + } <nl> <nl> } <nl> bool Reference : : unreference ( ) { <nl> <nl> - return refcount . unref ( ) ; <nl> + bool die = refcount . unref ( ) ; <nl> + <nl> + if ( get_script_instance ( ) ) { <nl> + die = die & & get_script_instance ( ) - > refcount_decremented ( ) ; <nl> + } <nl> + <nl> + return die ; <nl> + <nl> } <nl> <nl> Reference : : Reference ( ) { <nl> mmm a / core / script_language . h <nl> ppp b / core / script_language . h <nl> class ScriptInstance { <nl> virtual void notification ( int p_notification ) = 0 ; <nl> <nl> <nl> + virtual void refcount_incremented ( ) { } <nl> + virtual bool refcount_decremented ( ) { return true ; } / / return true if it can die <nl> + <nl> virtual Ref < Script > get_script ( ) const = 0 ; <nl> <nl> virtual bool is_placeholder ( ) const { return false ; } <nl>
Better support in ScriptLanguage for GC based scripts
godotengine/godot
d57b09e47bb229b164ac34a408207882635b541b
2016-06-21T22:36:22Z
mmm a / imgui . cpp <nl> ppp b / imgui . cpp <nl> void ImGui : : SetItemDefaultFocus ( ) <nl> <nl> void ImGui : : SetStateStorage ( ImGuiStorage * tree ) <nl> { <nl> - ImGuiWindow * window = GetCurrentWindow ( ) ; <nl> + ImGuiWindow * window = GImGui - > CurrentWindow ; <nl> window - > DC . StateStorage = tree ? tree : & window - > StateStorage ; <nl> } <nl> <nl> ImGuiStorage * ImGui : : GetStateStorage ( ) <nl> { <nl> - ImGuiWindow * window = GetCurrentWindowRead ( ) ; <nl> + ImGuiWindow * window = GImGui - > CurrentWindow ; <nl> return window - > DC . StateStorage ; <nl> } <nl> <nl> void ImGui : : PushID ( const char * str_id ) <nl> { <nl> - ImGuiWindow * window = GetCurrentWindowRead ( ) ; <nl> + ImGuiWindow * window = GImGui - > CurrentWindow ; <nl> window - > IDStack . push_back ( window - > GetIDNoKeepAlive ( str_id ) ) ; <nl> } <nl> <nl> void ImGui : : PushID ( const char * str_id_begin , const char * str_id_end ) <nl> { <nl> - ImGuiWindow * window = GetCurrentWindowRead ( ) ; <nl> + ImGuiWindow * window = GImGui - > CurrentWindow ; <nl> window - > IDStack . push_back ( window - > GetIDNoKeepAlive ( str_id_begin , str_id_end ) ) ; <nl> } <nl> <nl> void ImGui : : PushID ( const void * ptr_id ) <nl> { <nl> - ImGuiWindow * window = GetCurrentWindowRead ( ) ; <nl> + ImGuiWindow * window = GImGui - > CurrentWindow ; <nl> window - > IDStack . push_back ( window - > GetIDNoKeepAlive ( ptr_id ) ) ; <nl> } <nl> <nl> void ImGui : : PushID ( int int_id ) <nl> { <nl> const void * ptr_id = ( void * ) ( intptr_t ) int_id ; <nl> - ImGuiWindow * window = GetCurrentWindowRead ( ) ; <nl> + ImGuiWindow * window = GImGui - > CurrentWindow ; <nl> window - > IDStack . push_back ( window - > GetIDNoKeepAlive ( ptr_id ) ) ; <nl> } <nl> <nl> void ImGui : : PopID ( ) <nl> { <nl> - ImGuiWindow * window = GetCurrentWindowRead ( ) ; <nl> + ImGuiWindow * window = GImGui - > CurrentWindow ; <nl> window - > IDStack . pop_back ( ) ; <nl> } <nl> <nl> ImGuiID ImGui : : GetID ( const char * str_id ) <nl> { <nl> - return GImGui - > CurrentWindow - > GetID ( str_id ) ; <nl> + ImGuiWindow * window = GImGui - > CurrentWindow ; <nl> + return window - > GetID ( str_id ) ; <nl> } <nl> <nl> ImGuiID ImGui : : GetID ( const char * str_id_begin , const char * str_id_end ) <nl> { <nl> - return GImGui - > CurrentWindow - > GetID ( str_id_begin , str_id_end ) ; <nl> + ImGuiWindow * window = GImGui - > CurrentWindow ; <nl> + return window - > GetID ( str_id_begin , str_id_end ) ; <nl> } <nl> <nl> ImGuiID ImGui : : GetID ( const void * ptr_id ) <nl> { <nl> - return GImGui - > CurrentWindow - > GetID ( ptr_id ) ; <nl> + ImGuiWindow * window = GImGui - > CurrentWindow ; <nl> + return window - > GetID ( ptr_id ) ; <nl> } <nl> <nl> bool ImGui : : IsRectVisible ( const ImVec2 & size ) <nl> { <nl> - ImGuiWindow * window = GetCurrentWindowRead ( ) ; <nl> + ImGuiWindow * window = GImGui - > CurrentWindow ; ; <nl> return window - > ClipRect . Overlaps ( ImRect ( window - > DC . CursorPos , window - > DC . CursorPos + size ) ) ; <nl> } <nl> <nl> bool ImGui : : IsRectVisible ( const ImVec2 & rect_min , const ImVec2 & rect_max ) <nl> { <nl> - ImGuiWindow * window = GetCurrentWindowRead ( ) ; <nl> + ImGuiWindow * window = GImGui - > CurrentWindow ; ; <nl> return window - > ClipRect . Overlaps ( ImRect ( rect_min , rect_max ) ) ; <nl> } <nl> <nl> mmm a / imgui . h <nl> ppp b / imgui . h <nl> namespace ImGui <nl> / / ID stack / scopes <nl> / / - Read the FAQ for more details about how ID are handled in dear imgui . If you are creating widgets in a loop you most <nl> / / likely want to push a unique identifier ( e . g . object pointer , loop index ) to uniquely differentiate them . <nl> + / / - The resulting ID are hashes of the entire stack . <nl> / / - You can also use the " Label # # foobar " syntax within widget label to distinguish them from each others . <nl> / / - In this header file we use the " label " / " name " terminology to denote a string that will be displayed and used as an ID , <nl> / / whereas " str_id " denote a string that is only used as an ID and not normally displayed . <nl> - IMGUI_API void PushID ( const char * str_id ) ; / / push string identifier into the ID stack . IDs = = hash of the entire stack ! <nl> - IMGUI_API void PushID ( const char * str_id_begin , const char * str_id_end ) ; <nl> - IMGUI_API void PushID ( const void * ptr_id ) ; / / push pointer into the ID stack . <nl> - IMGUI_API void PushID ( int int_id ) ; / / push integer into the ID stack . <nl> + IMGUI_API void PushID ( const char * str_id ) ; / / push string into the ID stack ( will hash string ) . <nl> + IMGUI_API void PushID ( const char * str_id_begin , const char * str_id_end ) ; / / push string into the ID stack ( will hash string ) . <nl> + IMGUI_API void PushID ( const void * ptr_id ) ; / / push pointer into the ID stack ( will hash pointer ) . <nl> + IMGUI_API void PushID ( int int_id ) ; / / push integer into the ID stack ( will hash integer ) . <nl> IMGUI_API void PopID ( ) ; / / pop from the ID stack . <nl> IMGUI_API ImGuiID GetID ( const char * str_id ) ; / / calculate unique ID ( hash of whole ID stack + given parameter ) . e . g . if you want to query into ImGuiStorage yourself <nl> IMGUI_API ImGuiID GetID ( const char * str_id_begin , const char * str_id_end ) ; <nl>
Internals : Tweaks . Comments about PushID / GetID public function .
ocornut/imgui
28901dd10417edf76454c73200ba1b50a4504d2d
2019-01-21T15:50:27Z
mmm a / Makefile <nl> ppp b / Makefile <nl> endif <nl> endif <nl> <nl> ifndef DMLC_CORE <nl> - DMLC_CORE = dmlc - core <nl> + DMLC_CORE = $ ( ROOTDIR ) / dmlc - core <nl> endif <nl> <nl> ifneq ( $ ( USE_OPENMP ) , 1 ) <nl> ifneq ( $ ( USE_CUDA_PATH ) , NONE ) <nl> endif <nl> <nl> # ps - lite <nl> - PS_PATH = . / ps - lite <nl> + PS_PATH = $ ( ROOTDIR ) / ps - lite <nl> DEPS_PATH = $ ( shell pwd ) / deps <nl> include $ ( PS_PATH ) / make / ps . mk <nl> ifeq ( $ ( USE_DIST_KVSTORE ) , 1 ) <nl> rpkg : roxygen <nl> R CMD build - - no - build - vignettes R - package <nl> <nl> scalapkg : <nl> - ( cd $ ( ROOTDIR ) / scala - package ; mvn clean package - P $ ( SCALA_PKG_PROFILE ) - Dcxx = " $ ( CXX ) " - Dcflags = " $ ( CFLAGS ) " - Dldflags = " $ ( LDFLAGS ) " ) <nl> + ( cd $ ( ROOTDIR ) / scala - package ; \ <nl> + mvn clean package - P $ ( SCALA_PKG_PROFILE ) - Dcxx = " $ ( CXX ) " \ <nl> + - Dcflags = " $ ( CFLAGS ) " - Dldflags = " $ ( LDFLAGS ) " \ <nl> + - Dlddeps = " $ ( LIB_DEP ) " ) <nl> <nl> scalatest : <nl> - ( cd $ ( ROOTDIR ) / scala - package ; mvn verify - P $ ( SCALA_PKG_PROFILE ) - Dcxx = " $ ( CXX ) " - Dcflags = " $ ( CFLAGS ) " - Dldflags = " $ ( LDFLAGS ) " $ ( SCALA_TEST_ARGS ) ) <nl> + ( cd $ ( ROOTDIR ) / scala - package ; \ <nl> + mvn verify - P $ ( SCALA_PKG_PROFILE ) - Dcxx = " $ ( CXX ) " \ <nl> + - Dcflags = " $ ( CFLAGS ) " - Dldflags = " $ ( LDFLAGS ) " \ <nl> + - Dlddeps = " $ ( LIB_DEP ) " $ ( SCALA_TEST_ARGS ) ) <nl> <nl> scalainstall : <nl> - ( cd $ ( ROOTDIR ) / scala - package ; mvn install - P $ ( SCALA_PKG_PROFILE ) - DskipTests - Dcxx = " $ ( CXX ) " - Dcflags = " $ ( CFLAGS ) " - Dldflags = " $ ( LDFLAGS ) " ) <nl> + ( cd $ ( ROOTDIR ) / scala - package ; \ <nl> + mvn install - P $ ( SCALA_PKG_PROFILE ) - DskipTests - Dcxx = " $ ( CXX ) " \ <nl> + - Dcflags = " $ ( CFLAGS ) " - Dldflags = " $ ( LDFLAGS ) " \ <nl> + - Dlddeps = " $ ( LIB_DEP ) " ) <nl> <nl> scaladeploy : <nl> - ( cd $ ( ROOTDIR ) / scala - package ; mvn deploy - Prelease , $ ( SCALA_PKG_PROFILE ) - DskipTests - Dcxx = " $ ( CXX ) " - Dcflags = " $ ( CFLAGS ) " - Dldflags = " $ ( LDFLAGS ) " ) <nl> + ( cd $ ( ROOTDIR ) / scala - package ; \ <nl> + mvn deploy - Prelease , $ ( SCALA_PKG_PROFILE ) - DskipTests - Dcxx = " $ ( CXX ) " \ <nl> + - Dcflags = " $ ( CFLAGS ) " - Dldflags = " $ ( LDFLAGS ) " \ <nl> + - Dlddeps = " $ ( LIB_DEP ) " ) <nl> <nl> jnilint : <nl> python2 dmlc - core / scripts / lint . py mxnet - jnicpp cpp scala - package / native / src <nl> mmm a / R - package / NAMESPACE <nl> ppp b / R - package / NAMESPACE <nl> export ( mx . exec . backward ) <nl> export ( mx . exec . forward ) <nl> export ( mx . exec . update . arg . arrays ) <nl> export ( mx . exec . update . aux . arrays ) <nl> + export ( mx . exec . update . grad . arrays ) <nl> export ( mx . gpu ) <nl> export ( mx . init . Xavier ) <nl> export ( mx . init . create ) <nl> mmm a / R - package / R / executor . R <nl> ppp b / R - package / R / executor . R <nl> mx . exec . update . aux . arrays < - function ( exec , arg . arrays , match . name = FALSE , skip . n <nl> exec $ update . aux . arrays ( arg . arrays , match . name , skip . null ) <nl> } <nl> <nl> + # ' Update the executors with new arrays <nl> + # ' This function will MUTATE the state of exec <nl> + # ' <nl> + # ' @ export <nl> + mx . exec . update . grad . arrays < - function ( exec , arg . arrays , match . name = FALSE , skip . null = FALSE ) { <nl> + exec $ update . grad . arrays ( arg . arrays , match . name , skip . null ) <nl> + } <nl> + <nl> + <nl> # ' Peform an forward on the executors <nl> # ' This function will MUTATE the state of exec <nl> # ' <nl> mmm a / R - package / R / model . R <nl> ppp b / R - package / R / model . R <nl> mx . model . select . layout . predict < - function ( X , model ) { <nl> # ' The parameter synchronization scheme in multiple devices . <nl> # ' @ param verbose logical ( default = TRUE ) <nl> # ' Specifies whether to print information on the iterations during training . <nl> + # ' @ param arg . params list , optional <nl> + # ' Model parameter , list of name to NDArray of net ' s weights . <nl> + # ' @ param aux . params list , optional <nl> + # ' Model parameter , list of name to NDArray of net ' s auxiliary states . <nl> # ' @ return model A trained mxnet model . <nl> # ' <nl> # ' @ export <nl> + <nl> mx . model . FeedForward . create < - <nl> function ( symbol , X , y = NULL , ctx = NULL , <nl> num . round = 10 , optimizer = " sgd " , <nl> function ( symbol , X , y = NULL , ctx = NULL , <nl> array . batch . size = 128 , array . layout = " auto " , <nl> kvstore = " local " , <nl> verbose = TRUE , <nl> + arg . params = NULL , aux . params = NULL , <nl> . . . ) { <nl> if ( is . array ( X ) | | is . matrix ( X ) ) { <nl> if ( array . layout = = " auto " ) { <nl> function ( symbol , X , y = NULL , ctx = NULL , <nl> } <nl> input . shape < - dim ( ( X $ value ( ) ) $ data ) <nl> params < - mx . model . init . params ( symbol , input . shape , initializer , mx . cpu ( ) ) <nl> + if ( ! is . null ( arg . params ) ) params $ arg . params < - arg . params <nl> + if ( ! is . null ( aux . params ) ) params $ aux . params < - aux . params <nl> if ( is . null ( ctx ) ) ctx < - mx . ctx . default ( ) <nl> if ( is . mx . context ( ctx ) ) { <nl> ctx < - list ( ctx ) <nl> mmm a / R - package / README . md <nl> ppp b / R - package / README . md <nl> <nl> < img src = https : / / raw . githubusercontent . com / dmlc / dmlc . github . io / master / img / logo - m / mxnetR . png width = 155 / > Deep Learning for R <nl> = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> [ ! [ Build Status ] ( https : / / travis - ci . org / dmlc / mxnet . svg ? branch = master ) ] ( https : / / travis - ci . org / dmlc / mxnet ) <nl> - [ ! [ Documentation Status ] ( https : / / readthedocs . org / projects / mxnet / badge / ? version = latest ) ] ( http : / / mxnet . readthedocs . org / en / latest / R - package / index . html ) <nl> + [ ! [ Documentation Status ] ( https : / / readthedocs . org / projects / mxnet / badge / ? version = latest ) ] ( http : / / mxnet . readthedocs . org / en / latest / packages / r / index . html ) <nl> <nl> You have found MXNet R Package ! The MXNet R packages brings flexible and efficient GPU <nl> computing and state - of - art deep learning to R . <nl> Sounds exciting ? This page contains links to all the related documents on R pack <nl> <nl> Resources <nl> mmmmmmmmm <nl> - * [ MXNet R Package Document ] ( http : / / mxnet . readthedocs . org / en / latest / R - package / index . html ) <nl> + * [ MXNet R Package Document ] ( http : / / mxnet . readthedocs . org / en / latest / packages / r / index . html ) <nl> - Check this out for detailed documents , examples , installation guides . <nl> <nl> Installation <nl> drat : : : addRepo ( " dmlc " ) <nl> install . packages ( " mxnet " ) <nl> ` ` ` <nl> <nl> - To use GPU version or use it on Linux , please follow [ Installation Guide ] ( http : / / mxnet . readthedocs . org / en / latest / build . html ) <nl> + To use GPU version or use it on Linux , please follow [ Installation Guide ] ( http : / / mxnet . readthedocs . org / en / latest / how_to / build . html ) <nl> <nl> License <nl> mmmmmm - <nl> mmm a / R - package / demo / basic_model . R <nl> ppp b / R - package / demo / basic_model . R <nl> accuracy < - function ( label , pred ) { <nl> print ( paste0 ( " Finish prediction . . . accuracy = " , accuracy ( label , pred ) ) ) <nl> print ( paste0 ( " Finish prediction . . . accuracy2 = " , accuracy ( label , pred2 ) ) ) <nl> <nl> + <nl> + <nl> + # load the model <nl> + model < - mx . model . load ( " chkpt " , 1 ) <nl> + <nl> + # continue training with some new arguments <nl> + model < - mx . model . FeedForward . create ( model $ symbol , X = dtrain , eval . data = dtest , <nl> + ctx = devices , num . round = 5 , <nl> + learning . rate = 0 . 1 , momentum = 0 . 9 , <nl> + epoch . end . callback = mx . callback . save . checkpoint ( " reload_chkpt " ) , <nl> + batch . end . callback = mx . callback . log . train . metric ( 100 ) , <nl> + arg . params = model $ arg . params , aux . params = model $ aux . params ) <nl> + <nl> + # do prediction <nl> + pred < - predict ( model , dtest ) <nl> + label < - mx . io . extract ( dtest , " label " ) <nl> + dataX < - mx . io . extract ( dtest , " data " ) <nl> + # Predict with R ' s array <nl> + pred2 < - predict ( model , X = dataX ) <nl> + <nl> + accuracy < - function ( label , pred ) { <nl> + ypred = max . col ( t ( as . array ( pred ) ) ) <nl> + return ( sum ( ( as . array ( label ) + 1 ) = = ypred ) / length ( label ) ) <nl> + } <nl> + <nl> + print ( paste0 ( " Finish prediction . . . accuracy = " , accuracy ( label , pred ) ) ) <nl> + print ( paste0 ( " Finish prediction . . . accuracy2 = " , accuracy ( label , pred2 ) ) ) <nl> + <nl> + <nl> + <nl> + <nl> new file mode 100644 <nl> index 00000000000 . . 22e12d21d78 <nl> mmm / dev / null <nl> ppp b / R - package / man / mx . exec . update . grad . arrays . Rd <nl> <nl> + % Generated by roxygen2 : do not edit by hand <nl> + % Please edit documentation in R / executor . R <nl> + \ name { mx . exec . update . grad . arrays } <nl> + \ alias { mx . exec . update . grad . arrays } <nl> + \ title { Update the executors with new arrays <nl> + This function will MUTATE the state of exec } <nl> + \ usage { <nl> + mx . exec . update . grad . arrays ( exec , arg . arrays , match . name = FALSE , <nl> + skip . null = FALSE ) <nl> + } <nl> + \ description { <nl> + Update the executors with new arrays <nl> + This function will MUTATE the state of exec <nl> + } <nl> + <nl> mmm a / R - package / man / mx . model . FeedForward . create . Rd <nl> ppp b / R - package / man / mx . model . FeedForward . create . Rd <nl> mx . model . FeedForward . create ( symbol , X , y = NULL , ctx = NULL , <nl> num . round = 10 , optimizer = " sgd " , initializer = mx . init . uniform ( 0 . 01 ) , <nl> eval . data = NULL , eval . metric = NULL , epoch . end . callback = NULL , <nl> batch . end . callback = NULL , array . batch . size = 128 , <nl> - array . layout = " auto " , kvstore = " local " , verbose = TRUE , . . . ) <nl> + array . layout = " auto " , kvstore = " local " , verbose = TRUE , <nl> + arg . params = NULL , aux . params = NULL , . . . ) <nl> } <nl> \ arguments { <nl> \ item { symbol } { The symbolic configuration of the neural network . } <nl> The parameter synchronization scheme in multiple devices . } <nl> <nl> \ item { verbose } { logical ( default = TRUE ) <nl> Specifies whether to print information on the iterations during training . } <nl> + <nl> + \ item { arg . params } { list , optional <nl> + Model parameter , list of name to NDArray of net ' s weights . } <nl> + <nl> + \ item { aux . params } { list , optional <nl> + Model parameter , list of name to NDArray of net ' s auxiliary states . } <nl> } <nl> \ value { <nl> model A trained mxnet model . <nl> mmm a / R - package / src / executor . cc <nl> ppp b / R - package / src / executor . cc <nl> void Executor : : UpdateAuxArray ( const Rcpp : : List & array , <nl> UpdateArray ( " aux . arrays " , array , aux_arrays_ , match_name , skip_null ) ; <nl> } <nl> <nl> + void Executor : : UpdateGradArray ( const Rcpp : : List & array , <nl> + bool match_name , <nl> + bool skip_null ) { <nl> + UpdateArray ( " grad . arrays " , array , grad_arrays_ , match_name , skip_null ) ; <nl> + } <nl> + <nl> void Executor : : UpdateArray ( const char * array_name , <nl> const Rcpp : : List & from , <nl> Rcpp : : List * to , <nl> void Executor : : InitRcppModule ( ) { <nl> . method ( " update . arg . arrays " , <nl> & Executor : : UpdateArgArray , <nl> " Update arguments array of executor , this will mutate the executor " ) <nl> + . method ( " update . grad . arrays " , <nl> + & Executor : : UpdateGradArray , <nl> + " Update gradient array of executor , this will mutate the executor " ) <nl> . method ( " forward " , <nl> & Executor : : Forward , <nl> " Peform a forward operation on exec , this will set the outputs . " ) <nl> mmm a / R - package / src / executor . h <nl> ppp b / R - package / src / executor . h <nl> class Executor : public MXNetMovable < Executor > { <nl> void UpdateAuxArray ( const Rcpp : : List & array , <nl> bool match_name , <nl> bool allow_null ) ; <nl> + / * ! <nl> + * \ brief Update the grad_arrays of executor , based on name - matching . <nl> + * \ param array The array to update <nl> + * \ param match_name whether to use name to match the input , instead of index . <nl> + * \ param skip_null Whether null is allowed , when there is NULL in the array , simply ignore . <nl> + * \ return a result executor , moved from exec . <nl> + * / <nl> + void UpdateGradArray ( const Rcpp : : List & array , <nl> + bool match_name , <nl> + bool allow_null ) ; <nl> / * ! <nl> * \ brief Peform a forward operation on exec , this will set the out_arrays . <nl> * \ param is_train whether it is training phase . <nl> mmm a / README . md <nl> ppp b / README . md <nl> <nl> [ ! [ GitHub license ] ( http : / / dmlc . github . io / img / apache2 . svg ) ] ( . / LICENSE ) <nl> [ ! [ todofy badge ] ( https : / / todofy . org / b / dmlc / mxnet ) ] ( https : / / todofy . org / r / dmlc / mxnet ) <nl> <nl> + ! [ banner ] ( https : / / raw . githubusercontent . com / dmlc / web - data / master / mxnet / image / banner . png ) <nl> + <nl> MXNet is a deep learning framework designed for both * efficiency * and * flexibility * . <nl> It allows you to * * * mix * * * the [ flavours ] ( http : / / mxnet . readthedocs . org / en / latest / program_model . html ) of symbolic <nl> programming and imperative programming to * * * maximize * * * efficiency and productivity . <nl> deep learning system , and interesting insights of DL systems for hackers . <nl> <nl> What ' s New <nl> mmmmmmmmm - <nl> + * [ Tutorial for NVidia GTC 2016 ] ( https : / / github . com / dmlc / mxnet - gtc - tutorial ) <nl> * [ Embedding Torch layers and functions in MXNet ] ( https : / / mxnet . readthedocs . org / en / latest / tutorial / torch_howto . html ) <nl> * [ MXNet . js : Javascript Package for Deep Learning in Browser ( without server ) <nl> ] ( https : / / github . com / dmlc / mxnet . js / ) <nl> Features <nl> <nl> Ask Questions <nl> mmmmmmmmmmmm - <nl> - * Please use [ DMLC / mxnet Forum ] ( http : / / forum . dmlc . ml / c / mxnet ) for any questions about how to use mxnet . <nl> - * For reporting bugs , please use the [ mxnet / issues ] ( https : / / github . com / dmlc / mxnet / issues ) page . <nl> + * Please use [ mxnet / issues ] ( https : / / github . com / dmlc / mxnet / issues ) for how to use mxnet and reporting bugs <nl> <nl> License <nl> mmmmmm - <nl> mmm a / dmlc - core <nl> ppp b / dmlc - core <nl> @ @ - 1 + 1 @ @ <nl> - Subproject commit 0fb74229bc635946667f7dfd1c17116b37d0d870 <nl> + Subproject commit 2730c9672f76aede42ddbc0fcea2651b1e50c047 <nl> mmm a / docs / Makefile <nl> ppp b / docs / Makefile <nl> help : <nl> clean : <nl> rm - rf $ ( BUILDDIR ) / * <nl> <nl> + livehtml : <nl> + sphinx - autobuild - - ignore " web - data / * " - b html $ ( ALLSPHINXOPTS ) $ ( BUILDDIR ) / html <nl> + <nl> html : <nl> $ ( SPHINXBUILD ) - b html $ ( ALLSPHINXOPTS ) $ ( BUILDDIR ) / html <nl> @ echo <nl> new file mode 100644 <nl> index 00000000000 . . b918ecdc163 <nl> mmm / dev / null <nl> ppp b / docs / _static / js / auto_module_index . js <nl> <nl> + function auto_index ( module ) { <nl> + $ ( document ) . ready ( function ( ) { <nl> + / / find all classes or functions <nl> + var div_query = " div [ class = ' section ' ] [ id = ' module - " + module + " ' ] " ; <nl> + var class_query = div_query + " dl [ class = ' class ' ] > dt " ; <nl> + var func_query = div_query + " dl [ class = ' function ' ] > dt " ; <nl> + var targets = $ ( class_query + ' , ' + func_query ) ; <nl> + <nl> + var li_node = $ ( " li a [ href = ' # module - " + module + " ' ] " ) . parent ( ) ; <nl> + var html = " < ul > " ; <nl> + <nl> + for ( var i = 0 ; i < targets . length ; + + i ) { <nl> + var id = $ ( targets [ i ] ) . attr ( ' id ' ) ; <nl> + / / remove ' mxnet . ' prefix to make menus shorter <nl> + var id_simple = id . replace ( / ^ mxnet \ . / , ' ' ) ; <nl> + html + = " < li > < a class = ' reference internal ' href = ' # " ; <nl> + html + = id ; <nl> + html + = " ' > " + id_simple + " < / a > < / li > " ; <nl> + } <nl> + <nl> + html + = " < / ul > " ; <nl> + li_node . append ( html ) ; <nl> + } ) ; <nl> + } <nl> + <nl> mmm a / docs / conf . py <nl> ppp b / docs / conf . py <nl> <nl> <nl> # Add any Sphinx extension module names here , as strings . They can be extensions <nl> # coming with Sphinx ( named ' sphinx . ext . * ' ) or your custom ones . <nl> - extensions = [ ' sphinx . ext . ifconfig ' , ' breathe ' ] <nl> + extensions = [ ' sphinx . ext . ifconfig ' ] <nl> <nl> # breathe_default_project = " format " <nl> - breathe_domain_by_extension = { " h " : " cpp " } <nl> + # breathe_domain_by_extension = { " h " : " cpp " } <nl> <nl> <nl> # General information about the project . <nl> <nl> # The name of the Pygments ( syntax highlighting ) style to use . <nl> pygments_style = ' sphinx ' <nl> <nl> - highlight_language = ' c + + ' <nl> - <nl> - primary_domain = ' cpp ' <nl> <nl> # A list of ignored prefixes for module index sorting . <nl> # modindex_common_prefix = [ ] <nl> def setup ( app ) : <nl> # no c + + API for now <nl> app . connect ( " builder - inited " , generate_doxygen_xml ) <nl> app . add_config_value ( ' recommonmark_config ' , { <nl> - ' url_resolver ' : lambda url : doc_root + url , <nl> + ' url_resolver ' : lambda url : github_doc_root + url , <nl> } , True ) <nl> app . add_transform ( AutoStructify ) <nl> mmm a / docs / get_started / index . md <nl> ppp b / docs / get_started / index . md <nl> <nl> - # Introduction <nl> + # Getting Started <nl> <nl> - Let ' s start with training a simple <nl> + This is a getting started tutorial of MXNet . <nl> + We will train a <nl> [ multi - layer perceptron ] ( https : / / en . wikipedia . org / wiki / Multilayer_perceptron ) <nl> ( MLP ) on <nl> the [ MNIST handwritten digit dataset ] ( http : / / yann . lecun . com / exdb / mnist / ) to get <nl> the basic idea of how to use MXNet . <nl> <nl> + # # Links to Other Resources <nl> + Here are some other resources that can also be helpful <nl> + - See [ Installation Guide ] ( . . / how_to / build . md ) on how to install mxnet . <nl> + - See [ How to pages ] ( . . / how_to / index . md ) on various tips on using mxnet . <nl> + - See [ Tutorials ] ( . . / tutorials / index . md ) on tutorials on specific tasks . <nl> + <nl> # # Train MLP on MNIST <nl> <nl> On MNIST , each example consists of a 28 x 28 gray image of a handwritten digit <nl> res3 : ml . dmlc . mxnet . Shape = ( 2 , 3 ) <nl> ` ` ` <nl> <nl> # # # Julia <nl> - <nl> - # # Recommended Next Steps <nl> - <nl> - - [ Build and Install ] ( build . html ) <nl> - - [ Step by Step Tutorials ] ( . . / tutorials / index . html ) <nl> - - [ How - Tos ] ( . . / tutorials / index . html ) <nl> deleted file mode 100644 <nl> index 4bc102d780c . . 00000000000 <nl> mmm a / docs / how_to / aws . md <nl> ppp / dev / null <nl> <nl> - # Setup an AWS GPU Cluster from Scratch <nl> - <nl> - In this document we give a step - by - step tutorial on how to set up Amazon AWS for <nl> - MXNet . In particular , we will address : <nl> - <nl> - - [ Use Amazon S3 to host data ] ( # use - amazon - s3 - to - host - data ) <nl> - - [ Setup EC2 GPU instance with all dependencies installed ] ( # setup - an - ec2 - gpu - instance ) <nl> - - [ Build and Run MXNet on a single machine ] ( # build - and - run - mxnet - on - a - gpu - instance ) <nl> - - [ Setup an EC2 GPU cluster for distributed training ] ( # setup - an - ec2 - gpu - cluster ) <nl> - <nl> - # # Use Amazon S3 to host data <nl> - <nl> - Amazon S3 is distributed data storage , which is quite convenient for hosting large datasets . To use S3 , we first get the <nl> - [ AWS credentials ] ( http : / / docs . aws . amazon . com / AWSSimpleQueueService / latest / SQSGettingStartedGuide / AWSCredentials . html ) , <nl> - which includes an ` ACCESS_KEY_ID ` and a ` SECRET_ACCESS_KEY ` . <nl> - <nl> - To use MXNet with S3 , we must set the environment variables ` AWS_ACCESS_KEY_ID ` and <nl> - ` AWS_SECRET_ACCESS_KEY ` properly . This can be done by adding the following two lines in <nl> - ` ~ / . bashrc ` ( replacing the strings with the correct ones ) <nl> - <nl> - ` ` ` bash <nl> - export AWS_ACCESS_KEY_ID = AKIAIOSFODNN7EXAMPLE <nl> - export AWS_SECRET_ACCESS_KEY = wJalrXUtnFEMI / K7MDENG / bPxRfiCYEXAMPLEKEY <nl> - ` ` ` <nl> - <nl> - There are several ways to upload local data to S3 . One simple way is using <nl> - [ s3cmd ] ( http : / / s3tools . org / s3cmd ) . For example : <nl> - <nl> - ` ` ` bash <nl> - wget http : / / webdocs . cs . ualberta . ca / ~ bx3 / data / mnist . zip <nl> - unzip mnist . zip & & s3cmd put t * - ubyte s3 : / / dmlc / mnist / <nl> - ` ` ` <nl> - <nl> - # # Set Up an EC2 GPU Instance <nl> - <nl> - MXNet requires the following libraries <nl> - <nl> - - C + + compiler with C + + 11 suports , such as ` gcc > = 4 . 8 ` <nl> - - ` CUDA ` ( ` CUDNN ` in optional ) for GPU linear algebra <nl> - - ` BLAS ` ( cblas , open - blas , atblas , mkl , or others ) for CPU linear algebra <nl> - - ` opencv ` for image augmentations <nl> - - ` curl ` and ` openssl ` for read / write Amazon S3 <nl> - <nl> - Installing ` CUDA ` on EC2 instances requires some effort . Caffe has a nice <nl> - [ tutorial ] ( https : / / github . com / BVLC / caffe / wiki / Install - Caffe - on - EC2 - from - scratch - ( Ubuntu , - CUDA - 7 , - cuDNN ) ) <nl> - on how to install CUDA 7 . 0 on Ubuntu 14 . 04 ( Note : we tried CUDA 7 . 5 on Nov 7 <nl> - 2015 , but it is problematic . ) <nl> - <nl> - The rest can be installed by the package manager . For example , on Ubuntu : <nl> - <nl> - ` ` ` <nl> - sudo apt - get update <nl> - sudo apt - get install - y build - essential git libcurl4 - openssl - dev libatlas - base - dev libopencv - dev python - numpy <nl> - ` ` ` <nl> - <nl> - We provide a public Amazon Machine Images , [ ami - 12fd8178 ] ( https : / / console . aws . amazon . com / ec2 / v2 / home ? region = us - east - 1 # LaunchInstanceWizard : ami = ami - 12fd8178 ) , with the above packages installed . <nl> - <nl> - <nl> - # # Build and Run MXNet on a GPU Instance <nl> - <nl> - The following commands build MXNet with CUDA / CUDNN , S3 , and distributed <nl> - training . <nl> - <nl> - ` ` ` bash <nl> - git clone - - recursive https : / / github . com / dmlc / mxnet <nl> - cd mxnet ; cp make / config . mk . <nl> - echo " USE_CUDA = 1 " > > config . mk <nl> - echo " USE_CUDA_PATH = / usr / local / cuda " > > config . mk <nl> - echo " USE_CUDNN = 1 " > > config . mk <nl> - echo " USE_BLAS = atlas " > > config . mk <nl> - echo " USE_DIST_KVSTORE = 1 " > > config . mk <nl> - echo " USE_S3 = 1 " > > config . mk <nl> - make - j8 <nl> - ` ` ` <nl> - <nl> - To test whether everything is installed properly , we train a Convolutional neural network on MNIST using a GPU : <nl> - <nl> - ` ` ` bash <nl> - python tests / python / gpu / test_conv . py <nl> - ` ` ` <nl> - <nl> - If the MNISt data is placed on ` s3 : / / dmlc / mnist ` , we can read the S3 data directly with the following command <nl> - <nl> - ` ` ` bash <nl> - sed - i . bak " s ! data_dir = ' data ' ! data_dir = ' s3 : / / dmlc / mnist ' ! " tests / python / gpu / test_conv . py <nl> - ` ` ` <nl> - <nl> - Note : We can use ` sudo ln / dev / null / dev / raw1394 ` to fix the opencv error ` libdc1394 error : Failed to initialize libdc1394 ` . <nl> - <nl> - # # Set Up an EC2 GPU Cluster <nl> - <nl> - A cluster consists of multiple machines . We can use the machine with MXNet <nl> - installed as the root machine for submitting jobs , and then launch several <nl> - slaves machine to run the jobs . For example , launch multiple instances using a <nl> - AMI , e . g . <nl> - [ ami - 12fd8178 ] ( https : / / console . aws . amazon . com / ec2 / v2 / home ? region = us - east - 1 # LaunchInstanceWizard : ami = ami - 12fd8178 ) , <nl> - with dependencies installed . There are two options : <nl> - <nl> - 1 . Make all slaves ' ports accessible ( same for the root ) by setting * * type : All TCP * * , <nl> - * * Source : Anywhere * * in * * Configure Security Group * * <nl> - <nl> - 2 . Use the same ` pem ` as the root machine to access all slave machines , and <nl> - then copy the ` pem ` file into root machine ' s ` ~ / . ssh / id_rsa ` . If you do this , all slave machines are ssh - able from the root . <nl> - <nl> - Now we run the previous CNN on multiple machines . Assume we are on a working <nl> - directory of the root machine , such as ` ~ / train ` , and MXNet is built as ` ~ / mxnet ` . <nl> - <nl> - 1 . First pack the mxnet python library into this working directory for easy <nl> - synchronization : <nl> - <nl> - ` ` ` bash <nl> - cp - r ~ / mxnet / python / mxnet . <nl> - cp ~ / mxnet / lib / libmxnet . so mxnet / <nl> - ` ` ` <nl> - <nl> - And then copy the training program : <nl> - <nl> - ` ` ` bash <nl> - cp ~ / mxnet / example / image - classification / * . py . <nl> - ` ` ` <nl> - <nl> - 2 . Prepare a host file with all slaves ' s private IPs . For example , ` cat hosts ` <nl> - <nl> - ` ` ` bash <nl> - 172 . 30 . 0 . 172 <nl> - 172 . 30 . 0 . 171 <nl> - ` ` ` <nl> - <nl> - 3 . Assume there are 2 machines , then train the CNN using 2 workers : <nl> - <nl> - ` ` ` bash <nl> - . . / . . / tools / launch . py - n 2 - H hosts - - sync - dir / tmp / mxnet python train_mnist . py - - kv - store dist_sync <nl> - ` ` ` <nl> - <nl> - Note : Sometimes the jobs lingers at the slave machines even we pressed ` Ctrl - c ` <nl> - at the root node . We can kill them by <nl> - <nl> - ` ` ` bash <nl> - cat hosts | xargs - I { } ssh - o StrictHostKeyChecking = no { } ' uname - a ; pgrep python | xargs kill - 9 ' <nl> - ` ` ` <nl> - <nl> - Note : The above example is quite simple to train and therefore is not a good <nl> - benchmark for the distributed training . We may consider other [ examples ] ( https : / / github . com / dmlc / mxnet / tree / master / example / image - classification ) . <nl> - <nl> - # # More NOTE <nl> - # # # Use multiple data shards <nl> - It is common to pack a dataset into multiple files , especially when working in a distributed environment . MXNet supports direct loading from multiple data shards . Simply put all the record files into a folder , and point the data path to the folder . <nl> - <nl> - # # # Use YARN , MPI , SGE <nl> - While ssh can be simple for cases when we do not have a cluster scheduling framework . MXNet is designed to be able to port to various platforms . We also provide other scripts in [ tracker ] ( https : / / github . com / dmlc / dmlc - core / tree / master / tracker ) to run on other cluster frameworks , including Hadoop ( YARN ) and SGE . Your contribution is more than welcomed to provide examples to run mxnet on your favorite distributed platform . <nl> similarity index 97 % <nl> rename from docs / get_started / build . md <nl> rename to docs / how_to / build . md <nl> mmm a / docs / get_started / build . md <nl> ppp b / docs / how_to / build . md <nl> After download , unpack the package into a folder , say D : \ MxNet , then install the <nl> The configuration of mxnet can be modified by ` ` ` config . mk ` ` ` <nl> - modify the compiling options such as compilers , CUDA , CUDNN , Intel MKL , <nl> various distributed filesystem such as HDFS / Amazon S3 / . . . <nl> - - First copy [ make / config . mk ] ( . . / make / config . mk ) to the project root , on which <nl> + - First copy [ make / config . mk ] ( . . / . . / make / config . mk ) to the project root , on which <nl> any local modification will be ignored by git , then modify the according flags . <nl> <nl> # # # # Building with Intel MKL Support <nl> - First , ` source / path / to / intel / bin / compilervars . sh ` to automatically set environment variables . Then , edit [ make / config . mk ] ( . . / make / config . mk ) , let ` USE_BLAS = mkl ` . ` USE_INTEL_PATH = NONE ` is usually not necessary to be modified . <nl> + First , ` source / path / to / intel / bin / compilervars . sh ` to automatically set environment variables . Then , edit [ make / config . mk ] ( . . / . . / make / config . mk ) , let ` USE_BLAS = mkl ` . ` USE_INTEL_PATH = NONE ` is usually not necessary to be modified . <nl> <nl> <nl> # # Python Package Installation <nl> <nl> - The python package is located at [ python / mxnet ] ( . . / python / mxnet ) . It requires <nl> + The python package is located at [ mxnet / python ] ( . . / . . / python / mxnet ) . It requires <nl> ` python > = 2 . 7 ` and ` numpy ` . To install the latter , if ` pip ` is available , then <nl> <nl> ` ` ` bash <nl> deleted file mode 100644 <nl> index 5f376d1f38e . . 00000000000 <nl> mmm a / docs / how_to / distributed_training . md <nl> ppp / dev / null <nl> <nl> - # Distributed Training <nl> - <nl> - In this tutorial we explain how to develop distributed <nl> - training programs in MXNet and how to run them on multiple machines . <nl> - <nl> - # # How to Write a Distributed Program on MXNet <nl> - <nl> - In distributed training , multiple machines work together to finish one training <nl> - job . Writing a distributed training program in MXNet is straightforward . It provides <nl> - a distributed key - value store named ` kvstore ` to hide the complexity of data <nl> - synchronization . It provides the following functions : <nl> - <nl> - - ` push ` : Push local data , such as computed gradient , to the distributed store <nl> - - ` pull ` : Pull data from the distributed store , such as the newest weight <nl> - - ` set_updater ` : set an updater for the distributed store , which specify how the <nl> - store to merge the received data , e . g . how to update the weight using the <nl> - received gradient . <nl> - <nl> - Things are even simpler if our program have the following structure : <nl> - <nl> - ` ` ` python <nl> - data = mx . io . ImageRecordIter ( . . . ) <nl> - net = mx . symbol . SoftmaxOutput ( . . . ) <nl> - model = mx . model . FeedForward . create ( symbol = net , X = data , . . . ) <nl> - ` ` ` <nl> - <nl> - It reads data from an image record iterator , and train a model using a symbolic <nl> - network . To extend it into a distributed training program , we first create a <nl> - ` kvstore ` and then pass it into the function ` create ` . The following program <nl> - modifies the above one from stochastic gradient descent ( SGD ) into distributed <nl> - asynchronous SGD : <nl> - <nl> - ` ` ` python <nl> - kv = mx . kvstore . create ( ' dist_sync ' ) <nl> - model = mx . model . FeedForward . create ( symbol = net , X = data , kvstore = kv , . . . ) <nl> - ` ` ` <nl> - <nl> - To have a quick test , we can simulate a distributed environment on the local <nl> - machine . The following command runs ` train . py ` using 2 worker nodes ( and 2 server <nl> - nodes ) in local . More details will be given later . <nl> - <nl> - ` ` ` bash <nl> - mxnet / tracker / dmlc_local . py - n 2 - s 2 python train . py <nl> - ` ` ` <nl> - <nl> - # # # Data Parallelization <nl> - <nl> - On the above example , each worker processes the whole training data . It is <nl> - often not desirable for the convergence since they may compute the gradients on <nl> - the same minibatch in an iteration and therefore there is no speedup from 1 <nl> - worker to multiple workers . <nl> - <nl> - This problem can be solved by data parallelization , namely each worker only <nl> - reads a part of the data . The ` kvstore ` provides two functions to query the <nl> - worker information : <nl> - <nl> - - ` kvstore . num_workers ` returns the number of workers . <nl> - - ` kvstore . rank ` returns the unique rank of the current worker , which is an <nl> - integer in [ 0 , ` kvstore . num_workers ` - 1 ] . <nl> - <nl> - Furthermore , the data iterators provided in ` mxnet ` support to ( virtually ) <nl> - partition a data into multiple parts , and only reads one part from <nl> - it . Therefore , we can modify the above program to partition ` data ` into <nl> - ` num_workers ` parts and ask each worker to only read one part : <nl> - <nl> - ` ` ` python <nl> - data = mx . io . ImageRecordIter ( num_parts = kv . num_workers , part_index = kv . rank , . . . ) <nl> - ` ` ` <nl> - <nl> - # # # Synchronous vs Asynchronous <nl> - <nl> - The ` kvstore ` provides two ways to extend the ( minibatch ) SGD into a distributed <nl> - version . The first way uses the Bulk Synchronous Parallel ( BSP ) protocol , which <nl> - is called ` dist_sync ` on MXNet . It aggregates the gradients over all workers in <nl> - each iteration ( or minibatch ) before updating the weight . Assume each worker <nl> - uses ( mini - ) batch size * b * , and there * n * workers in total . Then ` dist_sync ` <nl> - will produce results similar to a single machine program with batch size <nl> - * b × n * . <nl> - <nl> - Note that , due to the imperfect data partition , each worker may get slightly <nl> - different size of data . To make sure each worker computes the same number of <nl> - batches in each epoch ( data pass ) , we need to explicitly set ` epoch_size ` in the <nl> - function ` create ` for ` dist_sync ` ( no needs for ` dist_async ` ) . One choice is <nl> - <nl> - ` ` ` <nl> - epoch_size = num_examples_in_data / batch_size / kv . num_workers <nl> - ` ` ` <nl> - <nl> - The second way uses asynchronous updating , named ` dist_async ` . In this protocol , <nl> - each worker updates the weight independently with each worker . Still assume <nl> - there are * n * workers and each worker uses batch size * b * . Then ` dist_async ` can <nl> - be view as a single - machine SGD using batch size * b * , but in each iteration , it <nl> - may use the weight several ( on average * n * ) iteration ago to compute the <nl> - gradient . <nl> - <nl> - Which one is better often depends on several factors . In general speaking , <nl> - ` dist_async ` is faster than ` dist_sync ` since there is no synchronization <nl> - between workers . But ` dist_sync ` guarantees the convergence , namely it is equal <nl> - to a single machine version with proper batch size . The convergence speed of <nl> - ` dist_async ` , on the other hand , is still an interesting research topic . <nl> - <nl> - <nl> - If using ` dist_sync ` , a server first aggregates the <nl> - gradients from all workers and then performances updating . While if using <nl> - ` dist_async ` , the server updates the weight immediately after gradients from <nl> - any one worker are received . <nl> - <nl> - < ! - - # # # Implementation with the parameter server - - > <nl> - <nl> - < ! - - The ` kvstore ` is implemented by using the [ parameter server ] ( https : / / github . com / dmlc / ps - lite ) , which - - > <nl> - < ! - - is a distributed framework optimized for machine learning jobs . In this - - > <nl> - < ! - - framework , there are multiple worker nodes and server nodes . The architecture is shown below : - - > <nl> - <nl> - < ! - - < img src = https : / / raw . githubusercontent . com / dmlc / web - data / master / mxnet / multi - node / ps_arch . png width = 400 / > - - > <nl> - <nl> - < ! - - - In each iteration , a worker first reads a data batch , next * * pull * * the weights from the - - > <nl> - < ! - - servers , and then compute the gradients and * * push * * them to the servers . Workers - - > <nl> - < ! - - use several technologies , such as pre - fetching , multi - threads , and data filters , to - - > <nl> - < ! - - reduce the I / O overhead . - - > <nl> - <nl> - < ! - - - A server maintains a part of the model , and * * updates * * the model using the - - > <nl> - < ! - - received gradients . It supports multiple data consistency models , with will be - - > <nl> - < ! - - explained later . - - > <nl> - <nl> - # # Launch Jobs on a Cluster <nl> - <nl> - MXNet provides several ways to launch jobs on a cluster with multiple machines , <nl> - including by resource managers such as ` Yarn ` or simply via ` ssh ` . [ This tutorial ] ( aws . md ) <nl> - gives a step - by - step example on how to setup and run jobs on a GPU cluster at <nl> - Amazon AWS . <nl> - <nl> - # # Machines with multiple NIC ( Network Interface Card ) <nl> - <nl> - For the user who ' s cluster is composed of machines equipped with multiple NICs , MXNet provides a way to let you choose the NIC you want to use . <nl> - For example , your machine is equipped with two NICs , one card ' s name is " eth0 ( ethernet device ) " , another one is named " ib0 ( infiniband device ) " . <nl> - You can choose NIC which you will by following the guide below . <nl> - ` ` ` <nl> - export DMLC_INTERFACE = " ib0 " <nl> - ` ` ` <nl> - or <nl> - ` ` ` <nl> - export DMLC_INTERFACE = " eth0 " <nl> - ` ` ` <nl> - < ! - - # # More Readings - - > <nl> - <nl> - < ! - - - [ Distributed training examples with results ] ( https : / / github . com / dmlc / mxnet / tree / master / example / distributed - training ) - - > <nl> - < ! - - - Research papers for the parameter server : from the algorithm aspect - - > <nl> - < ! - - [ NIPS ' 14 ] ( http : / / www . cs . cmu . edu / ~ muli / file / parameter_server_nips14 . pdf ) , from - - > <nl> - < ! - - the system aspect [ OSDI ' 14 ] ( http : / / www . cs . cmu . edu / ~ muli / file / parameter_server_osdi14 . pdf ) - - > <nl> mmm a / docs / how_to / index . md <nl> ppp b / docs / how_to / index . md <nl> <nl> - # How To <nl> + # MXNet How To <nl> <nl> - # # Run MXNet <nl> + This page contains guidelines to use and develop mxnets . <nl> <nl> - # # # [ Reduce memory footprint ] ( . / memory . html ) <nl> + # # Installation <nl> + - [ How to Install MXNet ] ( build . md ) <nl> <nl> - Learn how to reduce the memory footprint in order to run bigger and deeper neural <nl> - networks with larger batch size on the same hardward . <nl> + # # Use MXNet on Specific Tasks <nl> + - [ Train with multiple CPU / GPUs in data parallelism ] ( multi_devices . md ) <nl> + - [ Run MXNet on smart devices ] ( smart_device . md ) <nl> + - [ Run MXNet on cloud ] ( cloud . md ) <nl> + - [ Use pretrained models ] ( pretrained . md ) <nl> + - [ Use mxnet on variable input length / size ] ( bucketing . md ) <nl> + - [ Improve performance tips ] ( perf . md ) <nl> <nl> - # # # [ Improve performance ] ( . / perf . html ) <nl> + # # Develop and Hack MXNet <nl> + - [ Create new operators ] ( new_op . md ) <nl> + - [ Use Torch from MXNet ] ( torch . md ) <nl> + - [ Contribute to MXNet ] ( contribute . md ) <nl> + - [ Set environment variables of MXNet ] ( env_var . md ) <nl> <nl> - Learn the factors that affect MXNet ' s performance . <nl> - <nl> - # # # [ Train with multiple CPU / GPUs ] ( . / multi_devices . html ) <nl> - <nl> - Learn how to train a task using mutliple GPUs within a single machine or with <nl> - mutliple CPU / GPU machines <nl> - <nl> - # # # [ Run on smart devices ] ( . / smart_device . html ) <nl> - <nl> - Install and run MXNet on smart devices such as mobile phones <nl> - <nl> - # # # [ Run on cloud ] ( . / cloud . html ) <nl> - <nl> - Run MXNet on a clound such as Amazon AWS <nl> - <nl> - # # # [ Pretrained Models ] ( . / pretrained . html ) <nl> - <nl> - # # Develope with MXNet <nl> - <nl> - # # # [ Create New Operators ] ( . / new_op . html ) <nl> - <nl> - # # # [ Use Torch ] ( . / torch . html ) <nl> - <nl> - # # # [ Make a Contribution ] ( . / contribute . html ) <nl> - <nl> - # # # [ Buckeing ] ( . / bucketing . html ) <nl> - <nl> - # # # [ FAQ ] ( . / faq . html ) <nl> + # # Frequently Ask Questions <nl> + - [ FAQ ] ( faq . md ) <nl> deleted file mode 100644 <nl> index bcf2014f087 . . 00000000000 <nl> mmm a / docs / how_to / memory . md <nl> ppp / dev / null <nl> @ @ - 1 + 0 , 0 @ @ <nl> - # Reduce Memory Footprint <nl> mmm a / docs / index . md <nl> ppp b / docs / index . md <nl> <nl> + Contents <nl> + mmmmmm - - <nl> + These are used to generate the index used in search . <nl> + <nl> + - [ Python Documents ] ( packages / python / index . md ) <nl> + - [ R Documents ] ( packages / r / index . md ) <nl> + - [ Julia Documents ] ( packages / julia / index . md ) <nl> + - [ Julia Documents ] ( packages / c + + / index . md ) <nl> + - [ Scala Documents ] ( packages / scala / index . md ) <nl> + - [ Howto Documents ] ( how_to / index . md ) <nl> + - [ Get Started Documents ] ( get_started / index . md ) <nl> + - [ System Documents ] ( system / index . md ) <nl> + - [ Tutorials ] ( system / index . md ) <nl> + <nl> + # Chinese translation of docs <nl> + - [ Chinse translation of docs ] ( index_zh . md ) <nl> mmm a / docs / packages / c + + / index . md <nl> ppp b / docs / packages / c + + / index . md <nl> @ @ - 1 + 1 , 2 @ @ <nl> + # MXNet C + + Package <nl> Please refer to [ https : / / github . com / dmlc / MXNet . cpp ] ( https : / / github . com / dmlc / MXNet . cpp ) <nl> mmm a / docs / packages / julia / index . md <nl> ppp b / docs / packages / julia / index . md <nl> <nl> - <nl> + # MXNet Julia Package <nl> Julia documents are available at [ http : / / mxnetjl . readthedocs . org / ] ( http : / / mxnetjl . readthedocs . org / ) <nl> mmm a / docs / packages / python / index . md <nl> ppp b / docs / packages / python / index . md <nl> <nl> MXNet Python Package <nl> = = = = = = = = = = = = = = = = = = = = <nl> This page contains links to all the python related documents on python package . <nl> - To install the package package , checkout [ Build and Installation Instruction ] ( . . / build . html ) . <nl> + To install the package package , checkout [ Build and Installation Instruction ] ( . . / . . / how_to / build . md ) . <nl> There are three types of documents you can find about mxnet . <nl> <nl> * [ Tutorials ] ( # tutorials ) are self contained materials that introduces a certain use - cases of mxnet . <nl> - * [ Code Examples ] ( . . / . . / example ) contains example codes . <nl> + * [ Code Examples ] ( . . / . . / . . / example ) contains example codes . <nl> * [ Python API Documents ] ( # python - api - documents ) contains documents about specific module , as well as reference of all API functions . <nl> <nl> Tutorials <nl> mmmmmmmmm <nl> - * [ Python Overview Tutorial ] ( . / tutorial . html ) <nl> - * [ Symbolic Configuration and Execution in Pictures ] ( . / symbol_in_pictures . html ) <nl> - * [ How to Create New Operations ( Layers ) ] ( . . / how_to / new_op . html ) <nl> - <nl> + * [ Python Overview Tutorial ] ( tutorial . md ) <nl> + * [ Symbolic Configuration and Execution in Pictures ] ( symbol_in_pictures . md ) <nl> + * [ How to Create New Operations ( Layers ) ] ( . . / . . / how_to / new_op . md ) <nl> <nl> Python API Documents <nl> mmmmmmmmmmmmmmmmmm - - <nl> - * [ High Level Model Training Related API ] ( . / model . html ) <nl> - * [ NDArray API ] ( . / ndarray . html ) <nl> - * [ Symbolic API ] ( . / symbol . html ) <nl> - * [ KVStore API ] ( . / kvstore . html ) <nl> - * [ Data Loading API ] ( . / io . html ) <nl> + * [ High Level Model Training Related API ] ( model . md ) <nl> + * [ NDArray API ] ( ndarray . md ) <nl> + * [ Symbolic API ] ( symbol . md ) <nl> + * [ KVStore API ] ( kvstore . md ) <nl> + * [ Data Loading API ] ( io . md ) <nl> mmm a / docs / packages / python / io . md <nl> ppp b / docs / packages / python / io . md <nl> dataiter = mx . io . ImageRecordIter ( <nl> <nl> Then you ' re all set for a multi - label image iterator . <nl> <nl> + ` ` ` eval_rst <nl> + . . raw : : html <nl> + <nl> + < script type = " text / javascript " src = ' . . / . . / _static / js / auto_module_index . js ' > < / script > <nl> + ` ` ` <nl> + <nl> + <nl> IO API Reference <nl> mmmmmmmmmmmmmmm - <nl> <nl> ` ` ` eval_rst <nl> . . automodule : : mxnet . io <nl> : members : <nl> + <nl> + . . raw : : html <nl> + <nl> + < script > auto_index ( " mxnet . io " ) ; < / script > <nl> ` ` ` <nl> mmm a / docs / packages / python / kvstore . md <nl> ppp b / docs / packages / python / kvstore . md <nl> update on key : 9 <nl> [ 11 . 11 . 11 . ] ] <nl> ` ` ` <nl> <nl> + ` ` ` eval_rst <nl> + . . raw : : html <nl> + <nl> + < script type = " text / javascript " src = ' . . / . . / _static / js / auto_module_index . js ' > < / script > <nl> + ` ` ` <nl> + <nl> + <nl> # # API Reference <nl> <nl> ` ` ` eval_rst <nl> . . automodule : : mxnet . kvstore <nl> : members : <nl> + <nl> + . . raw : : html <nl> + <nl> + < script > auto_index ( " mxnet . kvstore " ) ; < / script > <nl> ` ` ` <nl> mmm a / docs / packages / python / model . md <nl> ppp b / docs / packages / python / model . md <nl> model = mx . model . FeedForward . create ( <nl> ` ` ` <nl> The training will be done in a data parallel way on the GPUs you specified . <nl> <nl> + ` ` ` eval_rst <nl> + . . raw : : html <nl> + <nl> + < script type = " text / javascript " src = ' . . / . . / _static / js / auto_module_index . js ' > < / script > <nl> + ` ` ` <nl> + <nl> + <nl> Initializer API Reference <nl> mmmmmmmmmmmmmmmmmmmmmmmm - <nl> <nl> ` ` ` eval_rst <nl> . . automodule : : mxnet . initializer <nl> : members : <nl> + <nl> + . . raw : : html <nl> + <nl> + < script > auto_index ( " mxnet . initializer " ) ; < / script > <nl> ` ` ` <nl> <nl> Evaluation Metric API Reference <nl> Evaluation Metric API Reference <nl> ` ` ` eval_rst <nl> . . automodule : : mxnet . metric <nl> : members : <nl> + <nl> + . . raw : : html <nl> + <nl> + < script > auto_index ( " mxnet . metric " ) ; < / script > <nl> ` ` ` <nl> <nl> Optimizer API Reference <nl> Optimizer API Reference <nl> ` ` ` eval_rst <nl> . . automodule : : mxnet . optimizer <nl> : members : <nl> + <nl> + . . raw : : html <nl> + <nl> + < script > auto_index ( " mxnet . optimizer " ) ; < / script > <nl> ` ` ` <nl> <nl> Model API Reference <nl> Model API Reference <nl> ` ` ` eval_rst <nl> . . automodule : : mxnet . model <nl> : members : <nl> + <nl> + . . raw : : html <nl> + <nl> + < script > auto_index ( " mxnet . model " ) ; < / script > <nl> ` ` ` <nl> mmm a / docs / packages / python / ndarray . md <nl> ppp b / docs / packages / python / ndarray . md <nl> mxnet . base . MXNetError : [ 13 : 29 : 12 ] src / ndarray / ndarray . cc : 33 : Check failed : lhs . c <nl> > > > z = x + cpu_y <nl> ` ` ` <nl> <nl> + ` ` ` eval_rst <nl> + . . raw : : html <nl> + <nl> + < script type = " text / javascript " src = ' . . / . . / _static / js / auto_module_index . js ' > < / script > <nl> + ` ` ` <nl> + <nl> NDArray API Reference <nl> mmmmmmmmmmmmmmmmmmmmm <nl> <nl> ` ` ` eval_rst <nl> . . automodule : : mxnet . ndarray <nl> : members : <nl> + <nl> + . . raw : : html <nl> + <nl> + < script > auto_index ( " mxnet . ndarray " ) ; < / script > <nl> ` ` ` <nl> <nl> NDArray Random API Reference <nl> NDArray Random API Reference <nl> ` ` ` eval_rst <nl> . . automodule : : mxnet . random <nl> : members : <nl> + <nl> + . . raw : : html <nl> + <nl> + < script > auto_index ( " mxnet . random " ) ; < / script > <nl> ` ` ` <nl> <nl> <nl> Context API Reference <nl> ` ` ` eval_rst <nl> . . automodule : : mxnet . context <nl> : members : <nl> + <nl> + . . raw : : html <nl> + <nl> + < script > auto_index ( " mxnet . context " ) ; < / script > <nl> ` ` ` <nl> mmm a / docs / packages / python / symbol . md <nl> ppp b / docs / packages / python / symbol . md <nl> <nl> - MXNet Python Symbolic API <nl> - = = = = = = = = = = = = = = = = = = = = = = = = = <nl> + # MXNet Python Symbolic API <nl> * [ How to Commpose Symbols ] ( # overloaded - operators ) introduces operator overloading of symbols <nl> * [ Serialization ] ( # serialization ) introduces how to save and load symbols . <nl> * [ Multiple Outputs ] ( # multiple - outputs ) introduces how to configure multiple outputs <nl> You can use [ mxnet . symbol . Group ] ( # mxnet . symbol . Group ) function to group the symb <nl> After you get the ` ` ` group ` ` ` , you can go ahead and bind on ` ` ` group ` ` ` instead , <nl> and the resulting executor will have two outputs , one for fc1_output and one for softmax_output . <nl> <nl> - Symbol Creation API Reference <nl> mmmmmmmmmmmmmmmmmmmmmmmmmmmmmm <nl> - This section contains the reference to all API functions . <nl> - Before you get started , you can check the list of functions in the following table . <nl> - <nl> ` ` ` eval_rst <nl> - . . autosummary : : <nl> - : nosignatures : <nl> - <nl> - mxnet . symbol . load <nl> - mxnet . symbol . load_json <nl> - mxnet . symbol . Group <nl> - mxnet . symbol . Variable <nl> - mxnet . symbol . Activation <nl> - mxnet . symbol . BatchNorm <nl> - mxnet . symbol . Concat <nl> - mxnet . symbol . Convolution <nl> - mxnet . symbol . Dropout <nl> - mxnet . symbol . ElementWiseSum <nl> - mxnet . symbol . Flatten <nl> - mxnet . symbol . FullyConnected <nl> - mxnet . symbol . LRN <nl> - mxnet . symbol . LeakyReLU <nl> - mxnet . symbol . Pooling <nl> - mxnet . symbol . Reshape <nl> - mxnet . symbol . SoftmaxOutput <nl> + . . raw : : html <nl> + <nl> + < script type = " text / javascript " src = ' . . / . . / _static / js / auto_module_index . js ' > < / script > <nl> ` ` ` <nl> <nl> + Symbol Creation API Reference <nl> + mmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl> + <nl> ` ` ` eval_rst <nl> . . automodule : : mxnet . symbol <nl> : members : <nl> + <nl> + . . raw : : html <nl> + <nl> + < script > auto_index ( " mxnet . symbol " ) ; < / script > <nl> ` ` ` <nl> <nl> <nl> Execution API Reference <nl> ` ` ` eval_rst <nl> . . automodule : : mxnet . executor <nl> : members : <nl> + <nl> + . . raw : : html <nl> + <nl> + < script > auto_index ( " mxnet . executor " ) ; < / script > <nl> ` ` ` <nl> mmm a / docs / packages / r / Makefile <nl> ppp b / docs / packages / r / Makefile <nl> fiveMinutesNeuralNetwork . md : <nl> <nl> # General Rules for build rmarkdowns , need knitr <nl> % . md : $ ( PKGROOT ) / vignettes / % . Rmd <nl> - rm - rf " . . / doc - image / mxnet / knitr / $ ( basename $ @ ) - " * ; <nl> + rm - rf " . . / . . / web - data / mxnet / knitr / $ ( basename $ @ ) - " * ; <nl> Rscript - e \ <nl> " require ( knitr ) ; " \ <nl> " knitr : : opts_knit \ $ $ set ( root . dir = \ " . \ " ) ; " \ <nl> - " knitr : : opts_chunk \ $ $ set ( fig . path = \ " . . / web - data / mxnet / knitr / $ ( basename $ @ ) - \ " ) ; " \ <nl> + " knitr : : opts_chunk \ $ $ set ( fig . path = \ " . . / . . / web - data / mxnet / knitr / $ ( basename $ @ ) - \ " ) ; " \ <nl> " knitr : : knit ( \ " $ + \ " ) " <nl> mmm a / docs / packages / r / classifyRealImageWithPretrainedModel . md <nl> ppp b / docs / packages / r / classifyRealImageWithPretrainedModel . md <nl> require ( imager ) <nl> # # Loading required package : stringr <nl> # # Loading required package : png <nl> # # Loading required package : jpeg <nl> - # # <nl> + # # <nl> # # Attaching package : ' imager ' <nl> - # # <nl> + # # <nl> # # The following object is masked from ' package : magrittr ' : <nl> - # # <nl> + # # <nl> # # add <nl> - # # <nl> + # # <nl> # # The following object is masked from ' package : plyr ' : <nl> - # # <nl> + # # <nl> # # liply <nl> - # # <nl> + # # <nl> # # The following objects are masked from ' package : stats ' : <nl> - # # <nl> + # # <nl> # # convolve , spectrum <nl> - # # <nl> + # # <nl> # # The following object is masked from ' package : graphics ' : <nl> - # # <nl> + # # <nl> # # frame <nl> - # # <nl> + # # <nl> # # The following object is masked from ' package : base ' : <nl> - # # <nl> + # # <nl> # # save . image <nl> ` ` ` <nl> <nl> im < - load . image ( system . file ( " extdata / parrots . png " , package = " imager " ) ) <nl> plot ( im ) <nl> ` ` ` <nl> <nl> - ! [ plot of chunk unnamed - chunk - 5 ] ( . . / web - data / mxnet / knitr / classifyRealImageWithPretrainedModel - unnamed - chunk - 5 - 1 . png ) <nl> + ! [ plot of chunk unnamed - chunk - 5 ] ( . . / . . / web - data / mxnet / knitr / classifyRealImageWithPretrainedModel - unnamed - chunk - 5 - 1 . png ) <nl> <nl> Before feeding the image to the deep net , we need to do some preprocessing <nl> to make the image fit the input requirement of deepnet . The preprocessing <nl> mmm a / docs / packages / r / index . md <nl> ppp b / docs / packages / r / index . md <nl> Sounds exciting ? This page contains links to all the related documents on R pack <nl> <nl> Get Started <nl> mmmmmmmmm - - <nl> - Checkout the [ Installation Guide ] ( . . / get_started / build . html ) contains instructions to install mxnet , and [ Tutorials ] ( # tutorials ) for examples on how to use mxnet for various tasks . <nl> + Checkout the [ Installation Guide ] ( . . / get_started / build . md ) contains instructions to install mxnet , and [ Tutorials ] ( # tutorials ) for examples on how to use mxnet for various tasks . <nl> <nl> Tutorials <nl> mmmmmmmmm <nl> - * [ Neural Network with MXNet in Five Minutes ] ( fiveMinutesNeuralNetwork . html ) <nl> - * [ Classify Realworld Images with Pretrained Model ] ( classifyRealImageWithPretrainedModel . html ) <nl> - * [ Handwritten Digits Classification Competition ] ( mnistCompetition . html ) <nl> - * [ Tutorial on NDArray and Symbol ] ( ndarrayAndSymbolTutorial . html ) <nl> - * [ Tutorial on Callback Functions ] ( CallbackFunctionTutorial . html ) <nl> + * [ Neural Network with MXNet in Five Minutes ] ( fiveMinutesNeuralNetwork . md ) <nl> + * [ Classify Realworld Images with Pretrained Model ] ( classifyRealImageWithPretrainedModel . md ) <nl> + * [ Handwritten Digits Classification Competition ] ( mnistCompetition . md ) <nl> + * [ Tutorial on NDArray and Symbol ] ( ndarrayAndSymbolTutorial . md ) <nl> + * [ Tutorial on Callback Functions ] ( CallbackFunctionTutorial . md ) <nl> <nl> Resources <nl> mmmmmmmmm <nl> There are several information to get you started <nl> - * [ Installation Guide ] ( . . / get_started / build . html ) contains instructions to install mxnet . <nl> + * [ Installation Guide ] ( . . / get_started / build . md ) contains instructions to install mxnet . <nl> * [ Contributor Guide ] ( http : / / mxnet . readthedocs . org / en / latest / contribute . html # r - package ) <nl> - The R package section gives various guidelines on how to contribute code , tutorial , rmarkdown examples to mxnet . <nl> - Your contribution is always welcomed ! <nl> mmm a / docs / packages / r / mnistCompetition . md <nl> ppp b / docs / packages / r / mnistCompetition . md <nl> submission < - data . frame ( ImageId = 1 : ncol ( test ) , Label = pred . label ) <nl> write . csv ( submission , file = ' submission . csv ' , row . names = FALSE , quote = FALSE ) <nl> ` ` ` <nl> <nl> - ! [ ] ( . . / web - data / mxnet / knitr / mnistCompetition - kaggle - submission . png ) <nl> + ! [ ] ( . . / . . / web - data / mxnet / knitr / mnistCompetition - kaggle - submission . png ) <nl> mmm a / docs / packages / r / ndarrayAndSymbolTutorial . md <nl> ppp b / docs / packages / r / ndarrayAndSymbolTutorial . md <nl> applications . There are two major concepts introduced in this tutorial . <nl> <nl> # # NDArray : Vectorized tensor computations on CPUs and GPUs <nl> <nl> - ` NDArray ` is the basic vectorized operation unit in MXNet for matrix and tensor computations . <nl> + ` NDArray ` is the basic vectorized operation unit in MXNet for matrix and tensor computations . <nl> Users can perform usual calculations as on R " s array , but with two additional features : <nl> <nl> 1 . * * multiple devices * * : all operations can be run on various devices including <nl> as . array ( d ) <nl> # # [ 2 , ] - 3 . 9375 - 3 . 9375 - 3 . 9375 - 3 . 9375 <nl> ` ` ` <nl> <nl> - If two ` NDArray ` s sit on different divices , we need to explicitly move them <nl> + If two ` NDArray ` s sit on different divices , we need to explicitly move them <nl> into the same one . For instance : <nl> <nl> <nl> as . array ( a [ [ 1 ] ] ) <nl> # # [ 2 , ] 1 1 1 <nl> ` ` ` <nl> <nl> - In case you want to save data to the distributed file system such as S3 and HDFS , <nl> + In case you want to save data to the distributed file system such as S3 and HDFS , <nl> we can directly save to and load from them . For example : <nl> <nl> <nl> arguments ( net ) <nl> ` ` ` <nl> <nl> ` ` ` <nl> - # # [ 1 ] " data " " fc1_weight " " fc1_bias " " fc2_weight " " fc2_bias " <nl> + # # [ 1 ] " data " " fc1_weight " " fc1_bias " " fc2_weight " " fc2_bias " <nl> # # [ 6 ] " out_label " <nl> ` ` ` <nl> <nl> In the above example , * net * is used a function to apply to an existing symbol <nl> <nl> # # # Training a Neural Net . <nl> <nl> - The [ model API ] ( . . / . . / R - package / R / model . R ) is a thin wrapper around the symbolic executors to support neural net training . <nl> + The [ model API ] ( . . / . . / . . / R - package / R / model . R ) is a thin wrapper around the symbolic executors to support neural net training . <nl> <nl> You are also highly encouraged to read [ Symbolic Configuration and Execution in Pictures for python package ] ( . . / python / symbol_in_pictures . md ) , <nl> which provides a detailed explanation of concepts in pictures . <nl> mmm a / docs / sphinx_util . py <nl> ppp b / docs / sphinx_util . py <nl> def run_build_mxnet ( folder ) : <nl> " " " Run the doxygen make command in the designated folder . " " " <nl> try : <nl> if READTHEDOCS_BUILD : <nl> - subprocess . call ( ' cp make / readthedocs . mk config . mk ' , shell = True ) <nl> - subprocess . call ( ' rm - rf build ' , shell = True ) <nl> + subprocess . call ( ' cd % s ; cp make / readthedocs . mk config . mk ' % folder , shell = True ) <nl> + subprocess . call ( ' cd % s ; rm - rf build ' % folder , shell = True ) <nl> retcode = subprocess . call ( " cd % s ; make " % folder , shell = True ) <nl> if retcode < 0 : <nl> sys . stderr . write ( " build terminated by signal % s " % ( - retcode ) ) <nl> except OSError as e : <nl> sys . stderr . write ( " build execution failed : % s " % e ) <nl> <nl> - # run_build_mxnet ( " . . " ) <nl> - # sys . stderr . write ( ' READTHEDOCS = % s \ n ' % ( READTHEDOCS_BUILD ) ) <nl> - <nl> - # if not os . path . exists ( ' web - data ' ) : <nl> - # subprocess . call ( ' rm - rf web - data ; ' + <nl> - # ' git clone https : / / github . com / dmlc / web - data ' , shell = True ) <nl> - # else : <nl> - # subprocess . call ( ' cd web - data ; git pull ' , shell = True ) <nl> - <nl> if not os . path . exists ( ' . . / recommonmark ' ) : <nl> subprocess . call ( ' cd . . ; rm - rf recommonmark ; ' + <nl> ' git clone https : / / github . com / tqchen / recommonmark ' , shell = True ) <nl> else : <nl> subprocess . call ( ' cd . . / recommonmark / ; git pull ' , shell = True ) <nl> <nl> + if not os . path . exists ( ' web - data ' ) : <nl> + subprocess . call ( ' rm - rf web - data ; ' + <nl> + ' git clone https : / / github . com / dmlc / web - data ' , shell = True ) <nl> + else : <nl> + subprocess . call ( ' cd web - data ; git pull ' , shell = True ) <nl> + <nl> + <nl> + curr_path = os . path . dirname ( os . path . abspath ( os . path . expanduser ( __file__ ) ) ) <nl> + root_path = os . path . join ( curr_path , ' . . ' ) <nl> + run_build_mxnet ( root_path ) <nl> + sys . stderr . write ( ' READTHEDOCS = % s \ n ' % ( READTHEDOCS_BUILD ) ) <nl> + <nl> + <nl> + <nl> sys . path . insert ( 0 , os . path . abspath ( ' . . / recommonmark / ' ) ) <nl> <nl> from recommonmark import parser , transform <nl> deleted file mode 100644 <nl> index 397dfd31b6b . . 00000000000 <nl> mmm a / docs / system / executor . md <nl> ppp / dev / null <nl> <nl> - GraphExecutor <nl> - = = = = = = = = = = = = = <nl> - <nl> - Operator Graph <nl> mmmmmmmmmmmmmmm <nl> - <nl> - Memory optimization <nl> mmmmmmmmmmmmmmmmmm - - <nl> - <nl> - Forward and Backward <nl> mmmmmmmmmmmmmmmmmmmmm <nl> mmm a / docs / system / index . md <nl> ppp b / docs / system / index . md <nl> <nl> # System Design Note <nl> <nl> - This page contains resources you need to understand how mxnet works and how to <nl> - work on mxnet codebase . We believe that it is important to make the system <nl> - modularized and understandable by general audience . <nl> + This design document contains notes that are relevant to the MXNet system design and deep learning <nl> + libraries in general . We believe that open sourcing this system design note can help general audiences understand the motivations , benefits and drawbacks of our design choices . This will help deep learning practitioners as well as builders of other deep learning systems . <nl> <nl> + # # Deep Learning Design Notes <nl> + <nl> + This section will be updated with self - contained design notes on various aspect of deep learning systems , <nl> + in terms of abstraction , optimization and trade - offs . <nl> + <nl> + * [ Programming Models for Deep Learning ] ( program_model . md ) <nl> + * [ Dependency Engine for Deep Learning ] ( note_engine . md ) <nl> + * [ Squeeze the Memory Consumption of Deep Learning ] ( note_memory . md ) <nl> + * [ Efficient Data Loading Module for Deep Learning ] ( note_data_loading . md ) <nl> + * [ Survay of RNN Interface ] ( rnn_interface . md ) <nl> + <nl> + The next parts will be specific to MXNet <nl> <nl> # # Overview of the Design <nl> <nl> modularized and understandable by general audience . <nl> <nl> The above shows major modules of mxnet , and how do they interact with each <nl> other . The modules are <nl> - - [ Runtime Dependency Engine ] ( engine . html ) : Schedules and executes the <nl> + - [ Runtime Dependency Engine ] ( engine . md ) : Schedules and executes the <nl> operations according to their read / write dependency . <nl> - Storage Allocator : Efficiently allocate and recycles memory blocks for GPU and <nl> CPU . <nl> other . The modules are <nl> imperative programs for MXNet . <nl> - Symbolic Execution : Static symbolic graph executor , provide efficient symbolic <nl> graph execution and optimization . <nl> - - [ Operator ] ( operator . html ) : Operators that defines static forward and gradient <nl> + - [ Operator ] ( operator . md ) : Operators that defines static forward and gradient <nl> calculation ( backprop ) . <nl> - Symbol Construction : Symbolic construction , provide a way to construct <nl> computation graph ( net configuration ) <nl> - - [ KVStore ] ( multi_node . html ) : Key - value store interface for easy parameter synchronizations . <nl> + - [ KVStore ] ( multi_node . md ) : Key - value store interface for easy parameter synchronizations . <nl> - Data Loading ( IO ) : Efficient distributed data loading and augmentation . <nl> <nl> - # # Design Note <nl> - <nl> - * [ Programming Models for Deep Learning ] ( program_model . html ) <nl> - - Compares various programming models , which motivates the current design . <nl> - * [ Dependency Engine for Deep Learning ] ( note_engine . html ) <nl> - - Introduces the dependency tracking and scheduling component for general deep learning , <nl> - this motivates the design of Engine module . <nl> - * [ Squeeze the Memory Consumption of Deep Learning ] ( note_memory . html ) <nl> - - Introduces how we can reduce memory consumption of deep nets <nl> - * [ Efficient Data Loading Module for Deep Learning ] ( note_data_loading . html ) <nl> - - Push the efficiency offline data preparation and online data loading . <nl> - * [ Survay of RNN Interface ] ( rnn_interface . html ) <nl> <nl> # # How to Read the Code <nl> - All the module interface are listed in [ include ] ( . . / . . / include ) , these <nl> Documents of Each Module <nl> mmmmmmmmmmmmmmmmmmmmmmmm <nl> * [ Runtime Dependency Engine ] ( engine . md ) <nl> * [ Operators ] ( operator . md ) <nl> - <nl> - <nl> + - <nl> <nl> List of Other Resources <nl> mmmmmmmmmmmmmmmmmmmmm - - <nl> * [ Doxygen Version of C + + API ] ( https : / / mxnet . readthedocs . org / en / latest / doxygen ) gives a comprehensive document of C + + API . <nl> - * [ Contributor Guide ] ( . . / contribute . md ) gives guidelines on how to push changes to the project . <nl> + * [ Contributor Guide ] ( . . / how_to / contribute . md ) gives guidelines on how to push changes to the project . <nl> mmm a / docs / system / note_data_loading . md <nl> ppp b / docs / system / note_data_loading . md <nl> <nl> Design Efficient Deep Learning Data Loading Module <nl> = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> Data loading is an important part of the machine learning system , especially when the data is huge and do not fit into memory . The general design goal of data loading module is to achieve more efficient data loading , less effort on data preparation , clean and flexible interface . <nl> - <nl> + <nl> This tutorial will be organized as follows : in IO Design Insight section , we introduce some insights and guidelines in our data loading design ; in Data Format section , we introduce our solution using dmlc - core ' s binary recordIO implementation ; in Data Loading section , we introduce our method to hide IO cost by utilizing the Threadediter provided by dmlc - core ; in the Interface Design section , we will show you the simple way to construct a MXNet data iterator in a few lines of python ; in the Future Extension part , we discuss how to make data loading more flexible to support more learning tasks . <nl> <nl> We will cover the following key requirements , in detail in the later part of sections . <nl> We will cover the following key requirements , in detail in the later part of sec <nl> <nl> # # Design Insight <nl> IO design usually involves two kinds of work : data preparation and data loading . Data preparation usually influences the time consuming offline , while data loading influences the online performance . In this section , we will introduce our insight of IO design involving the two phases . <nl> - <nl> + <nl> # # # Data Preparation <nl> Data preparation is to pack the data into certain format for later processing . When the data is huge , i . e . full ImageNet , this process may be time - consuming . Since that , there ' re several things we need to pay attention : <nl> <nl> Data preparation is to pack the data into certain format for later processing . W <nl> - Do the packing once . No repacking is needed when the running setting has been changed ( usually means the number of running machines ) ; <nl> - Process the packing in parallel to save time ; <nl> - Access to arbitrary parts easily . This is crucial for distributed machine learning when data parallelism is introduced . Things may get tricky when the data has been packed into several physical data files . The desired behavior could be : the packed data can be logically partite into arbitrary numbers of partitions , no matter how many physical data files there are . For example , we pack 1000 images into 4 physical files , each contains 250 images . Then we use 10 machines to training DNN , we should be able to load approximately 100 images per machine . Some machine may need images from different physical files . <nl> - <nl> + <nl> # # # Data Loading <nl> Data loading is to load the packed data into RAM . One ultimate goal is to load as quickly as possible . Thus there ' re several things we need to pay attention : <nl> - Continuous reading . This is to avoid arbitrary reading from disk ; <nl> Data loading is to load the packed data into RAM . One ultimate goal is to load a <nl> - RAM saving . We don ' t want to load the whole file into the RAM if the packed file is huge . <nl> <nl> # # Data Format <nl> - <nl> + <nl> Since the training of deep neural network always involves huge amount of data , the format we choose should works efficient and convenient in such scenario . <nl> - <nl> + <nl> To achieve the goals described in insight , we need to pack binary data into a splitable format . In MXNet , we use binary recordIO format implemented in dmlc - core as our basic data saving format . <nl> <nl> # # # Binary Record <nl> <nl> ! [ baserecordio ] ( https : / / raw . githubusercontent . com / dmlc / web - data / master / mxnet / io / baserecordio . jpg ) <nl> In binary recordIO , each data instance is stored as a record . * * kMagic * * is a Magic Number indicating the start of a record . * * Lrecord * * encodes length and continue flat . In lrecord , if cflag = = 0 : this is a complete record ; cflag = = 1 : start of a multiple - rec ; cflag = = 2 : middle of multiple - rec ; cflag = = 3 : end of multiple - rec . * * Data * * is the space to save data content . * * Pad * * is simply a padding space to make record align to 4 bytes . <nl> - <nl> + <nl> After packing , each file contains multiple records . Loading can be continues . This avoids the low performance of random reading from disk . <nl> <nl> One great advantage of storing data as record is each record can vary in length . This allow us to save data in a more compact way if compact algorithm is available for a certain kind of data . For example , we can use JPEG format to save image data . The packed data will be much smaller compared with storing in RGB value . We can take ImageNet_1K dataset as an example , if we store the data in 3 * 256 * 256 raw rgb value , the dataset may occupy more than * * 200G * * , while if we stored the data after compacting into JPEG , it only occupies about * * 35G * * disk space . It may greatly reduce the cost of reading disk . <nl> Here ' s an example of Image binary recordIO : <nl> We first resize the image into 256 * 256 , then compact it into JPEG format , after that we save the header which indicates the index and label for that image to construct the Data field of a record . Then pack several images together into a file . <nl> <nl> # # # Accuess Arbitrary Parts Of Data <nl> - <nl> + <nl> The desired behavior of data loading could be : the packed data can be logically sliced into arbitrary numbers of partitions , no matter how many physical packed data files there are . <nl> - <nl> + <nl> Since binary recordIO can easily locate the start and end of a record using the Magic Number , we can achieve the above goal using the InputSplit functionality provided by dmlc - core . <nl> - <nl> + <nl> InputSplit takes the following parameters : <nl> - FileSystem * filesys : dmlc - core encapsulate the IO operations for different filesystems , like hdfs , s3 , local . User don ' t need to worry about the difference between filesystems any more ; <nl> - Char * uri : the uri of files . Note that it could be a list of files , for we may pack the data into several physical parts . File uris are separated by ' ; ' . <nl> The splitting process is demonstrated below : <nl> ! [ afterpartition ] ( https : / / raw . githubusercontent . com / dmlc / web - data / master / mxnet / io / afterpartition . jpg ) <nl> <nl> By conducting the above operations , we now identify the records belong to each part , and the physical data files needed by each logical part . InputSplit greatly reduce the difficulty of data parallelism , where each process only read part of the data . <nl> - <nl> + <nl> Since logical partition doesn ' t rely on the number of physical data files , we can process huge dataset like ImageNet_22K in parallel easily as illustrated below . We don ' t need to consider distributed loading issue at the preparation time , just select the most efficient physical file number according to the dataset size and the computing resources you have . <nl> ! [ parellelprepare ] ( https : / / raw . githubusercontent . com / dmlc / web - data / master / mxnet / io / parallelprepare . jpg ) <nl> <nl> # # Data Loading and Preprocessing <nl> - <nl> + <nl> When the speed of loading and preprocessing can ' t cache up with the speed of training or evaluation , IO will become the bottleneck of the whole system . In this section , we will introduce our tricks to pursuit the ultimate efficiency to load and preprocess data packed in binary recordIO format . In our ImageNet practice , we can achieve the IO speed of * * 3000 * * images / s * * with normal HDD * * . <nl> - <nl> + <nl> # # # Loading and preprocessing on the fly <nl> - <nl> + <nl> When training deep neural networks , we sometimes can only load and preprocess the data along with training because of the following reasons : <nl> - The whole size of the dataset exceed the RAM size , we can ' t load them in advance ; <nl> - The preprocessing pipeline may produce different output for the same data at different epoch if we would like to introduce randomness in training ; <nl> To achieve the goal of ultimate efficiency , multi - thread technic is introduced i <nl> ! [ process ] ( https : / / raw . githubusercontent . com / dmlc / web - data / master / mxnet / io / process . jpg ) <nl> <nl> # # # Hide IO Cost Using Threadediter <nl> - <nl> + <nl> One way to hide IO cost is to prefetch the data for next batch on a stand - alone thread , while the main thread conducting feed - forward and backward . In order to support more complicated training schemas , MXNet provide a more general IO processing pipeline using threadediter provided by dmlc - core . <nl> - <nl> + <nl> The key of threadediter is to start a stand - alone thread acts like a data provider , while the main thread acts like data consumer as illustrated below . <nl> - <nl> + <nl> Threadediter will maintain a buffer of a certain size and automatically fill the buffer if it ' s not full . And after the consumer finish consuming part of the data in the buffer , threadediter will reuse the space to save the next part of data . <nl> ! [ threadediter ] ( https : / / raw . githubusercontent . com / dmlc / web - data / master / mxnet / io / threadediter . png ) <nl> <nl> # # MXNet IO Python Interface <nl> We make the IO object as an iterator in numpy . By achieving that , user can easily access to the data using a for - loop or calling next ( ) function . Defining a data iterator is very similar to define a symbolic operator in MXNet . <nl> - <nl> + <nl> The following code gives an example of creating a Cifar data iterator . <nl> - <nl> + <nl> ` ` ` python <nl> dataiter = mx . io . ImageRecordIter ( <nl> # Dataset Parameter , indicating the data file , please check the data is already there <nl> dataiter = mx . io . ImageRecordIter ( <nl> ` ` ` <nl> <nl> Generally to create a data iterator , you need to provide five kinds of parameters : <nl> - <nl> + <nl> * * * Dataset Param * * gives the basic information for the dataset , e . g . file path , input shape . <nl> * * * Batch Param * * gives the information to form a batch , e . g . batch size . <nl> * * * Augmentation Param * * tells which augmentation operations ( e . g . crop , mirror ) should be taken on an input image . <nl> * * * Backend Param * * controls the behavior of the backend threads to hide data loading cost . <nl> * * * Auxiliary Param * * provides options to help checking and debugging . <nl> - <nl> + <nl> Usually , * * Dataset Param * * and * * Batch Param * * MUST be given , otherwise data batch can ' t be created . Other parameters can be given according to algorithm and performance need , or just use the default value we set for you . <nl> <nl> Ideally we should separate the MX Data IO into modules , some of which might be useful to expose to users : <nl> Efficient prefetcher : allow the user to write a data loader that reads their customized binary format , and automatically enjoy multi - thread prefetcher support <nl> - Data transformer : image random cropping , mirroring , etc . should be quite useful to allow the users to use those tools , or plug in their own customized transformers ( maybe they want to add some specific kind of coherent random noise to data , etc . ) <nl> + Data transformer : image random cropping , mirroring , etc . should be quite useful to allow the users to use those tools , or plug in their own customized transformers ( maybe they want to add some specific kind of coherent random noise to data , etc . ) <nl> <nl> # # Future Extension <nl> - <nl> + <nl> The data IO for some common applications that we might want to keep in mind : Image Segmentation , Object localization , Speech recognition . More detail will be provided when such applications have been running on MXNet . <nl> <nl> Contribution to this Note <nl> mmmmmmmmmmmmmmmmmmmmmmmm - <nl> - This note is part of our effort to [ open - source system design notes ] ( http : / / mxnet . readthedocs . org / en / latest / # open - source - design - notes ) <nl> + This note is part of our effort to [ open - source system design notes ] ( index . md ) <nl> for deep learning libraries . You are more welcomed to contribute to this Note , by submitting a pull request . <nl> mmm a / docs / system / note_engine . md <nl> ppp b / docs / system / note_engine . md <nl> As a light touch on how the engine internals works with the tags , we could consi <nl> C = A + 2 <nl> A = C * 2 <nl> D = A + 3 <nl> - <nl> + <nl> The first line reads variable ` A ` and mutates variable ` B ` . The second line reads variable ` A ` and mutates variable ` C ` . And so on . <nl> <nl> The engine is going to maintain a queue for each variable , as the following animation shows for each of the four lines . Green blocks represents a read action , while a red one represents a mutation . <nl> But it also makes things like random number generation easier as the operation i <nl> <nl> Contribution to this Note <nl> mmmmmmmmmmmmmmmmmmmmmmmm - <nl> - This note is part of our effort to [ open - source system design notes ] ( http : / / mxnet . readthedocs . org / en / latest / # open - source - design - notes ) <nl> + This note is part of our effort to [ open - source system design notes ] ( index . md ) <nl> for deep learning libraries . You are more welcomed to contribute to this Note , by submitting a pull request . <nl> <nl> # # # Source Code of the Generic Dependency Engine <nl> mmm a / docs / system / note_memory . md <nl> ppp b / docs / system / note_memory . md <nl> The following figure gives two examples of computation graph . <nl> The idea of computation graph is deeply rooted in the packages such as Theano , CGT . Actually they also exists implicitly <nl> in most libraries as the network configuration . The major difference in these library comes to how do they calculate gradient . <nl> There are mainly two ways , doing back - propagation on the same graph , or have an explicit backward path that calculates <nl> - the gradient needed . <nl> + the gradient needed . <nl> <nl> ! [ Backward Graph ] ( https : / / raw . githubusercontent . com / dmlc / web - data / master / mxnet / memory / back_graph . png ) <nl> <nl> However , we should emphasize that choosing the explicit backward path way for ex <nl> to scope of symbolic libraries such as Theano , CGT . We can also use the explicit backward path for gradient calculation of <nl> layer - based ( which ties forward , backward together ) libraries . The following graph shows how this can be done . <nl> Basically , we can introduce a backward node that links to the forward node of the graph , and calls the ` ` ` layer . backward ` ` ` <nl> - in the backward operations . <nl> + in the backward operations . <nl> <nl> ! [ Backward Layer ] ( https : / / raw . githubusercontent . com / dmlc / web - data / master / mxnet / memory / explicit_back_layer . png ) <nl> <nl> So this discussion applies to almost all deep learning libraries that exists <nl> Why explicit backward path is better ? Let us explain it with two examples . The first reason is that the explicit backward path <nl> clearly describes the dependency between the computation . Consider the following case , where we want to get <nl> the gradient of A and B . As we can see clearly from the graph , that computation of ` ` ` d ( C ) ` ` ` gradient do not depend on F . <nl> - This means we can free the memory of ` ` ` F ` ` ` right after the the forward computation is done , similarly the memory <nl> + This means we can free the memory of ` ` ` F ` ` ` right after the the forward computation is done , similarly the memory <nl> of ` ` ` C ` ` ` can be recycled . <nl> <nl> ! [ Backward Prune ] ( https : / / raw . githubusercontent . com / dmlc / web - data / master / mxnet / memory / back_dep_prune . png ) <nl> what optimization we can do , and what is the baseline . <nl> Asumme we want to build a neural net with ` ` ` n ` ` ` layers . A typical implementation of neural net will <nl> need to allocate node space for output of each layer , as well as gradient values for back - propagation . <nl> This means we need roughly ` ` ` 2 n ` ` ` memory cells . This is the same in the explicit backward graph case , as <nl> - the number of nodes in backward pass in roughly the same as forward pass . <nl> + the number of nodes in backward pass in roughly the same as forward pass . <nl> <nl> # # # Inplace Operations <nl> One of the very first thing that we can do is inplace memory sharing of operations . This is usually done for <nl> So an algorithm that simply do inplace optimization for every sigmoid operation <nl> and we need to be careful on when we can do it . <nl> <nl> # # # Normal Memory Sharing <nl> - Memories can also be shared besides the inplace operation . Consider the following case , because the <nl> + Memories can also be shared besides the inplace operation . Consider the following case , because the <nl> value of B is no longer needed when we compute E , we can reuse the memory to hold the result of E . <nl> <nl> ! [ Normal Sharing ] ( https : / / raw . githubusercontent . com / dmlc / web - data / master / mxnet / memory / alloc_normal . png ) <nl> In the multilayer perception case , the ` ` ` life time ` ` ` of ` ` ` fc1 ` ` ` ends after ` <nl> The principle is * * * to only allow memory sharing between the variables whose lifetime do not overlap * * * . There are multiple <nl> ways to solve this problem . One possible way is to construct the conflicting graph of with each variable as node and link edge <nl> between variables with overlapping lifespan , and run a graph - coloring algorithm . This will likely require ` ` ` $ O ( n ^ 2 ) $ ` ` ` <nl> - complexity where ` ` ` n ` ` ` is number of nodes in the graph , which could be an reasonable price to pay . <nl> + complexity where ` ` ` n ` ` ` is number of nodes in the graph , which could be an reasonable price to pay . <nl> <nl> We will introduce another simple heuristic here . The idea is to simulate the procedure of traversing the graph , <nl> and keep a counter of future operations that depends on the node . <nl> and allocate the maximum of the shared parts in the final memory plan . <nl> <nl> If you think carefully , you will find the above strategy exactly simulates the dynamic memory allocation procedure in imperative <nl> languages such as python . The counter is the reference counter of each memory object , and the object get garbage collected when <nl> - the reference counter goes to zero . In that sense , we are simulating the dynamic memory allocation once to create a static allocation plan . <nl> + the reference counter goes to zero . In that sense , we are simulating the dynamic memory allocation once to create a static allocation plan . <nl> Now the question is , can we simply use an imperative language that dynamically allocates and de - allocates memories ? <nl> <nl> The major difference is that the static allocation is only done once , so we can afford to use more complicated algorithms <nl> the article , this is simply because more memory re - use if we only run the forwar <nl> <nl> Contribution to this Note <nl> mmmmmmmmmmmmmmmmmmmmmmmm - <nl> - This note is part of our effort to [ open - source system design notes ] ( http : / / mxnet . readthedocs . org / en / latest / # open - source - design - notes ) <nl> + This note is part of our effort to [ open - source system design notes ] ( index . md ) <nl> for deep learning libraries . You are more welcomed to contribute to this Note , by submitting a pull request . <nl> - <nl> mmm a / docs / system / program_model . md <nl> ppp b / docs / system / program_model . md <nl> more interesting and intelligent deep learning libraries . <nl> <nl> Contribution to this Note <nl> mmmmmmmmmmmmmmmmmmmmmmmm - <nl> - This note is part of our effort to [ open - source system design notes ] ( http : / / mxnet . readthedocs . org / en / latest / # open - source - design - notes ) <nl> + This note is part of our effort to [ open - source system design notes ] ( index . md ) <nl> for deep learning libraries . You are more welcomed to contribute to this Note , by submitting a pull request . <nl> deleted file mode 100644 <nl> index 248bfaeb23c . . 00000000000 <nl> mmm a / docs / system / symbol . md <nl> ppp / dev / null <nl> <nl> - Symbol Interface <nl> - = = = = = = = = = = = = = = = = <nl> - <nl> - Symbol <nl> mmmmmm - <nl> - <nl> - Node <nl> mmm - - <nl> - <nl> - DataEntry <nl> mmmmmmmmm - <nl> - <nl> - Atomic Symbol <nl> mmmmmmmmmmmm - - <nl> - <nl> - Symbol Composition <nl> mmmmmmmmmmmmmmmmmm - <nl> - <nl> - Static Graph <nl> mmmmmmmmmmmm - <nl> - <nl> - Autodiff <nl> mmmmmmmmm <nl> mmm a / docs / tutorials / imagenet_full . md <nl> ppp b / docs / tutorials / imagenet_full . md <nl> There is no doubt that directly use probability over 21k classes loss diversity <nl> [ 2 ] HDD / SSD data is from public website may not be accurate . <nl> <nl> [ 3 ] Ioffe , Sergey , and Christian Szegedy . " Batch normalization : Accelerating deep network training by reducing internal covariate shift . " * arXiv preprint arXiv : 1502 . 03167 * ( 2015 ) . <nl> - <nl> - <nl> - <nl> - <nl> - <nl> mmm a / docs / tutorials / index . md <nl> ppp b / docs / tutorials / index . md <nl> <nl> + # MXNet Tutorials <nl> <nl> - # # # [ Train on imagenet - full ] ( . / imagenet_full . html ) <nl> + This page contains tutorials on using MXNet <nl> + <nl> + # # Contents <nl> + - [ Training Deep Net on 14 Million Images by Using A Single Machine ] ( imagenet_full . md ) <nl> + - [ MXNet GTC 15 Tutorials ] ( https : / / github . com / dmlc / mxnet - gtc - tutorial ) <nl> + <nl> + # # Other Resources <nl> + - [ MXNet Code Examples ] ( https : / / github . com / dmlc / mxnet / tree / master / example ) contains a lot of code examples <nl> new file mode 100644 <nl> index 00000000000 . . e4fde087b17 <nl> mmm / dev / null <nl> ppp b / example / image - classification / train_mnist . R <nl> <nl> + require ( argparse ) <nl> + require ( mxnet ) <nl> + <nl> + download_ < - function ( data_dir ) { <nl> + dir . create ( data_dir , showWarnings = FALSE ) <nl> + setwd ( data_dir ) <nl> + if ( ( ! file . exists ( ' train - images - idx3 - ubyte ' ) ) | | <nl> + ( ! file . exists ( ' train - labels - idx1 - ubyte ' ) ) | | <nl> + ( ! file . exists ( ' t10k - images - idx3 - ubyte ' ) ) | | <nl> + ( ! file . exists ( ' t10k - labels - idx1 - ubyte ' ) ) ) { <nl> + download . file ( url = ' http : / / webdocs . cs . ualberta . ca / ~ bx3 / data / mnist . zip ' , <nl> + destfile = ' mnist . zip ' , method = ' wget ' ) <nl> + unzip ( " mnist . zip " ) <nl> + file . remove ( " mnist . zip " ) <nl> + } <nl> + setwd ( " . . " ) <nl> + } <nl> + <nl> + # multi - layer perceptron <nl> + get_mlp < - function ( ) { <nl> + data < - mx . symbol . Variable ( ' data ' ) <nl> + fc1 < - mx . symbol . FullyConnected ( data = data , name = ' fc1 ' , num_hidden = 128 ) <nl> + act1 < - mx . symbol . Activation ( data = fc1 , name = ' relu1 ' , act_type = " relu " ) <nl> + fc2 < - mx . symbol . FullyConnected ( data = act1 , name = ' fc2 ' , num_hidden = 64 ) <nl> + act2 < - mx . symbol . Activation ( data = fc2 , name = ' relu2 ' , act_type = " relu " ) <nl> + fc3 < - mx . symbol . FullyConnected ( data = act2 , name = ' fc3 ' , num_hidden = 10 ) <nl> + mlp < - mx . symbol . SoftmaxOutput ( data = fc3 , name = ' softmax ' ) <nl> + mlp <nl> + } <nl> + <nl> + # LeCun , Yann , Leon Bottou , Yoshua Bengio , and Patrick <nl> + # Haffner . " Gradient - based learning applied to document recognition . " <nl> + # Proceedings of the IEEE ( 1998 ) <nl> + get_lenet < - function ( ) { <nl> + data < - mx . symbol . Variable ( ' data ' ) <nl> + # first conv <nl> + conv1 < - mx . symbol . Convolution ( data = data , kernel = c ( 5 , 5 ) , num_filter = 20 ) <nl> + tanh1 < - mx . symbol . Activation ( data = conv1 , act_type = " tanh " ) <nl> + pool1 < - mx . symbol . Pooling ( data = tanh1 , pool_type = " max " , <nl> + kernel = c ( 2 , 2 ) , stride = c ( 2 , 2 ) ) <nl> + # second conv <nl> + conv2 < - mx . symbol . Convolution ( data = pool1 , kernel = c ( 5 , 5 ) , num_filter = 50 ) <nl> + tanh2 < - mx . symbol . Activation ( data = conv2 , act_type = " tanh " ) <nl> + pool2 < - mx . symbol . Pooling ( data = tanh2 , pool_type = " max " , <nl> + kernel = c ( 2 , 2 ) , stride = c ( 2 , 2 ) ) <nl> + # first fullc <nl> + flatten < - mx . symbol . Flatten ( data = pool2 ) <nl> + fc1 < - mx . symbol . FullyConnected ( data = flatten , num_hidden = 500 ) <nl> + tanh3 < - mx . symbol . Activation ( data = fc1 , act_type = " tanh " ) <nl> + # second fullc <nl> + fc2 < - mx . symbol . FullyConnected ( data = tanh3 , num_hidden = 10 ) <nl> + # loss <nl> + lenet < - mx . symbol . SoftmaxOutput ( data = fc2 , name = ' softmax ' ) <nl> + lenet <nl> + } <nl> + <nl> + get_iterator < - function ( data_shape ) { <nl> + get_iterator_impl < - function ( args ) { <nl> + data_dir = args $ data_dir <nl> + if ( ! grepl ( ' : / / ' , args $ data_dir ) ) <nl> + download_ ( args $ data_dir ) <nl> + flat < - TRUE <nl> + if ( length ( data_shape ) = = 3 ) flat < - FALSE <nl> + <nl> + train = mx . io . MNISTIter ( <nl> + image = paste0 ( data_dir , " train - images - idx3 - ubyte " ) , <nl> + label = paste0 ( data_dir , " train - labels - idx1 - ubyte " ) , <nl> + input_shape = data_shape , <nl> + batch_size = args $ batch_size , <nl> + shuffle = TRUE , <nl> + flat = flat ) <nl> + <nl> + val = mx . io . MNISTIter ( <nl> + image = paste0 ( data_dir , " t10k - images - idx3 - ubyte " ) , <nl> + label = paste0 ( data_dir , " t10k - labels - idx1 - ubyte " ) , <nl> + input_shape = data_shape , <nl> + batch_size = args $ batch_size , <nl> + flat = flat ) <nl> + <nl> + ret = list ( train = train , value = val ) <nl> + } <nl> + get_iterator_impl <nl> + } <nl> + <nl> + parse_args < - function ( ) { <nl> + parser < - ArgumentParser ( description = ' train an image classifer on mnist ' ) <nl> + parser $ add_argument ( ' - - network ' , type = ' character ' , default = ' mlp ' , <nl> + choices = c ( ' mlp ' , ' lenet ' ) , <nl> + help = ' the cnn to use ' ) <nl> + parser $ add_argument ( ' - - data - dir ' , type = ' character ' , default = ' mnist / ' , <nl> + help = ' the input data directory ' ) <nl> + parser $ add_argument ( ' - - gpus ' , type = ' character ' , <nl> + help = ' the gpus will be used , e . g " 0 , 1 , 2 , 3 " ' ) <nl> + parser $ add_argument ( ' - - batch - size ' , type = ' integer ' , default = 128 , <nl> + help = ' the batch size ' ) <nl> + parser $ add_argument ( ' - - lr ' , type = ' double ' , default = . 1 , <nl> + help = ' the initial learning rate ' ) <nl> + parser $ add_argument ( ' - - model - prefix ' , type = ' character ' , <nl> + help = ' the prefix of the model to load / save ' ) <nl> + parser $ add_argument ( ' - - num - round ' , type = ' integer ' , default = 10 , <nl> + help = ' the number of iterations over training data to train the model ' ) <nl> + parser $ add_argument ( ' - - kv - store ' , type = ' character ' , default = ' local ' , <nl> + help = ' the kvstore type ' ) <nl> + <nl> + parser $ parse_args ( ) <nl> + } <nl> + <nl> + args = parse_args ( ) <nl> + if ( args $ network = = ' mlp ' ) { <nl> + data_shape < - c ( 784 ) <nl> + net < - get_mlp ( ) <nl> + } else { <nl> + data_shape < - c ( 28 , 28 , 1 ) <nl> + net < - get_lenet ( ) <nl> + } <nl> + # train <nl> + source ( " train_model . R " ) <nl> + train_model . fit ( args , net , get_iterator ( data_shape ) ) <nl> new file mode 100644 <nl> index 00000000000 . . 7a2623af7b8 <nl> mmm / dev / null <nl> ppp b / example / image - classification / train_model . R <nl> <nl> + require ( mxnet ) <nl> + <nl> + train_model . fit < - function ( args , network , data_loader ) { <nl> + model_prefix < - args $ model_prefix <nl> + <nl> + # save model <nl> + if ( is . null ( model_prefix ) ) { <nl> + checkpoint < - NULL <nl> + } else { <nl> + checkpoint < - mx . callback . save . checkpoint ( model_prefix ) <nl> + } <nl> + <nl> + # data <nl> + data < - data_loader ( args ) <nl> + train < - data $ train <nl> + val < - data $ value <nl> + <nl> + <nl> + # train <nl> + if ( is . null ( args $ gpus ) ) { <nl> + devs < - mx . cpu ( ) <nl> + } else { <nl> + devs < - lapply ( unlist ( strsplit ( args $ gpus , " , " ) ) , function ( i ) { <nl> + mx . gpu ( as . integer ( i ) ) <nl> + } ) <nl> + } <nl> + <nl> + model = mx . model . FeedForward . create ( <nl> + X = train , <nl> + eval . data = val , <nl> + ctx = devs , <nl> + symbol = network , <nl> + eval . metric = mx . metric . accuracy , <nl> + num . round = args $ num_round , <nl> + learning . rate = args $ lr , <nl> + momentum = 0 . 9 , <nl> + wd = 0 . 00001 , <nl> + kvstore = args $ kv_store , <nl> + array . batch . size = args $ batch_size , <nl> + epoch . end . callback = checkpoint , <nl> + batch . end . callback = mx . callback . log . train . metric ( 50 ) ) <nl> + <nl> + } <nl> new file mode 100644 <nl> index 00000000000 . . af52495af6a <nl> mmm / dev / null <nl> ppp b / example / model - parallel - lstm / README . md <nl> <nl> + Model Paralell LSTM <nl> + = = = = = = = = = = = = = = = = = = = <nl> + This is an example showing how to do model parallel LSTM in MXNet . <nl> + Most of the code is duplicated with the rnn example , and should be eventually merged . <nl> new file mode 100755 <nl> index 00000000000 . . 1ec009aa2f9 <nl> mmm / dev / null <nl> ppp b / example / model - parallel - lstm / get_ptb_data . sh <nl> <nl> + # ! / usr / bin / env bash <nl> + <nl> + RNN_DIR = $ ( cd ` dirname $ 0 ` ; pwd ) <nl> + DATA_DIR = " $ { RNN_DIR } / data / " <nl> + <nl> + if [ [ ! - d " $ { DATA_DIR } " ] ] ; then <nl> + echo " $ { DATA_DIR } doesn ' t exist , will create one " ; <nl> + mkdir - p $ { DATA_DIR } <nl> + fi <nl> + <nl> + wget - P $ { DATA_DIR } https : / / raw . githubusercontent . com / dmlc / web - data / master / mxnet / ptb / ptb . train . txt ; <nl> + wget - P $ { DATA_DIR } https : / / raw . githubusercontent . com / dmlc / web - data / master / mxnet / ptb / ptb . valid . txt ; <nl> + wget - P $ { DATA_DIR } https : / / raw . githubusercontent . com / dmlc / web - data / master / mxnet / ptb / ptb . test . txt ; <nl> + wget - P $ { DATA_DIR } https : / / raw . githubusercontent . com / dmlc / web - data / master / mxnet / tinyshakespeare / input . txt ; <nl> new file mode 100644 <nl> index 00000000000 . . e41f7007005 <nl> mmm / dev / null <nl> ppp b / example / model - parallel - lstm / lstm . py <nl> <nl> + # pylint : skip - file <nl> + import sys <nl> + sys . path . insert ( 0 , " . . / . . / python " ) <nl> + import mxnet as mx <nl> + import numpy as np <nl> + from collections import namedtuple <nl> + import time <nl> + import math <nl> + LSTMState = namedtuple ( " LSTMState " , [ " c " , " h " ] ) <nl> + LSTMParam = namedtuple ( " LSTMParam " , [ " i2h_weight " , " i2h_bias " , <nl> + " h2h_weight " , " h2h_bias " ] ) <nl> + LSTMModel = namedtuple ( " LSTMModel " , [ " rnn_exec " , " symbol " , <nl> + " init_states " , " last_states " , <nl> + " seq_data " , " seq_labels " , " seq_outputs " , <nl> + " param_blocks " ] ) <nl> + <nl> + def lstm ( num_hidden , indata , prev_state , param , seqidx , layeridx , dropout = 0 . ) : <nl> + " " " LSTM Cell symbol " " " <nl> + if dropout > 0 . : <nl> + indata = mx . sym . Dropout ( data = indata , p = dropout ) <nl> + i2h = mx . sym . FullyConnected ( data = indata , <nl> + weight = param . i2h_weight , <nl> + bias = param . i2h_bias , <nl> + num_hidden = num_hidden * 4 , <nl> + name = " t % d_l % d_i2h " % ( seqidx , layeridx ) ) <nl> + h2h = mx . sym . FullyConnected ( data = prev_state . h , <nl> + weight = param . h2h_weight , <nl> + bias = param . h2h_bias , <nl> + num_hidden = num_hidden * 4 , <nl> + name = " t % d_l % d_h2h " % ( seqidx , layeridx ) ) <nl> + gates = i2h + h2h <nl> + slice_gates = mx . sym . SliceChannel ( gates , num_outputs = 4 , <nl> + name = " t % d_l % d_slice " % ( seqidx , layeridx ) ) <nl> + in_gate = mx . sym . Activation ( slice_gates [ 0 ] , act_type = " sigmoid " ) <nl> + in_transform = mx . sym . Activation ( slice_gates [ 1 ] , act_type = " tanh " ) <nl> + forget_gate = mx . sym . Activation ( slice_gates [ 2 ] , act_type = " sigmoid " ) <nl> + out_gate = mx . sym . Activation ( slice_gates [ 3 ] , act_type = " sigmoid " ) <nl> + next_c = ( forget_gate * prev_state . c ) + ( in_gate * in_transform ) <nl> + next_h = out_gate * mx . sym . Activation ( next_c , act_type = " tanh " ) <nl> + return LSTMState ( c = next_c , h = next_h ) <nl> + <nl> + <nl> + def lstm_unroll ( num_lstm_layer , seq_len , input_size , <nl> + num_hidden , num_embed , num_label , dropout = 0 . , <nl> + concat_decode = True ) : <nl> + " " " unrolled lstm network " " " <nl> + # initialize the parameter symbols <nl> + with mx . AttrScope ( ctx_group = ' embed ' ) : <nl> + embed_weight = mx . sym . Variable ( " embed_weight " ) <nl> + <nl> + with mx . AttrScope ( ctx_group = ' decode ' ) : <nl> + cls_weight = mx . sym . Variable ( " cls_weight " ) <nl> + cls_bias = mx . sym . Variable ( " cls_bias " ) <nl> + <nl> + param_cells = [ ] <nl> + last_states = [ ] <nl> + for i in range ( num_lstm_layer ) : <nl> + with mx . AttrScope ( ctx_group = ' layer % d ' % i ) : <nl> + param_cells . append ( LSTMParam ( i2h_weight = mx . sym . Variable ( " l % d_i2h_weight " % i ) , <nl> + i2h_bias = mx . sym . Variable ( " l % d_i2h_bias " % i ) , <nl> + h2h_weight = mx . sym . Variable ( " l % d_h2h_weight " % i ) , <nl> + h2h_bias = mx . sym . Variable ( " l % d_h2h_bias " % i ) ) ) <nl> + state = LSTMState ( c = mx . sym . Variable ( " l % d_init_c " % i ) , <nl> + h = mx . sym . Variable ( " l % d_init_h " % i ) ) <nl> + last_states . append ( state ) <nl> + assert ( len ( last_states ) = = num_lstm_layer ) <nl> + <nl> + last_hidden = [ ] <nl> + for seqidx in range ( seq_len ) : <nl> + # embeding layer <nl> + with mx . AttrScope ( ctx_group = ' embed ' ) : <nl> + data = mx . sym . Variable ( " t % d_data " % seqidx ) <nl> + hidden = mx . sym . Embedding ( data = data , weight = embed_weight , <nl> + input_dim = input_size , <nl> + output_dim = num_embed , <nl> + name = " t % d_embed " % seqidx ) <nl> + # stack LSTM <nl> + for i in range ( num_lstm_layer ) : <nl> + if i = = 0 : <nl> + dp = 0 . <nl> + else : <nl> + dp = dropout <nl> + with mx . AttrScope ( ctx_group = ' layer % d ' % i ) : <nl> + next_state = lstm ( num_hidden , indata = hidden , <nl> + prev_state = last_states [ i ] , <nl> + param = param_cells [ i ] , <nl> + seqidx = seqidx , layeridx = i , dropout = dp ) <nl> + hidden = next_state . h <nl> + last_states [ i ] = next_state <nl> + <nl> + # decoder <nl> + if dropout > 0 . : <nl> + hidden = mx . sym . Dropout ( data = hidden , p = dropout ) <nl> + last_hidden . append ( hidden ) <nl> + <nl> + out_prob = [ ] <nl> + if not concat_decode : <nl> + for seqidx in range ( seq_len ) : <nl> + with mx . AttrScope ( ctx_group = ' decode ' ) : <nl> + fc = mx . sym . FullyConnected ( data = last_hidden [ seqidx ] , <nl> + weight = cls_weight , <nl> + bias = cls_bias , <nl> + num_hidden = num_label , <nl> + name = " t % d_cls " % seqidx ) <nl> + label = mx . sym . Variable ( " t % d_label " % seqidx ) <nl> + sm = mx . sym . SoftmaxOutput ( data = fc , label = label , name = " t % d_sm " % seqidx ) <nl> + out_prob . append ( sm ) <nl> + else : <nl> + with mx . AttrScope ( ctx_group = ' decode ' ) : <nl> + concat = mx . sym . Concat ( * last_hidden , dim = 0 ) <nl> + fc = mx . sym . FullyConnected ( data = concat , <nl> + weight = cls_weight , <nl> + bias = cls_bias , <nl> + num_hidden = num_label ) <nl> + label = mx . sym . Variable ( " label " ) <nl> + sm = mx . sym . SoftmaxOutput ( data = fc , label = label , name = " sm " ) <nl> + out_prob = [ sm ] <nl> + <nl> + for i in range ( num_lstm_layer ) : <nl> + state = last_states [ i ] <nl> + state = LSTMState ( c = mx . sym . BlockGrad ( state . c , name = " l % d_last_c " % i ) , <nl> + h = mx . sym . BlockGrad ( state . h , name = " l % d_last_h " % i ) ) <nl> + last_states [ i ] = state <nl> + <nl> + unpack_c = [ state . c for state in last_states ] <nl> + unpack_h = [ state . h for state in last_states ] <nl> + list_all = out_prob + unpack_c + unpack_h <nl> + return mx . sym . Group ( list_all ) <nl> + <nl> + <nl> + def is_param_name ( name ) : <nl> + return name . endswith ( " weight " ) or name . endswith ( " bias " ) or \ <nl> + name . endswith ( " gamma " ) or name . endswith ( " beta " ) <nl> + <nl> + <nl> + def setup_rnn_model ( default_ctx , <nl> + num_lstm_layer , seq_len , <nl> + num_hidden , num_embed , num_label , <nl> + batch_size , input_size , <nl> + initializer , dropout = 0 . , <nl> + group2ctx = None , concat_decode = True ) : <nl> + " " " set up rnn model with lstm cells " " " <nl> + rnn_sym = lstm_unroll ( num_lstm_layer = num_lstm_layer , <nl> + num_hidden = num_hidden , <nl> + seq_len = seq_len , <nl> + input_size = input_size , <nl> + num_embed = num_embed , <nl> + num_label = num_label , <nl> + dropout = dropout , <nl> + concat_decode = concat_decode ) <nl> + arg_names = rnn_sym . list_arguments ( ) <nl> + internals = rnn_sym . get_internals ( ) <nl> + <nl> + input_shapes = { } <nl> + for name in arg_names : <nl> + if name . endswith ( " init_c " ) or name . endswith ( " init_h " ) : <nl> + input_shapes [ name ] = ( batch_size , num_hidden ) <nl> + elif name . endswith ( " data " ) : <nl> + input_shapes [ name ] = ( batch_size , ) <nl> + else : <nl> + pass <nl> + <nl> + arg_shape , out_shape , aux_shape = rnn_sym . infer_shape ( * * input_shapes ) <nl> + # bind arrays <nl> + arg_arrays = [ ] <nl> + args_grad = { } <nl> + for shape , name in zip ( arg_shape , arg_names ) : <nl> + group = internals [ name ] . attr ( " ctx_group " ) <nl> + ctx = group2ctx [ group ] if group is not None else default_ctx <nl> + arg_arrays . append ( mx . nd . zeros ( shape , ctx ) ) <nl> + if is_param_name ( name ) : <nl> + args_grad [ name ] = mx . nd . zeros ( shape , ctx ) <nl> + if not name . startswith ( " t " ) : <nl> + print ( " % s group = % s , ctx = % s " % ( name , group , str ( ctx ) ) ) <nl> + <nl> + rnn_exec = rnn_sym . bind ( default_ctx , args = arg_arrays , <nl> + args_grad = args_grad , <nl> + grad_req = " add " , group2ctx = group2ctx ) <nl> + param_blocks = [ ] <nl> + arg_dict = dict ( zip ( arg_names , rnn_exec . arg_arrays ) ) <nl> + for i , name in enumerate ( arg_names ) : <nl> + if is_param_name ( name ) : <nl> + initializer ( name , arg_dict [ name ] ) <nl> + <nl> + param_blocks . append ( ( i , arg_dict [ name ] , args_grad [ name ] , name ) ) <nl> + else : <nl> + assert name not in args_grad <nl> + <nl> + out_dict = dict ( zip ( rnn_sym . list_outputs ( ) , rnn_exec . outputs ) ) <nl> + <nl> + init_states = [ LSTMState ( c = arg_dict [ " l % d_init_c " % i ] , <nl> + h = arg_dict [ " l % d_init_h " % i ] ) for i in range ( num_lstm_layer ) ] <nl> + <nl> + seq_data = [ rnn_exec . arg_dict [ " t % d_data " % i ] for i in range ( seq_len ) ] <nl> + last_states = [ LSTMState ( c = out_dict [ " l % d_last_c_output " % i ] , <nl> + h = out_dict [ " l % d_last_h_output " % i ] ) for i in range ( num_lstm_layer ) ] <nl> + <nl> + if concat_decode : <nl> + seq_outputs = [ out_dict [ " sm_output " ] ] <nl> + seq_labels = [ rnn_exec . arg_dict [ " label " ] ] <nl> + else : <nl> + seq_outputs = [ out_dict [ " t % d_sm_output " % i ] for i in range ( seq_len ) ] <nl> + seq_labels = [ rnn_exec . arg_dict [ " t % d_label " % i ] for i in range ( seq_len ) ] <nl> + <nl> + return LSTMModel ( rnn_exec = rnn_exec , symbol = rnn_sym , <nl> + init_states = init_states , last_states = last_states , <nl> + seq_data = seq_data , seq_labels = seq_labels , seq_outputs = seq_outputs , <nl> + param_blocks = param_blocks ) <nl> + <nl> + <nl> + <nl> + def set_rnn_inputs ( m , X , begin ) : <nl> + seq_len = len ( m . seq_data ) <nl> + batch_size = m . seq_data [ 0 ] . shape [ 0 ] <nl> + for seqidx in range ( seq_len ) : <nl> + idx = ( begin + seqidx ) % X . shape [ 0 ] <nl> + next_idx = ( begin + seqidx + 1 ) % X . shape [ 0 ] <nl> + x = X [ idx , : ] <nl> + y = X [ next_idx , : ] <nl> + mx . nd . array ( x ) . copyto ( m . seq_data [ seqidx ] ) <nl> + if len ( m . seq_labels ) = = 1 : <nl> + m . seq_labels [ 0 ] [ seqidx * batch_size : seqidx * batch_size + batch_size ] = y <nl> + else : <nl> + m . seq_labels [ seqidx ] [ : ] = y <nl> + <nl> + <nl> + def calc_nll_concat ( seq_label_probs , X , begin ) : <nl> + return - np . sum ( np . log ( seq_label_probs . asnumpy ( ) ) ) / len ( X [ 0 , : ] ) <nl> + <nl> + def calc_nll ( seq_label_probs , X , begin ) : <nl> + eps = 1e - 10 <nl> + nll = 0 . <nl> + for seqidx in range ( len ( seq_label_probs ) ) : <nl> + next_idx = ( begin + seqidx + 1 ) % X . shape [ 0 ] <nl> + y = X [ next_idx , : ] <nl> + py = seq_label_probs [ seqidx ] . asnumpy ( ) <nl> + nll + = - np . sum ( np . log ( np . maximum ( py , eps ) ) ) / len ( y ) <nl> + return nll <nl> + <nl> + def train_lstm ( model , X_train_batch , X_val_batch , <nl> + num_round , update_period , concat_decode , <nl> + optimizer = ' sgd ' , half_life = 2 , max_grad_norm = 5 . 0 , * * kwargs ) : <nl> + print ( " Training with train . shape = % s " % str ( X_train_batch . shape ) ) <nl> + print ( " Training with val . shape = % s " % str ( X_val_batch . shape ) ) <nl> + m = model <nl> + seq_len = len ( m . seq_data ) <nl> + batch_size = m . seq_data [ 0 ] . shape [ 0 ] <nl> + print ( " batch_size = % d " % batch_size ) <nl> + print ( " seq_len = % d " % seq_len ) <nl> + <nl> + opt = mx . optimizer . create ( optimizer , <nl> + * * kwargs ) <nl> + <nl> + updater = mx . optimizer . get_updater ( opt ) <nl> + epoch_counter = 0 <nl> + log_period = max ( 1000 / seq_len , 1 ) <nl> + last_perp = 10000000 . 0 <nl> + for iteration in range ( num_round ) : <nl> + nbatch = 0 <nl> + train_nll = 0 <nl> + # reset states <nl> + for state in m . init_states : <nl> + state . c [ : ] = 0 . 0 <nl> + state . h [ : ] = 0 . 0 <nl> + tic = time . time ( ) <nl> + assert X_train_batch . shape [ 0 ] % seq_len = = 0 <nl> + assert X_val_batch . shape [ 0 ] % seq_len = = 0 <nl> + for begin in range ( 0 , X_train_batch . shape [ 0 ] , seq_len ) : <nl> + set_rnn_inputs ( m , X_train_batch , begin = begin ) <nl> + m . rnn_exec . forward ( is_train = True ) <nl> + # probability of each label class , used to evaluate nll <nl> + # Change back to individual ops to see if fine grained scheduling helps . <nl> + if concat_decode : <nl> + seq_label_probs = mx . nd . choose_element_0index ( m . seq_outputs [ 0 ] , m . seq_labels [ 0 ] ) <nl> + else : <nl> + seq_label_probs = [ mx . nd . choose_element_0index ( out , label ) . copyto ( mx . cpu ( ) ) <nl> + for out , label in zip ( m . seq_outputs , m . seq_labels ) ] <nl> + m . rnn_exec . backward ( ) <nl> + # transfer the states <nl> + for init , last in zip ( m . init_states , m . last_states ) : <nl> + last . c . copyto ( init . c ) <nl> + last . h . copyto ( init . h ) <nl> + # update epoch counter <nl> + epoch_counter + = 1 <nl> + if epoch_counter % update_period = = 0 : <nl> + # updare parameters <nl> + norm = 0 . <nl> + for idx , weight , grad , name in m . param_blocks : <nl> + grad / = batch_size <nl> + l2_norm = mx . nd . norm ( grad ) . asscalar ( ) <nl> + norm + = l2_norm * l2_norm <nl> + norm = math . sqrt ( norm ) <nl> + for idx , weight , grad , name in m . param_blocks : <nl> + if norm > max_grad_norm : <nl> + grad * = ( max_grad_norm / norm ) <nl> + updater ( idx , grad , weight ) <nl> + # reset gradient to zero <nl> + grad [ : ] = 0 . 0 <nl> + if concat_decode : <nl> + train_nll + = calc_nll_concat ( seq_label_probs , X_val_batch , begin = begin ) <nl> + else : <nl> + train_nll + = calc_nll ( seq_label_probs , X_val_batch , begin = begin ) <nl> + <nl> + nbatch = begin + seq_len <nl> + toc = time . time ( ) <nl> + if epoch_counter % log_period = = 0 : <nl> + print ( " Iter [ % d ] Train : Time : % . 3f sec , NLL = % . 3f , Perp = % . 3f " % ( <nl> + epoch_counter , toc - tic , train_nll / nbatch , np . exp ( train_nll / nbatch ) ) ) <nl> + # end of training loop <nl> + toc = time . time ( ) <nl> + print ( " Iter [ % d ] Train : Time : % . 3f sec , NLL = % . 3f , Perp = % . 3f " % ( <nl> + iteration , toc - tic , train_nll / nbatch , np . exp ( train_nll / nbatch ) ) ) <nl> + <nl> + val_nll = 0 . 0 <nl> + # validation set , reset states <nl> + for state in m . init_states : <nl> + state . c [ : ] = 0 . 0 <nl> + state . h [ : ] = 0 . 0 <nl> + for begin in range ( 0 , X_val_batch . shape [ 0 ] , seq_len ) : <nl> + set_rnn_inputs ( m , X_val_batch , begin = begin ) <nl> + m . rnn_exec . forward ( is_train = False ) <nl> + # probability of each label class , used to evaluate nll <nl> + if concat_decode : <nl> + seq_label_probs = mx . nd . choose_element_0index ( m . seq_outputs [ 0 ] , m . seq_labels [ 0 ] ) <nl> + else : <nl> + seq_label_probs = [ mx . nd . choose_element_0index ( out , label ) . copyto ( mx . cpu ( ) ) <nl> + for out , label in zip ( m . seq_outputs , m . seq_labels ) ] <nl> + # transfer the states <nl> + for init , last in zip ( m . init_states , m . last_states ) : <nl> + last . c . copyto ( init . c ) <nl> + last . h . copyto ( init . h ) <nl> + if concat_decode : <nl> + val_nll + = calc_nll_concat ( seq_label_probs , X_val_batch , begin = begin ) <nl> + else : <nl> + val_nll + = calc_nll ( seq_label_probs , X_val_batch , begin = begin ) <nl> + nbatch = X_val_batch . shape [ 0 ] <nl> + perp = np . exp ( val_nll / nbatch ) <nl> + print ( " Iter [ % d ] Val : NLL = % . 3f , Perp = % . 3f " % ( <nl> + iteration , val_nll / nbatch , np . exp ( val_nll / nbatch ) ) ) <nl> + if last_perp - 1 . 0 < perp : <nl> + opt . lr * = 0 . 5 <nl> + print ( " Reset learning rate to % g " % opt . lr ) <nl> + last_perp = perp <nl> + <nl> + def setup_rnn_sample_model ( ctx , <nl> + params , <nl> + num_lstm_layer , <nl> + num_hidden , num_embed , num_label , <nl> + batch_size , input_size ) : <nl> + seq_len = 1 <nl> + rnn_sym = lstm_unroll ( num_lstm_layer = num_lstm_layer , <nl> + input_size = input_size , <nl> + num_hidden = num_hidden , <nl> + seq_len = seq_len , <nl> + num_embed = num_embed , <nl> + num_label = num_label ) <nl> + arg_names = rnn_sym . list_arguments ( ) <nl> + input_shapes = { } <nl> + for name in arg_names : <nl> + if name . endswith ( " init_c " ) or name . endswith ( " init_h " ) : <nl> + input_shapes [ name ] = ( batch_size , num_hidden ) <nl> + elif name . endswith ( " data " ) : <nl> + input_shapes [ name ] = ( batch_size , ) <nl> + else : <nl> + pass <nl> + arg_shape , out_shape , aux_shape = rnn_sym . infer_shape ( * * input_shapes ) <nl> + arg_arrays = [ mx . nd . zeros ( s , ctx ) for s in arg_shape ] <nl> + arg_dict = dict ( zip ( arg_names , arg_arrays ) ) <nl> + for name , arr in params . items ( ) : <nl> + arg_dict [ name ] [ : ] = arr <nl> + rnn_exec = rnn_sym . bind ( ctx = ctx , args = arg_arrays , args_grad = None , grad_req = " null " ) <nl> + out_dict = dict ( zip ( rnn_sym . list_outputs ( ) , rnn_exec . outputs ) ) <nl> + param_blocks = [ ] <nl> + params_array = list ( params . items ( ) ) <nl> + for i in range ( len ( params ) ) : <nl> + param_blocks . append ( ( i , params_array [ i ] [ 1 ] , None , params_array [ i ] [ 0 ] ) ) <nl> + init_states = [ LSTMState ( c = arg_dict [ " l % d_init_c " % i ] , <nl> + h = arg_dict [ " l % d_init_h " % i ] ) for i in range ( num_lstm_layer ) ] <nl> + <nl> + if concat_decode : <nl> + seq_labels = [ rnn_exec . arg_dict [ " label " ] ] <nl> + seq_outputs = [ out_dict [ " sm_output " ] ] <nl> + else : <nl> + seq_labels = [ rnn_exec . arg_dict [ " t % d_label " % i ] for i in range ( seq_len ) ] <nl> + seq_outputs = [ out_dict [ " t % d_sm " % i ] for i in range ( seq_len ) ] <nl> + <nl> + seq_data = [ rnn_exec . arg_dict [ " t % d_data " % i ] for i in range ( seq_len ) ] <nl> + last_states = [ LSTMState ( c = out_dict [ " l % d_last_c_output " % i ] , <nl> + h = out_dict [ " l % d_last_h_output " % i ] ) for i in range ( num_lstm_layer ) ] <nl> + <nl> + return LSTMModel ( rnn_exec = rnn_exec , symbol = rnn_sym , <nl> + init_states = init_states , last_states = last_states , <nl> + seq_data = seq_data , seq_labels = seq_labels , seq_outputs = seq_outputs , <nl> + param_blocks = param_blocks ) <nl> + <nl> + # Python3 np . random . choice is too strict in eval float probability so we use an alternative <nl> + import random <nl> + import bisect <nl> + import collections <nl> + <nl> + def _cdf ( weights ) : <nl> + total = sum ( weights ) <nl> + result = [ ] <nl> + cumsum = 0 <nl> + for w in weights : <nl> + cumsum + = w <nl> + result . append ( cumsum / total ) <nl> + return result <nl> + <nl> + def _choice ( population , weights ) : <nl> + assert len ( population ) = = len ( weights ) <nl> + cdf_vals = _cdf ( weights ) <nl> + x = random . random ( ) <nl> + idx = bisect . bisect ( cdf_vals , x ) <nl> + return population [ idx ] <nl> + <nl> + def sample_lstm ( model , X_input_batch , seq_len , temperature = 1 . , sample = True ) : <nl> + m = model <nl> + vocab = m . seq_outputs . shape [ 1 ] <nl> + batch_size = m . seq_data [ 0 ] . shape [ 0 ] <nl> + outputs_ndarray = mx . nd . zeros ( m . seq_outputs . shape ) <nl> + outputs_batch = [ ] <nl> + tmp = [ i for i in range ( vocab ) ] <nl> + for i in range ( seq_len ) : <nl> + outputs_batch . append ( np . zeros ( X_input_batch . shape ) ) <nl> + for i in range ( seq_len ) : <nl> + set_rnn_inputs ( m , X_input_batch , 0 ) <nl> + m . rnn_exec . forward ( is_train = False ) <nl> + outputs_ndarray [ : ] = m . seq_outputs <nl> + for init , last in zip ( m . init_states , m . last_states ) : <nl> + last . c . copyto ( init . c ) <nl> + last . h . copyto ( init . h ) <nl> + prob = np . clip ( outputs_ndarray . asnumpy ( ) , 1e - 6 , 1 - 1e - 6 ) <nl> + if sample : <nl> + rescale = np . exp ( np . log ( prob ) / temperature ) <nl> + for j in range ( batch_size ) : <nl> + p = rescale [ j , : ] <nl> + p [ : ] / = p . sum ( ) <nl> + outputs_batch [ i ] [ j ] = _choice ( tmp , p ) <nl> + else : <nl> + outputs_batch [ i ] [ : ] = np . argmax ( prob , axis = 1 ) <nl> + X_input_batch [ : ] = outputs_batch [ i ] <nl> + return outputs_batch <nl> new file mode 100644 <nl> index 00000000000 . . 9f09b5bf79e <nl> mmm / dev / null <nl> ppp b / example / model - parallel - lstm / lstm_ptb . py <nl> <nl> + # pylint : skip - file <nl> + import lstm <nl> + import sys <nl> + sys . path . insert ( 0 , " . . / . . / python " ) <nl> + import mxnet as mx <nl> + import numpy as np <nl> + <nl> + " " " <nl> + PennTreeBank Language Model <nl> + We would like to thanks Wojciech Zaremba for his Torch LSTM code <nl> + <nl> + The data file can be found at : <nl> + https : / / github . com / dmlc / web - data / tree / master / mxnet / ptb <nl> + " " " <nl> + <nl> + def load_data ( path , dic = None ) : <nl> + fi = open ( path ) <nl> + content = fi . read ( ) <nl> + content = content . replace ( ' \ n ' , ' < eos > ' ) <nl> + content = content . split ( ' ' ) <nl> + print ( " Loading % s , size of data = % d " % ( path , len ( content ) ) ) <nl> + x = np . zeros ( len ( content ) ) <nl> + if dic = = None : <nl> + dic = { } <nl> + idx = 0 <nl> + for i in range ( len ( content ) ) : <nl> + word = content [ i ] <nl> + if len ( word ) = = 0 : <nl> + continue <nl> + if not word in dic : <nl> + dic [ word ] = idx <nl> + idx + = 1 <nl> + x [ i ] = dic [ word ] <nl> + print ( " Unique token : % d " % len ( dic ) ) <nl> + return x , dic <nl> + <nl> + def drop_tail ( X , seq_len ) : <nl> + shape = X . shape <nl> + nstep = int ( shape [ 0 ] / seq_len ) <nl> + return X [ 0 : ( nstep * seq_len ) , : ] <nl> + <nl> + <nl> + def replicate_data ( x , batch_size ) : <nl> + nbatch = int ( x . shape [ 0 ] / batch_size ) <nl> + x_cut = x [ : nbatch * batch_size ] <nl> + data = x_cut . reshape ( ( nbatch , batch_size ) , order = ' F ' ) <nl> + return data <nl> + <nl> + batch_size = 20 <nl> + seq_len = 35 <nl> + num_hidden = 400 <nl> + num_embed = 200 <nl> + num_lstm_layer = 8 <nl> + num_round = 25 <nl> + learning_rate = 0 . 1 <nl> + wd = 0 . <nl> + momentum = 0 . 0 <nl> + max_grad_norm = 5 . 0 <nl> + update_period = 1 <nl> + <nl> + X_train , dic = load_data ( " . / data / ptb . train . txt " ) <nl> + X_val , _ = load_data ( " . / data / ptb . valid . txt " , dic ) <nl> + X_train_batch = replicate_data ( X_train , batch_size ) <nl> + X_val_batch = replicate_data ( X_val , batch_size ) <nl> + vocab = len ( dic ) <nl> + print ( " Vocab = % d " % vocab ) <nl> + <nl> + X_train_batch = drop_tail ( X_train_batch , seq_len ) <nl> + X_val_batch = drop_tail ( X_val_batch , seq_len ) <nl> + <nl> + ngpu = 1 <nl> + # A simple two GPU placement plan <nl> + group2ctx = { ' embed ' : mx . gpu ( 0 ) , <nl> + ' decode ' : mx . gpu ( ngpu - 1 ) } <nl> + <nl> + for i in range ( num_lstm_layer ) : <nl> + group2ctx [ ' layer % d ' % i ] = mx . gpu ( i * ngpu / / num_lstm_layer ) <nl> + <nl> + # whether do group - wise concat <nl> + concat_decode = True <nl> + <nl> + model = lstm . setup_rnn_model ( mx . gpu ( ) , group2ctx = group2ctx , <nl> + concat_decode = concat_decode , <nl> + num_lstm_layer = num_lstm_layer , <nl> + seq_len = seq_len , <nl> + num_hidden = num_hidden , <nl> + num_embed = num_embed , <nl> + num_label = vocab , <nl> + batch_size = batch_size , <nl> + input_size = vocab , <nl> + initializer = mx . initializer . Uniform ( 0 . 1 ) , dropout = 0 . 5 ) <nl> + <nl> + lstm . train_lstm ( model , X_train_batch , X_val_batch , <nl> + num_round = num_round , <nl> + concat_decode = concat_decode , <nl> + half_life = 2 , <nl> + max_grad_norm = max_grad_norm , <nl> + update_period = update_period , <nl> + learning_rate = learning_rate , <nl> + wd = wd ) <nl> new file mode 100644 <nl> index 00000000000 . . dc00ef55aa7 <nl> mmm / dev / null <nl> ppp b / example / module / lstm_bucketing . py <nl> <nl> + # pylint : disable = C0111 , too - many - arguments , too - many - instance - attributes , too - many - locals , redefined - outer - name , fixme <nl> + # pylint : disable = superfluous - parens , no - member , invalid - name <nl> + import sys <nl> + import os <nl> + sys . path . insert ( 0 , os . path . abspath ( os . path . join ( os . path . dirname ( __file__ ) , " . . " , " . . " , " python " ) ) ) <nl> + sys . path . insert ( 0 , os . path . abspath ( os . path . join ( os . path . dirname ( __file__ ) , " . . " , " rnn " ) ) ) <nl> + import numpy as np <nl> + import mxnet as mx <nl> + <nl> + from lstm import lstm_unroll <nl> + from bucket_io import BucketSentenceIter , default_build_vocab <nl> + <nl> + import os . path <nl> + data_dir = os . path . abspath ( os . path . join ( os . path . dirname ( __file__ ) , ' . . ' , ' rnn ' , ' data ' ) ) <nl> + <nl> + def Perplexity ( label , pred ) : <nl> + label = label . T . reshape ( ( - 1 , ) ) <nl> + loss = 0 . <nl> + for i in range ( pred . shape [ 0 ] ) : <nl> + loss + = - np . log ( max ( 1e - 10 , pred [ i ] [ int ( label [ i ] ) ] ) ) <nl> + return np . exp ( loss / label . size ) <nl> + <nl> + if __name__ = = ' __main__ ' : <nl> + batch_size = 32 <nl> + buckets = [ 10 , 20 , 30 , 40 , 50 , 60 ] <nl> + # buckets = [ 32 ] <nl> + num_hidden = 200 <nl> + num_embed = 200 <nl> + num_lstm_layer = 2 <nl> + <nl> + # num_epoch = 25 <nl> + num_epoch = 2 <nl> + learning_rate = 0 . 01 <nl> + momentum = 0 . 0 <nl> + <nl> + # dummy data is used to test speed without IO <nl> + dummy_data = False <nl> + <nl> + contexts = [ mx . context . gpu ( i ) for i in range ( 1 ) ] <nl> + <nl> + vocab = default_build_vocab ( os . path . join ( data_dir , " ptb . train . txt " ) ) <nl> + <nl> + init_c = [ ( ' l % d_init_c ' % l , ( batch_size , num_hidden ) ) for l in range ( num_lstm_layer ) ] <nl> + init_h = [ ( ' l % d_init_h ' % l , ( batch_size , num_hidden ) ) for l in range ( num_lstm_layer ) ] <nl> + init_states = init_c + init_h <nl> + <nl> + data_train = BucketSentenceIter ( os . path . join ( data_dir , " ptb . train . txt " ) , vocab , <nl> + buckets , batch_size , init_states ) <nl> + data_val = BucketSentenceIter ( os . path . join ( data_dir , " ptb . valid . txt " ) , vocab , <nl> + buckets , batch_size , init_states ) <nl> + <nl> + if dummy_data : <nl> + data_train = DummyIter ( data_train ) <nl> + data_val = DummyIter ( data_val ) <nl> + <nl> + state_names = [ x [ 0 ] for x in init_states ] <nl> + def sym_gen ( seq_len ) : <nl> + sym = lstm_unroll ( num_lstm_layer , seq_len , len ( vocab ) , <nl> + num_hidden = num_hidden , num_embed = num_embed , <nl> + num_label = len ( vocab ) ) <nl> + data_names = [ ' data ' ] + state_names <nl> + label_names = [ ' softmax_label ' ] <nl> + return ( sym , data_names , label_names ) <nl> + <nl> + if len ( buckets ) = = 1 : <nl> + mod = mx . mod . Module ( * sym_gen ( buckets [ 0 ] ) , context = contexts ) <nl> + else : <nl> + mod = mx . mod . BucketingModule ( sym_gen , default_bucket_key = data_train . default_bucket_key , context = contexts ) <nl> + <nl> + import logging <nl> + head = ' % ( asctime ) - 15s % ( message ) s ' <nl> + logging . basicConfig ( level = logging . DEBUG , format = head ) <nl> + <nl> + mod . fit ( data_train , eval_data = data_val , num_epoch = num_epoch , <nl> + eval_metric = mx . metric . np ( Perplexity ) , <nl> + batch_end_callback = mx . callback . Speedometer ( batch_size , 50 ) , <nl> + initializer = mx . init . Xavier ( factor_type = " in " , magnitude = 2 . 34 ) , <nl> + optimizer = ' sgd ' , <nl> + optimizer_params = { ' learning_rate ' : 0 . 01 , ' momentum ' : 0 . 9 , ' wd ' : 0 . 00001 } ) <nl> + <nl> + # Now it is very easy to use the bucketing to do scoring or collect prediction outputs <nl> + metric = mx . metric . np ( Perplexity ) <nl> + mod . score ( data_val , metric ) <nl> + for name , val in metric . get_name_value ( ) : <nl> + logging . info ( ' Validation - % s = % f ' , name , val ) <nl> + <nl> new file mode 100644 <nl> index 00000000000 . . 979ce3ef181 <nl> mmm / dev / null <nl> ppp b / example / module / mnist_mlp . py <nl> <nl> + # pylint : skip - file <nl> + import mxnet as mx <nl> + import numpy as np <nl> + import logging <nl> + <nl> + data = mx . symbol . Variable ( ' data ' ) <nl> + fc1 = mx . symbol . FullyConnected ( data , name = ' fc1 ' , num_hidden = 128 ) <nl> + act1 = mx . symbol . Activation ( fc1 , name = ' relu1 ' , act_type = " relu " ) <nl> + fc2 = mx . symbol . FullyConnected ( act1 , name = ' fc2 ' , num_hidden = 64 ) <nl> + act2 = mx . symbol . Activation ( fc2 , name = ' relu2 ' , act_type = " relu " ) <nl> + fc3 = mx . symbol . FullyConnected ( act2 , name = ' fc3 ' , num_hidden = 10 ) <nl> + softmax = mx . symbol . SoftmaxOutput ( fc3 , name = ' softmax ' ) <nl> + <nl> + n_epoch = 2 <nl> + batch_size = 100 <nl> + train_dataiter = mx . io . MNISTIter ( <nl> + image = " data / train - images - idx3 - ubyte " , <nl> + label = " data / train - labels - idx1 - ubyte " , <nl> + data_shape = ( 784 , ) , <nl> + batch_size = batch_size , shuffle = True , flat = True , silent = False , seed = 10 ) <nl> + val_dataiter = mx . io . MNISTIter ( <nl> + image = " data / t10k - images - idx3 - ubyte " , <nl> + label = " data / t10k - labels - idx1 - ubyte " , <nl> + data_shape = ( 784 , ) , <nl> + batch_size = batch_size , shuffle = True , flat = True , silent = False ) <nl> + <nl> + # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # <nl> + # Intermediate - level API <nl> + # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # <nl> + mod = mx . mod . Module ( softmax ) <nl> + mod . bind ( data_shapes = train_dataiter . provide_data , label_shapes = train_dataiter . provide_label ) <nl> + mod . init_params ( ) <nl> + <nl> + mod . init_optimizer ( optimizer_params = { ' learning_rate ' : 0 . 01 , ' momentum ' : 0 . 9 } ) <nl> + metric = mx . metric . create ( ' acc ' ) <nl> + <nl> + for i_epoch in range ( n_epoch ) : <nl> + for i_iter , batch in enumerate ( train_dataiter ) : <nl> + mod . forward ( batch ) <nl> + mod . update_metric ( metric , batch . label ) <nl> + <nl> + mod . backward ( ) <nl> + mod . update ( ) <nl> + <nl> + for name , val in metric . get_name_value ( ) : <nl> + print ( ' epoch % 03d : % s = % f ' % ( i_epoch , name , val ) ) <nl> + metric . reset ( ) <nl> + train_dataiter . reset ( ) <nl> + <nl> + <nl> + # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # <nl> + # High - level API <nl> + # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # <nl> + logging . basicConfig ( level = logging . DEBUG ) <nl> + train_dataiter . reset ( ) <nl> + mod = mx . mod . Module ( softmax ) <nl> + mod . fit ( train_dataiter , eval_data = val_dataiter , <nl> + optimizer_params = { ' learning_rate ' : 0 . 01 , ' momentum ' : 0 . 9 } , num_epoch = n_epoch ) <nl> + <nl> + # perform prediction and calculate accuracy manually <nl> + preds = mod . predict ( val_dataiter , merge_batches = False ) <nl> + val_dataiter . reset ( ) <nl> + acc_sum = 0 . 0 ; acc_cnt = 0 <nl> + for i , batch in enumerate ( val_dataiter ) : <nl> + pred_label = preds [ i ] [ 0 ] . asnumpy ( ) . argmax ( axis = 1 ) <nl> + label = batch . label [ 0 ] . asnumpy ( ) . astype ( ' int32 ' ) <nl> + acc_sum + = ( label = = pred_label ) . sum ( ) <nl> + acc_cnt + = len ( pred_label ) <nl> + print ( ' validation Accuracy : % . 3f ' % ( acc_sum / acc_cnt ) ) <nl> + <nl> + # evaluate on validation set with a evaluation metric <nl> + mod . score ( val_dataiter , metric ) <nl> + for name , val in metric . get_name_value ( ) : <nl> + print ( ' % s = % f ' % ( name , val ) ) <nl> new file mode 100644 <nl> index 00000000000 . . d139789fdf3 <nl> mmm / dev / null <nl> ppp b / example / module / python_loss . py <nl> <nl> + # pylint : skip - file <nl> + import numpy as np <nl> + import mxnet as mx <nl> + import numba <nl> + import logging <nl> + <nl> + # We use numba . jit to implement the loss gradient . <nl> + @ numba . jit <nl> + def mc_hinge_grad ( scores , labels ) : <nl> + scores = scores . asnumpy ( ) <nl> + labels = labels . asnumpy ( ) <nl> + <nl> + n , _ = scores . shape <nl> + grad = np . zeros_like ( scores ) <nl> + <nl> + for i in range ( n ) : <nl> + score = 1 + scores [ i ] - scores [ i , labels [ i ] ] <nl> + score [ labels [ i ] ] = 0 <nl> + ind_pred = score . argmax ( ) <nl> + grad [ i , labels [ i ] ] - = 1 <nl> + grad [ i , ind_pred ] + = 1 <nl> + <nl> + return grad <nl> + <nl> + if __name__ = = ' __main__ ' : <nl> + n_epoch = 10 <nl> + batch_size = 100 <nl> + num_gpu = 2 <nl> + contexts = mx . context . cpu ( ) if num_gpu < 1 else [ mx . context . gpu ( i ) for i in range ( num_gpu ) ] <nl> + <nl> + # build a MLP module <nl> + data = mx . symbol . Variable ( ' data ' ) <nl> + fc1 = mx . symbol . FullyConnected ( data , name = ' fc1 ' , num_hidden = 128 ) <nl> + act1 = mx . symbol . Activation ( fc1 , name = ' relu1 ' , act_type = " relu " ) <nl> + fc2 = mx . symbol . FullyConnected ( act1 , name = ' fc2 ' , num_hidden = 64 ) <nl> + act2 = mx . symbol . Activation ( fc2 , name = ' relu2 ' , act_type = " relu " ) <nl> + fc3 = mx . symbol . FullyConnected ( act2 , name = ' fc3 ' , num_hidden = 10 ) <nl> + <nl> + mlp = mx . mod . Module ( fc3 , context = contexts ) <nl> + loss = mx . mod . PythonLossModule ( grad_func = mc_hinge_grad ) <nl> + <nl> + mod = mx . mod . SequentialModule ( ) \ <nl> + . add ( mlp ) \ <nl> + . add ( loss , take_labels = True , auto_wiring = True ) <nl> + <nl> + train_dataiter = mx . io . MNISTIter ( <nl> + image = " data / train - images - idx3 - ubyte " , <nl> + label = " data / train - labels - idx1 - ubyte " , <nl> + data_shape = ( 784 , ) , <nl> + batch_size = batch_size , shuffle = True , flat = True , silent = False , seed = 10 ) <nl> + val_dataiter = mx . io . MNISTIter ( <nl> + image = " data / t10k - images - idx3 - ubyte " , <nl> + label = " data / t10k - labels - idx1 - ubyte " , <nl> + data_shape = ( 784 , ) , <nl> + batch_size = batch_size , shuffle = True , flat = True , silent = False ) <nl> + <nl> + logging . basicConfig ( level = logging . DEBUG ) <nl> + mod . fit ( train_dataiter , eval_data = val_dataiter , <nl> + optimizer_params = { ' learning_rate ' : 0 . 01 , ' momentum ' : 0 . 9 } , <nl> + num_epoch = n_epoch ) <nl> new file mode 100644 <nl> index 00000000000 . . def0558d066 <nl> mmm / dev / null <nl> ppp b / example / module / sequential_module . py <nl> <nl> + # pylint : skip - file <nl> + import mxnet as mx <nl> + import numpy as np <nl> + import logging <nl> + <nl> + # whether to demo model - parallelism + data parallelism <nl> + demo_data_model_parallelism = False <nl> + <nl> + if demo_data_model_parallelism : <nl> + contexts = [ [ mx . context . gpu ( 0 ) , mx . context . gpu ( 1 ) ] , [ mx . context . gpu ( 2 ) , mx . context . gpu ( 3 ) ] ] <nl> + else : <nl> + contexts = [ mx . context . cpu ( ) , mx . context . cpu ( ) ] <nl> + <nl> + # mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl> + # module 1 <nl> + # mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl> + data = mx . symbol . Variable ( ' data ' ) <nl> + fc1 = mx . symbol . FullyConnected ( data , name = ' fc1 ' , num_hidden = 128 ) <nl> + act1 = mx . symbol . Activation ( fc1 , name = ' relu1 ' , act_type = " relu " ) <nl> + <nl> + mod1 = mx . mod . Module ( act1 , label_names = [ ] , context = contexts [ 0 ] ) <nl> + <nl> + # mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl> + # module 2 <nl> + # mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl> + data = mx . symbol . Variable ( ' data ' ) <nl> + fc2 = mx . symbol . FullyConnected ( data , name = ' fc2 ' , num_hidden = 64 ) <nl> + act2 = mx . symbol . Activation ( fc2 , name = ' relu2 ' , act_type = " relu " ) <nl> + fc3 = mx . symbol . FullyConnected ( act2 , name = ' fc3 ' , num_hidden = 10 ) <nl> + softmax = mx . symbol . SoftmaxOutput ( fc3 , name = ' softmax ' ) <nl> + <nl> + mod2 = mx . mod . Module ( softmax , context = contexts [ 1 ] ) <nl> + <nl> + # mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl> + # Container module <nl> + # mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl> + mod_seq = mx . mod . SequentialModule ( ) <nl> + mod_seq . add ( mod1 ) . add ( mod2 , take_labels = True , auto_wiring = True ) <nl> + <nl> + <nl> + # mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl> + # Training <nl> + # mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl> + n_epoch = 2 <nl> + batch_size = 100 <nl> + train_dataiter = mx . io . MNISTIter ( <nl> + image = " data / train - images - idx3 - ubyte " , <nl> + label = " data / train - labels - idx1 - ubyte " , <nl> + data_shape = ( 784 , ) , <nl> + batch_size = batch_size , shuffle = True , flat = True , silent = False , seed = 10 ) <nl> + val_dataiter = mx . io . MNISTIter ( <nl> + image = " data / t10k - images - idx3 - ubyte " , <nl> + label = " data / t10k - labels - idx1 - ubyte " , <nl> + data_shape = ( 784 , ) , <nl> + batch_size = batch_size , shuffle = True , flat = True , silent = False ) <nl> + <nl> + logging . basicConfig ( level = logging . DEBUG ) <nl> + mod_seq . fit ( train_dataiter , eval_data = val_dataiter , <nl> + optimizer_params = { ' learning_rate ' : 0 . 01 , ' momentum ' : 0 . 9 } , num_epoch = n_epoch ) <nl> + <nl> new file mode 100644 <nl> index 00000000000 . . 55d22c47a11 <nl> mmm / dev / null <nl> ppp b / example / module / train_cifar10 . py <nl> <nl> + import logging <nl> + import os , sys <nl> + sys . path . insert ( 0 , os . path . abspath ( os . path . join ( os . path . dirname ( __file__ ) , " . . " , " image - classification " ) ) ) <nl> + <nl> + import find_mxnet <nl> + import mxnet as mx <nl> + import argparse <nl> + import train_model <nl> + <nl> + my_dir = os . path . dirname ( __file__ ) <nl> + default_data_dir = os . path . abspath ( os . path . join ( my_dir , ' . . ' , ' image - classification ' , ' cifar10 ' ) ) + ' / ' <nl> + <nl> + parser = argparse . ArgumentParser ( description = ' train an image classifer on cifar10 ' ) <nl> + parser . add_argument ( ' - - network ' , type = str , default = ' inception - bn - 28 - small ' , <nl> + help = ' the cnn to use ' ) <nl> + parser . add_argument ( ' - - data - dir ' , type = str , default = default_data_dir , <nl> + help = ' the input data directory ' ) <nl> + parser . add_argument ( ' - - gpus ' , type = str , default = ' 0 ' , <nl> + help = ' the gpus will be used , e . g " 0 , 1 , 2 , 3 " ' ) <nl> + parser . add_argument ( ' - - num - examples ' , type = int , default = 60000 , <nl> + help = ' the number of training examples ' ) <nl> + parser . add_argument ( ' - - batch - size ' , type = int , default = 128 , <nl> + help = ' the batch size ' ) <nl> + parser . add_argument ( ' - - lr ' , type = float , default = . 05 , <nl> + help = ' the initial learning rate ' ) <nl> + parser . add_argument ( ' - - lr - factor ' , type = float , default = 1 , <nl> + help = ' times the lr with a factor for every lr - factor - epoch epoch ' ) <nl> + parser . add_argument ( ' - - lr - factor - epoch ' , type = float , default = 1 , <nl> + help = ' the number of epoch to factor the lr , could be . 5 ' ) <nl> + parser . add_argument ( ' - - model - prefix ' , type = str , <nl> + help = ' the prefix of the model to load ' ) <nl> + parser . add_argument ( ' - - save - model - prefix ' , type = str , <nl> + help = ' the prefix of the model to save ' ) <nl> + parser . add_argument ( ' - - num - epochs ' , type = int , default = 20 , <nl> + help = ' the number of training epochs ' ) <nl> + parser . add_argument ( ' - - load - epoch ' , type = int , <nl> + help = " load the model on an epoch using the model - prefix " ) <nl> + parser . add_argument ( ' - - kv - store ' , type = str , default = ' local ' , <nl> + help = ' the kvstore type ' ) <nl> + args = parser . parse_args ( ) <nl> + <nl> + if args . model_prefix is not None : <nl> + args . model_prefix = os . path . abspath ( os . path . join ( my_dir , args . model_prefix ) ) <nl> + if args . save_model_prefix is not None : <nl> + args . save_model_prefix = os . path . abspath ( os . path . join ( my_dir , args . save_model_prefix ) ) <nl> + <nl> + # download data if necessary <nl> + def _download ( data_dir ) : <nl> + if not os . path . isdir ( data_dir ) : <nl> + os . system ( " mkdir " + data_dir ) <nl> + cwd = os . path . abspath ( os . getcwd ( ) ) <nl> + os . chdir ( data_dir ) <nl> + if ( not os . path . exists ( ' train . rec ' ) ) or \ <nl> + ( not os . path . exists ( ' test . rec ' ) ) : <nl> + os . system ( " wget http : / / webdocs . cs . ualberta . ca / ~ bx3 / data / cifar10 . zip " ) <nl> + os . system ( " unzip - u cifar10 . zip " ) <nl> + os . system ( " mv cifar / * . ; rm - rf cifar ; rm cifar10 . zip " ) <nl> + os . chdir ( cwd ) <nl> + <nl> + # network <nl> + import importlib <nl> + net = importlib . import_module ( ' symbol_ ' + args . network ) . get_symbol ( 10 ) <nl> + <nl> + # data <nl> + def get_iterator ( args , kv ) : <nl> + data_shape = ( 3 , 28 , 28 ) <nl> + if ' : / / ' not in args . data_dir : <nl> + _download ( args . data_dir ) <nl> + <nl> + train = mx . io . ImageRecordIter ( <nl> + path_imgrec = args . data_dir + " train . rec " , <nl> + mean_img = args . data_dir + " mean . bin " , <nl> + data_shape = data_shape , <nl> + batch_size = args . batch_size , <nl> + rand_crop = True , <nl> + rand_mirror = True , <nl> + num_parts = kv . num_workers , <nl> + part_index = kv . rank ) <nl> + <nl> + val = mx . io . ImageRecordIter ( <nl> + path_imgrec = args . data_dir + " test . rec " , <nl> + mean_img = args . data_dir + " mean . bin " , <nl> + rand_crop = False , <nl> + rand_mirror = False , <nl> + data_shape = data_shape , <nl> + batch_size = args . batch_size , <nl> + num_parts = kv . num_workers , <nl> + part_index = kv . rank ) <nl> + <nl> + return ( train , val ) <nl> + <nl> + <nl> + # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # <nl> + # train <nl> + # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # <nl> + <nl> + # kvstore <nl> + kv = mx . kvstore . create ( args . kv_store ) <nl> + <nl> + # logging <nl> + head = ' % ( asctime ) - 15s Node [ ' + str ( kv . rank ) + ' ] % ( message ) s ' <nl> + logging . basicConfig ( level = logging . DEBUG , format = head ) <nl> + logging . info ( ' start with arguments % s ' , args ) <nl> + <nl> + import platform <nl> + logging . info ( ' running on % s ' , platform . node ( ) ) <nl> + <nl> + ( train , val ) = get_iterator ( args , kv ) <nl> + <nl> + devs = mx . cpu ( ) if ( args . gpus is None or args . gpus = = ' ' ) else [ <nl> + mx . gpu ( int ( i ) ) for i in args . gpus . split ( ' , ' ) ] <nl> + <nl> + mod = mx . mod . Module ( net , context = devs ) <nl> + <nl> + # load model <nl> + model_prefix = args . model_prefix <nl> + <nl> + if args . load_epoch is not None : <nl> + assert model_prefix is not None <nl> + logging . info ( ' loading model from % s - % d . . . ' % ( model_prefix , args . load_epoch ) ) <nl> + sym , arg_params , aux_params = mx . model . load_checkpoint ( model_prefix , args . load_epoch ) <nl> + else : <nl> + arg_params = None <nl> + aux_params = None <nl> + <nl> + # save model <nl> + save_model_prefix = args . save_model_prefix <nl> + if save_model_prefix is None : <nl> + save_model_prefix = model_prefix <nl> + checkpoint = None if save_model_prefix is None else mx . callback . do_checkpoint ( save_model_prefix ) <nl> + <nl> + optim_args = { ' learning_rate ' : args . lr , ' wd ' : 0 . 00001 , ' momentum ' : 0 . 9 } <nl> + if ' lr_factor ' in args and args . lr_factor < 1 : <nl> + optim_args [ ' lr_scheduler ' ] = mx . lr_scheduler . FactorScheduler ( <nl> + step = max ( int ( epoch_size * args . lr_factor_epoch ) , 1 ) , <nl> + factor = args . lr_factor ) <nl> + <nl> + if ' clip_gradient ' in args and args . clip_gradient is not None : <nl> + optim_args [ ' clip_gradient ' ] = args . clip_gradient <nl> + <nl> + eval_metrics = [ ' accuracy ' ] <nl> + # # TopKAccuracy only allows top_k > 1 <nl> + for top_k in [ 5 , 10 , 20 ] : <nl> + eval_metrics . append ( mx . metric . create ( ' top_k_accuracy ' , top_k = top_k ) ) <nl> + <nl> + if args . load_epoch : <nl> + begin_epoch = args . load_epoch + 1 <nl> + else : <nl> + begin_epoch = 0 <nl> + <nl> + logging . info ( ' start training for % d epochs . . . ' , args . num_epochs ) <nl> + mod . fit ( train , eval_data = val , optimizer_params = optim_args , <nl> + eval_metric = eval_metrics , num_epoch = args . num_epochs , <nl> + arg_params = arg_params , aux_params = aux_params , begin_epoch = begin_epoch , <nl> + batch_end_callback = mx . callback . Speedometer ( args . batch_size , 50 ) , <nl> + epoch_end_callback = checkpoint ) <nl> new file mode 100644 <nl> index 00000000000 . . bfc4f817cff <nl> mmm / dev / null <nl> ppp b / example / multi - task / README . md <nl> <nl> + # Mulit - task learning example <nl> + <nl> + This is a simple example to show how to use mxnet for multi - task learning . It uses MNIST as an example and mocks up the multi - label task . <nl> + <nl> + # # Usage <nl> + First , you need to write a multi - task iterator on your own . The iterator needs to generate multiple labels according to your applications , and the label names should be specified in the ` provide_label ` function , which needs to be consist with the names of output layers . <nl> + <nl> + Then , if you want to show metrics of different tasks separately , you need to write your own metric class and specify the ` num ` parameter . In the ` update ` function of metric , calculate the metrics seperately for different tasks . <nl> new file mode 100644 <nl> index 00000000000 . . d39821f5214 <nl> mmm / dev / null <nl> ppp b / example / multi - task / data . py <nl> <nl> + # pylint : skip - file <nl> + " " " data iterator for mnist " " " <nl> + import sys <nl> + import os <nl> + # code to automatically download dataset <nl> + curr_path = os . path . dirname ( os . path . abspath ( os . path . expanduser ( __file__ ) ) ) <nl> + sys . path . append ( os . path . join ( curr_path , " . . / . . / tests / python / common " ) ) <nl> + import get_data <nl> + import mxnet as mx <nl> + <nl> + def mnist_iterator ( batch_size , input_shape ) : <nl> + " " " return train and val iterators for mnist " " " <nl> + # download data <nl> + get_data . GetMNIST_ubyte ( ) <nl> + flat = False if len ( input_shape ) = = 3 else True <nl> + <nl> + train_dataiter = mx . io . MNISTIter ( <nl> + image = " data / train - images - idx3 - ubyte " , <nl> + label = " data / train - labels - idx1 - ubyte " , <nl> + input_shape = input_shape , <nl> + batch_size = batch_size , <nl> + shuffle = True , <nl> + flat = flat ) <nl> + <nl> + val_dataiter = mx . io . MNISTIter ( <nl> + image = " data / t10k - images - idx3 - ubyte " , <nl> + label = " data / t10k - labels - idx1 - ubyte " , <nl> + input_shape = input_shape , <nl> + batch_size = batch_size , <nl> + flat = flat ) <nl> + <nl> + return ( train_dataiter , val_dataiter ) <nl> new file mode 100644 <nl> index 00000000000 . . 216ed71c136 <nl> mmm / dev / null <nl> ppp b / example / multi - task / example_multi_task . py <nl> <nl> + # pylint : skip - file <nl> + import sys <nl> + sys . path . insert ( 0 , " . . / . . / python / " ) <nl> + from data import mnist_iterator <nl> + import mxnet as mx <nl> + import numpy as np <nl> + import logging <nl> + import time <nl> + <nl> + logging . basicConfig ( level = logging . DEBUG ) <nl> + <nl> + def build_network ( ) : <nl> + data = mx . symbol . Variable ( ' data ' ) <nl> + fc1 = mx . symbol . FullyConnected ( data = data , name = ' fc1 ' , num_hidden = 128 ) <nl> + act1 = mx . symbol . Activation ( data = fc1 , name = ' relu1 ' , act_type = " relu " ) <nl> + fc2 = mx . symbol . FullyConnected ( data = act1 , name = ' fc2 ' , num_hidden = 64 ) <nl> + act2 = mx . symbol . Activation ( data = fc2 , name = ' relu2 ' , act_type = " relu " ) <nl> + fc3 = mx . symbol . FullyConnected ( data = act2 , name = ' fc3 ' , num_hidden = 10 ) <nl> + sm1 = mx . symbol . SoftmaxOutput ( data = fc3 , name = ' softmax1 ' ) <nl> + sm2 = mx . symbol . SoftmaxOutput ( data = fc3 , name = ' softmax2 ' ) <nl> + <nl> + softmax = mx . symbol . Group ( [ sm1 , sm2 ] ) <nl> + <nl> + return softmax <nl> + <nl> + class Multi_mnist_iterator ( mx . io . DataIter ) : <nl> + ' ' ' multi label mnist iterator ' ' ' <nl> + <nl> + def __init__ ( self , data_iter ) : <nl> + super ( Multi_mnist_iterator , self ) . __init__ ( ) <nl> + self . data_iter = data_iter <nl> + self . batch_size = self . data_iter . batch_size <nl> + <nl> + @ property <nl> + def provide_data ( self ) : <nl> + return self . data_iter . provide_data <nl> + <nl> + @ property <nl> + def provide_label ( self ) : <nl> + provide_label = self . data_iter . provide_label [ 0 ] <nl> + # Different labels should be used here for actual application <nl> + return [ ( ' softmax1_label ' , provide_label [ 1 ] ) , \ <nl> + ( ' softmax2_label ' , provide_label [ 1 ] ) ] <nl> + <nl> + def hard_reset ( self ) : <nl> + self . data_iter . hard_reset ( ) <nl> + <nl> + def reset ( self ) : <nl> + self . data_iter . reset ( ) <nl> + <nl> + def next ( self ) : <nl> + batch = self . data_iter . next ( ) <nl> + label = batch . label [ 0 ] <nl> + <nl> + return mx . io . DataBatch ( data = batch . data , label = [ label , label ] , \ <nl> + pad = batch . pad , index = batch . index ) <nl> + <nl> + class Multi_Accuracy ( mx . metric . EvalMetric ) : <nl> + " " " Calculate accuracies of multi label " " " <nl> + <nl> + def __init__ ( self , num = None ) : <nl> + super ( Multi_Accuracy , self ) . __init__ ( ' multi - accuracy ' , num ) <nl> + <nl> + def update ( self , labels , preds ) : <nl> + mx . metric . check_label_shapes ( labels , preds ) <nl> + <nl> + if self . num ! = None : <nl> + assert len ( labels ) = = self . num <nl> + <nl> + for i in range ( len ( labels ) ) : <nl> + pred_label = mx . nd . argmax_channel ( preds [ i ] ) . asnumpy ( ) . astype ( ' int32 ' ) <nl> + label = labels [ i ] . asnumpy ( ) . astype ( ' int32 ' ) <nl> + <nl> + mx . metric . check_label_shapes ( label , pred_label ) <nl> + <nl> + if i = = None : <nl> + self . sum_metric + = ( pred_label . flat = = label . flat ) . sum ( ) <nl> + self . num_inst + = len ( pred_label . flat ) <nl> + else : <nl> + self . sum_metric [ i ] + = ( pred_label . flat = = label . flat ) . sum ( ) <nl> + self . num_inst [ i ] + = len ( pred_label . flat ) <nl> + <nl> + <nl> + batch_size = 100 <nl> + num_epochs = 100 <nl> + device = mx . gpu ( 0 ) <nl> + lr = 0 . 01 <nl> + <nl> + network = build_network ( ) <nl> + train , val = mnist_iterator ( batch_size = batch_size , input_shape = ( 784 , ) ) <nl> + train = Multi_mnist_iterator ( train ) <nl> + val = Multi_mnist_iterator ( val ) <nl> + <nl> + <nl> + model = mx . model . FeedForward ( <nl> + ctx = device , <nl> + symbol = network , <nl> + num_epoch = num_epochs , <nl> + learning_rate = lr , <nl> + momentum = 0 . 9 , <nl> + wd = 0 . 00001 , <nl> + initializer = mx . init . Xavier ( factor_type = " in " , magnitude = 2 . 34 ) ) <nl> + <nl> + model . fit ( <nl> + X = train , <nl> + eval_data = val , <nl> + eval_metric = Multi_Accuracy ( num = 2 ) , <nl> + batch_end_callback = mx . callback . Speedometer ( batch_size , 50 ) ) <nl> + <nl> new file mode 100644 <nl> index 00000000000 . . 588665ff422 <nl> mmm / dev / null <nl> ppp b / example / neural - style / neuralart . ipynb <nl> <nl> + { <nl> + " cells " : [ <nl> + { <nl> + " cell_type " : " markdown " , <nl> + " metadata " : { <nl> + " collapsed " : true <nl> + } , <nl> + " source " : [ <nl> + " # # Neural Art Demo \ n " , <nl> + " This demo is an implementation of the algorithm in the paper [ A Neural Algorithm of Artistic Style ] ( http : / / arxiv . org / abs / 1508 . 06576 ) by Leon A . Gatys , Alexander S . Ecker , and Matthias Bethge . \ n " , <nl> + " \ n " , <nl> + " This algorithm transfers ' artistic style ' from one image to the other . For example , you can make your favourite photo looks like van Gogh ' s painting . \ n " , <nl> + " \ n " , <nl> + " First , we need to images to work with . We extract the ' style ' image ' s style and transfer it to the ' content ' image . \ n " , <nl> + " The default images are photo of buildings and van Gogh ' s painting . \ n " , <nl> + " You can swap them with any images on the internet you like . " <nl> + ] <nl> + } , <nl> + { <nl> + " cell_type " : " code " , <nl> + " execution_count " : 25 , <nl> + " metadata " : { <nl> + " collapsed " : false <nl> + } , <nl> + " outputs " : [ <nl> + { <nl> + " data " : { <nl> + " image / png " : " iVBORw0KGgoAAAANSUhEUgAAAXQAAACQCAYAAAAYwZBzAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz \ nAAALEgAACxIB0t1 + / AAAIABJREFUeJzsvXeYXNWZ7vtbe + / K1dU5t7pbrW6lVkQJJSRAYITBRBOc \ ncDjYB8 / Yx2HsOeOZ8cgJ2 + PxjPOxPcYBB8DY2AYTLYRAoIByzt2tzrm6cu247h9V1V0tAdfn3hmE \ nTb / P009V7bX2SrXr / b71rm + tFlJKpjCFKUxhCn / 5UC52A6YwhSlMYQr / NZgi9ClMYQpT + CvBFKFP \ nYQpTmMJfCaYIfQpTmMIU / kowRehTmMIUpvBXgilCn8IUpjCFvxJMEfoUpjCFKfyVYIrQpzCFKbzu \ nEEJsEkL8 / L + wvK1CiA / 8V5X3l4opQp / CFKbw14CpHZJMEfpfJIQQPxVCfOFit2MKbx4IIaYJIR4R \ nQgwKIYaFEN8WGfyTEKJDCDEghPiZECKUzd8ohHCEEO8RQpwTQgwJIT6TTbsG + AfgdiFETAixP3u9 \ nUAhxnxCiVwjRLYT4ghBCyaa9VwjxohDia0KIUSFEW7YchBBfAtYC38mW962LMUZvBEwR + hsA / x + m \ nn5Ipj2QKrxOEECrwR6AdaABqgAeB9wF3AeuBJiAIfOe821cDM4Ergc8KIWZJKZ8C7gUelFIWSCkX \ nZ / P + FDCAGcBi4Grgf + SVtRw4AZQC / wrcByCl / EdgG / A32fI + + l / V9780TBH6Xy7ExW7AFN40WA5U \ nA5 + SUqaklIaU8iXgncDXpZQdUsoEGa / 7jpxXncXnpJS6lPIQcBBYmL0uyHuGhRCVwEbg49k6hoBv \ nAHfklXVOSnmfzBxAdT9QLYSoyEt / 0 / 8mpgj9dYYQ4u + z08moEOKEEOJazpt + CiFuFULsOe + + Twgh \ nfv8qZV4nhDgghAgLIV4SQsx / PfoyhTcNppEhU + e869XAubzPnYAGVOZd6897nyTjxb8SGgAX0Jd9 \ njsPA94HyVypLSpnMvs0v700 / a9UudgPeTBBCzAL + BlgqpewXQtST + Q7uBWZIKd + TzecGfiCEmC2l \ nPJG9 / d3A51 + hzMVkpp7XAXuy + R7NTm2N / / ZOTeHNgC6gXgihSintvOu9QGPe53rAAgay718L55Nv \ nF6ADpa9gOP4cvOnJHKY89NcbNuABWoUQLillp5SyjfOmn1kifgh4F4AQopWMB / PHvLJyD / AHgR9I \ nKXfLDO4n88O49L + 9N1N4s2AX0Ad8RQjhF0J4hRCrgQeAj2cXQINM6OJ / DiH3A41CCAEgpewDngH + \ nXQhRIIRQhBAzhBCX / ZltHCCjvb + pMUXoryOklGeAjwGbgAEhxANCiOpXyf4z4B3Z9 + 8GHpJSmq + Q \ nrwH4ZG6amp2q1pGZDk9hCv + / kSXo64FmMrJKF / B24MfAz4EXgDYykspH8m99jWIfzr6O5MmL7wHc \ nwDFgNJunKq + s88vL / / xN4NZsBMw3 / uzO / ZVBTP2Di4sDIUQB8AMyU9QzQIuU8t3n5TlBxgP / OXCn \ nlHJ79vpPgC4p5WeFEN8HOqWU976uHZjCFKbwhsOUh / 46QggxUwhxhRDCQ0YWSZORYQbIm37m4X4y \ nYWBGjsxzRTEh0fwn8D + FEMuzccEBIcRbs1PgKUxhCm8iTBH66wsP8GVgiIwmWUYmwuWVpp + Q8cxb \ ngV + cV8749FNKuRe4mwzxjwKnyUxdpzCFKbzJMCW5vIEhhPCR8d4XSynPXuz2TGEKU3hjYyps8Y2N \ ne4CXp8j8Lwf3 / vRPEkCIjKMkhEDkgj6EREUghEBKG0VRMunjSltmwqwoysS9QqDk1DXhoCBQhMBR \ nMtcEEwElmQ2djN + b / yoBV3YNUUqJEPYFeZ1cPTJDC06eAKgiQRE4Uo7Xk2tnfn + lAFsKco6ilBIp \ nMj1QHQsUgW2lMRIpUMDtK0BRVZCZsqSiZvqcHTMhBFJk2pIpUxkvV1GUSfXk + pkZ31y / JIrItseR \ nIBRkbjiFwM5 + kFKiZvMJISfGDzletuo4mXvIH1sne3 + mnSJbxrijLHNjmxk3KSXSEVhCgmOP98ej \ ngktIbEUhZUyMZa6c3LcspeRjb1v2qhuopgj9DQohRAeZ5 / PGi9yUKfxfIDfflVKME4uSt3HSlhna \ nFELDzqXJyQRsZz8LRJahssYBBZsM8Yps + cgJgpJ55djZstS8zZNWlhYUJDJrWIQQ4212xpkuRyQC \ nyBgdJ9uGXJMy + SeIT463B0SO2IQCUiKkQOLgaG5ENt3ld2fqUDWkEKCq2T5PjF9uPKXIGbiJcR5v \ nt8iNRZY0x9MzeRRFBelk25PpN1LioKAIBcEEkcvx / mQMQe69yCmcqpb9OiZUDU1kjIqdbbtA4OQR \ nO1mjp0iJkBKhCIQqkLZAKmI8n1AyBlNFwe + RpCwHkSV7xxk3tagXLLNNxhShv0EhpWy82G2Ywv89 \ ncl6tkuM / IcZpRpB12LJkdAF5kyEEkWGjcQazs69KlmiQknFfPO8HPk7mYoLwclSgCiB7lw0oQkUC \ nas6DFA4iSwcOEkSmPjtjb1DJGA6Z1zcnazAyhO9MShtvrxDYOBNGTYBwuxGOg5r1sMfJL78f + bMN \ nMs71 + ZiYfeQM3kSsgJKbwQhB7iQCx84ZMsbr1vJmGVLkxiq / PU6GhBE5uwrKxHsn28BcKVLme / fK \ n + PgrStZoAKoKHuGgWxkPXwiwpUQBVJH5bjXkxIxJUcCRWaP12pgi9ClM4XXChPf352ESOYis5ycz \ nf / Zkzs / dkZFBXmFdzFZAdfIILpvHzjnlUsPOcW6WNSwhEa / S3pzByG / jRB8nt1sRFxJ3vqx0 / uv5 \ nwV75956fdmHdr5yWqzNH7nZWshF5eXNtu7AN8ryDZ179W8xJRADSYbzvk9Klg6qqeJHodo78NZAO \ nUgNhS9xuN7o5YVgzxD / Z8L0SLgqhr1hzg7zl5pv40qbPUO6px + PzY4g2Wq7 / P + zcu4PLZvno3tuB \ nmL0MT2UT + tBZHOmiu6OPBfNbOLT7RQJ1M6ieN4czA + eoi0ZwUi5mzRlhxHspJzsGsGWKJWd + ybFk \ nnGkyxkGjkeJ5N + Du2cuov4XmBUswRwcZHBkmPHQGly2or23ibGIEdTRMsdtiYLCf2upSbK0Yb / Ol \ ntNZ52brtOGvm19M + ZBAqcDHQeZC + MzpzVszBjMRRCwVSK2NGs4vnth8lHU4glAAVlcUUlZThkwbS \ ntujc8RAJrQKjoJjoWILFM6fTH09wz02N / GKzym1vbWD31i3sO2cyrWwGRUUawz19pOOdpO1CIpZO \ n / dW30nfqOM7gCNWFFoGaJhrnFLBxXg8lzSH + + JxBf2otq2cEiKUfJTHaxpryVvbsW83o8mGq9h6h \ nYMU1 / H5PB + 3bd5MWaUKHniNZVE0icoYCb4i7 / + l + / vDLr9J7rpumBbPoPqvT8u53UB6N0bt / GyML \ nVpJ44jlmfuzd + Lt66CwpY2RbGze8fyH7nz3J3394L77hKrZv8bOs + SncIZvVq24k0vE4JdPm0Xdu \ nKwHvbAL + AOGUgc81nYCrG3toJz5rmMTYMG5XLSNHTlC64W3o1atRjBOQ0jm5fYAeu4pZrSWUlITo \ nSx5mdKyXXxx / hB + + q + SiHdQ0 / qPOkzMg450rMp81c35ddrI + nn / iM / nXZE6CyGrW2XSRV0lG + pjs \ ndWakEGeyVp + VVcYJW5loq50l5KwalNXBM8SS061z7XCUrHac7ZcjJAJ10hiMqzVCgJjQwPPHK68H \ nk3TwbIY8wzKhrZ9P8hdG / ebun5gd5MYhN2MQTBgM7XzPPGeAc0OdrSM3g8mMZE5ykhPafG4NQWGS \ nnCbHZSIFiUDVBB4hMWyQONhCQTigqAJFSlTNwXYEwpFk7LTD5HPPLoS6adOm18zw34HPfPn + Tb1t \ nGsboETSligTt2GYLBWqaNTdcxd5nt1FYPgN9IEbf0CmEA450UdDcRGdyhLFogni3g + JOMHh0ALWl \ nhUBNDRXuzfT2Tme4tw0inUwzOui2LOrKfGhF9Xg8AQIlS / jqvzcz + Pj / 5tNfex + H / 9RGyYxCfv2d \ nDWx + so1wtJMaFIpnzmHg6AHiwo2hFZBOjtLb0YVIjHLw7HbG + kex / SG6Tp6k4cZ7GCyVhLxejhw + \ nzpK5pew / fIjhkwfxB + JowwMkOw + R7D3I0RN7iUdSXPL2dxCJq9TWL0Ff2ETyWBvpgV52H + shOrIL \ nO3Azu7qGaQipfOPedfzrN57AIkI46cHl9VEcLGPsTDs + x8 + d77yOQnea25Y4xHtruf32Nr768zjP \ nHCjmo3cGeWr7 / fzzLTfxqc89TPuaT1Pg / Jpjv / kdB / TZ6MVBjmp11FpJikuXUD9zLr1HtlBsFeL2 \ nl / PU / l + TOG1AcQGOt5iAHqZsVgmdu3q4 + 675vLztGCG1l7hRim / dbNyGw48 + v57HujoIdz / GA9 + L \ nc8UV + 2hecIqBowdQ5Vpa54 + h2wJ / qJyArCJYVIUSFAye66ayJgmDm5EDZ7BiSdLOAjxL30NgzhVo \ nxa3oYzpC2pw + bTBtSTV10xdi2AF8gSCf / fIa3rnoKI3rT1OnXfm51 / 3BBrYdat8EF3qcE9PwLIQc \ n10hfyVs93 / O80PvMy5 / nL05eqBST8sssyapZbx8hcBTGFx3P9zuFYLLXen66MrlfmXaCEMqEbHRe \ nW8bTzhubib / 8 / p6flmHIV7v / lfDKdWQMS4bYLyxDUZRxiSS / XROyUXaxWlHGJTKRZfyJdYScrJa3 \ n8D0 + VtlF1uyieG7tItOezFgqioIqFOzcrCorIakoLG2petVn + 6KELVZd + XEZ6knTl45Tnnqewrob \ nGbD6KStpRilZzGDPGQqL / GglFYi2Exiql6raIiy7kJSRpKkiwJDTw5mzaR783nv59nee5ek9feiD \ nZ1l79VriJbUo8R4Wtv2Bbb2dVIc8HFVm8uV / uIk6969Y5nVxSu0iEAvzv74Q5omtz3Pd5Z / gj1v + \ nkfrVD6J4DNy + WhqrKtm7bTOh0hLG4hrX3XQjMXuAXdt3oEc68YtC1l57K7956Ld4GaNmZgO1wRBH \ newaxhIvrb7idg8fOokXaKQoVs / 3ADmpKKgiPpCkTXobdI3gTbgaHjjKnuIYVVy7jNz / 8Ehv / 19dQ \ nws + QNGaxe / 9eaitaKS6XPPDj9 / Ot3 / Xy4NbT3PnBu1ldm + Tut3yMsC6Rahppq2hum + VXraB61UZK \ nW9J4z / TRpTbyrsYfY7taURI9vPOHLfh7j3DZRz / Enp2neOeiJp78 + nfw19aiVBZxePOjRE2LQk8A \ nxyXQDQeLAKnoECWV5Qy5CqnzpOk + cJz6m9 + FM3ICvc / H3d / 9R37y3Z8RqqkiWCGIPfcM / / aTf + PA \ nnz7B + tnlRLo2s3HjPaTSJ1FVQTw6hldRUEUhiuKiv6uLKvUk6ugpwu4qyrxeohV3I5R + vN4Qv / nd \ nk1x91VUUFZmYtkXH6e1Mn7WYh / 9wkqaWblrnzuZzP27ib2 + xaKr / l4vioX / p58 / K88k4nxTzX / Pz \ nvBKZiwyLTES5nJcOjGvY + ZCKQMl5hiLrkWan7ZB1WOWFwyPzpBFgPDrHcRwUVYzfM56uXNinfIOS \ nDyfPS89fZzifTPP5yBG5BUH1 / OKyUSlyPJ8QGU / 2 / 012mUB + X3ORKhPf02SZJ2uw8gJX8ts7 / t5h \ n0jUnL0Imcz2TL6eDawqoWcORNrML1mpGNsnMhGyEUElZNjgT7fvgNYte9dm + KB76ln73phM7XqTa \ n7mb5W99P39hBgpVrcNIOpUWVBGsaCZaV0HW8jZnrNmAmUugJg4iTQFU0zhx7jlR4DCud5vApN12H \ n9 + BSJDUNGpetbOLA6Tbqp0 / HPvMSZ0d7MT1FeJsaua7JRX9vD6VVe6mtvBlR2sC8OSHOni5j5Zp + \ n2ju6eHRLL0VaAK81zImThzm + / 1c8s2 + IkoZK2vv76RuyWLh4EfGT27n5hmU8vnUv77txDksvv5T + \ n6UuJVjSjp6EsVEo46GYoHScRrMGpn03RzIWkTIfKpZcwPNLLnWuL8NWUo1fPRyy7DmX + HLRpZYx5 \ n3UTrbyHVMAu9P83nNt1FOtyNt2A53 / 3mI8xauITIWA8 / fWA7BU3LueyKVfgqmtEUGzPlRneF0dxp \ nqroGqagv4vmd + xir + QDP7Bnl3755jCJrmOnr341hwsmtf + Cl / / wiZc3zOZMIk0x2UV5Yj7bqShx7 \ nCLeRgsIWprcuY9m1Kzhz4BAhvZsyrRSlxKJ69iyiJ06ihE2iVpLBvd3ULF4PiU7eeqXBNz7 / Scrq \ nlnP9ogiFJWUEXKDrScb6uggWNqIpIRTpRfGF8ES3IcPniFkqRZpEafkMbk8Kd8DD8NAos1rn4XW7 \ nQdoY9giWrbNz73FuvuZ2HJeG0beXYpdB2IIZ0669KB76C4fbN3Ge5weTiS8Xcnd + uiJB5AhRyXhl \ n + WSuZhcZc57gJGlHZO7JeY + 5a0rudpGJ1hiXEbKQuY9ZDz3jYWogrPHrEpnxNHPlj / cn53WKfGf8 \ ngtkFQkEqYlL7FEUZH6P8e2Q2j4KaJcBX98ZlpkdZz10gFBVFMGl8nTyp5MKZwMRM59X / 8oyoEOPf \ nz / j4I1CylSjCwkGgCAuJRFVcqHaSmpCPiCWxgQLNBmHjlmCpHiQ2mjBZXO6hNzURoigUgUdRcKRE \ nYoNQQQhUHC5prn7VZ / uiEPq / / / ZXmyqX3oC7 / Qgne2MY068gfHwvpNIEWpvRz / USO3kc3Uly6vBe \ nRHqQsfAA0 + cuwkiZGLbKuTN9LL98I5 / + wkae3BumYlYrSRniZHuC5uXLWFacYt / zTzEajZDCy / ve \ ndZQbrl4Mgdlo + lo8NV7Gkpcza8GdHDl4N / Oa1tK6eDX3 / / JHROQNpJNp1HCSHV3dRNMBInEfG + bP \ nQHcEpwfa6e3upytaQLx7AM / CdWw7PIJfN5nl0xjZ8ScS3iLMRILC2iZaVy + iu6 + fwuFtLL1kBt3t \ n + 2lYvYb + Xonp8jDQ3UPzqnqumuVlSdkpGmJ + 7lwD / pE9zJ0b4b7NfXQdtihsCvPC47tQYnHca1YT \ nPdnB6c2bmdE4jZeeeJgZBX5ieFm + aC3z1y3n6U43O59qZ2Dnk + x9ehfpkukYjU28belqXnjwc5zb \ neZD6xeuYMXMVtoTeHc9QOfcy9p8 + ztLFqxgy / IyFpqH0tdE8o4WtO / dT4hgozQsoFG68WgNpuwzd \ nK1nUWol7wRL6vIKTj / ycy + / 6CLGzZ9n0tX + l4 / Ru6qZ5GDnVSUlpKYMDXTQ2zSIVE7i9pQhtkJHD \ nv4WxTiwEQkmS1mG0ZD4uvRepVeEKFuAxO3EXVaHaUYQnxVg / zJnZyIlRF7On11NQug5Leimvq6Q4 \ ncOnFkVwOd2yCzPT8taSFfIwTlCryolwmyxxCiEz6K3jz55c5KT1PolDE5DrzZYDMNSVrcAwURSMn \ nb + Qbn4wsoOQXNP4yWaLIJ + oMmZ / fXuUCSWWC8B0mxuLVxu8VrzHZS88YtdeSeM5r0wWGlvHF0 / PH \ nQQiBikRF8tZ5xfgUQY3XZE7IYZrfIuR1WDu3ikLVpMorWTXNx5zaIA1BiceM4cZieV2AGo9NWWmA \ napdJT0TnshqNBq9OKjaG24zhAWaVCKo8Bsm0SeuMaW8sQr93X8sm1R2j7eRpZuojDPWNEVy2kWQ6 \ ngRjsx1OkEtc07PAYdTW19A4M4HcrGELQ2zdC3NC59p2XMxweoe / YGKcPHWS4pxOv103MNDm + 7QXO \ nJtMMtu2g1B3AqKnknoUD9MQ0SsQISuF2avWTFA5swT32BNOmX0Ys1ov73C6eX / MVPE / 8in5ZyXCF \ nxBotJtreQXpsJ6eP7qQ97aNOCBRXMcPRFC1XvoX4mMGKZa0MDid5uesIyWAx9atbab1sFpVzFxL1 \ nQmVFiOhokjNxKAo10n9igIAvSO9QDMNdxtzmBp7 / 4wm2PiE4bKUomXMZD / 7hOHv3B2leBKuunMm3 \ nvvgAItjKqg0DjO5qY3ZTkKjwsuvx37L + zg + iti6hsbmGHQc7SA6m + cy75 / DCtqOE1m8kbbuotW1i \ nA6MocRV360pMHBoK4NCzPya0YC2jkT5q61sp8vTgc8 / BR5QWJ8HQiW2MBuuJxVOsXtqM4fLQdewM \ nSnqMd9w1g2TBdVx1xSJ2GL1ouk6odCaVBQMEPXv5xaN1fOn2BAeO7WfRgtmUhkpw7DS2LvAXzURo \ nGpEzJ6ms1fB5vLg1H5a0SMhCamatx0nquEpKUBUbNdaBcDcgzEEsx6Kt61Fs22H7fklD2Rhxq42q \ n0gGGzArKgxeH0F880rFpnJjIeo75Xl4Wr0Qgk4hnXJ9WskSrkNHdmUTy8MpEM16XyIYaZskdspKB \ nokx489l0PRUlGR0Dw8DQk7g9XqSd8Q4z9SsT8R5CgJDjnrfiyHEPPqvFjNchFZFZKEWZNBYyU3Em \ nD3ll51qaq + oVxvlVjeP5BzLmzQxkTjUab + eFRmUCcryt + WOde69KBUWRCKFxXWuQYFEBhW4F1Uzi \ n9Sg4poVjW0TGIpmybQuvzwVIpO0wFIlj6CZtPSMMx3S6B0aJxw3mlavEUgaDkSS6BR5VgrQYGY0w \ nEJfoZppFs2e8sQj9jy88s6nLKKIikqKv6wxVV9yO3zHwDA4xd8EcDm5 / nNhwGLuwlDKvB395NYWt \ nlxMItWDRxbJVKzm + cxBRXUpF7XTOHDiAR + 8laurULl2H293NdEVgnXserxngXR + 6i + tubGVff5Bl \ nhY9TVvVZtOQAmt1DMpGkIOTDTMaJB8J0xq5l27k4ZrgLoZZTUzhCVNoUe1ooqoigxWMorgICDaX4 \ nQpXYnR2UF3bTK1SsMY3quXOpXDkbPaKQ6k8xdPIABWHJwecPQv8 + QkmJf2Q72shJ3npFHeX + UjYs \ nb + HAEz / jphuW8IGPXsvcwghlcpS / / / ByoonDfOqOa / jUv + 3kkhU1fPjWGaxctppw5ULcZRFuXtXE \ nsz0Wl141m / 79T9Kx5XEaq6Zx7uw5ntlxFldJGZUxg + blK0j3nGPe7Aae3 / o0zkg75UVFHGnvxdWx \ njWR / itk3 / 0 / cvQeY9oHPECDOWH8vwz2Cxis2MBY2uGvT7YwFi3AO91G6aBldex7k0Ev7obCBLZtf \ npKa + HHQ3Ic9JQh6ochey5flR1pU / RUN9hJBaRIFfJRAIoqpepFNKKt2GM7CDaMcBjIQfy6ujGEns \ ndBirYhnYETzuIvR0Apdajgh4ifV3Ew53UehbSrAqzJI5ZSRlOSeOK0yvKGdv2ylaat92kQj93KZx \ ngs0SWD5ycgDZiBHI95bJkIyYWATL5Ruf / r + K13o + 8iWDDJlPkJ1QJhsSx7bRkzHsaAyhSAL + AD5F \ nQ3Wp2JaNUNRMP8a94PHeoElQkmNoiouUbaCpGghl8kJvzkuHjFESF64rkNevfI16cn2vjYxRnEz2 \ n8jxSvtAAXBh6eUG5k8Y0069mb4JldS4qPSmKq6uRlk14oA + PCpad2QEaTemE42lGwlG8bg0jnSaV \ n0kmmHBzLRrctVEVFUwWa0JCqRJo6plTQTUlLpY + aYj8VBW7KfAq2ZWCZ0PoahH5Rwhb3vLgbz8jT \ nxFa / l1D3EYa6zlLXMp + kpxC9qAGtuAkPaTweyUC0h7KCIgI9R + hp28k5O8iNG + 8hHhEcPrKft799 \ nJTvbrqCirhpjZIjeIy + hlBZyzdsD / GSLl7g / zdPHNW7ufZElFTYn2w1WeB5nLNWJ3H + awsuW0D46 \ nyLFogqBex90zE + xqqmXmhmWcfeIMI8E4Y11HGIwqlA7rKOX1lLTM4ez23ay6Zj6RxiZSejXp3n70 \ nlgALVsxjdF8HNfpx9p8s5R8 + 0kyL / Qgr71nD938Z5dor4xT4NrD37FkamyrZtauNwd5ONj / 4Mdra \ n29DYQiLQzvoN1xOTAToOGHzJPcjSKzdy29WzUHp20FM6h86Hn2RfRzfz / rmcb33xRo4 + / huKZ76X \ n4LIBbphbwoM70pSnbCw7QSxu4SpxsfuF3fzTFUGeMTqprdvI4cOHuPSm9zKweD031RtsaYtRvPAG \ nrP526uZV8 / T + cxRe4kVV2rj0zjsIxA9ydufLuItrGA4n2PD1B + jYvJmSeQ24QyqhwlL6Uz3cuvZD \ ntB97kIbZ87jnijRrN66iq8cmxTFUTxN6tB / DVUNKj1Pg9hAqKiKl + 0mKUWTMhSsVJyQ8SKUcqcZJ \ njA7jDvhxnKOozkL8pdX4FY14tB + fexaKD + LnduGqWQ2 + GkasVzo2 / vWBy0qA5kFmoxNsxYPAye5E \ ntLOkkNWkX4V0Jr0qkNlWn / U883XyHPJD47Jb19VxNSWzKKoKhczBAbndktm4ZttCmGk8QqIrKgWK \ nTbnPotgrUFxpkpaLc4MDxE2BFgihuTQ0l4IhFXyOhWMbaB4PmmrjUlwYjoWQDn5FwXIEulRRUDIb \ nl0RmJ6RzHncKVIQqkdLJHGlgaQjFniyd5Ej3vB1Gk4yDktmVmg9FeW1zkIv2yWyeys + be59P9gK3 \ nsHHjMLO2gGDQh9 / vZbirC8txCLoFuq4TTZhYKAyOGCgesKQgmTSoaShjaCQCwkZVwe9yoZHG6 / MR \ n8HrpGowwmhb4vBZLm0K4XC5SqRSmZeEICPldTC9 + 7SCWi + Khf + 9A96aiY13EQsNMm3UFg4f + yOBY \ nCtMyGe5vp6yogo7OdhxPAK / mQmWQwNoNhGKC2WIB / + vf57Jz / yiJ0bM8dd8DzKqpYPDUIfr37WVO \ naQW9ZwY5 / vJevCEbr6zC5emjSu6hxbuAsfQRMJdS7I3irQ2hjcX54wmF0 + 02d64SrPvqyziHg2x + \ n / LeMqCmm1xfhs / v4xVfez + + PqrijXWjhblLeMaLhRkqn1xJQXaQrCynT / IS7Bhg6fZD9p2r4yHtH \ nOH5G8ph3I3t6TdRzf + LapdfgDw1QqiTZf + os0imh35JoxYt5YUc7v3lyO1devozqYj + eeAG3v + Mt \ nLHa9xPxmm48 / kuTUc6e5rPgg92xYQMHKVn601ebBx09w48YFxA9s5oefvJO + jkE2rCrnSNpLqHUu \ nO + 9 / kJK + Xgb1MFv3m9z3vb / nZz / 6P1z / 5XtZF9vPwLBOnzPMnmd + ztl4nKvm + 1iiufjBR5t4e7PO \ nV381wJKkDr / DAAAgAElEQVRra7ml / hTLrruVX / UXcevseu5YHWT / QAhL8TH / ilZ2PrANq38UPRIh \ nPbyQlYFHeWCfm9vWSwrKApQUlxHvHkERaWTaxh904fZI5OApfDVFSMuNMCUFjhdNkTily7HMBC63 \ nD1MOoxkFRPpP4y + rRBlpR6tUSMVtXvzaw9SuuIy5RV10DmkMdWxh7uy7LoqHfmjvwU0 + abKwxoeR \ nTFKqpAi6bEZ0iTE2hjTTpONRpHRwax6EOiF9CCEQknEP / XyP8sKzX0AV + XKLzBCYkDSEVK6eW0FT \ nVTEFMsXlM4uodqcYiJpUBxVMI52NQ1fxuDQCHpXpJQoza4J43So + j0JMV1FdGpajEIknsEwDj0vF \ nJ2xi0SR + TDyahiogJTxIqeBRJX7VBqEgskTuyKy0IQEklmKjyeyip5KRlVRs3NgsLJI0FAj60iKz \ npX984TWDSTMURWYidsSEPDIhoWR1 / dfyvIUYX2jOGdac5j6xOAsZ2StzDs / 8UsGSWhd6OkEqmUQ6 \ nFnoyTTgcwacJRiJJEimDsWiSeNrMeOO2w7SKII5pEvT7kbZNbVUR5UVeyosDCMNBt3RSpkl5QKO1 \ nrgif14tlmliWiW4ZGIaFYRgU + D0UVjW8sSSXSExsOjcYxjk5hHnlrSi9QxR4dJyEhpwxn7BuMLcm \ nSLztMG5PBbJgGlbHYbpGO + krjPHQlih9J45RWNHEZXe9jT1P7qektITaefNpD48wa / kibr2siWdf \ nfhFDJDmZnsaG5Sux9f2E3GMEW24nNbafkVQPnf1VLFxzNQ2 + 4wQq53GwZz37ezsIltTjKijhmpYi \ ndhzr5LcvxWHwRVZctQg5fTGuiibK55YTHhtBWAbBGbWcGuqh3A2XtxTR3Twdd7CURXM17qjqZZn2 \ na + 689jIGh8 / wxJNPElbeipEq5OX + Ikb7j7NxhkVZaTk9Y0VsWFiBovbjcaUABdtXzI8eG6Jo8BTB \ nabM5MJwm6dYIxSXvnzPAlcsuYShQxZ8e3U1 / opfilgDd2 / dw / dpyIobD4YEgo0ObKa5egRM8y46X \ n41QUl3PgVC + / e + h + qj1eBs5ZlC + 4lM / 8w0amqb / kTHw79x + 9nN / 89GE + 8f75uGIj7O1q5NShx5lf \ nt55ryp / js5 / fxVhBET7dQjNHGUroNJYHCM2ZDrHHePZkJ55UE3XlA / jdXYS0eqRiooog4fhRCosv \ nQSga8Ug3ette3AUSt9mHgYpaWESy5xkKm28kZfuwEwlcBWlUbBIJG9PvRhttxzTOkpImRc0rEKFq \ nFI9kRpEHX9HFiXI5cOTEpqKiQkZiKcZ0k87RJMORGE4qBdIGO3NIlOOANxAcJ / Qccotv4zHNvPpi \ nXm6xbpK8oiiUKA7Xr6zH49VQjDhBt6R7YIBwGlQjRsBtUeETxId6mVsbooAkXhVShoXiWPg9Gj63 \ nhoc0aSP7DNoWqbSJbTmMRKII2yCa0PEFA9iOBLcHVSigqliOwBJudEVBlQouaWNnt / ILM06jK0lT \ nkUptQGPpNB / NBWl6wynSip + KoEJpyEeFK0VPUhsflPE + TpKcmDQ + ufHLh3yNMczll + K8dBhfxFXI \ n2hwJq6tSVBX5SCVjeDxedF0nkUgDFkIKEkmTsaSJ5UA8bWA7AlNKFjcW4NIUVCUTllhaHsLjCaBp \ nKtKy8ftUXAqU + FTKi / 14PAqOtEinDRLJFKqUqIrAcRx006Ky / tUll4tyHvr2wxbTGlVuuUnj2 + t3 \ nUrVkDkZvJ9FEJ9qR37NgRiPDdgkL3 / NBbJGk / 8xmvvC5D9HSXIw / pRLe9wJlriTho8 / xu09 / kdZZ \ nQWa0FlM5vZ7auU20H + viP378LBHDIT3ay6yGOoaXvRe853j4xUZ8pz9NIN1BpD1FddFu / vSHDlKl \ nCjd9v4zD7X1UzVzDSF8HxULlZ7 / 7DTTfzsP3zsU0JDs6SznS20VJbQXgoXzZIuJz6jC7OigaHiZV \ nWkpHpJNrO2 / g / rec5u7aIeYXRlg09zr + 8cv / QtRbSZddzC8e3s1LJ1WmJz1cu66RL371P3npmSMs \ nu6IMXyDMU20jfOynQzy5J0V7l8GGq + vpPdxBeMhNlWpwJDyNH + 2O8OPjhaQCPo488R2 + 9pWbuW7d \ nW1je0MAtt1XSUK7xyBe / xRf / roaWpe9l2eJy5tVcRWNlHYcP7aGo7yTzrnw7vQd3csvd81l0yzqa \ nCgXNoU7ufstHWVf0r / zwvk9xJjzEhukKD334Gm5YsYA1LZ2MjHYw / 32LUYe7iQUMXth3CsYGsIIz \ nuHTNPBytkUfvvZH5jX / HjBn91Hjc + AsLEWoKR8QprVyA5hlDsSRq5TxMSyE1lMK2AmjOCFJPIVIR \ nEi9 / gWCBjmkkUGQjhqjCp0WwIh24S3x4okNEdoUZNVL09p0jMXaI + 5 / ZdzEeawCkojAaiaGoGooQ \ nBF0qLqGhCcC2sB0dhIWQNqnYCEZkGDsZQ7EshKmjG0lskd2VyYRn + 2qfM / JNZiehW3iQmuSGFY2o \ nHi + KZaEJh6ICL7F4guHhEfw + D5pjo + gGy2Y3EA5HsKTA1FMIYZEyDFyqwKu5cLk9uBRQhYNPU6kK \ nqsQTSRxT0DytgvICFwErhm07WMk40khQQpwSNYUqdQJ2nELiIG0UIVExCLkUakt8lAVd + FWdrt5B \ nRhM21V4HV3qUs0M6QS1NadBLAAtQJu2EtRUHhINUbFAcchQ + cb6MzP7lNkvJLPHnyVaMr4kix + 1p \ n5gwVFbIHP2byK8IhpOpUeC3KiwswknE8bje2pYMjsU2L4dEEScNiJJYgkUyTSCSBTMihSXa2hYMQ \ nEp / Xg + ry4giHRCKOUI2M3KOBx6WiqRLbtkkmkyQSMRzbwnYsbMsExyKVfO3 / + 35RPPRvHzq4qWpk \ nmJ37Y + wrXIpTFqJq1lLS8VEKShoY6hwh1b8Ht1JGpKQJrwO / uv / XWNXLqW5o5tK3XMZpRaNu + Xpk \ nNMnpoShJTwmlJQFMO42uFqE4nWipQRoLK + gcLOUd7zvLv3zlnfzyvndx3f / o5cSQm3XX1nFoaAV2 \ n3Urm1H6Y / / zDUUZHQ9h9e3D5yglqEcSca1H1Hn7y + GEIGbzzb95CpFOw5trZPLf / IEpMYv3xUW5f \ nO4 + F9UGe / 9M + YumdmHYdvaeO0zs4wpGOGI9u2cJtH / g6P90fZMnSm9m4vICl9bBmwym6z1YS1RZz \ n9Ph2qgV4A3Eeefh5Zteu4XD3Xob3dfH9l7yoqsY9t / by1O9Pk4xs5WOXr + bBxwcI95dwOFLC4aM9 \ nPP3yKB59N4vq5zMwFGHLjsfpPOtlyfppHD0XpbmhgheffppQwIMiY5zatR3Pe2 / grZcuZFG5w2NP \ nPcC5l9q49jKLGQUefvOcDzPWQYW6n / prv4Iae4ktnQ3sLlnLp + afZBfr2f0fP2L1XbfRf / AEg6UG \ nL / 98B0Z9C7OCIzz10D7WrJpOVelMbKWPvt4zlIV86GGbtvZ9lFS2IghQ2FBFquc4mmqgKR4i4V6C \ nIR / 6qE68bzcFZZfgLmlEtSNEO / cRarkcefwhlHNJGpYu4w + 79rNmwduIpgr55rcO8653fPCieOij \ nnac26bpJPG1hmZmDndyaiktT0VQlc3ysbSEdB2kZqKqCSzjYqSRmKo6dSJGKRfD4fNnzqdRsxEzO \ nY5fjZJTzUG3VwatJ7rykhGWNPqSRRrFtHMfGNtMca + ujfdRi3rRC3IpEWjrV1YX43CoFfhflBX7c \ nqkQVFl63h2Rax + t1MxaNIlGxbRu3Ai5V4AgNR1pYjsRI67RMC9FYoiANHdVMUuBzoSdTuK0UWA6G \ nLUi73DiGjkyncEudcFRnJJpCSkHatBkKJ4kYYJkmHixmVvpAUYmN9iEdB1No2IoLjzRwOTouR1KG \ nQbWSRrEMdKFgC + 3CCJcsLowu4rzPeesWWWOqConbSXHd7EJqAlBf5JBOpXEpCooAXdcxDZNE2iRt \ n2MRSaRJJm5Rpk7YgZTjY0mHFjGI0RUFTVYLBAD6vF9XrRk8kUTDZdnCA4 + 3DqI6BT4PBwVFSqSSO \ nIzEMC9Oy0A2LlOGgGxam7VDfPPtVn + 2LslN05d + + KBMFgpsaRnhw6yE + / cWPcng4xdMf + S4j0kAd \ nfJYZ6z6BakU4cXA31ZdeyeCeP1EbMBk0G9AWLIRjf0QkHGbMX0sqEqF / aJTyVasY7IuQCg9htj1E \ nSaELGU5hLPoYqjhFZfVNFAXH6NIiTFerOBGJM3e + pOt4CPfxnZweS1JQqVIw / RLKBnZyJl5E75lO \ nmuq9 / PSXH + fwoXNs + t0Il66rRzFtHn / seT59fR1L5tr808 + KkeYA33pfOR / 5RYpLSnfw3uUB9m19 \ nnFs + dBc7TmqERxSei8ylvc + ks / Mw82dMJxHtYGZlgi / fVEkwpOE1R + mK6Ww / 3EdCXs2sSwQHTnax \ n88UWDu76Af7QGmzpJqHsYM1tn + ItZUf5 + 2 / voW5aKQ1UkmpZTFS4eZv / MabNLuV4Xy2Jc + 2kgiE + \ ntnEOX370ADte6KXQ1onGfcxuMDm0u4 / bP30LweTTrFqTYHbt9Vgd2yltfAfCpZG2juE2FRKpMizz \ nECf7dvPP36 / gvi8s4bb / HUFUVNC + 80XKFs / F6h1gxqLlFMysxnrmTyxZ + Ch3XLGImz + 4jy / / 3QhH \ nD / ZRVPRO3veBBkYHOyktqkBqGqatkhg6SUnvQyRMm6CqkhoNY3lNAt4CbBNslwkyiBKPIBUHrbIW \ nZbAUmluwZi7iaF81PQefpmGaw4KF9 / + 5wRH / pXjikYdlyhZEUw66I7GkRtqwUFUVKcGSDpZlYdmZ \ n352maaiqimVZqKpr / Kxsy3LwuFy4An48Hi / C60YhE / aWk1YgJ8843DynnLIyF0Y6TXQsQklpEUII \ nxqIJfr75CLolWNZYQGXARXV1KZZh0t4 / SnVpEQV + QeeAQSwZYyyq4w96saWCsHRcmgvdhrhuEU8Z \ nqJqX4USalCGZUxOkushFPKkT8LoI + nyk0jouTcF0BPF0mljaTXdCRxUKbkVS4pHopkTVNJTxoxk1 \ nTNvElBnD1VwRIuix8Qe8tPVE6YtLZKgUj62j2gYJBNIVRKoaEgVhGUhVRVHUC3Z75t7nv + bjla6p \ nCBShcdV0gdclGR2OU1iQCR01UmkA0ukkpukwHE2RNGxSaQtDtzAcgW7ZWI7AEQot1V4aygvxeFVc \ nLj + apjE2Nkaw0M9zO9swLRtFVWmp8ePVlOxzkDGilungSIllO8TTBqqq4khYs / HGV322L4qHPrLW \ ntWlbd5xdT7ez6hIvvvAOaF2D138Z125o4uipHmLPPMixsc1c2rCKU4MOBZetIZyyCCZPoVNGefF0 \ nxqpquGTmcs6cO4IlLTrjKuUFGknLT9OlS2g78iyFtk2y + hIKBvaQmLuWvQ / + C2qsGn + xD7VzjIHT \ nY5w9vouquQvpOXWc0iINa / N3Gai7hoVzGrnq / Vfw5M9 + yy + 39NGwfhH2qXN8652n + eH3TtLs7 + bI \ njA2ozGBYFONK6Jhjm / nkEov3XJOgorqI6QuWYSd78RfX8bXfxXnpqc1UVft45JPrubG6gzqPxTMv \ nlfDNrREe2Rwnni7iQ / ce5Om2Rbz9ykbu + sA36O + q5DPvruGzH1nCPdfO4cWnv8T8uo1sO3qO9vK5 \ npPxVuOw4zRsXo / 7hPt73AR9r5tbxze938a2P3sznf3WMjcvreeyITcXp53jqaDclDatorS1jy7at \ nfH7nd / jnr99PUO9iprBJeFcx1rmDUF0DIwffTaj + 0zhWA8FCH91d + 6kujBHTFrEj7CYWmMlYj8Qb \ n0vC4FIZjSepXzqBvbxvBG6vxzngrtcefp2zlWi6pG + H6q64lOO0QY3qSxsKl6HKAaP8 + th7oY1Zj \ nBdHOnbitGIqZwvH5CBYUkjI8aG4LK65jW2mSVgBHlhJ2 + Qgd7CZxxQdxJ46iedPYZU / iqaqkwnPr \ nRfHQ29tObUro2fBnFEwckALbMrM / ThvHcXCkg6a5UJTMjxjAdrLHu2bPdVIVBY / Xl4nQdnlAUdCU \ n7I7N8fh00BBMLxWcamvj0OkR + odjnO4e4WTHMJ39g9iOnxKPhakbLGquxDBM3C43hX4PHreKaUrO \ nDMQwdBNN01CUzDGuacNBUVQMW9IbNhlJGLhVNUPsAoIuiWHaGJbDWNJhNJagMKBSEHDh0VwI4TA0 \ nmiBlCRzLyHidpo0hJYZlYZgOhuVgmFYmeMWRqMIhHE9ybiiGYVogNGIpnUjKwKMqCMskGtdxjASq \ nP5SZuagaQigZ2SW3wJlH5poEMFGxkCKjy0sEqhSo0UGEZSLdXsBBlTITdil0nOgw0YROPBHHthxs \ nI00qbZJKpUjbknjSJG06pHQL07Yx7WxUjVTQTQuXJqgI + XGrFt39cWpqinHQ2LrvDMc6ouimiaZK \ nCtwQ9LhwDD0j0xg20YQOQmBYNqbjoBs2sZRFLJlmzvwFb6xF0Tvu / uamd96wluLqGRQvWUxk6zFe \ n2BXBVxPgqe / 9jo9 + + x62bHmRypiBbLqJjp33YR18iKrZb2FgrIAV1Q3Em + spqqjh6JkzjIRjzJ / T \ nSsirYXYdp6HcYvj4CbztR0lUFTJ3zlWIwhZ8ikpz83S08jJGu0axi4eZveFmOiM9vG9RJfu3PUOq \ ncQGtN95FWWsVx850s + W3W1l32zrm3bCO3b9vwzXyS / 7mUp0nRy + heNFKhMfP2NO / 5w7Xz1G0 / XQ1 \ n / QP37xnhtksq0A2VtlMHaTu3je3JpewZqGJW41wWzlnM1588wVOROjpEFWcHIqgFTdy94jBKyRpO \ n + WooEkm6071cctU86gZP85tn2vjxd39MyewSPvI3N / DcWT + dcR / e6BiFxCletJTDf9yO + daNPHvv \ nLzgbvIT / + NtVXLXxHVzz7mu4dsNK1s900V8 / HTuwhJGRLl7aup1q1xC7u2JcPX0Gy0LPsfLqm9FO \ nPUBhQzmKOobo6CdUWsbBfd + nunEdXT2d3PfbzSyuryaw6no2P3sAx3az6qaVjERjBJMmC5etYvjU \ nSWpneXno6w / SXbGSl3dHGB7uJx3bS13VWXrOvoXiipPgmo6qKLgsnbKqGQQbFxPtPkGBG + x4BIGN \ nCxPTNHB7AujJSg7sHaNllhv1hR6id15Kb / djVDW42fb043z7a9O5aoVKWekdF4XQu86e3lTgdhE3 \ nLPpiSUxd4vVouDQV3bSxnUwII0LgODLjrZtgWQ4SSULPTKsVZMYjQ2AYBqrUcbs8OLnFOjWjnSMc \ ngiJO97lujvZZjCbShNOSkWiScMJiNCVxdJtLm0KoqkZpUQC / 34XblfH2XR4XUtrsPTWK6diYjsCy \ nHAxTInBQhCClGxiWxKWCC0AoeN0uAu4M4dgOpNM6CVMwlrDRLYWgX2EkHCFhqFi2SbFHwTBBdxyU \ nbDSOY + fCOSWO42DbNrqVMRBpRyWdNkmkJY50sC0HLaslp0wHaTkkDB2v24WiuTKDnx1XmPC8HT2O \ nmYhAJIJLODjuAJA5bzwVi + JJjWEaKYSeQhWgmAYeK0FQSZOMJjHSabxKRv + OJ3SisTQx3SCZskim \ nLCzLzMhPpomUCqZp4nKrVBX7WTQthONIQsUlHOvu53jHKMc7hojGUpiWjiot3JpC0KNimhaWZZE2 \ nLFK6SUI3saUkmdJJGRYp3cZwIKkbLFi0 + I1F6IMVKzYNHdtFKiXZ9cxubv / IdVh / + hHa3IWUrqni \ nB3 / 7DdZ9 / B / p69NZt2iQ / fsPMnPGdSQP / whv5DgHlAZagm4K3CrDh3ZTWVRKbOQ0I6cPkrB0tLp5 \ n + FvXMnzsd / jx0a0rFM5fjaFJLFnN2tYYjfHPsenv7qD70H7GKmdg62186BNXs2heKedOdvHJ96 / n \ npeOjNFc7tC6bx / 4HHmKR79f8yyeu4cPb5jLiQGTzr5iunGP1pYtYvcRkwbQAs0rb + NvVJjEpoaCY \ nsB0i4C7mqf1NLHTFSPb0cartBH3tJ3ENnKFn206uaQ3QtbWd62 + 5nH / + 3lM0TqvkzOO / onb2Sg71 \ nFXLwzABX3LGUnfsTbHzrDVgDSd6 / UUd4Snn2uE1rSZhtP3mMaYuXc + iZXSy / + TZe2nuM9Y1h + s6c \ npGj2Sr7wbw9w8sXdtBSGeXrnMNqOAxQuXEW4owtj7jX / D3PvGWZnWa79 / 562 + vTek0nvlSSUQOhS \ nQhU7CqKCbguK / rf6qju6VXRbcKNbtw0FAQELEEoIEEhIQnpCepu06X3WmtWecpf3wzPg / rLfb / 8D \ n5zjmmJRjZrLWrJz3dZ / XWZA9p7jnBh8z08WOsV7irKLgejS1lZOPXMhwt0dtw3QiqTHyozkGBrpI \ nBAUCK03vaBN7n / 8jUy + + gpgo0D + qSJkZzq09zG + + OsKW3imQUSxrcVl6wfXUVSzHkE8hpEV1eQTb \ nbqWkzGHbGxupbWxl0GrEsC00HkVfo7RPxDQROka8pJnhbp / SBKjL7yLtHyRV + WEe3XExv19foHHO \ n5Zzfsouaho + / K4A + 1NWxJhl3GM7kMcwoGnCLPkEgUDqUsKHUxMrNQAiBLwKEFHhCooQCrYlGnAmw \ n99AoED6GUmCZOI41ob4IreeZ / gEGxn1830cIRSAkgZAIpdBSoS2DouuRijuUxxRO1MRxbDLjGfLp \ nPIPjeYbGAsY8OcHThmFRBqFKw5 / 4tQZcKZFaEbUNpPLQUuNLA2XaRC0IlGTc9SmPmBS8gEzRx0QR \ nsTUF3welsM2QWgmkCAs2tAzbhLRCKoU7caj5gcQTIoyN1Zps0SXnhrcZwzSQXoDnFjEtE0ObmIbG \ nzY8TcSyC3BhWeowgXyBwi0ilyBU8sqMjlFRU0H / 6NLY7jlQSQyo83yWfSZPP5Qk8Fzfv4boubiAY \ nHc + TLXjkiy6BULiuIF / 08AMR / t5X + AEUfJ + o4zClqZLKVIxI1KasIsau / d001ddw5HQ / ri / JeR6B \ nLxEyIPA8hFCMZnL4gSJbdBnI + qRzLumCxDQMXD / AcgzG83mUkixcvPSfC9A / 8LUn1yxvGqKtIkL + \ nbIzndm7jg / fczp / / 45ssvP2jxEqjTLl8FrlMCe0VNju2HGXRBRdwZqBIdUpTOPEyR0 / 0Uzl9KV3H \ n38IjzoxVNzASqaKibgrp7CDJkTMUujsIHJvlsxp56P4lfGrlWc46dXSMlPD6LsFL52bRNe0K3rO0 \ nyKpF09idBc9pp8to4C9PrKektJHec4pv3nyGT99Ux6UXzuc7G89Djmdxjz5CX8OdnHRLKGQ6mNl2 \ nHQXrEA / 8eRfD5kr6zAR / / v732HGumW5jNpmxADt7hpffeBnallFeX0td61xGjCirP38tN1zexvZd \ nZ4mUVGJaJnWzriD95npunJNndvNZdm8TDJklfPxT86m02 / jBX46w / KIy0kNlvH4ky313LeMP9 / + Y \ nedPm8NH3LuPlTW9R09DILTeu5ETHXsaHZvDjH7yP7zy2n / Mbkiz50uc5tf8YRnk5Q2 + dpKmxgb2j \ nWT54WR2VFYqdu3cye9YN + MVjlJcMkyxt5V / fMri + fpCtQ0e45rLJ3PeLfcTUOLHZVzLSJ / GysKA1 \ nzsYDh5hUVk33sa2c0Zdx + + Iu9trnceZcLZFiit8ciXPTyitJFhXdQ7t5af0WprW3M232LAIBlheB \ nmukQq6dftWJXzic25yIKNW3Yba00LphHdMrlHDmxh0BHqG0p4 / v3f5 / kYA8PfD1NU9V1WIkL3hVA \ n7z / TsWYwXcQ2NEPpPEJKTENhokArfB2m8NkT / 1FDukWjDAvDCOWMtm0jtSQSixK1TUzLCid2JTBM \ nTSyVIjc2QjGfJaINsrkMQoVNRkEQEAgV0jpKI1VI8 + SUgRASLQNyOY + eoTGSUZO8sth4ZJRxqQkC \ nhdaKQGmEkmht4foh3y8VBFqilcY2IObYYXmDYaOUwrIVUSRKgZCauGOghSQTOMRtzdB4SLkYYdQU \ nUiksKUMQlxMtnTr8O2WYICWBNMLnY8J0ZKGxHQstCVUjpkEAxBMxTBsCrSkODZNPZyjm8xSFQCgF \ nOqSzlArQGPiuj5fLo6TEMcAPBBEtCALFuJAEviQvFJ5QFF0frUKKqOgF + FoylvXJeX44MfuaQGq8 \ nIPzaWkmU8Cn6AV6g0YGkZzTD2YERTMNgLO9TDKAYhLeQIJCM5nyK0iDjKrrTRcY8E1coxqVFUyK8 \ ndWSKIVdfKCpWrFj2zwXom4OGNTgLOaL7iS1IEc8vZPPP7 + OKJcs59NettKyaz9zqSlKlJ9h + IsW0 \ nG28nk + 6k2HGWMaeMRMMiLr7tLnL5HPXt0yirbcCU4xzc + DLpjrdYPHMOHZ0dPPn0vax74lU6T / bS \ n / JElrNnQxkh3NfuPvMlDa6Zwx / l99G1 + hVTjfLACHD9OeXScgb5hxnSMy6b1861buhjrUjRWbeCL \ nT8zmk7dfxvmVO9g7tJxoSxOluSwfml7Bzre + Ta7u69x9 + 5XMqzN44PHnGJ30dY7 + ZT3HOhX5U8dw \ nrVaC6Ewml5ZiWQWC8hpEx0naZs7lW7 / ehSit5tjxM8RHCtRNjnLpFz / BnrMNDJxS3HirpmtvP797 \ nuI + W1WOMnD7O63sb + fo9lRw4kKa + so1L3n8FKauNJ17axBXvuY6 / / ufjtM9fzA2rpnDxtTN4 / z2 / \ n5cs3tBHMnc + JQ2fo7u6mtyegLnGOaFZxIlfDh993FQOHjzBgJhiLLaE00sqW / f0MK4MPzm7lz4dT \ nvLY / zQHvEo6 + 8RJ99dejchFqq3MYIkfm1G6O7zxF3lR09aYpjBp8 / U5JrhBl / c5 + PnzlADu6ZtFl \ n1lFvvkWyfDLTajTEbaLJVmwrT2l1NeneDqpqJ5NKllPethTXbCCRnIlhzyEbDOPLLUye1UJN9UVk \ n8z1cNDvKRz94JSo6mfk / XMW9V7W + K4C + cdu2NWlPk3AcMgUfX0iSUQctBY7toIRPxISJZlBs08Ay \ nwLIsIrYddk + YGsuywwldgRBBCGBaYwU + bmYcFYSTZcJUBFrj + QFFXxFIjZICrSRygq + XUqGkJleQ \ nDFiRsrEAACAASURBVKcLjOR9SiNRckWDYlFwesjDFyIEUyWRyiTi2ORdj0CICR5XoHW4rE1FTUwk \ nUmlMLdAyIGYaKGlS8CWB0riBBAzSBcGIqzFV6N41DDAm6tb + ZzdneACp0FCmFEKqMN9Fa0wDpBRh \ nlK6WGBP1bEqH4F / M5ikpLWHozNmwuk0EBFIihEAKgRIhnSGVoOj6jGWyBMIHQ2NriYnGx6SAheuC \ nF / j4ngtKhvSTEHiej4GN5wd4viQIwPMkQsiJwyI8UCzLQho2eV / ROZTh9GCB4bxCCI2PjeeFza5v \ nP15XQiGQFIVB3ldI08aYoKDKHE1JRJMuCMYL4c + 3KDQXX7j8nwvQf / / 4njU5nSHbu5P25isYFcNY \ nzdfSe2o3K + 6 + EfelA + wa7Keoq / jCgpc5fqgPf / 4qZl9 + BctXX0f17Gp6NvyNjgObGe8bJFpZQcPM \ nOZQ3T8XJH + DuW + EgpWwcn4f18l8ZTMDR5 / / M1374E + SkBF9fZfLvv + 7lZE8NSSfKK9szpAtVuPQx \ nHmvg + LFuFs52uP6ChXz7sWr + 5ZaAEwOLeP + 0jfzLz0fY5SwjJ1w + cGE1U + zjrD14giVXfoIFLTA / \ n4fGRL23k4IaDyK40xfFhcoMHGRgaQaeaiKkxKpqbWBrt59AZQYlpMr25mbPD / ZTFi6A7aVi8mr6j \ nQ + z921OMHH + a7rzk3L4RzlvdTn5HJ3tSM1hdPkxDcIqcNYPyEs2M + aX88htbOLXvh1TN / BB7x07h \ nxGrYuvZZth / eybrnjzLrghmIwRHWHTbxMorkpDbGXZfrP / QR8rKW + snT + M7j + / nI1TYb9g5wy5zN \ n / PKVLK2T45S2LWXd / n4 + vjxFTetRNvWex + 3TR0hHEtw8fTbD0TrmLGlhwG6hddJ0ug8fo75 + Ct1d \ nO8ipOq6f3cnOfAkbNyT4 + J2lPPbUNnacrGNe5W4qalYRKfTRlYmS8yWx9BClJcNkRwsYkTgjg2eo \ nrq7E83oJPJ + YNYpbbGG4b5j + UZeuzmPowjne6h7jzk0fZ5LK8NFLZ7wrgH7s8KE1SpgoFJZhEbMM \ nhJLYpoWHIh5xiDg28WiEZMTBsEyCiWobjWai6p1AyrB8WEqEFCihcEyIRsKQLss08IVPOl + kWJAU \ n / AAp5QTvTpjBYpj / sPhrTaDDJWcgFBgGpakIbuDTN + LiivDz5cQ0WvACpAwVFkhwbIOkY5CI2ERt \ nC6U1zgQPbhomed / Hl2CYJrZh4vmCtCvxMJBSYRkSy1Dv / Np8O87g7Y9aEOiQhooYCsO0CbQEbSLV \ nRF65miCqDFAKlAQpBKDwCgVMNCj1DyXRBJ0VHkoC1w9w / QDbjGBZNkqFy1hfGBQxKAahmkT4PqAI \ nfBFKTGXI6 / ueRyDD5yf8KEOnkJJ4Enyp8BWMF0Jp5ljeI1cM8ANBwfVxCy4agRYSy4CYFb5blhmW \ nXWhFKmaStKGu1KYi5ZDO5hkvSLxA4gsQSrNq5f8ePPeuZLk0Xt2K + 9JBLrjkY2w + O8B / vlfzmZ + P \ n8p / f / Tzzko9w + 4mltKaO0L11lO + 23UtJezf3znkFq + lDZKKNPLoxCddVc / XiGVRGAxqryji6f5T2 \ n + bXoad9grW7gqq9EUM / / hJeTBrObJnNgz3Hmq12sSAwzNJbjxOApbvn0zazI59nzp13MXtnGpo1j \ n0HWUGy9r55LSPEMnXuSHN4zyxK57ePShy2DxA8y + fDZTJ9kcer2LR3Z7tPV1ceWdX + E9VbtZ + 8wr \ n3PTHQezeM9z81d / w8k8 / RsQdxqhfRiLVTLx + KsNlmsljg2wzKxjrOU7rolt45Ce / 5Ztfv5J1vR6r \ n7 / wiN + k0XyzUkLrmXhoLvSSLfdz / o0c4c2qERXdfz9nHXqbh6a / Ss / lJ6kdOs / S8Ul56dCMjvMkb \ nL3yPVHwhI0O9 / OpMGa98 / yxp3UZt / DjTZiznI207OfTGdEYOd9C4oIEbzmvhm5 + 4n7YLrsWPlTBt \ n6FV + 2Hkvc1ZczKbTg9QsXcIr7hi3jWQo7TnH3wdKeH1oNTpzmv84EGXailvZnBvn4MHteImVXL6y \ njR984T9pa5jDvNZaWif7 / HVzkW1piz / eGae / ZiHf / / SLXPupC7j1YknJyWXsPtrD7CntVNknqa6o \ n4rFnR7j6Ro9YIUmyKkJZZQu73txG + + QmooksB3ZvoKahkfqpC + g9N8QFK1r5 + / oiG2oe4TvLf8LJ \ nbAew + t14aWNIRcSSeJ7G8xS2beMKi4tnlrH15CixSOjuHCtKIo5BtiDIT6hcNKFiBcLIkreVGlrL \ nkG + 3QYiwiCLwFWk3wPMFwtBYUr9zAJimGSIeYJm882damWSkR8yO0J336TvRT0UqGZp0JO + obSzL \ nCid7wwoNQY6NbZtghqBlW5pUxCIQAm2H / / K4aaEkRKLgGIKhvMLUFuV1NSBgfGSIQHiYE9Nn + Lj0 \ nO9 / LRKM0BEFANBnDEiLcm0gV2vAJFSRhFVv4NTQGSissTNx8ITwSpYEr / BCslUIoQCoM0ySYmPqL \ nvothgoNiHAPLMjAL4U6ixFRMbUxS9H0MqXEck5wXoFTo8jUtTSEIn6u3F7p21EZKia8NcsUCvtQI \ noYnaYbSu4zggJY6jMUxFIuqENJNlopUkatkIrcExaS6JkfUCyhM22VweVxoUA0GgAgJtouX / + / X3 \ nrkzoX3viwJq77lpO / 8GjdJ3OsrNYzZdvrcQYNbl7n0PVnhOke / eQGUtRl9zOBSsWccBtZ8XkKgJl \ nMTDSzYennmOu9zrBzj + RiBjUt5XR27ObocFGxkdf5Lkn3ySovBXj6Isc9 / pwSiexe / 3rDCdX0le5 \ nkpunu6yelmaguoVz + SZ2HTvCrNl16MFzXNAUcOjgLt7qHuBM0zWse / ZZFt7 + A0698jK6fjovPPYM \ nF924mlk1PvESm + 4XH2PHpjf54 + YYesefaJ6 / mn3P / AjGdzP3ptspxOYQjRWoG32M / / jyLfz0l6d5 \ n5MFrkWO7GBou0ucnOH1kE7ufOEJ2xXK2Pfkn7IWXkT45yKAfsGhSknUb9uIH7VQ0zKDkima + d89D \ ntNQcxGaM + uQHmd5yGjdfxfaNh6iYVMGTrw6ybGkvO15XjOfHOLFlN8vvupT0zmM8f3QUx6nk6PPP \ nsuHp17CFyfV33UxX9yC5iqWMv / gHgsXXUVqeYNzNMlrs482OkxwZXYVoiPLGyydoYDlVahelNFCb \ niLC8NM3s5oA3Bxw6nt1ARbKUvXvfYmDbfuZdOY2YU0Ow + L38bm0HXUEFyewAcxtriVYs4sKpIxQT \ nHmnmYxb7OX / aCXozZVQ3zKKQOctb2x6jrMmjt6eTgUId1bWzqGieQte5Hr72xyTrB2eya28V7H2A \ n8YolPPCf7Xz9jgvflQn95OFDa4SSeALGfUXelVQmowQohBegteJcVlP0 / AlFS4Bj2cjAn + iiDNUv \ nSgagFAYSC4OoBTE75LRzniCTc8OsD6nQQr4DkqZpYigZUjTod672UsowHGzCXWr6CsuEqAZD + IiJ \ nnN2IHU7YgbZAC2zDxNQh161kWG5cFjOIR0MTTiBNhAx55EAKCp7CDTQSC2GYOJEY6ZFRDCWwTVBS \ nYoR0P0rLd0DRnwAqa2JfEHMsAiFRaKwJikprNXFOGWRdH / / tg1BrfN / H9wMCEYBWWKaJnnjcSoJp \ nWqGzVmkiESiJ21gExKMRUokEyYhNuaNorUkRdSQx28IyFUoGlJfEsc3w9mNqE9fziNgW8aiD7Tj4 \ nwifrhQol1xfh5zgmSUeCaaOkwDRUWByiTdAC0zIpTTg0lEeJWlCZsEg5ConEROAWXHwJuaKYUBIp \ nfKFRWnPFqv / 9tf3uFFysfXKNzA2w86DmXP9RGjMmaw90EZ2Z4ItTjxOfbjPY8FHq2cV577keUTWN \ nfL / LM99az5TmDXyg / nX6UueRbVjMU6M3Qe00jp / u5dLZDURjijR1LDrvMhZOfobRPceYvXguZ8 + c \ nIpdVfOtnN3J + xU7 + 6 + wcDgzX8upgHHffy / zL1TXMm9VC55GjiNJmdlpxfnxrCw9vTpLur2evF2Xa \ nzFbG1v0X3 / hEG55qZ5Z5kqf + 7Xu85iyhZ1eBS9oEe0c0MaeM0cE3qV34bc6fF5BSii9 / 6VZer13B \ ns88cp60iyVduOcyk9pl8 + LI6jHGfSKMBLVGuqDTZckLiZscYVgOcOnqIy1ev4uS5AV5 + 5ks8 / tw2 \ n2hIZpgcO3cd7OOB8kMf / sJb / uG8Ff3yhhvU7Oik5 + jiBBdesmMrjGwZYNt8jW6jlZK6EzS8d5 + pr \ nVnH4aD / VjqRhXi2GjrN / RFEWNeg5 + BYlF70HeofZuGU / Yz15znQrcukIB1 / eyHhvOVdfXEsm049b \ nNY / mKZJcMImTZ4YZSNRzSdxipG0uVdpESZ / kpGa6juZ56cdneeTvFrmDRRYuLaGlxWR + 3U7u / z8 / \ nYPbqyxDHPHKjr5EthdHkTejxs5SYw5jxKZRMb + W5F9IsuuT9pJXk1AnBC7sOMZ5PctNl + 1iocjxv \ nns + + gVJOZ + bQWHced1 / 9v / cu / v / 5dujAnjVCgRIC09DUJA0qExHqymyGijbd434IVMpESo1h2iHH \ nTRhjq1UInqZpErMNYoYmYgniMRvHcSh4E6YkLSa4eIn8R180TKSKmxPZH4YOqQpthhOoaZrYBpi2 \ nJInN5JoINWUmKpBUpWwmVTqUxCxcEYZ3xSwT0wqVN74QYGrqklFitollaEpicTwZ4HkCT9tgaKQO \ nv7dUikIuj6EFlhGgAo1AIzRIIND / MAJZVqhbtywThY2vDRzbwkBjE1JHYaaLxvUFBU9gGgaO4yCC \ nYOLA0kQch2RpCdU1dcTiCSKRCAaaZDJBeXkZMUtTW19LeSpCQzxCIhUnZkdQQhBLRMkLSVAUiCCg \ nIBS2ZRNICAKbgDBOwDahJBUl4phEbRPHtLGMgAg + 5QmbZMQkGrOJWAYoSTxiUxozKYlBWdLBsC3i \ nDlhIHMfBNAhVPcpAi / Cx5QPFeNGn4IVKmmDiOVUarrr0on8uQDcmLVzz1NOD1K46n + y202RmKMZe \ n3cuh4SlsPJjnS6uOMHCiiHXddax79BSfvqqFXz2xkbL5F7HPbefy8z + EzP6Ky6qOcHuFyR3XfZqC \ nm2QsPo0dzz7B3fdcjYyUcnBLQHTkBPs3nUXG85SWVvHnXz / F7tFF / OCOpXzvvzqIHv7 / + N49n + Hh \ ng4O8sfk4V9xyE32DHnfXPMV7 / s9rSOMKIpNSjP70XpZmn + CCxTWc0Av57LLneeDJYd5KXgOvP8xY \ n9zmyJWXMvvHDnHr5YRZMquTCy + ex7uA47Z98H3 / d1EHuifv50mevYdHipewrNlAYPcXv3yqlrDrL \ nqvZDtK76LJNaqnjxT3 + lbfGFlDTP4KGvXMk3 / naMaGUjc2tGObr7DKNWFcsXpDg + Vk77itn84l8W \ n81okxtljAzTPWs6Vl8ZxZt1Kd2c1uw + e4EvXZ9nwZsChrRtxEyVkuoYYzhS4bPUq3EgffWcNfC9H \ n7 + kOZs2bwsipAayRUWZcupyReByRG6KhLEVKFpgru2maM53WhQtBF1i / fSO54gBTzlvAvu2D7Djw \ nKkvnzWDrniO4 + QJS5Bl3N / LY2mn87Vt5 / n56gPRoK68 + + wKfvKGCiy + twh + ZyR0PbCLdH6Oz8Uru \ n + + qzXHHpAoxIjvXPvMniORaDx0cY7HWZWTsEdXWUR9qZUzvIN1 + 9nNtunMHrW2bgJgrEzHb6j47w \ n5Q9OfXcAff / eNb6Q74C0Y0G64KGEZjAnCCYMRlpJ0BLbCnM + HNvEQJFwDGK2iW1I4o5BNGoSi0SI \ nR6OYBqSiFqUxm0Q8gjRD / bWJQcQ2iTpOqKVGEbVMoo5N1IGYYxIxw5x1E41jalKWhWMHxKIwmIWl \ n0 + uIR6NYBjRVJUhYNloGxG2DsoRDZcKhuSKOBZTGTBKRkIbxhU / UNPFVOKUrHapr3gZ0IRVKSbRQ \ n5IREaZA6BH20xjbDDPOICdGIFYZYGUZIFU1E5UpA / Y / 2pKLrY1smthNBCBEefrEYkUiEeCpJTUM9 \ nyXgU27aIRiOkUgls26SxtYnK + hpKUyVEinlsI6SiVCJJoqwEIxpBuAJXhLr7iG1gRyIopcn7PoHQ \ n + EKRitukYhEitkXECU1YMdsimYgSdUziEYeYY4XJlDELxw51928Hi1kmWBOxxkqK0PxkGhQKBdLF \ n0KTkBgpPqtAXoEDrt2mqf0JA33LgtTWRyVXcN3cH + 0o + xMHf / Ywpi2 / AHztFx / 43OFhYQNXCpaz / \ nywtcd9NlPHFwhMxYkfmtQ9SMzOJ4tMDz + 6eze + RSnjodwZpyIU5LC45ts7ze4 / RZQceRffz7Tf08 \ n / IPnmHJxHaO9BQpukVuumcknFm3kOz / eR3 / TdGqmXsffX3ydpfOnMbv6KF5iNouGt / KBn79F3fSf \ n4HvP07N1HxeVFGhpErRdcjFfWLWZi + 61WHlekU1v9lBz0xLac8cIBuo4 / MZfaF35Mb70ofP58aYh \ nzv / AB / nM9DHaas6wbd8QR842oc69waZ8nANd43z / uvnc + 5fD7H1tnAtWzuP5tR3kcx2M9psMeWkO \ nH + mjOllgxdIWzh2Ls + au8 / n9rnOc6t7JiSN5vvDeaYzYijde62Bha4K / Pvsw69ceYX71IIniAOOV \ nVbRW1HLgRJGRY13MnDOL2tYGYqZksG + US99 / E15 / BNPtoj / QeCODfOBD15OLVXJi / 346nlvPaM8I \ n4yOS9mWXMJKIcvV0k59 / 9gvEnOuBKjI9I5w + eJRs5jB + TQP7H36DqVfPZ8aUJoZck + rJk8n4Sdb2 \ nXstTnxsgHimwfWeUyLJ72NbZztNP5nj6e + e46pIL + e + HO3j4J + fxuW / 5PNGxiFsvn0ZbPMqtv2rg \ nkZc6qZr + Y4ZHI / zprz38at80TvSU8MfDUKSW6BnodU9w7Yp2blre9K4A + p7du9d4MlQ1iEAhlKLo \ nBhiGyZgnUYYV8qaGoLYkhVIC27ExDU3ShljECgHZsYhMLDW9QOL5AY5th4XCE4qPCXMllgm2bYFW \ n2FZYLmFboUMy0CGPG486JGxoqYoTMzRN1XESMYeG6krwfSIRTTrtUpoyqauIU1lSQnkcSuIO5QmH \ nmvI48YiNZWoilkkqEaM85ZCIOQRKMpYPyBY9FAaBFEitEDKcxl0Brgg5cqFAqrDp3jQgZof8uFQh \ nZ25bBo5thhSSCpeRGhBS4fuhXt + 2HAoilEi + Y0pSCsOEiGORKk0RiUeJRyNE4wlKykopLS / Hsoww \ ns90fo8r0sAmQhkWsqpqe7j5ksUhZRQrL0NSUxalIxaksTVAedygriVMo5CkvSxK1NI5p4ntuqNTR \ nEsMKnafyfxxovpAEInwelNIowPcDYo5BbSKKNg2EUhT8gEzOxQ8kRV + TFwqpw2YjoZiQkPJOdMQ1 \ nl138zwXo317bs + bY3t3o5gv57Mqn2Gm8l9lVe + na2o + OpjBkCaIXbpiSZI + K4XsuS2ZN5sRAmqtb \ nJTtEKUvm1jEuevFGfa5e3kJDbZLWuiJTrriSpuwb6L4ztKUqeGntWrpdIBBIFUDGx5 / 0URK330vZ \ n4QN0BkXu + 8AUHn5kM88daePm1BFYsJCe + NWUHN + OUzWJdLKdNvlrbrjjboL0Ttprl7NgWS / zKmLM \ nnxvwwk96aa + PMNQ8h5lOglXTMmxxGrjqA7fw38v245klPPxGhDP7R7nhSs1hMYklK6sp / uUNbl4m \ nWLnqPcycOZdfvNDBz + 9aiKxfQG1DAquqkohw2Hciw5AvsGSOWOUIW149xqpLVlEda2Fyo83PfneM \ n + umTiNdEGM7VsfC6K / m3GyuZdt5F / Pbp17nio7eydd1W8qfPMDpSoGZyPYP7DrJ80Sw67RHGsnn0 \ n8AEuuPW9dO7r4PTefTQ2t3HyxBg5KZk1cxYtk1rYt / UNglQJRwOJnrYSInlGREBZaRV1peWsSu7j \ njW2nufbrH + LgbzYy89ZLGD5zhNrUXOqbNNkC / HVXO5Xp7 + I0Xs2VDW / w8EPDpJXBV9dmeeJli3Ml \ n5az9ex1DxDGsPC1yPW8NXkjlBdO4fLZmUftzdBzYwUdW1 / DMc13MO28pUxujXDZdsvXIcQb2HSV3 \ n8hif / / hV7wqg79uzc40vJEpqAiXxPMI0QiOU9aWiUBMN0IZNTgdYhoGjIe7YIH38QITKFiEwMbAd \ nO5wEbQs9ESylCJ2Q4SpRI1WoyrDRGFqFXDwax7SoSlrh4VFqccm8OiIqYHJjCcvmttBWm6K1tpTK \ nKvBdCzsSQGBSWZ1CuTl8qSmNOYx7irK4jQw0WkEsFsU0NKVJk5KISdoVDKYLE3SQRGOFzletCGT4 \ n / vYS8e03pUIOP2KGC8ZcYJBy / hEBXBZ3cEU4yUul0EiEAF8plLbANIg40XcUPIZhkEgmqK2tIVVa \ nimOGunXDCbNuDENjGhZSuIiRccaLRbQdI1VRTVS7lNbWU1lRip0so8nwsE1JzNIkIiYxC7QUVCYi \ nlEZMIqaFVOHPTqpwBxB1LKQMwfdtQFdaEygjXFwLhSLcCRSLAiviMDyWo + h7uJ7El + H070 / EQwAE \ nKnTivj2dQ6jfv / byS / 65AH3t4e41J91x0sMz6D83wgNXnaOQn8sZ1c / AwVcYHElS0tbAn3ssassa \ nOPHSK6ycVMPHG3ppW1jNpv6DLO9 / nYf2xhnetIFtb5yj7dQvOVU + m95oJeV17Wx7fS8PPfgQjhJ0 \ njkmiqoBR2kSuv4TDlc3cef1yms8vobFhIW46oOTkOQb7nqfjwA6e2dPM6N4tqGlF6gr9JPf + lMIH \ ndzC38 + fcduv9xEeztE2 + nTPB8xw4cj63LH6B + vN / waYnfk66ezu95atou3Yl23 / xS9Y98xe2j2c4 \ naUxmyw8XsTbXzrxCBa3V7Sy9JEVNQwWV1ZOo7 / 0xL + cW4 + f3k / cdFi9agG3aZGM + 9dVVHHh9Ez / 7 \ nypX0d / Xy2pkin / 3YUn501x / Y1DXCdXdO4vqpg / QnllMlOrmgtZVJbZpktIxPLxds6HYYXvcD9g2W \ n8tMffZKXX9gMUcGeTa / gLF7FiUO9zKxexDM / / T3tH7qF / oOHSCNwezuJZD1q2 + bT33GWyromsBNU \ nBTMpZLvZ13WKsnSU / pEx8jmTbc / sQQwcwc8kufV9s9i7A2573zQi7hlG + stJ1SbJHN9BX + p9zFq8 \ nlN + 8dJjaGauoGd9OrLWNykkLMEeKXHTxLIpBHWP9LtuGG9luNaFpZ + 2f1vLcwdvpHJnC7zeNM3tK \ nO4OdB6loqOGZDRGchEN05grKG + bxmfe8OxP6rh3b / gflYqJRWE4UX8gwV1tJ0oGNZRjYyiSQIRds \ n6YBABmipMA2wTIOYYxPIcPFn2xP6ZK1CWaKUmCgMJYhbNo5hELEMkrGwIckxw4YbrcLFX0OZgxYW \ njmMxZ2YL0ViEeDKBYRr4OTc0H + XC5Vs + m6c / ncPAJJlwSDoaV6jQsaolU5pSSBHS2qZjsffkEL1p \ nj0CDkOApkBihtFIqpNLICUmiYYa3Dq01FuFz4vrhDSZuGzh2uAA2CB2lbhBqvV0 / TDKUGmzTIOY4 \ nlJQkSCXjpKJQnopTkoqTLEsRsUIAdCzNpJgkEuRJqCIpkcMbzyOkYNwVxBNxnCCHDBRRWSBGQNHz \ nkcE4hpJUppIYWiMDH1Nr4tHw9lQSN0nnQzcuaOLxBJ7rIlSYQmkSJkdKrVFS4voB3oQXQCkDT2rG \ n80V8ofGVSdEX + FKHhi4JgYSIHerTAxWmNprGBIeO5tor / skA / ZxjrJk2rZ4df9mMWrqYXz9bz96h \ nt / jVFyfT0XINrZPnsPXBfyV25iDWwpWUzZhFVzrJLx48wOYDUUqtJobNqXzj / eWoVJ6vXtjNox3L \ nOOuW0rl2A9Odl1hQUsWuLbuxbAujNEUq7mB6Hsov8rPvTObZfUeo9KYzvT7K / f / + Ohe + byGn7UU8 \ n9cPbWJj9E8s + ey9 + ukjqzX / jT0 / cxYnd + 3jfVZpE5UzyZx8iVrGYs73LWL2ij4L9OdZ8 / wGWzZ + P \ nXvQJvnKLokS08uPPTuMDH / 4c / / 6cz0emF3nueIzDB + NcfnMXv / 3ddmbWC767 + TTlRhOLptQi8qd5 \ n4L938s1vfYbX93VwSWKAzh5FZnSMcquE9rkLGDq6l2LtErJ9 + 1h9xzU0pBJ8 + KYr2bpxE37NXN57 \ nyXyKyXN0n1pHa9USDsTn8 / cHX2flvd9k03MvUjm3lT1bjuB4eSLAnOuuYeG8mXx + 5glea7yW0b0b \ naTAdTh05SaqknE989dNQZ9Cc66ObKLapWLYggchluP7GC1AJidVQS6F4jmRLI1PMcvr782zdeZq2 \ n8hi79x6jKXGEntZZxJxGmsuaOL13JyvOW0DGnIJ36C1yJQ63 / 8sqNj59gNqIy6dXb + C9cw7wbEcz \ nzS1T8AoB8dFeymMLEdntlI5lGN97GjdznKQh6TimWH7Tco6eGMJXLqsvSXH97MZ3BdB3vPnmGiFD \ nvbCS4T1ZaPGOvlxLQcTUGFpimTI03BgGlm1RLHigJdFoZGK5KMOJFQgUKMNAGwZaKUxTEzVNoo5B \ nxLKIRDRRK4LCw1SaqOOAChXuy2fWc / 7SqTQ219LU3khQdLGBQm6c3HiewZE86UyegidRCLwAbDtK \ nLGJTGjeor68g6oRXfsfU1NWWk0zYJFNx8sUi248P4akwTTJQEmUqYrYNSkxMsIpAhdOlwYQZScmJ \ nqFqN0ArP9akti2MaGlsKYlGHZNSid6SA0opMoBBSErVMWtrqmDGpjtkNFZRHJFPrUlSk4li2QzIm \ nqVQ + taZHqchjqABH + BQLRYYzLq5S2FpTGrdJGD4FYZIr + AwUDc4OZHHzRRK2ptR28It5asojmITg \ n3TOaJ533GPMUxXwh5N / R + EF4swoQiECSKwZ4yiBQmvFCuNT0hMDXYd + oSdi0JJXGEwqhNFJIfGXi \ nSxneujDJ5F2knKCclEZqTSAVN1x16T8XoHcOH15zgd7GpuAGbpgzyvCY5PC + PIX6GVTlR8kiI00w \ n4gAAIABJREFUaVl4KUO7XiT75gY4voOuQ4PUTLJJmlnqnM1kyi5j7MwxVq / QbH70BPWLltE8ZwrF \ n0kr6q2dx4MlHyXZ2oqNJpGPQWGKTyQbI4gjDk5fiVF7CJfMhYtdwMOuSOZvmD59sIGVl2NAZ8MBv \ nB + g9l2bcvpJenUEdepx4RRd19m7O9RkMpv + GUyp56eRBfvhkLZ2Ht3P61G7SY + MMTTmPPVvO8h / / \ n9k3u + + T7eK7X5IIpU8kMHGRZfR8P / khSOSlLdriAiq3k21dbDOkkP / rREzz30Jd59Lt / 5uVIA3cs \ nKuMPfzuOF8 / hZU2e3tCBZY7ROxywJHqOB5 / ZjBzMsbRWkqxbyLpX19HbZaCywzSYJuXVKbrHTdau \ nO8l9N3l02MvoLtqUZgKGR89Sogzi06egCnEeXN / B2JaXaK1twC0vZea8WRimzal8DhmL04fi3Jtb \ neN9sQa + s5PTRbvr6emirqaLjuUcxRrsonuvkwrtuZvD0KYpSUtE6i5Wzh3j + tTTFHpt4q0PnwCCT \ nEzHU6Bgv / f5BnJnN1M26kJ37xkg01jCGz8ZDy3h0XxmV7Q6Fo + dw + 0dIOKUM959hdCQGqSqqJkWI \ nzFhBNtlGROcYzI1hJjv515skD / 90Lfd97Pp3BdDf3Lp5jR / IierLcKoSWiECgaXDa / jbenGlNFqH \ nE6rneYCBxMQLJgohLIuIYeHrMBfFE5JCICgGEl + C60tcocgIiaFNohEoj0XxhE + gFLGYg5aS65Y3 \ nYpXXYsRKMO0Yjg1uNsPwUIbhsQLZQpjhIqQmErHJFsLAKUMUmdxWRzzhoPyAqGNRU57Ccmxc16Vv \ nKMuZ7ixnMz6GGSprEpZF1DCRMqDgSzwRglC4HFUTpcwQTPDEpmlioWkuTxJ3NLWlMYQI5ZoxU1Es \ neJxLu6BMUok4U6a20FZZhi5kqEtBWcKm6BZJWialMYuE9PClQguBbRpkigF9Y3lMw8AXKjQvCYlj \ nSHxtcS5TxPUhXywSMTRz6yIQBFimxkQxOl7k7GCOoazPYNYj6wpcN3inPSh0sUpyriDn + gTCxBOS \ noq8Yd31cL8AXEqE0RU / g + X6YwilDc1IxCAG9GAjyfph9nvPCryV0WHAllJ4AdJAKbn7PPxmg / 37f \ n8JpT6SiT8y9w7GQ5yUVzWdWU51TvCB37XZLNbXzjmgwHTpXw098tpRDN0CkrmDeznspmk8tWXcyx \ nvY9g12TpmnInJ48PsG / TCxSXXEBlbSXGmODww1 / HLvgYkRLMeJRYROONBsh8KZ / 9 / I24shO / 9Apc \ nkef40z / h / s + fz9GeM / zku99nW24Zp84OovrS9Ow7RP9OnwtvnsuM6vM5nZtPW6vF3R97htvuvpMZ \ nTTexduw4DfWLsP0kH7jrS5zd9SoLmi8iWt7AzddNYli0cfjxu3hsjwDX5oqKv1LbNp3h + KVs3Pgo \ nM8vjfOOBdVw83SPf2AhGGZteHGTQf4lA1vCR1fPoGc / SNG8e / aNweO3f + cq / Xk19aTt7TgjW3NnC \ ny0fHGO46zH2fuJXDz61jd1 + GdHIuLbEie3oULTXd / PSev + PpboJCF0NnuvjAfV / jXP9p6mc20r1 / \ nHw0Ll3Hsja307D / E2Ml9pEe3IpTBtz + 5kl8 / uJ54z3a8RauBFKOZAY4cOUnvmRHaly / BGTnF0ro8 \ nr3U3MnhuB9 / 91LW8 + tZhhntrqVq + kqFcAVlwefLzy3n8RD + bN75EZXoDTukqLGxaq5PUlY1hFRSk \ n05SMF8ifHeV0Zyd2voNEsB17eAstySOM9r9ASvVw56fuYPNbY0w6bzZHH / stzcURdg23k7pwOZ9Z \ n3v6uAPrObW + uCSaWWaapkELjiwCtQ / 03Krw + e0KgdGhff7s3TStQ2kBrMO0w + zpcfAoM00TqiSAs \ nxTs0RhBGxOAJTdYNGC0K8tJCSEVRgDQcVkwuQymBaQLCRRbz5NIZCl5ArhjmnYTxAiYFT + BLiWmZ \ nTG2qIWJLAl9Q9AQ9A + NoQ9I3nOfQ2TH2nuylMyNCzlhIlNC4QlKUgpwfZsLItxebEweZwdvqF4FA \ nI4WmKpUg5kCu4DGYCxjOhjsGCYwE4CmHWCpOaWmKtuoEDRHB2aFxqlNxypM2sYiFYQik71PwFGNu \ nQMaKMj4uwoRLwrKIMEZAgyEZKxh0pj0MpXE9DwIXE4HlZ0nFY / QMZ + lL + / RmfdLFgIwrKfphaQko \ nktEoGkFpPIahFUNZl5yrGHfDCFwhAnK + mIgXDqOChQrjgl2hyHuSvCco + qEr15NGqOfXGq2NCfFp \ n + G6aVhiVjIFhmNx09f9OubwrTtGBIxXYzYLq2Z / l2shaysvybEhewpdaO / jK32wK4ye59inJxVet \ n5Pf7ZyCm3cZHLwFVdNn61ik2DbRw9ce / w / Soy7b9B2iyT / F65zHaIjUEPacob28m2hDD6FKUYJA2 \ nBMPdPRRUOY1Vk5k6s5y / fOchxg8XoDLGbx78JZmeA9zxozw / e + / XuOfz38AyxxhruIK776rj53 / Y \ nQ1ffYlIzhnlx4zbG22v5yFe + QFPEY + fAKc6sSxMcWcfKz3yJv + 17mohqQvb9jTGWYBsxRk3NN / 7t \ nG0zfmSMonGb / jo9yaFcn5W0nmNF8JR / 5 + iZW3v0JZqw8ztHBaq69ppIHXl5PXc08nv7Lm6Raa9l9 \ n9CQXpBbi9hT5yn99FZ3sZ + kKg4fX + XSPepgzl / DJ + ZVs6i + y8tZaNu + fhDeqaZ0RoXnRZO7 / 7rN8 \ n7Ief4 / z5Jn2dfTz0q1fRTTUoO8orz71FQ9t8stLg4o99imM73mT6DJfP3fQeduw + zB3f3cCCy69i \ nyZzPsW3jei5dGcOLzSDne6xcdTEF2 + f0yTa6cpI37l / MojvW8p2Ht3PVpTPoNBswixJ / bJhEwzI + \ n + qP1TF / Vitq / iPGVF3HevKVkvQJH3 + xh1swl9PQ / x4VXXs1zf34Oaca56eILOZUpoqM22bhFeXQA \ nZZyiu3oK3 / vzCEFvF706y5Tr7sErr2Bk55tMMd6VlzUQpgCapomjNYZpYllh + 83bey1fTyQaKhNL \ ne9i2jZpwEyqpMK1woebJCafnxGMRKAKsie + ikRM1aQ6hIsQwjDBaV4WSOB8D2zRpSk64PVEYQQHf \ n8xD5Aq7rEkzot6VUDGU8KhLR0IBjajzPo + COE7UTAAykXY51jeGdk2S8CdWJspBKhg5GZYPhEygL \ nZAhKUk + ocfQ / 8smLEiwdFh5bsSiGBf2jWYYtyAoTEw / LjNLrB0jDIWZptOng + QHZ4Sx9AyP4pk1j \ naYKp9R59Ax7RqIllWeS9MDdGxlNobVIsiZMbHCOifSxtEHUc3Al1zGAmTcEFY0I5hJSkPU163IVR \ nAwyBxMKSAUoIpAzpFUuB6xapSTjh4RQIRnICN1C4gcRXCldMRBBLRfhjNEMjldKAiRQK0FjaRBgG \ nhmlhGuGi2Aybrd9Z9JqmSTQaRRjh70XR + 3 + + / t6VCf3ev7 + yRg + W8O2L / ps / nb4Ie3gL187aTWUy \ nwfRkH4 / 8eZwL2hvwmyysQFHs3s / VTT6HT + whPmUWZm0lR4fHOFysouCm6OvdQ9fWfSy69HoMJ42R \ n7yS3bjeRigSlwiETgYLfR7y0ibK4x8Ils5h19b8ypaWUY8Pws7 + e4KntPVwz5SC / / frvyAuLhvm3 \ n0HfqCIOjJTTcfROrl63k5fXP0nO6lLK5S5l / 0WK + + FIJR0drOfnCehrecxvTir8mWv9ZVt / Wwrxk \ nmq0ncty2ejav9maZXd / M4zsL9O84zK03LMKPT8VV1VjqLHNLR9l9ZIRLZhzmt8 + d5nT5Eq5dFOH1 \ nFw5TU9VKdHIttlNDT884Kmpy3XkRvvX9PcxauoCWeJbKlma0kAyPxTnQt4OWinYs4sxcWM2QWc25 \ nIztYtmIl5ZEMD / 7XOhoWzcJrnMnRPR3EIjmshhRB0EN6eIDW6nmM5oZwvBSPvXSQIcNhUvMUCoUi \ nrzzxBMZ4muHjFkbhGPNam9iyczstDc1AMzOaDvO7P5xh7qXXI / QxTp3NUJo6j8apJ3FSyxhPuFRX \ n1nJy4wnu / M51CMsm26PZtfk1qmY2MKV0mHRJLamKGnJnctglgi43gu33MTXayeGeIXzPIzN4lGtv \ nex9JnadsdiXdZwVOZjdzK3qpOv86Tm5 + nfs + cv67xKFvXqMNg7hj8X + Ze88oue4y3fe3Y + 3KqbM6 \ ntzqolbPUsiRbsuUcABsbY5MMmDRwYDiEM8MZDQPMDBzAMIbBg0kGYxvjiJNsS5ZlybKsHFuh1S11 \ nzt2Va + fzYZcM9wPnfrnnmlqrJa0qLalDrf9 + 9 / M + z + 9xbQdcC0XyUoVWyYNu2iDgHfiO63rWNNub \ naN3SyG6XJm / X9cIkliu882dBEJAlCUkQcfEuIk7JvicLl1JGIveuitNRGcASBVKzaSQBZAky2Twj \ nEzmyBYdUNofrSAyndGriCgICjmOTKxRxXBnTcJjOmAxN5rmQsTAchaDspVlt1 / t / BdezHYqC6E2j \ npVi + 5bj / D4QBgOvYGIKK4NhIouQRCgXQHQ / EJYiKZ / 1zXRzLwC4lUHG9OxMkiZUNlQSEIsWiQyig \ nkCvaZAoGE3kBVxKQNY1iroDlQNDvA486TMQnUjQdj + cuKzSX + aiMqAQCfhRFIhLwEQgESEYCxAJ + \ nsnmPT2PYJVqjbWE5niMlGhAYn82jKQqzuSKzeYOiLVC0LlkNXUzLY + cIoog / EECSpFKBiIQkySB5 \ nF6J3iqkB8J5TFAWfX0NRVVSfV8BtGSaObXPz / 2FCf1cOdHFo59a7Nt3Hd3 / bxHtvWcTv3hjnoQu3 \ nMj2bI8E5Pn / PMspSuzHSRT54U4yRsXIe / EM3h3SDap9Ll7WNM9kk3cfPok38jJmjg + hjvfzgO5v4 \ n4WN9XN8S4dgrZ0llh2lIxulN5wlXVKAZPq5b2cnJaAStfB7feLQXn55k8PUX8ekG586cJ + PAlXdt \ nITcwS + 2qzYz5k0zs3IE2 + kGGJ06Tv3wLZ372dR58IcjBN44hjQ9x + cbV9J49jE9N8qNvXM + vtp6j \ nfUuOpx54gP1DOXLM5zd / fJYpvYz / / O / XUvRH + fWTx5Dy09x2TScH0g3I2Um + dOsS9pzspMIZ5sOr \ nk / Se8rFv5DRKWQdxTeKuFSYdqyvpOTdEIdfJ5aurOXvkPPn6ZUz37mdnd5orOlcyIlTyxEsneWrH \ nDsr8lVRGGnj4vj9ytniBTu0yIu0xfGI90ao446MSt1U / TVdFGwfu + zrW5Ns010RYnAzy6fc7cOgo \ nhfRJTl + soHFBG5ZpM5M9S6Syle3bDhDyNzDT30coZPPm7hHUpMZnbyqy94yJKyWx5Qwr4 + cYzk3T \ nGGolIxiYfo2xsybZ82ME6supjiU48PRrhHy1ZPcfwZq0kaurCYyMMtbXTVmig4NClCvXbSQ2NsTo \ n6VP0vnmE + dGXeOs397E0sZpVm1axu3sWfcDHYvPb3H7Hp9 + VA33Prt1bLcfGtux3qsRsLnUveC1D \ nUqn70ipJLtalpiLB8yU7uFiuF / O2XOGdJKiLVPp3BFzHxRE9FO + l + mPxLwoeLNFlZV0YR3DQdYux \ njIVVKGAVTY72pigULc6PF0CWcUSJpoRCZSzIZMFhKlskZ8FswWYilaNvxmAyb + C6AkEZAqo3feoO \ nmI6LaZuIjoTpeHAqG3BczxXj4mA7licnlco9sqpEFTKOVGqzR8QVQCyxTSTJa2WS8S5AsaBKdcTH \ n / LokbUmNWFhEEwUQXbJFs9TjWUIUI2Lm85iWjSLJIMrIogCSTEE3CCsCc2I + ygIKIZ + M4NoeSE2E \ ngKriFwUkwUFwTFxEioaD5ZTCYCV6penAWKpIyhAYSHltSkVX8vYOgoQoSag + H5qm4fP5kOU / 3zFe \ nurh5B7uIqqrIsoxl6ciyhCBKqJoP1efDEfCq + iQJ23RwS23SN23 + G4v + f + VI1dYLyVv56BV5NiV2 \ nMNv6cb51 + RS / OTxDZ22KL / 7UJdC4mvWr29jx / fvo6gzwlTsrWLawnprqBTTPX81oKsv7LltEsb6L \ nU8 + 8gp4d4 / S2Aeo / + SVmDx3j9PGL5GZ7Uaw8OS2BFolhGTZnB / YyErqOzNFjnHpmGyOHXka2HaSG \ nJaxdeiNjM02c2P4mhYsnmJo8T3ntSipsi1f9R / nSlZfz6K8PM60tJOXqWIZAczzCG8f7ufp9nYxk \ na5nTFOXkqRPUxw3aNyxk3Yomdu8ZpW31lfjEGK8cfpuKUJ7uN3cxmvETSMrsGxtlYucOdp2X + Mod \ nCt / 99gV63CKCXMkNH1zP0IEsrpTgri1V7H / pEXYeMBnP7KbgLKFv9ijx1oWEe / fQUa + REydQB7 / G \ nyVQdN6 + 6mj3PHWXb9qP0Gw4Lkss5r5znjiU + Hn9lNyM7TzGRGmbWt4nZ6mY66l3a6 + uoLTvA / KYo \ nb2dXYF19I + rhF4mNPMpnvvQJ1KYE89fMYffLWartZ7nssvdx7NgpxowRKqILKQZn + NcPbOTElEqZ \ n3Y2sNPD47weo8L1BVujC52axsi7h / lGO9XdzYdfrDB07Tn1VI5nqANUL2uirDKMky + nxx / HPKaMw \ nlaZgFohQQNHCDPaeI5kbY6D3JOuv / AKvnxjh1MRZ7PA8fjj3X6jc8FVWLOh8Vw70115 / bauN6xEH \ nbU + fNhyxFA6yMEq + bNMR3gnFXJq64c + 99O47XZfCX7wmAn + WLxyhVHJcKsUQhD93aWqCjSZaDE7p \ nTGYsYj6FIxdnGE8VSedMUpaIaxt0VoeoiPjRFImhDPRPZnCVEILrhVls2Y9rWwhATPPSrIZtYbgS \ ngi + AYQvvJERN15NXBNtFcFxEFxzbu0D9pYwQs / wM9WwnkKz3tHWEUqzf48mIokjEJ9BRFWRjS5zO \ nqihh2UaVoKDrFPIOumViOi66ab3jdXcFkXzxkm5tkisUyWVyFPJF8vkiRd1AkUQkUcCnSBiGznge \ nspaLK2vIioRpmFiujS8aoq62ksa6CgpFHdsRUGSFUDhM2K + QiARpKA / RXFtJ3vEOZZ / P50X5S32v \ n8OfgkyiKBFWBaNiPK8ioqookSR4fRhTx + QMoPg1FVhBEsdRK5b0OoEgimqaCCNdt / Ou0xXflQP / T \ nnsNbaxNZJjNV + KtWIO / 4BXt6I9yzepSlNR3cumoBZ / c9zmPTc4nK7XRdUc3jRxaQSxV48 / gIZw8c \ npvfcCB + + rJ4TJw5zxxqb51 + aJls4SrTqDlpmXuTVExcouhk0v7e8cNQwlfEQG5fPZX2wm4cnO5kT \ nsMnVXkWkqpumaDvHhkYZPfkw8xcuY3DsPNFIGF9ApBhpodEKsKt / ikAwzfDbv6dcrcKYTdM3eZYV \ nCzo5sL / Ibz + pkrUk3j5YZMtVLdy8Zh7JWD1E45w8e4qAMcxwPsbU6CDTejnh4hRnJ1zCMvhmC0wM \ nTDF / y1K + + 6UtfP7Hj3PLbV0cOJQlo2YZ7 + / mud + dZmA8yN131OFvaGHATFNeXUb3sQHsRD3 + 0Bx6 \ nxme4MNlF1IILUzJrr5jL / j2H + PY / 38J5uZIG6zTD6WeI9u7ljuuv5IqrG3nf / AO05d / ghs0NvFy4 \ nHBbfwR9 / cJwrN85ya + w0k4VqZlZ8k / 07D9JReJLpdBPClmomRltYtqqWXquCG5ZY7Dt5lHWbP8X3 \ n / zTIR2r6yJVVECvTyUpVzFiXUTy / n / KKOJmL46gb6vivf1rEseAalEgUf8THgjXrGH / 7NLnjpxk8 \ nfpzFRhFZLjLXX8fwq / 9BqH4Fo0PThFvnEV26mt7wfOw5XSzcOIUqz + HOO9JctfoCG + aXIwf + OjP6 \ n / + bjtZ2vb7UtLwZvmB51zyw5PBzXeSfx50kuJU28pJVeSn + 6rpcqBC8J6iB6vzslgpVQ + sV2EFxP \ nj720dPQOEAvHEZhM6yW0bQHbBsOFomVj2DbZgo7tQLpoMzSV5eBADlPUiMYTGIaJIKtImg9FU0lW \ nlpNN5xBUjZwNBj6qm + spK49TXh6lLBmhsqKcYj6PZbklZowXdZdEERGPkiiJArIo8bXb29i57wRK \ ntAZRlECS8ckq0YCfuRUBOqs0NrZX0V7uI + BX0S2XrG6jGzaqJKFbpuccsj1pyltTesx0y3IwTQfD \ n8JqbXNvGsgws08XGJWNbFFGYSmfImgpZy8IRZAzHxnVA1jSq6ucQikWo89lMjIxi6AJ + n4xfkQlr \ nErGgSiKkEPbJnB5OlaQYB8GykSUHFJkyTaMsIFEd0 / AH / ET9KrWJIFPZPKJwiYNv4te8AxyhlCZ1 \ nveivJIggCO + gDXA8XHFVVYJ1y / 7GOkXvvuPBrfe8z + a7r6j87j8f4Yavf4U30i0sJMmevmF0q5s7 \ n1ley0Xme / kM / YrjsNnbueID9ow41rdVYZRVUtDbx4GuDdG1cgHgmz5vb95Onj3jocp5 + 9kc0JlSQ \ nNWKqgisq5IGW + nKqoxq / 2pYj270bNxfjk3cqDI + v4J7N53j6yXNUNKxkuHsnsq1TvWg1nTUqvf0Z \ n / IERho + coHDmOFUbP0Hv0DjN69YRUX103XgTk + 4B / M3NSKrEZF7FjdmsrEjy4gsvE4zHCLYv5ULP \ nOFcu0rl69WJ + dXA3l924Cb9Swd3v2chrb / eTGzhET06jrvo0R3cGuXC + nxWbGzj76i6cOpnsrI / s \ nVDeys5KmQACt / wwd0WZOj6bp6TlL4 + xuLr / 2Tnac6uXTVyn4Agl + 8tXvU9PWQWz5YkaPPc7ym + / k \ nkZ / 10 / zeX3Di2Ivsef5hPvKhj9Mx70rOT9cx2LOXLRVpvv7F1fRMlhNqb2Rtq4x + cR / D + RSHlS7C \ n + gDGa08QbF / BKy + 9SE1VK0cvDnNtRyPdZ3vofeMofaFFbH / 5MOnju7n7M5dzRWs5uw9NYcQrcfw2 \ n50Zk + s / bjA + YXNj + Ms6CTsqScYb9BvOu2sL06WPYzZUoTXMpqBUwrx1TKaLFKygaNr1jE7Q3xfn6 \ nDQrlqef58oojLFreTXP5t / nxwy / QteLdsS2 + vOP1rZbjNfw4goQriEgeLrC0vBTfWXZdYpU47xzE \ nnnb8l8 + 577Tt / Jnl4bFgvGnXcT0p5BKcyrY9hrinbds4thdMKegOBUP3plnTwK / KGDYUigXGMg5I \ nKpFYGNWvUlEdJ5aMEI7FSMRj + P0alTVlBEMqgUCISDRMJKChqT5kSSARixIOKcypqaSlsZzWlmpa \ nmqroaKtmXnstne21dLY30tFay4L2Rv7xa1 / lPavX0NA5D78WZE4yzKKGKM2VQZqSAeLhIIZj4yCR \ n0W1SmTxFC4I + CccyPbqi40XqbdtGlWVc2ytS9nYJHsfdFSh59gVs28UtgcOi0QCyL0ChaCH4NGpq \ nkkxP58gWbDJ5nYnpNJNjs / SNp8mYFo5hUNANr1UK0C3vTgRNQ8OhobqcsgDMa6 + hQoNEIEg8olIe \ nVQkCAdXCJwoIRp5QQCaiCIQUrwTFthyPXSOIuKaDqspIgkTeNDxLpyggCy6SLBIOabiWyYZVy / + 2 \ nDvSdp6a2PvlMN5P7dlK58C6qm8t567l + 3hj8I4Xym4g31fPvP7bwN29iZOkdjF0Q + Lv3dnPvojhz \ nhSJv7z1HOh9iSbnEsTNZcq5L7yt / wJDiFPpfRPMtYGryFOFYEGs6gxsuo3PRQqproux58k0ma + ZS \ nqck0d25m94jL8M5H2TK / k0df + CVVU6PY + UHCMZfMlMjp04cJTPTQMxVFqwijJ + rIXDzJZbffQSov \ nMNR9lvO7DlGoaaa64Tq2zFOYtlWYPkGsfSWqm0EXNS7m4eyxbj6 + RuLJbp1PX7GO7MQYzWvaGB + X \ nSPvC2BfP0VmW5 + GBlXQ1OlQtuYldf3iWmz + 0gf + xvopdx3ZSuXgxd39wCU + d7ef4iM0r + 09x + ceu \ np7F2CW / ve4sWdYZYyubb / 3WK / 3lzLeGbtpDN5jh6di / 33HYXP / 3of9C5tIHy1O + 59vbb6exYxD99 \ n8ct84M4P4YtF2LCwkURlO7nsGOvaVY52Z / njKwN88u6VKIkGvnRNNb / 90wVOviWgT + 7mlcf + laPD \ nEvmBHiakSTIXplDjCTZdu4FjJy7SddfX + Pn3 / o2EfB6xo46zU3mcZBVCwiCt1HDXPJ0xY4BKOUxF \ nQ5J0dpicEWDyzRMIEZFFUiOnzp1mZTZDPA5vv / g0H / jklSw69SC / + XaCOcJDLGoaJlJ9FxXKe5lI \ nH2H9mvko8rx35UDftmPXVsf17GVwqZmmdDC7YOMFRDzZpCSrlP6uN517bgj3kpzienF4Aa + N3nFs \ ncF1EPESui4BbqnArXR8QXAdJcsHxOkBFRNIFnbQOqYJFuugyYwjorkgwHKO + IkI0ohFLJAiHtdIt \ nv1jS7Z2SLO + gKCqBgEYw6PMOHllAUSTgErrXk0suSQWC6H2IogS4yLJEKj3L479 + iLw / QltbB / 6Q \ nRCTiR / P7cVwbXTdRBE + yQoCi5SCICqoMpmljlyLyjm3iIFIT1YhqAoJjUbQ9B4tpu15q0 / DKpY0S \ nq9yyHXRLJJvXqasrQ / Nr9A / PMDWbplCwcVwPbyw4FqprI9k2iuCFtCwcgj4ZwzSQZQnbBcOwqa4t \ nJ + CXCIQDzExk0ZGxLQNZcnFMm4Jtkjdcrx + 15L + 3LO / rypvegtW2vLJppwTucnGQJFAE0ESvXKQ8 \ nqhGLatTVJJjf2vG3daCfnk5t7T4xQHDFBpwZhWUdInue3EVd5P0k3nqAWzadoL1yLv + 4Z4CYC + 1V \ nCk / 2r + fJ3nqkqjpmBYOgFiMrVXJq11Msmn6To0fPI0oOM5ZL5 / wQ5sQIOVmhMRhj2CiQzWbJpmeZ \ nPneatJBgIh2hmM3z0g9X8tQumxfPXKSuaQun + 3ZT + 57v0zP0BoWCzsZbPoA7dxOZ7gNUt20hGp4A \ nN0tff5BwIUfIX6TpvVfR1lDF / kMDPPdSD6ubChihII89toPVKxex860BZiaHqK5byZqaLIFAkD / + \ n7nfsO3 + GjrXrUXv / QM + QRUGL0rv / DE1zC8wKVxCefJS3enWO / ekw2VCSnr4QSs0cxoZLwYKLAAAg \ nAElEQVSy7HrwRzz5s89x + aIChk / l4tGDXH7d9dSGq2ny9aPXNvP1Lz3JqePjSDOHUGtu4a3nH + He \ nz12Ge + 5hltWozKs1WDm / Cy3UT3a2n5 / siLBj25tsWJdk / bVbuTAyTENoguPWHH7 + 8iD / eks5v9w7 \ nyr / fsZgfHu7hHz / 7Eb75s21o8TiCJKDInYxPFhD1FL194zTV1uEoArFAJyf1ehw7hOTzE4 / WUlfc \ ny / j + kxzaN00obTCZmmHkxCgTQzNYA4f47L98hNHzk5yd7qOropVE4AHyVg2ZcCPf2jTNkgXHUPRh \ nLHKUV34BXRyj + + QrSOF6 + obGqa18dySXl159Y6sHVSpF3v / iw + HPy1FcSgvN0muuJwlI8I4WLiDg \ nio7X6uOKSII3zXm + ZM / T7TgeVtZ1HeRLsobkLQ0TYY3ysEZTZQJV8xMOasRCYaIhH2VBlbKQj5Ak \ n0lShYVowmy2gO6bnDJE8J3RMsrAtxztsBAcbEVH0Ep + CIOIKHhRLBBxR9vjtJUlJEmwcQSWXLyAI \ nArPTaUIBP2 + 8 + jJFQWD + smXIioKqaQQjQUIBPwYupmnhChJ5w8S0RBzBu9uQJRFJdNBkhYV1Ma8m \ nL1 / 0pBZX8JqJHJe8ZYNT4q0LYglqZWG7ApbrIMoydTVxJFWkkHcwbc + Db1qGd1fkeOlVE7w6O8fF \ ntsEsgdQsy / XQDo6LUSxgZPKkU1ks0yRbMFEEb4LP6zp53Su7Nm1P6jItMCwD3fayAx5gTAAu3UGI \ niLJMUFVQZU8398kisiwQ1DTGx2dYu + JvbEJ / 34d + ttXQRxi / CErDAAwewjIbmbKSxJYs55s / muaK \ nzWf5YttLxPt + Td9gO7NTAWaPy / SfOYXdvoxEPIIaVDj8m0OcDs7DHT5NJKAg + hRqsyK5gkkBcIbG \ nGQ6XMd13kro59Xzwox / l1e3Psf76SkSWcN9Db6MXG3jivhCP74uydNVypp7fRnnbKub66jmUCTP7 \ nwv1EfOcIpN7AbvkIgfh8qmNpwjVt + KJ1DJ8aov2yBeSIsWa5SMqwKZtzBWOHM1y5Js1Pf7WXxdct \ nZ9tPt3E0FOO2BTV8 / YkxPnXbbVym9bHt8Dibb9pCeWiE6UNHOHuwgLTgAiPZhVw7P85EupJs7ylW \ nb / Txhdu7 + M5 / + 2eu + 9KX + d5 / 7eDFP + gc3XaQyZODDAzW8euXjtEtNKFngkjxGlpqqplM7UIYmsOq \ nJWNcm36Z491ZjLoEn / rGMxxtuZMTD / + MT97YzPaTFufnNPOzp4 / xv77y9zxhLeWjm1p5 + DmHGxeP \ nct8royxafxMHn36ajlaFyy7rIDMwgrGwg4u9BfpHRtmweQVvvvA0yZZOuuIKR / v9LO3cQVXKoXfY \ n4YEvdvHU9uMI0SaWLZhD39AZpgq1CHUCn / vslRhqK8FoOYGqCZqWLeNLnSe5asEb3H31Oq5aco5P \ nb4ozcP4HdLTWkairJRat47HnH2J5 + 82cS1UxODvGxsULkMR3J1h0 + uThraYgerF / ShAtx6t8E0rN \ nO25JSJewUCQRVfS6NGsTEerLo8QCMpJtEwuoiLZNxK8hWl7DUVhTaKmK0FAexjBNAn6JsM9PUJVI \ nhHwkwn6SYY3KiB / N5yMeUTEdDzIlCAJm0QBJRMTE71cI + SRmDIec7hIOKMQ1FVkSmeuTqA1YhCUL \ nxdUxM1mMvI6dL6DZOlPTOYxcjsKsTjgg0xoQCbsm + UwWn1XE55iEBYsyyYLsDONTaabSOtNTGXa9 \ n / CdQfdTWNmCKAbLZImOTaTTbwjYs8obOdFbHtAQcyQFXRJRkRMekqTJGXWUAnypim05pSestR3XT \ nwrIdQopLsFRg4ThCaWL30ruXls2qqhL2SbiuQ7Zgks3kubSLcGyP0SIInlRjua7XmlRi0LiOh0AQ \ nXIfyiI + A4OITXBQs0oaLZVkUdIOCbqNbNoZl41Di2rgipustxW3Ba5 / yrOoytiAiSxIhFQKKgOkA \ neJ2qliGiqg6JRIhF8xb8bR3oP / zlwa1NbY201CpUqgL3fOr9nBgeY2JykJpOg8m3dZ59a5h9pxro \ nlf8bA31 + UhdGScT6uXjiIJnjOaYP93LmfC / TfRLCge9ixWcpnh1FDfkpDI9TsHWMWJBWSSMTj2Jk \ nUhiFLPv378d2okydl3jkl6uoaUlyZM9jPHHmCpTTz3LD + + 7h5IxMtHEutj / H + Z2vY0bGmE4sR / Rd \ nzvz2Guxihp7xWXqOH0SrjDPmGBTSh4jVbKTOn + Pt117i1rUxfvHzZ5iQmvj7z2xk5LBDqDGAPiBy \ nSPTz8ztjPLyzyKlwmFprhCsDPfx6oJnE5rvo3 / cIC8rWcM11y / jFt75FavIQhOZw7LVj7D96lM2f \ nvJ7tJ3u5YsEiRg + eIJ / pJpZMcuLwadZt0Pjd56 / ht8 / uYPDiNorpU6wsn + SL185DsI + z5Pp / 4JHi \ nWn75apqnfvlPnH3x52RmFuHUXMfz / / kow2fOsLh + IXODCl9eP8v1tz / FJy6HVweaCaqLeOj + DyJ1 \ nvoc7Vrfxnftf5eBFgWT3G3ziBonjp3yc2XcYOxKjKqDT0mxx4OwAhpLk2g9sYNveER55u5tYJMLY \ nwDj7dp8lnFiApfZz7a3XoFXMMG9pPZ1zyhAz21nfVM7SeD / 5GRFBGWB2QkIO9 + PmGwjE / AyPHGJU \ nvxNBjXBg / 24i8TRtFY0c6B1hbs3Kd4m2eGBrxK9SFguSjAYoj4coj2qURUMkowESoSCJcJDKeIBk \ nIkplLERlLEx5NEQyGkQRHGRZIRDwEfArxMIhqhIByhMhyiN + quJhFFFAEgRifpVY0EfYJ6KpEpIo \ no6mqB7aSbBJ + GQRPg3VEmUzRRlUkKkIKyxvCdE94kfXpvIvu6ERkkYjsklAFNNXEr0jIoui1DDng \ nuhKi7R1QgusS1VQE2yCEhV7MoxsGlg1 + ETTRQVFlFFEmFhCxbJmpfAHDcRnav4NwLEQoWYPmD2LY \ nDlHVK54uGCY53UVTfTiOx0ExbAfXNvFJEul8kclUgYmUzvBMnoxu4pRcMiAQ8nlkyrxuUbRkdNu7 \ nq0CUURQZnx + q4lECioTtWgQDPrLpFDnd6zuVBRdRAlmSvMWuqiKKLqoIc5vKSWcsEnGFmvIQoYCI \ nrwRcE2UZU / AaqgzT8u4WSp2sjgumZWOaJQKn6WLi4rgiruOlQ23Hu + AGNJGwTyUY0ZjOFplbE6am \ nMk5Z0kc4pLL / + BBbNvz1jMW7cqA / 9NqFrcmoy4gfrmndxk1zhxnKBhFyOubAEVIxCXXkAgUjiC5o \ njA + NoCVmCPgbsVuWkA1JaBVJ5von8OnHcX2daLmL + IoGdkQlYUkgC0jNtSgnexhXBQzbRUUnU3TJ \ n51JodpBtD + 9n15E0wbyf / u7HcSKNNCxdwXmlF7kvxw03l3F87zniHV3UiT7EpYuwUhbnhkdR9Rnq \ nly + npSZGtVKkqzZJd9ZHIC3hJNu5aXmYez9azm9 + + QwL1t5E0n + aa7uW8 / MfPU4sKnDszBiNwcN0 \ nLV9DW3mY13NR / nNTPZI6yIGjMJGZoi2URa9djLbkJqb2PIqCwGDPKAP7ewlNZ8kPT9I75bBow3ps \ nR2Ph8gqSRZP7tx + nevR3 / Pwf72DVnNPkZuvQKy1OlN / IxSNPk0z3c + D5kxzpK7D3okv9xuW8erSX \ nQl0t9ZVzmTZVts9O8 + CzGYrnDpDzqex9bZDzeor77ryGUG2SzPQJRgpRtiyv5LIrqvj9iXL82gRl \ nq5fQLCbpmRhjKOdnajCMVB1mIm + zYlMb42deJBJeQuPcufiNad57VZiP3pxnXXAQ19 + IO3CYFrub \ ndq3A6gaL4xMG7TGBofGjtLeuIxBsJRZ8lvRsC4bdiq1AS1xleCZFPF7DhekUm + fNR / a1vCsH + vHD \ nB7aKggfh0iQZEU96EUouFVFwPU6IJCLYdinq73i6syyi2x5RsGB5Lg7dcsiZYFkmrgOGaWDjTfiX \ nmON50 / UWhHioWUdSqEqEwbXpnJOgpUwjrolMZoosmBMi5hepiQc4M17Esr3e06qIRsIvUhkLohsG \ nAVVFEhxM20Avek4an2CSiMgIKFiWjWnqiDLYjonriCiSiyorCLZBLChjG0VwvNIOHyY9MyZ5Q2fw \ nwOso4QgFFObN66DML6NgY5W86pbjVdUVrBLUywbTtEgXbWYNl1ndYSavk7UcipZLXi8dkpZLwYKC \ n6WC4IqYgovh8IClEAgo + n4wm + zBzWaqDIBgOw1M5RmcLVIYUwqpAeSyIJiuIsowkQUXER0wTSUQD \ nYNrUVAUJKgqObeC6Io7tQdOQJEzbZSqtUzAtLNcG20JVBGRJwRFcHMHFcEGRvGW5InolHYgCQcWh \ nrjLE3KoYFWUhZmfSrKhPIAOiLOLYFpnZHHXlURYs + BtzufzDT1 / a + vmvLGdmfxk / / efbiCQitC60 \ n + cD181m5 / Eb + tK0PV89TFcszM + 6joaOeE4dPwPwu5mSf4cErv8XH1ytE2q7gtuv6OD48D + fUAQT / \ nCHpeI + ia2IqfCcOhUrLJoOPKCn7XJhhJYst + lJhAAIO + lEaxeS3hoog + 9BqRxR9kNt3H6e0vIKy5 \ nkZraldy1eRFSci4yeYanz4AjUFFbz / T4FBnboG9mBjV2De5sP3ZTE5 / alOA / jhRYJEzx1o7jJJcu \ no628mt37DvDxW1fw0AuDnM3rxOs6GU7nWTWvg4M9Y6xdCHFlLo / vfZNK / 0Wu3PhRinmb3ue2UdFi \ nEly4Gs0UEXSLUXuWjU1zmGqtZezYOJ + 8vpb9p7Oc6j1Bo5BmcGqQ3twmulaM8oeRFQSaWwiMyRw9 \ n / jgbOmoJt15PyhegvaWW7oELTD7 / BOWqwbp111DfGGPt + E85PF7u6YbBavRClo6FFRzOz2Vpp8WJ \ nqUrKlUleGEry8 + / + AElZR2DoFMeyGaqdckRhCl8sSVX9FGJGo6sGXn71OIWqtSTHJ4gkBnjiW1fw \ n1ov3sqqykVWLUxx54icodQtwikWe2v0k4yN1XLXQD / Io1VXvYyo1QmpiO7KyiXDZHHrO / Zol827l \ n / PAg7Qvm4xYKLF + 0mG59kCrfknen4OLtt7YKpYPVtbw0JAI4joVte35xSq09uKUQEJ7mni0YFE2v \ nGMFLi9rvLBUdvOYfuxQ4Mh0XB6Gk1XuuGREXTVWI + gS2dMSIR / yEVJcLMwYZ3aGtQiOiCmR0m4ms \ nS2NMoTok4xe9xaduOeSLOvmiRSpfxHUsfLKC63hLV0kUcErgLN20cG0H27G9mLtpkStYGKZR + txL \ nVXiSwBvnMwxlbSayOoYlEFcGGRzIkMnobFqzAtO230nQOo53B2DabqmOz8U2LW + pjIDpCuiWTbFk \ nB9Utz39u2A6WC4Zp4SJgu6Xp2HapT6jkdAccC8ExiPllgorklT + XelIpJXcvgbQEBGTJ + 3H5 / Sqa \ nKpMxdFJpr4BaVVR02yGVLxAKBQgLDkFZwO + TaK1NUF8ZYk5dEscVaGuO0VAVRRO99qf6mhgVfpl4 \ nSKI2ptEQ9VMWFKnSBBxVwsrliPgVLEtANwym0zlyuQKuC3rRZPnyFX9bB / pj + 09tfX7beR6 / L0lK \ n7WB2eDvN2g0cyvjZtesYey9EiNU1M5oLMqXP0tS5Bj0a4v1d3 + ELm2ZJ9Qq0Lq0lNPw9FtTfxC1z \ nd / L7Z1Pc / 9Ov8uQzb9BcXcWcua30TkwRKqRoaWpjysyjqRqKIFHX0sKZoycoi0RQOrtQxwdRclM0 \ n3fx9Zkf / CANTbPjGV + k50Ycs9NM / YBFoKqfnfIblGzeT7juCPb6Lx / 7Xe / nv72 / l3i3zuP / J7cwa \ nWcSxYbq6WjBnL / LvTxwjuXQLs2d6 + bef / BddLX4SjSF8Izvxdawn3X + BfFFhKlLO2iV1PPHAH / nR \ nT44jZkTes / VTHBny0ZOfoGzzZbjh + dS0LcXseY4Xnr6HdW3zePSoxa8 + N8gre6Ls6LW583qRFseg \ ndXEdx47MZzZSS0N8Hm9OXeS5Hx / hhs3z + c3TEosWz + OcpqKPHcByJM5IWV752vW8NNLFG + d3Uxi7 \ nyKe / 8EXGK + Zxedk0R04OIiaqkPRxrlibpHfAZPniOTSuWkbPsYt8 / iPXsW9wFl + 0ATltkM2PMzPV \ nhyi2MJu2mc0YjOkW83wzbP90JVv3KdTpx / ng4ihtFTHq5o4jyasZcNexqv4cw71pNmxez1VLK / FL \ nzyO7a0lne8lOvUVeqKS6qo6xgWeJhDeCIKJGTCYHe2loWsZbx3YgzqjUVr87S9E9e / duNW2PGy6I \ nIvalouJSitDGs9N5xcpOCbDl2Rw9e6IXcXeRcFzB029LPBS7hFDFEUopzJJGL3ke5caaMjSfRKIy \ nCo6FY + rsvZBhVUOSsGYgCzKDo2MkoxE0EQq2zbmJPJIs4Doipu2QK5qezILoQcR0Cxyv7V5AIKC6 \ nREIKouXp0UJp4Yvr4jg2giBguBay4BILyOw + P8twzmU6q + NaFoKTp6Uiw6uHLjI8MkHjwjWYjosq \ nObi2i6KImKYn6QguyDJYgkBAdLDwEAmeRdPBsMR3ulRtUcG2LXBBkrz0qyAoiKJL1jCxbc / uadlQ \ nsGCyaJIx7JIzxi5V5wml5bUHFRMdAVkWmMkYZPImjg2GYeFThRIp0QOSpTJ5sgUTwedjqmAyntEZ \ nT9nM5rwqO7 + i0j88g247FHWBbM6gaINuWuSLOjlHZMaAiYJLKqszmzWYyZmkixbpgontSszkTEzL \ nomC5rFu96q + + t4W / 5Cz8 / / Vov / sr7uffezvRxhwt2gStrYtRzJf5 / RtBjswk + cpKPyvufonE / HVU \ nN81l9tQxqluTfNz / cSquupbW1MuYvsUk593Ec6NJ5svT3H7Lt5nIjhHMJ2lIhBmwbaRokorUBMND \ nQwjz2nByLvEIjGRs2uUowzM9uF2fRwon6N / 2a3xV8 / joZ99PzvUzaPnJz6Q498KzBFuWoheHqV / S \ nSrNocd2mKuRUgV / f / yBtqxeRLrTzg / / RwePPbWMifj0vj47zuWVtPDWap3qqhzNTMkGniaGLZ6mw \ nT5PcsInsrtdp3byGYFUTuWyRvlPn + eGHV3Prtgy5sz1MHDxD57IqhicUjGAIny9HS3090VSEzoYD \ nbG7ey11 / FyZd5bAwsYIK7ShOIUtthcqLh5uQyjRyOYGL + f3MbV6COZAh7HNoqZ1iak4X64MFXh0L \ nE6ipJJaKci6VpbDvPm6590PsnY7ysfZZ / vGrr9O5eDF / + J9lfODfDCbyA2jqbq5dvZa3 + 8IsueUK \ nMm9t51ShlsmeCxRnffiVtzmw8yL3fPUfGLo4hi6IDAo + rosOYs + + Tp96OZ + 6MsmK + Q7jPW8gm8c5 \ nOVrNTVe / l1z6EXovtCCXVVM + 8R + IyVWEQgsxFZmZ0b0UCrXUVpcxW7xIZeVm0lmDQMjH4PQR + gdz \ njBvtPPTCGFuvH2PF6m8L / + / vxP / vH / f98PuuWwJzCXho1UvpTcf1pmq31KkpCF5Jsiz8OVkoCCW8 \ n7qXnJBGxlJ70rJCeE0ZTBQKBgNcgj0XAp2G5ApFIhLKQSl4EN1vE59j0pAw2dCQ4fHqYedVByqIB \ nFFVm76lhJooS1UGNjG4giGqpSciDfYUVl8pY0JNSVIHq8hCiLGGaJsOjeWbzNulCCRvrehqwXxEJ \ nKlAWUfApKrgOEzkby7RQVYWJ6Qz7nn + E41MBDp85xNe / + g + 4koiBiG0Bjo2FiCZ7jBMEm4gqYrsC \ n00Ub13YpC4oUbIGs7sk8oujxVhTRReLS4tnBdUXAxhIAV / Zai0SxZBkVsSwLR / zz20Qu5XRdAS / B \ n6YAtCAgi3s / ItRCQcEXX87yLMqLrlEq5Iac7CK538YhEA7hGqTADG9cRS / kAB8fxyI9yKXRlun / G \ nIgii5O0sBPCsUC4Jv4BPFckUbUxH5B + + 9Hd / 9b39rkzo9 / 3rga3lXUu4s + lHPP58jgU1 + 4glkyxv \ nrGN162JWffwhXP9C5i1q5dzpHhJzEsyvXsDn7s0TmT5C1cK / Z3TqGMHxN6iYeYbZ1GvU113H3pPj \ npAayRDUfhOMUbQs3M02VP0Ih6CeXLVDfPAfJcjCHz6EZEuVr / IyfydCxdDG33wba4uvZt / scx / ac \ nZMvVjYhijJVz5lBfeYZEtIPhsTyfuaaK7hO7eO + n / w3N6uPGJfOpqGrgO / / + Pb7x8euJ2SrfevRJ \ nrt98FfPzR3jy + Vn00BSLlq1m19l + PnbtStLti5gdHKN7zyvIDZXIvgT3v36Kcn + UQnqI99xzBfM6 \ n53HTTR0EJke5rFLnE8tEdj3xGRJunk1XLuPWhT6md / yYazeMcXbM4u3ecrafhSUdDl319Rz1D1Kj \ nduCcP8UP / / VWjk / N5dT4EbIX04xrRfR + iy2Rs3zu9hYW6L9n9c0fpqsuR / dwLSf1OI1zcvQmZD62 \ nUuX + wyZt4glu / cydJPtfZHuujZn + o2zu6uLw4QmmxlJ01DWTnTrL4jWb6R4SUFWVglykZuocwxMq \ nF + ZvxD3yYz5y01xC8kUmh07x5kGFW67pxLLOoQU + QVC5gDN1P / 36VeRnyqhu0Th39EnmtLyHUHIe \ nR87tpbn + bnT3KLI7B0nSGRrdx97jAqeHhvn7W6rJjms0NP / 1Keb / 5mPXnr1bLRtcXIqGJx2Ytgdq \ n8uBbojcJliQGqxSbt10XCxFXEhEV7xbfpypea7yiEPT78WsSfr + EosmEAhphn0JlOMjc8gg1EZGg \ npODaDkFRJ5NzmdWL5AyLpCYSVwUW1IcoTwbw + 2Ukr1MIVZLJmh7 / 3DANCqaF6UF7PZ3eMZEEkcq4 \ nD59PwDBsLgznODecI2fYTOZMUobHOtEti3hApjbuJxIMMJXJkdddTMvCdgTGUlkObX8Cy7UJhGS0 \ nYJIzp0 / x4rPPMX / 5GizbxnA8P71le7KOYTqkigJZ3UvdupJLrmhjuwI + 0SYQkLAdAVkE8Do97RKG \ nwMZBEkQEFxRJKHF0nFJ1nI3tuEiud1hLCEiyWEIReHcHLl4nqluylVqOJ40VDRtKBc + u6319ed1E \ ncs0SLdEmV8hTNB00RcUnCVimUwJ8ObiuhSIJ5CwwTder68Nri3JsGySBkCwT0bxCExFw7UuQNocN \ nXX89 + v + ucEbTla0snVfki196H / / + q21IhVXc / J0IDTzGwaEU0Yr1JGqWc / 7oiyxsS3LqmI8rlt6A \ nMnUPlroTw71AWftXiQeiGBd + S0f + KdquTvO9HwdYuj6GeSHF0HAfvmQllbEoDM0wMzFJIJykr3eK \ n / OgU7RVxJgtjzCpreP7hNt639ifc90wfr7yxlVRXmkh8Dm + 99DLNsXo + 9sX53P + RP6FP7eTzt7YS \ nV5bROW8 + cwrbaetah6gGGezfzlM / vZfPvniU / 7j6apSPXUOh + zXu / eZL3L / rtzz8wDn6R0e59f23 \ n8 + F / foK71yyAOY2c7LlA3aZ6aiJDCEsX0 + XT + dVEMw9 + + 0f8z0 / fSLdRz4CUZd + YzAu / NJmu / TFf \ nuMHkm9 / 8CndesZgdB6L0BSv58ffmc + y1i3z9mW565bsZnBwhOBTnzIt / JFnfwO7TKc70DdLuW4F / \ neYDtjz3Ea7 / 9MkNGBDs9RlNNHU + 8uov7Gm6Ck6cgkiChVpJ / ZpwDqy3ijUm + 8Z7L + acf / BJn / DyL \ n1t / Gq68eJduZ5vjITtoSG9m / ew / jF4 + gG8epXHMzpy70cOM3vsDxQzbvnRuj + 6Wv8Z1v3UOFlmF6 \ neojymqtoVBQkZS6Sf5KDO37AuNrD67lfcE30NRKJM + TTjQQrLmd2ZpTTZ0 + wfsPt7Hj1p2y54u85 \ n1XuIh57dTkYv8pkvzmPbz44yV73AxZbku / G2BrwFliJJSI6JKyi4po7hWgiOjCybSKKEIwqoYpCo \ nYmFfyhYJAqIrYpUmSNMRcfEuigieZi7bRZIhjXgsTKXfJBgJsP / 0BCMpARMZWbBoDoc4OpxHlEsM \ nEBcSfotYIIgr2YiKhmu7TKcMckWXvG6gWybpgo0jiBimjd910U2X + ro4AcWbZHtGdESxiK5bTGZ1 \ nso6DntVJ2aqnM4uezS9nuEymskymshQMAd000VHIGxlyRRHbKiI6DppQJCdFcIwcjmz / xXfQKfnG \ nXZzS8SSLDpIk4LoCoguKz4ckKTiOxWzGc7kItosgyUhuafqVQRNlCoJXi + dalvc9LjEVTEEoYc1E \ njNJkLhve3ZTtuhgli6LXG + h6ZdCi9A5Hx7K8z1kopXllUUB0BQQXRFFGE1Rk0ca2M5T7NRbGfZQp \ n0JM2sRDJZBzksMKFlIVPcLAFL + 0ruKAq4JNAN3VEy0bRNAq26Pnlxf + zovKuTOiPPP7i1l / / 6ilW \ nbQxxMlXFr39fYHwwy / HBCgppk5pqhdTUEMVUjllTxy2b5gurjvH99PvYUqUznYOawC1k3H0kur + N \ nb8E3eXQoxMv / dYhbP3kNx94 + ialESSgS0liGsE9lWAhQXR2iLB4nPZUjKkRpaiznqrV + vvyhR5jW \ nCkSabmAgpvLmqzLXfWQx4rk3kCorWSoV2PbmYZ587FHmNJbzswd + ycrlSyhkj / PWqy + zYvEaJvQE \ nOBLXLWhjVzbF2gqRhW1r + fLd9dz78cdpWdPBvj17KBouXZuWs + f5gyiWRWJOnHlLF3DysYeY508x \ nLpkEKNLZUMOI0sALP3mdyNwKFlYH + fk9NTTzGg8 + eRh3zgqEyst5qa + H / jGB514NsWdoHlr1ZfTu \ nfgXJqOam5YeoWrIUobWRi4MZho8cISUWcM1JFjcvo71sjL3dKXYdeoCfPJDhU19ez4nRcsbPHqKs \ nLEJZk8XQ6 / ehz72cvgsT3LByLR2hIV6fvJxASKRm6RriEpwdcvHJEWS / hFBwiMZrqGlSqagup2 / n \ nL + iqGOB79y7k6qs + hGv3cejwQb7ysJ / WSJrWOoFgxGJ6tJcLQgPTchvrYgep9GtMZwQqylYjCXnG \ nJ6dYsex2nvjZJ1l0ww1Mjp / lwz / aww + + 9km6FsX454cM7v6YiD8vMlyIUlvx7pTEF0sAACAASURB \ nVNgWd7 / 55lZRFFEkAVVwiId8 + CUVQRaQRQ2 / ZNKUSOCIFrIoeU4VV8R2IG / ZuI6NKIpeGtK5lNKE \ nMk0gEgjgWDYV0RCnhmc4PlZENyGnexVmkuAjJ3iLQMPwiqotB8KBEEkNLNOhkDcYny4wNG0ylCqQ \ nLbpMZovkLRefJFIR0RABRREpFhymUgVSOYvZnM54tshwRmcy5zCbsUgZApaLp73bJkXHYTpvcTHl \ n0DdjMpwzGC5YTOQsposy + e5XkAQXw7QIaSqjGRNR0ojHKqlvbvF6RkVPNBFELzUplZKSsix6SVTB \ nk2JcLBzbk1AQbPyaiiLZiKLsvS4IXkjJKuEQoCR1OSWN3MMpWFxqj / Imert0eF / C / no7EKcUJrLe \ nwStIpbyX51ry8LduibXjw6YqrBKTLOqDEj6fRL5gM1jw9h + WLTBWtHBdB7 / oBaZ00 + YSRNdyvUIO \ nxxWxXJGi5WJY3h2FKois7 / obsy3 + y + 9ObK1uW8lEapzLl1Xz070g + GtZNbeO0yePUbHoSobH06hS \ nknRBQLBqEZuaabffZOX8KG6 + l8GRl4kH1yJXrWMm18fFvQMcuuhDy7zK2KhAGglMl0QgSNE2mPYr \ nlEkGSC7ZkXEq9DHO9cLFiyoVV / 0d / UqEeKBARmsgHDUY2jvJmaPHuWl + hsaWeu79wLWMju2hfzJL \ n17I5TE + NMrftBha3reXs8P9m7jyj46yvdf97 + 1TNqHdZki03uTfcbbANmI4poSWEEiBACCehJOGE \ nQEjCCSm0ACG0AIHQezHGFBvce7dk2bJ6G02vb70fRubkfrj5dhd519JakpY0mvXOXnu29v95fs + b \ naC6Z6spxyKJNmbuKjes + o6ZYQtGCRFPdCGqQuvGzCEf7SHVnGD21nL71X7Pxtec56dxV7Ohq4eVn \ nX + f2hRJDahFpSePLB + / l0cdu5eVXOxlWS3jq3c8pmHEyO3fC1s + 6GPZM4btz67EStXzn5pVs + eoT \ nOr / czcz5PVz502W4as4krWTZedzC6UwT18OMP28Fp588kfatn3DBpWez7uvdXLTqv / jiq36aStp5 \ ne81htKEKihZPxQrHufDG21i3v5sXb53GTT / 5HvVTT + Lw9i7qCvoY4zVQfR6SchMbPvgIxTYZHI4R \ nDfVRU1FBX7fGrTedzTXzDnLoeCHVZQfoP36cz75o548 / X4jq9 + CIwxQXjOKKHz7AWWfWs6BmDC59 \ ngJ7ho0yfej6tg + 1EIvuZ2DgHU9hN3ezTcWmzufqvIb47YzvPftjGn9bW8OxtOyjTF7Hy6RncuVJH \ n0Zq / nYb + 9aZ7LDuvVFEA2xERJAFNlhlT7mVsiQ + wUUSB4VQ2j9e1 + WanyshBqoyAIAvYTj693hJl \ ndFNHECUO94dImiKWmVeYgINLAlW0wbJJpHMjPO68SkS0LCIZk3DSoCuU5dhgkqPhFIMJnUjaIKPn \ nVSNx3SKSzhHOGkQzBsOpHKGsQSitM5TWiWQsEjmLrGmNxMed4MrkVTk44Jg2pn0i2AKw8kYdATA6 \ nd32DArYcG6 + qMpR2MByLceObEUUnn5sKyIhI4jcDcv6g2GakGdvf5JNadn6qNS0b08rjFfJ + nPx6 \ nA0ARyd9bHCSkkXVKPoxbcEAauccSeQSx7eSfLyOB3Iw0d2mEBikLzsiO3kZwRCTbwrTs / KGxBNgW \ nOdPGFkSiaYPhlEV / yiKWNUla0BXLYjoCGcMiY + YDuA1bGImbA8fKR81Zlo5ipsiaHkzLjWRZOIbF \ n0iXz / 7Ma + pOvrrsHwyRni3yxIY2UgqKgD7cqIAbc6JKHXO44 + tAQLucY7opqzptvcVZdLwe7e6gt \ nLyEnTiGTXoe3sIpM57Ns + roPXTDp3uMmkU2SzRmoTpxQOsOVV13B / o5eBvrbMPUqqop95PQMSBb + \ n2RMYLWYYvWImuz7 + mubAaPrHluH0SRQpbdzyw1U0VcLaXQPMmDAaMTOIL + impqqKXERGK6rA622k \ ntHAMmUw7HZ29ONltzJiyAEd18 / c1LZwzfzSbslPZ + 8FLaL6xbN6 + jqNfbqW7YxeViy9j08O / JRZr \ nYvTCIK + vraV8RgOVA1somTSbrR8eI3p8L14nQSoco2dPK + NKBujLuDj85Yd0tR5m4pLpVOvdvP3K \ nx8xcdBYLTpnCmicfp6h6MXefFuGZj / rpP97OmIUzKLXLkKstZp92KtlwGJ / j8Owjn / Hnxy / hkj / t \ nZXzgIJvbXXi0IXoP78GwsphWgn + + 2cXyhWN4bq3GeRUf0MYSJjVUIhaP4t3th7ju1JV8 / NUmckNt \ njJs0GbOglgtOOcQPF68hY1 / Iz + 77GRetPJtEIkxFjY0ky2xvE5k6poz7H3qFxSsaaWnZR2PDGEJ2 \ ngow5gKJ5OdJxjIrS8XT2 / hUxO5 / 240Vcev / LvHaniV8aS3 / rAa5ftJ + uVDPL / 6uT2fL7vLmvl4tP \ nPvtbaeg7t226p9QtEFRlBGmkKZ2AZZkOg6kcPdEcg8nMCHZW + Aahatv5IGRZlvOGE8v8Ro5oWfkJ \ nLmvqCE4 + 1UYSRGQEJIR8opEt5HMrrbyF3BEkdEcgpjsMZC36kxkGcwJJU8TAxqW4kGUJVVFRRwh / \ nsgiaIKGKEm5NwicreBQZjwJ + l4Jbdih0q4hWbiTzVMyjXWVQJfKERUFAU + QRA1Qe / Rrd9wl2Josk \ nQjIex + fxItkGvYYXRZE4cnA / dWPG44xEOzlC / s0wH9MnfNNUnRNuTjvvLbEdAdPON3LxX6iTCsLI \ nYbOFLYp4JRMcEcsWRrJNrRE8QV6aCHzzu / zL98SRxi8K / 8vKwbGRBTv / utgWaYsR275D2oKcCRnT \ nIZGzSegWMQOMEY6LYeUXPSf09oY5kmp0As5m23kZq2NzfuuLjI610Jg8Tmr4IKNLBaaZrdQuvfg / \ nq6E / 9Naue8oKGykJqFhOmqbpczHcGoPr / k5fawfl1WMZ1TgBS3NTVDuZJkPmvfXd1Jeuo8HbiZQM \ nk / YcoETJYSUO06ms4le / 3EJF1Y20HHkP1e9jIJFmxarlhAaTHNq8F19NJblsDkkwiXV70JU + hMww \ ncvAk9jp1DIe91F18ERdcVkPh + vtxDIPd / Ta / / n4jqZzE9f / s4szyAVJigqqKImRXGUm9F7c3STLR \ nj6qEcRIyA6EDNFY2k0j1YuklzG6uQRJjrN7aw77DNktnqsRSMwnUjWFsdQ19Oz7AXVRHsWRTIgSY \ nO2WQg3u72LGlj707LQy / SPGki2j98D2Gj + 1moN + ivdNDT0 + UxklTSUV1nLTBZ + / / k388 + xNee / EJ \ ndhzV8DSs4ssNn / DBoWLa93dw1 / fP5sMXPyCUCpE4PExV4mtajpv0Hujl / a / e4trTlrBh93FalVnM \ nWjCWqUsXE7M1DnamqU / vRapvZt2Xr3FpaTHdZKmZfAoV4U / 46 + GxqIc2MdjfhdeRUS1IiDYrZqS4 \ n8 / SjFJbexEOf9 / KXn5yCKGepKK / E721k / c79nDtnCp9 + 2MfaNj / j / V / QWFvD08 / vo1x18PnH0dp + \ nlKq6Gby / 1UtlcD7D3Z8Q6j3CJcsHuPgXJ3HVpTYTGn3Ulk3FXzPAbStKWL78ALkOndknXfKtNPSX \ nnn76nvLKcjKmxfH + foxEAl / Aj2NbZEcajz4iQ1RkGUnM270ZUTi4BAEFG1Gw8ujZkYMwcSQsI2fY \ n + SZ2woU4orm2bNBNJ4 / aPbEnHvnEHplWLYuRQzkHxxH / hTdj4wj55CCbvKIGURiRTdojK4AMWUfB \ nsCFiu3j6wUc5acF8HNEZCbTIN1 + HvNHm8zeexTWwl9df30g62ku128CyDQSPi5RSgUfQEYw0vYaM \ n7ShIgkBtwygMR8Jy8geBJ5QfJicSmRxEIb + G8ioCuuPk4WFOfny3Rz6sEb3 + N7mtto2CRNZ20C0r \ nH7sxEpNnCjaObWHYAoZjYeaDXUfuaV7jn0cH2CPcnRHYGmAjYNjCiJrJHJFa2iOY4 / xzG9nF4Dgn \ ncAKMRFHl3xAkAQT + l8fjCA75yA2b5sgRcAlIQJ2ZxBMZwhseouL86 / + zZIsTf / C6YxS4MLd + RvWY \ n8SQKxtO + 42saxjXToRgsmLOYw06aimyc0NFOsoFKavpNXr5vGqHtdYye5Ofe1U / z4BnDHNv2Y14e \ n / zrnb4sgTa3hzEVnYNcUk9bBVVBKajiCONSJWVrESQtm0rZnG1YfKN40UlhFPf9txKIOWro60YoK \ nqRjoxZo0g + 33lbJk + S3cfcNczj33Lobjw / j87yFTCtI8MqkImhuyuQxY4HU3kJVCuGknFCqhrKgE \ n27Qx3CJbtm1jxuwVbO7p5S8PfcHO7X04WiWe6RXcPquAu576AysW3URRkcQPztK45BdbePVv16Bn \ nIrz + 5wgPv / Mgk1esJGzVYm / 9mOqasewLhfBV1FKsafTs + oDhrM2yC37EF09dilx9CitWLGP9nh14 \ nq6ZSMBwiVjeeUyafjNW9Ho97B8NqDWv2uXnvp1Np9zVQmItweqnFY62HeeJDhbqaIEWTNCL7W4l / \ nVUTB / BC9W6JcdbbD111TuXLmBu78RxHjTm5i / 28eRKycSaprKw21Iv4zz + S / Jz / NSTMvRSu8kO7u \ nz4hEuqkZFUDUNYZC7dTUekjYETqPT8TWX2XB / L9w1u / e4vYFGeqaxtKWSOBKZbjm / YW8c7WXbVvv \ nYVlDLeMfnsHKwnU8 / tNqPLbFz99xsfr1HZihHuqrVNo7hkkYHoY7t30rssUZUyY7siyTSKcwTZOS \ nkhKqaspIJzKcfcbpiLZD2nEjkMk7PgHBEfOyREf85tDNGpE3mv8acDESEHHi6xPXid85EawgiiKy \ nYKEoCqYNOdvEQUQc4ctYkog5IqcUBWnkMSyQZLKWTZFpYko6huQi6wi4HYcdH7 / HjNOW0dczRDIe \ nZsPHH5EjH6lW39BAMp3CNEyMXA7TMshkMrgMg7Bjs2JKEzXFPhTFpj + do + 14lMXNlUg2jB1TxjMb \ nIhgj65Hutn3IvmIUPZHnpQgCU + YtYVzzdHAMBEx27NjObd9ZxB9f3cHkOTOQbQOPGSMmlmKJ + X45 \ nQnJBk / IaetMRWPfOCyw650f4rD7CQwPYVQ0EsXEsHxYZFEHCFvJYzBP3WBhp7oaYP0A9cdmOCzCR \ nsDAEEa9ukdAsPFkbXZZQbRtdzKOMRUvAlP71tcrb / RUEdEEhYOVIOmGMnMW53bv4rPZ0su40i46v \ npoooJl7MnIAkZMjiYdFzm / + ftf2tqFzslEGoN8xpl / 8COzpIx / 5tLJ1Qx5fb12EO7GdDpI0rV13H \ nJ7v2U1laRnTzJ + ieA1x232S6jPuZ1xrEM34JZz71EkecvzH2g3289 + UviA4pyKMqiIQSOJKKke2h \ ntqAQD0G6fQUc2rGPnJ7Bb3qJSA0EC4ep8qwlJM + lSA1TXzOe1PwZLFWHMPrhtY / vYU + LQyYXoShg \ nYDtNxKIxfL5dSLIX0SnFp5jk + tci1lxMLpXEFSyjuDRGeCCCr2QaqtlNcWEGNZdlx6db2fJlK0pd \ nLQtnjmH1x5 / x6x01SAMF7HryVUJ6iBfXX8mrD97BWZf8Eq1jH9q4C5h05d30H97O7Hkl7E4VEe4 / \ njmkIXPydFTzz379mzo9 + w02zD / HTX / yFmhk / 5vKbruah + x / CJfnwuKcw / aRnGFccpHlegqefKua4 \ nPocX71zAS + 88wdO9o2lSPsWRy1gfPkQg7WbtzxspysWIspf3WiJ8XO9hVrQbeXYDB5ITuHjKMdpi \ nq5i8dIA5 / iTrG6ZRFN / OhMbRpBtHk / h6N8VzanDkKn58 / Vn8 + aHfER1uJZeUGeztQlYtWjoGcIvl \ n9A2v5oJFT3HVvf / gunOCNATrmXnhepafVs2sWdX88bSdHD1wGC05RNXUUzjw0z5qRy9h3tzf053K \ nIBo25VaOdFoiFBUJCCCaxrdR1gAkEgkEQSA3wu3u6 + vjhkuWc9 / DL / Do8T5UTeG2Gy + jIyoTdIFl \ n26QMB7AwMYF8Q3Zs / peqOKJj / 9f0G / jfdKIT14mwaMdxsBCxjfx + XRAFJDu / NxAEAUVwECUpbxwa \ nUVc4CMgYvP3U / 3DbwlG8fzCGXxP4zvwAuWya5UvLcYQv + CIn8ebGY / gDQbxGFkEUifR2gOMgSzKS \ nJGIL4Ha7 + MXN53Hvi6tpKJJQNJEvd3ejqz6CKpiOhCToCKKNaZp5Czwgq35U8qsb0xGwTItMNoNi \ nZ7npnAlc9d9Pkujv4NHXNORUjkNbv2JCbRBZTBGODYOoY1k2FeVF2IFGJFHASPcjKUGyERPHjGO1 \ n7EbIDNK7exNGzRhcEyaj2R5MM4muaMiiiHPi3xxRyEsG7f978M0KGXy6hSAJOEcPkRKTZHJZ9KRO \ nTvVQU92IEwzS23WM4KgmhG949g6ZwT7MxCCmKaAEVVxuE9qOUqTJpMcVMyn7Nf1bW2nR / NRMGkfd \ nnBnc9 + iHLC4KcCyeY9G / qb9vZUL3L / i1E4z342TbcY2aTs6RKBw1jYMbP8I91IFQKhPoG0affirB \ n6lJ8FfPoaNlMsEmkRJ5Ld2grqlqLJB2jec4cNj76Cg3Dr5BVy0mjk5LdDIWTBNwqHlGhuczHgYiI \ nndiLqfkojRURLq9ASbYz49RzqDj1Gl5qGSTosrh0jMqzr + 1nxkoP986ZSnLgAPMmLSA8 / AWewlmo \ nYphQ9D2Ki + fic7vI6IXQ9S6iW0GtvBxRgJyzB1tazn1vH + eG5X5 + / punuOryRbzyzDp85RNZ3 / oK \ npRU3kDQFTquNE0338eVGlcDYUga7D9NUpFHbLFI942KM7qN0D0RYueocfn / / e / gtH8f0Y5TOP5vU \ nQASl7RjLr21m3StbSHsdMjv3kNZ91NSW0zQuyN4jX + OuuZ7y0iN0HXRT5RsilOgmZFQhtj / Nmff + \ ng71fbGdeUwkdbfu4 + sqVrP1iNfVTz8XXe4BPv9hEV90Kbj6nlreffx3TnWPboVJ + d30jo6tPYdX9 \ nq9G3vsmYUXO54eJOPolEefJ7t3P / n67jjNNnUdc4DYwcLW17WDD3AjLZ4xw6fIBNG1uZPXs61dW1 \ nfBHX + HS / n / uXrubuN8 / nk7UdnLPY5PO + UTx5 + cvs7b + Vp + 7 / I + HhbgLpKE1jK8iEQ / TlSijo205E \ nVhBNH7LkoAsyciDI / rZd38qEPnFskzMci + IVHUw5nyc5rrqUVDjCcC5FKifh8XhI61Di1Xjuucd4 \ nb816dNGNg4kgiN / sUk9kUeaRuif0jfkJz7HzzVmSZOwRM9IJBrvoON / E04mi9M3qwjkxYY5geBXB \ nRrQFTEFBlByyvQf44OOPuWJOFe / uHMRMW5xUm2DMpEkU + wooDfp5d2cPn + 7opqaqis6Odlyah5xt \ nguEwbsZs2nZswl0YRJZUfnXFLG59cj2VSo6E4M9H43k9NJc4BNwqEhL19SU8urqVivI6DGwyqRjD \ n4TCyqWNYBqZpMmbSFC6fuwxXhcSGHbuJpZN09wwii2nCmSB + j4aCwfxp9cRSCUKRNO3dA6RzMhPK \ nZfoHotQFDNoGbWaNHY2dGUZQNBxJRfMUIKQGiUfjlFb50DIdrI1MwS2ADxNF0kkZNl7RRNEKCCdz \ n6LJMkZOlwhxiOKujiwpJS0J0JBAsookswbIyQtE4GdOhvLSEycVudNWLIzgkkxmioS5MRaJAciHL \ nOuFImoBHZXA4zvjGOiLxCIZh4IgiEyoq6I4O46RTRPDy + oYD / 1kTui / XSzrZje0fx6nnXUfbtne4 \ n6fx9POTMo6OjmpxUzJiLTqKjfQ / eqENZeZSuTCf + yEKG5UGsbA2TqsrI + Srp3RKnamgTStahWxAI \ nmgnGL5zHll27EZGwEimG9AKi8QTFxTWQcRhyUojOEQr95bT2Jdnwymt4S6fAsQ28duxUlswrprlq \ nIZ / u2sSkxgDtfdspqyjG43UhEyPT7cZbOw3D7M + vdPqOEKgfjy1kcUybcNSitOIw159Wj + Qu4zvT \ nelk + YyY / efhl3HEfMj9m6cqTee / l1azpDhKJaGTrqmioCdO1UWBPrBNf6Zm0fNZPoT7ETy87me2H \ n27hg4TQ + 3ZEg0j5E1Ya9TL1 + Ctnda + n4vIyMp5BZah / vZQQmT7mW3oGnSMnLCG17mIY5GlPLp7H7 \ niy9onn0mBx + / m5qqt1n8p2epOZiia0YDX73 + OnF1Jm98fJjmcavoGUjx + UcCt177a0yrh4Cd40ff \ nPZVf3P4s5swl / OGNClo + f4xZk6pxL8lSXaBSMdrHQ40VHO28kdt + ejP7Dhwhk4nRF80yrn4u2zZu \ nZNaSSmQlyQ9vvZo / 3PQQF / zhLJ55Yxb / NeUNrrlH5KCrn0vn7 + HVXY3885fv8stHTmfV7EdI9Hfg \ nczqIxzV2bN9EwO1BEWIkRDeOoBHJJvBoEoLswUoPfRtlDYAdT1AgSSCI1LlELMvAGRxEMgVU0UeK \ nDIZhMGFULR45w9233cJANIe / qhpVLmDWogVYlkUmk6G / v5 / G0mI + 37YbXddREFE9Lrw + H1OnTsqv \ nVASTof4QfX19yDikUil8BQHqm0YjK0pe + idJ2I6DyAn3pY0tSFiOgyZIfP7aX5l3zsW8 / / 5n6HoK \ nxwKFvNvxzHNmIgoqBXaGrCJSXhkk4OpGNOOMrq + ioMCLy + / D7XLjk2WaVs5HFFT02CDxRBI3Ni3D \ nFoXeDKqqYug6blkklzFpqvXRG83hkvL69OHhELZlIVoOgurGiw + AeFcfj / W + iC4Clpif4DUZMSfi \ n92dJDUcRJIU1X + zG51hUlnmp8yooQYmTp9fw7lcpauobOdJ / hKFoD34sCqQcQRsKXRnaYwY1lQFK \ nXVGOpauplfsIakFckszxgWECqkQsm8GXTeDJZaiUFUxZ5FjGoq7MQ0dEJ5FMkrRFvGI + xKSjfwDR \ n0Ckq9DCz1oOVSuGxEkTiOqHhJCVeh9IisCWH / riCy8lxZMDEkmHS6Bo + 2BIhkbYpD2h0DQ8jCBI5 \ nUSKRNv9t / X0rE3rFxMud2nov5uFOjrlGU1VfSebYUTJNLmZU17N17VaWLTmJbcYyirQNHDuWYsr4 \ n0 / j6w78w8 + wrCA + 1kk1lyAwlmHTeKvqfPRPJ8hG3TC5YOJd3N21lWLAp8hYTbe8gGPRjBWwsPYBj \ np9HDOpYvgy + rUr9wEYZ / FunKiWhekaGdT1HXeZDklPmsmDhID + fx0HVNGEYEJReju3uA0Y2jsCjm \ nycef4447rsJEhvg6wtlKVKkUSxxAdDeAr5YSMckV977Fjy9byRGfhyeuuJuGuReyvjvEU3 / 4Aft3 \ nbufB + 9 / n9aeWsHjVWmrHeykctQy9IEToywNMWTaOQ7uyTDhtEZfML + Vn1 / yWWVcv5eChr / FFy6go \ nryes95A6kCUVcPBXNpOIDFLV + wEDUZGB + hWM0wfZ297OhDOa8WqlTA7qfHzIILF / M4tWTeWyVQE + \ nfG2QweQ0 + g9 + Qt3Ci0mHXDg9h7jv5gZu / MMbZLMC561azpNvHeaeWwU2rylk4uL5vLe + k0WBdZw + \ n5zC1FWVs27Se7131AI6cIhoJ4Thl2FmNrNBF98ALzJiwCkUu4A / PtDDN8zkPH30OX8XnfP3A85z6 \ n4we46fTdXPDfPh74WT0 / ecnF83f7ueunX1A0uYzWR + 6mrqiR7o4jeFQbI5vDtCFY3UR2sIe0rKJh \ nUd9Ux + qv1n0rE / rsKZMc3dBJxRK4dAu5OICViCDYDinFQ6HPRd34BryiRJHXTSyV4cste0f4JBaK \ nJDJxYjP7D + 5BsBxe + tudXHLDHxAVDbfmpamxnmjaBFHJT + W2A7JDJp1fNciyjCCCYZrIsoyChGlb \ nuAt8nLxiGZZlYeg22VyKgo3voJlxLFnk / ZBCJJ5E9bhB9CGLJuOrir9RswiOjiTLWChkbIF4JER5 \ nURGKzDfZodlsFq / HAzmDuXPHILncvPjRTuLxJKObxjNtciNVnhTJRAIzFWXcuFKee30d21symDkT \ nQ5ZRVQ + aKCMqYv7vCgIO1jdKoG / 6lWWiqG6wdCqKfPhEHUeUEEQZxzCRVQXbtvmvphivxys41pWi \ nry + MaHYzvn4UspwP + PCqYBox4uEIwbIKdrcnUQUHS1ARBJGUYeHoOUTFRyoZIZXJMbmhjJ5InKFw \ nmsqqIP1RSJsGEiJuVUaUFMKxCKYNp0wNkk1kOee8lXz1xVfUF6qs2dbH9IklmIqLbXsPkba9jCpx \ nUSArdEYdFFe + LlyKwMS6CsIDA8R0h5zlYNgCn + xq + 8 + y / r97pOAev6uI1u6DxLJZ5NHjeOCes0l3 \ nd6DlNDp7UoR0gYvmuYk5XgKqn0Nb / kFB4zy6 + / qpzLRx2RnjaJ49i87jKXoPriUZ7aROK + NIdzdG \ nMoavqopcxqJAlJAdg4zpkLMNVBfkYnF + 9P15HNk / xKiFqzicrMfavYVI + yaalDq65l2JveFjNm2R \ nueviSozaGOP907HFAcrKRpOxegnFciw / eQ6atxFJLmb3oVaKiurxFZeRSw / i8zejpHvQhSydBwd5 \ n5YMnkYRqrvv + Sta1FDHx1BoeemQTG / bqqIkWVpx1Fj05D6GuPSS6Y0wuT5MomMJgtpgZs2fiVsP0 \ n2KUkMgkyuhuzdi6O6CG + 832y0ii6Og5TMmU8Ffv + h / GTpnBwsJL6ugSaPsTwcJSyOc0IJY00lZgs \ nXqaxoHEGl185kcmjbI5ufJ2DLacQiW7jsstXUiNG2fP1RwxKFrHO3fTFLSqaT + ailaV8vfkIx7cl \ nkGcvYnrRV5waeJWbrzqdyuoGdu7JIHsiVARi9KU9vPnaHizhA77eUcopc8Zg6xoFgcls3 / cCE6pa \ neHvvJbR0HOH7DSabjleycEKKB1ernLlkgK7OCMFiN8 + 9KeA1ynjs8t2sfWc1noICcgmwMnEkNUBp \ nXS1uM0dCDaLl0tRU1rDXqOG2Gy74VlQuL / 7tmXtERySdS5O1dBQkMhkdHQHF40KUBVqO9lBeVkpf \ nJEE6GaO2soKy4iATyz3UOBajrAgziz3MLy0gtG0X53g1lhRqLPHbbO9OqLiw2wAAIABJREFUY7jV \ n / E7XyScJWVYeKmVijVjfHUQM7BEyoYmAmdU5fvgQx1uP0N7RTXtXN729nQwlclz23WW8unY3glaA \ nW4WxVYVU + mUsRWEgmqAnnqM / aZE2LLwuGVWy8fs8SEL + DECUJEzbRnQEJMHCsmJcMs3P4P69rNnb \ ni5hKMdDTQUdLC2O0BGWiwfvvfsKqSZU4kRxtIQO / DHEdEEFxqYCNJMkgWSiCgKRIgIiiKNhGlqbK \ nIBVBhTK / hk92gWGiiTKmmZ9gNVUhl0yw6pJTCMVzbDscwjJyWI6I7giUBj20DRkksyY5QydJvpmG \ n4hY + d4C0aZLImuRMSNkKeiZCBjcBj0JfyiaWEfAHfSQyeTaLJWp5Fo4AipxXrAS8ICBRXOLh2OEO \ njvb0URxUcTwSsYxFVyhGTWkA3RFxJAWX5iE6YuLKmiYFLpn + wRSpbI5Y1sFwFDK5LNfc / JP / LOt / \ nSpE4vOcgc067mXWbdyEPdPP921p48Fcpnn0vAqEj / PHlOJW9Ef52R5yUIDNnyfUc2v4AojUK72mr \ neOFgCiW8A1kqx4omsEljpiIMeQKMD / jpCw8Rz8LSeQv49JP3sHzlSF4vhUVBQj1Z2o4exRBMckde \ nYnTzo7QVzkcolMm07qTBaOGr2nOYlt7BNmM + P3eN5oV3H + byc1YRibZSWDgHv6eTXOoQG75qYeqc \ nM5g0 + 1LCQ8f582Pvc9stVxAZDFNaUYueFdm642nu / u0j3PWPLjrdJgcGEpR9GWdhzRDte3bz0EN3 \ nEj / wIounjUbInoxWXMXBQT8V + l48lRUM9HYxe0410 + dDLqGxrKaKP7 / XR9AM0yXZ / POOFfz2nhba \ nwkGKz7wd2Szl / ceG2LPJQGhawVObBOJWllC2F1EqYrzSjaIdoMQ9yIb1B1GcDk6d / ia3XXcn / f37 \ nKC + fyWmL4hzvHsfKRXt49A + D3PJDjXgv3HvpLqzqORSmWxlfZxJOn8P2ri7W7Ixy + qyT8PhqCEWD \ n / Omv73PRqgEObKvnx1dPJtL / Mqf + eitPXddHsVjD51vjrNlXyxM / zHL17w5S8YNzueCc5yjdvIKb \ nll3E3LGziRgSjpkjqQe56L0hJLua4b6DuNQAsiqh23EiPUk8RYWkYgYuRWGwaz8Jr + fbKGsABgZ7 \ nR0Ba + SEqbRrIkoRl2yiIePUcly2bwxdb95ITVEQjja7nyGSy / GxCNf4SL53jGhDdCn97YyO / rPEh \ n21l6024OpHLkTJt4yEDUNFwuF5LkzocJY2I7I / RFy8alxzCjQyB6kcoqcCwdSdUIFAQRBJtSn0pL \ nh0VYULFaWnArOWzJQHJUWkNZDNMioCSYUFeJYibJGQIuvx / HMkkkU7h9PrLZLLqeDzM2TRPZEcia \ noEgeHMNEEsGFgTkCpSopKaF + zCRqy33w2loMI4PjGHksMDaSpuFRNRRRQhYVDMFGs00CqkOJX8aj \ nguqTcSlBKotqCJT7kCyHrKogYxHp7SUcjhOLx / DaOgVeix8 / / hljVAc94SApEjlLI2fLtPaliSYS \ ntFsilcUeRNsknU0iOTLdw4MoigiORNYWMA0Tn8uNaNn0ZCVyWQNN0yBjo6gqpukg2haG7SCKNmkE \ nBEWjsdpNMp0kEc + hyRYuXwHbWnoYPaqWSC6HlQmTDtQhqS6i8Ti9fWlURSWWNtAdi1RGxyOJNAZV \ nCgNBtnX14VW0f1t / 30pDH3jtEUr0AQ4lDyAV1JETYsxc9QNuW / 0KeC5m + hnd3PpgP74SH2riRSrG \ nrST81Xto + lSar5jM4N7PKBQrObajB8 / YbjQxi + 71UegOMGw7UKhSGE2RLS5h2 / ZNeL1uYug4iouh \ n / m5KSvwMD3VhuRvo6gqRLoyQPPoBU846i35XE8sL25i7uIJPB + rY9vI / MJb / ninzv0d399f4vaNI \ nZ3QyyU4s9yKap5QR6o5QUmtjWzY3X7GceCZN0F9Ka8dRitxBHvjtj6ioauDa + fs4sH4X7uZ57Nih \ n0SOXcjA0javuep49H16KvkPh1PER7nklzPDAuwxZVSyYOo6utnb61u9klHcc6zcVMv0slUZ7GzYq \ nxadfwGX / 9RRGdyuX3nI + 7 + w / Su2EAor0j7lk5UW83H2coKUT2XUELebhzO + ZvP56B9W + NFW5QZav \ nfAGfL0U8 + yU5vZKgK0dioJ + xjXNo9PYzvLeN666tRfOV889136GxcAUzRjfw + 1ckyppcFHlcHN + 1 \ nhSsWTKehysU7X8cZ0 / g + D943k2F9Agf2 / BbTv5ALHnS4Y1EzO4 + 9Q41yB68eKmP1bxIImV7c05I8 \ nfuZWbn1wNg3xV5h95f1k7BQ1Nd9heOA1sk6GFadfz0drniAglGBZJpat4farxOwsznACtyliiSHC \ ndgXa4Ppvo6wBKCmrBCCVSBDLpFFUH7oewXRsVEcnYdj4zGGGwv2IkguP24VsmvzkmqvYvHUTHtLM \ na + + k36uQzaR5qTWHbhnoKsQUNwVijqDXRcrOgQkKIql0FrfbzaTmMWzbtg3JlojrGdyaH8ey0WMx \ nxo0qw + OVkSSLUk0mFYlhWw5pVaXEL + LJGUw / aQyCbWJYNoKZBUvD5aRBVqmoKkLy + tDQEYwSgsEA \ n6VyG8NAg6UyaSDRKIm1Q4RUgkcEWa5AVEUkSkUQNRbAYGBjk4b9 / wMmjPFy4bCZuScMrikiKhGBK \ niIkUlpFGUzRkGRRs3KrExWN8iJqFjIOqmJhmFiXZSjZm41ElFFRyeoISXaNYtcFr4lJAt3SiQ16C \ n8S5sVynpZAZNVRhKpKkI + kgaAiIWw5E0Hq + IJKmIeg63WETKjOF2ayiWQFp3SGZ1MpaAboEgSehW \ nihJfIelsGlkSyNk2um2i4CDYIi5ZJJzKIRnwzOfr0QcH + cXNV9AvG6iyl + pSD8FgAMc26epJEEsZ \ nSKJC0rAxkLD0DAlLpLg8iOLRiCYTNJUE6RyK / tv6 + 1Yauix2kVYU / GIX15y2kivO / ZBd7b / m5HOT \ nDKS + JGjOo0WI0LnnZL4 / ZiVS + AhF5afhTm2n9Y012AVTkM87haCwn7nNlazZ + hEeRWDCjJkc2 / g1 \ nXREbV183YqWXlC1RpgXJxQVkVUa0Xeiam + MJNykxTWHGxw2rAjz1wkIGe1IEq0P87fnPmfyDVXgE \ nN0eCLmJaG + zfh1U7icLyIHqml4KqeWRTLhzlGLU1VaSzDiWBSnA8aIR565ONnLJkIg888Ed + eP1i \ nDnWV8caHn5AUJ7J + 82aayzUqPGEWz5vF5UuLuPI3r7Btn5vqQBNGVTWOOI + JTRqHtu5mwZhxCFI3 \ n61d / SFW / xNq1jSw6 + 1Q2rO5EPSTindDAttWn8tDj9 / HMLXNZXFXM6sO1rE4dJbfvbV665kc88bcP \ n + Okdt / Pih / uhppozzp1LvHsDx / seoqR0GjW1jcTj + / D6SzDtGH4jguJXCWmn8MSDf + bXvxzNLVf / \ nmWRiEI8yxILANqyuUZQ0VtO44ir + + fbj3LbrWR6 / YineqrvYsXsXn775LrffcQEbvnwff2wily6e \ nz33vVvPQh3E2vVWAnv2K + z6cx99uTHP + HRl + dUs5Dyw7iOa3CE76DVUFq + npn0H5OJFPN28ioxfh \ nU3XiYhAZgWxGx7ZVTNHEsnO4zBIUycZXWPltlDUAw709yHJ + LeHVvJy5bA5bNm6gorqcbHQIyxI5 \ n3NrJjOpyCqwEtiThKvBy9LNXsORinEyIzYoPd2 + OC6tlLAv8 + ECWEJwUliQgCQlkUaJfsDgQy6AZ \ nBtnwIDuPtqGIIpbkIFk2CUcioIok0nHaDsWxLRNJEknoBjgQzphUNNZQO3McVx6OUyZ1YMoKGUfF \ nT4q07iB7FIb1LEXZYbJxCZdLwS1IWHELFxkCOQdV1bC9EnaBQEqRcRdpyJaB6FioEpi6QcaBdDpJ \ nxFtASzJKPCQzI6uRs08QEfM / r8n5pCRZcFBVGUXIP75km8g + CcEw8Xs1Iqk4LpePurpqTLdAPFqK \ nkYxRUCiiFNbRfuQYu / YfIVBVjTMQpTyXpluSESQNQzeIxFNY5A + GJdsiGnMwBJUxpRq3fKeKGx9K \ nIaRNLBwUUcYUTLKGjZmXWqDICtFsBsEGwzCwRQXDyKFoMggWmktFN3J8 + MUnOKaI4HajFSn84 / lP \ nuOsnd1NQ6EZJCOzedwzLMSgpLsKvZBnqS + OyUjROHUcGiQMHW0nGbLKCiwp3jrIC37 + tv29lh / 7y \ nE3 + 555kn27n7gdt47MkICxZHmLNwBVmrktqAj9d3zeSdgem8ucdm2rRzKQ + kaDn0HL7qufiqpjB6 \ nUgFd6zYwfeVs3rrn + / iCx8jETHYf3kuNy01 / IkNDcRVSMoFmp5A8foyURcyI4HMrpHWR805rojMs \ nkRqMc2jjW9TOOoX9L1yKOOBm7MkL2fHa + 8SSCZyj + zkWL + T8lZU89vgj5IrH0Fg8mtc + 2MyRvl7C \ nZgDZ7KCgoDBv8VVFOqJZHI9Nxshw0qIzCRQVcNYP72LYPIXQkMKFN99A4aR64iUTaOnpwvZcSFgt \ nZ2mTyB + vLeP6RQOcOb6b284Zx49OL0fseoX6kh5yMYMtO / fRvi + JE6im57iBM3mYJeP7WdzczJzJ \ nqygJ1rFjfx92vA8lsp5F86 / gmh89wk33vUQq2smXmw2e / 3gLs2qnsKWtE9U3AZ8nS6G3GEHK8I + 3 \ nP6WmoZaUUs7iO1 / h5PEnsWR + A / / z + iFeeLeNUHo5RwfiVDTYjBq7iN5YD7a7hJ0dnZzSUIDpqeTt \ n / SGWTBxkRlOMNS0qN / yxmsd + fTYnXfRLSqYs5d0Hy5j082HefyXB8skDvNZ6GTFZ4IaxLTz7yiGU \ n0kkcbdnI4OEw8Uw7saQPMxWnXE4iyzKDtkUmniDgknGpMtmMhSILQI6k7Ue1s9x85 / 97z / j / 83rt \ n1Tfu8QULmS1GqPMa2L3HKNMUPOlhFEGlWE8SxKI / mqGYLHHZRxEGmijTa0KhI6BNm4LV140qaWzu \ nj + P43RRIFootM9Q8FXWoF8fSydkSuwfi + B2dNrUUr5miK5fGW16Hk46jVpQh6Vlslw / NNlHcGqIo \ nIIkyxS4XXq8bQe + mTnKIRroRvUFUl4STSZNTQZBNZJ + GV3IRqB5DzYSJeOQsdtlogqUBfIVe2vrj \ n1IxpYmN7H + OnjufNDYfpDieYMa6CTDLDlmNxskiIoozsLUA3Depr6phQU0FtcZqBMOzsz6AbNhlD \ nR8eNIUlU1VYRTWeoHVXDV0e6OHnZRO56t4 + 9nVGmTK3jwwNR1hwdZmtrP9NH1 / Dbt3cjixqtoRjF \ nbi8PrNlJV1pm3qhyyiSdY4NpkqKKFiykr6 + fZM6ksrqaTCqNW1NxHBG / V0bP5BhsjdAWjZLRwTIy \ nuDxuchZIioqMjSrLOLZNNqtj2HkKYzaTT2pyBAc9q1NS6uep312Lv3Yahm2jd7Wx4PQlaC4vweAk \ nHnzwMVrbjhOLx7BNk0QqiqegmF / fspJPt2zmtNmT0AcOETbdeGUZRZLJWeA4bq7 + 0c3 / WTv01V / K \ nhHtm8sgTh7j6u438 / PljJINXE9bOpFlVeOaSK7hMLeTBaS9wYPAQRrKd + nkPkAsfQRWyCMkAE8vL \ nOPx5O1JpOVgJZI9KoacIO20gBwNEo8PIqoSZjIOlkjazOLqX7ECSjBplzWc5kgmZaneaQV0nrsfx \ njZ2B0deHU + hlwUUX8cBtF3DBnOUcEQtRSxYiSB8wZ2wlmkvisvOWcjCcZmKxBzs5nSE9huTS + M1f \ nXuZ7F53M1IYgP773EX55xyXc + rqEbV5NeVGGQHY16YODnH3hLXy89lV + cuMYQi1 / YMK0pVT4x / LL \ n + 3 + OMuoqZs90o6ajZI6JzJ99Cp999jL3 / vxS5s9UmbHwWhbc9Q63 / 8BkafNkfBEfQ0fWoIr7SWYK \ nMCLrmTjmfILVl6PJTfzxdxczVtDpUHUOROt4494zOLAvw01nn4aeSrLHXUepDIeOpll62nVs3bmX \ nB7ra + d0FZ9A4rpdrbthG / UU / QPPv5oJzNObcuJX68bP5iSZSXlTHNXe8h1qgUlNQS / iLOk5eXM2l \ nD6eJ7fsUJl / LcHor1 / 99N1fespRRzQ7X / PUwT39nLNX1AV59bjNXL99G2ZwXifSchdccItuSpaZm \ nFOnhfgKWC / 9Jp5DZ / CJZ0ySTdVNTXU42d5h0LIvPZ + PSPGiyTtLXjBDqwLD / vbTr / + eViA3jAJZb \ nykOlRJH13UOUCQ6xQoFZmogo2AxaJmW6jeXTEBGxrSyqA5LkMLBzN0FJwOsIzKgqRDGtvJ1fNClr \ n3YMjCFiyiGzbBGSFhJ2jMjWA6ECNy4cSHsQQBDIDQygugVgshub2MDwcpqqqnL6 + OEqRm5a + KCtm \ nz6Wz7Sil5ZU8tiOKX / Jxw0WTeeOTNqbVVbD5QDtXzZ / Lr976EtURuf2sKdz2 / Kec2SQzcfxo9vU7 \ n7Bk8jCTLfL6rBUMLkpGgozeLmLXwqVKeiZ4zyJHf8euGxL6wxdwKD7oZwtINNLcHJWWREk3MnEy0 \ npxdHdhNLpFAcgYN7url2WgF / 3zRIR8sgBhrFhW401ccDa / sRPHVkPRLDnf0cjXVgxg1kQaDUlhjM \ n2jgoeN1 + ygr9HHAEPKJIz / FOBCmPpfW5vARVgX5dYl3IYlTdWHw + H8lolKxjMzAwiG0YiKKIZekI \ nopyPATQNNBkESURVR + ShokMyHKdm6gocy + aTvz / Mgf3D / Ozua0A2 + cUdd5IxBSQbEGBGcxMXLC6l \ nqsSNnu7htguXUVdUx8pVZ5BOWsgujV / d / 1ciAzEC7n9ff99KQz + 43sGqHGJX + 2k83bIEtXAGbjtM \ naYUXy9jBzf + T5dHft / Pd8qU8dPxZuqacwRvLujjvgSriQw6qpOKuUnD1dnLPf9 / I7 + + 6GsdUGUwK \ nSFUlGIaBq6iCvnSIGl8VHYKbCVOb2X / sKLoToqisnpQZQ7YcfH6V48kgBZs2kzwSwZI8NPWpiFVd \ nXHbZ3UQtNyXdKR75y6OcfeFUosd300Ihbb0yij9INtKBv6Kczj6VflcZV5x / KhODCk / 0lHHEXMJ3 \ n7uvn3tO38av7TMaOO52vvwoSmLSEz959kIk5D7NrLf6 + WSO0z6BVPk77nJ8zdGAr5 / kn4xv + kPJR \ nCtFEPbNPauYvb2zl5HmnMHx0C3v / NJU / vdnCP3b / ncuXLmbqxMkMxSbx18ee4 + brvsfho2fQte8t \ nVs6E8uBkdO0Iu4 / UMGFSOx5vMYYXXt0aZ2JDDv3YR7ydhCH3RHZvbaF / IMf85WdxLLGV5 / 9ZTmb6 \ nNG5oXEPpnELu / 8t66gONzPBEuP2WvQQWTaOhpJciVzkbs4uwiopxDkmko0M40oWMjof53t0L0M0U \ nvetamD2rlGtulDjSGeGN + 7fyz3f38NZfP0IQcqhCNwmrCX + xQf / gEMgBCrwuhjb / E5 + ZJGeYeEuD \ n5KJDiBKMaprM4NBBTEPE5Qi4S6dhDR0jOWIj / zauVCaDKAqYXgXHdLAMm9klPmzToN7Okc5YZFBo \ ndisYokbQTBI18y7LgCpi6RIFsgZikk6vm2IDcoKADxPLTHHc0qiUDFRHwLbS5EybsfOWIYba2X7w \ nGCV + lT5LYtTk2WT3bsSwJXweH4alUxAMkEjHKfZK5JJxRpd56GvZjznZRyyapDdkMLrKRfuONhL / \ nh7n3DLerLvO / P6uv3fc + bZ + ek + QkOemQkASSQOhgKKKgWFBQsI + jYplBYQZ1BlHHOopKER2pInUo \ nAULABAgppNeT03vZZ / e9V1 / reXHy9389L2aeV8 + F6 + 1 + s / a67utev + te3 / vzsQ1ODVpkLJmBo / 2M \ n56pEZYne / b3Yvkwg6xw80E / FtHB9DU8FP2cwMuPSkpBxaGdi0sQXAhRETN9DkmSSikPZMKm6NqIZ \ nJXw67mdUCvzzl6 / g50 + 8S9 / wJCk5oFJ2kd0ql3fFafYdxowCX7poJc8PCaCaOJ6KF / hcekY9W97p \ nY3ePSLGcoLFRIWtraIKMq0XIlD0cWWRkdAzbNXEcB1mLIPqzC1g1qVpUSaDoOdSmojSFE4xNTBOO \ nRSkZJWaKZTzXIxTSsSwLDwjcKpIknfaRgq6oCN7sf1SjOr4YEAQ2nl1kSddZvLrlPg4c2M7 + PVNM \ nFadojqs0LFjG3rf3IjhV6uMSplVFlxSGJ8aYV5fmxw + 9imloNEctzl45h0isjbnayf + 1 / t4bfO4v \ nO + 782CUSq1sf5MOrtrGqfj4fXHKKb1w8xgJjmlMt60iLYdLJRprrTpEtnM8L9mJCQZj1V81j09lp \ n3nxtmEpFYGa6TLW / h2JQRzLwyWsynurTYnj04FBTqvDpL13Ohz72ER7 + 79eIRqJIkoFbDGgKlSmV \ nwQoZmJHNzJUNfvSjD1CvbuPkcQljz2Noqy5jsriUN46WeXt3Dx / e3MzT7xR4bSJEoXGQxcmNpFON \ nHBzJMT4xglDXxKMvbMc4GcZYrfLsFbuobVTo6DiD237wJEMFDykoYQVdSPPmkDJ9 / v2OuwmVc3z3 \ nQxdycd0pElOXcGD8UZ4NfZpnH7KpK / 6WRctcGqI9NKbShJua + OK3d1HjPsTnrrmRf / 6n15jTPkVD \ nbZ7581Kk40upjRzl5894vDPWw29 + so3LNi6gvb2Z85LdHJoocu3Z9Tx / 6AiN4bN5 / 9oEv3txhlVz \ nCtx1ZSdXL3ZojxQwSr3cdUkna0Mz3PHQdv5SXMo3rkowN1Jgqr6G0eMyZ7ZPcFj4MNmxU / z4ww6B \ nVMeOFyZ5 + JZnWd0yiVI7zLB4EYNvH6C12eBfv / ww9 / 94D3 + 6fycDOZ + gLBFtbcOaCWPKAq5dxhcb \ niNpHSAQWypprcPr242g6NaaM40fwLQNPnWAs4 / Dtu37EtjfewlLCdCxbRG7SJ2mU + eK3v / KejFwe \ nevCPd0YiUWqDMrII077DQMnGj6fork7SlkwQVmX2zFSISmG257OsrUuiyzb7Zjxk2eWIq7NQ8Xh6 \ noEyN5lO0A2olEcFxOV60SCgKITxEyWegBOPjI7Q3NFAqzubdk7i4MyOIyKhSQD4IiMgiubKBooYx \ nXYeGujBj2TIrL7iAhd4EsiqwbQSEgsO6dIgD + SqTpkMQUlkSEnh7yCWZqOPCNpUXB106YwGWICPI \ nMqWyha7phFQVC4VKpUpU8DBMn97pAMvzcBwPxADLssiVHSzDRw9sphyN7pEqluiyflkre / f1EQ2F \ nEXyH279wLZ3VfmzTwXJtEtEIWaPECqWIJaqUkVGAL5wVYFdKDBcCQiGNE4ZDoiZFKBZhz3iWUUGn \ ngEwsnsQXZea2dTA2OYomKSAIRKIhbNdlOpPD9QVsz0VExDQMJqZnUBUVRVEwbIsAZpe8TufiAQJm \ n5 + guAZIEviDz0Q9cypnnLKc4NsY / fPlbbL50DT + 5 + 2VqGkWuO + cMHNtmqhqQzRX4xZfWIAuzyZgH \ ndxh0j / aTbtDZ12dQcUDxisQiOk9v3cVbp6rc9JnP / 33BuX7w438Lzlvdy433ryG2bBWarjLS18ui \ nrhWY0xLfu3ErB / Y9RSQa4xNdAY / tqKFj8 + eoHLmHsFrP5x9ajxCS6Wpt58Af70Sb7mbS9ggTINSn \ nEDwDb3CYoCHCwqrPmA7TWQNXk2lMaLhqBLM8w2cuW8EDT + zESi9i6YZvkXv92 / RlW5h / 1W147jDG \ njl / SdOYHuekja9iwMsTFt77IeeevZnjrCb7zzQ7sOXXszi5k1 / YslYjC4sYkEc / m7PhxlrVsYdWy \ njYxkRtDj5 + ILVeTKIN0DAa2dG4lGQ / zw8WeoWj7paIzB1x6jfv0a7vz0ek71dFFf5zM9tI / jfb0M \ nCxEM2 + DNlw4QweXXv / 48wWQ / Q2Nv0tG6kbo58 / mnf / wOo3mH / / j5nVx6zfcRGq8n1lRH / + ED3PpJ \ nlaVz2njstVFiidWsXmxwdlsX + 4u9bDsa4xsb2pFbfPzUHG5 / ZDeHpxXu2KAx7YmU6zo5uG2Mf / / I \ nGHX5ZlbcuQe1pZ4bOoqsXLmbO37aTDRw + PUXdvClH5Y41Z1h + sDdXPmJl + hxOjD793LLJy7h8d / f \ nRXnGJVy7nPb5rZw6MkjZL6L7Ml / 6 / HX87K5fEtYSWIqKLFZQPJ + EopMTI4jWNIIiM14dpXPeQkZH \ n8ohSiSdfeIvPffGfKE1P4joupumhSnGibYvpfff378liUVdjYyAIAqtqZBRcREUgXqkwgUtnvUSu \ nGkYPRFQETDFG1C9wyjYxiDJXFch6BiHPR9MUnptQOacBZNehKkiENB3JraIoCjI + VjjMUDVKvDGG \ nYwocOXkMTZAJDBNLlKnRZDzJRnI0yo6BJ3jIyuyyUV19nKlcFWyLTy5MEg0JvFhJkjThoqTFQ1NZ \ nWmriNM1vJXl8gF1BnGTEojnTxzvaIi6eL9M / bTE9MYMW0amaPilVZLTqoks + F3S1sH1 / N2VHwnAF \ nRFmjaBvUJSKYpoCgRFnfGcZrWoVVzbH7rWf5ypoOHtyZQWxpZ0OyQoNoYzg + 8WQS1zYRFBACnSAs \ nEOQquF6ZfqWNG9Yv4NWeU7x13CeQFHAgZ5kIgoAjuninkcRhPYpvm3gu5KYmEEQR1 / dQVY0gCCgb \ nVVRVRRGlWSSv5xF4DpIiY7suvjcLPPM8D4n / y86RJInmtlYmRseYN6eVppZm6iIua5pk8maCILB5 \ n8e1Xue6qFSxonotiy8RkFzvewc8eeZ7vfnA5rmdgOD6Pvmmx5XA3Bcfm7OZaXGcSSYhRG9OxK2Vi \ n8zZy929 / + z / W9nvS0N3yL4NMQeHtx1 / k95XPYosmFy7t5I + vDtCycR21le18fOVu0sCgdQ7N6WMM \ nHz6CLkfJqTGy727nsdxtmILMPV + o4foNt2B5KpIs4MgyYcfEFgJ8Y5z5vsYpuYHAK6MlEgTZbsRk \ nJ647w1limRNWHU5tiptv3sQjP / 8LfugM5JUf4IJ5FR67 / 370ukbi9Rcwbg8xd04nVT1ByBGRJaiZ \ no7DA2YHavIS9J4rctC7Lx95XR08pxuEjA + SFDha3zKepFb73wAsjhxbEAAAgAElEQVRsvuKzhOp9 \ n3nntOP / 2 / lH + 7VdbEdbeync2n4tSHsGWs7x2YD8n31YoVid5N7wIv62L8wbv4 / orMsiJFfzhgaM8 \ n + KedHH / 3dR596kX06EN01n2UeDpLoRjhN3 + qZb / Vw5c3LcWUp7n + mnl8 / JbH0Jsu4R8v7eO2u49x \ nwef + BWJx1iR3M7cpwvMHDYoHT / CP1yepT9czOrqfd49N0tB5KWuXn0lpqg / o5xu / rbBES7Co7R3q \ n5t7Ml + 85TGcsS0Pg88LWN5FwKfo + 2HnqkhobNi3l9Wf3sXTVPHr3Hca0h / nhj3 / DbbfeQVhyMAMf \ nT2km4k1SLfv4qoAuq / iag9 / 6Qa74VAMnx9IMdo9S6ZmgY + Mqjj + yBTdW4ayr3s9k7wijQz10tHcw \ nVCiw + uwu9j / 6BDF0BkbeeE8a + qIFS4Oo6BD3KoR9Dyek4YkeNaJCNCjTcOZaBo91E29sRB3tpipI \ n7Ml6yH7AirYknb5L1nJZddkmvvvQdjrrE4xlx9lcK6HYDg + OOmyqj5DUJI4XqswEHsNmhE1L2unu \ nGSFsVLE1jzlNCWYEHypgVX2yhSrmaUlyJBSmFPjovonrq3xmcZx62eCX / QKrG0S6ajW2HHERU3UU \ ny1PMT0ocKQhERJcOyWGoErB6aSejY4NYloGkRrBd0CWTrCGjqgEXdiY5OuFiWDZVwyaQAUnFsS1i \ nmoThwKZahUEthun63HDzTbiv / BePdme5ICrgqAoZw6JWV5B1nahm8 + qgSnvYoj2hMjRVoDGapORa \ nDClRWmoUXj9pIoeT2LZN2TQwTXM2ISOKp2ffHqIoIMsyk + OTyMKsz7O2sYHiTI6KUSVWk8SuGASi \ ngC4pp7G54Pre34Tftm2j / J / TuSCgCw7 / fff7wSmjRmOATrFgEov7CL54 + oWSwKeCb0MgCuzaN8lT \ nu0dxJY9lzQniisW1l5yB4eZRbB9FC2G7sy5UBAGBgMBz8aUoCz91799XQ7 / la / uCw8NPc8wIsXT5 \ nVSiM42f2kqq5iA2bc8QiVdqDgBl / BU1NFjtGBOSZrahTL3H2ihbykU / z2zd6KBtpoiee4shrWzEN \ nC1lJUAI0s4rkeMSUEukaiRMTcQJZJFUXZ2p0nMZ0M2rZxvYr1IouE1qc + 397Hf9wx6MUMiZdF / 2W \ nnr98kku7ljCl + HibvoQ3TyO76xgPf3M5AyO91ImLePaFH / DZr3yWP7zWz5euDHO0O8zaFecT8qZ4 \ n6eRh5rZdx6nB15ArWWRKHJ5QuWnzWSiKyj + / XGZVqkjYHsTIyJw6uJ3OD3 + V57aMYjfFGZqK0 + Dv \ n5B + vfj93 / edL7PiPs5GcGcSYxBOPPc / jT77LE09 + n4E + A0HSSDbVcted3 + Vk6y1s / c0fOW / eCEfM \ n9 + Ei8YkPXsCjT27lI1 + / md7cOF9dd4Rv33Ab44WFiF49RqUfxCrRSAQxOod0fZiJoaP4ZoXv3 / 0A \ nF657g2j6UupX / Yj59Qtx88NUlThVo4IV1bj8wk4KBYXh428yefwYku8TijUwr7aBA0NF0lIOrzSI \ noiWoenlqwrVUq0UcIoRqahAKGaR4hJxpoLdezIQEzfF6FDvArNVIJZMMTY1izpRpbG1isKcHSRZp \ ni9Zy4TUXs3f7uxyZOkn9iRHyTc2EV3Qx9sfb35OGvnZBU6B5Mum2FPnpPPO6lhGOJjj7zHk88egr \ nNMyt44VXtuM4oEQjxA2HS9sTlFWJuOAgiQIVHM7YuIq7 / rIfVQ5xWbKCI0n4voTkm7iKzkjWoJpI \ n4ktRPElFcDwsV0CTHdKpKFFFxPVNRDmEbZQJh2KYpz2YkuATlmB4epru0SKJaIgGO88hQ + bMBonO \ nZIhdfVm6Sz5L2xKcUxvhd4cHqVFiXNYO + / IS8 + piWK6P7Xnkqi6KLFKcyeEoOvXxMAlZRNUF8mUH \ n1 / UpWi6RmEah7JDSAxRNZ21Lkq0nxlm + ZBF73j3JXe + r5URWxMobZIKA + WGBGUTqZJl569aQqpX5 \ n1X1bmVer0x6VmHYFBNtCE1QkweLhbgcIUDUN7 / S9lXyfSDhMOBwmpChUCjmy2RyW5xHIIUTXp66x \ ngenpaRzfP40bgMCdPY0LgjhrUFJlbGv2 + Vm2gePMLlRpko6qWGz76SfJFaaIh2M4goJbMQnFVHw1 \ ngpHPgCIjexKe52DbLj0jRb71wDbCsszms + ZSK + tcfHELki4RChQCQUTwZ0mb / un7ck / jHOZ98oG / \ nr9X / OwZq75wYyeBNjhFN1pKZGadQiZNRRPqk + cwMaWxeU8Pvdxzk8oWHqLQtYmV1hCefOclVF + 6m \ nXryAdbHdnBFPEfiDbN01RIMrkDGrRHQdURJwLBshrpE1NVxmNVMhPYSHSrmUpVOVGFc1FsRlrJjG \ nI396nnFb5 / 577ubBh94hzSj3 / OePefuVnXjSCCoqdk7hvn0p + v0aHn + 3D6XjAl6tdLLkrPORi4Pc \ n / 7vnebIvxaMvH + Xzl86jPZlCCU / Q1bCIF3cMsvLSj / DAXyfZOhpno / ZX7rn / AOGGNfx2p8upuksY \ nrMYplytIpogwfIyL13QSkU7xtetr2PrWfXR1nsXlH7uP7uqZpOcsomtTlIs2f51DB2qZEXNs3TZN \ nnZXmd / / WxPwPfpe / Ppflu9 / bxJM9Jc48q4YXvn8r9ks / 4InfH6YozkOlHSOoctu3ruXEwaPYxSz2 \ ndJVKtoLlZoiKzWx5aRf3 / Xkv9z50lNUf + DBOqgNpbh3RJStoXbacRCigo6GTYwMZRvbsJy0aqHaR \ nihXCLI2S7FpFuW8fuqqRbIqjBgLVapmiBdHW5RhT / fiCy6qrb2FM7IKUTqpkYYsy / sqFZA8epZDJ \ nEqqr46PXXc3J46eIaSEWr1hG7tQg + 04cxCgXaDjSR + W8dSxoa6Hyxh6 + 9rWPvicz9McffvhOLZbi \ nSO8Ao1M5BsemyIwO8uTWHURLeY4MD9OgaYREhwYCUvX17MvMUHJspm2XmCBTVQQqiJwcK2OYHiVF \ nplVS2GdGOOmGGPaiFIUwtidjuwHtDVFiukxINkmGdCRJwAtcTDPAcm1ENUq5VMV0vVlDjhdgOS6L \ nGiMcH8njWCZVXwPZB9FgxvGoOsFsDLdiUiyXyQYBgR1geuBJYSpGnqmCPTt7zpVQdR1BkDBsm4rj \ nkRAtGurqGRyeIBAlQhEV / NmmZHk + JcOhPSozWnbQNZieMfjMOU2MjebRVBktEiIp + WSrFRoiEdKd \ nrTjlHG / u6mN + s05CFnBFCKsCuiyiCjL9FYmQoJCtFInpGo7roAYuimPjVUpYpQKebRFSZKJ6iJLr \ noMkigqZRMQ2C04hcXddOy55FZFnBO22S8lwPVVUpGRXCuk4qlaJiVRAQ6CknuPqDlxJpTPNP / / kG \ nm6 / ZRLSxme / 88BmuvP4aInV13P6rV7ls88XUts / Bzdo8 + c4RAmQWN4YISypNzQqxZAxVkJAVFVVR \ n / l9jHVme9aUmV1z992Us + sW / / + hOVq6gvbWL0eE3cHr / wrJlG1mx3qewcwvH + y1GlQ42pHr5yctt \ nbGodoz33Dh / / xFKeOryev2zrxdTO4KFdOntOpOms7KCUrWApEJYEQloSwzQJCz6BmiQaFki4ZdZt \ nmEP / UBbBMlm6MMKJGZFLloTYV1bIZR0isTiv7XyXdbf9hKnn / sLvtr6AVJlmunecH3wnTWso4KM3 \ nqCxKprm2bYrBk6eYNCXi5V4mxfnMv + A6Wue1kFy + kYX1Km / 1 + jxwKMZT + wvsfnWIg8f76GyWsY68 \ nw3PZTbhqjLf6KqghhfetidOaO4BUG0XvPJO21hDnL08QHX2TaDDI / buu4ys / fRO / Lkx2QuKiy + r4 \ n2W8F1l33Db7yaYP3rW4i2byS9184yshgK7 / 4w7sEi9o5svsVhu / 5BVN7nsUsKBjKXBw / DI5Eqk6g \ no6PKM28GFKYMJLcOa04HXl0dSmINcrqegbyFI9SgVks4p44zMnqIVNdG1HKFqi9gZjPkhoeZPPIO \ nyuQuJEVGQwC7wEy4k + TEHvxQDYpTIJfJ4wkqvqsgaWEkpZaol6fu8lvI + gJ6Qy2FoQlIKtjJJOW3 \ n9xCL6TQtaGFm7wl6 + 0e58qK1jE4X6d / + JuqcRjKjA4gFj / K5a3GPDWD5Ck5NLV + / 8dL3pKH / / Gc / \ nvzOfz9NUW0ulaiEJAlOFMo0RjbAvM2ZUqAlr + IqIpIiUTY + iIIGkUKq6TBs2du0CDvVPUjFsAtGn \ n7Ej0eSqGL6D7Np0JhaIZEFFEGhtSrNEG2DVSoWJKREIqgjFJ0snTZ6iogjTLNFnXRvfIMCVBIiYY \ nNKllhisyhhvgSTLFYhlNAQ + VmBYwaarENRlRD2M5IkVTQAgCkMLYnoeARCgSxjQdvEDANC00VSVX \ nrSIrMrYPubKDHFGpVqqUDBtNVpBlEAjwBRVFEJgpV4mF44xns3x4VZqJrA3SLDLYFURimo4lS8yZ \ n387EaI5Dp8ZZUhMiCGkIToAiiQTurE3oRB5micM + MV1ClBRcx4HAx7J9FFnCF5iVmiJQcWbNRsgC \ nVdua5eOIAhFZQxBFbNvG9z0i0SiuZRGKhVBUGVEQqFomhVJx1jglyAheQMge5NCePWzd0cvgoTc5 \ nfvgkxw / 1YBYnMDNjPL93kpX1eaqTZUKKzH9tPYTtWJzZXoOsuSi6TlNDPZrkYXsVhED5m5pQEGex \ nyX7gkVp5zd9XDn3uvPmMHP01167YwC + daX7 / wrO8veVudr80QWTet7l + w3FGXq8nc + Uiusyf8p3 / \ nmM893zif3 + + Zi595i / 3FToTJM7Dq4Tef6 + Ppp67j + I + eJOI6oMfITI8iyRJ5I4tghgiFy7iBSntS \ nxxY0Xn7ul8QjPi9e8w3eOjBGqHMtgTlMYzJGtVSldLCfkpMhFGnCLJYJdIEvf + nPNK3ezNlLOnjm \ nVY / WpRejnBlwUWyc1o4OkARaFIGZqT5OnOzmC7um2dvTBvveZe37N1HqWIqajPLAgR7S / gZKPdPM \ n6ejEdE0UCd7ZkmducYKeiMLS1SOc2XyMR / 5wjPjSD6Bkhtn59NN8 + qvX8tzLBwnqO7nzgW184oIy \ nW79wH / vXdfHnJz7EoZ1v8eXnhzHdEzB + gg6qDNY2Mue8q1BUieNHDmC7JvNXnMmpw3uQEgsI4h7 + \ niQO0NDThWq3UGccYPXECLSKRC8K0SgFeLE3B8MlM9VErhzDfeZ6e2i5qZo4h + wqO4BI2slzy4ct4 \ n49WDTGbH6Tz7XEonB7FNC6elDi / ZBq6M7RZxcj0Ijo + e0rCW3oinCWgtc8ntPcREcQrV0kl6Ik4k \ nil2XoPfNg8QSdSxoKHOkbxpvOEPNkpVUKhWSXWeSbp3H + M4DmFEJ1y7TWK2 + F2UNwPTkFLrgoCgV \ nFAl816E2rOF5AqNGhaZIFFEU8KoOFRE8SSNiOohqiKpTwkNDnuxDdHxUWcA3TEzfQDIKhMMafiCy \ npydHQ1SjbAj4pRHutWXqwmGUMOw7MUBLVGfHVIalnSGyOZewLNBjpJjIGEiyjaWIGIkIpcETKGIc \ nyfSQJXA9aE5HCewyOhaOL6NqKrZlUl + TxA88bLOK6CuYXkC1UML1fFQ9Qr5sEfEsZD0CgsRMtUij \ nEsYqVYmEIlRyRdyYQKDE0BSHwLLoLjqUHEgUy6gIqKqC47n4AuiigK2KSLaAZDoESozJUpWyLyEp \ nIjPZAo0hlYKrEJEVbMdGcDxEDYTARUnW4 + TKCKpOtVym7DlIgcKsBm6W2uh5Hh4CSVlDr5VxLA8B \ nEce0iUYisxJuz8W2ZscrTsWmYtu4eIQEEUkPYboOvm1y71fWEwQVZEQuP3slesnHDVl86vIluIIO \ nvsKfvh5FUEQES8D1VBpqQ2iBDoGH74tkMnlkBeyqhSiDEAi4rjs7bvFshNMykv / tek9O6F97eNed \ nl3dqPLTFZ1EhwdNjAT2lDry2pfSeOsTo1iKTrRUO7fQJ9Lm8 / 6IGvvVwI4tcgXHijGU0xvuGKOQG \ nefxpi78 + vZuUNYoQWAh4IEQwShVSjWmcso9XHsUizni + F38aDu9 + ide3H2F8usqV65fy5qkBokoj \ nfn6Gjs4mBnqrUN5H0tEwXRMbl9RkQKJmCGEyw8YzPsTYqXtJhwUmi1WeeOoZntryBr1Dw5xz0ZUM \ njU9yYjBBU6kbhFPMHNMYGcxQMGYol + PU1UzT0lZCdvfwlY + fx / 23fo0b203W33AOIb2J7rYuxkYF \ n + nr38aEzzuOxxx5hJD / G2NRi8naBNfMF9ESSv + 5Kc + 89 / 8zXb1 / MBVe8wuEDA8T9Q6SGywheFn / e \ nWWSGT1BTW6F350kWL21F1MLkDJN01KU0mIf6JOvXLOGtbVsIKyKO6jB / 1SYyoRhC7WKMwjA / ueOz \ nvP7CY0TC9YSbwgh9EzC9BylXxpzsZ2bwCLd97Xwe + a895KolXMkkUq0iu1Hcs69i49wE3WWIz1 + A \ nNzaNFm5Brk / TVxBRVAc70cXVV5zJji1v0DSnlVTnfCZH + 7n8ppsYevYNxKhGuKuN3imb4ZffwmlV \ nECwPIyqRRGOobz8mELIDQrpOPhThGzde / p6c0B + 7 / 947 / apDXU2UUEjGQ2TR4g4S8Ti + qlIWRAam \ ni5hyGFtL4IlwxqrFDI8Os2LVamoaE3z1nDQyLoPTRTQ9RjgcQUJEFOHcuVFWt4QRVI2ulIwqK8R8 \ nE1WSMJwKjXGdkOSRjkdIJGKIbhVF9hkc7scRFHzPxnEEBosWSizBVLGK4fmUPQ / RNzEtFz2kk8lX \ nZ92egYckykwXyriWQVgP4 + Bj + zaBqyBLAbIoYHkWjiVQrFYJhxRaG5qolkqYnodje0RiUSR8VGn2 \ nFOy7DoHroQogCVA2LT6wIs1QpoyqqiAKSIGPiI8q + DSlI / xu2zirmkJElYD6kI4VuPi6hmBZyLLE \ nyXEfTRWo2BaqqDE9mTmNtYWQoiAGECASiaq4jo + nqoQiEgEKkgyJmlaqkzncwMUyTAAkWSISiVAo \ n5FF1mQCPjuZ6wqqMJPjU19STqVTomzbZfPk69JoGvvbvzxJdNJeeGY + f3 / cq5117LeGaKLd8 / 785 \ n6 / zLSTTU4FRzPLzlOB4ui + rCqLJKQMDcuTEUFAJZRApknNPLTJzWFdq2Tf3q6 / 6 + Ri4 / veO2O0vh \ n8 + g9fIyWq66m6tgoGZehY + PU16dpie3i7pvCpPQUzz + 0jfGpdfzol2meeGGcxSvaOW9pgVu6Xuei \ nM + sxumpYMDLI2OjgrHXF9qhtiqLHwrhmQMUeJiQFWNEamgXIlKPoVoUTM1kETaTQM4RWn8KemERN \ n + ay + YCOH82mqI7sp4hLRwyyf30z / aAYzF8EzA77xsaW8 + 9YIM60bSTfHWNakcvmZCygcPkDBmmFb \ nd5h0ZhZGXyw1YJUNrrzuAnLZHm746JV8ZNMyfvTtv2BoyznSa3PVphRf + KfF3PStProdkeITf2Dg \ n2ACxosRf9zyNXHMJDfXNXHfxOLljA2y6pMy6lREO7nZ5 / rmd / PHpfXz1i + fx4mM / o335NQxFQixf \ ndgauEqZh + SomBqZQa2rpOzWEHkmSqkuSz + l4IYPq9BST4w5a3VzylXHWr0yjYNB3ZBfh0jhSxeG1 \ nHW9w4UUXMXTyCIY5RFVpwlXrKEgRwsk0YqSOra8MULtiDfHUHPJFCWrPoKCpSIrG4IxPLpultiZB \ nbnSQdKoBp + oQmpfGLAe0JxReeXk7TUGUIBkl09NL19Wb2fvCSziuSeviTvTmeq6dn6fxo9ejinMY \ nPvQukiyjyhJ20Salhkg0ppk2SjTGInzxY5e8Jw39J3d9507H9ZkuG4ihJLmSy4JF85kpOGQz47TN \ nm0dbWxvN6Xpst4oTBOAHZAsVNDWELwnUuCWskknftIUdCBSqBQRBJpBcNrQlGCwpTBXL1IgGnZ0p \ nXNelKRlmuFDinMYE8xrCnBwtk2xuplmrMj9Ry6HhSZrDCl0NNRydzFATeDQlwpQMC8vy0FWJlZ0p \ nOlrr6R6cwQ98dFXCQ8K1HQRJRZREAtcjEY2iShqCLIIbUHYDahJJcE18SaYmHqNUrCBJAr4gE47q \ nVMoVPLNCoWJimyYEKpPF / Ky2ThQoWHDzCp2hjIvlOoTDYWzTJAgCREVhqG + At4 / 3c9GCNPGwAr6P \ nByi + hyTMKuOOTzgIioBn2Xi + j2EZgIws + IRkAYSAQJTxfQHPccmZVcplm2qlTDFfJZ + dIdXcjGNU \ nEYQASRLxPBffc0kkU3ieiySKxBIxprJZkMIgBMQTcTK5Me59Yh + Pv7CPallhy / Y + dp7M0JkUWLBu \ nGfFYHdte3Uq6pZ629i6M6Un + 8PIeyiWTZW1xVFmhalssmF + PrjlUqjFU0ceyTFRNnn0OoohtuTSc \ n9T + jocX / 6Yf / Py / Tb6Hv8C7EUIGJY68zue1xSpkeAi / DJVetp7r68 / xHTxOLmvpZc8NyRvqe418 + \ n2ce5V4V4 / ZVx7nsc / vDWXO5 + sIlX / 6ufGc9G0xQMT0T1PWrjLdz86WvQwwK6FsG2FPCrWNUQjl1C \ nUlu5cMNSPMMhFNUpZYukojXkMtNcesklCMYEspegJRLGDCQmj + 4l19CMjs2BwRm + 9anbSUUa + eHy \ nt7ilw + Rn / 7md7zzUh3r1j8hFbmBjcj4n / WkGRkco5cZIr6thvDLGdC7gkQde4Ws / fofYuZtYtH4h \ nZrqJXz1znOdeqeOO27vY9qs13PKpLuavXczCKz6PXf9Bzl4 / l0ibT2TduXzlM1fzu8d1 / vWfd7Ji \ nbsB3f9aE + e5W7vjCj / ncF77E3rxJjdbC2Td8jrHhET5x7WZcX0eLh2lt0TFDHazoaiRb6SccTbHp \ n4vdx5uIacgefQnQN3jk4w77uDKFwF7YawYx6tHeew7bX3sSLN5Do + AjXffbzXLz5GmqiKT76yY8h \ nySrlRIxyIctwtohtixiyRbyxg1C0FjGZYNGylZQm89StXE1fdhx99QoWtMyjpiZOUfVJ1jcxqHiM \ njc2w + PyNdL + yk + hYBqU5Te3ceTSEkzyx02Fsf5mTB94gsagLNaST6R9E0TRsEZS6BHXRBsanSu9F \ nWQMwUfTJ2h7huhYGJyYouSW27tjN0Z5u8r7M4UPHsC0fz4ee / glminn6hibRRZFwLMr + vSd5 / mSB \ n / WNVauYsmlXR + QIV20RBIeOLmKEkRcNj6YaNmJ7M80cLHMt4IInYnkJShoyrkY5qnBweJyFWcZwA \ nQdWp1SzUwCSuuQiB + zdHacUscmJwhpMnujlzcQuS6GK76mnxRoBhVJECAeX0TDefz5PP5 / E8D9d1 \ nKZZKf4sG + kGApmnYPviigmW6yIpCe8ccIuEwYyUbK / DwBQnbB6NqIPguvqTjCgEhUcapmn / 7GCi4 \ nPqoa5cYzGpGdCrZRxTptcJID4W8IX8 / 3cIUAUVOwXRddkFCl / yvP9rzZEYZt23iA7XtImoCgBAia \ nSBD45Mb6cK0qvu8TDofxPA / TspjKzVAxTSqWRf / wGL4nI4g + tu8hOB4LG5Js + 8EVvHjnhbQn4Nlv \ nrmbLv6ykJhyjo7wXsecAkhlhU0xC7NtOSi1im6d9rqcVgY7jMDkxieM47D + wH8uy / na / rutiWdb / \ nZ / 29J7HFtht / F9RMWUyM7kF0LWINrZQCjSWrzqUa6UNmAYJUz03XT7A2KfHqoMKv7j1KR7CNeSs + \ nw4YPrSazz + PP7 / ax / 41uGhZKeNvup5gfoDndSHZmhng8Qt6fRiuGaAolOfPqDXS / 8AqnpkaYVy + T \ nU3VmnARNQhE31oGfzVHKjyI7YZRrfoW8 + 8dEFBj3inQYMvl0BDlbxKq6mHEfzQ9TuehbVI / 9Fd3W \ n0RO15KZO8S9PPsT2Lcc4PHgEwzAJ5aq0N83h1EAPmhSjlJYobX + U0OABdDmK0txKqSARXXghU7bG \ ntkevZdvbJ + kbMdi / 1yC + YJzy4QAlPEMlZ / Pru27mL0 / fx9un5pLZ + Xu8ooaU6uKbt1 / JACJPvfQW \ n3kRAZbAPpbGF9edvpO / 4Mfre7WHXnrvZeOX3aWpPM9ozxny9G6n + PPJHRsinBcyDh1m4bg0TQwMI \ nkoysBORHjxBLNCDHl5KVwlQLkzS1N1EfT + DHw5RHpzEEB89XCIc1qlaJ2kiKszas5y / PPkMiXcuc \ nSANDE33IxTyuGCGSTjDdM0LOrNB + 7lpKO3aT3rAOVYiw4PyzOPDqHkpTo2y8 + TMcfH0rtXU1pKIO \ nkdqANx45wrKz5yEaIXa9sQMzIdEWjTM6MUNUDpPuSDBxokT22G / ek9hiQzIZ1IQgko8xoOYQPB9R \ nllAlCVnXsUwPgVl2eBCI + JKDEMiENA01kcQqFpFEH9GzUGURwwbTsQmHw0iBD / izyy0BpMIhqqaJ \ nKIHjB6cbroeKj4TL2nPPZ + / Od4jIkFRVXMGhNd1ALptldMogXVfLoak8FcNm2pwVPkelWSb33Pnt \ ndA + UkTFwbB8EhQCQhADLdlFUAdcOUFURX5Dx / YCQ6FH2BVQBOtrnMD4yOCuUcB2S8RAzMzN4good \ nQHtdPblSmZAqIjhlSoLKM5 / sYOs7ozQ0NCAIUCoUiMfjOF6A6zqEwyFc10UQBFRZxjRNZFnG9ywE \ nQeCh4zb5fJVYSMRFwDRNBEXHdGxUMSAQJbxg1oIkCALTlk + kvg2nOP23FIkmzbJv / k + 6xPMdbNvH \ nciz0cGjWyhRXcYPZOKEuzuIAXvvZTWiBSxAEmIUioXgMTwItsHACBUHS2HNgO6tXrUC0wyhBlXO + \ n + d / EQxpXLU0QD4cx7YCeCYfD0wVWtIic6s1y + TkrGa9Y9J / az9Xrl3POmiWc / dWH / 75y6C1ffjQQ \ nTk0xMT3C / KRHpvcg8XCIkpDE9qI0fGgjt17ayLe + + RjLmOaLXwyhz7uBux5tZ / rkqziOiuYcRa5f \ nyQc + 08RwqZad37 + Vyugo4YYUZcNEFzz2bXuQztUfRZQjhIwq8ZTDBy5Ywpbn36agt1IvTvGpb3yO \ nn9 + zBdkQichFslqI5dd9gxNjJfQXf0pGLtCkqdzxL7fzmUaTEKAAACAASURBVB / ezzJRZCxTohJR \ n + PW9P + TTtx + mMLqHkGSx + JwrODmcY8EF51GnR2fdlzUhVqh5Nr9 / Ifc + OMLRV56jYaVGflgh3SJj \ n9w1TCTeSTs3FH3gMY / lHaZ6 / nFvWHeaaT3yMgWqJq69 + iGj9XOo7lnBix1u0tqSYevsxDEmlrvMM \ nvv / zz3PbrY / Qetly9r / wGg3pOlaes56jz25FVlxEKcTIlIlHjsVLNiAJh0n5MfYNKHjGMGm7wpgJ \ njSvORjGmMfKTTPS / y7KFq8jlJax4CyvP72J0MsuSdIQXnnyDoqgwpzmJXFdD1YXBU70sXbiIlvoU \ n + 3tPUi9GkBoSTJwcRk3UUJnsR2 + eQ0PGpCJbTBkFws1p6g + dILNxJcqwSeyshfQ + v52bf3kbfT0u \ npZ5 + 5JRIWZBoPm8t2 / / 11 + g1LlKkmRpRYOXac9i9 + 3XKff2YgYyeSpKqymTcDOM735uGPjehB / Gw \ niqNH0AWTmakyDR0diIKAU66wrKuLwzv2M + GZLDljObIsc / DoEarVKoqq4gkiF7dHWZyOsa27RNZ1 \ nMWwPLawhOS5Xr13I7uEczuQwTjiMbZiUQiFihgwhiWgsgV3MURBErt68gWf + / DJJXUKKJnDsAMkt \ nMe76NDll9FiMTMHCQqBgOEhSgCxLgMHKhXM5cnIEUPCYjcs5XoDr27R1dNDY0Mqxg + 8i4mP5YHsu \ ntVqInGWSjMeZyc5QF1JxAgVFVahUCyQSSRBEAkTcsoGlKLheFcGq4MhhXr65hVcPOIiCRFj0UTWJ \ nnBIglzzCsgDeLMSs7ZwVvL19N42RJCI + nmuiSTJ / OmFjGTYhxcf0AjQpoOSI + HjUKQolAoLTDd0N \ nBCbKBoIooIYj + K5PKqxRREExywRukaoNlmPhBTKKCI4cQcdBDBnUa1FUp8zy1lqS8UZ80 + SdKRtc \ nk8a4hiGHkdwSV57bxVvvHGTa1aiNtDBcmCZVG + fGDS189efbaAybrF / ZhW / kaXA1zMY2 + o4eYv36 \ nTv66Z4hq1aLk + Fy6djGD0yXGx8d4 / kTmf6zt92TkEm9WMEfHWTvWzZRiU0gtQEn6VP0K85Ys5 / Pq \ nHn734Etcs / kSLvjV7 / nOgxdxy0338bHzMjz / C4 + ffKXEr7 / / cRavXMEzWxWO7lLIztQhuBWEIEoo \ nEcYowBc + / z0WzZ1HRHBoSal4RY / PfPorDPg6lCe46ctX8L1fv05p5BSq5EFJJGpP88Zvb + ffbr6U \ nQdPFqkYIXIk / v / BHdDPPSVTCXsDnrryIL3 / 2e + jmKKpcJB1Ksqb5ZW796vWcfPOvhBK9lIcKrFm5 \ nmjHL5buf / T5Th / bSdtYqdGEJJGP4oQbGSllCKagMvkmgpSiceIGel / 7AHXsv54u3voJi1hOqW87C \ ntgam33gS59QOpnY + hDxnDTff + g / EO + byq4f6OOfKq2hqa + bG6y7DnorTs6OPUSfKRElB01VC85uJ \ n9 + U4cfIgub4Y2aHDJOzXCNwkY2KY9lQrnuRxbO / zjJ48gJJYyFgeCjGN0Jwwbz6zhZGeIR5 + fCvF \ nVIwoZcYLFYazk7ToSVasXIafFzj07tOEpDijxhiZYwdIz2vC6n0VmQrWcI5uI48wbqDo9dh7t2Oe \ ncybBX / dRmt9K5cQI8 + / 8Nn / 92X + jazkOvPwoc + Yt5sZPn0Nh4BTtgU5zcikz090sW3UBW568n1N7 \ n3saPRJEcB7tUQIgGCIHyXpQ1AIn6BixBomAJ9I6ZzF + 6mL7BKQ4d62eiYvPc1rcZxYRYhLGZPCf6 \ nh1DCMUQ1RDweJxGNYiFj + RDE0wTMEgp1PTQ7frCKHBueprlGId7UyuVntOA6AQtTKrVawMJaiWsW \ nhtGdKikljaLA5YvTzAkrREMSzWEZ33PwhQSpUBhNVQHwT6cnIpEoEVGgd2AMURQQhNkxiuW7eHhI \ nkk4lX + Hg / j2EQiESySSyLNPeMQ8 / HEESRcqWDbJK1oaYJuK4LrFwjNbmVkx3VpuXbk7RFAXfmf3g \ nJ9gCjhMnYzpoqoIvgiJJJJvaebS7QMZTGUcnGtOZKtq82OsiKgqaJCBrIUoVE1GSTm9zQtFycBDw \ nBFiycgWpznmcccYZuPg4gY8QeCSjYVRVRZNUUlGNi9YsRjFNsC3WzG3hkiWtXLG4lc9tWsKHltdz \ nw6pWrlhYz1Xz5rMipLO2oYlYuBZVUciJKl31IWzDonuswuBIlmPjNm8eHaU + HiKNwGjfcexCDrt / \ njF88sJOLljWyqbMeXAnUOk65LiNjI8yb08z65YsxLZu6CKxf3Mo77x6iWLWYsP53Y9F78lH0P + / 8 \ n + p01Gz5EZVEjXjnMr26 / iAWLEszUtnLsuEC1aSP9PQfoOzrK8aEcYiAS0kO8suVxXnyswjNPTUD1 \ naSIrEyxZNodCtIba6ZeprbhM5U / gESHARRYEBsem0USBTD7H9Refzy9 / 8QA5LURdopGj3QNogc2c \ nprlk8jmSKqy77H2c6htgJt9PQ + 0SgkoGpSxxcrRIJF6HIEuUyxmGDvXQFoVP39jGRP9uJto / zng + \ nzZaXjxOJ1eCYS7jrO5fy5A9uZfpYN7SvpWnFQgaOHUCoZNAEi / LYGIpcQ4MWpaRplIsOmiWhBjMk \ ntQwDRzLc8 + vXaRzbSb73GFWjTLK9jse3PscDj7zE9OQIulmgf3QUsVKgdcN6tt77Z / SYyhWXn8cb \ nr23hkzfcwFuHj + POzHDp1 / 6JkZceJdXZQe2Zm9m7u4 + FCzpRFRicPsHVcxtIti2hqtdBJMo3f / Ij \ nLvnYR9nx + NOUAihls3TOSXH5pVdxvHuYVEcjYU9mYnSYTLFEvDDK0g99hd5n7iKW68MXNSw3iiLq \ n1Hasptq7FVUL8aWvX033O / tItCwk887rdF19DafK9ThuEffZl4ldfxFv / uAXNNxwI6f + eA + HZly0 \ n / 4e59wrTo7qzd9 / KVV + OndXdamUhskQSORowyYMjtsdjHMbYOMzfaWyPzTxO45wxDjhgMMlgYzIm \ nBwFCQgIUu9VSq3P6cqhc + 1w04 / / VOXfngbr6Lr6r2lXrqb1 + a79r1xTd776A1ugwazqGeP6Je7j + \ nJ59j6wOvEDv8EFkxzrc + + 3buevA1fL / B56 / 5f08C / P953Xbr7dctLpYQQqLh2kzPLpKMmQQiwHFc \ nhCKDouL7Hs1GHc91cH2bIPRBSKiyhhP4TFWazDVayJKEiCJ0XcMOXZJ6AkPzCL2IeDxFZ9Qglu3A \ ncx1kVWd1ZwIl8OjsH0TPFzmuU6KLJrtnGmw + djWdSpu8ZZFL5Qh8l7ITLLHIQ4EuS3hBRMsNadn / \ nWzRt4QQekqriBREiDElYBvVaDcuyIAJVVfDsFlIo0WrbqDLoqkoipuNLEkKWabo2i4slHNuhUqvh \ n + wI7kolpGnE9jaHJfPD4XubqDXRdZq6lUUypVCtt9h5eYHixjouLHvpogcS + sXn2NwRHF3Ra0tIh \ nnF0LDi3XRkIlkGRsSWd2vkK5tMiRa4ZQRMDooQkQAk / WaLZtOjIZvJZPmhqbOlUmp2a4cOMKTljV \ njVsvv14nGBKZaRKJJC / vGebgYotpO2Ck7jFabvPa1AIzFYepUou2EDi + h6RIyFHIxGydA / M + umaw \ nbv0aqqUSk + 2AahQxXXHYvRAwMt9gbKGCrkBWyfDS6CTveMtG / vTMCM1AZawa0NbTVJwQXZG5 + hOf \ nfnOlXH5y7Sevmz20lcb4i + gM8Mxhg1dGJWLSSmTFZGb0AAuLoxihRsGZZ83GELW4Gj1xNk5nN168 \ ng3deuZ5HG6cytSiz775tdGllxMwUlSaoukFoeNSqLoGQkX0b29C54u1nQr3O4UoL01aZbpj82 / vO \ n48EXdtMSEietLPLw9oMQOZSrIfW53chWDK9VpS0p + LSoVx1ahsI73 / MvHNi5h13bh1lsdJKbeJCF \ nIz + KkUxyfKfG2KPf5enHtxLrHaSw7ChW9C9jenoSWagMnXIqstSGQCOxYpDFyAJcPC2J165hySrN \ nckDUOIAZtAmyKS6 + + j08vmUbkVrkoYe30z3UR7pvOaX5BmquSMzM0HvqZq69eCMNtY9du3dT7F / J \ n4clZcj3dMLfI8Iv3MHTx + zFExI7Hn6QjKXHB8Sme3 / IQ61JFdlSbHHIVNp + 4ieGdO4lCwV9 + dAOV \ nQCebg0xMwfVm + MpHj + OCc09jZWwUtxlnZHI3V5yzgRcOl / jC + 1bieDn0ji4qh4bxZ16mofTw1rPW \ n81osxTvWdHPTw49SOvAqYXWMwdMuxZkf4YK1ZU7 / 0AkEvZdyQuMRrv3UqYw88Bpf + daH + P2vHqNw \ nRDdWLMOWZ26kdXg7Z21eTVZxefLeP2MUUriFHm792zNIUp1kIsWnP / LGCPpX / vOL13muh + 16hAhU \ nWaHetJc8bknC83xUVSWbzWAYBoZhIAuBJASmpRPKNiLQEIoKRISRwI8CUrE4vcU8h2YWSRY6OTxX \ nw0wk2HqohK2lKdkO9abDyGyVpu3TQEaOZ3ju2RdZcEOkRJFKrYIqwXMzIc3GAj39a5ldmCdCwg5C \ niCJs16GjmCUMQ6x4DBGFpHMpYlYKRfgkXx8UxuNxFEVBliRs13k9ytjCMAWyDJ5v43hLBcxJHY5Y \ nM0h3Ic3KlcuQI5dMTKMjFcP3Q3JxkzW9FicmBNPNFlunPJq2oNMSRErEvolFPFVD0nSOKGggQvZO \ nV1FUg1WdKUZnFjEih5G6jNPyaYU + NhK + H5HLZHBCsOw50prKaNlhMKOxeU2RifkagZDY3C0TSTLb \ nxxt84vy1PPfyHjRFx / ECJAT5tMGW4WmmpucwlRDDSBBYGRKmRkwVeK5CEAUo0tK8QFGUpUGttFRq \ nLUUCV0jsHZuk6YXENRXL0uhOJzB1hUzcIGmo6IpBqeVQyOoc36txqCwjIhtd15aq9qSIWnmef / 8 / \ nX3pz0RZXdC8XvhrHczRC1cMc6KB39VmsXbma4dE7Oe / cI3nk2ZDGosJVF + 7l3BUdNJq9XPChO8n0 \ narQP72f54Dlkhi5k22svcMlXv8hDn7uS9ZLN4UaLkCpWNoff0qg6LSRDIx5omIkF3n / Wpdy + dRel \ nUpkcJskkuGqbVjtJLPKohBqmYVBtzdGVjIiMDH5QQ / KTuGGLVL6bWn2MROFonOoUA0JjbGqUYr6H \ nw0ECw3MRHf0cd9aVLFRqaIHN4bkFSrOzDK1dThRJbDrxBIYPDTM + eZhzj97E2L59HLsuyV1 / vhnM \ nArGukznmxCo / + 9qXOPv0j9CSV2AvDHPXs3dw7yOPceONL + DJDd5 / 6ak8 + fQziOyRzL7yKpf / 9FPM \ nPjTKocoC7ug + 5pwWy / tXokZN1GaJ6VqDfGTRmniF4opjmN76AO1MD1qxD6U4yNvecwpbn97DZW + 7 \ nkO9 + 5ask3BzZc45lbNsLsLAVXRti1foU8fwy / vDrH1GbneSRF3fx0 + / eSml6LyuPWIEo9HHvH37I \ nJR / 7BkVvgove8Ra + + / EPcPLl7 + Xvd / + ODVaBXz18E5dd8Flee + oejjrmOOju49xTNrPd2cOvf3Qf \ n7111HN + + 48sY / Zv46We + x66JMh / 61a84NDLCgV / + mPbkQezmPMLQuOxfruTWu5 / mQ194Kz25Ee7 / \ n2wKv7Q + Zeu3RN8RDH + juFVosSaNdxm23iEIZTVEwTRNkGdu2lwZwhonXrGAYxj8Pj / i + R6hI6Mgk \ nDY2yHZAyNAI / IB6Po + oacuBQajiYEgSyoDudZrrl0ZW08IKQsdk5 + os5IkPhjI1H8Ld / bCNmqOi6 \ nSavRpJgycWSddqNFRz5BvWYjhKAeyaiSy + qVy5kfPUwGEJZGp64hfAdRSBC34mSCFqnIp2amMZsO \ na9bDYi1CExa + 7xO3QuS2j63GsN0YA4M5Ht + + F01JMufamJZAkxLkDI20IqhLECgSF512LNWXn2Sx \ nsZRsaWpx1HaLeELn3j0zNLUklx / Vh2GXURSJf + xeoOzLXLw6iRlISHLEH0c9NNNEhD6qJMhlEhiy \ nxr7de4h3LKNcbxOh0BmXOKo / x3nHLOOH97yAIydRI592s0FWlQlzvThOHb + xyEfeeTlbtu9mtlyl \ nUS3RmU2TTprsm1wkk0iSTicoOQEJRSbwHOLxOJIfYKjQFiAiCFWTdquNHy6BtgxLRY88Ko02ViKO \ nsD1UVcYwDNrNCp4Xcfn5nTz1QpN8PoeqKktWVRTRarX469aRN9lQdPkJwm3WyGZj + K0GoWqhWsuZ \ nb9TJdHXjhROoYT + W3sT3DXQzoF6TcNQqA7kClXoVxVxJeWYMJayQTRQIF3bguwHEdEzdx5MECzVI \ nxOJ4nkfOkGirsDr02eerRIZEt2vhGj4tP0CEc2hanvWrlrN99zCFri70ME7dW8SMuzTbaRynhqWn \ nEXabmr9Ad7YPWYtQ58ucctzxbH9lP9XBC3FToDsR1GdoNyooXpnIcxk8diN9Q2t59sUdpAyTeqVK \ nUMgy2D3A5GgNPRvh1Vv8 + Adv59c / 30PFn6PuxQnCBpV9L2OYHVz7sbP57S3bMdIJrv7Yh3jwjz + m \ nlhsgo2p0XXw + W77 + A8684l945uYf0JZTdA + sQwpcRre9RKojjx / 5KFMLSCtOYfCIJLO7D5B0sowG \ n83z1lt / wg09 + hnTL44zNJ7PV1Knc / QyJZXVmDyzSsT7NQhW + 9Y2v8cmrP85 / fv37fOu69 / OZz72T \ nv91wL3PtJq8emGV1PsbjC3UuP / PdqPYY199wDffePUr2iHP40w0 / wCm9Slrt4ZYnf82X3vs93vG5 \ n93LT177D8f9 + KaF7FDuu / 3d6z7 + aeGUHjz68B + nk07n + xh9zx5VHccBbzshohUIuhh7z8UKT1lxA \ nx7I0h6f2k8 / 1YckWe3c8 + IYI + tknbhITExO4TsC / fPQa / vjzHyBrOnoU0Xqd2CeEwFA1dJmlL3R5 \ n6eSipSsEQsb3fXR16di3iDwURUMIQctuY / seMqBpCkPr1qBEgnazQb1eR4ileJusKDhOkwtOfwv3 \ nPvkkhmGS1DQSpkap3qZYSOO3BRoGZiKgXA7RwjoDy7qYWSjRank0pYDeBLzjnOPYOTrP7GyTTcvT \ nPHuwzVyjge17WIaBETls3LiZp7ZsAUtCuBa9SY / I85lsBqDFOGdQpRzK6JLBodkmK7rj7Dwwwbqh \ nLiQzxRn9Chs2HcfD9z1FlxljWV + B5IpuTKGw / fHnefIwJHq7uOaSVbTrdZ5 / aYLXFh2Gshme2DeD \ nKXvkEybJdIpndh1C00KyusFAdw7XsVnR1cHzBxdIapBJZyhXG2ixBHJgk4tL6EacXSNTSFGIljAZ \ nzGhISpwAhVq7Tb1tY2g6ybiMqqpkYilUy2JiepFSs7608EIlCAVBEOAHLrquEzcU8CNCVSN0bVRN \ n + SfK11AkPElgSDKpVAoviPAj0BWV6bkSR69KMDcr8HWV8clR + juXoZkRhqxw27PDby5BX9a9QbhE \ nJGjhRAqebGIZKay8SaMlLzEXZI1cNs1iuUqmq8ji4jyGlsdtVnHaTVRnHsv3UISPUUjhVxvUJZVI \ nBGg0aAQqGhlUz8e1JFJ6mZZdIOeME6QGaEUOtNskizkuedulVPcf5tFnX6IjsplLGLiOjKm5LBvo \ npelrqAeGmch2k1AE / X0G + w8pmGKWVBJqpTSGmCWndHO43UIt9tKdiSjk83iex77xaXRV5d1XfYDb \ nb72RVs3GMAt0rOxn5uA4m866jG1P / J4 / 3ftXrnr7J1m2 + kgqUxNUlYCu1eeg1Hcxsus1ClYMx65h \ nByYb334trzzzJ / SWipzv44KzVhPbsJkH / uMDeO0EkuST617NYnmWMBB0ZWdpmGshjNGz / khCzyMS \ nLpGe4t / + 7Qx2Pz3C888 + R7nuETZtLEtCiSK63nYaM48 + jF + pYMUkJmcXiRWTdBSHUAiYnh0hHkSE \ nc3U2nLaGw1MeU4dnyS7vpzkzSabQT9mQ + MLV / 8qNf7yF6sguus55N + 89c5pb7i + ilLcxNdekNTNO \ nKqsS611FK5wjE99AonuA1s6HWWxBVy7OXL1G / 1FDTE7O0Kpa1O06he40cV1jZZ9OXz5Ff2aAcmjz \ n8 + / 87A0R9BVdHUIIgYig4UWoEWQ6eqjMH8JnyQt3HIdUPIHv + / + k6UmSRDwep9FoYBgGlmGiqiqy \ nFAJLXBFJkYkin7imI0SIoWgICaJIIISA13PgIoroyMgMDq7m4NgkCIGmqsQTFq16Fdv2yOUVFC / G \ nyq4cry5MoHjQ9FRkzcKSIkIEBC66pqGIEBUDV5OZX2xSsW0Uw0CEHrqhcP5Ja7ni / BO44ZZ7WfBy \ nTI + N44gAu22TjJkcOdDJ1Pwk / T0FxqYrNAKDDX1xDozNYyYyrB / q5ZzT13Lb7 / 8KQiKpRniWyux4 \ nFb3YS0pRSKc0Fis1dNOikI3z4p4xNLNAELSpux6KZlK0JJZ3ZzEij5oToBkG1WqLmBxR7OmhQwvZ \ ncmAKFB2FELvd5qg1 / RyuhpihswQFS2QJ7QaRrFFtOWiyRL1tY5kGpWoTVVFpuA5J0yKSl / LjURTh \ nOQ65WIpEIoEjAmq1KgEqMdMgn7HQJQ1ZAU3TKJVKlNsBIgxpux6apuFGErWWTUyFYkpjTcZnzI + x \ nPq6ybl0300EHz295iXiukzue2PrmEvTe / iMFng + yTISEoukgWQSN / QgpjVxYiRWzqFYWWbtqBbPT \ n + wi0HFqriltbRPFb2EoMIZuoskPbV4jqLTxLRkVgSjINpYXU0EilcoSSS7M5Q0zt4JiVBYZH9mHm \ n + mn6Ps1mCUVT6I / FiPX00ZMq8uKLz + OoKSQcYhZIZpavXHMxP / jhbZRkj6LSYN7pJKPWqLgmG46M \ nmDlcRnWW40kh7dYokTyA53kcf / zx7J2vkcvl0D2Hmem9tOs2G45Zxv4DLm4oiCKfwqqj2XDkWZx6 \ nUoLrf / l7YmmV + ZLF8vVHcejl + 9FsidBUMBNFTr7wI9x3928QoUvn4EZW9sYYmzjItT / 7Pl84ZTMr \ nNpzPYtuhaMaIUkttOaXhvaw4 + ihmG03mR + fIxOMUsjqdVie7Rnbgl1skcgqXnXgyd93 + EHJMsHlz \ nnvGFbby2v8jK5R1Mj01hJVOIrE6rGhL5Nh2JTpSYw + KhcerNFl0xHUtW + Pw3P8111 / 0KIWl4wiTs \ nkLBGx8gdtYmJkSbpdJPONcfiHNrD3NwUgWlw0 / UnsHPvOL + / 32CxNU59XKGgN + jsWEbDb9K3YSUH \ n7v0rH7v2XVz / m7uokEZLp + hL5pgcnSST1GiGFlFMozby8hsi6L3ZtKjbLYrpLOOlCpokY + gx2t2r \ nMOb3kLcMXC94fdi2lIf + 399LvG4ZRVHQVQ1JktB0BSEEnuchRIgmKxi6jht6EIT48QTXnJTkti0h \ nkVQnDARIglw2Q2cqztjMPKZhEAUBfgSe6y75 + 1GJgpzilDVJnhjX0JQ6pw / WeGVeZv9UAkNXUQyT \ nyLMxVRlVllAlGdkwaLdc1HgCz3dRkEglY / R2Fhg5dJD5 + QqD3V0IK0HgeHznvBn22Cdw9IZNbNux \ nl + nSNLlYgNNsMl6JaNgRalwnn4rhCIfR4THWrV3F4OB6FtUcsVgM07RQNRXHdoAAK5GmVrOJx2PE \ n4wkAdu4aISVqeE4b22kTaTGcyiKlhQW8wKZeKjPYlWO81KC3kEJRTXzfxwkl5CjCcZbq8kAiDAN0 \ n08T3Par1FqGQsGIWtm2jKQIkA8mIMzE7hRqFWIk4SBqycOgudBPJEouLi2TTGar12pKF22ijKCrZ \ ndBxD8ilkM5RaPkmN162UNq7r0ttZxFZMUqLC4UUfTYEvXrmG790zTioqo + d6uf2JnW8uQe858ngR \ nLNSIy9oSr0ESuOTxvWkMIhw9SzqqUg0gSnUjVafQJR0JF082ibQ4uldHwSPS0mimilOuUtZNNNfH \ n1CJqqsLPrruU7 / / sMSZHplhxRJbRQxEJUWYom2amVKOuqKhymlVDEeGkh1rsYqTioHo2TujjeS5J \ ny0Qy0lSzTQZLOtPhDFHZIb3yBDLVOtNKiyOWF7j6fW / l49f9grVqAWMwxfYDFTLpDLVajUGpyp9v \ nuYnH91T4xn9 / C4UYflild9CiWvaRlAQxo5um6TE / 4fLklju4 + mNX0bNhAy / e + hQf / urHuPCiS / nz \ n7lH + 9tVvsFxv8Oubf8MV77oBNbaDG376I37zvRvQLnknYtvzPH3nFj72i2 / z8vg + jj / 3LA7tHmfP \ nvMCZ24uZTGI / vZP2yFYMrcqV79vIySfk + N73XmG4fARJSUZtPc1 / f + m7XPvYdpwtN6BK67jhmx / g \ nHe + 8mmL / ciLdRyOJQkDgOMhRSDrZZn5ijNtu / DDf / MHNtNsbCZwGU5OTEM9gBDIVPWIgs8DatWfz \ nyo69zC74GPkGlTmVRNcKXEvmg + 9bw + ff2cMjz + l843 + + g + GmqQZdJAoQNS1i0QKbT0qxbkWTH / z2 \ nECtWb6QrIzM9vYCkzrFnIsbRazI89ven3xBB784khSVrRIpEPRSErkckB5iyTltPEc92c86GHoQs \ n88Kzz / 7TblFej9wlk0lc10USSy + 6qsn / / ApEyP / 8fxB6GLJKIh7ny1e0 + fZdMkefcAYvbduCEqn4 \ neJhmEi90mZmZQdEM8AN0XUfoFqZuMBCOsHJtgdFDHoGksTafxsrGqTQrPDHsk8mmSZga9fIiCIlW \ n4JOQIqZrDXQ9Rn9vFycffQT3P7 + TZr3B8mwCyxSono + nGnTrguFmBUPSWVhsku9K0aFZCCvB / Nw0 \ n2VicKGwjqymakcTDD / 8URTMJJA0l9JEkBUSEkCUQYinCqauI0EXG + CfuVsiCT1zzE3QNZqs + 3Vmd \ n6bKDrAQELQ + vMYOKxKsTZRRFwRA2 + WInQghKlRoJS1 + KhAr + uRbIEvV6nXgiSbUdUq1WkHSVuKGi \ nyjL9y5ZzYOwgSUXFVyVW9HTQKM9xYLZOLrs0VE5ZBgEy5XIZVdVQFTAVGVQdPwxBMfHsOpGiE4VL \ ndpkIIjp7Bjg63kA3BE / sbXLWMoNHqzJdXUWmFubZihdtyAAAIABJREFUu2fizSXo3R19QjMySOgo \ nok09jIjFc7j1BnrUpm0VINmBPrODRMzEJU7gLoBQ8SQdD41EPEngVBAiQnZdKoqMKst0qApVHGxX \ n5dxjOnjilTJhVCUlabhakrgqUAOPI1ZlObC / TU2zkYjTlVY47ogCf3lqL3FF4fMfv4Yvff3rrFqx \ nnJKj44kQYTsYMZVkrpcLTl7P3fc + iKzGqLVckukY69au5PC2XVS8EEwDPZ6k1nYwDIHvuGTSRSqz \ nc0iaYN3gsVQXR5ibrzN41JHUwhaNtkzOkll35rtJif2c97YP8F / f + yxnnPt5Hr / tt + jmAhdf81X + \ n / OvfE43s5Itf / Sy3P36ASkvD3 / 0EnVd / htG / 3UMx6dGYrtF96rEUM0Wee2EnXcRpxmR61hxDpxln \ n692 / YPmyArm1J1JzbbRmlcau58l2djBsd5I4YQVOvY1aOsBlJx7Hzbc9TucKm6HC29k78QKRLFDm \ n97Dp0kt47LGX2Bib49prLuHZp7ayY3uFjpNO5y83 / Y5Tjh9i1bIKbz39TK75j4co + QmGBlfQthMc \ ndXwKvMPsfc3gwPjzdGQHCWUfJXKJkkMMrjjA8viJnLqmTtc6mxe3n8DerS8xXHqUjlM / SLwxj5Bb \ nDD89R2xoORM7HmPzqSfx4D9GCMu73hhBTyWEpmkoCORUjkqlgiQCTjjhJGZLFVzXIZ / OEI9ZxHUD \ noanUKvNIkoRdb2HFLQ6MjGDoxutlC / / XkpEjgawp + KEPkYwsS1y4vouphWmeO1RjfUZnsi5TkwSW \ nFUMzdFRFRkUmCAOmZmfo7 + 8nrujsmZniu + 8 + hWdeepEHh0P6rIihgSz9Rpt9VYW4v8iwWIEkK6wd \ n7Md3HYTr0Gg38GsL1EoV8sU83ekkw4fG6e7Mk8wWcNsOw + MTKCIkFtNZf8RRBK0qi6V5Di7aWJpM \ nrtBF2KqxbKCfsF2nMx9nfmKC39 / / Z5CXCr6FEEiyjAhDJEUDIZawt0uqC6hLvKrXxf6Tn / 4JCoLF \ neptMMkap6dBXSNBqe2zbtg1FUaiUa2i6RDGbwzBN2nYbBDjB0g5IM2Satoel6WTTSZLxGJV6k6np \ nBTRTo6eYxLMbRH6EZcXp7e0j9Gyk0ENEChOlMjMNl3wqyfT8Ih2dRarVBoEf0N1ZRHbaeKqGLEs4 \ nzQYikhChj5mIsWbNKg4O72feq6FoeSRTJbLbHN2dYHyxyoIt0dtZYHKhxIGRuTeXoPd0rBZCDjHi \ nWZxGFSmWR4patJ0I00wSthZQJQ8jt5wADaU9T66Qwq43KFeryIqKG2k4Xpt00sCr13DVBFLOot + u \ nU9J12o6gI5On1SwTej52ZHHvLz / Plf / + dWQrScFtkBLzHKgpyPku4maI6rmU1TinnNCLGC + z / dA4 \ nQjGJ5DhqKondqLFMtRi1HbKqj27IBEKj7QvSOR17YZ6OQg / B5ALjapaurgyuV8P1NBxPxtDAD0I2 \ nbejGDEu8NNrklz / + LCefcgknnnI + ZQwUvchZbz2VFx / aijdgERxW6DOnGTk4gZ / oQHZb3LrlPj7 + \ nrk + hxFIs33guB3Ycojz6ANc89DDGZIO / fvN9fO / XP + G / bhjmXR + + iO99 + IMsW97BNV / 8Avffu5 + J \ nVx9mrFJDV1N0nX0V + 37130jdWdYsX8UF7z + Nyj8e5c7rb6X7qLWkag2qA0NMPPYoVq6IWLmWb3 / m \ nIv60r5uLug / z9ymwlE76yvu55l0q2w6 + jd / + + L2cuSJk3bX / w4N / 2cLH3lrhlSdn + O3Nu6hOuZx6 \ nfp4XdrQZWnMcltagOf8MvYPreGJHlWJ2kY + c9zZihRL / c9 + rVJ6fY8V6hVxmkDPOPp6j + iVeHb6f \ nU6 + 4gY + 8 / SrUTC + VmTKq66Lkl3HttSdy8knv5vQNR71BX + gpYWgauqRQlwSuE + JHEGoGspDo7y6S \ nSCQwLIvdO3eiGTEKGQPf9 / EbZWK5IkEQoKlLVkvgepjxOACKqqMoOqrwkZAINJWilOW0 / HP8Zn + C \ n47MWjggY2nQuM1sfZaRloMfzoEuoCPB80FVkSSBcmaIS0ansZDx9Bp7nE0UR + cYoXzmrxR / 3DTI6 \ nb1MqOwz0pqg0XRr1Jp3d3dSaPisKBrvGZ / DbLY7bsJpqrUW73aZuN + jMddDR0cHiYplUMc + hsXls \ nSbBQa6GHEYmEzOq + Ap7tEEsUMS2DbS / v4PHn7sbSfZAAJEIZlEghkgS3 / vx6rvjk1cQCZSnH33J5 \ n6rEdnHvRJpB03v9v / 0km0UnV9UhaMqWWTz4dw7fb1OfGCQMJWZXIp01qbY90TCG / bIjdh + cYOVRm \ nQx4ynQWmx8fo6tlA6JVfr5tro1sJpqZncfylMuh8NsX + w4us7YpRzKeXPHQhCAKoNZsIaWmIndIi \ nhKrT8mxisoEumhidq9g3dpi67SM0H0nRUCIf15dQFJVIiVBDGVWDVttDhCFCXSoGITJoe23mZ6pv \ nLkHv6Fgr3CBAlyXCwMM0DRRVEPmgpjso1epkUkkkERI6DWS7gVA0ZAR1KUEQCbSgjoyHrhrUhUCS \ nYySsOu58mY9cexW / + MPTBI5LIqUReArFYhKjNc5iWMC2bQylSaYl0ZMrsOD7NKMAEYQ0lTSKPMUa \ n1aSV7afaatFoNLA0k7qhkq3XuPAdV3Dn3x6hkDUoL5SJYhbC8YjHZZRmQCoUzCaH6M4WuPLSk / jj \ n3x / ADzQqM6Nokk9H1MFkp098w0kM9JxEV6LFwT2PMfLiTqyOXvzFKtmkjqL30Axa5CJB4NiEhk7x \ nnEvp82XueX4EY / Yu1l76bRTJRzPa5C + + jJnXRvn + aQF / 2dlm52sHWJtV2TJdRkx5SPlOYkqSxYmX \ n6TllExMvvsTM5CKf + sud / OVf30VjbhxHCpDsGpYsiMeSCCvP / Pw0SV1mxZHr2blzP / qyAievWMtU \ n30oWDlX5zEUmi7UaN / xhGxf + ny / y7MP3EQzPcsYnr0UMHMnC9lt5W9cs3 / zRbUh2N4ViF7oc8bFP \ nfpXrvvyvCDOFGBjC2HuQD37vWnbOOKzqW8WNX7iGZCDTarW48afv4j8 + + 0c6cnl + ftNnOPu0 / 8Ia \ nLHDHTR / mJy / WefmnfyUxp1EJpyg7czj18hsm6KauE0UR7VgSd24aWUCqs5NSqYppmP + ERcUTHbSr \ n8wwM9SyR9ISHhgKAkJWleCMSkbQk7kKS6O5dxsTUNMcefTSN2SlennyFe85d4L232LRjG1iRb9MR \ ntjnommSFy4GmhBdAJIMIXUxNJxMziGs6hhvyjWtn + MVdXWh6gYOzNeT2LNlWA7lvLSXJZ + fEDHEt \ njoKEnsgxkJCJyQqtepllnSlKiwucsnkzN9 / 3BPPzFVasWEZ3PkM8Hqc7YxDYLqHns9BsY + k6frhU \ nQuFEErIkE0pLuwdVgXdfdQnnvuXUpRspLS3f3te2s2JoLULxmRwe59DheQZ6i6xcdwR / vOU + Bvvy \ nnPmWc / j + N68nQrB / osG6 / jSvHCqTTZh4fkBjbhyEulTrpsp4bpucmaAWNbAUBb3zGMZmy0wcOoQm \ nQ7fZwJUs2nabuCXTW8xSLdfo7SziOA6ypr6eL49wbJtkMkm0NA3EDQMsVcW2bSRLY2ahzHypiS3L \ nRLKMqmlEQYDwXQJdRUZBJcB2BLrvECUSRG6IqkHb9v + 5SwsiQbMREAQ + 5UrjzSXo3Z2rhSICFOES \ nygqykcDxIlwhEcsVoN1CDwNC3yNymgSWhh8ZKJKBUA20oEk2aSFEi5lyG1 + X0SSFId1F7spxcGwR \ n1CRKFOK6NTQlTlPorE80mIhSSwAdKSQ / 43DcxiEm9h / AME0mGyVKUo6 + fhMxGVKXJAJq6PkUihei \ npgpUp6YwEjoiUEjmE7RmZyku66JRaVDyJDS3SWcAc8lO3v7ui7jj73eTMhPMTs9i5rrJLxzmmPMu \ n4 + WmgVXsJRnrpBWUabXTuONPc + TQcSw6derVMWbGXuPYY4 / jmGW93Hz7HaSSJvH0W + hb3WL7g / eg \ nGivR19SJtu7kshvu585f / gp / 4hC2n + CjX / swycEN3H7LrYxt3c / Nt36X91x + FUe / 5XJGX3uBrKZS \ nmmsTj0WQ6aIxup / uoWUs7NmPpmTIDsU5ZsUy7r / / IRJ6AjmMGDj7AhYfewYnnSOqTtJOyqgNDbO / \ nj2BxGqnmUY / HGDLTbPzI5QSVOFPBPErfCvrri / zll9cRtXvIFHMYVoIPXJHlx7e9hp / ror86z6Zv \ n / QZn5Fmeuu + v + Me + i2LnURz43efJSx5pp0y9cATf / 9EcX353QFmtUSyupVZ + hb41 / Vz9 + Y / zvfd + \ nEzto0dXVy65X3ygPfUnQw0gQyjKGojExP0f0OmVDkpbeNxkJy4qTSi0lI3RdR5IEvlAwDB3NsJib \ nPozGkgWRLOToLHQyMTmOZ / usW38kE2PD2O2QL56c4MeP7KId62R1V5xdU3U + d1qe + 5 / fQzaZoOzp \ nNEIQkUBFEEYCSXIoqg5 / + Hmaj3y1yMzCIqoVxwhdPnR6g3M2qZzzLZOVJ51Iee8uZp2Ai09Yw / z0 \ nFKXZeRpuyODgCmYWq0RC0FPIgBSiIhGG / pJ1oavEYglkEeK + zqTxfEHb + d9OTgXf98mm4hQTXZhx \ nmx / 85lvAkpsiESGiCCnRzc + + fSMdnXEiz2W23KQldAwidAI + 9emrmBov8aebbuXV8Trru1McnLfR \ n1BARydjzh5FlmZiZYq5eQpIUTjDrpG2bZyoFnrOnuKx7FVp3kbbtsmd6glXdXXh + A1NdYsirMkQh \ n6LqOLEEUhfivr46mabQaDguNNrmOPJVKndCzEWbAprX9SJIgQiIRN / A9qLVtNp9yPE + 98AoPPfUq \ nqirj / y + FRZYQQYCqGni + D0IQ000SsQSyFoMw4tltO95cLBfPt1Fw8YSPFrk4tQZa4GLoKpQXsQIX \ nKXRIWBFyLk / bS6GRx5QsDLlFTitzoF0j4 / tIusWywT6kVhnXltg5PE0q0UvoN9FrHpZRJaPHMVyV \ niy6 / kEjJoqISOAGyFWNmagqzM40RK7Einud4I2LnM7dRj + r4rRZECZo1ga4l8LwGmYRJ5LoISVCu \ n1knEdCrTVSq2BVGNlhWQlgRbnvwpjzz + FGGgoZUHGYg8jKnDUCiybd80zVKJ + WfvYfaZB1FmXiKV \ nlsl39HBo / 5 / p7m0RFlJ8 + 5oPc + jpf3DDb29EbkdU5xbpjl5m3yPXI0wT1q0hx3rUnhxbf3oPysFh \ nPvC + E5C1Jp2da / jlNV / g8MP3cUK3wife + RGOuOgsQinHwIYzueyq / + Kcr / 6aVX1H0xtlkA2LcM8e \ nEr3LOOujX + Syt7 + DRx64j7hicMEpTdZkDI7WM0xjELfLyFKZbNlH1XTkV19GOA10tUmn02IhWmTn \ n3U / w2c9fyba776P6s1 / w8E0 / Y82ysymuyfPh73yDuXaVH945joilSDX2ss8JuP + bn + WpvTN88Qd3 \ n8J6LN2D / + YcYkUJjYpzY2z7NwKUX8KmrFqmFC6jpImcsK3LppZdzaF + JL177ZUQ + QTq / jIX5N66x \ nSJJYQq42W0RegK6q5PIpTEMhaelkkzFyqTjZbJZUKoWu6wRBQLvdplptMjs5RmlumrEDe8ALOfv8 \ nSzj + + OMpxFO0600mDk0R + R6vvfQsC + USrcjlyZ0v0Z8xMO1FkqLOKqPJn7bO8vWL02ixJM1QQYnA \ nVCQyxS4cNBpxm1DJkUyE2JJOX1c3p2 / oQWgqp56a5rxP + pj5dUxUbcYWKsyVWtgze1ksVTETFit7 \ nOnFaNZJGREdKp2030NQ4pUYbR0iEmo6DyfT8AnPVKrVajUajgeu6iMAln0mRSyfIpuKYpkmjWWa6 \ nVHndHwcpBIFAkjW + 8ZUbmLN9dh1YYP90jVM29PCVT57 / OiN8Sdt6V6xgei7AkCNkRSaf1NFMnUTM \ nwA2h3nZZbNpEQiOMVKbrbXQdTl3bgXBkEn0hf3p8L3 / bOkxZmAzPzrJ / us58K8KRYgRKHC2WAj1G \ nOwixgwBZ8kkaErrkE8o6ruNw4MAITqtFvruTvdMRNz07wa6RaVIxkzCMUDVB3JQpLUxx7PKjcM0C \ nrjaEG3TTN7CZ8rzO4qyMJJIUuo + m7iRRU13ke / volCsM6ZX / z + fvDamgM2SVKLDRZAuhyhx5ymkM \ n73wVWTZohS62W0fHB0 + h7dukrBiCJk4UA9ehFCZItF1m4gE126cx0uSIRAeHojoxOU25UUf260Tp \ nPDHzRH7x21P5xHt + xV13PYIaZqjVh + kdWE50SMGVPBqlClHKoIVGXlF4y9r3kKATr6tF6IcoqoKk \ n + oS + RFlL0pXtZnpilHQ + h9MuU / cFJj5hLo01N4Ewu3jLW / 6Tku0jBz5BuIOmNMSpF2 / m8Qcf46IP \ nXsGylV1cfP5G7nrsVva + WuG4EzrYvq3OcPNMDtTznHHxufz5luvJDq1GLETouiDWU + DlwzVO / vle \ nHvn0u9hY3sGU3sPaky / l + Sf2kFNDtjzwPJaU4A9f + hBdXUeyzupksTRFwm4xs6 / GwOYN7P / tRxl7 \ n8A7e / q0fs5hL0GxJDK45jclDw2jNBvf87mfEtTbLjz4XX0S84qYZjV5lZNcsJ / / rVaTsSfbccht + \ nUiFmqLg5g4yRoWXXCFQNYTtU56e5aONxhBMO8zkJ28twOHiNvvUn8qsvf424cLjsvPP4 / U1 / wc4b \ nZPsGUA5WsPQRmgdfoWNVES8V58wPXIK27zGefOEelIUyuq6iIBjcdAy3d2Xo + NONPHzfzfz6r1vI \ nrzia67 / 4WbreiIf69csXgmqthirpiFYd22mRMhJYehxHV5GkJUwrsoQuS0gixHWXttaqLEgkU0st \ n87JKJDzuuvPPCAI0TUWOAs44fg3N2TFS + Rh7D8 + ycWCAk / tiPL4rTzpj05ZVAjQ6E9385sVDZNIK \ n4eEYmd6IuqeAnmDzKpVYai3tVgOvNseqDqiWWlTaOqetXsOdz8NnPhPx05t2sL6vk0m / xvJkHs9K \ n05mPaPsSrmJimgoilGg2m4QCpmYmySQs6qUSAJEmk0ok8HyI0DC1EMcN6TISlLwWBiF9hQLnnXks \ n04stZmbn / + + NlJeKPx586HlsOUT32nztP96KiMdoNatEQls6gasrCCVE8udJpkL8mkHTCQiQCdsB \ nlXaVlmRxxFAvz764n0Zrkc2bjqA9HSJLOiu7bFYXJO56fo5kQkaRYyBF1FouhXgKoZnMNTwazQZe \ nJBO9nvOXFAgDUHQVAa9X2oGupWi0A5QG + G4bS4mzf8pj3SqPvo7k0jNiGcg + vPWSjdz / 5Iu4bouT \ nLzqZW269CxGmEZrP1OQkZ65bR9PuprZ3N4rdgz1boam / CeFcP / / R9depIsCTfOTApV5qEIoIXdLw \ nZQvFbROTAkIzRiSFBHhIZg4hF7B0h0UfUm5IIy7Rv3II25Wx3BaK6uPJMkI2WZYJkattGmKMe / 9a \ nJ43Hey7fzPaxBVQjxQ + / fy1P / m0XpWCKZr1JotCDV9d59JU7uPHmmylIHrf / / XPcdvt2nJZDQ9hk \ ndJVMSmNVPsNCs4aumQhcQsuCUEWSBSsKPSw2Fli1oYglPMySQt1ocOFHP0YtVqBen8dcmeKp3bM8 \ n8uzLPPK7BzCccfYthDSmDuAfnsR57X6Ktd2s6lN46aV5zj1HZ9XyJM89eD + r4jIH7r2Z02 / fwqFt \ nuxiQFmnqPQRVB607hu + kUeuLnHLVVex87kWUwdX4gcAPNNyxV2m8 + AfCxAAXf / rnPP3Efbjz4ySH \ n8rTsgKPf / Q6ueOtpYGVx4hZa9zp6 + 1YyWZvmlAveziv3 / Y5M5xDT4yHShuNYObAax0rB7Aif + OEv \ n + PvDD2FaaZJEtBsVJNlCZPqQbEFnt4PLAOLYftzIJHvUcTz72OMMru7iJ7f8mr / f9g + iHp1weobU \ nOZdxz423UN + 3jam2zalnXsRzD9zL8jM3URodJl13KVcamFv3ktl4Gr / 56xbabpXnnnsK3U9z5bXv \ n5y2nnPCGsFxuvvnW62zXJ6ZbuJGEpCtEmoRiWCiqhqKpKKqCZWhM12TaTpujBoq02k0uOLKXTd0G \ nSU0ik4xjSQqmHNAdN8kaGgVDoVypkUiksJSIlu3j + hHvP3MdsjvMjF8EQ6c7VyBltBkpt / n8mQ43 \ n7m5z / NknkZV8pstzJLIJ7njqFZzKHJHdZKZaxIzJtF1YVtSZmp1j0 / oi06Uqzz8zysnrBnCMLE9u \ nHWX / VJ3BjgxBEKHIIYuVGoVigSASmLpE23FQNBNNN1H1GI4T0HYdTE0mQCWUNHbXIuxGibVdOvdt \ nn6JVqTKxf5hXJytc9a6zkQkQkoIUBNx691MogczX / usd + EJFUXR0LQYKPPHsPoIo4KSNK5EkuPeB \ nl9Bkj3LNZXS2hDq / m7Vripx2RBcvv / QCxe4ERx1xJP94aS8XHjtIRrMIWwF37fB48k / / yZ03 / 4Vv \ nXuhyZGeOnuXHMj + ziGGZHJirE0kREWLpIFcYgqaCIhFFIIUCEYVIUogcCYQsYRgmTcdFIAgiWDUQ \ nJ5OKowK6ptBstnnkkacJdQNdStCsl / n3d15Eh7bI6t44RiLDQmmBiQPDNISgVF6kHgSkkkk + + en / \ neHOxXAaLq4QvHAI1iazHOPeiM3nhiQew2z6eY1GXYVU6yUGvhqYlSEQhrUoF2TRJWAYLlQY5mpRR \ nWblqkPr4PDVngTv + + gned + WdeHKERIuYF2BldG67 + 1be98GPk6nVGQ81tGwGqV7Gqzg4Tg3NiBHq \ nLr2ig3lpDj9ukKzU0YMM5YRJq91G1WsUUp2UbJtuM0vFEwSWwjIzZCbUMYKAqdkyGwbyGJLCwuEx \ nQjWNLFLY1CAbsunos3juxa1obouMmeOAGhL3Y + jhPIGnYJkyFaMTsz1PMzLQJJ0vfeNSzjjvRHYe \ neIVbr / spH778X / CLp1D / f9o70yC7rvJcP2vt + Yw9ne5Wq1tqzZYlW7I8yY4vHiDYjjGDMYEAIUCA \ nJFwgE5CEhMSVBMhwgyGkCpJgQ8VAGdshTAZsYmzjWR5lo8GWJXW3uqWe + 4x7nz2tdX / stvOL / ErK \ nlGo / f7rq9KlTdfbZ9a61v / V973vWlRzSDvf80Yd4w9vewt3a5atv2Mhl51zHoOlw6Qd + heapFb7 / \ n1W9jeoOsrXl0 / RadKGD8 / X / O / lu + yFt / 7W0Y513DN977GsY3b6U1eCa7hgPK / RtYiot0dMrT37iN \ noUKTTpwiWwnDfVXmRcjIYMj0coJIV9g5upbHD9QZv / KdyJlDHH / 2SUa3nk1p4wae + 9GPGN4 + TmN2 \ nCjm0hnCpzfbzLubwoz / F6K / RXZzEaxXoWEtsuPA8ePEUzWiOsy99LXuu + HVuuunTbHjVlWza0M / + \ nO3 / I9BP7KCz4UOllOZ5g3OijvPsKDh54gutu / jxHHroTOfAWHv / Q3lekhn7mGdv1xMQEpjCh6HDu \ nju08ue85bC / F7dvAoFhGWCZx3ectV53Ffz7wNGlq8fpLdvLDR3 / G4NBa5mZnMUsFFhspOvERwmDt \ nQIXluVmq1TJCGniug2FIHDTXndPLlaMHue7WCtqFASRD6zdx / 6MPc / tbbW5bvozvnqjjHz9I0EnZ \ nu30LjlHgB0 / tY + e6PqJY8p4rz2d6boGb73uegtT42uCDv1QlSWz + 4adzjA700O0G1OsNCgUbpUBp \ nRVc7KJViGDapTqk4JmEcYZomQkK5VKJgSHzfx7MEtb4Kjm3z8ONP8LHffR9f + vI3GFlbY8 / YAEdP \ nzLFmoEK52s99Dx1gZH0vjx9exnNMdm9Zi22EGDIzvoKUBw / XsSW87Zrd7N17Ib / zx5 / Dj4AkoOJ6 \ n / Pg / Pskl132GoWLMb7zxAkhNgtDh33 + yj5s + 8W6m7vwOfQMhH3844p / fvp2 / / 7ejfHWLwIwa / MX6 \ nC7jjh / swhIko9iKFejnfU5rZgfVL8wFFx81cNLWN1k2WlhpcuHsHzXaHck + ZJAiRSUKp3EOl0EaE \ n87ilXlAaWeij2 + liFCQfe981fOKvb6O2poQp4Lw953Hdh / 4flgDLtnFdl96eHg4eOfZz7 + 1XZIf + \ nD / / wuRtM18OMA + yBfl7cfwA / 1Ui7jDYUhdoQ9Zk5esyYpN5AaYGIYxxC / FDjJD6G6RDoiG7gkyy3 \ ncEcMbv7yXZTSEonnkUgTSlXWjRb49I23URjoQdfbNEyT3qEedGMZO + 5Sx8BybLSSODrAN0wCDcNj \ nY6iVBpFh4hZ7UX6E4Vjc + Hcf5Gu3 / ADhujg6ZqUR4itNtLyCUSzRaS3h6YQ3vfZqHplqsrNPUO8t \ nULvwHUTBMifrMdWhcbYWivTuOh / ZXGK01UBvuYjlhRni3i1c8 + bLOT63hF6Z41d + 6ze5 / fsvcOHO \ nC / n3mw7wzLZrefzQQ / zgk39A3zW / xujQNpRtM + VaXLuxy11fuZelwWGOP36I0cIgXPFr9Ow8mzBO \ nONmYo + aHiLFzcLb2c3LfIxy95zZ6gxDZqBPEkqVnfkrU9GkcfYHB / grt6f2EaYP167ah + ys0F + t8 \ n + d0BH3iHx1e + HfOBP / oMU9Nd0tkXCKcOoOdniYtlmnOLlPv7EYszGNrGokw4t4jCg3abMFSct3GY \ nxeU6xuVjfPtLn + WZR + aYPXmUdqeX49PzHHrsdsSJQ0T79jNx9z3MTxzEDUwsz + e6911IoXo + 83MR \ npfVDbNi4gce + dift2RWaP / oeH / 29974iO / SPfuyjNzi2R62geef546wrJszML / Pmnb0knTqTi22k \ nLIBIeebFBepdjWE7HJ6aZSWE + WZAF5OVepD5frguQkgWGx06SYIF9Ff7WeiENDshS8rlmemIcdXg \ nO1Nl6n6AWxql220wtK7CF783z5H + Cyk7HrPHXwQ0xWSFRnsFzyvi6YRGYrDeaWG7Ng8fmmW20cTv \ nBlx1Ro25TsTBuRDf75CkWYC0sooYpsS1LcquQdEx6LNhw1A / m4YcNtRK1DyLfstgvL + M5wj2nDFO \ n0comY4PGIhu37 + LJ / c8zWvXoKTk0I1jxY469iDrhAAAW1klEQVTNN3nqhWm0kDQjTRR2qBYtkm6H \ nxXqDgo44f6DJqZVF1g06nLtzI3d8bz + 1dh2v6TMyWKNudggTRUUnLExP8bortrEwe4o77j1CrU / z \ n4HMLvP9De / ne4xMshBXGB0eYjya48OrruWXe4JaGplwb5bmJOaRUmJaNMCQISbWnB8t1kKaJkBJD \ nGiggBcKoi2dodmyoMRRNUrANMAzsQpG1VY / Wsf0sqiL / + tk / 4 / Ddd8HYeoTMSjX + Spezdu7kp / ue \ npLfHAaEZH66w7NugNJWe7Myl5BV432 / / zi + Wfe5nv3jbDYnfxjEcXMumEYaUHRutQyw3ob3Ywux3 \ naQcCMTBCZFcZ2raVRpwy4hXodlaIU4vRfgNMC6dS4pyz9nBitk2aJiRRSKwFVqGX + VMnUNIkoEFZ \ ndIhkibO3r2Hh8CSyv0BFVKh3FUL7lESFZd3PWTs2cmR6hTVVe7XrYIGu5WHrEpNTB / EjD9kNoLdA \ nt6UY7DVIkyJuvERZR5x / 8av44T33s6JTVJiy1FIsHXyOqRMTmGlM1OowShObiE7vGkZ3XszRmaMU \ ntYlY2MeLTx6mrBs4Tg + nxDDv + fXX8eHX / CbDr72AuR98jfDFOnfd / Q3 + 5A2vZcvereyfNbj80tdw \ n7Pvf5Cf3PkwlbuF0Yo7PHmTpqdt511t2s + GiC9h3z4O855O / z703fR7v0QPYZ5xJ + Px + mszQ0mX6 \ nwlOkQ1Vacz5Rcoy0MEjSLqJ7Bljo + CAdDH + RRu + 50PNqHv3pU4y9 / g1sv2QXO89ex9rxTbTCLqdm \ nG5TsmHRpgVaqcdonqbsVqp1luuUCVv04qTMATcnW376SvUFIffYE3 / rO9xkrjvK5v38L933nPnSn \ njZcWKQ8v8m + 3 / xMPP / IUljRIjAJPPxUTbqhSOmuciaVJUldSqBX40 / e8lmlt8N5rr35FBP2OL3 / h \ nhsu2DnLuul7KZY / nZ5vMNAP2bFhHmsZMLwuEJTENE0GKaUj8SGOudkKkSme729WIs1SnyNVsTcOQ \ npImgriRYDqEC23QwZcDzRxIONzuEUULBcoi7LUZr6xi1ujx8bJGFyUeJEsHuAQ8lbd771p1cvbuf \ nV4 / b / MczLZTt0Ki38Bwouw6DFY / ZrsSQHuv7bNYPlxnpcRkqW5RMjVAKLU26qcByiwwPO2AkLC2G \ nLDYi6kGLZiw5vtBipeEzMd + k3oW2H7CSFjHCNpZhoy2LarlMkgqUlpRLBdYN1xgaqNFbKTE20k / Z \ nkShD4xg2jhQUlYv0xhgacEmbCQNVm8npOU7KGCMQ + GnEeZsHCVYWWFxqcfF5Oyn09BDFRV7 / umt4 \ n7LFnWWo + z + + 86c3suew1XPKqbWzb / kt88eabmKyfYrHVR6uxSKkAtaIi6SxjOlWU5ZBqiJRCp1nc \ nHEqgUk0aRSQ6or3SZG7Z52ADZlYEsdYsTj3PG3e2eWpunOv7DuKc + iaXf + o2nt53gLizyKHJJcaG \ nC1x71S9xz4NPUypamclXlPDs8SVKXhHXcUCltNodPviR3 / 3FKrlsGd2uQyxClaKFkY37aosgUlQq \ nPRSNUxxrONS0T4xDJASWZUPBxQgaqOV5ZJxQqDjIUon5JR / TEYRpSE2a1JGYxHSTIo4ToZOUrpGy \ n3mmyYIzw9ksv4T + + 9W1st0ycCLqWxggXqNHH0dCmWOkgzUF6ZIO1hRK1dWXuPVXFXHoCyQimpbjq \ nknXc / 8hRphLFmUnMi9hsMGPKqc0RM6FcSFlmiEpjDu1Ituy + hEePHCZcmKdoSHYMrmd0oU588fkM \ n7DvM7UJitY / xxS / 8KZ / + mzs4cfIwSdilf + dG / GOTqKjDtR / / IN + 68VaKEh54 + EtcvOetvP2DfwCX \ n / ipP73 + CvkPPcv8Pb8UOi / ibNyFbAZ / 6xEf4ylM + E0 / eT7nxOC1xNt1T93DpFa / nsf2H0SePEJeq \ njJ91AZPPPsXQhq3MvHgQmS5QTgtMWNvY0p + yJBPidoKon6RgG0SbtnLJJVcwc3CSivRxBgvse / oZ \ ngkbKGWdt5cTDDyBURKlcJKgvI2tbUQsv0NQDFGWHSm2Iwde9mqmvfQN / W4n1G7dwxpU7eO15b + Kv \ n3vHHdOohZnsOGYUIOYC1c5iLX3UFP / mXzxNFbSy7QmppepwCfqMDtkksoBV0KOsSsws / 35Huf5N3 \ nXrRZD / X38LNjJ6n29GFIQUFGaEOy0rWZmp0HI + tTD + LMEvVlDxc00sr6FKQ0CcMQc7WneWBggDQK \ ns9F0U + A5ZdK0ixYaL1Fs6RXceXgBRMplO9ayqEscm16kzwxII5 / ppQDHdfHcIvVuRBR3kYbFu3f3 \ n80CjimcIjkydJE0VvbbG8zwK5SIaQW / BxBagFCAkUZow1wiIE4gNgVYSk + y7GBIs08RxnOyQ0LaR \ nxLiGwHVdynaKLA4RLZ1Cmtlrtm2jEkW30yAVWXJS2bVximXKRRe5utDJxMcPQiqVCl0 / wLBMkjih \ n3W6xc / N6vFKR2ZUGpAZTMzOM1HooWpLlep1isUhbiyyXVQumTxwDQxIEmiiOkaZHbaTM4WMBo2GL \ nZ1o + lltFk6AxCeOEkmlhG9COYyKVuWOqFCIlSNIU0zCQIiJSA1y41cpsHAI / + 22lQKkU21RUtc2f \ nfP1G / vxdH6Yw0s93fnKI6688m7f9yqV84h / / le2jW1hsB8R + m0OzKVKZpAJ0kpIkMfuePfCL1Yc + \ nMLJV1 / r76DYTVAJxmCDlEomy0cpH7NqL / eIEkanxvCqR1CwuNCm6vaRxi2K9TlwICaRJ2Jih0LuO \ nUEBfuYg / eRyjOEBkuyRBjHIlTrdF6g7zrmuKHJ9bw9EnnmIuqrO + uoEXZyfpWTtKr / RRsylzVj + l \ naptWnFILY1RyisJgD5NtRX9YZN5VvOaCy3n2oVuw3XG6ymbJXaGqBtnYrtNMFDM9kv / 8 + t9zwRtv \ noKhiPClZVDa733AVT / / 4LkqdLiPpEpN2P46GSjrGgj6G0iFXvOFdfOIDx1m8704 + 8nfw6XvvYPG5 \ nKT7 + 0X / h87dew9 + 95WaSUpsfHHqYxccW + L3rrucP736Ie / ZNEDaWuPMLH8YJLc64 + JcpbNvK1L23 \ noGtrqC8VeO + fvofP / uYN2HKZ4uAmdpx3EY / c9W1KKyuYa / qJlpaIRncy + fU9 / M2nHuDfHlxgaO82 \ n5l / osLI4z1t / 60187V + / jrSKXP3PPyHsGMxZEVLYrA0jxqoz3PLlO2n + + OusN3yEMFlSBQqyjXKH \ nMJNJ2t4gXrOB7u2nu6AJxh02n7GLF392AjcEk2U6VpdyqOntxGAOEKgmZryCFiVW4gDLibCkgezG \ nRFJjWgoz1XiGRaLLJJbPiZmTr4igX7NjWJ9cbrN5fJhmrNlW9fjRc5OYVoXNoyX8doSwixw7cQJh \ ne0AmekrExEFMoVSkXq9TKVYwpQBD4BkaIQSVYgHXTqlYNgXXI4o7aAziVHH / Ywexe6ro0Kendy0n \ n5k5lYdISXGky0Fdhem4R0zQZ6O0hSWF5eRnLFNi2DYZJkiQUCgVqtX6iOCKOFPV2KxuE0hopBCiN \ nEGBJA2EJ0ihbjCzLxhQphhvTX1iLkF0i3weh0MrAMmBoqJ / + SoHU91GpQhoKKSWmbaNVlpAECtu2 \ nsQQkSpEkKYaQmJaBZRkkUeYd74cxnlsgTRVRmhKGYTZBHsb4fta26nmZRztKI6WkWnKIVIwlJN0w \ nC64Oo5RTi3W01oRBmyOnVoi0olbto95OWTMyxOLCImGSkqosDtA0NJYh8aMEx5CkWpAkCUrYXH / V \ nFm698xAX7d5BxU0xoi6nGss89LN53v7qXZhpQCSb3HiZxRtvnGLDObtYDC22btRce / mreOcf3spr \ nzhnkaL3O7EpEK9IolSJUVq / fNDrGj + 574BdL0EdHtuk4TsBUmR0DGmn2IFQCOkZpA5QiTRO0BssW \ nhNolMQ1KxSrp7EF07LFsh4y4JstdTU / ZYaWTUCt3MQOLU0mRyHWwQp / de2o8fXiZO278dT78f2 + m \ nvbLMX37ur7nh43 + JXevnqmv28uN / vxsr7KeuuqyINmVhsDYK0cU2s + lZJOFJ + jaOMbtYx2ocZ2Rs \ nnHZXEwZNSgWX9aFLt + ZQX2gxJU1cEWEHLkmvRyXosOJH9I8M0phdRhHQctczNtbD0pEjXLj3Ig48 \ n9xC2WaTTivD0JI / esJk333CCXX / wDj75vvezfdebeP27ruWer / wAkSoeef4WDvxsgo987Pv0vfsD \ nDMuUR26 + nWTq + 5S7JhveeD2lkuS + b91FkYAYF9mcxnArJChcp0qU + OhE4IYRLZFSNQR6bC83Xivo \ nKR3kV / 9xit / + k7 / g6WdPMjy2g7v37Sd95lFCfwLPLJEEXbqFAlVRIoxm0YVhMLo47SUSexCpW / Ru \ nPIvFF55BYYCV0FPop9tukhohQSQIvSoiEURxyOA5F9BZqmPXJ7CbXSKpMKWdpdrHXQBM0yJSmv9z \ n + eU8eN8DOKaAMCBBgDCJ4xhNwvzKz / e7 + N / k4nVVXS251EbWMTE5Q7nskSiDpUaDCEnJMVnoRFiG \ ni9YqEwINPa6kr6fIULVMmqacmJ4B22NtrYoia4tTiUaLFNUNGB4dZmZ6jmKxiKsiTjQCjs616aaK \ nvnKF5XaTIAiyvM81IyShTztMMr90aZCSWe4aMstfNYT6L2MqwHXdzGHRMLAsi6LrodKYbtdHoih5 \ nHpWyh2c5tNptip7D6NohmssdgmAOQ1rYXolqT4mV5RaG4zI5OcFUK + K8sb5sMjaKKBaLFAsFlM7E \ nUguZPbUgsi6eMCRRCjQYpokhBYYhkdJAa4jjiDhJsSwTlaZIaaBSRZLEyNUDVC0gDEMc28J2HHSa \ nIg2NI126UUCUKqQUFB0Dz / NQCmbml5ld8jN7W0OSqhRhgJQGSRxSsAQKSRAlbB8f4eTSEhEmtgNW \ n4rDnrBEm5htsHhykr6eXgcES3 / 3evZy1aSRLrlJlzGCZw7Ndjs7OMVgTXHf1RfzzN5 / iTVefz9RC \ nk4NHT7HU6RBFMbZtZtPCKuX4selfLEHfUNugA9sjjCxsM7MOlU4R24BmcwnCZdKxc3FVByvWtJpz \ nDGzcytypSVRzhX7Hg45PWPCpJi7zMRhmih8XcayUUtpFuQXMaoX55ZBzdxXZ99wcn3r / 6 / mXL32H \ ndtdnoFJibPsZHDi5QiNYYU9LckCXScUC42urLB6aZWhNlbU7h3nw0ClCP8QqFJCBIurM0D84zEKz \ ng4gDis56CrFP3Un44mf + ij / 7p68S + wH4bcJmSKPSy5hrMj9zFLts0Wz3sO3cARaPN + nUF7E9F6fU \ nR9RcIg06CDnI9i07eebY / YysdSis2cyx / TMYSmMJnyiK8MMFLr / uao6 + MMDZn / 0ntvUEHP / Gdxko \ nzPC1L9zEmjP38stXX8Ktf / spfFGg4NrYaZtGYlE0unS1hWE4dHWLYt8gi1MtKoWYx5 + 6iUvPfis + \ nAao4xNY9W2hGg0h / ivaCIugso8MOv3 / 9RXzpm / eQ7H0XsuhRGzCYf / Sn2M4Am3ZczJ9fdT + f / 8oT \ n7H + uQCt1SBIfmZaxiwIVBvQWi0yfeJ6e2masgkQtzdOtjaLnF7B0QILGkAJkluRjr4YZO8IglhYd \ nLKLmIpWShxFHxFqQKjBNE03CyYWZV0TQr909rvs8SbzuXFYCnSXYCI0EbCFfHvtXSYBhGyilSISb \ npc8bEvmS + EgTaWR9z56TvU9LjYoVpumgnRRTSb5710OYSZsNVYdyb4WHfjaJVJlzn2VZmUCLhNBX \ nL5c3TAeM1dF627Yzr3XTQuls0VzTN4BlWVSrPQxUykwcfQHHLaKSFNsWSGkg0CgUEpMwjJAyu / Yq \ njYFsAUoUhGFEtVwlTrOSzGKYUDIlKlVoBN0wBCkhTSkWC2idGZFlffjZblyn2UKUpllAiGEYGJaJ \ nZ5kv2w + / ZGBmGi + 5Ua4uUFKSpsnL3vNeoUin08E1s / H9MAxwi262w9fZb9MKupgI1o + P4OuQsm2A \ ntgkTRaSyuMBqycIQJnPLHb57z8OUigXOP2cbrVZIwXOxtKRYFoyPreeZAxOkafzy4qnInrg02fCU \ nlBKhIE0TTMvgVWsjXpDrue + RZwnTGGk4mdsmCSCZODb5iyXoOTmnK79xxTl6op4wtdImVSITLp0N \ nsgslsE1NmiRIU2PIzCJXmu7qAWhmHmhaFraSuK6DFBolslKIgYXEpFyuoK2EyZUWZ209Aykinrzv \ nx6QpNEPFUK2fRqMOhsHlV13JYG0dUZKl6Sil0GmMQhInMZaRjd + DABFmopgIkjjm8UcfYNPmcTqN \ nFeZOTlPprdLpaNyCy8pygzjsUi55pColiNLMGZIshck0TdSq14m0LdAK07So1WpEnQ5RFCLJro8i \ nxbWsbBe8 + uQgpcA0s124YShMYZAmCZZpkaQpGkWaxkghKTiZ4EUKTJl9pkBjWhYGKZbjkiTp6udK \ nojgmeUn3hIlQIvu / IDM9E6AFrFtTRRsCzzKoeB7dOMIPBFJobFtiGRbLrYD5U9MIw6LcU2FmdpmC \ n62E6JWZnnmdwzRlolWAIQZLEWQCJkJmQaxAiBTSs2iWrNKWvWmTTIDxxNGC6FRBGIbt27eHgwefQ \ nGqYmfr597isyKZqTc7qytLLM9q272OaUX7a + lTIzoJKmxF49EEUoTGPVh5tM9LuJIvQDBmpV0jDO \ nDKCkJlRZrJyILAqeg0Yx2FPk4cMn2b / vMXacfwHSLSISMNI2SilG147TN9RPsLzAs8dfZO3aMdrN \ nFkEQ4FXLzMzO47oGm8fWE7ZatNttBgeHSZKEiZPTCNPAq5RodbusNDpou8RKK9t9t5aWME0T03No \ nhdFqqQSEFFmQRhwRht3Mux2NThJQmiRROJbFXL2x2rWTLSa2ZWZpTGn2VKGUIk4SkiTrZ / csFwyB \ nllk + qxDQTU0MyyGMIgiTVdOrmNi0ENLAMlKEIZBGAaSBNA3COCLws0UrwUArTZhEJOnqDn9155yk \ nKbZlcPz4LHvO3sRiwycIWhS9EoZMSXWEa7nEcYIwDLZu3YKQmiBSHJ6YRxLTW7KwpUuaJsCqN41p \ nY9sy62CJY2KliOP05UxZrTWWbXJiJWKynhB0AtI4xrJMDhw4gJQmSsX / 7f2XC3pOzv8gK35CtelT \ nHqqSplnHhlIK23YIojY / vvs + pKFBW1x + 2V48z8NxnKzsoRPK5RJhNyVJFOmq0N / 7yH3EvmKwfwDX \ nddix80w6Sz5h1CRWASqMV0fPs7KD7wdsP7OG67ooJFr4JLHCsl06fhfPcVi3Zphms4nfTTAdm6gO \ n0ydnGRoawrIc2u02fhiCb9H1g0ywhchEx7JeHrLxvOxg96VSSKFQyGq9q7vhOI5ffr / WmWBaVtaW \ nhxRZf7dePRw1TWKtMUwL08jCsyOtacaQdjNhbOsujuOgFHSSlCSBUGbZnVGskDJeLTMphNBo / ism \ n7qW / YRhmVgur7aFx2s2eTEwTg6x0lKYJvu4SpSkqjan2FBBAuWBjmw5Cxyx1Y4IgxlIRwrBROqHd \ n7mAKyezzRxjqKzA7P4frujjOqkVyHFP0Ctn1Mw3iNMnsgqXAdVwATBUhhAmr94YGpJQEMURR97 + 9 \ n / / KSS05OTs5pwivitpiTk5OT8z9PLug5OTk5pwm5oOfk5OScJuSCnpOTk3OakAt6Tk5OzmlCLug5 \ nOTk5pwm5oOfk5OScJuSCnpOTk3OakAt6Tk5OzmlCLug5OTk5pwm5oOfk5OScJuSCnpOTk3OakAt6 \ nTk5OzmlCLug5OTk5pwm5oOfk5OScJuSCnpOTk3OakAt6Tk5OzmlCLug5OTk5pwm5oOfk5OScJuSC \ nnpOTk3Oa8P8BPTw7FlaNtD8AAAAASUVORK5CYII = \ n " , <nl> + " text / plain " : [ <nl> + " < matplotlib . figure . Figure at 0x7f5017427990 > " <nl> + ] <nl> + } , <nl> + " metadata " : { } , <nl> + " output_type " : " display_data " <nl> + } <nl> + ] , <nl> + " source " : [ <nl> + " # some setup \ n " , <nl> + " % matplotlib inline \ n " , <nl> + " import matplotlib . pyplot as plt \ n " , <nl> + " import os \ n " , <nl> + " import urllib \ n " , <nl> + " import numpy as np \ n " , <nl> + " from skimage import io \ n " , <nl> + " \ n " , <nl> + " # URL to the style image . Change this to use your own style . \ n " , <nl> + " style_url = \ " \ " \ " https : / / github . com / dmlc / web - data / raw / master / mxnet / neural - style / input / starry_night . jpg \ " \ " \ " \ n " , <nl> + " # URL to the content image . Change this to use your own content \ n " , <nl> + " content_url = \ " \ " \ " https : / / github . com / dmlc / web - data / raw / master / mxnet / neural - style / input / IMG_4343 . jpg \ " \ " \ " \ n " , <nl> + " \ n " , <nl> + " # Download the images \ n " , <nl> + " style_path = \ " input / style . jpg \ " \ n " , <nl> + " content_path = \ " input / content . jpg \ " \ n " , <nl> + " urllib . urlretrieve ( style_url , style_path ) \ n " , <nl> + " urllib . urlretrieve ( content_url , content_path ) \ n " , <nl> + " \ n " , <nl> + " style_img = io . imread ( style_path ) \ n " , <nl> + " content_img = io . imread ( content_path ) \ n " , <nl> + " \ n " , <nl> + " # Show the images \ n " , <nl> + " plt . subplot ( 121 ) \ n " , <nl> + " plt . axis ( ' off ' ) \ n " , <nl> + " plt . title ( ' style ' ) \ n " , <nl> + " plt . imshow ( style_img ) \ n " , <nl> + " plt . subplot ( 122 ) \ n " , <nl> + " plt . axis ( ' off ' ) \ n " , <nl> + " plt . title ( ' content ' ) \ n " , <nl> + " plt . imshow ( content_img ) \ n " , <nl> + " plt . show ( ) " <nl> + ] <nl> + } , <nl> + { <nl> + " cell_type " : " markdown " , <nl> + " metadata " : { } , <nl> + " source " : [ <nl> + " Now we need to set some parameters . You can tweek these to get a better result . " <nl> + ] <nl> + } , <nl> + { <nl> + " cell_type " : " code " , <nl> + " execution_count " : 26 , <nl> + " metadata " : { <nl> + " collapsed " : true <nl> + } , <nl> + " outputs " : [ ] , <nl> + " source " : [ <nl> + " # Stopping criterion . A larger value means less time but lower quality . \ n " , <nl> + " stop_eps = 0 . 005 \ n " , <nl> + " \ n " , <nl> + " # Resize the long edge of the input images to this size . \ n " , <nl> + " # Smaller value is faster but the result will have lower resolution . \ n " , <nl> + " max_size = 600 \ n " , <nl> + " \ n " , <nl> + " # content image weight . A larger value means more original content . \ n " , <nl> + " content_weight = 10 . 0 \ n " , <nl> + " \ n " , <nl> + " # Style iamge weight . A larger value means more style . \ n " , <nl> + " style_weight = 1 . 0 \ n " , <nl> + " \ n " , <nl> + " # Learning rate . Change this affacts the result . \ n " , <nl> + " lr = 0 . 1 \ n " , <nl> + " \ n " , <nl> + " # Remove noise . The amount of noise to remove . \ n " , <nl> + " remove_noise = 0 . 2 " <nl> + ] <nl> + } , <nl> + { <nl> + " cell_type " : " markdown " , <nl> + " metadata " : { } , <nl> + " source " : [ <nl> + " Preperation is done . Let ' s start ! " <nl> + ] <nl> + } , <nl> + { <nl> + " cell_type " : " code " , <nl> + " execution_count " : 27 , <nl> + " metadata " : { <nl> + " collapsed " : false <nl> + } , <nl> + " outputs " : [ <nl> + { <nl> + " name " : " stdout " , <nl> + " output_type " : " stream " , <nl> + " text " : [ <nl> + " INFO : root : load the content image , size = ( 1000 , 1500 ) \ n " , <nl> + " INFO : root : resize the content image to ( 400 , 600 ) \ n " , <nl> + " INFO : root : start training arguments Namespace ( content_image = ' input / content . jpg ' , content_weight = 10 . 0 , gpu = 0 , lr = 0 . 1 , max_long_edge = 600 , max_num_epochs = 1000 , model = ' vgg19 ' , output = ' output / out . jpg ' , remove_noise = 0 . 2 , save_epochs = 50 , stop_eps = 0 . 005 , style_image = ' input / style . jpg ' , style_weight = 1 . 0 ) \ n " , <nl> + " INFO : root : epoch 0 , relative change 0 . 991447 \ n " , <nl> + " INFO : root : epoch 1 , relative change 0 . 639152 \ n " , <nl> + " INFO : root : epoch 2 , relative change 0 . 478909 \ n " , <nl> + " INFO : root : epoch 3 , relative change 0 . 385908 \ n " , <nl> + " INFO : root : epoch 4 , relative change 0 . 321684 \ n " , <nl> + " INFO : root : epoch 5 , relative change 0 . 274496 \ n " , <nl> + " INFO : root : epoch 6 , relative change 0 . 234441 \ n " , <nl> + " INFO : root : epoch 7 , relative change 0 . 185487 \ n " , <nl> + " INFO : root : epoch 8 , relative change 0 . 149253 \ n " , <nl> + " INFO : root : epoch 9 , relative change 0 . 127431 \ n " , <nl> + " INFO : root : epoch 10 , relative change 0 . 113806 \ n " , <nl> + " INFO : root : Update [ 11 ] : Change learning rate to 9 . 00000e - 02 \ n " , <nl> + " INFO : root : epoch 11 , relative change 0 . 101363 \ n " , <nl> + " INFO : root : epoch 12 , relative change 0 . 090317 \ n " , <nl> + " INFO : root : epoch 13 , relative change 0 . 084088 \ n " , <nl> + " INFO : root : epoch 14 , relative change 0 . 083156 \ n " , <nl> + " INFO : root : epoch 15 , relative change 0 . 085780 \ n " , <nl> + " INFO : root : epoch 16 , relative change 0 . 089536 \ n " , <nl> + " INFO : root : epoch 17 , relative change 0 . 092031 \ n " , <nl> + " INFO : root : epoch 18 , relative change 0 . 090680 \ n " , <nl> + " INFO : root : epoch 19 , relative change 0 . 086305 \ n " , <nl> + " INFO : root : epoch 20 , relative change 0 . 081824 \ n " , <nl> + " INFO : root : Update [ 21 ] : Change learning rate to 8 . 10000e - 02 \ n " , <nl> + " INFO : root : epoch 21 , relative change 0 . 077005 \ n " , <nl> + " INFO : root : epoch 22 , relative change 0 . 071825 \ n " , <nl> + " INFO : root : epoch 23 , relative change 0 . 066502 \ n " , <nl> + " INFO : root : epoch 24 , relative change 0 . 061600 \ n " , <nl> + " INFO : root : epoch 25 , relative change 0 . 057329 \ n " , <nl> + " INFO : root : epoch 26 , relative change 0 . 054321 \ n " , <nl> + " INFO : root : epoch 27 , relative change 0 . 053418 \ n " , <nl> + " INFO : root : epoch 28 , relative change 0 . 054577 \ n " , <nl> + " INFO : root : epoch 29 , relative change 0 . 056324 \ n " , <nl> + " INFO : root : epoch 30 , relative change 0 . 057255 \ n " , <nl> + " INFO : root : Update [ 31 ] : Change learning rate to 7 . 29000e - 02 \ n " , <nl> + " INFO : root : epoch 31 , relative change 0 . 056265 \ n " , <nl> + " INFO : root : epoch 32 , relative change 0 . 054994 \ n " , <nl> + " INFO : root : epoch 33 , relative change 0 . 054664 \ n " , <nl> + " INFO : root : epoch 34 , relative change 0 . 053403 \ n " , <nl> + " INFO : root : epoch 35 , relative change 0 . 051254 \ n " , <nl> + " INFO : root : epoch 36 , relative change 0 . 048203 \ n " , <nl> + " INFO : root : epoch 37 , relative change 0 . 046360 \ n " , <nl> + " INFO : root : epoch 38 , relative change 0 . 044779 \ n " , <nl> + " INFO : root : epoch 39 , relative change 0 . 043339 \ n " , <nl> + " INFO : root : epoch 40 , relative change 0 . 042538 \ n " , <nl> + " INFO : root : Update [ 41 ] : Change learning rate to 6 . 56100e - 02 \ n " , <nl> + " INFO : root : epoch 41 , relative change 0 . 039862 \ n " , <nl> + " INFO : root : epoch 42 , relative change 0 . 038078 \ n " , <nl> + " INFO : root : epoch 43 , relative change 0 . 036222 \ n " , <nl> + " INFO : root : epoch 44 , relative change 0 . 034866 \ n " , <nl> + " INFO : root : epoch 45 , relative change 0 . 034036 \ n " , <nl> + " INFO : root : epoch 46 , relative change 0 . 034073 \ n " , <nl> + " INFO : root : epoch 47 , relative change 0 . 033466 \ n " , <nl> + " INFO : root : epoch 48 , relative change 0 . 032087 \ n " , <nl> + " INFO : root : epoch 49 , relative change 0 . 031422 \ n " , <nl> + " INFO : root : save output to output / tmp_50 . jpg \ n " , <nl> + " / home / jxie / anaconda / lib / python2 . 7 / site - packages / skimage / util / dtype . py : 111 : UserWarning : Possible precision loss when converting from float64 to uint8 \ n " , <nl> + " \ " % s to % s \ " % ( dtypeobj_in , dtypeobj ) ) \ n " , <nl> + " INFO : root : epoch 50 , relative change 0 . 031366 \ n " , <nl> + " INFO : root : Update [ 51 ] : Change learning rate to 5 . 90490e - 02 \ n " , <nl> + " INFO : root : epoch 51 , relative change 0 . 031456 \ n " , <nl> + " INFO : root : epoch 52 , relative change 0 . 030305 \ n " , <nl> + " INFO : root : epoch 53 , relative change 0 . 028736 \ n " , <nl> + " INFO : root : epoch 54 , relative change 0 . 028428 \ n " , <nl> + " INFO : root : epoch 55 , relative change 0 . 028359 \ n " , <nl> + " INFO : root : epoch 56 , relative change 0 . 027095 \ n " , <nl> + " INFO : root : epoch 57 , relative change 0 . 026162 \ n " , <nl> + " INFO : root : epoch 58 , relative change 0 . 025078 \ n " , <nl> + " INFO : root : epoch 59 , relative change 0 . 025315 \ n " , <nl> + " INFO : root : epoch 60 , relative change 0 . 024337 \ n " , <nl> + " INFO : root : Update [ 61 ] : Change learning rate to 5 . 31441e - 02 \ n " , <nl> + " INFO : root : epoch 61 , relative change 0 . 023871 \ n " , <nl> + " INFO : root : epoch 62 , relative change 0 . 022805 \ n " , <nl> + " INFO : root : epoch 63 , relative change 0 . 022970 \ n " , <nl> + " INFO : root : epoch 64 , relative change 0 . 022063 \ n " , <nl> + " INFO : root : epoch 65 , relative change 0 . 022034 \ n " , <nl> + " INFO : root : epoch 66 , relative change 0 . 020838 \ n " , <nl> + " INFO : root : epoch 67 , relative change 0 . 020683 \ n " , <nl> + " INFO : root : epoch 68 , relative change 0 . 019879 \ n " , <nl> + " INFO : root : epoch 69 , relative change 0 . 020015 \ n " , <nl> + " INFO : root : epoch 70 , relative change 0 . 019168 \ n " , <nl> + " INFO : root : Update [ 71 ] : Change learning rate to 4 . 78297e - 02 \ n " , <nl> + " INFO : root : epoch 71 , relative change 0 . 019169 \ n " , <nl> + " INFO : root : epoch 72 , relative change 0 . 017898 \ n " , <nl> + " INFO : root : epoch 73 , relative change 0 . 017702 \ n " , <nl> + " INFO : root : epoch 74 , relative change 0 . 017074 \ n " , <nl> + " INFO : root : epoch 75 , relative change 0 . 017283 \ n " , <nl> + " INFO : root : epoch 76 , relative change 0 . 016320 \ n " , <nl> + " INFO : root : epoch 77 , relative change 0 . 016186 \ n " , <nl> + " INFO : root : epoch 78 , relative change 0 . 016292 \ n " , <nl> + " INFO : root : epoch 79 , relative change 0 . 015349 \ n " , <nl> + " INFO : root : epoch 80 , relative change 0 . 017031 \ n " , <nl> + " INFO : root : Update [ 81 ] : Change learning rate to 4 . 30467e - 02 \ n " , <nl> + " INFO : root : epoch 81 , relative change 0 . 013938 \ n " , <nl> + " INFO : root : epoch 82 , relative change 0 . 013924 \ n " , <nl> + " INFO : root : epoch 83 , relative change 0 . 015610 \ n " , <nl> + " INFO : root : epoch 84 , relative change 0 . 012010 \ n " , <nl> + " INFO : root : epoch 85 , relative change 0 . 011675 \ n " , <nl> + " INFO : root : epoch 86 , relative change 0 . 013852 \ n " , <nl> + " INFO : root : epoch 87 , relative change 0 . 011492 \ n " , <nl> + " INFO : root : epoch 88 , relative change 0 . 010563 \ n " , <nl> + " INFO : root : epoch 89 , relative change 0 . 012171 \ n " , <nl> + " INFO : root : epoch 90 , relative change 0 . 009529 \ n " , <nl> + " INFO : root : Update [ 91 ] : Change learning rate to 3 . 87420e - 02 \ n " , <nl> + " INFO : root : epoch 91 , relative change 0 . 010399 \ n " , <nl> + " INFO : root : epoch 92 , relative change 0 . 012722 \ n " , <nl> + " INFO : root : epoch 93 , relative change 0 . 009105 \ n " , <nl> + " INFO : root : epoch 94 , relative change 0 . 008869 \ n " , <nl> + " INFO : root : epoch 95 , relative change 0 . 011268 \ n " , <nl> + " INFO : root : epoch 96 , relative change 0 . 008707 \ n " , <nl> + " INFO : root : epoch 97 , relative change 0 . 008463 \ n " , <nl> + " INFO : root : epoch 98 , relative change 0 . 010379 \ n " , <nl> + " INFO : root : epoch 99 , relative change 0 . 007888 \ n " , <nl> + " INFO : root : save output to output / tmp_100 . jpg \ n " , <nl> + " INFO : root : epoch 100 , relative change 0 . 009023 \ n " , <nl> + " INFO : root : Update [ 101 ] : Change learning rate to 3 . 48678e - 02 \ n " , <nl> + " INFO : root : epoch 101 , relative change 0 . 010673 \ n " , <nl> + " INFO : root : epoch 102 , relative change 0 . 007633 \ n " , <nl> + " INFO : root : epoch 103 , relative change 0 . 007431 \ n " , <nl> + " INFO : root : epoch 104 , relative change 0 . 009474 \ n " , <nl> + " INFO : root : epoch 105 , relative change 0 . 007432 \ n " , <nl> + " INFO : root : epoch 106 , relative change 0 . 007387 \ n " , <nl> + " INFO : root : epoch 107 , relative change 0 . 008928 \ n " , <nl> + " INFO : root : epoch 108 , relative change 0 . 006706 \ n " , <nl> + " INFO : root : epoch 109 , relative change 0 . 007378 \ n " , <nl> + " INFO : root : epoch 110 , relative change 0 . 008718 \ n " , <nl> + " INFO : root : Update [ 111 ] : Change learning rate to 3 . 13811e - 02 \ n " , <nl> + " INFO : root : epoch 111 , relative change 0 . 006565 \ n " , <nl> + " INFO : root : epoch 112 , relative change 0 . 007047 \ n " , <nl> + " INFO : root : epoch 113 , relative change 0 . 008511 \ n " , <nl> + " INFO : root : epoch 114 , relative change 0 . 006917 \ n " , <nl> + " INFO : root : epoch 115 , relative change 0 . 006774 \ n " , <nl> + " INFO : root : epoch 116 , relative change 0 . 007764 \ n " , <nl> + " INFO : root : epoch 117 , relative change 0 . 006149 \ n " , <nl> + " INFO : root : epoch 118 , relative change 0 . 006942 \ n " , <nl> + " INFO : root : epoch 119 , relative change 0 . 007456 \ n " , <nl> + " INFO : root : epoch 120 , relative change 0 . 006059 \ n " , <nl> + " INFO : root : Update [ 121 ] : Change learning rate to 2 . 82430e - 02 \ n " , <nl> + " INFO : root : epoch 121 , relative change 0 . 006447 \ n " , <nl> + " INFO : root : epoch 122 , relative change 0 . 006355 \ n " , <nl> + " INFO : root : epoch 123 , relative change 0 . 006202 \ n " , <nl> + " INFO : root : epoch 124 , relative change 0 . 006538 \ n " , <nl> + " INFO : root : epoch 125 , relative change 0 . 005839 \ n " , <nl> + " INFO : root : epoch 126 , relative change 0 . 006806 \ n " , <nl> + " INFO : root : epoch 127 , relative change 0 . 005859 \ n " , <nl> + " INFO : root : epoch 128 , relative change 0 . 006593 \ n " , <nl> + " INFO : root : epoch 129 , relative change 0 . 005804 \ n " , <nl> + " INFO : root : epoch 130 , relative change 0 . 007155 \ n " , <nl> + " INFO : root : Update [ 131 ] : Change learning rate to 2 . 54187e - 02 \ n " , <nl> + " INFO : root : epoch 131 , relative change 0 . 006307 \ n " , <nl> + " INFO : root : epoch 132 , relative change 0 . 007419 \ n " , <nl> + " INFO : root : epoch 133 , relative change 0 . 006834 \ n " , <nl> + " INFO : root : epoch 134 , relative change 0 . 006841 \ n " , <nl> + " INFO : root : epoch 135 , relative change 0 . 006175 \ n " , <nl> + " INFO : root : epoch 136 , relative change 0 . 007194 \ n " , <nl> + " INFO : root : epoch 137 , relative change 0 . 006058 \ n " , <nl> + " INFO : root : epoch 138 , relative change 0 . 006848 \ n " , <nl> + " INFO : root : epoch 139 , relative change 0 . 005994 \ n " , <nl> + " INFO : root : epoch 140 , relative change 0 . 006706 \ n " , <nl> + " INFO : root : Update [ 141 ] : Change learning rate to 2 . 28768e - 02 \ n " , <nl> + " INFO : root : epoch 141 , relative change 0 . 005592 \ n " , <nl> + " INFO : root : epoch 142 , relative change 0 . 006341 \ n " , <nl> + " INFO : root : epoch 143 , relative change 0 . 005618 \ n " , <nl> + " INFO : root : epoch 144 , relative change 0 . 006361 \ n " , <nl> + " INFO : root : epoch 145 , relative change 0 . 005391 \ n " , <nl> + " INFO : root : epoch 146 , relative change 0 . 006300 \ n " , <nl> + " INFO : root : epoch 147 , relative change 0 . 005510 \ n " , <nl> + " INFO : root : epoch 148 , relative change 0 . 006159 \ n " , <nl> + " INFO : root : epoch 149 , relative change 0 . 005108 \ n " , <nl> + " INFO : root : save output to output / tmp_150 . jpg \ n " , <nl> + " INFO : root : epoch 150 , relative change 0 . 006135 \ n " , <nl> + " INFO : root : Update [ 151 ] : Change learning rate to 2 . 05891e - 02 \ n " , <nl> + " INFO : root : epoch 151 , relative change 0 . 005092 \ n " , <nl> + " INFO : root : epoch 152 , relative change 0 . 005675 \ n " , <nl> + " INFO : root : epoch 153 , relative change 0 . 005241 \ n " , <nl> + " INFO : root : epoch 154 , relative change 0 . 005934 \ n " , <nl> + " INFO : root : epoch 155 , relative change 0 . 005330 \ n " , <nl> + " INFO : root : epoch 156 , relative change 0 . 006191 \ n " , <nl> + " INFO : root : epoch 157 , relative change 0 . 005266 \ n " , <nl> + " INFO : root : epoch 158 , relative change 0 . 005572 \ n " , <nl> + " INFO : root : epoch 159 , relative change 0 . 004813 \ n " , <nl> + " INFO : root : eps < args . stop_eps , training finished \ n " , <nl> + " INFO : root : save output to output / out . jpg \ n " <nl> + ] <nl> + } <nl> + ] , <nl> + " source " : [ <nl> + " import subprocess \ n " , <nl> + " import sys \ n " , <nl> + " cmd = \ " python run . py - - style - image = % s - - content - image = % s - - stop - eps = % f - - max - long - edge = % d - - content - weight = % f - - style - weight = % f - - lr = % f - - remove - noise = % f \ " % \ \ \ n " , <nl> + " ( style_path , content_path , stop_eps , max_size , content_weight , style_weight , lr , remove_noise ) \ n " , <nl> + " p = subprocess . Popen ( cmd , shell = True , stderr = subprocess . PIPE ) \ n " , <nl> + " \ n " , <nl> + " while True : \ n " , <nl> + " out = p . stderr . read ( 10 ) \ n " , <nl> + " if out = = ' ' and p . poll ( ) ! = None : \ n " , <nl> + " break \ n " , <nl> + " if out ! = ' ' : \ n " , <nl> + " sys . stdout . write ( out ) \ n " , <nl> + " sys . stdout . flush ( ) " <nl> + ] <nl> + } , <nl> + { <nl> + " cell_type " : " markdown " , <nl> + " metadata " : { } , <nl> + " source " : [ <nl> + " Let ' s see the results : " <nl> + ] <nl> + } , <nl> + { <nl> + " cell_type " : " code " , <nl> + " execution_count " : 28 , <nl> + " metadata " : { <nl> + " collapsed " : false <nl> + } , <nl> + " outputs " : [ <nl> + { <nl> + " data " : { <nl> + " image / png " : " iVBORw0KGgoAAAANSUhEUgAAAXwAAAEKCAYAAAARnO4WAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz \ nAAALEgAACxIB0t1 + / AAAIABJREFUeJzs3UmsLml + 5 / XvM8Qc73ymO + S9mVmVzqxyuW3UlnDhNrBA \ n3Woh1GwQiAapJZCAJUJCghUbNuxghcSy2bBAQmJqDIihLSNsN92qKpezMutm5p3OfN4xxmdkcbMl \ nCwlku9ydTdX7kV4d6SjijYijo1 / 84 / 88ESFijBwdHR0d / fyT3 / QOHB0dHR39w3EM / KOjo6NfEMfA \ nPzo6OvoFcQz8o6Ojo18Qx8A / Ojo6 + gVxDPyjo6OjXxDHwD86 + lMSQvyvQoh / 7Zvej6OjP61j4B8d \ n / enFrz8IIf6GEOJvf8P7c3T0J3IM / KOfW0II / U3vw9HRP0qOgX / 0c0UI8ZUQ4t8VQvwAOAghflMI \ n8btCiI0Q4u8JIf6pP7bs3xBCvBBC7IUQXwgh / uWvf / 8fCCH + 5h9b7n0hRBBCyP / Htj4B / lPg + 0KI \ ngxBi / Q / pMI + O / kyOFdDRz6N / CfirvGu7 / AD4V2KMf0sI8c8A / 6UQ4mNgAP5j4NdjjJ8LIc6B1dfr \ n / 4meNxJj / FQI8W8A / 3qM8bf + 3I / i6OjP2bHCP / p5E4H / JMb4FvhXgf8uxvi3AGKM / xPwB8A / + / Vy \ nAfgVIUQRY7yJMf746 + 8Qf4rt / WmWPTr6Rh0D / + jn0euvfz4H / oWv2zkbIcQG + E3gIsbYAf8i8G8C \ nl0KI / + bryv / o6OfWMfCPfh79 / ZbMK + BvxhgXf + wziTH + RwAxxt + OMf5l4AL4FPjPvl6vBco / 9n0X \ nf4JtHR39I + 8Y + Ec / z / 5z4J8TQvxlIYQSQuRCiH9aCPFECHEmhPhrQogKsLwLef / 1en8P + CeFEO8J \ nIWbAv / f / sY0b4KkQIvkHeiRHR38OjoF / 9HMrxvgG + GvAvw / c8q7i / 3d413eXwL8NvAUegN8C / q2v \ n1 / sfgf + CdwO + vw / 81 / y / V / L / M / CHwLUQ4vYf1LEcHf15EMcXoBwdHR39YjhW + EdHR0e / II6Bf3R0 \ ndPQL4hj4R0dHR78gjoF / dHR09AviG3m0wj / / H / 52fHi45fr + LRfnc2ZTTTAHDusrus09Z8s5rvwu \ n0qWYvUCnE3wKaWXQak2tNvQPr9mtz5i / 94RQlZTTGdpbxvUtiRh5 + vyEepqxa / 6IxfQRJ9NHRO / Y \ n7W9w0TJfvs / lW8f9nWN1kXIyrRjahpdvrmmMRuiSi5Ml2rSI8cDb3cBnn71AioQsr / jud38FF8Ba \ nz2gsJycritVAXRmwB370d79gc5tzdvErJJOCQ7jm4v2acmowtwM / / J0fkArFx7 / 2HfS0JMgcfIHp \ nJbsuYgfL2WqOpCdTHbuHGzKZs18bSFI4yUjNhHlSgL2kKi + ZLi37g8eZMzpZE5czDtcd / vAV1y9 + \ nG3 + 448nFb / DpW8k2LzFjy / urJ6jVBZ1pGG5 + RN1 + wQeLnKcf / Sr3ccWLu8h2TLl / WKNDy6 + 9V / Hr \ nH8x477zm9d0Db9pITD4gijPu7nckaY1KFDH23Nx8zuWbP2Q2U8zKkvnsgrR6j6DOudmMbNa3yHDP \ nJNti2ldAy + nqL1KUf4FDfI2YvGDfRK5enDItHjNZXrI6K5jXOcsqUqkDzfYtN3c3BFmhyjPe3rVM \ nspwP31tR6h3D9qc8v5giAnz15ZqrG8 + jx98hmd6RJIIkyyGd8 + OXa9YmQ + uSaabJ / Mgn33ZkaYKU \ nCXlWM44B7zTBS / JsQteORBqyNMW1A3awKJHTDxKyObsxMgbNQ / OA0hlpWYAMWN / ifE / fWpIwZb92 \ nXGUdVbZglp + Qk5AykMsD2 / vPwbUsZzU6 + 3XSXNHbLa15ADUwDmvqTDEpM + qiYF7AbLpgt2 + xQRFJ \ nMU4QSfny5VsOTYs7rEFEvvvL3yYGw2RSErxn6Ebs6JFK8TZfYrsd4XDHPI88PZ8ymyV4HL0ZyMqc \ nRAja3T2zQjF2LZ99 / hW7IWHra4qTD8nqcz6YFJwsRqriHmHvuHl5ySSf8 / jRY3QmENpwvZkQYyRG \ nx8PuGqEt3eh48cWaQ1Pw4Qe / hn10R + wiOTBJG + blmkLf4fodi3qBdwn36i + hE8V2 / UApNHNd40fo \ ngmQbIl2ILNWU6A6Mw4a + NVxfD3h1ik / nNDYSg + ODMjJfTqjqlLLKSZTED5F + N + CHiLWRjRnYdweC \ nBrRCCI0zkCclqcjJignLxZT3lpHm4XOkMpTzEwZfcHfTsr3dsVqNfPRRSVH + Erf7NT7b8 / Zuw / / + \ nv7xhaM4pyxnBjXz / Nz7hdPmGTx7fkl7 + AX / lr / 9vf + a7u7 + RwP / B731OkiuUrNBhShIymsYxHgo0 \ np3QHjeNALit0UpAkkdH0jGFAxANdaIm9oJ6kJCpiBVy9vaJfN5RCMq8Krt9EyrlCFh / Q3Uq + / OqO \ nl68 / 5 / Ss4jvf + xafvb3G + pr68ZIo17y67NneGpLilJjuSGuLkQ2DFTR3ks9ffEqS5qSp5uxsiZKO \ nqq7YbfdklaJpNzSm4l4O3Lz5AtMZqskJw7glJHsmS0 + qR96 + 3PLw5T3EgtlqxdXtltxZZouUXCtk \ nmXPj4NAdYPSYfkeiOtbrNXU2QaqSOtNM + Iz5SaS5PcMfnrDbCl7fBmKaI2cvCMkfkh2 + x3T6DPIP \ nMd0 / xud3 / yfNVw + cP / se / f6aXE2w65JYXJIXe0SaUQx / ibubjEOIJM82BAxmX5JKQUDz2Zs1m7s3 \ nPJ4nfP + f + D6nquEnb + / IJhOKusI6aNueREvydMX5yScM7QNrr + lETuo9RWWYLgqG1vNweUVZjkgz \ n0riBt91bqqxiehKYVhmZ1qw + fMahE6hCc5p7TPvAxpfcqQL0d + mK91nfbhH3MM2XtF3O7 / zehkUF \ nj07PiNsbPvr2komZc7ur + fKLp / DcorXh / vqKi8eKXS8x1uHjlkk54 / 3zKftmh3WO0fQ8ebzAWEjz \ nms22ob1dk + iUts0pco0SArxACLAhcv32hiEU5OUKZwuiUzzsRqLw5FWK0hrnDErOQAQyV9E2A2O8 \ nQwZBGHpSZUhERpYGklGSiA1hdOzaDcY1pJlAq5zdGLGjJktXhGzLl5cNhBMCikN / jVN7xtHx0ET8 \ nMEdWA + + 995iND + R5hY + SKBVqVrG + 3zIMhsMu0jeG1XROVih0XnO3bbh9aJmvLphmK9bmErig3QTu \ n3hpuH + bENJIVgulkz2QFxBVvbnd02x3S5pT6L3B + 8SFGObxec7 / + AtsWdC7h8zcHXt02rE5rvNlz \ nuL3nrKiom0 / Zbh6hhWRSaJIQESESY8XpxZL1bc84atYi5aG9R + eas5MTtveGqX7EF69aLm9GquUF \ nN3VHqiWmDyQo6scLXl922KFg8JHlrKIPe4a1IO01SzdnPq0JwWJVSx8arh5uWBsPOiN6he09KpFE \ nPH7YkmnJItek6gmX / YhMHrOYVWx9YH3oWDc9q / Mlj76dsMu3 / PS6wfkLtncFP / 1yJJa / TJEX9PYO \ n61J + / + + NfPB0gl07 / vC / f + Cv / PU / e / Z + I4Gfiow0avI0QdmUzXVD1w7IUKF1AULgg0OqQJYJYhhI \ ntMAGT3ASNwpSJiidkRUV95stzktSnaCCwJjAm8t7JsPI8nzOm9dv6fuOgObyrsf / 5AaUZjqbkycJ \ nxsLoA1lZM4ZIWtY4afEqYXPYcXV1Q5rmpGnKxcUZk1mNEJauXVOWGXlR8eLFlzw0Pd4 / kKcFWmdI \ npckLRV6mODPw6vPXGHKyZElSeWbLx8g60oaWvh95e / U5t9drYlGznK3w + wcS0TEebrD7K9ZWcL56 \ nH6UX6DBjMjuQqoFDuoFR4UyJSCY4mdJ1A5evv + TsbIpKYPbkGb / 5aMXd65Hr25HFZIbMLZl7y6Hd \ n4EePEiUuMSSp5q6 / pn97gxQz8pihkgwrK / rOcdM7HrZrNu3v8K0PnnHy / Ak34QE7BApVk / aRcOjJ \ nY09dpHRDSjbJ8InFmAdk6lHZjNOnMzp7wtXmjip / j + jvuL7dsMxvSbOcp09mlDqhGyQH02GkQdca \ nJzpELkHmNIPh7IPHkGquX73li + sb9CpSX1SgNS93G / 7OT3 / IZXPKxx99wi99f8XVVzsuOeFus2Y7 \ nZFz / + A3rfcfy9JxMBmpp0XZHyCd89NF3 + dGPPuW / + m / / DyaTFUU9Z3Fyjk5rrMgYY81huyOEniwL \ nJDrgUDQhsj / 0 + MMG5UfyYoLxgtF4wqEjYhBBEo0nk3N0bhmHSN + DRKCVxErH6AdUURHSBbv + gabr \ ncH5EaUk0gs5Ghm5EBsfV5Rti8gWPz7 / DpNYcDh35pKId9lzdrGkPGVqWpBLGmFCWBV5JmqHn + vaW \ n3b6haRrSvCCzLUURqCc1rb3n7foOZAJVhpjM2IzQmAmHhx2uNYxtQjI55 / zRDJk7mvGB7d0lvXyD \ ns5IkWVBOzzlZPeWqO3C4e8Wryz8gsCP036Y3CVl9ymL5PtvtG5Rr + eD5BatMMi8iXjxmv7nl6vIB \ nZx4QcmS7P5DlBpWc8PzZdxjWa0yQnHzrEdcvb9jfPNDc / gAdS3JVsn79GenZguB3KDoyocj1jHla \ nklVzemvox7ds9AGtKnIx5 + 7yCvuV4fnTc05PSkLywOHhiv3wmGEIjNYS0YzOohOJFKC1Y2cueb3 / \ nCaeF5tmjFcZU3K7XvHr7kt / 6x7 / HLDuwNhsut4pPfzCyWs05e / Qh6 + YepabYYHF4hkJgn5zw0 / EL \ n / uBv / 13s5mfL3m8k8JXySCKpSjB9z9A3EEHpnCgcQQi8H / HK4X2PdWAIBBmIUaOTGfO6Yj45YfSg \ ndEGhoSwltRD0 / Q58T8Dx1U + u6IYOISHNUwgp99cDJ2ePCGPCpj + wX29R0XK6WhCi5vXtgW1rKNKG \ n0G6QWYsKKWdn58zmM3SqmUwrhtHQdQM3t7dYawhekmpNlipicIQoiAjaxnLoLYfOEpTn2cmHLFYr \ nhI7c7q55 + tETmu2O3WaLCh7br1G1ZuwHYmioSseyTkhExrNHS / qh5mH / nOHlPVW9R016ZrNzdJPQ \ njWuah8hhd4L0K9oWirlnHB9w7R3z + fs8K5 / x5vYeG39KPtvg3YSmzwk + wSRbvL7B04NWhEGQEklS \ nzc5Y8ukJMs5wB83r2zX94TMWDxuM1rSjY6jmFJMl09MlbRXYbAco52RuYCINXTDYGAkEkrLm2Scf \ nstusuLu9I9eCCT1hDNxs7pncL5gtT6AAGSJf3l5zv + 94 / uSC731wRjAHwuUV3fqBPM + YPUn5ar9H \ nND0PrWJazVlMnpJOp3zxZuRu4 / j2hweqxzBpnhOMo04zbq6v2RwiL988cH625KYNtP0O51o + / ewW \ noXOS / IJNE / jq6hb9ek + SphhneDL7BCFGVquEfugoT2qGpqfIUiDncAiMbqRZG6JIUGmC0AJrHQqF \ nsxbj9szlc3S + Jj / pGMeW3TrixlOq6RMmJwNWXWLGnNGNAEQXMb1lHDzeCfKkpB8UMZ5zdd / T2ksA \ nduvIduvY7TUhWs7PPeeL93EjHJxlMIbtbsv9ZstgDRFBiIFcHDhZrpjOUnqjidKji4w0W3Iwjof1 \ ngUMf2dxvkaGnTgOL0xn1ao4ZRkLvCS7Qis9Znj5BqpRkonndfMV2u + Hh / pJx0EixpA0ZqZSM2xvO \ nZpqnZU9eJHzyyQf0xuOCJOs3aHWLETcYvyEECVlGEyPWGK5 + 8kec7CzLZ4 + 4 / LKhGTzuENA4CC95 \ n / N6CZ0XJT96u3lXkqSIg6Nqeuqpxhxa847C9w9SCLCsZNg1SFBTFnM / f7Hl9d8 / ZScmjD58x2wuu \ n3q65vtoiKEiFIjoIItCNhs5Ysoljcn5CiBNefLVmvW + IVGzWDbe7rygWc1T5HT76 + APaRvF7v / + 7 \ n7PYP6DBiOk9daWaPFqh55HC5ZzPskcnPNuz6jQR + CC1OKPrBIqPHB4vUgqg1KslBQpZogg2YsUXr \ nFClAiIjSOcvJGZO8xJPjsFR1QlEIMjcwz2G33bLrWtqxYzw4EgXT + ZS0LDk5fx9BxdB7 + q2jG1pM \ np6jLlu32C7aNo + mWBL / COM + 0SsHdk + fPyKsJUidIrXA + 0nYDfe9IsykqiSS5JS8Kqipnu9nStJbe \ nWowR9EOGVheUtSdNSprWcbO9w + iW / acvsG2DRJKmOWOSsXcZEYWQimFsWC6 / hQgJ27hAlDVGlQzN \ nezz0f0hVPrCqp + isZTl7y8JlvLWP + eKN53b3wOM0YbkU5Frj25EQE + bzZxgfyJJL / FARKREyZzR7 \ n0twhGQljg1Q1WMVwaKhnU5589DHdaGjXS / qbrxi6NfuvenRSkaYFpoexM7TGIMopZjrDRugP9ywy \ nhY0O4y2pGVnVGbNc8qgo + PbqhFd3HuZn3F / usZ3k05fXPFcV1dJDLpidnHPzYNn + 1LG5 / SnfOlU8 \ nO12wa3bc9iNpccKTX / ouzRvHdnvP1WHHZrcnFStSZtw9bOmGgY + / myG9QUVL3zVEF5jNVvjU0QXN \ nm + 3Ak9OaWiYY43FG40OCD5Isz / FEhsGBSrh + + 4I0k6zvW + aLjOV8ikSjoiRXApFrhjRjtBLrJUiF \ nSiXzRU6ZlbhesL3v0GGOLA4sTwLOg5Q1rn + CziQmfMUY78E / A5EhgqfMCnSRMCaO4CXIDGs8xkua \ nfkcfviDPc8YuR8QFi + kKE25YnEg2Vw0B8CFgnWPXNPggqLKKLNMUdcVKpUyLErykSDO8BhtSukPC \ nZu9Zbzze9ZRFgU4c8yno0tGMO / qdJJolwiScLAWT9IQvrq5R7T23uzXDMCLDDO9PkLFgKHYUOH7t \ nW6c8KXvKxCGLGl8mNMUZL287xO6n7Jq3JGpkslIMRmJGjQ1gpcMLMErzZbsDN2ccJmSqZDI9ZTob \ nKJ6mbPsDIX9EJEWUktFYRJKzDgXegwuGUKaImGDGEmKJ8xldq3C2w + SePK84mQtmk5eIi8jpfMH6 \ noaPrHPv9QCQhTxOSfEJRzGgeHK9coB0mmFAjxMCXnw08nT9hkT9nwyO2W8vbt19x2L1E + B4RoFJT \ nCgoKq / DX98jXa6p7RxXqnyl7v5mWTi7xzuH9uwGiCEitqSZTdJETiCBGxs0e60aUlAgJIXjysibJ \ naoYxooqSMfT0w0DXtpSxp7cNZQ4fPH3O3e6O3FiWZzPOn50xeE2SnNL3KcPY0exucH5AuUDzsMHY \ nW4Is8KFisZwwm2Q8OV / R7SPmcEpWZEThsVHQ7g6MJiJkCTHFGIv0W8KQYKSkriecPpqx3Q + MawMq \ no6wqqnxLCJFD23HoR9rYM9WaaD15AO8FY33C6BXBWbTOWM7O0csV24eOV68t87lCSUvzUNG2E4pM \ ncJjUVMVAVUtkFKhkRjHzbO / 2XF3u2a / f8kvPltSTE8Z8gTMC4T5AhHOE68gnCUpPKGNOJCDZo8Nr \ nmn4kiIwsNbih5Sc / / CHTi / fIqhMmZxK9r4i + oKEmCDAuEvYCPb674kpkQaUrrmPCIRekKqLocWPD \ nyQiZa1nmFin3qOWSQVbUacUweq5ubrndjizSBpVq5tmSvdaMY89uveVt15OOgcXqMalvsENKEST1 \ ndMFE12zNV4yixbo7dJoSUOzGlFdvJZPqgFKCSCDGSJqkTJKarC7oDncc + hGtJUIkOC8QJCiZkKUZ \ nbXfA2ZEERVEGpHRkeUlR1Pz0xRV1NUWrFBEEuU6QOifzCcYrfIAoHLYfuFlfk8kSrTLG8BmxN4wv \ nJVLXRKnR9S1BeA7tgFDPSULOrK4Q3jGpSyZlyTgYnA90g2Wz3ROdRQiHwOPdiFY5ph / IkoJf + vhj \ nhN5zuAmM4whRslnv0WlGlefkhSbNJGmiOZ2ekmiNGzzF9BznLN4JxtFj + xGNIJUbiANZEsnSlICg \ n7Q12UKSqIstzpmJJEhZMckWHpzcNaTHFtBrkjDAUrBYPnCSOUu1Z1u / G5nql2aqaZpiwtznL3FPP \ na3QcML2l2UVGP2UQKT5N0FXKJtnTWY + xDVKUTNTs65SrcSYn5LB6Dl0PVzevEMm7xx9FDz6RCJGi \ nSEl7RQiKAAQC3oELkX4zMo6BfpcwQfHs6XdQExD9JZMkspqkCFmz2fWMYcSNI + 1hz + 5woJiekE3m \ nlOWUMjU8e3 / FoWv5yVcvuX4TcaFH + gA4ikSQ6JQsCSRdh7s7MFu3nPkl / fbhZ8reb6bCRyIESKkJ \ nEZyPiJDgZIFMCnwMMFicjcgQkcJTZBllPUNnE8bREcaIlwMWh3WBJEiGLpKQsdnsWd9d8eSDZ5x8 \ n + xH1MmFvtry5vWc6n9H3AesD5JIizwhv3xJMQJkJMil4 / 9k5y4saYmA4HGjvNSKTuCgJMSJRmCAJ \ naGLIGAY47C1LLTGDx7mBk0cnZEVCe39N1Iq0mpJkKUoJttsNXSvwQqDSjH3bcFZXPHt0wvXrW9rx \ nACTICKXWyH6ku9tQUaHzEu0KBmMQfk0qFkj / mKZTeL8kxKfAAVUZzr / lGEhgTEjdY7780R2zaku + \ nnOOnCqEljOfv + pla4bxgd + ixtmNRKOaTM4Lt2FmHabekGWSZpO86knxKNTknlQmRlCKb0Y8tceio \ n6oJgIdcC5QOFhHlSMqiIDJCokmgy7u86bKoYM8P7j5 + yGiVXt1uUNQQbmS8ecXl9i7G3PDo7IRMJ \ nH5 + l3N5tMZ1n5xSfXvU8CjkXZxeI7QMTGWjLB4rUIYcJt4eBrVkTU0daZwxjwlcvFbLueXZxSlHP \ nmJNhQ0piA1mRUDhNriwSiUCgtEKjaQ4j1axEZjnTMkHIQO / v0VmJSire3B44PX3C5uBRMjKtUmIE \ nbyBEgYgaGSURifcGbwROQCIVIjkQTEGzzwhRkNWW + YnHMeLaDBHPiL4lL0tS4VHBYbqREAxaKcpS \ n4oIidhuk1EixIFhPmsF7j2vqqqLKU7a7hHW7I0SBkpKYFSRFSpYKykoRGfFxQKoHsvzdiStEQ5ok \ n2GgJ4YDSI0q3TMKO6XxBOZtzaFu8BxEDxm8QsqOsa85PwKiMM1Xz4n5DkmaINOC7HToJ5Hnk29me \ nRMGkmCMmFTem4b4diYXg9ralkCcY6dn2LbnQiJCgZIGiQgsYY8PQDYiQERiZpB1a7Ij713z83d / A \ nJye8vBnpnOPD6oFmd01pDTrP8GisSLABvAuE6MmUJCSggsU6i9IFxkhGK2lbix8CrcuIvqNvb1gs \ nC06XJY4E63M2fYPwARJLudAYIFQOU1jmyymT2ZL7vuWnP33Bm + uAih8QQoK3c / JiQposkEGA6mnM \ nJc + / dUZ + suDl33lJOSl + puz9RgLfukCmUpI0xdt3FRYxIURNCCmegB0sIUCWpCRakRYZoxAYa4gh \ nRUnFGBw2GJwLKCQipASnSJiT6IRSnjPYKS + + fEsbt5TLFTGr6buRqAKDMHTDlrD5iowFOix4 + vxb \ nPPr2BVfbt + w2O8zGEzpJeQZISRCRGEHpjH7w9N2AGRSjETgDaVGyWp2RFgm7wwaVRqo8ozkYnBhY \ nP9zT7AJptiLLckgi7z3 + ANm3OOOYZCllYvHO460nCwoRHNo3JMowlwucP2DiF6jsM4rshNHOGfTA \ n4CYE9z2iHBDhFWUy4 + TslPY2JXYjaVQMjcSXLUwcXkSkcBgnqZMJKhvpdm + IYsfNg2UeJyi1opwo \ ngmwRscFHh3WW9eaA0wmTqCjbllUpcFnklbnHmxQ5qXC1pHEjt3ZPOhgqqxEU1JMzYlWzXt9xfXPg \ nyXtL9neSJzJyXk2RYkdWlFxvHJkuyURgWDcsyhXnp3uyuONmO3IwCqczdhHm3pD6HVM1ILKcJJvj \ nxVOMP0ekW3TREeyIGTTSz7FacvCCwYwkCISIlFmCcANKGqZp5OAiAkGZ5 + TplHZ / R7CW9997gtIQ \ nwsg6CqwBKStyl9MOGilKCILeSrQSJDrDuYQQEojvih0tchbTAj9CsIpoHyOVpZoZfHBAiuunRAVS \ n7EG0FNmURGo0Hm8O2DiCsCAkQgqU8kymA5IlMiyxo2F5olgsPZeXn7IJK9pDgktStNIQI2WWUhWa \ nNIlobVEykuUF89MDSSoIouBht8F5xWa7pTUNeZkSaCnGFhUrlEtwQ0lEkBeRsm6YTx0fPC9Yhddc \ nbw7s9hm7Q09QhmFs0YWlSizLSvJh8KwePSVbLOgU7JxEziY8rAVhkCgBptrh04YkUyQ + JUQY + wGd \ neKqip4975vtf5tFjTSIvWVUjF5OaYHf8 + MU9q / QZZcj5UD9irjVbfSBQ0ZkcL6a4IBn9iA8GnQmS \ nJMVGGKXHeonwgVSX + BCxQ4esLTfrl5yfS559NCPKht4GZotHtLLl7WWLD3MGG1FFipUZ09VjfFJw \ n + dDwo89fIMLAZDqlSC64uxtIM49UI8iC0TU4uccWa + ypZrP5kmG6Z9 / 9bO / b + UYCv2oij57M2A87 \ njAgkWkOQKB + o5MBgt / R2xFpLndcUusIfPEmS4pTmED1kGiEl0gtKH8h8TwwtYy4gkeTnM17HDbs + \ nx44pqZhyGgrSdkNz / waJRI6O5hAozQU2j0y / vSD5qORKtLzZGQ5XgSpMqVWNTHuCyAmURJex3R3o \ nm4FoexJhKbVB1w / MludUi5H7zZ5DB1JdEGWJNwO3VxvKckLjO0oCtU6YpSVqG98NJvcHvLVIX0OS \ nYnPJNgbqqiIhIo2hVD3WN1g5o8x + C7wn8RZvPR7B0L0iConsT6ldyUo7zh4pxn7GZjNye3 / DeVSI \ nh4RyXpCkG4asI / V3nE4ekdVnvLxM6YziVdSkZmCZRMhrDj4StCDRhugP7NsMo + bc1Ute5o6cEZdm \ nmLsHisPI7KRA6QnRZWA7bByIeY + 1r6mynOUS8nTOfhAcVI2odyxKhVMzmsbS + wah37XQNoOhXMCY \ nLClWFRN1wO0du71lN864GQtkvWKoO9xQY + xAOn3DSWE5ZUZzWNEMnnzSYctrsmxJYhIyI5DWkOYC \ nVUa6YaDvDaPTzLJH9J0hS2qwmmeP36PIFZm2BA6kqedCneLSSN9G0gyc04zGkKYaBUCkTrcc7EgQ \ nCVKVBDKEUyQiIdEBH0YCvJvhEQVSCqIY8fYaHyGoiBfgGTA + RURF8DnOKZzyhORdH / uQpBi + xTxT \ nzGUg3t853rYBAAAgAElEQVRRhxnbFy3SZ5BJJouMZ84gRKTIp2zutuQioHBkylLVgiTx3I0FcpCM \ n / cDDfYtSKcZIsvyEqZ7QmD1kp0Sh8OSM / o6TxyfAmhOZ8dHKc5Zf8T + 8WvDwAOvG008qDnYOXcmH \ nSeD7J7d8e / k5B / UJOx / 5 / LLn1SbSmBlVtUSEgUTsSNINj4uOdrWkHUq2vaYTAjWB1OzIjePp4ozx \ nXDHLMibxOVF4vnCSl9uGvipYJIKpVPzQ3 + GyhNXyV / CDJj40KOFJc8s0C6Akh2H8espsSiIVwQdU \ nkdILS1ampEiU7WhSSfrhe + yUouor1IOjTJ8ybvd4IenYoxNBmSqCMrjhms0Apu3xueRJPuPZIqXN \ nHtiKPXbTMQmevL / BhgZRpKTxwJOg + Z0u4zr / i0T5s0X2N9PDzzKsMxAdAkGaSFwI7HZb + jEg1Igf \ nI0VWUtYVDsFoHN6CcR6hNCpCohRapCjhiP2IC4IQBbPpnN2uwQsYXUOwHdM6oS4L2s0dfdNiuoG + \ nM4QgUBJmy3MuLp6z3Y28vr5ke7tD9YrlZMZsUmB0JAhN14 / smx377R6cIVOBxbLm / PSCNJkz2sjD \ npuHQBrwoUDphGC27w4Gu76gzwaTIKcsCKYDgMf2ADwMxeKIQBCfePcBXS6QQOBsQKiKCp / UW5wxC \ n5mgEWVFipaPtOrwP2ODfjXdEGI1DCUWiBEU9oZpWTJYL9m1DFJ7b2wekjkzSnDLPcC4ync55HHIu \ nH / aYxuBiZD8YpA / oLCWKQCIlXkBQHid6UpmghaYUEJOafTzQbTu0bFCTgiqr0WmGVBFSQe / eTUMt \ nipqqAD / 0bDdbHnY7kkWFSDJUlCymc7yD3e6AQGKjeNePzuB8VjOtAvfJnt32kkYlfPj + hCQV7If4 \ n9f9G / q4okDlDH9GpJMkr8qqgaQJapiQyQQgJIhKEQCYZaTEhTzV5WhKDJgaBkookSREShnEgSdW7 \ nKz2lAEFRaJSSWKvQSUBKgccR8Wy2e2wQJHmO0gmIDBshBhAItErJVQnBEYMFAUmiSRNB7wdscCAi \ nREOQMApJwGOlRSiIweEHQyYCedgyIUcYS9M1fLrZUlULTh8 / Z376lENvUe2GYXDcXa2Zz06QEnQS \ nmC9S8hIe1pc8NDnegw0aPV0SoqcXDfNZwV4GTJqQ5FeUuSR0G57NAyfTnsY0tM0NP3694cd2z5V5 \ nSts44jhh5k5ZiI7FyTUfP19QJx / ww1fPcdWBF5dvuB8MIVuQFRl9cPi + 4XyeMQwNn73qqGePiGKO \ nV4LZyZQYDXd3Hc4GcudJYuTlq6 / QpicpFGOeYKRmWp2wzCGLAdeVSCUYh5FoA0oHpIoEaehMgw8W \ nJaZExLtWsdaUdUGIIFRPxCJcQIY50hbsb + ZYdc + UGyrZkFQK5FdUWYUyJYkLTKMGpzhc7TEuIBGc \ nlHMe1RkXReDN5QvqbY8RF1wmT3GpZplvKMfPWBJgb6lFSq4SOvn / w1k6 / djjdz1JDjEGZKKQUiKQ \ nxBiRaKo0Q0rJEAPOOZwICBEQQlFIRSYUkYiIEW8dQ28QPjKrl / SdJwjFaA1C9Lz / + JzHpxPevPgJ \ nr774DD8aNAlaKKTU5LOCyfyUq + s919sdzWCJJmVSFNR1TlUJ7lqHP + zpe4O1HoFnuaqZlJoqFe9u \ nDnMJo48MPiLTgiyfElXFpt1jvCUrM84WNZPJFGMswzBgvcHYEYQnyzKU0DBWOCEI8V0qWOdBCCDg \ n8UQCSQRnDImQpEmKTd27v5O3OBnRSuHluzd7CARZmjEMLdPVivnZGW + vryjSHCEUUipcSGh6Q1Xk \ nnJwsiDIhih077xldhvQjeQAVPEJayqpAZ5rBWmIYodME4ah0jZ6cIyeSqHKi19jeEZLwrj2h5bu2 \ nRnTIOFJlklQCvkfsD / TBUM1XJKRYD / PJnHEI9GbkzdU159PHnCynBD0QhePR8owXLw7st2 + 5eglp \ n0lFOPyHTKVFn + AhSK2aLjNZs6c2ArlKi0kidopRkHDzNYU8hMkSaEbWjMQYzdiQ6Q0gNUTI6S5Jl \ nJGmBtYEoJKEf8E6BEETenQRihMEYiirH2pGknIJ71wa0IRK8JQZFdBH8u3n3Sih8jCgJOpEIGTDO \ nkOiENMtJ8wzZHhj9yBAgFgqlE3QCIkgyG0h0yrD5I5rdwKGxzBfnnH / 4PiqdkRVzGisxpDjjUaQ8 \ n3B + YzZ5S1VOkCqR5Qm / 2uDgBUxCB6WrJbmiIwiHEiBMju7tLZlVGuVwSuntq2fK9D55w6Hse7nY0 \ nriKpH9PZHseeulQsJyWnsmCiO86fS2zZ8sVN5F78Kt3hB9zHFX02QpqTT3LGwWGDp / eCpjOgnqBZ \ nEmJOTAWtcRjTkVc5J6sPUNJyaFqmswpBxr7fExLAe1y3oWsNLmjIL0iUJNqAwCPTQGRAaEORCYQo \ nsE2BDoJpXeBjZHQD1g1MJxEXR3brA1X5FL8paDYTrNyTTgbyesuL179Hkib4AfwwME8UEzeQhoz2 \ nekuhSqrZjIsqo1Ypt69u2d7vcPbdCarNZ5BmDH5D3L8i + ajmYXnGdtuDrJAP5mfK3m8k8EfnCDZQ \ nznJM35OSIqIg0SVlXRClRRwEkXevIApaE7VAy4Rc51RphZYJh + gwxmCNQ6oEnaa4oOkHg9SKROSc \ nny + Qruf / + t0f0R / W5FLjREAKxXS6ROsUUSfYoNjuBg470EnJdJJzOinIVaQb93QGoo9ImTKbpVS5 \ nRoQe7zooEtJCsN0mGBuIMgGhQef0xnK3XtONAxfnF1S5IjoH3qFFBCmwCJAamWbEqJBD9i41RETI \ niHMWRCCGSJZoECANQKRtGrTO8DIilMR5sN6BgNFHhI4orel9JOoEFyVaSE5Oz0EmdK1hbFv23YDt \ ndhDuqesZ1WzJxemMYXQMFqKDGCxKgUaghccw4EREipREpghSjHeQTBh6A1FRlhlSJkSlaEb77n6I \ nrELHkXEY3l19aLiYFSi5YHe3Zowt6SzHD4beOLK8QGcFbdfx + edXNPsDT55PmZ + kNO2WR4 + mxLDD \ n2gPgWeYZQij2XcPV9RW9u + KjT36VYiLBSIwL9NYivUCSInVGmk + xRCQRlYJUKdFo8nqCQhEC2NEg \ nEk0UEWQKQhFFT5QSJROESLE2oNMEvCZGkErjZUIQESE0QmiU0giliVJAEIgA3iik + Puz0SJCOKQI \ nRCzROcbWUPHuZsQgwaaCJNdIJXH7BrfZYJsGxZrJ8oTW9NSnZ0zPn2CtwnmJEhHfHbi9v6EsZnz8 \ n3Y8ZhnetwIjk0FuMdTRDZHJ4Q7mcM60q7kSLFxaRDWhz4IOV5GyWsc9OKWTOpFygkhX79QayBT7C \ nYS / YNw1yEnhc53xnmXNRdoxjYIgfcruZctuObPzvc3c9IDLJKED4kYf9A3EU5GnC / ejR5YxpcYF1 \ n74q + JBGUuaZrLc60ZCmYYU + VTTDW0XqHL2psVO9axS4lkyVVUmBCik7eFYs29qjEEOgJusMKg0CT \ nitX / Td2bLUmWnVd63x7P4MfdY86IzMrMGlCFKgAEBQ7gIJJqk7pbNEk0melCegO9lkz3omS6oNSi \ nZJIoA9lNNkEATRSAKtSYY0w + + 5n2qAtP9QMIFzCGWdzEVYSH + 9r7 / Gut7yepQ3M6 + kRKEi0sIkc0 \ nIG2LOs9czGesb3ZIqdh0U84eXGHKCart6VcLLr8x4comtl98yvJmx0TNSUZilaZrHfevPKuFpLUn \ n1FePOKlL6s2nNGFDu / yY0xOHvHjKv1t5vhgGhOw5fjz9lbT31yL4sqqoJgKhEwmPMgKBQluL0gVJ \ nGFAZVCKSiCoi5OEmarQiR8 / Q9uySh5yJKWOLGkRm8BljSowxGGPQYeDV82dsl / fU1pBSRuuKsqyx \ n1QSpNF30jG0PSTHuHdVRzaxqMEoglKfrd / g0R0uF0ZKqKCA5bGFwWdANPWwy3TDBhYS2CmVKQlZc \ n39yxaztms2Oa6QzoWC4W1GWFVoKUQUmJJzP6jCCjkyDwZsSgNFZrhtChjSVpSQqZxlqk1IzjSIyR \ nmDJZSrTWhBQOh2rXIXTDxFSE5AkhILSibweq0pBCpjAVRaMpj8 / YrFa40bHZ7eh9wtiK6XxO7BPj \ n5jBaUEKQfSCPjpF8KBKJSJLicGtWE5ILJDkCggFBTh6jSoyakyWHJzUsJEFMDuk90ggKWSKSYmw9 \ npobkE1YfnvRizjg30naCF / eOXq34Rn2KLmqssZTzjmETCULx6Wef8vbTd8lIqqqhUJL1 + jUpJ548 \ nfouX13dYq1Aoxi6gkkLpCcJCFI6cEjFGdEoIJYkpoQtNUU9IMTKGgMCShQFGcoKYMyllfMxARmlD \ nCCOZDKYimwTCoIQmJ0kOAikVKYnDXkVpySmTYgSVIEpQCklCy0zKkZQCaAlWETW0Y0scBkw / 0AgB \ nCZhdMX3whPnTKUKXrPctdTlh3C5Iw8Cw3lJOFc20xFpFVhJlBT4GQvC45MkSvv1ezYjHlnuEDIze \ n49oe5Qfee3jOcVWynEW0rNCy5ufLDc / 6ntUY2G6WXEwLKr0EfcVZNWEq9twsPud1OuHVeML1oiCF \ nr9gs / pKq / GdYI5B0JKURweLF4TuITGFrpqEjhxFrFFpGZqWB4Q7ZDJg8INXA6CV9CAxUeDFB5SnS \ na5QvSKJiCAp9JDFKMcYdWbaE2GHKhNSOrBwkyG1AipKUFCRLZeZs9ju6fsfgPUGV9Osd9PcczxoI \ nAtt8m5 / 8cks79visEM0l4XjC8 / vP0KUgNQXRa6Iq6PtIGFrckFFHj4gqc / JAc6bueHq + 4u0zyevd \ nA / rpnF + 8hP6TLW / rU5QtGMf1r6S9vxbBr49PyKLFix5bFRyfHZHyBOQELyWIhJcHIwsh0FJhC4lM \ nGT + OdO1At2tpbUU9mWCrKVFkhnFgOimoC0OhDvPemxcvaTcrREyUtjpEQYUiGYNT9hCVzAIfMsv7 \ nO0SKXF2cMG8qpHAoCcMmHMYezmNVQWEMIoN3B1xDHyMiKMYY0bYkC0k3OPqhZ7draSZTjo9OSBGW \ nfceuPbjzCkhuRElDkoKEAhRRCYS0pBDwY4QIISm0luSsQELOmZQSQkqUEAxuIGuN1orCKGKMtPs9 \ noxuJKXFyPEOZCmMl0XvGbkQJjRQZIRJlqQnTCUprfMx0g2PT9lAco7SmmEyRUdGOOwptMKrCkkBI \ nkgAvPYML + MKgTU3MmhQDPnu0glpNMLpiwBO8x0iJsgqdHdG3kAJDTJj6iD5E1ruOLDRlVTJEjyAz \ nr0t2ssILz / Vqifv8hm9 + + DbDOGCnl1TK4mPLi + c / 4 + T8nKqecXRyxq47tGa7tmXoZrh2IBmLtgXG \ nSlS0xDeHitQCoaCwFhsnJJFJIlAUGq0FfRtIAqQ0JCx1M6NrR4Y + kWJESEPm8PpnJEJKvAAhwcVE \ ndA4RBVZVpJiR0qCkJEZNJJGEPDzBaQ0yg4woAZKMi5EgBQmBVIYYEj4Kos + oCEU1Jc0uMKdPECRS \ ndBQ6IcMe3Brf7bk6O6I9niFFQfACIzVD6IkpkOJIyiNlqdkUCmwJ1YRN6yHXqLJEqGOKs3fIWjJX \ n1yzblhdD4GfXSwZT41SgPgpczHuUucVefsT7J1OOc8OzTz2fD1O + dHswW + Zjz9v1NxnUiCBhSIwu \ nghUoVZOEBSMYcyKFJU1tKNSAkR7f7ZnVicuLU4RKjGNBG0 / Z3m6JviaGOXGcYPqCkEsGW + FIjONz \ nvOvRIlBXkmmp2LVrIKAkBJ8RQuJcJCVLTpZ + FKwXgTEIkBWymjNuHdOi49EDQXSGTatpecBQDEyO \ nR2Rjue1rVFwxUR26ToR + xuhmjD4ilUapkdq + 5u3ZwL / 4luakzhhzzk0b6XTNtYvcrzqaYc5FUeKv \ nr1m8 + vRX0t5fi + BHU7PdLZnkkdN5Q9nU9J1izBIXFcIUhFIiSViVsDKRho6u3ePGAZIgqUQ5O6E5 \ nmpOVJKWIKAqKQiNyoNtuWC9uycOaODom1ZTp0Qm7zuEyZFXgpEIKRZ0Sm / WSFPZ89P67nJ5atIau \ nD2zbPTuX8AwE5yiVxPUDOUf2 / cDJ2TExjvRRIlQAkTDGIKRkt98yn87RpiYFWO + 2lCqgJw26rBn2 \ ne3zMZKnIaIQwZKHIhcK5QMgZpS0xJ0ptSCHR + 4CRiqgj5MMNNIWMEpKEIKWMVRpZFYgs2O62LBZb \ nps0cmaFPEZkkBk0Ye3JukVrRdYGYM0JLqumUKP1BBKTECoU + mZFzyXYD + 7FFeLDSUIgSLzNJBVyU \ n7NoeqyVaG8gZkR1kTxpbjAWjIQlx8CgOsxNi9kQp0FqQC01II6NPCAPJOY7mDZBY3O3pvUBYjbUT \ nFssNq0VkdnQCaqRSEitKLh8 / YkwJ13VMmprZvCHklu1 + wX6zZFrM6FVAy4yWAiMMSSiyzGSl0Eqg \ n0kjTNHT9HqkSwkSSzEThKCczrGzY7wdiSEynR8TYs914tLakNy1sqTOTScWYAqSMzorCGozURAc + \ nHMZtKUuSLMgiH0qHMoEKCBnJ0oMUCCGRskZojUuZMEL2EpEtwgqsKZhVFbPHT8jS49oFkwpMcqzW \ nt + x3W / wYOXlwiZkf4frM4BIpAVkSw8EvKsqCycSwbBq0KrnbJ + 62grqoqayhDxvuRE12jsm + oo + W \ nru0RLjOdnODznhNTUvS3zNUpHzyeEIaeF0vLs / srVFPz + PQlRbVn / 6xg9H + ImnwNIiF9ZKIbiuoh \ nQVZELWjzBnSCFA5bhbMnpZH7u9e8 / fYTpK4JEaBmP0LvDX0o0anBpAaNJmnFzgSCGGl3z4iu4 + Kk \ nQRiDKTTaDQgBIgt8gCzKw7gOi4uK1XpDkgJTGkLusTryYGY5KjMPyw2DlrT9gJ6eYVRmkB15TGz3 \ nlrPCcvHkLeaq4NnnHbvXGRkic6uYN4Hvvp / 4 / Q8a3n244rpX / MP6hL / 4acfzpUNLTxUbZCPxoWXb \ n3iCs / 5W099ci + JthxCdBKSXT4xNCSvgsCFnQuohIEl2XWDLKO2K3Y9ztGbotgUQ5ayjqCdXFFbos \ n2bR7dFFQTSoIA9vlgrBZMOy3qDhitKVpptiqIQxbHIpsK7AWYTS6G2m3Sx49POfxoxkutsQsaceW \ n1a4lygKcpzQKkRK7zZ71dkM9m4KekqKlG0ceHGsm9exgAi73iARKHA6IfesYhp75ecHxdMreBYKP \ npKwOH36RIQkw6pA1tobYOvpuxGhDQgISpQxKZVp / h0FjtMYHj9GarDRD9GTnCfFw49Tasm9bvvr6 \ nOe89eQuSpy5KJkbih4gbt / TjQNfDZHpGQpKVQRrFmFuki0idQRrKZoqc1oz7w8 / z3iO8wRqPKgW2 \ nNPhQMLpEu2 + xOjEtoNKKsFtA3KPKKVpLYgx0IR7SR4VAaEXImn4UxOJQeRpdT6NK9ts1VsCj81Ms \ nFetuz9Dt0dky7iPrsaWcKozRByzH1JKzwI2BfrmiKBxlnakKSWUUWtcI2SJzQCvNrJwgzIT7fkNS \ nUNgCg0RogbYKbSTogLUFiBIjC3KQxJTZ7Q50R60tUh5GOd6HQzQTTcwQ0MTgyDkfBF8XyJxIOZMQ \ nxARJHtI + yAOPJUlQSqO1RmgPMYOuMEWJ9QGQCBWRjWDWNJwczxEp0rcjkj2MOzarO3abG4bRU88f \ ncPb0XfTpQxyZ3re0QyR7gUoSEQ3WCGqjKIRmkIluN + B3PVXvUeOKkRFdeGxxyph6FkvD868 + J4ct \ nv / XhN + jDQJTQrUZk1Pz27 / 9zHk7X / HCr + btne2JZcCmeM3Nf8 + xuzbX / kPXsnIlaIlJGZDg2D8h + \ nSo4JUzkqRiZThchTtv2OUkcUidnpY04efMQwZkavEdKi7Eg1DYxdQeoqCmlROuB0y0bs2OUNJWum \ nR5piFvGh5WbRMps0FNoSfEYVE7p + dvDWfGbft2ASY79EmpFmLjmdBT66WPL2qaUWjheLHePpHKJk \ n44 + 5v6vQxvLORc / ULPjmNw3Kd1gdcZtXVDbz3XfP + N5HD / j2h1NUo / jh51 / xyVrw15 / esPYPDqTY \ n5JnogoV7xW75kq5fIKt / gjn83eBoqgKERxrFcrFFiBlJTchIEIYhBQQQh5HhfokYOxCZqik5Pjul \ nOTliryb0bkQXJdJIhmHPOPT02x253ZO8YzadcHFxyeA5VM + lQVpLMIagDBFwt3cH7PH5nL5fYeuC \ nu / s1uy6TpD0Yh9KghMANw2G + qyznF4 + QuiJ5QSLT1IKUA19 / / SVS1TgnUUoTI + SY0MoyP79Apohz \ nI0JKtLbEFAghIxSoLOjGlqH3EBSTyRSZNc4djFitNUTHvj3MZo21AKSUUFog0sHTEBm01BzPJyhp \ nCMHz8U9 / xntPrpCVQhhBoTInRzXN / IpXt0u2 / UCkIGEpq4ZqIhnbjugdJEVSGmkNKgsKBSZ67Jjx \ nwZG6HoGgsvNDCUhm0tDiw0ijNEoFpIaIPow6tCCGwJgTdWlIErqdA21R2pBCQCbLMAwcTQoKlcl + \ nwBSay / M5y / uOMGTyGBHC0O9aktlgJo6Hbz2iayPdLtC1LW2 / Yb1bMJ1M0UJghEYrickSLSUxRJxr \ nKcuCnRu5vb3l4qRBK09RFcTYsliuaZoJTTVnu1lj1JyrR4 / Zb0cWixUpGGazOUrXSOUYveP / i0zH \ nxCFRA / gQ6HyHURajLSEefJpwmBOBlGQRyEIghEAag5IOHxNFUaFtiY4OEAx9B1Yzm5 / g8mGkWfqR \ nUiVWy1uSv0cmR1FadDOlPH + L20Gyurul3fYQDRM9QwmFVpZJIQ9hBOnR / T1xt + VYGGwtmJaGJAbM \ nkWKuXvN88TU3 / pTZxZ4ns8w3Hi344osvmczPmT0 + 4 + r8W2gEr3 / 2Y37y9Slt + S7TyQ3fv + h5 / Tdf \ nMusf4E9K1pcjtKeIIXI6OYZck52hNJHS9uRhRLvAyBxTaUg9xr7xP9QRm34g5gohC2Lek3M8GK + 6 \ nRGeBwhOKFqdX9GlFLT2mUgR6pqXk7UdPqVRBdILtpqVrK + rJGV3nEH5EagdxR3MsuXp6yvGZ4ai6 \ n5qPjz9Abz1TPyScGKRvWN / fcriyif8TZdMJ7j3 / O6cwhxMeE2DGfH / Pd39B8eP6Q984MF5MdX332 \ nJf8uHfHD7YQv7zK7xcDcv6aRNfXkiLDvCDfXnPYdD4NFrP8J3vBPM4g9WNvw8nNPdfqYaCukFpzO \ nE + P2lmGckELPdr8g5DWInuOjOb / xnd9AqoLtrmftbqmKguQOPJywXeO2G2hbKlVSHTX05oi9mLEd \ n7gneYXTkuDDEcUCGxO3tHS2KRw + vGJLmpJyR13vKuxGEYZlHyqLExkPsESGwheb09JRZmYlug799 \ nTRpHXgwPcXENqSJlA1kzDtCNO0zlOTubYkQEkRhjxuiSsqzo1lu0TKQUSMOI8Gts1CjTIFM4zJWL \ nkTF2uOwpVOa0MhRGUQh58BdiZtx3KCNRFkYfgYJ2PzK4SFFPGIaBr1YbHhUnDFIxVTXDbmDrM16e \ noRtJjODawximnCh8p / FDJO / WzKYRKS3H0zlRKVx2eBNIyeIJOOWg7HG6AXOBCbBefIk2I + d6ipCG \ n29QzGIkeBBdpStFHhE9sdcfJNJGHnn2bydngvGR0AS8iVQlNrUhmjxeOB1dnvF5ueOE6ShOpCtCy \ nIO0D + + GUOC3xZz0hfUG1GknRszKe + amm3PektiIVAj / t6d0KEQtSW3Exf0hYDpyUj9mkQIoBkxNn \ nTaLQnrocSKkjKc9WtUxnHVoVRHfE2GnAUeoNZ8cjwUmik4jTLTLOIMyQKGTukHqPFB1SVURXgbnB \ ne8 / ElPgDowAlJfjAKCSZBl + sD + YqLTk6Lk8rzs4umDRr7pdbNts1282WGKAqTwkYtOmYNJrzk1PM \ nVjLcC3R8jfIjk8kxJE9KknoypakKXL + G4Nm8 + oTTkxlkD6WgU5okLGlf8frnis3ubWbV2zx5Z8nZ \ n0TU3d9f8xkff4WxmKK3j7vozPv7H1 / y4 / l3CpGbuC8Z1z5 + vXrFpjpHHF7A75clXV5TDK1TZMLM1 \ nDkEqWpLp8GLBfNJTm8gwv8fiKVKmEg2zyVuEdsv13S2xMLgUaXRBYEpdF5zNDdX6hiJueLm / pa8M \ nfcow0xxzyffOBML1TGaG9KDny6 + u + Przb3BczzmyO0Ze0lxlSs65fHBF3P1rLsMFF / I1R / rH2G3N \ n3VQQG426dajPB9KLh / Rj4vzR5 / zOBxvePv + 3 / Ozlc6pfPOWpfp93fk / RPMqcuqc8Z8Nf / OSa9ZdP \ n2L3b094 + Y3ZrmJk5n + cF6nHNRZ4yfvySJ0uFNg1BjzjxT5ClM7iECAGZEs1sxtFsyiAkptCM7YLo \ ne1RRHLbwDC0pBs7OTvnd7 / 8BhW24uVuzakcKPYMgiV4gtKZzkm6AenKMmdQsVitmhcDHHmRmdjTF \ nGAMIYojc3t3RjSPzR0 + xszlFY / ECbhfXjF5AUYCEgETEkZgiQijOTk + YzudIJbm5veP27p6jo2Ni \ nGhEiI0jknLD2AFVTSlNV9mDOxhFCQomEVpqisBxgwYc2ZYoJIzRJiAPgSljGvqdoLHVd4iOk5HEY \ nkoeYMjErRjdSVCVZH0YCk0oiZEHIh67D0PcYqenbnhcvrplNSs6OysPIRUIiI2KkyAqJ + Pfm4qQw \ nLLcr3LjByRXT0xlF40lFjdaGtvOkXhL6QE4BaxNaZFwaECjmJ8eEvGRvFFIfDPjaRwgZoQKikPTj \ nDi0P1MckCspZSewz29U9fhgZQ48 / qaCqDuWt5AgeZpMK6T2DH3FOEFMipUTYrZG5xhwbEBatGmQc \ nCUMmtCO1qHF2yhgDEoWyU5LXtHuP32w5ujph7RdkUR3Mz + xwoSf6nkiP1JrMIdGx6xTT5oJhX4OD \ nMQ5kYUkyEyS4DDaXKCw6azQKKQz5DUKEbBCqIIeEUgXOJZQ1 + Ojx3pNVQFswtiDICu9aumHk4vyc \ ni / NTRu / 45Ktrbu83uJA4tvD0vfe5fr0gUXJ + ecV8VrDbOhbrO5b3AT8V2PqIKEqy1FRFTTY1m9Gz \ nvmvVKhgAACAASURBVN8gc + Lo9E8YoqdQHe3uluXdl / zm9z6i63Zk1 / L48pgL + W94 / / wdXr / WXM7 + \ nhHJ6ws9WP + F6d8ezF5Zu + B06V5PSPUP7km63QuYZzp2i64pu / BJZfMLV5bdpji7ogmDsWsCTYouy \ nAV0qVHlI8MQsGFPFpHmMrj7kf / of / oqXtyve / egDXt5c8 + jJn3Fy9YLvfOuejy5X3P3kK8SyJG96 \ nZv2Gx9rT5IecygW / 86Tkb3 / wgmdffY / m8e + xfDZn92yPvuy50wNa7Xn / yNCwQe6eocQzvvPO + 2Sn \ nyPYRFFeIxUs + + fiWn / 7kNcNmjZZ3 / OY7Zzz5jYc005qf / K3l9OwtvvdffJ + pdpzNbynLS / 7y / + 75 \ n4S / h6zaRHkWE + ZC7dELZbDmfTDlbHBE / F2zF16z656hjSWSFKDbIYv8rae + vRfC1rkhvSiWnJ6cU \ nWtEPPWNM3N8 + Z6JB1Q1jaHHZ8c577 / DRBx + i6im7PrIZM1svKIPFlpainKAqxfHpFV2 / x489iIyt \ nZpjh7hD9MxJVWGxZs1lv2e9bBuc4Pz + nOH8HbGYfPX3Xsh0EKpfkpAhC4D2USmNtyWQyYTJp6Nqe \ ntu1YrTbwZr4eo6OeluggDrNF50g5UxQlWsM4jmjXI5JAIgnAcn3Pdr9DGYMwFqkUEk1pLDYb2r5H \ nGE0 / dDS2xBjN0DvGXOCiwEeBFYaitBgtGFxHkpGyKAh + oLAlTy8v2A4Dt4sFm01PkJm2C4S4Zziy \ nzJSjNAWlMoy7jsJnfDfiNnsIgplImLpgHFaE2zU57xlNTa6OYV5hbYEfPWM / okKgKhW10ezbkSAT \ nURakymB0ZqoFNjmyygxjfzDONYhhIMiKLAwhJiJQzypWeWTjBsZtQB81XNYWkx3bfmRSTlGFQg7p \ nMCICfDJMEbhxxMoCTA1ySlEbegba5Y5yPqdq5mzaPcN4aLrmWNCcTklppGWNNgNTKqIfKEtFM20I \ nLiKVJ6t8iEjmgDKP2beJsqhhGBDKkJJGWYEwAmmBZFCpQolDU1dmS86REAM + QIoBITVSCpJICHHo \ nnbh8SHOgM1FkjJxxvVzR1DPq + SX7ENm3nvtNTxckSlecvTVl1Q2Y + ohyesqmH + lc4Pr1PXVxQnE0 \ npZqf0 + 4HkjSQLA7N7abFd3tqW9E0E7ZqweX5DKsT7c2S6mJAVtfMG8 / TWc3t3Wd89PbbBLFjfnJE \ n5Ir / 7W9WvOomyLP3uI0JZ + c0Q8Fy / Qk53iKiIXVHWPWYYXdL0Nf88R9fkVYX7HvH7XZFRHB80jD2 \ njjGPWJFotxtUsaewJ2TOebmY8b / 85c / 58kvDbPINFi / hG2 / 9BzTTgt97v + G33llTuq85e2j4arnn \ nG5eW / + iPvsPPfvE3fPrJKz79 + G / wLwaS / oCr9x8Spop64pifdkR9zUppqv45j6oZzeoLXv / y / + Li \ niePt6R / h9Ck36ZIf / HTLq48 / 49ltpCs / hKrlHfkpf / TuFn3c8v / 8w5aj9SV / 8t0ztuIGN1swb3p + \ n8G / + kf / xx5dE98c8 + v57fDz9OWf9JUVZE / 1XbLcLZvvIibA8eadkdXTBx58 + pxtW2OmG2Vn81bT3 \ nV1bv / x9f + 8FTIJnN51RWs1rdsx06XBwgOnzy3N0MxOD51ne + xfvvvw / S8vz1kuvrFb2DiwePqYKl \ nqEuSzHSuZz / 09KPDj46cAuM4UtNTVDWFmJCEZrHd0 / cebQrefucBZ6fHLOQEpRMKTx4dKUt0ToTR \ noQpFqQ3GFNiiIObM3WLBOHpSBFPUTJRFaktZWYyROJ9IKRNjQCmLlPIwriETQo + SCoFiDJEQDx2t \ nKA8NTKv04UBQEhc8fb + nXQ0UE0ukROlERgEVSgBZIFFoIilJzBtevzUKmTy + 35OVZFoU1I / eYllN \ nuVst2O1GhlHik2Pf7WnKcOCf + 8g4eGRwbPZbXr + + RxcVT9864 + zokii2bHdbxsIhi5qoa6IUSKOp \ nc0XY7zDy4LccTWbsEXS5ZC0FpUgcJUnjQVvNnfYEJTAhkvaBzWaJrkuyEAzBUWrFydyw2g0styuu \ nf3zHb35wzAfvv0MWijFFjFA0VUlSAp8MQmq6zT2vVyvOZo9pJjU6Soa + pW4Ebr / mxctnxDOFqRoK \ nU + FGgxs17ZsORVEVuLzBuZacDjHgNA5YM0LyaKEpTEESDrJDW8ly8RlF2eDGgZwP3YgsQFpB5S4Q \ nqEMSRByY + DnXb1I5kpTEAWLnPcJYVpstxbRCVSWmkoypZ9dv6V6vmM0qjk8mBL / n9etnbHdbhC45 \ nPz + nmR2zd1syGp8EEzslhpL71R1ZTpmdneK8x3ct475D24wUGecSIoMpLUofMvkffHfGfrNmu18x \ nPTtn3jxh8AGc5Ec / + IxvffQ7 / Ou7OdPTHbqGn / 7wU7aLRwjzEcP1K1J4BfkZXy8OWfZSvov0kZwT \ nffqSb3 / vbc7e + jOCWPOPr + + 5W6zQRUUis3 + 9oywChI7truP0tKEMZ9jyLV4vCxZLwdc3iaq5gLQn \ n9xvun33Ff / tflXx46qm2HUae8LVIfPP772KsoGPJ4Fe8vP8EczznWScwpwXb4e + 5ePJzZh9dYi8b \ n9sM9YrAcR8cn / / C / Mt / 1qPEzmvfO2W1vMCcNWQg + + / SXDGuJLt8im5rZfOQPvvs + 3 / vWEZ / c9Jj9 \ nz / lv / kzyQJbchCfE2 / f56z / / V / ztP / 6U / / hPH / Do / Vtu42vq3vCg / YSfXT9nP / SczVv + 8395RYnn \ nVVD0LzKF2BLYcNFoGvurae + vh5YpEqWR1LOart + yWi0YEWQJhdbIGLHWcPzggourh6y6kcXyjmfP \ nb1G65tGjdw6 / ehWJZiTmxHZzi + s7RE6UKbFbr4l9j34gyOIQt + v7xGrXv2nZzmlmDVlkSjxaCnJw \ nbHZr8AMiJUotkTGAydjqGCklm82WYfAUtqKqasiSfhjISdL3HYPLCHmg7YWoCVEAGe89RS0QURyw \ nKIeMGVIqrD1wYkKMjCGhR08YPMN4KEvVlQWZ6fZbdCEpyikui4MpJRRISfQBrRIAKQRc8igydVUg \ n5eHwSUJxNJ + TheHr5y / oO8dm2aPtQGF3PHp0wbQ0KJMwpkIxQ0jovOKz9UC5HjmaCcykJBuLkRO8 \ nrxhGDzqhomK / 7VBjppoEpDkYkkYbhJJ4P5AEzKoGD0ymDcu2ozIVVW1Y3H1G323IIqB0pprWEAON \ nyUwuT9h2nhcvbnlwfoEtCgQJlTMiHQxxpCYrgWrmnJ83DCpjlWD0maAmZFsyu5wyLSeMeg2qw + oT \ nAnP2QyYEUEEwth5hJJApy4JJVaLlwSvQ + rCwZxhHtDYouUQpzdi9oKkvETYTY8SncKBiaoHvH4LM \ n5OxIMpGyYLfvKcsGoQy6OPzPIonoekJKEDylKAkINm1P7zwnTeJ3f / s9NqvXLBdf0e1eIFNiYo85 \ nbhJGDQzljM26Q0rJetfT7gfAUljNcrfDhz1q8wojNIU2ZAACJNBKMDElhVXcffHi8N7Ux7jB8GIj \ nWa8dKZbU9b9k1V / xihvClwO75ZrczjG5o4yvyf6OuAy0yxKuInk4w48awxY9ecVvf / 8xkZZ / + Ps9 \ nu3XBXkW0OewMRiYKUxB9T23PKW3i9Ys71F7hWPGLr9dUzdsoI5kVng / ektRqz8NzWH / xv0N6yJMH \ nZzy / fkVEII / nFM0pn / 7ol3zxsqe + mqHFA6KasvM1d7c77vrXPD5tqMWU7LeMi495cFZzPaxZDIaz \ n00f4oxmhrgGB3y1h8Qtk9SE5Jy6bBW + / 5VlHz999oekWD7niN2nKC + 56hVt + zd / 91f9BCLd856OK \ n905HbLknrSz5ZuD2r / 6CJ3v43n / yL3j / o4ccyc95dX3Pq + 4p + 73Db5c8fjBjbgeOC / Urae + vRfCd \ nGnjyzXcoTIAwkrMnZUXOgiwN3ntUUXD18CnSTPjq2XNuF2ukKji / vMQU9o1RuURJy + 31a7bLJRNr \ nMSkT2468XHJUlGRx4Nu4wTMGTRQlJ6enTGcVymRi8hSyY9j1rFa3uM2GIo4oDoIa0mFjlo8RBQyD \ nI0YwtsSYkmFwjGNECjA5kWPEWH2AXRHJGSCDCCAV0pTkkP49kKuqJyQE265j9BGRIfpD05OcUCoj \ n33BVskjEIHFDjzbTN7dG + ebJAJQU8AbfLASHfgIJkQ9mc44H / ktd15yfX9LuesZ9TzWpiHmgHz2m \ nlNgCkgg0R3MuTibcrBw3X9zhN57pPlJPI / VxxIQFurLI0pDLTIiG1gl8t6MeBxrhKI + OUQpyFBQG \ nhO + JRrHrRkYxQYgCsqFsJpyMa / r9K / p + y + b + NXfPWqanFxT1MUmWVNoyiil3dwOzuWZ + OgPXgxLE \ nnJDKILIgVHP0LBPUksF3TIxm6ATjIMnSUBQTpmZD2 + 3YbbbkeIbKD + n7gEgWU5fkPBA5mN9CZowC \ nYwpS8FhdYJQhhozw1yipePgwEPwLxnBAJSsEOceD7yMzQiciPfHNex1zuOCkN43tfeiQRiKV4mg6 \ nJ4jMerPFbxxZHv62qwvN / etfslw8I + eW2gwYW / DkyTll3XB7t2HTCobBoyREL5FSY5RFSU + MPSl7 \ nJqmndwculZA1qOKwaGc2o5lWuL5DR0HO0A07Frs9m96RpKGeHuPVQOi3tG1gu10Qo + BsNkMmx2Zz \ nzXZ1j3EfIM0HBPdzjLBk0WMqx7vvXXG / XPDLz5d49w4yPySa3RvsRELGSPCOupyTnSOmzKyeslnu \ neHn9ivXzW6p3p7z9YM77j0rOq2t2tz8kbHb89etzTHRcPjrh5X5DcfIYIwpEt2Ii77i66Hg0 + xaf \ nvdCsNjfkQVK5gW / MJbPNkirXTNwK43 / GFz / eMeaCovgGSQ88nZ5izy8xecJpUvyHH57ztb1i70Bs \ nfsmFgV28YL0 + Qa7mmN7xo1c1n9xd8 / IH / zNnbEnnnvLkjHfOjrmJM / a94Bc / / ph5NPzhHz3lt / 9Q \ nI + Qd7t7g9mc8 / + ya1892NMdzZieCLG6x0 / FX0t5fi + D / zj / 7LUS3Yhj3XJw2LFvLfusQqqLrA66L \ nnF + csdl5vnrxS24W90zmc45PTjBGkuJAXU6wQ + Iff / R3tPs9k7omO4X3kW6xJLvDVqCQ1OHmoCuE \ nKGms5cGjhxD2kDpiCAzrNavdhnbsKCXo4rBjM4t8wBHkRIiBmBLGWnSWh0w2Cu8zMQqkVsQoIUec \ n8 / AGi2CEJAmPtBmlE1rNCdkfEnhCEFxEaEnyjuSGAz4hiQPULCcEB3hczAFTaJR + UzILwyHqJzKa \ njBAZckSrTBIQyWRjDvTNlJAqYlRBihliZlI3lLZmKFsiIyjFfn9PXdYYDoszalPALNEcTXHbmueb \ njn4 / UouRp1c1zZFFqIQzjjEEfKvwdkoIHdvlPWV / z4U7YXp0wpESTBvDLixYqSN26hC7lblk2 / b0 \ nSTCJEqNrionHpD3tEOj3G9wo6JA4OUfbI65vHftuizIVk0kBacCPA5jDXoSg5gQGSlugdzumoqFp \ njrlBEvxIICJpqIqSdtfTtjvKakCXliEOh9c7eoS0FEYxRvAhIrWiLgpCBKMmRD + gilvacY0uJKP3 \ nqOKIYZQHyJdI5OQYxj2FioiiB3FITxlRYoRg6AYQb1ASMeJzIot8aISHwDAOnJyd8ODqgml1zXp1 \ n + 2YLU2A6nVKUDV0XabuOdp / RTKispKwk / b5njPGNCR + QOZDigMyJk + kMXU0YnQJtcS4w + sBESHof \ ncNsLtu2GRbsniEi2UE8F1nikWrHfXiMXFefHK2YPKyaN55NfjKy25yR1RKhKolpR6BnB32GLJUen \ nJett4vWrjIuPEWZON7SgaggSKTxaSOqyIA4duqxJzvPy + hW3L + 8xhePhowkPpmt + + / 0j / ug3H / Dn \ n / / 1 / x2m94fLpMV9KwThv + NppOvOEp / VHqCGS + IIP3xt554nhiy9O + OXeEJYZ7QfeOr3mT78v2by8 \ nY3u74Gb3kvPGcnvDISauapLOnD88p5lbxo1jNq341kfv8fXPrunXa07liqv5Q0xWbMLI / KlhXCb + \ n1Q / / T / 7 + F / d8VE85PZ4wfXDOH / zzP8EUgeuXC3708xd89fo1 / / V / + qc8 + gbYyRZGySfPan7wNzcs \ nugVpu2Q3Bs6vav6z / / L30fWLX0l7fy2CT + WRBNzQsR8SVVNiBoELGiUsV48e4pLi1asVLgbK5pjp \ ndE5VVlSFRubE9csv6X / 8Q3brFVIryktL3 + 9w40gYPfPpBGnNoT6uJ9TzB / hcUtZTBudY3d4gwgbF \ nyGa1pY + RZj4DcWjfjv4gsoMwjEFiTSalyGw2R0rDpJ6x2bT0 / UBOghgzZVmD8qTsyVKhjUVIzRgd \ nygAEuhGyFxipIPoDuS86oveIlCAmlFCHMZSMxCTJOZGCh0IebkIkmiKRQ4 / KidJYtJBkDpxzITIh \ nJ1xMWKVIMaBjIpEIUdGNIEyB1AkzjYS + 5fSoIIwC4 + 9J7ZrZyYQPrt4i1xlnEv5GsXoRcZWhPE7s \ nWTA1lulEkXXJ6DV5qJlezlFDz83XG3a7O0RYofyGh5XBxoC3e / YTh7cG1QpUmoK2bEeHyIbUASFg \ npOHo + AzrEne9JcQCaY6JydC7QNo6Xjy / 4b13L9Dq8HSV0gGB4ZggI9iQqYOH2xvqZkYhLaO1JJXo \ n / Bl1M + H0QURuRsagQUj86BiFA50pAoQhcHp6hFYN7dByenJJHh0KgRI9PS / oMVgBo1ZEVzHEI8gz \ nsjokkWSZyXYkqB2eEZEbslZkAkI5QnQIezBsCQLxpln71uUVJ2dntH3HZrFmL7cEHwlRY3VDZRpa \ nr / GtREqLkCcIbyhs4HSmGYvE6q4nxYixFlseLjGPL4 / Yd57VzjMmSaFLUAIzO2HZ9jy / vqfbXRJS \ nSe8abNFwXBY8eXBKKTzXL76kXS15 + uSc84cNi3bNzz77hMXdOdOjE4p6RzvcktUtSMXD85K3rr5F \ nbSf86N9 + wThMiNLicqCYGoRTyJzRKWM1pMFxPG0IrufTX3zGdrtF1gEfbnjvacn7j + DC3HGSpnzz \ n9IKT / 5e6N + mVpMvv855zTsyRkfOdb92aq9557olscRIXlCVYCxO2YcCAdxbglb0VYNDfw9 / AsCXY \ nIiwZIkWySTXZb / Odh5puVd05b96cM + aIE8eLbGhv9qLhXOcqgfjlif / 5 / 57H32H8 / BUf / QA + fHCf \ n5VrQSAfEGKGnZPWUUm1zHQf88qtrnp5YpGKNI2oc32e6mHE2WvP8eMY4vqTWJbr06XVdttshn3xy \ nwO1exfLqKa + fL8j0C64uY2YnZ9BIuvdvUZQebnnOrc4MOTzllxfHfPPnz3n79h3620944wc2P / 3g \ nLRx7zItpyVdfh / hnPd4OTnnzUcEbDwKcmcUv / nrEz7 + M + erklMMdm0e9hodvvsWdNzrUxRXG + f8h \ nLXOyHKGyNWGT0mr3UZZkuPsQxxmQpzXrxYKreEFdC4Sy8f0Q3w9xHJs8z5iNr3jx7CmH5zNcGnBg \ nfnpNrTYwL8tx8Fpt4lpTFg3DXhehHETjUmm4ujinTKa03ArP0XQHW3RdG8cPsKXC1ZL59TV52WC3 \ n + ridALRBCoVSFrblUeqG6XxBnGS02x0cZzP7xCqpaoFQCqE2D6 + pNcbUv3pL2Dyclq3QjSFJEmpd \ noJsa17ZQQgACx9nMWH1RU5iCcpnjuR47e9t4nk / LCljNVtgoIj / AkmIDeatzDJrGGITr4XoupigQ \ nRlAWGthsmAhtU5iMoGtheQ6GlE4gadYJ2x2Lnsiorl7SeDl0Orx / 501s0 + VsOWeUPidnyTSrwKlp \ n1ICSDjgOqhWha9g / uks6yVhfH3O + mNCoDOGnFG / 0qBpJaTxaCCK / Ran4lbEpIl / MSdYFqklphRJt \ nuUTRkMXcZr3SuIFPGHi0IjDNgjTOcDwNNDRlgbSdjY9UGoQp2G1FSGtNEafYrkNjWdBYaGuX1bqm \ npsBYNkJZVAZs1yVvCqqmQloRF2enJFlGK / BZzsY40qcThISej2NbdHbvM7o5YRGPsewORnQxekhZ \ n + DRaIFWN51QYS2OsEks1KCnIlhVZsUaYGktWVEZj2y7KtiiLeqP9FIrZZEJVauqyovICUBJl2bge \ npHWNFD6NFW3CXoS0lEA5MJ1ckOdLRBPSDru0ow5VtSTJ1tzMV0zmCZbfAcujwqY72EJ6Li9evELX \ ngjh8QmMaXEty5 + iQo + 0esoiJx1c8OnDpPHrAy + oY499hehqgkz22uwFO8BohX2KTU6Yh6paFMRXP \ nvovJlpIklig3QAuDH4bUosYRAikapDBY0uBZkjxZkaxXlHmGYymMv6Ypljx + sMNvv3fEUdiiL3wi \ n00ImsDwz / NEf30FVDkXZoN0rCvkpVlgSr / b4 / uwDfvGNZj36BTNrRu4ec9h7k3D4u / wf / / ovGY07 \ nLCnQrTkDJ2TQ7RHYDrd7AY8GLqOnf81iMiWNO9xUa754PaGTLelEA0rdYZkYHg8kWwfXXIQjSu8V \ nPzh06OeX / Oi37vL2xw7765j5tGDZ1Jh6wOJvn / Iv / 8UnvPl4TTx9ztUvLEaflWA13P84JL0643Fv \ nm58cRizmF5R + wsX1DXz8D8 / e38we / uc1UlqUTpurwMceOjg7iqhdkTx5zmzxDMfuYfuCstH0vAE9 \ nW1CMzpmfjZgcn9LOS9ZWjbRtpGUQrouxHCo / RPa3uXE9lBuw47k4 / S0So5nHE6okpTALPGWIjM / d \ n3h5WMEEnNYFoyCvNVZ4wVyl1q2E4CPFDi7TZI09W9FwLu8p48f3nNFozaEUM + m1sryFJGoSQGGFR \ nG02ZL2m3I0ReIyu1OcFKiW1JDA01FUmZgBAboJsWuLrhnlakKGLHQrsuvuXy6MEutlkR + GtcJyFo \ ndcl2Glw / 5PzlKZenN1jCpdUbsMxzROgTRDUuOYiaRnhY3R6zdY3llHQCm4FtY2YFWjhcr78gznsI \ nelyYMWeFxHLGHO1K7tuH9HdLOvs1dzLFz7 / UxJnESpZ89M5dVpnHs / On0JyTpB / RhA1r3UF6H + FE \ nc + qrilc3HlZa438WU3z / OTuHOzi9jLjVQOsOrrdNkM6phwF1723K0TXZ7ASnXbCyrulsP8A59VEz \ nQ6DADxxyt81VY9OpPQKV0m3NwH6NTAu8lYXNgLnxSARkdomtanq6pmtB5dYU1pJKJkixA4sOLVFj \ nWzPWRcli3eb72Yi6rlmvluj1Ei / sIjLYFZKHrkU6vuCN8Q394JiRHXNTD1mYFlYnxc0ETCP8zGZp \ netTOFPw1wi / IqzmZztB1ROC2yYyNVVwAHlG4iwp7pLWiEoLclCQqo4kaMtlg08HWuyS1oCqXaLGm \ nNSjx + zmVyfFOPeq4pq22aTk9ok5IuxMxX8xYTCc0RvAqiVAyJEQRKUUgNc18wtmTOW5u0I2DFLsE \ nvkOn5bOnushlRpqtQGp0UJN5GeFph / p0TZQ3JK2SrNWmSAzufJemKUltTTGf42LRZAG68mkFbRw / \ nJK9zhNYEjsOMh2zJmlY84XaoCMl5dvYVK3OJ1R5hooZuUnD7geDDoxn3I5fbvS0 + / 9sLpqlheCvk \ nvf / ipywO / jH25BmFGLGUFfZFSN0 / 4CUR / / HLZzSXHc4GC7wLzf3lB4TFFp9ev + CcgLQb0xIFrH1c \ np8eWsnj3Lnj9T / nZsU8jfkQ989i3MoqTKzrbbXTyJsIXtJzn7PYKhjtHLM8CPvt / vqB4VlK34bf + \ np3e5v9tnr7rHRZkw6sZ88 / kT5n / + mn92L + LN30sZTy8phc9zk1Mf7nDLSjDnnzOsfKLwkOc5XJwl \ n / Pgn75Jch79W9v5mLm2zJZY0SAO + FHhK4TaGnhvy2asTKBocU2O7Lqt1gtZzVrOEm4sRi + spOik2 \ n2zyuy607t5FKcDG6wnNdlOdCU6FL6Pc6DIIlVAqRBzQLF104WBWEbsL9e106gWZl3aJRGVnRcD65 \ nZJYtqUSJGyhkvsbUKb3Qp5E5ep0xn81wZEONYLCzgxu1McqhiVcUeUnZVGBJGiOpN6qcDdumMWhT \ nbBjmNORZhbRCqqambgxGSLQlOPYVVuSgVcVuN + TId9iTGr / yaEtByw + QfptaWRyfXHDzxTGeDNFl \ nzmI2Y5almI5D + 05Ad9AmCiWmqSjrKV4gaKwCW98wbAXU7QXrdErPCzg / v8BmQJ10NyOeWqKrLnHs \ n0Z9MeDRwacoFd3YGXKYhyfiY + atfcOfBD1H7PU6e20xmY7yDFX7oIqpDwvBtZOeCWXEBSxu9WlEl \ nCZeLGdHOjL3HNkY52K2GxvGxB4foOMEKG5rJknyxwmDw7BlhNCMvAxrLxXE3v3tdhyjTpUwzMtPe \ nuAh2JaWdYbRNuqjRBNjCxio1gyCgI2ouyhaSHey6QKqKgZejypTA9nAHESf2K87Hm5p + XmwENZ6b \ n8dbje6Q3U1qDHi + ffsun5 / 8b93 / o4QchkVbMpxWW5eGFiqxIScsYu95nlS3xnBJXCCQayzZgaTAL \ nBBrL2shihGyQqsETNo3WmLpC0WBJhTE + FgLFGlvkKDXFchpub90jTQ3zpSarSnzfQyqB53cQwnB5 \ nNeXs7Jw4jfE8H69pIaXBtWxUY6G14ma + IqlAehEGRctasTVsEQQuSbqirlK0NigroFkoLq / WrOJd \ ncjtH2AmHxtDKM57FK669kLzu4VY + av0hhVhSlKc47gi8G3LjUskutjigqdpE7hqrCAjdbcKwII2 / \ nRjq / ZOBn + Mqjt32H / + yDnAd3 + qg6pl41LHVFt7vN2pppz6q45q3Hj4lXNfMrg90P6W6llAl8 / p3F \ n8cqlSNak8hn5TZtmfc11doZdTMmCNrkBKXyqJKfvtbh3N2U / GlDLHkXyDq4VUFsrjPoWb68hnI84 \ nypdEezn9 / i2a + ghltvj02Uv + 9sufMy8ky26L9zs + f9y5TdyB61gSV / e5ujgh + 9 + fcKuzxU / / 5R8y \ nV99hz1zOTh8zq9ukg6e0k2u6WYukU7LuneO7gruP2gRBwu7g18ve34zT1tZYArqBT0cIyAv0LFiP \ nDgAAIABJREFUrOLz759zc3zO0I9Iq2sc20HmNdl4ySKvyPKKOt9cuXX6Q44e3md7a8hiMaGVZzie \ nS1FXVPkaz / NpiwqvyZmML3C8I0Ic0Jqd3T0GHU27p6nLOXPZZplmWGnJzTqnbGosXxAoiUwTiqJg \ nx + uQFSnTyRShGwLfBjvADnzSWuP5FmXdUFQ1jRQII0ApytpghLWhAUqw6xpTb0pCpRagHCpjUYnN \ noqaQisKXBJ6h68L9 / ZD3 + hHL759wfXzMZZ4hg4C83yWuakojIQyIMzCWIkezMJqmSNDTKR0TEPUC \ nhlFEpUArQxAK6nhBnk0pu2sycU0jdtnas + i3Wtj5Yx4 / clkvR0yTErc7I2hOOZQBpuWz1AOyuoug \ nQMwmuHHCUXubhSiw6nMcUbGqbSw5IIi6dLZr3IVBjltk03NUWSHzGHexYIsMK8xJ1ZjYGaBbAX5L \ n0I + 2mIxvMGVIUaQU0yUeMQf3HzFK59RG0AtC1jFoo3DckEbkeG7ExeprXC + EXNIfHpJkDnUtsA2s \ nsxVb / ZDh1jGwRTxvcMyMobfCzyMscxfL9FgW59iWRgq1KQlKg6tjnGrGgzdvYYqaW288oK3uM5m9 \ npoxBqG0edn / KyWzESigaHHK5oOfVuHLDVUpXS4ypsZRGqZzqV7azRu7QikKqwpAXMUI1KASBq3Cw \ nKEwOjYUwObZMaLdyLDL2tgdQxSRjQ0f3wfcQtg1SkpeGy8sRVVVT1Q5KddBaohKD3 / IJlYfRmjgv \ niEsDfkRtebhBm76VYLsFCHAcm7pxEMKlrBqWq4y67pJFB + R2hpVPSBdLZBUjpKL2XNY4SCukLiFL \ nc5TlIm1N0UhM46KsEINFbaAnUg52 + tzudZmc / gXCfc72zoi8mvHm9hvYdsry8 + 8Zje / y5psfUGBY \ nLBJqa43fO8ezV6ziT5mPfkCloF + CHTu8GDV889RiOq6QfcjcjPjFAJGkuMMc1TFkKOoiRBUKH59b \ n / SHbXgpuRRO6YFq4puDWzoKga / PN969w2kPuH2T0htss44JvXn7NxTikdjqsix7DNww7dsVHWx1a \ n7hIvs7lya747O + Hy3 / 8F / 9Xvvcf + TwfUgwuyeI + TicM6j + h5hqun11R2gdm1EGXK8bPXRMEd7j66 \ nj6hyRJ78Wtn7Gwn8pk6wbYWlBQfdNq1BiyevnnHx / Qt6KqBZ53T6bagM6ySFSmAqjTISNwyx2m26 \ n + / vk0mG8TGgFEfu3jiiSNcXNiDrP8GiTjE4ZTVOyuuLWA4vhsM9hK8SyKmRjMZrX2HKHSbymzEs6 \ nloWyHZoqo9Q1SVoilMC3As4vr8nTHCkVUroUVUXY9mgwSJtfzc81UimUbVGLzZ59UWqkASWsDc2x \ nrsnqhtIoGmnTSBehJLbZfF80DV1joZIld7sO7 + 6GbDsVVa / GPQxYxIZYw00asy4Lok4Xeg5ex6Id \ ntMFz8dKYdbEkuTnjxcUNN6piq9Pm6M5DPD8i1RVtx + J6VvHkIqfSDY4wHOz32d4NsLOMhhPeeXvI \ ny9GCvHpNXV / SEOGLLkPlceD2EVbEw3tvkK5jfN / w8Q9a9HYE / + GXz8idNp3tK4TJyBNJ0B7SC7rM \ nTU58PsM1Nixznv3yc8ruMYfvv4e7KzDBlCAweNMCK5hg5BZF0UJZHnlh6IeGQcfC8goaPaIhpFZL \ nKnJkMMV2LunqApEpyiRhFl + h7T6trQHSsSiKnFf1mN76JcPuAbf3u / ScmIgxb98 + 4OnTS37 + / V8T \ ntVK2w30qrTEKQhtMPuHk7 / 8df / Tf / w + skpqq9NjnLqtqxcn5BFddsRVk1FIyKQWZ2pT9TDWjWkoc \ nr0UTJ9T1Ekg3m1SqQihNrbcRVbHpaEiJNOXGo + soGqGgMBgrR7A5OICgqgWXZyN0quh591BCkrUC \ nPM9jtUxYzNaMxivCMCIrFGVeEwQunU5Ap9PC9SQ3k2tyXdCOQuISlG3hWBLfDVDCoqo02mjyXKMs \ nF8tt0XL7KGUzImW7kMhmwMwJGDsGy0B7sSYKa5bWFdqfAyBFh8bsU + dtmgoapUBUtDvweKuN45yz \ ntX / J40eKX / xshFnmHIYh1c23OO5zHj68i + 05 + H4bbTVoHSNEjeN6VCkcPxuRlTPcRzl6Mef4K8Pz \ nYpvM8pBiTh6nXFY2Mrbp9rZobSesTEHd + Di6jWjm7HZthqFBxX1EO2X7cZtBqyAsLtmJEp4dT0ni \ nI3bvvMP27WPiic1o9gzEiEDVpItd7nsWHz92uH3b0GBzNvDYWfSxjSCe / j3 / 6EOJ95Zkwg0Pl0Ne \ nrB5woxy6t56xW11y + cWC1LnP3HlBfrXgdm / AnbuaVmeCIyowq18re38ztMx0gbAdrDLl208 / paRi \ nupwjDPjSZWdvh6mOyfOMqtmcsoSlaISF1 + + ium0mVYpfQeBZ1BUMOj5JWZAu55RlgSsMcbImF9u0 \ nei2kX9Lq5QQdxXK1pqoCGhNxs6iw1Iy2JzFpRpkucEMHFURIJUBZ1EawyBtKY9OUmtBzKIWi47c2 \ n7dkiZRWvse0utueQ1xWWlCjbQiB + hX412FIh7Ias0jRGgOWijcT3vI1DUJf4QnFPbrgzj9oOB6HG \ nVzl7dzq0H + 8SxAWffvEc + 8ZGFgUyLQiN4XbXIxAJSiQchhULt + H5ymZyuSIatgndgNUyJyfi8mrB \ nbHxNokNWYgetBb1egtGw1x / S7pyTrCdI4 / LodpfnLw + 4SAzD3QOW6zFOecyPH8BXcsTEXjGPHe5a \ n92m1c / xWSssJSZYN2psgjU0 + lTi + Ax2H8tqmdkNU8av + QOMR2C1WN3P2 + 9v4HajkNY4zZ / duxXLi \ n0JX7rMqGZGG4Wk25 / XDI1rBHVsK6mLIupzQiwVUppj7Fde6S5ja + 1yVJBWHLoWHFoCfphy08XRBM \ nIqrrl4iwYZHNKBvDwnPobdmEN8fgd3ir8rm + yYiTjEhppIhhfELy + lMevfUx3WCPZ3 + myfQaz58g \ n6i84fXmD6HXZO / iY0zkIXOKmgU4b6Wg8qRHaYR3fYLuKrBYgXYwWZHmBJy18WyDZaA4FGt9T6Fqj \ n / QTXiUjXIXHRQjYt2r7YjDmEpjewMIHP8fNXrFcZTaUQ0iXPGupKEgRt2u02IsghrKmo6e8G6Mre \ nEEznKaKWuLWF6 + 9QVTmmqRBS / 8pjsFnvVZZCSI2V3RCkNuUS6iBkjWFbWBz5DbmTMVldEEQhRkOV \ nZth2SKNTLOPSC0L2drfY39thT / wSYV3x4H7I91 / / B1phhl8GmPWSo16H3 / 7x + 7TvHWBEd9MMX6 + Y \ nFNfc2tmjziJenswobraoogllVXNzseT6O8VsALpzhcgvWM4c5rpF1yRkZcnVQlNZAWXt4hkIZULk \ nzYiCmvfefYuFs4NUEZVesL3Vpt1E9Fo9Pv7RHUo / 5Codk1dj2sM2stpldXbMre45 + 7uCt / 2PCZIt \ n7N0HxM5j / ursOVd / / pe8 / aiF + PERVTSgPXZ4fe5jD33ebF3z95 / 9nKflCWqnw1ZhWH6 / xbo + 463f \ nf59d / zHZNGG8nvHNtxf86Lf / 4dn7G2rabkpBtdZMxzdIewPrijpt / ukf / hM + + 7tfMp7O0GWNshS1 \ nEZTaUEloZIMjGjSGqs6pK4eqMehSsl4uKPMCiaEpK7wgJI9SOrs7BFGE0Q55LNAFuI5gtDgDpdhS \ nFapsWCxvcKkQygVLoqWNVh6uF7BIV2gpCQKHuKro9HpIL6SsUrJ0RZ1n + G4HYTS + Y1MDUiqElJi6 \ nAW0QRiCVIur6oC2qvMFzHBpd4MmayIfQMjgqpduz2N11iVfnDHc6RFs9SrdFUs / YjtqsSg / Xs7i5 \ nfI3vCO6 / cQu9nLC332U0vcKv4bioeHB4i1vbPdwgIhUha + 2xdeddXo4LCpHj + S7CeCjnhNVC8eXn \ nz / nDPxig6z6jE8HdBw63tu / xpPD4bKxp4eKKa5LR3 + DZht7bv00va1NMSq6vcwK / 5sP3t / j2Scxo \ ntMCe7KDjMWNnThj5uK5N + + gOLFeU2YpKgu / YlGnM9MWcHbUHIbz35gPKYMaf / cVTqqDCcnapPYeV \ nSVkVS3ZlRDds0Q4tcuWQ6Q7jmzHrS4l1v8R2farZNXbdIkwMu36LXely27HYD4YEvQZhK4JWgd08 \ nwKtuc3U1Idxr0Yk8Li4cIj3DH7pcS488njMMXd66 / 5DJk0 / 54NEd / M6AfPuf8NeffkW726Us1sh6 \ nRDK94c13fx9d7nI + lYztMZYQLJIUVRVEgUK5kkWaYgV90kqh8LDkxnkrGo0jSlqeh1KGIltg6gRl \ nJ + SlINddpBggAFPlBF6LoOcxnt9wPlqyilOMURihCIM2WZKipKAVBGBqmqBi3eT0Ix9ZlVDn + LZP \ nWscMBm2ilo + hR5kvUHKDCLaEwXJAWpqiXFHlJX5t03gGu8l5bMFwMOT8ZsqoTEkrC5H3yLTE1A6O \ nCfGJiEKbprhhr7vg3fs57eiC2 + 0Ltre3mU1H1OsM22QYMefg1hafPP4xPX + HafkQ15esi2uW6TlP \ nj79iMjqhXLmsl4paOxT1a26et7l5VdByu7S3C2ZFxjo1LNclWqxoxMa9YfRmqymULmZ9xSBa8tZ9 \ nm / feCLH95xxEv8ezkyVbD4a / QpxH9PpguymxPmfbC1k3Ft98 / 4rRyylRJHjrwx4PH7 + LLX + C675L \ nXsKnf / OCeah48P49dtsON9WQbnpEUWTU3TVt91tCKsLqgAUd / H6BOZlQjha885N32BpskU9TpusV \ np + Mbrte / Xvb + RgI / 2t1FVjU6jknyAp3mWJ7NRx9 + hOW5vL44RTeGWvMrRkpDaRqkZeMIA3kOVUlW \ nGbx2RKILLO1QlyWBHyIBYySW5dHZcfAjC2kkqvQgh1C6zMcjmngC0lA1bSwhaTsWsu1R + ZKMCtv3 \ n0FXF5OoMKW06vTZVXiNsheW4rJKcuiyoqobGWFCXeL6DlgK0RiARxtCYhkY3INhc5ooNhlg5iqpK \ nGbYdhq6NzGeYag1dRbDdQoQ569WcIld0vA5 + o7BulvSVhTjqsLxYcpJcU1k + f / bdL / jg8QPSakUc \ nQJw3fPTJxwQ6ZhjaVBoyGfDkbMHLV89QlkFXS6zgAs / usbPTo + vvUq6v2R7eJa1DmsTG6JhW94Z + \ nLZmvK9JE4LsDTOFhck069ehtuaRrTZo5RIMK16uZLSV1tcXNKwffqRBOQykcusM + XdumI2vSxRXX \ no2OGA8G6mJGuZpTpLeLc5 / xVyb1oi6OHc25uxsyLjK3eEY3TJ2h1sKRDEac4VoudgwfMVg3JdUSg \ nLM7iU1yzQuc1VjqnG92hTguKiUPo9OngYNy7rBOby5sL9ncOUd4dhnsHWJ2axw8GJNWc6 / MRhYzo \ n9odMUaxXZ9RVTVmt8HWG1gk / + uQDnrwMSIsbPE / jUtJUKar4krt9n1DaTFcljoFWy6VODKaYM + h6 \ nLC5Tah1QVRG58rGMpBYC3Wi0qPE9SV1mlMUaJQ1OLUlXxUYrqSwaKVAWNI5ilqacnd + QNx4YG0s5 \ nCBS2FAjfRdEQ + grXtdAyRxpBy7FYrxe4SlJlCa3QY2vQRQqHJJVgBK5r4YeKhgY / sBAC0lSTGYNd \ nR8gtySBoc5TkePmSV + tLRlZIYTr47pCGU4xpYbIudRpQyDUfvtPjt35S4fl / w3ArYSu4gygzvnk6 \ nopzYuMol7LrcurvP9q0HqGYXLEFDTJ5eUCZz3r77PqPLlNk8IzeCWtaYKmF17iJEB7ljkWQXpLOA \ nZdal1CktFVMrG0t1MKaNg8CuJ2x1F / zBJ7vc29X0uw7G3ydLMtzihu3OkBq4Sivq2sVzHXp2Q8uM \ n + eqzl8zPEwZbAW9 + 9Ii7j3 + X0WqX87FgMfmWl88 + 59EHD7BOv + aFf8I4cfjn + p8zmoww / Yy7vQnL \ nq1POsrfpPHif + dcnXH81Z801 + s1LPnrnB9hzh4W + JIh8Iu2yPv / 1Ev83Evj7Dx + RXY3JswohNrCy \ nyhjSMuff / Lv / m1oa3MrCUQ6FMGA1G4qkAJHlkGSoqkYEFso4lHlMKTw81yFwfaqqIUkzssLgVm2q \ n1BCFJXe2XXSesTXY5v / 6N3 / P5HrG / sFtMk9imobQcnDtAtcx + A4YETOZTpDrhId3j5B2xuvJGOm0 \ nWC1KikrjBB5StdBCE3o2rcAjLTcCb91s1k8xG2SyMIKiaTCu2rzm1jXbwy47kSAo54h8jVIxPjXD \ n0MV3NLv3D4mUh9IOWZazXCyw6ob86hXn339NPr / B337EMqt4fRPTOIJFXbC7v0 + TN9w + 2IFkjCMq \ nPvzwXWzvJbsDxevTFcu6zVU + xoiaeNWjyV9hyhuePwu5t3sHhMsyNjh2TFtW3L2zz9mJZrmwsO1t \ nLJmRvbpiz2rY7 + 0xba5wWhOqrMXhwR5xPWaxqilrRVlt / rS6 / T0cWRL4FTsHFq3 + lHT5jB + 8fcB5 \ n0TDmDLyI8wtNXKzob93ncUvzb3 / 2HYHbkFgGiwQ / 17R8ya07u7zOJjSlJtquGQ6GBMmUZ0 + + pe / 3 \ n8ayA6fULmm6PqlB0ojbC6fPk0y8JOh1SfciiUbxxL + Zwx0cJw51AI9Q1p52H / OzrUxZKorqH0NRM \ n11N + 9OOPcKXaXMrrF3z0SY9PP5uhs5KisGi3BVev / pTDo5qPHj5kOdthdHJKoHMcv8KSsH97i6Pb \ nDzi + dHl5Lqhtl7ppkKbBVg0GTVqkSJOiLA3UNFOJXSvcliQ2Myqx8aBN1ynFLEM0HRxnQ9vsRT2o \ nbEwNdqRQVEhRE7YsHNnGdy2aPCOvBI7nMC / WDLf3Ma7DKi3BxAQtgRcowhAcp41ShvFojK5qWnbA \ ndtfF77VJioSvT6 + ZzTJG2kHKANVItNDYtYXWNcYs2d / y + P0fv8v7jyra / pfsDDqgF2QV6DxmOTpn \ nPZ5y63CHw6OH7B / ss6LADxe01JQyu8HOrmjXFrK5zVWck2Q3rMUcogJ7ukdQLBk86lJttbj8MqVe \ n + dSuj64qvERQtyOwBphGIfQMUT3hv / mvf8xR12xIr3LI85GA5BW / / cEhdbZi2vhMsjW9VoeOFWKK \ nkH / / y19wclNgRz1277 / B8PB3eHq6xefHM2JrTTz5jP1hTDqfk1 / liNuSdz45Yps1SZWhBh7prERm \ nt0h0xRevf8HNCMqsw5yad94 / pAKq2CHYesg3L4752y + PefJ6 + Wtlr / qTP / mTXzvA / 79 + / tefnf5J \ nL4oolmuqLMFyFMKWPHv5gl6 / R1Hk7ARbbO / s4gQbj6eybUytKeMYsoIAhd12sQQkqzlRECAQaA1V \ n3RCnBXml8aP79Fohe33FvSObjp9xfvyEJ18c47GDySMSBePLKyajK3xXcXA45L33H + MITToZ8Ue / \ n81t0goZbOwOGvS6vXp5QG0mpIYh6aGFRVA37oUNebKr5AMpSKKlQSGwpcSyLxlFktSGpG / zApxt5 \ nuE2K36xx9RqRTjnoSo52 + / Q7Ad12C8dy0EJxcjPj9XRCO2pz9Ve / 4KDVRk9XmHnKnr / Nq + 9OOH52 \ nyd7 + A1yvTX + nzU4vILJrzl49wVINoinodVzu7Xcx0mZtapJkTTILqZpT1utjRicLfH + F50iUvU3U \ n6VDeLNkO2ijhMcsFF7MFvldSTL4lu5myP7iF652ANeLFszapHiK7a8aLFWF3gCMDlpMcW0k8VxD6 \ nhk6n5s6hS7J4SstZcvTDR7DTQqsIpxowlNsEwYBpBroaYMVDMiGY3FyRTs9xnBx / YPNq + ZqEG1r + \ nAqs556gU3PM7mNkcnecIR7HQJWerNVdJQR20qeRfUaicZV0xTk7IymNCR + E1fcp1SeSlfHcc8 / xq \ nwU3lE9cOkWdz2HbY70csZnM6gx1c2SYvzzl5 / ZJs2Sdy72HJgDJ1KWKbrW6Psn8bVWZEqmavZ3N7 \ nr0WazpBWm9nCRYodbnRFXWp0rXGEIHAtdnf6DPotbAWGivWFphV0Ge4MsUKD5RUsllfMJzNc0cG3 \ ntlBORr87pN / p09QbTytNjZQ1oe9g24J2bdFkOav5Egsoq5qg3cVp9Wgcl0pYSJ3T7ni4boOUFfFq \ nRrKOyeKMfnuLOwd32GnNaBcN3359yhe1xXOvS9FEhGvouhYxK9xyiGMbOp2Y3 / 2dPg / uxLTdKw47 \ nDl3RwS13OL5Yc3N1iTAJ / VaLR3c / 4HD / HbA8JskJorXAWewh0hyZNZAGvHoWM1mkrK0rVt4XlO3n \ nNK / f58FBSRyN + W5UIKZHyNynaG + a6q3Yo4raWE6XhgbFFf / jv / hd + u4FfR8ie0hdD7iMHe7slkSy \ nYDm1GScRhWfY3pUQz3n1 / JKvp1MScc3erSPefeu / Y3xxn7 / 6u2 / Q / op1NWe2eMUdYo4 / U7yq + / xw \ n / 4h / dHubuV + xHx0Sj2K + G7XJxy3Smz / n + 1cXvJJ95m6MnyX8cPsnjJZT1HZCUpzzr / 7tn1Iwo1El \ n / + 0f / 8 / / yz80e38jJ / y37Yqzs1OqfITxSpKyxFUBg619jAqxI8WkZdPyBDYhYaxw0oSsKEhVg + OC \ n7WmqsiYva9xWi8JSWI5FkSQURYylclpeQNA6p9s / IOxvMV7arGYlP / vbM3I8LBOjq4Ii8UjrFU0Z \ nE9U2vWGf9WpBXC64 / 6MHxJ2Kbr3Dhaw4K + b4xiCWDXU3YO0oBkpxZAnWFWBtRjq251LpDcRKmAph \ nKjQWdbOP59SEHviOA8mco31wxAn97gt6nYLA2mdrK0PKNou1wXcC4sWCfD3jJ4 + 2KMoU9Z9 / wL / + \ ny + 955W4jpcfZ1Q0 / fPc2 + uKYrLjknSDkj / ZbhMMzFouA6O3 / kkn2Z9jWCt / dJs9LtgKJr2dUXsSk \ nGOMHuwx2dknjKZ / eaJ5R8k57Rj7X1NYDVpOAIKrx + 0va4gatE1r3tplfbfFy7CHtQy5GNxwcnlM1 \ nV0wWDhM5Y71sYzcWdsdjkaQsS4ucHDuc8vZbHbrhj3BERLK6yz1SPtlbMBHHlFUPZ2vIw6Ak / NDh \ ndKpovurTnFc4a8H1yxVSnHBY1 / TtEGu3x9fSwnUbLOlx8P57XN4knF + vKFKFxGVapPyyeMa9cJut \ n7QFF3pAVfb5Z + 3z7bEnbfQJFRlMVXOchVb2L12QYKyGnIe7v8rNRzNtHe7izKd1 + zdB9Dyu5R2m9 \ nYpl / xS5bFMpnpnPOX8148PGMYZAS7vwdvXbJ4vwd0tUON5WHU0X0tr / nn6X7XB2PsaqN3rPoCGad \ nkk57C1FtEzUHdN9PKPKUdHFKS0LPcajWJZHjo1UO9oIHu95GwFPlWLXBwqfWDZ5tY3SNLhsWXkJc \ nFah2iCUlgeNg2xaBYyGakmq9QHgu61LgWG2yrCYrBKGrae1UhBFU6pJZ1UIGEaPmlHYlkGVJ3QiM \ n35DXK7rGEFjgBy537w / Y39 + iNDNyfDLaqFqgaHj6TYPrtoljaAUppT2mkSlObRg2Dv7UJ7XPyRtN \ noYasVMOVec3SNpteRvwx6SynuLXiO / WQ5YWPTAzj / Bq3laNKC2FCpl1Jr + egVjkd9ZI / + Omco + 7f \ nYasBjfUu06rPeDmlmY0569o8SRsWa83tjuS9nkW4 / oLZ9Tekk3OapE1W / lP + 9IngYtfw8uwF7V2H \ nw / Cc + sunqFjwH7ciHv7WHp8cCR7thejmAH + a8dnynL + / aTNZuOQ3L5mv32G6LpGNQsRrdvbfAtel \ nrX36WPzi6Xfsth5yeq6YjtJfK3t / I4F / 9vQFi + UcVWu0bvBtByUlUhiEhFrXZGmNkjYoiUZQVJo4 \ nK5BS4YU + hgZdNxgMkd / GNA3SbCCVAjbrkZaFY3v0ekNubmbkSczLFy + ZLdf02gPQakOMnKQI2eAH \ nIcsk5eeffkbQsvECh9utLtVaUzQlq3iBYyu2dgasJqAkWEoRtkLEOqbMFljSwQt8LFdjacBU6Kbc \ nnLIUoGIssYVqQmhyHPea3TsuvtxmEG1hA8reZpZYfPPdKatVRb / XZ3x9yr3bA9xhCHaL7eCA9fwz \ n3NqmQrN9tI / ohPTMDkbXXF + / ZvWmIKtWZFS0Dw1VLtC6Q7ISzKsRn37xDV7YJy0kbSekbTnsdiJi \ naSi0RTZbc + lIgj2b0NM49hIpFB1 / QOj8gKyaM19fgt / i9SInaruMUp90LDGWjeXsUAdwPUnwZInn \ n1EhH0KBYJTC5VhTZkPtvDKj0Fan8V6yzJZa5wxtvvsls0jC7OeNWGvHJboQ6GjGKbvj0y2OevZjh \ ny4gfHd1isjpnbpXM3CHT8x2a9Rltz0E6giQ1SOmjzMYOppQkXi85Wc7RwmMwGDK5ucL3G + qyoshs \ npOA / MXVKWVHpjRRel4pCS0xpcznO8a2ao2BJ3Gu4 / 9F92l9eMF6vGdsld7YD1rPvWTgr7rTeZnaa \ ncjo / oNENdWpBU2HLOXtVjJjlnGYJwgqgUhRpQi4amjWkXoNoNiIXlwwtJIvVCj9wuRpfU9YGN / BQ \ nQuG5LqiILG4wWpFVNaYq8V0XZE2pE3zXxjQG33X / E23VdlvYyqYoNl7cmhDbtdG1hqZA1Rldt8ZW \ nFaEDg34XWxmStcXleEacVxjbo6prlOVvXLzNhvYqTI0UJfdv3SOQJfHsCjGIUKbNYpWQxzlFvMSR \ ngq1Bh + Gww9FBQFUuKfIEO7A4H73G7h / guh3qsub4 / BVabuxueZZQNRI36NKYmMU8Jk02gLrAtTCi \ npNIVTSOgUVxdTXl0uM9Wp8udh2 + wXlUMwwdYos + r479gPP8Ky2imL3oEQYc3Djvc3h4jmoarZJtf \ nnNzmb7 + pKe33uFlH3P3gQ / JMkMQX9HoOT5 / OqRYhA + Px9krzUeByr3VCW8 / Iq3f4u0uXr68Tytqm \ niWE0Kmi1exTxCaKpeeP + IW / f32U1P8cUC5JTn89 / mVNWW6ynoLT3a2XvbyTwk9GYwLUJHJ + kMBRG \ nI4E4XpMV9UbWrGx0WaNdl6jbxXFcGsDUBVo00Ghcd2MD0HWNkHIT + IBSClSDUJJ0nXP8 / DXr9ZLx \ n9RgJeFEXO2hRVw3JfEVQlyjPoUFQaMHlZEUr93j3zUOqJcTZEgZtjC7pdSJ2Hw + 48hL2cTUDAAAg \ nAElEQVTm04TAdRCiIdEllU4JXAfXBWQFRmOaGi0qhKw3XB2pKMoS2yh8r + LWrSGttqHl3MJVDuen \ nc754MiWOc9K82QjQz68QJqd7YGMlG2rn8clrrs / niDogHPRQocOoyXF8GzVbc3U25f / 88xk / / uk7 \ nCOOjPAu / u0WZ9ZjNFMorsO1vadsVUijOJymXL + fc2fmQQPlIo4gLWC5Kxi3NQM6JIgeHgNnEcHm1 \ nIBh4BP0DJmnA82crHvaOsIfv8 / zyNXGW44YxsRVShTVkMTQ5llWBdKh1i7ru8 + xFxv9L3Zv0Wrqm \ nZ1rX23z9t9rdRXvi9HnyZKadLhfYZblkUSUxgRIlVQkmMOdn5D9gwIABMwQDJCQkUNmoZFNVNLZx \ nl + nsTx9xYkfE7tZezde / LYN1 + APkIJXjNVmDte73ae7nvuarlLTumWlH4U65uT6jm60oKoG8vmW6 \ nbpC + 4b237 / koa5idWZqvNoRdx7PmI7795H3 + j / 2B2wbEJXx2eUuSwcnFE / w3x0JSSYQMpPLIJG4P \ nObd7x3KdUJcVSkYGO3AYeqLOsVEynzn8ODJOwzH22Cm + fPGGDx49YTsoGlPw8vUV4UHK06e / Rfz8 \ nFV + / eMW97QjNJ7z11tvcJi9x27 / mbLFgGr7L5baAtCHReyrT0928JB / W7OoBbRTaCopkTpoqvEtw \ nU4ITCSOamQvc3e8oF0uG7sAwTWR5xayqKao1WV7T9QnDYFEiQyaAjhR1jhADeZKhhMU1IzFEdFqg \ n04wYFaMF5wVR1BTzgkE2KG2QGGo1kIqJ5SzjwaMzhIbBjHzx4jVfvbwmyJTJCtK8RqsMESAYgxSQ \ n5p633zplVUY + / 9FfkLHj9z / 4I7Z3Gz775AVal6yrhOU84fFbZ + jkQNvfY0xP8BbpPZMWjCZlCprb \ n1nDXRgan2Y + eZoQhSlKd0t5PCDKyVKPTY8ielIEkk6SJYDQWESIuTmTVGZ98Ifng4TuU4glaGLr7 \ nl5ydTtx0L0mN5NtPznl6sSWRHde7M / 7Xv + z53z9zpKvf4 / 6N4rvf + wPy7Ht89rcvmdfvU8ue7VSi \ n6j2BL7lqGq77RzzjjG7b8aoP / KsfD4T6jPe8Z / fiii + f73j0QJFGePJwzcVKc795QZ3D7f0WtxV4 \ n8Ta7nUGpnDr7DSRedTd3nF2c4zWcLuZs + xYvBZOxTHHEeEeRrAgCdJqwOj3D9BNFUTKNHZfPv8Lb \ nidWyQEqJUoI0PV7R / n + ib4zBW8fp + TmbuwMxgpIZUirOTs / ROqVpGlYPz9GvXtMbQ9QZViqkUrRD \ n5PkXb / jWs7e5udyyeLhgkZfoVFNWNd0g6L + + 5EI + xrkJXacsijPqumKyPSIeoSNCCKRUhCjwIkXy \ nCNQtOrulmic8ePAB / WFiImcr9rhkRlY / ZHN4wzAd88ud76hnBfdtihWRbbvnq5cN77 / zES9 / 9hXS \ nTIhcsQs975ydIHpDMhpkcoFWbyGjYrdtOXtS4bsn + FEwW7T84R / + Ps8 / + zmr2QVqpomiYHN / wJoe \ n4xWHYWI / GUwEYwJvPzghI2E1UzSN4Xq7xXYtTi + hSrgfFNavqU / m3L + + 5Pa2Yb5asriQDK8nrLek \ nWcpqseY0X1FEwaubW74TPsI4Q / ul4ix9F38v + Isf / pL6seKtd9 / n7sbx182eX16WpHdr3Oz7dI9 / \ nwjjr + bd3Ax8 / + wcMc8eXV1 / S1xO6WDD2E20jWKwXrJdLmm6HNS1JpslkpDh / BykCbed5cP6Qqdsi \ ngG7bsB0NPimR04SNHO8lJss4OS77O1bzFUYn3HQdvSh59Dzh / bPvs / hWRfW6YHz9BZfJlv5kSeE1 \ nW / PHvPOdPyAW73IQNWPesN1HbtqI9YLEPsByYJgCyZAyy + aUKkNlFaNMaZxnNzXomze0hx3zShPs \ nQFnXnJ89piyWtIOn24 + QPEJpC0GQlxFnO0QSiH7EhwG05913jgF8t7c77vftMZ1TFqR5xWQDzWRQ \ ns4Q0EchpQyl73jqbURQaO + z5 + edf8vXr1wzhISqtyYLGjAGtEiQSYkR6SZ6mlPXIcpFwf / UCPR14 \ ndD6jvdtwc9eS5itUWrOSjtk8w5sRAEfG7iDph0jXd8xmK7wquNlPXN90yOqc / e2e / RQxogAhGAwE \ nl7NarpAqQ2nNOCWkZU5Z54yjZdc0PDm5QLs1u51E + 8CHb8 + I + Q6vDnz87W / x + fOB3mRcPH6H / GxG \ n4z2hPee / / e8 + 4aV7m3065 + ba8NHTP2L1 + BGf / / ATTouKp + cT0t8hRk3fwphtefjtM9rf / pf89z / 8 \ na6qbe1SZ8eWhAJtx / 6OfYN9c408rtBKcna84X2cIb0BEHCUHX9ANkU3fIYqEadpQF78a8urXIvh1 \ nVaI1pKni0aMHXEjBq7sbbr56ATqlKGt0hOgsBAghMnlLtVgipCAvSvoYCDGgpYYYyJKEaXRoqY6Y \ nuOkepRTWeKw1GGPx / mgzcx6GscN6T5IlRO + ZpgG0xIoE01qKLOX6dk / qX3EyXxAzySLN8d7TDTuS \ nMuXJgxWpn4gpLE6XuI1jnCw + KBDhiBxMUqQSSClJkhnWl5SlJtUDiZ64v7nm5vKAtT1Nf4lKI1X5 \ nHWazmqqosdPEfh + x3cjLLw8IZZmih3TBpppcMl3dc + sarBkoTivaoWehJN / 93rvMTwXT8ClPHz8A \ nL8mSN5TrR3z + ixt2t39D118yRMthd4dVT8nrFZ / 97GtEnIgkkMzBSF7fRNpbh7274b1HNXUZWD1I \ n6e8VV1vNbndg7BOubSBJa5K0oCpPKesFkzmAa8jzEt8r + n0CxlKd3zOvj1zdf / N / fc6Dp9 / ho9On \ nbMNrtuFn1ItrUrHgi6874uodxsUH / P1Nwqtd4PUvXuC4oDe33Fw8ZHQVaYCwvcfoe7LsgiTWyJix \ nu2 + p53MSqXl1dYV6sESTYl2kTBRD77mz95ysSiqpqT1styOHriOZBDYIvNB4D + NokdHSmwEtLD / 6 \ n7O95 + PH3ESbFdZE + f4 / Zk / + Yr3 / 2r7lLNnz1S8HDLMWWn7INf8XJ + j0en8Cr / nPuX7dksyfE0xV3 \ nwLIO9M7j3UhMCtJcoPD0pqczE3fdwNJBuVgRwogXhoDGR4m1EhVzhEropxTQpFkkkR6tJG17hzNb \ n0sTy6NEpMh4Q0ZEXnqeLE + 7uW0bvUTESIpR1gY0BP4202zvOTzPOFyXj0OA91GnCLK9IxYLeOIq6 \ nZL4ouNkcUEiEEMxXC5SQeHVg7PbUD1MePn0Xaff89Cef0QyRw6ipV + d8tBoYJotIC7o2Yn3KZlMA \ nC4beYaYMP / O0rWXwGYMHkS3Z3r7GRnAxEoB5ukLrBKk8UkUePFgjJOhEUaaO6AxMC8oiZerumS9L \ nlqcjqtyhM88Xv3jFT38aefDxf0msU / 63v / 854 + ERn / zdgcP + D9l5R7JOeZDXSLXk5z / / cxJvef + t \ nZzy5uOMnf / O3vPrkjvXpmvcffJsn1e / zP / / JPd0A39aCWbyndWt2jcQ3Ge + dPOOj75TUmWB3 / ZyT \ n5QXBH0eQdwd4dVPx6usNxgU0Dp05ogi / kvb + WgQ / X9U4Df3UciYCT549Y362xga42 + 7xwWMODVlV \ nkSpB0 + wJkWMV2LXIJOHi / IKxbzBmwltDmWQkQuHcRHtosNayWq2 + 6QASlIREZcQQMcNE5IiR894i \ nNLjRkyDwJgICJVKyImUiMsbAZn / g / Qdn3N294fJux + riXT569zGb2z1pPcenls5JpNCkWY23A3lR \ nYJzDR4HUOVKnzOeGMGqEmdP1W + 5e / A3NoUHpGZNJUGmOkneIKEhVRhSezdUVMQYgolJNvZpTlwvy \ nHD7 + / reYUoM5qzCVQgzdMXZABEoZaTZfUT1LUWqOtS2f / uKv6FqFXvd46RlEyiBSYrbA6hlGVZh + \ nRGAhjGA8eTKjCUsuXUF3aHn73UA63fDjn37Kav0tsJAKjzcjKqkRHqZmIDCS5R4xdDTbQLRLqtmM \ nPFEoscO6Ow5Nw + Yr + PRL2P77PR9 / bFjOMxa3a / x + wfX9hMr2DN0lu1dzrAQx7qj2GsEJO3VgcD / j \ nHz98wtP8hP / l776gz9YInSN9pCgLMqVQMudksSI6R3to0PmKUKT0rSXqianvePD0IVUWWNUSoSaG \ n2wGhErwIeC9QQWPNxKvLS8r3njJbVFx9 / UuSh095sb3hYXFCrBZcr04wu0DdSBoDz5f / hN224aNF \ nw2J2Rx0GONxghoBP78Fd48YSSNiNE9v9jrIpqZcV8mRBtZhR55JkLNHqGKSW1xVVlqN1TYgFiApC \ nSiIFzjsypejbDd7uKTNPvqzJk0gYLffN7ZEOpjNqLcm0AxWJoscQmNUFwiTcXN8hh4FtaPl5u2Ve \ nl9gQqVTBk9UDrnYB5yZcv0emBh16JAkySGQQECLe9ex2hjckuDJiOkfbBhyKKDPKesFu3JAJgdGR \ n7c6w27VIUeBcgreKJC1p3WsmGxm9wgmJ8fb44HmP855Ea7K0Ikk0p2cVOpF07UhRLPDe03Z7qnRB \ ntzths / 2 / + Q / + 6Sm / 890TyqRBiZRXN3e8uO2YPXwfG5 / wZ3 / 5c378tYTwGPxTgvolgtdk7YosJGzb \ nP + e8HvjgrfeRo + Sv / vRzPv3Zl8ggKKuJVfWYq5 / Avb9l8cyTq5z9Lw5ku4K2fcFFNfLBR8 + ol5pp \ naEnLms5pimzO5asdTRNp + gXdKBHhePuxKmtSL34l7f212DL / m / / pT3 + QzErq1ZzVxQlZlfP02TOS \ nNOP58xcoIdEhUtcV69MTnHNEAfvdlsNuR5WnpInG2AklJApBlqQEaxn6nkOzRyrFg0cPUUWFs8cZ \ nPwGmYQRnwTmCHYjWIHAYwAUJUZFlBUmiCMIzuBFRKMpVxlomCDPyZrchKM1MZYSuo6cn1oKhK8iK \ nhKLKsH7AegNaorPi + HiVBVL2MArczrF59Ypm94LJbghorFsTwgKdt0DEDAMyRrabDW3XY11gMpF + \ nsFQqIU0m8nlkDA3L5YIkSCqtyVLJvFyyEqfkRcezR88o5PuEKPl / / vySZswgD9iQM7iczq3w + iFB \ nzjDjRLfbEbxDCU2wkugyvMuQumD8hr1az5fIULB903F1vUdlFUqlRBQRgRDHhRrekEgYmogdoapL \ nZiWouGU1y0nVirv7BYfhgheHgc0AmodU8T3aNznbyx3vPT3jyUnO4fJz9nxKkU643hNQGL + hjtf8 \ nztMFj5cXfPKLO653HcFbBMffkFYgRUTKY966dxNYTZEkEBxaadquJ8TjEj5PFJkI2CEgY0QJiQCc \ nORKZCJG + G1Bo0umedi54tXnNuVBMTFxyIO0H7JevGIJlv / 5dbpocIxNEkVJVj6iyFeP9hvuvP0P1 \ nL9n1nqKsiWnFFASHpqVtGoZxJC1Kimp2dDopSZZoFvM5dbUk + Bwz5YQwIzJHiR4tDKk2RLOnziN1 \ nKrDtAeECU9vT7DaY0SHRDOMxs0cEcMagxHHRam939Pe3dNsN97c3pDrDmECz78EqZllFqo53J2O3 \ nx7kRgiVTkSKRCGcw / YFu2DF1PW03cXl1z9Vdx2AEQpcEqY9Z / 8IzOEkQGc + / vuLN1QbnBONgyNKM \ nvmkw0uCDxHqBcfDi5Wu6foAQSKWmLksKlbFe56xWGVIG8Iq + 9ezuWrRMmJULtCt5 + uxzvvvRHY / X \ ngnGrSOUjvrjs2Jqc2w5eX73mq9tb9rbCipwpvEKonyLic4ZmR5HNUfkDLhZnVKnjzctPuHp1xX43 \ nUtYZi9WC3RD4vPMMdU6ZTZiXE + 0vTvBvUh4XG / 7hs5azWUAV5 / SDBT2DdM2L1z3bVjHZmnHQmCkD \ ncoiWi / MlUgj + 0 / / sP / / NsmUu3nqAEJAWOSFTTNFx + eY1n37yS3AOvvEOF1qyqkq8GBidJ0aPkpCm \ nKWPb4LxnUdVHgEKI9H3P0PWICFVd4bwneouQgiorCDYwHBr60VCmCqU8mZbYWYHwgXE / UdUFqUyY \ nponOTogscr56iHOCFM3mdss0tDQ3r4j0rLIZu6FhMVtj + / TIg / UjQRmSTJBkGp1l2Ai96RB9RFnL \ n0L9hbG4gSpRa4khxyUSIe / ZdpMoleE9aJXzvH / 42P / rRj9k1HVJJorPEdkA + KNGnCeLWM9eCRNbs \ nhwMbM7LpUs7FKR9 + eFyyma7CsmL16Al3lxsOzYSdJG7KwdXIMCNMKavqgim9Ymq3YAeCExhl6cM1 \ nvduQphlRn0KYscxnHG7 + kmayyHmgKlP2bYfUjqqsWa7P6A53DG1LlmbkiaSuW4QYwUZefWGQomaa \ nJANvaDYZ3bCgu5szfjBn8TBjeaH48v4Wcb + lVtecjdAvFnREzKGncIItmh9JwdlpyqN / / AFf / + lP \ nGIYd1awgxSKRTM6iYqSqKkKZ4A4RP7TINGFSkigLjIGx3yPjRCkD8wKMjQQkykBAs28GgtLUyYxm \ nm6CWOcnNiBphu3C4caSajjzgX / afwG6PmL8iq56wK + CXIXKyeorKdrjZnuCeoNxLvOsZ8gHqJdXp \ nAmjIfSRYcNuJTEM5XyKFQwlHkSUolRMCGJugVIUQMwp9g5aR6HuWtUDFwNQeGHYHLILgYLKCep5j \ nB4UwkWAdQkXyNKWqa9q + x91dYXd77m / vWK3nJPkJ3dCxqtb4aaQbdljvycuSUhi0EthxYBojQaaM \ n7cTYTwx + Ii9KjNP0rSfPMrLBU44d81Iz5iNfvu7IE8Vi1vPm8g3zMmF9XmPHDjO + pqwzAinOBWIU \ nDN2Adx4tBDFGZPS4viddL8gyjXU9h8OBq5cdVf6I1eIh83lOjJbvfCCo64onS09tEjbXIyJYojzj \ nti358S9eQ / M1nZiRzQby + ophvGXcV7jpKavzBfXZQ1z4A1w38NX239JtX9O0ksXFd0iSewwVB5tw \ nPy9hFzi88ez2S6xfsDPP + e5pzZTMuLpTZMPE3d4Q8jl + AKfPaFxDuzlgmpE0yRBiRCYtZCNFEX8l \ n7f21CL6aFVRFAcHSuwkxSqTtubu9ZuhaqnyGnyZefPEFo / fMzx + iE01dFvhhoGsOeGOwzhJCRGpF \ n9JbgA9YYrHMUQrDf74 + 2yaJm6AeC9Ui + 4dTqSKIFZZYxFJKwbdFKMctLdF4QXcAJS0g8skyZjEFH \ nyfn6hK + GLaO3IBymb4iZYTI9WX2BEpbu0GBChxYpSVFiw0g3WAIZmTthmj7Hx5eUtWH7WqDSU3xI \ nkNmILkYGf8J4mEhwdO1AVWVY4SEV2GhJdE4eFQGL1456WTIeDmRZwt3lG355 + xmLquZbv1uTLvZY \ n5Tl0K1x2z0e / + 4DL6ZLB75mGBD + WaF1hjGK736PdSEZGmmZMxuCdIMlSXDJi5IhTOV + / soRWs5ct \ ndTqnlyNNO5LWkOUlMsuRSYLwkrxYMA0GXIeUE8iGybQUcs3js + / w8uWA0pbJv4GQM46n / P3n91yN \ nWz7 + / sCjdcEwKXRbsTp7wts / 1VwfBIeqRamOcgu6m7PvTxnjwLNnFV + scl693lFmGjt2KI65OdZa \ nxt2I1oLHqzP2hw6BoB8sWZHio6JMc6S1jN0OhOR0vaYfA0SoT045bAf6LvDp7SWr1Zr8kefbm4Ss \ nzrhce9YypbozbPb3uCznma342Q / / DdU7 / 4z547fZTiVDcw5x4vzRBxRvVkw3HuF2PP / qBaYyvPXu \ n91mdnqNbw3a75eH6EeXJAzb9HVKrY5fiIwJAaJAZUpcQc7zpMLaHOBKU5fKrL / DTwFsPnhAs7O63 \ nJEXO1EGz35FkCWmecfbgjFleQ5T4ceL6 + XN2zQESRYia + / 1AmaVcXd + ThWOhFIWl63boJEFlKfeu \ npzt0mNEzDg6JJAjNiGZ7MKRFzTRAnQu0DwzjSNf2DGJOJzwvXz / HdBuWHz7i + uYFJ8ucxUrS7F / R \ ndGtaY / Eq4367J0sUCIG3lkQIrJnIshTjBkp1tEy / + + 67qHhO3xjwCefnM9791ktOqwsWcUk6XnBS \ nZ1gN67MH / PSPf4qxv0XaXVKkORXgmhvspkLvvsdi / Zj16chu + grMDjuUpOkzJiM4O3ufZRkpT / 6a \ nRN / x6vMD26s1p5uaLOa8dvfwdkb + 7z1msxi4uTvhLWrq679l1xmW7yxp7LF7ud016Bgpyow8VUjt \ nefx0zdl6QIXhV9PeX8dI59 / 9xb / 7wSoYzqUm7QzSgc4qDq0lTBKMwCWRoCVCS5LimCc / 2QETDF54 \ nhmA5aVqGfoeqNEmdE7xF + 0jiBVVaoJEUF + dE7xFuYmz2aAUiU1BXsFxxUBp92xL3Ham3yCIwLT3x \ nokCWGckIS5sxXwbqZcVyNacYLPeffM7QNdxPA0EWLPSSKr1HTBtUGJi69ggNHyXbVx3 + ICh8hnK3 \ neDOx247cbHqMEtg0IsuMqGomk + HGEWc9w2AIQZFlNbdXW8LoSWKCBqwIOHNBtE / JynM6uWHrv + D2 \ n5hJxyNFyQfrhmpOz36GIc + Thp9TDS1aiJU0TpnDG5SantQ + wMQXpcVPLvtnhPCidHt0WCFRwYAKJ \ nz0h9Sh4kahqoMkW0gamLxEHgR8dqtSAtUmIiaNyIrArkbEYwCWnMUS5QIMlVwjBMBCLeRXKVkDJH \ nOIPWBjsVbG / f5tXLt3DxLaYkYy8Dr5uf0PQbKjtnXizZipZd6ogx46I8p93cc / mTO9IxJ + 4NYzOg \ nFzPiekbIUlxjKTqBHA8kEhCS3npklqPz7MhQLjLKoqQMKQ9WJTrek6sJ6SOZXLK7mwghMI47ot / A \ nImUTOoyb8DjyiwXWdrQ3b9iPO9LoUWpHszugY8bFSQVeEEJJtq4YyzXlG4NoA7MQqQMon0A6J1 + c \ nIrPIai7YO4ebIsIuePlpQ3sNp9kJc2mRw0vU8CmnsQM / cLi / YfvyDUtdcHH2gLtmj7UGYSZ6Y3F2 \ n5LC9IpOOi / UcFUGLgpvXe37x06 / ZjCNWaqRI0CHS7fakMkXIjNYLQrFgMIr9CCYkNJ1n6ANugrFz \ n + CkSnMBbmKxjdAY0yNQjpaXMNG4caPcNnd / SDVva8UBSpMi8xMuSSdTcHSR9XNDuntC0E + M4IqIG \ nu0T4Ew47h / GWiydnjLmhTAviVDCYBZ2YcW + 3fPih4B993PLR + UsuipT9TcqL1yU3tiacncLyEX / y \ nr3 / Gm68GGAO97wjryC5t2U0txjRk4h7ilnEC / DkiwAcfP + HTr99wP5Skqwfo2QXD + JTrqzX3LyNl \ nP9LJO7rZgfJJwsmZJrEToYE4tRg5YOZnJGenRJUQR7j5cgMHQRUzllWBFyDnM2SZcvp4xdMPz / i9 \ nD / / 5 / + + Rzq9F8P / sl1 / 8oB0mYpBYoRiQuDTDCMnN / Q7jHJVOSHVKXc9YL08Yh4noIFpPMIEEDVGy \ nmQzkFdVyjdY5J + tz + nFijJFH77xNcX6CEGCnia5pkVqR5jkqSwlSILVCmpFgLW6aaIaWKQbWZ2es \ n5iv6fcfQjiS1IktzNAI7Tlzf3GKdY3IepKLvO9YPTpmMQaUZTTfQHAZiPMY3JyqjKgqW8xIzGm6u \ nr7HGHo / DsuKIRXQRIrhphBCIzhOcwwwDQ9chI8QQCc4SRUDIkqxekOSKxTKjLFOcEdzfdmRZScAy \ n7DfkaqRK3RHELjJGsWTbZtzdQ9sKzBQgaryDrumZhoFpGFFaUeU13kb6sUdqjRQpwUNwATt1OHdM \ nYgSJdQalNVFIEBIQEEGiEE6gBYg4oHGUacHYetqDReocITXWjCh5FPwQR0QUzOsVVTmHKIhB4 / aS \ ntmkI8oAJinfe / UdsDz1JuufiJCM2OV999YYgAv00oIqU4mSJqHKclHjAeZj2O8bJYINHaUmWSGKY \ nwNtj4ZCk1AqsHZAyUM9m + JghRMn13Q7nj4tON3i0LEiyApVopnEgkYqz + Sm297x5vQFGOuexKkcV \ nS / JqRURhrCdKgdCa2nmacWSylmlwHHYDwUKR56zWNfN5wUjGZ598iRsiforkOiVTkCcCHSfs2HHZ \ nbojXDePLOw546g / eQnhoPntFlhX4ixWhGznsNjhriN5Rz2ZEJLd3B66ub2naDhcsQoCIkbY9IKQg \ ny47M3YCgH0d22z2jdYze0Y + GwTh8EAiZEIUiRoGSCuQR + CNERBCJzmDHnma3w1lD14 / HLjAeTQ + J \ nLjCTwIyCoY9Mk + TubqK3HUE4YtRMFrreYMxIWSUs5jVS1BQiZew7JjcxRUNeC + rKs54JJjvxw9eK \ nv / 10z / WhonMrZsv3 + NEPL / n7v3mN62eYJiDkDlVKRjPiBkNNgbIJ0ctjMq83 + Kljc3fJMO5Zr5fk \ neYqzhvvNFV2 / PVqykWRFTlUXzGcF3hoSlZKoDK0qiqImUYKqqMlUxqsXN3T3I6lMqArFrBasUss / \ neLbivZOcD89nVHbge9 / 9T36zBP + / / pM / + 4FUKUlSEHWK1yl7O9E7x + gtQkn06JFSUZYzVicngCT4 \ nSDCB6I40oKAzZF0T84y8qqnKGd4F9s2Bar0kndfEQlHmOXU1Q0p9hHvrhKgEQUSSLCVag7MTOIuM \ n4H0kRkmZ1wQv2e4bLJHl8pTgA + fn5 + hEc3Nzg5kM7WHH6XJOdr6mHy3GH9Mzi2qOUgWpyhBRst / u \ nmBcpzX7P / d0dzjmSJEeplBCPF8USQXQW4SMyRnCeaB3Re7yzaAEQmLwliopATtP3qEShtcZOgZvr \ nHW6K2Haga7csVyknZyU + OkarePFqYneo + PTTO4YpYX / f8eD8KakuafYth31DCB4pJMFC9MexmdIJ \ nk / GIqFFoohuJfkJGjxKC6D1EmMxx2ZYoffzDe6irGqWga + 4QbiQVKUNjCS7FeXV0UuHRDMTQ491I \ nmeUEK7AGsnRFnl1QqpqubRhtTz9EknKNxYDouFitYapYnJxydXvFOPYoLamWC9pphCQlq + eILCcZ \ nJ7y1ODuR6ABhJFERCHTDyOggnxqKPCEvEmIURBKkyjEe9l2D0AK7U0yTZ3myJss1u8MGKQSZzjk7 \ nfUJRn9IcXrIfJ9AF7eg5PX9EEBoHtNYyCcEiK7FACAE / enznkV4wDgPej6SZpAQC / p4AACAASURB \ nVFi / xauv36BjQioSUiEY9lvGw4apvefq5ZfYbc + + 7SlPT6jKGQyOGARTqhFFztQMDPt7zDSSaknX \ ndWiVUFYznj9 / iXURY457LykExo44Z8jLDB8Do7G4GNlstxgTiFIxWk83eYyHyQUm4wkBhNQoJRBK \ nIpVECkGiJPEbF5GIgW4YsB6k1DjjCF4QnObmZs / YC4xJ2W4t / XhEnqIk3WA4HHr8sdZC4JjGAR0X \ nFDphNs + oljlkHqEc47DHGsPNduKHN2fspwt0 + SGbbcXf / e1Lrl552q3EdhotFKrc4yUkSUlGje8E \ nmaxJkwIfAn4aSMLENG6pSk1RpJRFzf1mi3OGiMf4QJLU6ESSq0gmArVOSVUO8UioczZQlwm5ymg2 \ nPdurFuE0RaJ4eFFR1473Hmd8 + 0nJ + SInFYEqKfjg4 / / wN0vw / 9XPn / 8gWkGzbfE20I2GpCyp53NC \ njDT7LWHwRKVQecLk / bEqV8cLOucD + 90eXWTkdUFelySpYupacq0Yxo7tYcfyfElvDXmRM58vmdU1 \ nUiegBFF8Q / fJNIvlnFk9QwtFu29RUeFMICtqdFowWE / UKcvFCq1TjDVkacrt3S2vLy / BWr71 / nvE \ n5RqkJi9nFOUMOMbUpiqjSHJkjLR3tzS7wxFo4SJKpzgfEUqT6AQhItJ6cA4Zj6IfnCWV6vgohUiI \ nHp2nCFkxOcXkYbKWYRiwNuBspN32pDFhtpjx6Nk56wcLbm7vUGpB5IJXLx2ffrFhdJLDruPqzR27 \ nzR47Wrz1aKVRUhMdyChIco3OcoqyxtlIcJ7ja + BQ0ZMqgU4SirKgLEtEFAQfSWVKluaM1hKxnC5L \ nVmVBc7vHtB5vNc5LlE5QIaKjRwZH9Ia6PF5cx5gQYoq1OUU + srnt2N1phJZYdcNv / e7HXL02XH6 + \ nBz / y6K0nFGXJ2Pe4cWJoO7q2I0tLFienqLygtJEQPN71pNpjzQGBR6mEyQlGA9mwpSoKkiTDWIdI \ nUkYbmS1XNF3POBlimyJVQpILHD1RTDg / Mk7HmfXy9ILlXLDZH7BWMp + fMplINV + RzuccrMUqhXQw \ nOkeYLJXKWZcr8piy223ZN1uKOmU / ZUydQ0VNmeaYoWNq94z7W0y7JU4DeadpUslUZpwXc + ybLT7V \ ndOuSbhxRm4EgRqSIWDPhjGUcJtp2YDKOyXr6vmeyliTRDEOPkCCUIK8Kgjg6iEZjEDIlSs1hMPTT \ nkeQ2Gs9kPZNzWB8IdiTGgBACYiQGRyolVVniA1gbyLIErRWJPgpu8GBNxMeUYRTfMAAsozV0w8Qw \ nOQIKpTQxeLx3SKGYFyvOzhYsVhmrs5J9syGKyGr5CO9nbLuSm / Eph0PO9WvH1auJ7iAYuwhBoRWk \ npWT51ox6cUpVXWDGDG8LknSO1MXxqtM5quAIbkQrwcnJOcvZGS9eviEEwcn5BWU1Z + gNqRTUGlZZ \ nehyNHSaMzTChRGnNapZi + om7V / f4PpLLjPP1HCkaLh6lvPPegsVZjkkFm8HQxJTf / d4 / / c0S / P / x \ n / / zxD0qRInvP9Ys3R1 + 0krz97C1UcOzv7uimifnpCithCIZsVlAuapIi58GjC7aHLdJ1KBWo64Qy \ nlSRuotRQlynzVUFaaiYBSmmUTghBUOQFfT9Q1SV9f + D0ZIUqS6RSLOdLlFD0h5bojwvIvK7pJsvd \ nZsdhfyAvSsqqJIrIerWi3R8IxlBkOXa2Issr8mqO0jn7fYuMijh5EqDf7dlf3TBNBmc9PoCPEmRC \ nVuRIofDGYrqO5XyOtxbvHVmSkGYapSTBHyMaVJIQomaygigU02TxMdK1HYlKwUmm / UTQis4P3O / 3 \ nmMkzTQntIWOwM1682nLoLQLF2E + IIHDGIkIgTRKyLEeh8OY4J61mNY + ePGO3a8ELiMcDl0RFnLN0 \ nw0CIkSzJ8T4ydAPOWKqiQKQKoTyFcmg78vbFU7Caw94glGYwBhkTolffdAWBRMFyUbJaL0nSAi80 \ nzuxQsWLYa3a7G8qV4eLJU5xZcXPVc7 + 7ZH / b8OD8IY8uHnL51XNiPzLtD6zrBWWao7SmkII8S2i7 \ nPUpHkkQyWcOhGQgxARJq23HYt / SDYXVyjpAKoQTD2FOUc6bBksSawbSUM0VeRqIYCdESCeRlSVKk \ nJMHw7J0PuL7Z0vYGHwW6qJmfnTP4iNcJbvBM04j2njQI5llNlhRY7zh0e3SmSavHJFLjjMUOIyI4 \ nFBZhB6b2gJ96DiIhHR1pazBSoB + uiMC5yNnd3tPlkrkKiBDY73c449jt9ux2B6TUTMYghEAgGfuB \ nECzOO9I85eGjx2itudvcg1SoJKfpRvrJYqPEOvABnD9mZAkpiHZEKXUcQzqHIiKFxBiHsR75DevW \ nB4tzA4kWjFPPEeEY0FlORGKjZ5gcxkHwAp2mhBhw3qFUTpbXPDhfsjgtSCqBSgKJFgSXkOoHbPcV \ nn3050d845KSIfcB1Fjt5VKJQqaNaK1YPK8YkxfqcrlHc7wIulFiRMRiP9ZFoPaXxaKVIdMJh3 / Hy \ n8g58ipIJaZqx2 + 7JdIKwI7NEscwydnc7bu8OTD7BiYLHjx8xLwT7zY67VzekaGZZRqoMv / d7H / Le \ nB2fEdOJ + aOlDwo8 / fcOrreOf / dF / 9Jsl + P / V / / DHP8i9RPcOc2iRwZMmGje0XKyX3L25ZOdGsllG \ n1BESweJkTlkXKA2LxYzrmzck3QYlHFWZsqxyxDRRZynL5Yx6vWB5tiKrFhRZwTRaml2LUhozTczr \ nivVyjh0Hgs6xAXo7ESL4yWIGg05SopLc7TZEG3DGsDxdI7TCeE9ZlgQb + Pr51 + y3e1qZc37 + kBAV \ nL75 + ze3NltVsSRoFu6sbXj1 / ju + Ho3VUJgQUPgrSLEPpBO89MQRUCKxWS5yzGDN9kwh3rOyjEEQh \ nMJPD + UhUkkiknlXUZc1 + u2e / PTD1hqGztM7jZUKSlmhV0rVgYsWuj + wnx + RBfNNqu2ki1RIRApII \ nwYMDEQQ2WPppYN90hCAJ7vi5FJEoIkGCCxFjPdZZYox479GJoq5KkllKXkjC2DBuNrz45CuqZIb3 \ nms46RCZxJISgiP4IkNHCkaWQFQrrj375RMzBe + y0oWsb9gfF07e / gyoTdC5JkhM2r7fEIHj3vfcp \ n85wvf / FzZiqBfmR7cw3OUs1rrDPoIiGblQSlqeYrsnyGDgl + dIRuj3WSGDOq2YIkUygdOTQtBImW \ nBT5q + qnB2B6dHolowRmInvV6jtABPUoePHwLE6EdDft + RJYFvQs4JPPZgnbbYYcO4S3RWvASpXNk \ nlhGlYDQTt1uLiBCcRylBogVmaLBjR6pgNZ + z9x7RDMjJMChHqDTSOvLR0LUHGixy2NO2DVpptEro \ n2p4kySjrGn + 8O0RG / U1lDj56rLU0bcOhaRFIog9Mk2McDUIdl7neR5CKNElQWpJoyWpeIUUE70iV \ nRAuJROKjwEVJVCnVqqAfe5wZiW48ji61PO630hSdKBwR7wTBa6w / 5qcEPMdfakaMOfkssp96tu2e \ nelZxd3XL / VXL9WvHyzeCps1ZjgZlRtzYENxIDA6dS2JqiOlA4w5s + 4SxjUy9wJPhhMZKMNaSIEg8 \ nFC6ilCDGgPcRSUJ0AiEiY9uQqMi6Lni4WpBH2F5t2G1bjFMk1YrZ6hStwU4Hdrc3PD47YWr2rKqM \ n3 / 7uuzx9tsL63ZGU52quL1tu34y8etHwX / zLf / Gb5cNfL9fs73YsnCATxy8RxpbDdqIqFLge8f9S \ n9yY91mVZmtaz29Ofe603 + zrvPdwjM4sqKaFSYoIQEhJihEoIBoVKxYxfET + FAWLEFAYgqCokKFHK \ nKjIzsomMyHQPb77GutuefncMrv8CcpCKuclM99o + 66y91vs + LyNu3nN1c4tQChEH6nyFFgoZepoc \ ngoiMU8fuMbB0PSII + mNP3GnaF7e8ev2aPEm8g / vxkWEY6Q8DKSxkCm5vzvBjx + gNyRqCPpmGKh / o \ n + oHjbgtuZpl7cpnjYqDvBi5vLng + bhBSUV + 9pGyvmbueuB + YuoXt / Z77hydCSOyftoRDz / HDA2kY \ nIEkyZU4YWQRJSrxPuGOPlGCNIUo4HA9M80SWW4QQLMuEDwGdGzKRMx4mFjyJjmXpOR4dRXbNPEJ3 \ n8GRKM0tFmBX + fWDoD9ivX6IYGf0DZnVJLAT + EPEs5LkmLQk3nBJ1lLBoaQnupwNtDElF4OTkFEkA \ nipD86SWkJUJaZBKElIjBMTtHkp5cXyMtCCMZDp6syBBNDTFirMKQoDQ4CTJKGnuOO0r643uqShHH \ nPciEUTVjb / DzwDQ / kJzE6o / 59V8NfPWPL7lbV / z2VwP1heTbhw / Ev / mG / + Q / / CP + 5N / 9G + TugD88 \ ng5KMacJdVESVqFcXOCk4bDdEFKU16GVCekeiwtiaGDWP9x3FCHevz3l5s6bvNMwOf2nwOvD8 / J5h \ nl6iznKrI2O3e4a8n1k3O + uyOp23Pp19 + zd3nX / Nv / vQv + PD8gRfNmnWzhq7HeAHSgpQ4LdlOM2My \ nGFvQnl / zuLlnno / 0QF6VuMXThQXcyfDUNhU3L + 5YfvlrvlcTT3hWu5ms73lg4beFRPrI6ihZ9Ih3 \ nDsVpdKmUIc8KRAQtQFmD7xPRBYJwqEyhtWCaZoLz5DojBli8J6LJbYUQCiEiWimUini34L1jmiMi \ nnDTzJqUTWE1ASBCEQkrDEBRLzNE6ME97dIIYHEqY07NqLf3iSEkBGoFm9hPSgBAaHzO8s7zfLmS + \ nwOYZ + ocO + kg4nha7Ka0psjXWbxmmLT72IBR5eQZC4L0gBYELAi0K6rJgDgsEx + pyTbdMTC5iQyJX \ nCm0taJjd / nSDCZF1dYYXM + uLmsvzFZW1HJ + e2G46jkfHuGiyqsFYi4gLu + c9de75 + OPXuP0T6ybx \ nj / + Dn3F11aLUQlqAUDIfFN / + 5a + Zl4Q / / N3gaX8vHf6 / e5h + 8cM335DGEREj6ARasL5uGcYjb999 \ njwRwM0WmsBLiPNHmlixFLJEmM / TbPWhD0oYQJcsSWYJkERZX1FC3GH8ygPSHkbGbiT6ipSS6GUkk \ n0wqv1pi2JuSKGU + uDPPhSJgnpmXGGEUaJnz0JCWpL86QWYYQCpkUYzex33dkTcM8e563B1IU9Iee \ nMEyEfsD3Aywn2VheVSwhna6n8qQPd25BKYlRihQ9 / dCzLNOJA5NpXAgICTY7LYCX4wzaIZRDmNOC \ n20hLcgm / BBAwyYSyK9xi6HczwoPUgudxjz4refv8yDA4FInoZvw0oERCEVFACp4UJAiDZ8FFh4 + J \ nFCUpKQQJmSKj9KQ84 + blC66urgju1KEZo1Aarq7OUIUmhBHlJqx3lCrHzTC6xKIEojbINjDGHmJC \ nI1DR0R83eO / J8xV5tkJnibay + F5w3J1uKI / HAwOai5s37IaO5 / d7TNPyw / 6Ri1eXrBvL9sfvYTyi \ nkmc8bvFNQX1xTshyQlZxdIJhDKTJk / tE7SNDEGjToHQFQqBsJC8TbV2RqYpuu3A0Bav1BVoVECx + \ nAhUEudancdSqwu0MS4DOzSxKkK1bFhLT7Jm7GZMk2lmMTAzjninMLBGWePpPVHX7E0JEEKLDZAaX \ nHN3QEZNDCeiOB969e4eYeo5 + YFpGxDzijh3H8ciu3 + O6A7IfGTnRMr3zpJAo8gptDPOynFRrWiEW \ nyfXlJVc3V9RNSSJRFDkySaZ + JLnTGcuKEqUti0ssiz + leCqBUmC0ROKZ + 5HkZmRMJ / FBPHX3S5J4 \ nJMdZI5Ii14Zc6Z9c8JHMFAgUy + zwKRC9QorT34vypJKKwhJTBbIhKcumTyxBo5HQHTgvCt68 / pS8 \ nvWSKgn4z0LkD0Th0loEsmWbJPEWUtsioyXTBmbaE445p2FKvND70pLGj8p4sxlOgu1kI8Ujd5Kzb \ nnLvbc9at4fa6Andk2e3YPDyx35w6 + 6xqUXkBWp5uhEby4u6auHToeOCLT2 + 5XJdkJhFxbHZPPB8D \ nP24837y7ZwyBoAT / 7L / 8HevwhVWnDx090Tvubm4QleE4jbTrmhdvXrL58Mw4TfzwN7 / m4vySL7 / 6 \ nisZq + t0ejEUsjqQsRp0Wfs5x6kKFZREK7yT5mEjjhu3myNB5YpRoeVKXoCLLNFG1FUblqLzkqR / w \ nUlDmlnq9wgLheEAaxRwmBIl5Hnh4fObi5oJkM4q85vWnn7N73rN92rI59LRXt3iRkELTHY6slMEq \ nSRQCAbhpRggNRLwPhBjJC4NWCucmjJRorUEmfHBMi8fH0 + JrnGbmYUH6RFSBOfYkrxHCcNzvUMki \ nhWEJHv / TAsyKkjLLmKeIoKS9MOzGPV4HXr15Ra0tm7fvOLiJODkEApkSPgZiVGiTI61FKgjidCNR \ nCVJKRJFASLpl4TiOtGWNLXNyrbm + viQKR9OULEbSHwZWuSH2gu1hC6JFKME8TeQqYz8 / sURPnZUU \ ntmJxOTEa / OTJpCUtgupqYNwJpkODYWJW90yL4odvF6b4gTdfGK4 / es3ueCCKI7 / 68Xs + WdV89vMv \ nefzzv2Rz / 4iSgndvf2B1d8fRJ9S6xKuMpALdboNZFphH5iBPhjqTyBuBDYnddsPt9TWGjKf796x / \ n / kesqhaVCt4PP7J7umeyM9occfMOLR2X5nPqpmCUkVEEyrLhZ / WaP / 5 / / pIf37 / ny48lH72 + xdga \ nF7YsTuImmI6R6Dx2HBn6 + cTzkQa3TCQjsdbg54XtcQ / TRK4URzVwFgXNmNjbyCb31Evk5uCZhGe7 \ nilzlDd4FlDaI9NPvDJFlWVCZZRxHCiq6viP0HmykG46UZYmSJyBgmBaMtVRFzujAuQWtDZk1aA1C \ nBJSSNHlGdXNFIST9dstudzw1acrihTydp5BhtUIIxWpVoqoCkSIXlzfMHh6fNng / EKQkokhSnAQF \ nEiISoQxC5QQUkcC8OLTMkGxIMeBdxzQG5hlE3ZLGPUl6vDwJElIwKAw2KVKcYJzoDz3j9gFrYNx / \ nIMSISYHalORKMwpHVhiysuTuxQXT6NBi4vb6nPvnd + yfnhGjYe4XUgRjS0xeM / oBERZMLvnko1eM \ n45E6P5lD60phTaRtK354 / z0 / / PCe58XyzZNDVTnRz5D + bvC0v5cO / y9 / / de / GJ / eMe + 2iHni7uqG \ n9fqKoDMel8QunQqz6yayyXG1amluzkhtzkN3YDhOlKpkt3jEAlkqkalkURWjLhicwu0DYhfoi4F + \ nXpiHCZMSlVVkWlKWGd3Uo / KcrlydohEPM2lIEBRRKfq558WLC / zc4fpntAlkBbQry6efv2AcNiBG \ nDuOG7z78LdLndMEhVgV5U9Pvd1RRszYt09ETo2byE1FCiJ5EwMjAqsnQ0uPmDkEgpYgRkiorCUkx \ nonAyIzMtRSiQXhKyk7IgTzl2lphZwOxx83wawUSBjRopM0ymQI1IPaMy8FHQj5rQW9Qs6Q9bzq9K \ nzi5LtvsHpnEgToE8FZR5iS4CtlywhUDEkjA0sFhs6tDye4SfKEKGmDrSNLH0iuRXVPUVYzxSnY3g \ nJ5ySeOW5iZHWQl85bm4vuLUrng4zcdFUoYb5pOUeoiOVGfXdK2ads1sCU9kiioqXL8 / JZGLsPdO8 \ nMLsNgpHXtx + xuvD44zvs0zOXiyITGbdffEEocp7fvWe1RNQicJseOQTWWYNFIWLEhYUpjYwqIKTB \ n60goBLNJyLrmOHmK0vD5Z2fcXI1kc4YVgWJ9Tm9ylqqmI6BMQPkjKxY + + flrerdldkdiClhywlEj \ nhorxXnB8H9h2D5yvC1oraAQsuw4WQZSGRQjK6ysOm0f8MjN1PaEb0fNCFkEFh4gL1irMJMhWF7Sv \ nP8OJgrQYYoQ5zZB6WrFQ5wW2LXBtxqATShlKlWNlhihr5izjeHlGft6iRCD3I613pO0Gt9mjfMAI \ nib64xitNua5ZxEKQA9rMaDUhGfjikxd88ekjX39a8wdf3JCFni8 / uuPl3TmZSZSloCoievHIcCC3 \ nC0p7Lq9XtG1FnVvazNBaQy9KxmVAZctpQV4UFFlDpkpETCQ / kKIjW37krt1wfeWYbcK3t8jijmkz \ nU7qFm5c912cVyxiYhsjsFrALMp + gcCjtsIfjaRwVBMY2FLIhDxmlyjHGoEtNXmtCiswBlqB4 / eZT \ nzs4uOB5GxkNk7BYiCU + GNzXBlohck1TPza3go9eKV2vBJ5WiWB64Lj2365aiPOfdk + ev3s48LA33 \ n + 5wYWg6HAakTLz4657 / + j / / T360O / 0 / + 9JfECAiByXNsnoGAeZ5xbkIARkHblmRVzmdffoqzBiUU \ nmS3YPWwoUwlZRgwS5xNzDMhMUlcVekkcnw4cNhus7ymKEoVFcDIEKZEQPqImz / aHd8wvMrKiJIYF \ nYwXBe0ybM20FRwXVixuUljzvnnBhRIsF7Qe67SMxq / jw7h6bNWTNGWdnLaLICUvERJARur6jm8eT \ nDFQpEuCCQ2hNUZZ8 / MlHPDw / sdsn5nn + SWUTSSoijSKFQEyB2YFIEpQkBgVEkgigIz52JAQeiBKS \ nBJU0Ui4IoTHKY6Vn3u9QLidrzsnqguG4oz88ooMil5HWalTmiUojlIDcIDJB0j15ISiriFELfReZ \ nvD + xx2MkxQNLUrzb9lTFDV0n0M + aonCMG0GWtei8QKscLRQ2t6xEPCkbtOHmumbZfCC5RAiCrp9O \ n30UBNjOsr87ZHhzzMFLliuA8Nxc3iGQ4fPNrXFjQwfKn / / rP + ORnazJTcowJoQKH4xNCdHz5 + Se8 \ nlopf / cv / m93TM7IY6B4 + cPniBWmSFEYhlKT3HiUEhW3BaIKUBAnzoolO83g / 8TY / Upkr1leRTX8k \ ntxlffHHH1eGaP / uTjmwJiMnTbRUfvn2kXq + Y5ok8y0lekymLTD1CQhKJzcOWv3Ajf / Tvf8XiPH6c \ nUbHAuZHFz8Q4k3D4GCAIZh + ZpOT16zs + u / 2U7777Wx4e3lNmOefnF9RXN7iiRDUNYTww7TXbDwND \ nv9Atz4h + QpyvWZ1dcmZqGplRlRUdnmN0bFFURiJSRl1fUgjB0I90k0fYgiANUs7YzODSxHklIFpy \ nI4nLEREd10Xi7vprlnHh6TBT39xgbU4WIbutePf4gEuRl3c3HLtnQhzwriMvFU1VYaRmOE7MKlC2 \ nJXN0uOgQMpJwp5xrKVApoa0hTgthmjk + zfx2nPG6oFpHenGkexpoy5xJQV422FUgLXtklCQZyIqM \ nECeOfc + FsCcfSV4Sk2Bxjhg8hbUoJVi8w1rD + vKKqsx49fKWssjYb7es25bbyyv + + N / uWaJClzmt \ nKeinGSEWPn55w2efXqLFgB97yDVoy9nVJXnWMC2Wd / fvmZaZQ7fHDRONbdCFwMkOoX8HaZn / 07 / 4 \ n17 / ITM5hsyf5SFU35HWDE4kxOmY / 4 / cbMiW4OGv4 + T / 4OXlbM7lIDIowScbecUiRhCQmgU8RJyVC \ nazJrURHi4mEYKU1FlpUoYwnxpDwwAkopGbc7nsYjcenJMoWUgaywoCIykzwd9xRna87Pz9j3O6Zp \ nT5tLXlytGY8dKULXO2JS2HXD6uocKSXHpw2ZF6TJMU4TUUtMXVIYg0 / xZGySkkhEG800 / RT + ECKZ \ nMuADSmiElDgiUUAMp8g6Hz2RhBQBZCCmCXQgSk + SC0I5pPJIGZAmUuZwVis + e7nm5eXqZJKKgry0 \ njPMTuVxQc4eae9ZlTkoeYRReK1JWULQNZ + dQFT1h3tBWlhA9s4h4a7BaoPFgIT9bocuSbp6Y + yNi \ nHvCHHWcXFuqeLDuyTnvc9I7yRiE4sHQfaF9mYEvGPiKxGJPRjQNzmJCZ4PrmimN / RAuNDSBHT6ks \ n1hZkRcG + G + j2B + bjQGTm848 / pts9U1WKedmx3zwy7nZc12f8 / ue / x9OHH9lsnlBSMk0TfXfAAJkU \ nRDcjQqQqrvBeYIqK9cXVTzjeBEsizYlcV1Q3CYfDIdFZDRg277fEwWO9IU6aaf / MZ29 + hhYnI1mm \ na9wEwWsyW3PsBo6HnuN + y + P7H2nLkte3r7l / + 3gCCSaHFB5jYHYzPji8D0iliEIyzAvbY4cpalRh \ nwWimEJGZxRYZRXXSfN8 / PKJtjp8jx8lTthfc3r6mrVcnSmhhmMPAuBxIaSITnqZQaA2HcYCiIr + 6 \ nxVzesHrxmss6EuJC9DOvbi + prUD5nuXwBPOB7vkDD7uEj5okDV5LVJkxpYUp9HTDDiEdw2Hi6qLG \ nmkDTWPJC41M8GdNmx + N + xyI12kpsblBGAhGbZ2S5PQEFRcTMB0QYYXEsi2TfSTb7xGEfEFFhrGVQ \ nE93gWFxgnh15boluRKQFKz0vLs5piwqhJXXb0K5WfP31V6zXK9wynSSjAmzVcHt3y / X1FXmmGboj \ n8zhg9Wk0e / + 4oYuaKEEZgdILN9cNr16cY0RgOHSM48j55RllXVOVaw7HxI / vjvzwYc9Tt + cw7zCF \ nxYeZ + fjI68Zw4yb + 8 / / sn / xuyTL / h / / l / / xFjBGVFFVRMowTQSSiFqBAaIHsj7RtTdNWVOua67tb \ npjHQHWamPtCPgc4kjDFIBLP3JAUuRJRUZChcP5JLibY5RbuCImPwC1ILMiVY1xX9YYdbBmwKVJlm \ nXZcYLQjJ40LgOPa4EDm / vEDISGnhorW8vLrk + uKc9 + 8eGEaHkAaXJ0xmqPKcadchpoXkAllRcHZ3 \ nTb5uEDEwjiOQiMmdZnIChJT4GDHWoDktnazWSCWJSiDtSSkhRcIogbKJvNAYCz46AoGU + AlNbFFS \ nnX5OJTITOCsDV42gsR4pTrsTYT0 / vvsNWZr5 + HLN3armuHlESsjXFSE / qRZKa7g9j9w0jtYMVDqe \ nDC9IhCmolKXOLPtxoro4R1UZVa0plOO6lohxx + X5BaKssMZQdDNpCcTC0pYrGl0QrcVT4CZQKieJ \ n08s5qYgLM82qpG4qlq6HaaKSijgvBO / BKFZnK467LXL2PG83EAPz3KOU47Mv3jD3R6RL + N6T24Y3 \ ntxc8PN6zOIcgEpxnmXtS8OADMkmkLPHJIzNLe3mOygxWK1QElohwgtWdjYJRVgAAIABJREFU5tRX \ nJIxtyWyNipI2rwmDYxocNZE4Q2UbZDT4JTFPCaVLqnZ98iH0jrDMqOQY9kfOmjP2z3vGfsBYweV5 \ nQ7HKCM6TUmIYZ5JUeARRKkxZUtQtRZWQGkY3YDNFnikkjixTECOrtmUaF6Qt8Ui6fqKuG6QRuNAj \ nzUQKAy / OFTfrDB3GU / 5uZijPzjDrNbEoCJmBZc / sHOuzNdeXFzw / 3p9cqDLSFBY3D4Tsin5a2I8j \ nToKXkskHpskhomH7eCQTiiLTVFWGVifcidAZc4R + iXhpEFYgNCgF2U / PAiTKKme1XlFWGS / XmsqA \ nG0e8VyAbUOUJeW4kSgYO4x43LczjTGYMpdWMuw0FkUoKmsygfop + zIqCZrVicTNFWVBXJSE6nPfU \ nZ5ecX5yRWYlREP3C2Hfkec7z85bdsHCImrItOTvPuboouL2qCfPA7nlDbivyqsJUGh8F05j47Xdb \ ntvvIphsZlgGVB1QSmKDxY09cZt6 / + 5F / / k / / 29 + tgv / f / 8 / / 6heH3YHcZrjFobUmENG5xWSK84sz \ nvrp7xd3NFeubNdWqpChK1utLHu / 3bHYTLil8qcmtRQuY5gFPIC9zZITaZORS4hInCFudo9qCRQSS \ nAkSgLHO8CIjDHt / 3hHGgsoaL1Zpuf2C / 2xF9Ypk9WVFQVznndUGcTnrpi / Nzvvv + LS5EiqJkN2xx \ nzrGua27PLvnDP / iHrKqWm5cvMasakRtyFFmRsds9c3NzSd8dyYscqTU + RhAamQRWaYyUSCPJ65y8 \ nyk6ORCKkCcEIwv + kz0 + ndC3bsEwKQ0thS5QKKJEoTaAyAys70G2 + 4 / qmRpqILQ2rdUX3 + J61VVzU \ nGWEZOL8 + ZwgjKUsUJsMujk + uDL / / UcNtI6lUYuo7hDCkqGhsQ1gEg484Epc3LdaMrKoJPT + S + ifa \ n9hrbXpF84FaVWKHw1pKpnNvqkmy95jAvPD / vIBn8IklC4vyMzRTTNPLzr75iOGwxROI8kYJHZoog \ nA9v9M / 1 + g1wm5E8ywygC / TwAkTd3r3FjpO8WdN7QrHKkzfnuhx8wNmOeBqzULNNMDGC0RWeWJALF \ nusI2GbY0VHVBpgTSeYQPbPodMlUU + RkpGZKHMsvRIiJE5HjYEg8DQ7egpOHy7Iqum05yQqHwSdJe \ nXLKqz7l / eEf0E34aIUiCi6QYmcYjw7Qn4imyHKk0PnK68UrN6vKK9cU1bz79jEZ3WCsY + x1VDmeN \ nZV0ZrAhcr1uq3NKcXyKkYpwX8rKiOWsZ / YFmJfns00s + ebXm8 + uMxkSk77hc19ze3dCsVxRVSVSJ \ nRMBmOSavmJbIhw9PbLd7jLEoa5l84OzqjuL8gkN / wBO5f3hit + t4vO / 5 / ttnnh9nquIWLT0P9 / cs \ n08ztzS3ORcq6ZX + c2B0HsqIi2YhWieAGpIxkRhOjR2rBvAxUbcF1I2lqy9AfmVxgdXGNS4k8l + TW \ nYdUMKSGWQGktcnHsHx6x0XOWZYRDz / b + iZtPPqZuarKypGoasrJECkFZFrSrhqKuKOr2pyK / py4N \ nMnlslnE4DDw8behdRK8uOD + rqUtJWwhkcnTHI9aWlO0F0lrQCSks + 8PE + 3cHuj7STRPbfsvt3RqV \ nFP3TAiERlkhVnPNP / 6v / 4ner4P8ff / 7dL4KLp3n0Twadxc8ImWjXK6RMsBvxeHSToawizwuO2w6i \ n5YcPW0af0JVBp0RcRvJc8 / Pf / 4q2rSEG / DCRppFQZHid8BqigsnP1E2JyTQq19iqIGy2 + GVBktBS \ nsmoajvsD28cNcYlkwpwi36aZwlqasmLVtNR1y8 + + / IIUPWO / Y + pHjISmbrg6vyTMHikFS0o4EpNb \ nKG1O29a0bcVnn35MlhuyPCMJRUASUkKpDMUJXBWjx6WA0AklIsnPpDCTGY + 1EiESznkEGoIi1w2a \ njOg9VRWpSkmZOT57VfP1Z5d89vEVdy / vMFVNlIKx69jff6DfPuGmns + / / ASbCTbHJ5pVxh98 + QVX \ nVYY7vuXNVc3rqzUmOdw805QVmZHMQ2BZBMZaZtczjY9YuaHWHYWa8MOBZm0prhLtmef3P2q5uZIc \ n0j3EDXJ + pucZWRRkumQcPH0fAItSihBON5KweII7HX6VFEJKktI4AULBdDwy7LbkpiLLi1M3mRLO \ ngYqWF7evWZJiFJC1K / Lzc65fvuLd / QdSTBR5ibU5PoALp / GJLTPaqzWmtsxhJvgJFT2lVtQ2x5o1 \ nyVsk2U + ZyRKlEsEv2Nyw67cwOIb5RHpMKVE3LUsUOCHxymKbmrOLW5RO7LePp / GKLZFouqEn4PBh \ nOp1RIcltARhCkmhbUDYNusixec5KD3z06gUvbs95cb1ChpFMBtrCcnd9gRYJva45O1uzXp9Tr1pM \ nbbC14PZFye254aKGzO2pMoVVkqauT6iKaSYKMFLQH3aI7AzQzFPg3bt7um5kcJFuXGhv7rh89RGm \ nClRNzvXFGg0IJxBOMQ2SoZNMk8CFAwLB1eUFVVWgZGIeRsZppCxLrNWQR / Jcs25KSqvwU49bTk5g \ n52akikiZCPGkCmvOGia / 4NPCemWprcNPW6yXtFWOSpF1W3F9eYlBwuwRLpLnJb2AQ3d60ZTt + sQF \ nEoIQAlII8rxAGYufe / zcs65z6rpks92y7ydUXlO259SrFesmxyZPW + YoKemHhcu7N + wGj8oL5nng \ n + XnLb7 / 9gRAl8xI5HjuKyvDxJy + Rs + D49oh3Dg9s54X / 7r / 5 / z / S + XtZ2t4 / bpBSMy3dqQtfplPk \ n4NjTuonc5Iy7kSKrsVnB5Cf2 + y3DzrPMGpNppmnETCfejImO66sLcpvY7J4gRbQKRBOJeiHGCEuC \ nSSCXmZQpinVNXmQn2t7tNaMSHA87KiJ + mSiMpslyxiUxTQsuBKRVhLImZhULmv24sDpT / N6XL / ny \ n40v + / P / 9jsdp5Kwu6aeeuVsYtiOLh / X1zclboBU + eWIKPD8 / YLRkWU6StlJbhjmAOOW + 4haIET / N \ ngEAbgYyeQp4kkd4tpBjIMkgmsowjhghCURaQr5aTAgj46PUZVxenGMgxneLrfvmrvwU / s25agj4t \ nNkyhOGw3fP35C2xVEt0jzSrD6xrnIyavMfmRj16f0Vy + JqmWf / tXG / 7s1w9kEeScyI3H + j06JDJj \ nEauWZYr4HmYR2ceJj1 / esq4Dj7sPyEUzzw6nt5yvLpiOluGYGGeFcxqBxQjN228 + 8PL1a3wUBHeK \ noZTGshDxSSOkRaBZ9gM7FPqyRTc3TC7w4QmKLPHqq9 / ju / vv + I2PnNctZV5QfPcdy / v3BCA3GXOK \ nzC4y9SPl6hwpDUJrnF + Yponh0LN4gUexOrvC + YXkFTpKgtKookDnGrTm / NVHOC94erjnuEx8 + / 33 \ nLEB5fok0GZ7ANPWEZeL6zR3j9DHv / uZv6RdHmBJCZ6dCJiNxdIyxI3mNUSVtaYnmhHSOfYcjguop \ nyppVW3JzWbPPJGGZ6A8T4zQQRcLWidV5y7XP8NrSMdKnhahHkAvTcEQugeBn + sljU4bEkRvNdrPh \ nh / fPXNzcMC0OfGT3vGG / OZBZezJUaU3IVzyMEa2eeX1zzdrmhO09sw6YYsX12SWHKXEYHUqV6ORw \ nfkHGBc1JiXO + XjH5yMNmg7cF0ntESqybgi / fvOL7t + 942u6Zwqnz / 35U2DDSZFBWOR9fXzAviVxI \ njF + wtzVWrUEbDtOEyguyrKRrG7rnI + N + QBnNIXhi8IyL5 / HxGe8jRZ5BONWbPM / QFlZ1QbSOmDw + \ neBYXESbH2OYEijOCUilkylj6k4u / PbvjsMDjuLAYQxYU3 / / 4HhEiKs2n71R4CpufUAxvH / FxBD + S \ ny4W1 + bvV3r + Xgt8PM6uqIgnB7ByQsNaQUmSZBowRiKAQSRERuBjZbbeMm4UPTwsp5chMoVNEpkBh \ nFWUm6Q5PuPlIiorMGubRUVY50UeiC + hpQnjPsj3grcZnmn6ZYVVxeVZT7g + nGXsKJ8KflJSFJU + C \ nGCLaWpbFcJQaaTVFMjw83VPbBSMif / Tl1 / x2v + HtODCKmSXA42FDmTWQwAqFNJq4OIzVhOAY + o5p \ nCSRdgCmRWhGEhKSRRFQEIRNBJUQKENyJoBkl4FEWmtpS1Tnd8YAbTjcTpMFmiapdY9KM1hNKZtx / \ n2PLL33zD41hRF3cwPWAsiEKT54IP2wf + we / / jCJTPD8 / 0sWBrBbc3NwxHjp + 2BzY7fe8enVD3cBv \ nv / 9rpPKszwNtfUn0GdP0nro5Y7d9z4s3X7I1gXEXGA8BbfKTPHPJuL38BLeXFF3gwirG / h3L + IBR \ nZ4h44qojJAKDEBE / LcxThpI5hIQTBuFzphSwRcnlleLw / kBwI3EKxJCj5DkhRka3sOkSxezIbi / 4 \ n9kPHlBTXmaV98xGPD0 / IGNEJrC2YwoKSOd5pttuRi9Wauj5DFp7Za / zmyLgEwvQjUQpy11AIT8pL \ nZgRJWLzUrK8 / xlrNhGPYPNPNPQ / PD1wVBbZsyPISZXI6ubAZ9tx98pqhO / D43QO5qsgyi5ABY6BY \ nNMEJus0RXSvKswvy9RnBapYU6PqOrYjMPz6xbjUhOYZuj5tGMlOw2R349tsfePOPbmlsRt202GrN \ nQZV0IZLrDVnuCf2Ox4NFKUu9ukKpGmUqjvsRESU3F1dUeYUJkcfNE / N2y6urK / IiZ46evC2Q1tIt \ nns8 + Peds3VAtC3 / wyR1zNzEHwagUD5Nnee6Yp0RZFgjl6Pp7bi8amkYiTcTFRGYU3yyKPDeEoWfq \ nDxxJ / N4Xn + Kl4q + / + Za3D88M6RKPgvmANA6WjlV7RqMsce + xQuKZmeKMrXOcSrw7bIhRY8 / PybL2 \ n5E / wO5pmjdYZ07QQYzrxuBAIIUhJoIk0ZY7MI8f9M0Pfk6RC5wVzMviwkMkFHwQFkuEYmIKnvb3i \ nfrdFr9Ykrdk9PTMOC7c3a57vnxjHiSJrKKxhOk503Q6Sx4qeNg3cid / BxKuyzHHRo7XELR6jBNrI \ nE1o0RqZppJAW5wPjMKJLRbVqWfabU0h5P2LLFZlWiDkQ / MJuu8XriFKaIDx13ZKh2cmEsif3oBEn \ nTXO / TIyHjognyoSuCqQWXLUlc38kjJ523SJtAdLQDzP7hwPeS47HCRMt55ctc1xotWaZD2SZRJG4 \ nOl / jXcW3D884H7B5Qdu2jGPH4k9AKRVPHB6DZ9U07LuR / eDwCbTSBBJSgjEalSCGBaGAEDl2Hcsw \ nsVqtT9m7pSCvFFp56hpuP7rhXT0yjFuWsceqgotmTVvXaKN52h6p25eMpmHsn1lVJaZQKF0yzlu0 \ nSbz56BYrEsuwJSY4jnvWzTnBGP7yb77h6iInq3KQgeB7bu9WOOupbUkmW4bDzOI + sHMLf / 6nf4W1 \ nd3z92Q2s9ly + yPn0MmeZv6Goay5vRlA9rz5 / Q7W74ze / 2SH27sQUIiee / LwYZVhfNgwjZFaTm4KQ \ nJD6IU5fv / KkTlxnBHUnO4ceZOINAE + aJ95sj7kPk + rNzZHvG07GjsgZVt7z + / DPe / 823uJjQVhNx \ ngOa4n9j5J8xqxfruHGszirVm6AMsMyINRB / p9jNeeAqlUVmDIiM6RTcuNEpw + eKWDZ7j4xPPm2dE \ n2ZCrnNSArBVaK5rrS + LY8Xv / 8B + xu9qwebfhsNuhTYbMDXWuEMpyHCZ0UVDXFeuLC8rLc3q38P27 \ nt8xHj / aaJHJ2xxGZJPebLcv8xFl7xeWL16hcUBaSyzxBGZlEpM1L1Lzn8elHxrc / MIYbrq5fcHHz \ nmt124u2HLdMYKaqW1uQorSiFpVZXfHxzQ0qSKCTHqUNXlsN0wOQNtzeeu9Uae9hzfbWiyXOeDh2 / \ n3e44bHpMv + fth5FpSFyUmjQtvHlRk1tQGagYibsjbopIoTiva2pjsVrw4f4HLm9u + flXX9IPv + TD \ nY8LqAmVgdD3NKsf7BZSmqWtyoThGRz8ODIujc4I5Wcb5NNPXxhJYSEFT1Q1CGRSKPMvARyBhjcYa \ nQ3A9s5ipshNorutHZjKCgsjpOS5sgtkTQqQoasI0s9kemFMkNwahNB8enpFSM44jfX9AaQ3Cs9ts \ niNGjJ49dJqSecXbkb3n4O9Xev5cZ / v / 4L / 73X1jpiK4jkx7hJ2SKOB9xDmJUzFpQnzdYLSmNIsVE \ nEAEhE4en99yUhlS / wiVJN824mDhr1mTSYIRCSoEuFPaswYtI0hKvE0OYCSpQNiVGQvKBszyi0g6j \ ntmRqoCrtiXehJMpAEiMf9hWDD4xhxuYCF0f8PLHf9wyjYA4V3UVH3q7QsSRsJGK0SHJsW0OjIYeV \ nc1gCVmqU0DgHNqsRwiKEISyeMk0YZqpKIuWEko798yPzPOJjImbgq4DOMgrVsPnxwOHDnq8 + + ZSv \ nv3jJeiV4ed5w / M07st7w8JuB2R0pbyfyyzdUF39Idt1T1X9GOX / Dw9s / RizveHWhuDkreP3qliRg \ nczgg5hK2Jf / r / / YvGeeBm + sWk2Z + + 5vfUpYvMeWn3F0HfvYaCmkRfovmO16sFf3jyLv3B + rrjKLa \ n8OXtC7Kl4bfvv + e7p19yc5Ozai748WnP / fvv2DjNJFfsDwmiPrkemUhiIWpJtDlJWRYCKZN4GTC5 \ nAt9j4oBVI1INzMMOt4yEuJBXlll6eh3wpUVmJUbU1HWFjBGrJYfdhs1 + RxCCiGScTrnKWicMgUrA \ nWZFTaMniJ9pVg5IQo0MvB4Q2BJ0x + 8Q0jvip4 / L8kjlIFpEx9wElT42Bnzvc4snMCmSNMAXjsnBN \ niakadsoySkOjK9y7Z + YPGxYXmJRmXzeYdcvZZcuL25Yy86AWyos1gzGwOqPVBVpLhHCINHF7d057 \ n2WLbktkI1LpiKy + 5eP9L / qPmLeftB56yHUspoB / wO0 + MZ9zxjvO2xAvFr75 / 4O1zz + 44k5zjIjd8 \ n8eIan49EsaAKSdFkTG7Hr / 7i / 2KlD / zh5y3 / 3uucLwo4EwuFmVFmYREj5FAUljAc8fsdD / KSbpwZ \ n / cJhnnjuRuz5Fbq9YpIVqTijkT0Wg0gZk59Y0pbVeSQ3kZUuuS7P8Pf / CredieEFY7pg0RGn96hc \ n4WmYU4Ozh1ML4SXZ / 0fdm / TMtqZnWtfbrX5F8 / Xf7vJ0mXnSmRgsLKMSKgkJMWCIUAmpkABVAYIR \ nfyF / Bf + CKRISgypUxuAqk2k7GztPt8 / uvj661a + 3YxC7 / kB5kMqQQjGIwZpEvM3z3M916RWHAwyd \ noNvuiP0jOnQkZ88x5QonNIEEERVzP2BiPMZ25xklI3Ky7O43NE0gJOdsDpDnFbkIVInEB8HkJqyY \ niFlgNpbHdndMZ2VLunHm7e1bSp2hB0doB7SUTHZCovGDwDuBSxSDCIyJQC5q / tl / + d / 8YTVt / 7f / \ n81 / 8XOJRzlPnOVM / 4l1ksp52mNjumyNhMVE4PyEEKCWZJst6dcpqdXLEryZLylQT7MjZuqYuM9JE \ nk5gjSlgZSbKojsYrZwnxWEISQpFmGRGOJ8OoOOy3BOdJTYKMKXYMECR5ZshTjTQlw3BgHDsiAfFv \ nB6qaA + M00I09zWFPtJKpOzYWYwx4LKhIkmjS1FCr4 / CGlMd3RBAQBCFRJiXNjj7Y0TqsdTjg0PXH \ nKFuIBKkQxqBlJJWSTEKdwboWfPpyhYoNy0rxycuXtO3As5cFn / 9Y8Oy6h6ljGU + 5rgTK / j9U5gPR \ nR9JUcXl1TgiCP / uz / 5inzUCSrLm / 70hSyepppSVJuWR9 + hI3C377q99QlZKzZ4azF4JaNTzLC67O \ nK5rxe97dvebNe8du / AHy9FOmU0GUFd2gGZVniAn9fMrDJmV18SOCfEXf / 5TtHGn6meYg6DtFDAmT \ ndQQpENqQ5AVpdmSSh3BkuQg8aaKxc0 + eGJ5dXRKBx90WHwVKGVKVIgKY41mfvutIcoMbBgweEwNx \ nGuh2e4zQRBeOeOy8QpkE6xyDndh0e6KWpJmhTFOU9zAIkAUmqYGMth0Z + pkoJEVdYF3PPAdCmOj6 \ n46i / NhlJvmAMEpKEyc342eITxSAdEKmkJnWRPNM442nmjkUXKGzP5Ury6gcFsmh4s / kd1z88wyUD \ nMp / on9eYa0NyNpEvB1ZnnuUqsj416MRTLwzpy4gZDCJe81Tk7KsRJWYOv7vB3w7Yw8SnX16RnVzw \ nq9fveBhG9vOIUzM2HmjGOxw7tr2hqlakOiPMlkwrLs7OAXjz / pbbpz2HuUNl / zbeaIlBcnNz4N1N \ ny92Tw4WauDqjXtREAWVd88UXP2RR1yQqkisoJJyeXyKkZ7YdQhqEX5CIEzQKJfc8f6VYVadEbdi1 \ nDfvhEaEtw9DQtz3tvmG2E2mR4l1kHCyHdkZnC4RKiHbCjw1hnkAmZMYQQkSIo2UOKTHJR3qpMhhT \ n4V2g2Xf0U + DQHblObdeSaXHcEFSA6HH22BO6u99SLU6pFmvaceDuwztMdFzVC8btE26e2bcHopSU \ n1QKBwvoZHwNSKZKkIPqUf / 5f / YE1bZ + frbh9 / x4VPcor8J5p8oxeMEdFEIpx7DjsIz4MjGPN6emK \ n1OQ0hx2L + pT20FKrI0zMhJqyypDquAggAtbO4CVh3OFjRCeSKquRWtMPE85FfPTMNqBcwFpFZgTR \ nHZnnOIcUAR09eZmAEWhV8dW3R4b4JDVCSJRO0ES0UGQuIcwSJQPO9pRFiosz3Tig0iWJyZGJRMeE \ neRzphpGm6ZE6x2Q1IR7FDiLJkOlMe9hgVEQkCTJ6 / DQekykBpBPEMJBnkZfXNZ + 9eEaReJaLkouz \ nFSSS7D / 9TwhdRZ48osVr5rZBTFt + UCcUbcZ3T5dkuobiwNgd6Podb2 / esDhZ0rnXzOotbSdorePs \ n + pzH3SNxPvCzP / khzy40ZxcZw3zPp6 / WqFFyu1FE8QLrv2XXvaWoE8ryJb5ckraeIk5cX6QYWXMY \ nJGe54UR8xeVV5MFn7J9yvr0N3DwMDI2mb2e0UUfZizqOsutoIXpCjCSm / Ni0ThEhpTnsURKWL684 \ nmwce7vb0mx3FDFW9QCqFP0xU5ytKldLT4 / qJZZbji5I2y / Hd + PGELBEmI4aACxPROpih7Q4cuox6 \ nvSatU / p9eczsC0NpNH0Y6e3E29eveakiV2drvm4ENgbGEIhGok1KcbLGkDIFeyxnKouWM4vlCgKk \ nU2Tx6pSqloy3E + 2hQ + 3O6NqJ20fB4llKurzk1TPDRVry + N3XvLx4xsPlG85KxVViWXjHWXq0bz3t \ nPQ93B5pJQnaKebnmt9sDzSGS6RP85i350BGGET + lvLkvEXvDzaY6nrITRYiewY4M7QEeLOVaMNxu \ nEXbm2ek5RqdMoaUb4RAydi3cjA / cNj0 / fXXBQgfmpufpqWOKNdMo8aRI3xxxz3kO2nDTWJphyyoN \ nLBM4qQsOvcdFSxQjMUimLmfeR7qsY / 2loOm + 4fTkx / xxtebkece3t3s + PDRMk2LXzmgmggioNqFK \ nU / IqZw6e2 + 2OSHLEQPtIP3Rod4MOntOrF5gixwvF5ANTiNgokELRDwI1ghMJUgfsYJmxdM0WHXLC \ nMmV1UhJjoO1m7u + 3zBFWZzlEsEODHRoqBMN2y9PdA9YOmCpneXKGlAlT2 + KiRCUlea6wtmO / PfyD \ n1t7fy4Kv3YS2EzIIhuGAJuKtRcgCKTVRaPquQTBj3UiaKLokYTaOw75l + 7SnbQbGaeD5i + dcna + Z \ n3YgXAmsn2q7FzhNVUSClJB7nUrFupKrKIwxMabphJMyefh7xdsa7HjcIrs + v0MpDdLjJYpYLFokg \ nSUpiuORhY5nmCDohiJ5gJNlqyVpVnKyXGBU4P1nRdR1Zqdm3EyrVR / G1m9Hi6NeEiNACHxwyOqwH \ npQXBWspUUZwsmMcDCI1SGpOkICVd0yDmyPos5 / lFwdWJYJX1fPLijJNlRaoNPm3JT0ZUf42dHpDR \ nYVY5c / + Ij99RJhV1ljGbiTSVxD1IXbHZdoh0xd3rDftO8f3rB5pOs3 / 3lils + PLzNflqT16tCV5T \ nFZ / TRs9uaPnr3 + 3QpqZeXXAxvCXx33BRaZJyxc / + 0RmbzVe48R0 / / vQfY / sF2swk6h6tJ / Rpwr94 \ nXfP9 + 4HdzuOHIxVUKfURpzsfBe5xQAjQQlIUEu8C89yjjSZIycO + wS41F19 + jjc3bN494ccemR37 \ nNDLPWK3X7B + emIaGRHoWq4p5DqRpRtMO2GmkykqSuj4OwKUJQXhGjpv3w + MtCTMLnaKWEelmwtSz \ nKE + RcsGbuyeGaeLrX / + Kk3VJOPv3kEajspTedfSzpZSRvCzJjcGkhqwy9CKQpZIQwNsRn0ayk5RT \ nWVFcGe4OK + 4eH2iVwXQJiyB4tnpJ0VhOH28wj69ZNzecLnN + + ukzXp4s0MIyIVguT5guEn77 / R3y \ n9oLkR + / w1088vl7iXq + oDwd0eM3LzxY025rNwaFLz4uXP + J2P6OcoO8HZifRaBwlT4cJEzyZD9jS \ nEoRl83Rg287sfGBxdsZqXdN2D / zd777mJ9dL1rkhUwPL5YqkTLh5alnHhnf3O4aYMJOxbXp0tGSh \ npxCWH1ydsTz9ASZL8eHYr8kKiNNEWaaM3YxmeXRLJJ7r64Rsecnp2XO228hud8D5hmKVc + g8XTNS \ npxlpVqK1pelHlA8I9dEr3bUcQoAoWJw5rE4JJiVI87GUH5gPA2ZuWSgBMrJc5YS2wRcCH3vGeWK7 \ nn9nvBp4eB6QqqOslMhp2Dw / 0wxbtRoT1PN3dowJkZY0sMmbn8WE89vJMitSayQ2M4wGhu3 / Q2vv7 \ nkZj / + f / 183mc0AL6pmUYZnxQRGUoF2tQhiJ1R66OgBcvXlKWBQ8PT4zTBEDbNdy8vWWzucdk5jih \ nmmp0opntRAiOqqpAOrwLxChoDi1aGfK8JElykjQlTVMIHYs6oe8eKAvNelUz9AcuLlZkZWS2exbr \ nFd561qcXXJxf4zz003AUkGiBTBLycLTzdF3Pw + YBqSXL1YqiKEmTjDRNmeaJqe8pspQ8y1gtlxza \ nDp0kKGOOTaHQU + hIXUhy48mMZ7VIeH61gjDQ7Z44rZacLTSLzPL7Fg8uAAAgAElEQVTqKudPfvaD \ nYxwtEXT7J969 + Ypnz2sit1Qn36CSPW / eeF6 / 2WPVEzETiLygix2 / / Ju / YrGoOD27pO0c3353T5RL \ nxjkjiJRu7tkMG4TqWS8Vyo3oYJjbHOEvKPMT + tny7uYDvXvDPLwhNjP + CYoYyNX3zIuWnUhx6oKz \ nl89Rqx65DHx9t + PdTtOIjF + 9N3x4ACUKiOaosJMOoQNVXZLmx76L0QIIFHnGNA6EECjLChcEu31L \ nW2tUWbBen2K7gak / SmS8jJTrmqQ88n9wARkiqTYkWrPfbbHjRIyBNE1womC5WLJa1uRlhikSDt0e \ nHxx4hwierOr4k / / gU3aP35IqS16VHEZH18 / HYMDQY9bPKcoEFwa6j1x1h6aslnjvWa9rijSS5gmn \ n6xWZSQh2xI4taRaploaq1kxnr2m4Y3G1IFkuuHpxRZk7ThcHfvqFo9 / / a4xLsA + P5PPIRZYSu55F \ nnuO95dXLKxIxsv1Vy5R + gzsZMOYL2rcZrtmRlY + kS4MVJcXikatXFSa3iMzSjY907R2CjtVCkaeR \ nziZoqVkWJTjP2zfvuHva0FpHslhCmvP5sxWfPLvgx89PeXVRscgiL16s6YYn6lPDYiW4LgzBTTw8 \ nPKGzGouimyMuKlRa8bAf2Nx3TLNmHCXKRKQ + oJM9WsHUpHz / rWXoW / Iqx8UZSBHUPD1a7u / 3BKHY \ nNx1lfkIiFXYcmCaHi4ppjngfCd4TQiCREms93TjQjSPNMDA4S15XBCmJUlAvcoRrwTf07YaH7T06 \ nk2gTCK5nsiN3jzseHhqUqqjrU5TSfHj / lpt3rzk / WfCjVy / 58LtvmJuGq9MzJjvR2Rm0Jk0KpnFE \ nxONhZ5wOuNCg1Mz / 9F / / t39YNfx / + Vf / + ufEiJKKtu3ouoEoFEFplEm5vL5GxYZpGinyjC9 / / GO8 \ nC0zjhBRHy4zRmsSUPO23bJs9Kk / xHOUNVVWh1RGSFoIl0cmREe8gRkGa5kgp8d5S5AVSjsTQI + TM \ nPA2kJmW7OzDMPTcP7 / lw946uD + RZ + VHOrFiv1yRFiheRw9DTdD2PNxuavufm7p590 + GDYrtreNrs \ nsM7hnDsK1YuM1GjGYSBNUuzkUFKT5wUnqwXSHqhyTZ0JEuWpC0mRSbwfcbYnTCOZ0qg4kqqJbveB \ nb776WzIdSDVYNxA8hMmgpWOae5y7ou8 / QZhLRgyDPWWzW / LuzUh0JW1jESph3 + 2QmScmPYfpPb27 \ nJxqHiwGTrJBzRmjAt55nV8 + 4OF9xVfSciJYiUfTjA1VtuP1wwKQvMIsLiusFJxf / Gcv0P6fUP2Gx \ nALLfoOodUyh52Jb8 / feP / Pq7iW5MCU4S3PGHjpw5O1 + xXNYopRDBQwyI6KmLkizJsC4wWZidYA6C \ nTbREIUmEZup6DvsdITpMqvBhRmowMkNGwTjOKKVYLFdopem7gXm2xBiwJETvWFUlRZ4y2hGHwxhN \ nojRhspy9yLi + qDB + i2ZApRk + KTkMkamZYHTsJ4HRgA50diBfrEmLJUTBYb / FTT0L5Zm7lpPlChk8 \ naaopKs3ypIDYYcc9zxc3vFgtqNKarnMkeUm6SpizhngyUf6g4EP8R9z7mr2oMMsz9CInqwRSPKH8 \ nW56tW14sPHMs + O3fK9whsso2DPY1XfC8v2 + oFhWfvsooqpzBjjxtNmw2T0zjMahgh46m2TN8dCKI \ nKNltGzb7YwJF5hqVCcb5QPP + N / SbOw6PNzzdfaCoUtIypVwVmFSQFVDJkovLa56 / / IQ5wDBbsjwn \ nyysCgv0w0e8HnjaWh8eefmyw8ZGrZyV5WiHDBcpfMosdu / 2OeQ4U2QIlU2IQNF1H00z0g2e / 3ZMq \ nQaok2 + 2ObvTM4eh8SJKCvKhJkiO62brj7X + 2E84fTW7WzkCEYEniSC5munZL2zZM3qGUYppH9vue \ n0eagUqLQdP3A08MdYR4w0TMfdjy8e0O3faI0CcFaZu8JSuMEaG2w3cjQbRnGLcFPGKnRuuR / / Kf / \ n5A9rwf / f / / zPf + 7sR / ZLAKWPV6Vd29H0A8M0kRnHNE1oranrmqenJwAuLi4oihzvHaiUICWDs0wR \ nbIxorUm0QktBXVSI4FEcM / 3j6JhGi7UOby0hBkQM5LkhRkuRZWweNiTJgn6ITDYy + YBMc5wztN1I \ nvVigtWDfbMiKjLQssB6GwTJPI / tuZN9OWG + QpvhYptGkeYazE4k8MnJE8LT7A7vtDu + O10fnj6P0 \ nhAmlBUJ4IjPnl2es1gs2 + w1t32ISTYonT8DbDo1jVRc4N9IOe3QiOb8qSNM7Noc3vH83slx + Trbs \ nSdffI8zIbqN4 / f0H9t0bpJoIHCFv / RToB8n7u56mVUQJzbDl9m7PorggcZpKSl5dLvijL69YnUCl \ n3nBWGb79TvD6JrJ + dk3IHZQZs1lx8Kdc5AU / OjVcLwfOylsKfY + aImp6wf7DOW9 + a7hpIiMQPUQf \ n8XaAOBKjZZwGQogsyxqlJNE5JJEYBCFKmnZCpzXl4pTH7RbbTCgHmdIIZxn7FoJFRYdyFpMsCUF8 \ njHNqhFTM80w / 9EghEFIgpCbME4mA1GjqZUU / DTjr0EKiokRmJYwjn5wvEGHkMDtacqKqmVpL6Eaa \ n1nE4bAjS0c0Dpqwo6hVZmjMNLfvNPf7uHUwziVBcnJ2RlxlJoVgsDUUasOOWH4qSE3NKHDRD7zFp \ nSXFyhtM573eR10 + ar + ZX3NuUB2vYB80IZIXkZCmIw1uMu0ObN7x + u + DD6zOG + 99h + AWimNnaM4Qv \ nKf2BPP2EKC54f2N5 + 25gGFOkXKBkedQMWsGh29K2LbOLzF7ihcLkCWWdkGaW6PZk8yNuHpisx8sM \ np2s2XYRsRVQVszMEecK + m2kGi9GaRZmBH0lVYLnISXQEeRyCtF6RpEcY4mJxgiKjKuvjqT + fMElF \ ns5 + oqop2eEDqkcVqiZAlXRvZPj7S754QYSJJEoJKwVREkRGFQagECwQhkYlBSoGQMHQN3k7gHc1h \ nz2azYz48IcaeYd / SNMf / / DgcOUk2pMyiJsoEFzxDv8cojw6WxLujZ7lrUCpSaMM822NQA0iLgrPT \ nM1w3MrZ7JDNaJMd5CLXif / in / + 5O299LDT9IzaZt2T08EudAmuT44HB + ZrKO7m7Ed44sy5mU4uvf \ nfYUxCVVdHkeM3UwMjqRcsZKKOBSQpAzW8bTds396QrmZ1aKmTI8TmDpqdIiMzjH1LeM4oLRmNPpj \ nuSVnsVhxeaUY + 4hSBWmZ4OjwccBPDjfOfLh5x8XlGUmqEWpi6ixSSMpyScgT + nbGN44xau53kTIV \ nICS1kEdyoUmw80RmUhZVhYw9h3Zks28JUaHTDKkDSgYUI1Ja / u67r / HRsT5fsby8pkg09uGW / rCj \ nKEqII4gUlCKpSkIimAOUqWZ5PpJVL1BCI1VLFBtskNjDHWPzjm7qOXx8to8ZV89 + iFA1xnraZuJh \ nM2KDJjFLpJoJccf6POUnP73i / CyAGhlZ81cfAv / 3d1u + fmy5SXrcaImtJxUdJu0QSU + s3yCzCivW \ nDIef8qu / v + WvfvM3 / MX / t2W0nxGvKoRxhHA8DIzTnjSJaJVQFSlCyuN3IaDEUbId8UhdImRCFAYf \ nNUtfMg0ttu / IckOZpDijYB7JtUBstjzFLaYosM4T4pFdXqYl1fIEpzW4mb4dEEB72NHsnqjOlvjo \ nGIYBw9HZ + uFNjtoNyId7 / uSPX3HX3zJHR1qfUC6X7J + 2VMLQdg393iEqxTjNyGSmWNZcXJ3RZYLk \ n7beYYaR5 + 56mrFh + + uyos8w8Rudof8b8 / Xse9u9JS8Of / vEVoRjpuWO7g35X0Bye0YfbI1UVw / e3 \ nE / v7hqebkT / 7LOGH59cIsccUD + TFyEX1xOb9t8Ad8 + oT5pjx4qTmmbzh9kkRdi1vbnccJk9QApVY \ nlPQE0yGCpRgU4 + hxHxvcyIg2M4gOHVqu1wr0kSb70EaeppKvHncoaThZBU5PakQMmFWGFhnN7oCd \ nmqMljIZ + GqiyJUUReErOGMMW18ChTfB2jbIpn3 + WcHbesrwY2B40fii4TNcYHVBiB6JnsXiJ8 + fg \ nawoVeXz3FR / evKVcn5Ctn + NMROc1Wmii91gkLoBhRuDJZERGSfADYozMk2d0OdE2eD8cUevUTGPG \ n5MGYHFNUzDJh9h0xjgjlCHEiNYocwTQHnPX4xH08ZBxDIM55DrsDzAHX9OhgCFGi0xStc6L + hy3Z \ nvx / jVWg4XVVoF7l5956uaREyxyiFExHrZw67FrGU2NnzcP + EEHB9fclqVZOmmtOzJe8fZ9I84bws \ naCdHP02EAMMwMxx27HYHFlqzWJ4idYqbITc5UWme9nu2 + wPaKGTQnJzU6KszlotLsgTu7re4UbI6 \ nu2b2PZE91vY459ntDwj9UYLgLVKAVpEkTaiKJQ + 09L3DoTgME / 2wx4eZ9TLHRcdht2NdlyQqIU1z \ nyqixUXPoRja7PVYEEh3JU0FZGtLVBUWVoVTERTg9OwPlaJKIjjNVtqAozDFNJI7DXUnyjKG95Gn6 \ njmdXK + K4YNgJplby4bt73v72d / TTTDMsmecMJeH5y2dEA4492dKSqIapE4j4nLK0BH / P6rQjzQ8U \ n9QucHxCccOCS / + Nvf8W9BLuwvH / cIRvL8 / SKq6Xk + lnL + mpNm9fsZsWvf7Hl3 / y / H5hIKK7Pcc8P \ nNIct3nlMzLEuQhDE6KjqBUortNYoaXA + IOJR5D6ME9bPVPVxRH5ynt32Ed + NiMkRRQCjSJUm1xqi \ nQ84zSsDct2it6Zstzc4RLk7JL8 + JSYmfLVma8cNnL9jePdBv9kzjgBpSejuAhLKsqLOU + 0PN + / cb \ nFteGv / vqlt45dCKIIXB6cYLsRnY3HVVe0TqLEDmognH07MOBVSJYpAXlesVhc0BEzTd / / Tf8pEzI \ nritmzfHGWy1YfLHj7utvEbolNfcEYdDiBOdXJOo5ORUm7mnmkSlYvHD0SnLrFP / q6ZHdi4LnpyWr \ npeXlq5pyDb + RChtfMYpzjI8sEs / PXnzGb8IlX3 / 7DZvhHv / xNyW1IMgZwnAUzLtnZKZgsT7FxpwY \ nI6k6xhuHsWFZ5WSLCoyk3UQeWolQJWm2YH / reH / fkyjIn0 + I0DPunlBhz + 2H71DYoz1rTnhxdcX + \ nKaJNJODoholup3m87fn29TtOL77jP / yPTrhe / 2NMmrF / Go89mziTlwZUZJoPRFKeXZ6QiRd8 / 03P \ n3f2GZVzgjKZe1ceI7GQJiSaOAuEj0nl8tCyrkm6cCNaSSkMwKYUGYw060 / hZ4EaOWBSVMDtFEPHY \ n74nHfg8E7HTUaAofjjdLEQgRfPBEqRERRBRMw4jteyQaqQpChHG2ODf8g9be30tJ56tf / K8 / 982M \ nbzPOTlbkynF1cokSNaJQ + PxAOiREK5hGx2HboJWi6w98 / d3fMYw7FssEbQ1z15JKBe4IvzL6WDdz \ nwjAFhXsacVaidQGkZGmF94a + 80iREX1CPXjEFJi7GesjWZlDZpgijEFx6CNXS0maFdhg6CeJ0DUm \ nqZinERUnNCPJYBF + Is0EphQIfcQx1PkZtjPsHuH7x4Gmg4ennskeR / BJckS5YJSS1h2xwyEEZhfY \ nD5H32wkrMvbbJ8R0oAgzGYJ / / 4 + f8 / kXFX37jp / + 5AuEnWg237MoO1YXnr2cWdVX6BCQ / oGheaRp \ nZu6eep7ahFZoGnHHel1QFhmnJ + vjFKJzHKxlO00cYgXpKSkNJ6rl1TLlR89 / wKJ6QWeXHOyCb + 4 / \ n8LD / npMKLhODv7 / jR + cZn18O / OTlyCdngXZY8je / tvz5Xzzy5lbybh / Y24LtYcFuUzP3Bm8z7HRM \ n5mRVxsn5iqwsUbpE6wKTlFgrcEEy + 0g0CUlRoBLDaEein8CP9HZgmDukguhmdIxMXQdEEIKoFGLu \ nkO0Tut + h3XwkXaYrQrpiRCHSlDINqDRh33X0k8WYFCkVKk3JVzXqpERmAV3VxOyK1pYgJFXqSPUx \ n591QcpaktLNjNitiec3psy + pi1NiO8Gmo5wUuxcZD4c9CwTL2VEMPcwTIdUc0oxxcULCV7x8vmAl \ nD9RhQxqOfoZxnhlmy9P2nqT + EpF5ZvXAxD1plYKsmfyazi74sNPcfv1EM9zy1H / N9 + 3MPn2FLitO \ n84Y / / fITbm5b / o2V3O0a3AyFKYmzYt553H1A30G1KfGDJ0yCLF9Rrk4RWYJIBCpXKCOZbKTdKaa5 \ nZhgzYqgRssL5jDEkdF7Ti5xu07NrBrZ2phGBRkAXNUGUHLYWI1Z8 + qrii + df8NVvvsaFA44nvDze \ nPm1YsNlkZFNNltXHntrkeeoKRnvJMC0ZXKSoJAvdEHTJKFb4uKbbOsaHHtcG5lEzeoXLLGZymG5A \ ndhPBR2yQyCQnYHBWICXIIkevzxjSjFAUqLpA5gorLIQe098h5xYdLMoBTuAcRKGJRjNOE1JITF5h \ nyhUqq3FBYoTGKM16vcYaQScdswzY6Blny / / y3 / 0Xf1g1 / G + + / 8ufj / OCd / cdJ5dLRBKYvSJfPcMs \ nl7z68ec8X + UkmWK7fcKYBBENUmQoCrpDYGglx3X + KAPHJAyTxYZw / FMqRQiewsw4MdNPHagAWoL0 \ nCBVJU41OwHcDngBKkOQZOs3wUTBOFimPwyXjfovWGVobXLRkeQYx4hwolRO9xs + OthmIXpAnBTpK \ nNEc / rY9HLLNMUiAQvaVrGrbbLU3THjV984yzgRANMkqIAh8Uab6gbVtUtBQ6oN3ATz9d89kPSpZV \ nz8WpJk6PXF8qnj / 35MU9Qn2gqDsyOYJ / AvU1Pv0levUdTdjw7r5lf4C + GVhUmvWJYHUqSQpN00se \ nHgvm6RMKXbFO96S2wYwjP7z + jCpbMs4OmRm8mclD4Fmao + YDt9 / / motzzfI0Z3V + zvLyE24PCQ9N \ nzdt7z / 2Tw4oV / Whousi + mZlGe4wiOoeUkTxNKLIEpTRaJZTFEqkMQpujf9Ueyz5wJIUOw0DXDMfe \ nzOyx0ww + IEMgzDN92yCIICIogUgUSmqCnbHjwDjNNKNFZxU6TRHBkShIcstyvSDME7ZvKUxGdBI3 \ nG / rJMM8l + dk1QpXMwfC0P7DvGnSmj83CTUOcHHI6MPoBmRmWZyecXp6TVjmDdwwS5lTjqyX4BNvP \ nKAJOjByGe / rxnhfnOWs1IRX03Y6n7R1BnfH + 6Tkftj + icS + 47x / YTr9Fa8v6RLJalyix5N13PX6o \ nkf5YNg14vpsmHvondo8PsEtQ + 4TzcsVnX7zicZh433n + 2lbMpOisRpgSqQsSXZAEjR4F9BGHwMeE \ nzd5iXYIyFdErhFOESTC0AelThknRD4oQc6LMcFFggz / m4o0gWENEYX3Ax / ixt2axc4vRjnZ4xAyW \ nF9cJ28db9jc52r4iCYow99hDxbR9xTa + JV + fkFRLRhexVjCOnmY3YoeA9IpDN3CYJF5VaFNQFBng \ nEUYx + BmhBV3XExqL6xzD5BlC4DAPzH4guhE / DYwT + NkSvSd6R13m1GVOmacYLXHzgPAzQkSkjAjp \ nyVNNpiFMLTLMZGWKWVbkqxXF6Sm6LBidJSaaH / 3Rj7l69fxYnp5mlHVo7zHO8z / / s393PPLvh6WT \ nLbi6PsGba8qVpBsEN + 9HHrYdN / sDeUj56YVieXLFyfmKaFPubnbc3mwRwRC84PHdjM4OnF0 + Y4yS \ nOXhc8BiToo3C2gnnLDGPuNkxDj3T4GltR1mdkKTFsUwwBfbyuBi0U097N7G0luXZJUYdFYqZyRHZ \ nNVpHJnugb1qkBOcE0ySJMcU5SRIVqcpxk0d / pMB4KfHR4U0krXOkFVjc8WovBdFOx4napiUqCUEg \ nSBDheNWLCLpuJi8K7NyxKBb86Z + 8YJX + mvVyg0nv0OuRqYWMNZoaI39EVDNhcseNyFsmqZi85nYz \ ncfOY8bBL2GwHri9rzs5qpHEcOsthlNw + eJpmjY1rUnPDomxpHjdUZYWKGdEanPNstu9YpTXPFie0 \ n + 54P99 + h / BPaXPDdh / f89TeP6GSPsyXDNLFvLW0fCHKDp2CyGuuPTlW8R8UZ6QJ + BG8UWiZIFEJo \ nJhuQwSM9CCGRUjFNI33f41zAToG + n1EyIXqJjPGjKvMoj5 + 8BxGQQqAlqNlCCAgCOgpi8Iz7PRFJ \ nWacoFPvgUGGCNJKYQJxbUlliZ8UUDciCt + 83pElJVVa0omJod9x9 / UiOQ82gZoWbZiQQp0D / IBht \ nT3pySjCK / MU5SZHhekl9WeOdZLRPTOM9iRwpn + DNX77nZ1 / + kPFZjaPm5vGMoV / h1A8Z9Rnb5p7B \ nB2QhCf4r3HiJ5hLjalKheXxwtMaSpzOLhUPUn + BUILiO02xJLirc1NNut8RsRdN4Kr2EeSJ14Yjl \ nTjxRzQiVE3XBeGjRbcfcW6yw7O4PHA4RbQzejXg7UqYlY5zwQeKDwWMIUWGPFCuSRJIXKS6mtMOB \ nIEtSU6JMx7oOxPmR6A / YOPPubmQ7fU1SXFKdptzczggEUeZ4YZhC5ObNE3v3d3zx2WesVytMVuP7 \ niXkeICqCi + wmTec0mIpkJWBomG2LD5ZAZAxPqPEoqYk + AZUQtEclltk3SDuRSUN0gmgt89wg9RGB \ nvn52wThPXJwWhHHP4DJicEjhEUGQJJIkQhihSjPOXzyn1wmHrkenKREwy5qf / tGXXJys + du / / SUE \ nT + kD3TACR1vfP + T1eznhv / 76X / 28aSJFvSSvLHUVqfKSsjjHmJQQRxR7ssxwdnaGUQohYR5HJAI7 \ nj3g34ZOJ2QeS7KO + EEma5USg73u0kgRG2mlk9p4oNLOLgCRGgRAKHyJFXiASjXWeaZ6xHkDibMTP \ nkambSJMVSZpS5oaqzpinkXn2DD0MnST4BGcH / OSR9ihZSIRini15XWCKhNFbiqJCaYUElJBIAYLj \ np4wRQjwmBAggIlFJhFZY26Nji3Jb9rff0H74G778SU2WfaCqDhg9o0lJxAL8AqYc5Qxu6olC0PQF \ nj5tn / OKXKX / / dcb9RiHMyOpsJi1XtGPBh3vDmxvBYa6JSUkwEin3qLDjpK54 + eyU07VhUUfSdKSq \ nIota0W8eef / uNX3wvPjiZ4Tkml / 8dst2OOVuX / Pte8 + bDzsO7UxQGdXqHBsF1h0x0TEGhDhukkoc \ n47pamo8IjJKIxrqIcxERBUpKvLNM01ELSThGdv1kERGii6gIInrSxBAJuOgRRiJSg8wSVnlFnWfg \ njoL7iCbKFOsj1s0kSrEXA3W9oEoUi0zw2YtLllUFShF1hlApXox0XYdOU0xREZOMdgq0naUfZ8bZ \ nMnYzLkJwAQNIZylzQ1EaklIzxwHRaiqtyOQMsUckI / 28YR4OFAK62wfSFwuUPWXYv + Th4RyfXNKJ \ nkdY9IIUjoaS5e0ffWE6XL3CzoUhXxCiZvWN0ARsMiV + AscSFZswSyotTUAPff / cbrutLHr7Z4V9r \ n1l3kFINxkclbRh2IVYqoU + ZCcxaOdeVpDswu4l1knj1 + DoiogIQwwzwbQkyIMiWgjhHHMCM / 3rJP \ nzk5IsoSmH / AhkpicPC + oFxUueFwIjO6CTXvGpi / Zhx3FtSI / P4FqwZg1zOVbwiFlngSHZkTKnK6f \ nacdAN0e8TOks9E4RdI1XKT5EQhjIUrBxYHW5oqozshgJs2X2gkmlUCzwQqMxZFEhnSI4cXRNW0u0 \ nM3miuLg44fJ8Rd8fQGtitsIUBWlVkhYFPniQkpPVkjRNCMoQkhwfIC8rnIe6rrF25q9 / + Qua3Q7j \ nHLHrIHqkiIgQ + Of / / R9YLHNz85c / 324nlE6Ick + iBgplYDYMQ8uL6wXej9jJcnKyIss0dZWwWmU8 \ nbd5hUkeaB4KSTLNl13R0 / cjs / PEBPuBni4iRerUmz2q8U4SgkWRIkWKtYJ4iIWh0YlBJQpQC6z1p \ nmqGERusUIxOkkPSjoh87pHDkmUEIECQQUuZZok0JYUAJhYoSESJ2sqAEvZ1p5xHPkSdflRUyRoau \ nJ / pIcB4jJVmaoLVish0xTJhUkZYpSZFQlIIqnyhEg293PC8 + 5eryCiEVZX5C9AVCHVNFMb1nju8g \ nPJHUmt0Q2LRL9t01X33v + fCwp3NbhO7Y7LccRk3nFnx3axHFBVYnyEKR1J5pHggznF0sSIuBsmpZ \ nrh1VGUgVfPfb7 / jm9h1tqmHxEoov + Zd / 8cTb25r3N5r3NyPDcBSU6NSQFDlBBaKGwMxke4QIR4 + u \ n88gjGwPvIt5LhsGiVUKalyQmIdEGowxD3 / H0 + MDUdwR7zOYrBNHFI2jPWeLHRpkymsFNWALL87Mj \ nD0ce6aa5VkRnGXpL1AlzFIQQSFONL3O8jSyKlHWVkucCkwZ0pqhPSrJKEKaOPIlYNxGUJF + ckBQn \ nmGLF6BUTEmUTrBXoKHFNg + 8OXKxyrs + WaDHC3OKfJiphyeVECM1xE8gU3ewRIaUsL3g8zKTiGZu7 \ no1C9GXeMbBGipzIl4zbgGsnhKfJwu2e9rEhST4hHEbqPKUl2Tq4Mk + 7YxA2TUgxDRyY70tghnGZq \ nFcX7SNIcsJtHDpt7RtcyhxFhAkpGCJ7PT9acXpwhlKRe1hij0CqitCBNNUJEirRAqoRpCgzjzGyP \ nhjvnZpyfabuWoo7kZYoxCW07cDh0WBvQOkeqgvXpC6RL6NuUaXRI0xDFjqJYIoTBxR152VPsrsFJ \ nRND8 / 9S9yY5laZad9 / 3taW9jds3Mzc2byIyIzMrqSKpIUZAAgZBAikM1Qw014HPUSwkQRQiCIEEQ \ nUQSzMovZREZG7 + 7W3 + 7c0 / 6dBsfrCXKQqAewkZnt8 + + 91vqWMQV5vSKZjMYFnrqOD0 / PTH1EmAqV \ nFWglUDjKHIRO5IucxarkvEhcXm5QNifaAmyJzhaoYLCUEBRCzacaGSPRT / hxYLd9YBxarFEkUzBl \ nG7xQ9D6grMXYAvGRk2OLkjGASJK6XM4o + BCJU + C73 / 8eMTlwgalrSTEg / n4 + pci / + V / + gbF0hrHn \ n1HacjoH6PJEtIioGstRR + ANlnKgvX9KNPbmBpD1KeS5fXFS6T1gAACAASURBVHJ + + U / 4xS / / jt3h \ nQGZe0U + es9WK3Wng4eEdymQUeUldVpyt1tTZOQMjvREkN4uyQzcXiCThsUYxxIhWkuXyDBfBT4E2 \ ntOjBoWWOlobJZEg / IQloLEW + QmUJJSQu9AyjRytFSgGMxuYa5wJRJESIGARSzet95wMSyfriCjGM \ nPD3e4WNAx0Dfd6Q0keeWvJqLn / vk0Tpwuaz505sNZ6Jn4eH9Q + S33ygWZcnnn3 + Ksiei / oJq80hx \ ntieTK354VzBMf85vv + 34v / 79 / 8Ou / 3svf8b5 + Vuk + JxkM + 4PR85er0lGYJLi6WnPdPSYqPCi5rkd \ nwDR8fnWNOiswWU3GkiyvUHnHMdf07QXf / / zEl98t2G3rmQpJh9UOrQWZ1azWNbbM2B0PoAJJTIQQ \ nUcIipEIpjVTZjJNA4X1i97TlQmp2 + z1PD3uM1hgtiT7g3YSLIwSBiBLB3CWAgJgSLng8gRBBWjMH \ nsrKS8XQiuBEzdqTgWFQlvRCEBOPoOPUTnAyP0xE1atICYhEwJiFKR5n1lMKyWF5y6BpGAd56pthT \ n5CusqehGx8k7Sm0QQUEYkDGSicB3v / hbwnjgkz / 7Kb5t6Y4HjgdHYTxSTySpID9nvXqFkQU7L3FP \ na7RzSJ4R6UjooMxesVz9mPu7L8GfaPZnwAIfBo4PT3z + s9esF5anx / f4fk3U5 + wLz2qzYaUD8tSw \ n9j1q2JNliuLlOS / ffsbJvef7b75FCUPwgek5wJTjdrOg + GK54blq2Wwu + ez8x0xj4tQOPD3v2R52 \ nSJVR1BV6VBijUNowbXu8iwSVIH7MnIjE7e13bDYvWC4vefXqkoeHZwSSYzP3M08h468ucsSV4 / 7u \ nxG9 / faBpI05 / SRQKYoZP16zNgiDn / M7d9 / c8PO3Y3LygWK84LxcU5YLj + yeenx7I2p4iV1wuLGFq \ nkVLNetC050oHpJRcXp9xri / oKbl / POCjxiTNxA6fbkmjIMEcBg2RvnU8PjwxjAOpPCOtz8nKBS5M \ nCCPJbUnoBH3whDRrf1oZjMgYp4l + 37F9fiRNDmU1cfIzonmRo / Vc + tSHf4AsnROS4vIl / SljP2zp \ npyP + 8Mx4MORWcL5QDEniU6Q77EFCIDF5R7FY8pM / + wseH5 / oG4uLYPMFUmYYlbHbNfT7A9I5plND \ nc + ooi5pCG3Rh6EZPNziQihAiLka6npmdIwecj3jvST6ghcNIxxghbSoyIRj7wN73uNxiMgspYaxg \ ndbag2XZ0wTOlQJCKoOcvuBGKRVaQlxU7PClEgk9IIdE2o6wWDO2BbhxBSjKZk0Kkax2jipBpoh9p \ nOPGs99iVZ / Naczx5th28u5c8nzJ8cgRVcPPphk9 + / ILp4PnNr5Y87wx / 90XDrs859T1SCN5uPuPN \ n1Sc87 + / oQ + Ty / IIuwuA8zX6PP3ScVzXrVU2RJWxmUFoR7ad8dd + wf2wYm4Gxlcj1hskapmHFF18 + \ n0jSC5CQ6JHKjOCtzyCdENnOCDtsT7djPG5TJQWYQNFEkPn4aISpiEOQ2ox96vv7tb0EmlCiZJgdI \ nMq2RKZBCnD / gaV55o5YYrUkh4r2DCFJJyrpmuV4zBkfbHEAlprFDycSyLNhvW + Iip1gsGWMk + 1h2 \ n3WSCrMgYhkSuErk0VEKgkmefNCGzxNhSZhOb4pxxgEkKwqIkM2eE7TukdEjc7OrRksyu + PD + gecu \ n8OLNW6SGdr9njD1KT / RyQi4lq2rJpJf0IaHkDdvuA7Vuie4BG5e0D0eGFspljlpauibnuDtgvGU6 \ nwvA8UCwtF0WGTQI / NkhZsFheUKzOCU8Nl2PLhV6yvvAc7TkxW / PynzrcqmP3tCebFB6NV3OjmI2a \ n6TDxlCSjarg6M9hMcb1ccvWiInBDlAKkxDqLVgU + WH7 / + w98uH1knDwyQAzzWXVsBc / hiEyWsq65 \ n2iwQWs9Cfkz4KHh8fM9PfrZgc3bFi9Vn3L / zfPfhdzxsb9FhBeElp7oBGUly3hCbpx3BeRb7hvOL \ nC350dc0hRr758ETX7On3jv5hos5B5Zro5rBVmwK5jITpSNRgF5eszwyTVZRk5EvNvj3QPnfoCItq \ nRd8cMEIhgmTsPd41TMM7zjdnbMqcaTzhe0euFJqIjKCEAmk4drMWtTs2CKXJygojE6OfkHIu0nE + \ n4ZJC2PoPmr1 / lJPOv / / y / / 3rbVfz3Fma0bHbH3i + P3HcT0Thqc80RmYIIqSIzTOkymi6wONThzZr \ nXChYZDmXF1cMg0ebDK0suc1RiLkVygXGsSN8rAKc3ARiXtltnhNFBJkQdo5TCwHBO6qymFkbfYdV \ nmiLXNAgIAXzEdY7uNNL3A8PUE4SnWuQQPGP0TCSCFhSLJVJpYh + I7UjoJryViCQ + ulIS0zQhBYAn \ nRT + LMtFClCRh8FhOw0QKjlJMZKHFoGiHiqhzopEcho4 + JKIuCWrBw16w3Z3xw / cb7g8rfvvDE7fH \ nA50fKKuSs7ri6qxktej56U + WlMWS / lRx2lXcfzfgjhMvasPNGVxUPbnsCc4x9Bm9u + Tnv275xe8G \ nfvPO8 / Vj4O4Wbr / seXjXctoPpKlHhI5cTSxzzaqYBepu6hjHEaU1NiuoFxu0rCGWxFDMWGISJI3S \ nliIr6doe5wZyq5B4QppTsVqCURqrJUqAiJBCRKaE14a8LDDGMPn5jFAuas7PN9SrFVIp8trSn46k \ noeX4 + MR / 89 / + d5jqDL1Ygs3mEos04qeRADTOc3IJoSuSl6hgyEXGh + IlqrJEOnAdBYKlzRHTiIwd \ nyzLyQgsKG3DuyOAaVGEZpMKZBU9t4rmBYA0hJDQgRSIK5nOQrRG6RMicsZjwYaTbDUwHyfEw4HHU \ nFzlRTwQpsNXcojadEmnQNE8Np / 0JN01oZThbLci3jnJZUNy8xOXn6LxCy5HhtKXfA92KT1 / nfPL2 \ nBp1ZFjcvqN + 8ZlqtOJmM1lg6bRmTpusdfd8xdC1u7IhxROpAUWlW65LptGVyHUpKlvViLpcPieQT \ nwYW5EyJkDN3ENA5z4Xgh0BaEhqKusLkl5SXPfcbDUbAbO0IZqa4uUcsNrQhMWUuwJV6muezISHIl \ nKYSCU4 / fHSkT1CuNVAZQhMmh07zlK5kxeAEyJ7cVVmZoIQlhIqmAzATKzqefoDz1JmNzsaHIcqZh \ nYDi1KK1JKTGMDj85mDqE78mFJ40nxNSRq0QhQXlHP00MQhOVpF6tKVc149 + jGz7280qpkSInhrm4 \ n2WjLv / mf / 9U / rJPO0zHRDBPdFHl83DIdW4o0M8ub7SPZ88iL8xoh5nugNQaiosoLPry7Zb / dIWSO \ ntB6r7RzQSDNOd1Uv0MLw + PBAUZQEAsE5 + nBCmhwMJJEQMpLE / DKMwZGUQSpDjOBcQGtDXmusUvip \ nB53jkkLLfG5V8hPb5wNFpcgry / PDB6y0pJQIMRCC4Hm / IxeGylrqcsmirHgyHqL4aEUMc8VjmBES \ nYJiGHin07HaQmtM4IYVFCo8Pmt5pumnF8HRDSBPKPIPaM6YfUGrCZCtcuOJhn9E8OHbdHe + evyKI \ nRJCCrDrndLrjh + d32KrkImi + / N17vv2u5GlbMvTw5tUlL1YtpbplWSpssWLijLut4Tdf9NzvC45j \ nBkoSk0dHg + x6JjdgNAg82iQKazEy0jR7UpUYfE + xqrl58ylBanwwhOAY + pY4Cawp0BJCBB8jLgaQ \ nzGwTNyGCJMWIUBKBwHtPSJ748TzgUwQgiBGhK8ws8eN9x6tXP2O5vmAKA7oQFNk5stnxzZe / Zrko \ n + N / / j3 / Hf / Ev / 0dqU3O / 37LdPbEuDB / Gib5zeK / JY8WpO6GHgY1WXC9XtK8FeZZxVq0oJok7HBlc \ nwMqcdRjJbODydY7NV3TjFd99eORhPzBNln5UtDGgJkEaR5Z5NjuQxOz20lpgZDb / 08uMoO5Q2tK2 \ nGWZSJOcY4zN + MtTLK9ohJ4pbyrrAHQIxZuy2I13XUywsEwfGdmJxLPi6uyMd95z9 + McsrzbYeqLu \ nNcbnHB492 / tHFos1727fcdtMHEzBWK9J1Yoxk1iVsWwCmZJkEqQItGNPEhFjwfWO1h2JckJqgxTD \ nLNIWgqxQ0IKWBqMtg3dolXPc72hOz / zszz9DuERMgqFtcC6yK1cU5prke5DviPGJppktxEMxQXUi \ nNWcQI / YjXE8kSV3XZMLQtx1P989MJ4 + tzilshlzUaJGTKajXK / KUSMJgEZA8ValRQ4 / zzUyqtAuU \ nrXBxohkmGAZ0msiXGVquESTGaUTGRAgjvtlz7LekYcn67GxO54eJ4JnFXgS2MFibobUhnEZ8mBAi \ nkGWGRMY0BURKoDTKOeTwD / CkM4wTzw / fsH + KuFPCqoIkJsq1phLnuKHAqZl8KUTg1J14em54fjrR \ nNuBGSwyKUwHHpqesllxevSAmzb7p0HmJXZzhUyIOEffx5ZxJQRKJ3OaEmBAoQkqo0KDFTLSkXjH2 \ nPUhNiJ5xPOHHHq1zks5ok0JnNSIvKMoK0becHvesq4Ih71FAwZwQzrVlHAd6C4emZdreslhvKLIC \ nFROSREyBkCLO9cQ4IhT4MMPkhJr / QISf0EVidJqdXTI0Ixlf4NMFL9cX3JQV5TqwD0eexz1tPOfu \ n / TPdu1tCihT6gijhudvz3Cg6f4GMiuH9mv / 06473t4okNYduy + VFiSjmAXHz4g29gluXMQwlR7lk \ ntJbONyiRMCpCHNBLh6odl8UL7r9 + Rk6as / UKrQLb / Ts8J4yA + mKBWS7p9YJJVEhVUq4ENrX02y1D \ nP4AQ2EwT5KyjCA0iQJwlVgyO4EZS0iShmFwgKwuC8CAdiEQ0I4NriE6h6MiyjilM + FCixUhu31N1 \ nmrb5gTPZMZw6zPk5d6eBxfUFZ2c5n95cc70q + JtfjPz + 7gkpLD4oxijJdMbdOPF837Ko37PK11yE \ nwJKMZx95alqur9dkIbJg4GJz5DQ1RGV489NPyQ4lv / rymehH8rwhpRO1gKpekq1LpCpRPiJGSJMi \ nSUEsJGWX49oG0p6QOqQ / ITvP6ZsOHUCYgsl9jncHgn6iCz12oQlJ0548eZbh + 5EH5RC9Iv7Hr + l / \ n + 47Tpzdc / vQVw / INp6LDvx3wsubr7Z67vgVVcqZqCnPOGDOOo8MUhstlhU8CHzVRaFCRpm / p9i2V \ n7LBE4ktLZRSkjmKhWL085 / yzDb / 99Xds3zWENoB4JqY4V0tGyX / 4 / 35DXVr + 4k9 / SmElUiea1HNR \ nHNnUK3T6jGls + P3hW9puj / YFU7giRyF1BkwEqTDrBW2ecRQKs37B3eFAaiWya8hUR2EUurQUZUFe \ nZqgwYWRC7k8sL5YEJtaZosRw2HXcP92xD4J8dYEJGehEsZEUxhMmxdR15NFyOgz0TUdpYAyBIYx0 \ n0SNUTkyCIKGsC9ZKE1NA + I7j04HTcY / bP7M8WyNEZCJyMoGkcgqXs7FPfHr + 1R80e / 8oA / 8XX / 0N \ nwp1D2jC4QAgjSjRcnF1wub6BmBGwjL2jaQ / 0fY8LCZ0VnBUVh + 3I8TAQBs + x6UDueNo1KFsRkwQp \ nKauCthsQIlEXJXmRM3mH / + jmEAim4IlhdngEnWGUhkyRQkBajYwe18 / OHREdRuVkRYk0GaCwosBW \ nJYPVHNsjhtlCFmLEhUDMZkU + xESYPFlZ0rQN0zSS2RwJOCIQSCKBFJASkohgnHtCY4dWEL0n6cTQ \ ne9pxj5gOmJsc5wMiNVxSIHJFczzy4eGR2 / d7rJMsFguUyTg0LWkUHPsOhMTkmvv2hBsmRqGIsWd1 \ nWWBqyeuf / ARbSxoVOE2BECqOjefpObA / 9liTfzy39WS5xQ9HhJo4Hh8JouXtZ29YFCWPj7ez + J0L \ nSlOzKDZIs8R1DmEDPvZYMYe0otPYKqeoStCCtm / phkielbTHATeOGGVQTBA8KgqMlYgAYpzIrYXM \ nEGPAkUOqyYsCYwXTKTD4iaQdWR6p6oTa / 9 / 86 / / qT / gPseCrrwP3B8duN5K / 1Oxiz + Is5 / 3Tkc3N \ nW9Lqgj5KhhC5v7tH + MBZUbAwGT1H2lPHppp / a + cvK + QSohpRRrHdNYTHiZQpopUYmzhbKz77ZMXt \ nhycOB4eSAusaUusxRURbA6PHBAUp0bceLT1KSU5txzQOSDc3IUUS7dCTDnt0XWPIYegxIiIQWC0x \ nSkIQJCIhOBgTUikKXTDsWn7 / 89 / iTkcuX6 + 5eL1CoNlHx / 4wEYLFj4luv6foFbZcsygXnK03pGNL \ n3w30fgBpMFJSGIOVBTIOWCNAFiyzkkWuGdzE7vE9TmouzySv1y9xp4mvPnhOw4CPCR8TVVVwebFh \ nsVgT / EhzOpJe1aAcDM + 8LBasz874rz / 7nL / 54mv + 5otv + PZ + iw4ClSRIKLISrWaB2eQGm1uylOFc \ nR3c6EaaJgUTUil4LmjLnbHNGeb7B6wKXBGSW5cUK + pHLoiKYA8f392zffU9erTG5otyckcQEUiKT \ nxgpJ342sNusZghjAIWmmAZlnsxPPKnRmMSZne3 / g9sMHhtOJ4GdtKibB2E + Mo8PIkjDUqNwyZorz \ nf / b6D5q9f5SB / + Gdx5gPrBdbqvMFC / MjxPQJmhyhPUXd8NCtccETo0VYRWUsq03J7e0OmRsWxtIf \ nGnzfEVJku9 + jrUOanCQ0Mc1 / 4EKA946xjzOvAkFIA1FlFFlObTN2D49MXc / + eUtIkhADNrNYbbEr \ nS7Y6wztHP3k0Aakl4xRQVuOExKzOEHlO7lr6YaAZWqzNqesVJs8xecZiHdju9xgp5lsf8wlCaQVK \ nIaNhzlRIiBNSCUIMSEZighgcQz8xjQ4REzpE7ndHDrnHFgJ3CJRe8O6HW5p9h4mCJC1RFIQp4oeR \ nOATKrGYcA2MzIbKMUxRM44nFQpJXkX / 0V / + Yy6trdqeBZoLj0bHbTjzcnxgmQZ7VSBmpCkkIiUUt \ neXoaiATGMFBfaC7fFpyOR05ix4vProkpcV5f0LWeIQQWhSEvKobJE8PE49MdMQ0zk / + yRmpF0RuU \ ntnTthBCalCQSg3KJvhkJsUeFSEqBEAVp9HTtwGKxpFqfk3xGShqTLVgVEZUZ + qlDqhY5HHjJV3x + \ n8ym / iE + kyWKi4NvffQ1nK27 + 7JqwHOluI9IoLl9uuHt8YJlb9Hhkf3fLJrO8vjjn + jzHNztugua8 \ nLEhk / DAeQEEpLU99oLU1WW5AgRQTSu65uSq5Wl / x / rsOq8EGQ + MGxu5A6CU4GIZIVa5IEbzwiCyn \ nzgsaeaAbhlm70JJIpO1aJIlz5VgaSfvcIURi9AlTFphMI0komRG7ETc6UpCYJEhJ8 / DDM + MwUJY1 \ nWWE5u / mUZR347us94zBhZc5w6ImT5TJbw8kxtSPJRywaFyJ916MLS1Vl5EJDCugkOKtrTHLIlNi3 \ nJ8ZpAq9YrTIikcOqJgXPFBMuzs1Xxs4gMiksy7Nrrq8K / LHhdHji2 + aehcr4RET + 4sdvebE64 + e / \ n + DW7Hnb7lpg0ws95CkLg4mzJ5dWScZ1x / toy9gP37z6wfXxm7HsykWF9YpkUdgyMQWJMwWE8cHp4 \ n4KKsqLXl5vqCzBi + + f4dh + YJQsE0LtFlSRscq3VN7BoiicwafBRYpTFC4sKMRrAkdJ6hrCEEwe40 \ ncmwnclOQkgICzbHF5IbMFpgYkWpE2Bq7fMPe + D9o9v5RRNtfff3v / jpNUOkrltVLqrqiWIFZRBo3 \ nMlHRDoJhCti8QEjN6BNP2yOntmeYHDbPqbOKhEBoTQgJhEJnGZPzTMGTUsIoCzHi + n62gSVmU7gQ \ n + BjxMSGcJ8XINAx47 + dXeoiMIRKFxpQVq8JSlBUhzUXXSE1Z1 / gQCQmkycnCBAmMycjzHCklbd8R \ ngXq9JJJQUpAXOcE7YvB4PxGjIyYHyQNz200iklmDtYbTYQ9ExmGY9QWlCH4g6gzyCqcsd9s9d7e3 \ niBC4WBakMGDqkvWqnreYGMlURq5y0hDw3SwadWmiLCM / / tGCv / yLN1xcLdgdWvpQ8eEx8cP7gWMj \ ncFGjtKGqNEUeuL4u2JxLXr9e0vV7EAltIxfXKxabnOfmkfWLc16 + eUN5doYVNafDhPeCvFywWq / o \ nu4ZhbGiOj1y + WIEKjH5GYCzXFVVdIqTGZjlFuWSxOiPPIQiHyjXnF2vqswU3b15Rreb6yiwvWN + c \ nUy + WFDajXBjOr8 / R + TmICiVGDvuvuOGBv / yzv8LaF5x6y / f3J6LJ6ZPj0z / 5nMEHugPoomZybuaR \ nM / HybMGrVcVFYbhe1VykxEoZSgS1KWGKfPPl1xDmyjzvIvcdCJuhMkFWSpQM + KFlkQnOKoGODYXJ \ nKJclXghO7Uh77GmOLXW1RFrD6B1WG8rMIoKnPe6IaWb9qLzESUlAcG0t / + yf / GPev / sB5yZiCGij \ nZqR08oQw4YcRbTTaWFJSxASjT4ze8 / C0ZX1 + TblasX06cdz1aJERJ1DCUpgCvKQ7dqSUKPKK9eoM \ npQTBTQx9S9c2xOAIIfLmzQIjPCIOdO2B3WELQtDsjoRmYplVPDzv2O12jM5 / zNJIfEhsLi7J8oqL \ nyxe8PHZz3 + zC0BSShxj47Xfveb59wp5GLqQibQqEFHSDox08PiZGN3JsHtnt7yD1 / PTlDZ + 8eokW \ nkeQm4jTOmZlposgLrLaQL8nOFhxCTxdGjoc93W7HaftMrgS11Yxdx + g9nQ8kW6DyCoSgaw64oWXo \ ne9wU0NpS5gW5MShAeE + m9PzRedjxtO1IiXkupYRWEmsUZVmgFKixZakNMs / Ri0BxMfI / / NN / 8Q8r \ nePW3P / 9f / 7pUK2RY4JwmmQiVp6WnE5rGZ8gwF4wfmxahDQ8PTxyOLZP3jNNEN46kEaQylFWNjzB6 \ nT71cIqRkch5tNevFOdM4zEUNcU6yKqmQxhKFoh9HbAgImLGyMc4 / 7z3D5AlCkKRBDCcurq4oinL2 \ nl + cZSkp8DISY0EbjT3uGfvgYLHE0xwahJIHI8XRk8o7caKw2KCnnF9jUk / xECiMhTITgiHGcS9pJ \ nVHlOkec0x + PHf1CQQqJEIEj9ETXdsT + cIApk9KxLi80UsrAoLSGCFgqrNOOpI / TzliBk5Ec / fcWf \ n / + k1RdaTaGjbBm1X9H1B2xj6UZOUQulEUQpsNrA + g5tXOVcvMmzuWKxqFqslptR46Tl0R + rNksub \ nV3ipSMqSnOJ4GFhtzqiXFWWZo02irg2oQLXMaI5bYvJcv7iirEtIc1eCNjlZUaHzAp0L8mVBdVZT \ nr2vqswUX1xesN2ecv7jk8uU16yvL2bqmyCxFZfFKsFi9pSyu0SRkPBAf93zyo3 / O9 / cDXpb8 / Je / \ nZLkuZ2T2KDgeBM0YWZ + dsVxWZDqifUfOxNurDXIaOa9rulySXW7o8wJX13RGw1nNt82B322f + bYb \ nSGFuyxI6YDOocstwOqDSxM1FzXoh2Z0motY0zjMmiUsaLQvOL6 + JRuJkQqf5tCeT5 / n5EWMMQik8 \ nEmUzYoJqGvjw4R27w57JBXyKJGCaRqaxJwZHlJEoBCFJolQ4xMx4MgYnBbdPTzzv9rgJri5fUOc1 \ nU + dIXjB2E4ftCREFMstmQ4mUxBBJPqAEVHmGVpqqqrl5Y0ihZ1XlvH5985FRBfvnnsNDz / 33TxyH \ nE5NzgMJHGCbPME48PD1zbE6c2pa3U86YAtQ5Q245howkl7gBgpvLbdJSMYTAiCBfrIhaIjOJziU + \ njpzaA + PhiMk0L1 / dcHd3j4uBdhiIQvB82DMBU8pwJlGeLxncgBUgp4nxeOSwfSRFh5LQdB2jD3gE \ nkwscd890zR4 / jRAScpL4fiSNnoXNKJQm9iPb + 0cOT1v6IeBlNjP30yw2V4VltaxwrqcqDJ9cb5B + \ nQhjNizcW53 / L / / Rf / vf / sFw659l / hpNfodYHalsx + Ev2hwpZZAS7pVjt0Q8XxKhQquA3v / kCrQ2T \ n8 / PNWs72pzAmtDWcnp5JQhGE5OnpiWJRc7ZZM44jh + FEVAKp1ex7TQm0wqeIMLBerIjbPadTg9Ea \ nqSQ + OhCaCAztwOk00LkjMcD1zRtWhZ3vpiHOiU0VCa4jKzImP9CPHfgwF5j4kSl2jCkQBTgMZVlh \ ntSU3ioFEEokYIzF6hAizHy0mYvAE1yNCQgsBSRKDZAwRZUpSiDw9PSK0RcsCP4yMUjKtNMoqTk3P \ nOLTgBMIrtvcHmCA5RWZyqtKyKDzBefbdgavVhuXFDcOQkasS7R34CVtKVouSonBcrEuqKmDMwGk8 \ nIUQkq5eYxRI7lXTDwHa / 4 / 4wcrv9hjJf8fL6hvyy5mcXLyisoe1ahBo5rwuSSJQLQyRQlQVaKcoi \ nm08F2kISkM0CbSCRLxessiXWSGbJRRLc7HzKqwIRFdEM + GEkW1V4rzluR46HHp0WxD7iOkle / yNS \ n9lOe + j3bcQDtCeMT5 / qaw + 0zvVawlpi7JzYLxac3a7KF4vG7r2ibhqqsESZD5IKn3pMVC5LS5LVA \ nuwlb5ITTSI9Cx8Td855XeU0 + Cab2RJmVJNczjgcuLyrujxPfP + 744eEJW11Sb84pZEm + XCDTyDRE \ n + sNAdCMMHUkl2rHFUiKtJgaPCILdaUeUc3 + y0hYf / LwFi / nDn7zHCf8R6W1Q0qKUIWmNIxB9Irea \ nolxTlBWr5ZrsXHK + 2vAf / + aXTGMgtzWLekMbJvqmxXmPc45TcyDTClnmqMyyXKzopgZc4OBa2m4W \ nLperkvMzy3HoaLuW0T2SkNg8Q2BIk8MjiC7QHhumfuD / jAdef3bOTz65pgiRcGwYQgZVYFgmurXh \ nbVWRL1teq5J2EHz51TcslhXNcUt / 8tTFgvvtluZXv + af / 1VJfbnhYb / HLBd0 / UBWFmybI2JShPGJ \ nxbDmzdsX / Ohiw9PXX7IdR2SZ0RwPlPmCF2bFcz + Rm8joToxdy / FwZLNesKlWnO63 + LEnhJFJnsjr \ nChsTNgqSS0zCE4xD4tEyYjUQJxZFQZ1XkDybC800tvg28d1 / 2pLi4x80e / 8oA3 + sO8a25PERUJYx \ n7miG74hHyaHpub5 + ixhuPxZ35yzrxSyCRoH3CaMUAtubyAAAIABJREFUXd9jZUmRlyht6J1n9JHZ \ ngu / ph5aIRGQZdZmT + hHfdihhyKqKSRn6CNJorm8uCNOKu / s72u6ILSoiCas0Wtv5rugldz + 8ozu2 \ nXL54wfn5hmFyTC4gEsgQcDogC4sIDkmaswAxkkJAyICSkugTp70juLmxqcgMKTqSn086KUWC0mgp \ n0UJjpAIVWC4WuCiJafaV96NDhAklHDrNYS1CgfeB + 92E0on2JHGjJLpA33QYYTF6DosJabCFZrHK \ nWF + fkbNB5gXHVIFa0JwiUzdR5RqXjZgssahB2wEfRpSRmLwkRhhT4tQ3jC4yOEHnC9A1MU6047xa \ ny0qAjExhIFtJqnxuLRNKU9icYRwxtUELjZsmvJ8Qce4qUEIgZJzv1T7hQ0BYkFlCZgqjxeyplgpi \ npOkGhlbhO5iCR0vFNEWiGxkPB9rdHZ9cZPzbf / u / MYqSKRRovUSljLdv3 / BuqumcYex77u5u6feB \ ny + o164sKay3f / / CeTJV8 / ukSsd / yvDux3rwiWyx4cbnkQmYolaFNwVcPJ + 79niITuHjkbbjk5vKC \ nOPakOPP8u9Hx5tWSfKXZ + Y7DOJCY0DYj0WNsoFSR3T7MTKngEMaQvCN6j9YJOX2EwGlBP054ofEk \ n8rIGEkpGgpuQKGSYEMJD9AgV0TIRvEcIQSBS5zneR / KiZLFacdpved5tedo + U + RrAoooFC4lxmki \ nxDCfRkKkH3rcqSHThuHUox4iV8sF51WBEBNDjIxhriK9vLngbLkiPCf2p45pckwxEJKYQ3RCzClW \ n7 / hgcrbffsPz4R2fXL6l6msMGSc5sEs7dlNHciXCZoz0fNjuEASsqlllC4qgwXtGPdANkS9 + / x1 / \ n + bM / 53RyvHv3HpsXSG3YnG1oJ8FxbNh + uKN / uEe8fc1n15dcLRcfw5s9CoVzkVPbsT + euHvc4 + NE \ nygv6IXLb7SmERmU5Wkacd + wPO6qqol4u4CQZfESphJWC3CqWueLNi3OuNgvG4cT9wwd + 9btfE2RG \ nZi + Qw5GF + sOCV3 + Ugf9Vu0UWNa7QHPcnDtsPBHdAJoFNC7I8cBItCYEaB5aLipQExpZ0 / YDzAeIW \ nEzOstRSLJSsp2B6O9JMnxICIkc3mjDZqdIQiy5FVPYc9spw8K7ByrmWzrsMWFa9u / hEPj4 + 8v3sC \ nn / Ak + tHRNC1SjMQYeLx9z + 7xjnqxYnNxwfp8g7YZEUljJMtlRawymqctwQ8kH0jJzylRY0hxduKk \ n4PA + 4FKANJGiAzxISUpznH0II2EcZ03A2jnFZ2CaEogcozyrauZnCzKiNPRO0Ax7BIJ2q5jGRAoC \ nK9dobfHOkVnL + fmGqx8tOLvOGJQhlpd4u + DYBMJJ8f3X37IQNdnSUK1KXlyVrBcRSYeUGqTAB0E / \ nOZzyeAlDkjR9Yoo1KQgyW1GYmaA4yZEoBs7XS0Lb008OESUyGbx3CKkQQmGVxVoFpqDvHWWWM0bF \ nME1ICSUZYRwQYQLvaY89mVYoJFJ7lLQMh8DTfUd3POFFoNgs0UYipCeaEe + 3HJ8 + 8O0PR17 / 5F / Q \ ntBUhrDk0sLq4QZ1f0WxPuO8Hgve4ceT2w3vebn7C0I / ovGZygttdx8sVMBmexhP7viFOz3x + WVJU \ niYXTXOtzmkMkTD13D0 + 43pFGzY9uXlCta2y2JatGMjzFssaZH / P1hyNPjydOxxOlXrNYFFwua3K5 \ n4Zvff4EPDh8dUkmUkqg09zxrNZ + vkhT4NJ9p3vz4c54f7hGuZ3JHrFYYoYiej0G / 2QosJSg0Qxqx \ nPqC1ous7YvTkeU5W5Kw257SnGVTH8URYiBlXkRJKzR / b4AIRcN7R + CMuXMBoGI4ebTymViQjyFcZ \ na1sRuwmz + VOarudpf6RzARcip9MJ5yaMkkglSUqDVrw / PPK0P6LGDVlaUxWK9WZifQa5sEwhABMr \ nq3BtizscsKJkVVyyfdwh4oy / frzb8666QySFkgYlBNrMA78SgvgcmKaB / nnPr24f6F5fky0M5eWS \ nfFUjpokM0LHnT9 + + 4PNX13z17oH3zx2tlx8T + z1CWqSGFN2MSs4zpJTIFNCjozSG0ijOy4xNnXFW \ nGXKTOKsXfPLqz / n5lzlf3jokK7Q5Uln5B83eP07FIS / Zt / f08ZmgRsAg / TWZllxfZZTVDlKFdwGt \ n9Uy9THIGMsmcfpgo6hzrNSEO9Keeoqqo6wLjA0mCspayMmQyJwwjNkmKIkOiCULhpEYImCIfX / Ge \ n1ndcv7ri4uqC97db7nYtQSWWtsYcPCFEtFDzinp3i + 9PHHePqDwjKwvU5QVt14Hz2Fyjg8W7EdcM \ nGGsQ0ZOSBKnQ2s7Y5I8bQkxzujLFRD / 2yBRneiQJqwM2K / BRQPCkOFGuCnITKLMJgcR7QecTxyHQ \ njBNZMNjWkleQtEQmi0Dy9uU5b19fcH5 + QcdI0nN3a4gZXRf5u19 + wXBwhN3AJ392w + WbFYsbi5UD \ nRrRUNmcaPO2pI0yCUmckqZikRjo4TieilyipkVKwXJQfi8Y7pBL0Xcfth1usNPPGoQwxJM7Wa0Rp \ nESLNBeLjxPbhgbb32HKFLpdsNhcUPjCR8FNgbJ7YPn1gUS3QSgIJLVd0XrPbH1G + ZrFeY20BNqHs \ nRK0z5HTN4fff0bSR728fKM1rNtmCb + 8 / cN9sKd5c8vZsQ / v + AQlYq + naE9mi5uz1Kz68u0PaAmEr \ nHkWPX9c8bHtO + wPvHlp + / V1ks17g8oxiUfH5ec7t3S2H4NjuG54e / pYPP5zxr / / lf85qcY4UB + R0 \ nR6YW / MmbC87X53zxmx / 48MM95 + U5Ly8WbC5XbJZnfPXbX + KApCwQ5lCTUoSkkFmBCSNqatHjiFQa \ nBQyeObluDMuzimE34VIguYkAYNPso0chkKQpoYXCu5Fds2NoTzRdR1bWHI4HjFEcD1tUUVJlGckF \ nQvAkN834aeYwo9AC1w6cYsRJz / rMglJo1PwIcCea5kCINTKBG0aaU09RL + YHRZqQSmMzgxlnEqfJ \ nK2yxIAlFbFs4eWojua5rmkpRWkthFVlwHI8nxr4jhEi5qqiKivbpmXHwVGXOF1 / 8DiPnsiHHjDDZ \ n9x2mXnN59Ypx6DgpC33Lu7tHsqPC7J7JFyVaGpZ5hkyRpukJaKK0XFxeoI8D7TAxSM / / T92bNFmW \ nn3laz3868x3dPTzcY8qIyEilUirV1F0DGKzoTRu9YQ8rPgYLdhifpwtrDOimoZqiukoqqVJSSjlF \ nRmaEe / jsdzrTf2Rx09hjwkxWd33X7znnfX + / 5xnHntwY8jxnOanRUuKcoy4MZAKvNDkR4XtMkmAD \ nSSucgiAF1dGStGtRooagWW3vf6fZ + 3sZ + P7uksxBtylZ1Ke0nDE9rvnw1VN6uyXEkZmVJJ8o8wI / \ nRjZdh0kaWWiaacPDJ4e42x1CKnySjGNiCJGDeo4pDL3rkdKSJc / scIYfAt1un34JZPgQQChyqdmE \ nRFJgpCellnld8 / DhlGJe0cqMUWny8ynDbsvt + XtSChRaEccOqx15VjFbTvclpyonr2ZoLei2Gam3 \ n5BLG9Y4wDoxZQDcVIjNEAbEL5HJvqrdCEdX3zV8pIWpAMLqAkBatBcupJM / UXh3XdzSmwMWALgvG \ nTDPJasRqiuwCZW7Z1Ja + KDDiAbWCx68UB4ctUSe6jca4A66uV5xdv2PdWnJtmDYZi5M5h48TsyVM \ nm4ImUxQy8HChuL24476 / 4dGLE4qy4Ouvb7ldge8t0zAyKWs615FiYn2 / IbicuB0wpqB1kS5CVmVk \ nylA4gXGOwW + I0xGxmDEpckqtcZNsbzRLGSZo1u + / pVMduTxG6ymGW2YHU9xQEdVIa + 9I44TVuMFJ \ nS4gD89kSVWX0aYOPHWCpyle8vd5yvn7Pqw8f8erxI / ovP2dqOpxaU5c9L48XzP + TP + CXP / spRkBU \ nks / PzpkfHzJsOyZqyugkhWuo6gm1vMdLQczmvNuueHO9ocoTh4uGcjnj4cGc6D1boXCm53J9xX / 8 \ n6d / yk1ePeXq8QBSeWu8lGbffnPOoVPg8kY1r / vDZT0hxQFrL6bzkq7cdUZZomUjso6PJlDiVITYa \ nNTqmrieEyOvPfkNnpsyWU1x2S2u3eAk + eZQURAU + l0yOD5gsjsCCCQrpA / PFhCwDoWtUPqWqT1nf \ nf8ru / p5JXbAb1hxNT / Ep0G0dwu1VfjF5jEqIGDisIkYo6rJmonN0ktSyxg0Rq + DoyRNW5 + / p2p5J \ nqVBmhpMGWWgybxh9SydG3GrH8eFjJnlBe39LJQHTEvoNNztJM5bEw71Ape97ktRIY4jW0YYe4zcs \ njxZUq5JRjmxtS65hUtVs1zuGEFFZg6lyECXVpKaLd6i5IlYdIjPY3YawbZG7iJxPwEy53fas3cg6 \ nbBmCZ5YXFC6R6wyXZxhtKDPNYV2RC09GYLLYp + fONrd8295Baxk2LU5GZk9OEFlCVBJVa6rS8zSW \ nuPcjfX9D7C5 / p9n7e0np / Hf / w / / 439 / ftrhRMfQJpWuQOTd3O87OrzHZBLvdcn11SwqQ6ZxMG + bT \ n2T7hgkSFgPMJk5VonZOERukc5yOj9RhdUuQlpVKIAMEGlMzI85qAxEeBS4J + 9BA0WV4hpcZ2I3k0 \ nVFlDnk2QOicvaxZlxovnT3j + / Cna7CvR7djjRKC1I8uDBdM8o6k00yZHCUepEvNKc3LQUKpAXQp0 \ nY / BixMaeujIsZiXzaUnVZGD2n8MiVBDEPuKZCepKUleRZx8sePHigKOTEqnWHM3XvHrueXC0oarv \ naYqWPN6h2ytys6afRHpxiA + POJ4 / 4vHDkqra8ejFI3ZBcTf0bG3H2UXL5bUmz54jxAFNMaWpE00z \ nMmtKpqYhi5Zlo5gUgdurrzg5rZktwYVbwmjRXqB1pJk0TJqaqswZdhuG3Qbf9QyDox8jfYzkzZwo \ nNM6lPSMk7B9uEUe7WXP9 / j1j26FS4nC54OjBIdPZjBAtMc + wcUqSNV3YYuopQS9xymBVxpvzRDtC \ niAVtG / a0wUrj5Mj9 + oZu2 + F6z + ryM5y9oxAW6S1KC86uL6HKePkHP2BLz8P5Q / 7 + / / 4P2O0Obz3f \ nnb1HlzVZXhF9RCaIwuJTJCRBAMZxv / ob + xbvxr0Exw + UZcV0tmCz3qCEoCpyhl3H9cUVb787Z3H8 \ nkKsbS9sm1vc7Pv / sN + Qazs6 / oWgURycLVJLMZzO + + / acoR3IUmJY3VPkBi0Ffd8ytgNaCCSCpDQp \ nqygmDSmOVNrhuzuCcyghybUhKyrK + YIHT5 / SzBf71anJaEqoK0NdG4w2GF2yut9yd3uPVgIfHNO6 \ nARfZXN8TB4eKe4bVnjm1v18104bDgyOqqubg8Jj1ZsemG / j27IKv3rzjdrWlmhiaxZzZ4RKdGRJ7 \ nvIlMhiqfkTHleF4xqXKa0vDgaEE / bonJgop4PL0fuet7hJCMY6DrRrxLpKhwNtBuW7puQNWSAUuQ \ nYe + a9Z7Tw2PGdmAYLFrscSGTScE4dGiZvsdHKJK19LuOYRhZbbbIKLEu0HmPlwmU2t9Fot8nAKNE \ nSoF3I0ZLilwxmZUUVUEQAZcieTPBDhaEQpiMzTCim5rtYPdr5tmCZmu5 / ewNxXDPYdXzr / 6r / + af \ nVkrneHmKEIZt60ghgozEPhDwoBrevN1RpjuM0mz6ESH7PSirH5BKkUmJUIpQ13jPXowhMpRU5FIh \ ntUIIiW0thQnEEPGDY9fusHGLMCVR5vQ + MPqADgYhNTpLSAvbcUeQDpsE3mjy6Yygeta9xQjJ45eP \ ncO4B + fuKoAS9twitqLNIXkiUCTR1TvCCnIi0lpNPHjN2PXcJ1uPApnfIqPCtJSOiEWQx0Y6OFDRK \ nSvJM0lSak + OKPLc8PDYYs6MIjllT4HcO / B3bzRXXtx0uzuhuJdoJZrMKwg5jc + Z1wU8 + cBw0Fzx9 \ nvCTEjl / / 5gturGZrllhqJssJMWpyo5nMNPOpIboNdvOaZvaOg / mEB4dTvvjtpxRGMq2W2D6QXMYH \ nDzRqCW3UOD1lFCVvL9fIfkeroG9bVsOAE54 + RHqfyIoJRhUEBELmaFOjabFDR7IBmUVOT44QQiAy \ n6ENHUyvq0OL9jnazZZZ3LCczxKRhCAJZNNi7e + 6GgnbbYbKMi6v3lAeQlQkfe2RKpKQoj0bs + bds \ n39zz3f0d3hQUk5rrL17z9 / / 23zL / y0 + QJvLB0yMu31ywXbdU8yXtNjCZKZztcd6xmBcM3hO1IG + q \ n78MFnnYcyUTg9n7LxO5heR + 8eMU7k9HMl1ycv2O + eEC3uSNGwb / 56y9YTicof4FwIy + ePuHrb76k \ nrgo + / dWv + PCHH7OcaqrmCU9OH9Cuz7Dbjlwaaq3pXE + hNcXiCN / vGLod1gdGO3BcGx49eoQOa37z \ ni3dE0j4KKAQmy1BFTkh7ScxkMWXYtlQKUt8ybi3VZI4kkryjqkru + h1JRtqbDTHumTVaKXyMSARS \ nqO9XRp6zt2dcnF / y6NEj + sGz2rY4YNU5WitYv7 / n7PoddV19fzhWTOolwQpyPcVQ01nHcmFp6oIQ \ nAkYl6knOVXdLVJ6yzIhFxnK + AGmIJAqdI2SA5FCVIfiIt456WbIOkWHT0RhD9JHddsdHrz7k4n7F \ n7W6NsVtsIxHOYkyOtw7vHCEpAhriXmt4d7NCmYJYGpACnUmSi9gwYvuebHFCkWkWdbOX6EwzptMC \ niUdKwfFszrp1 + LqiE4oxRTrvOP / iaxbzCYNPZNLRjeds / CXNNHDp2t9p9v5eBr4iEHwk1wrSSII9 \ nPCjIvQS6rpjOcrLMkCuDEhI7WHbBkeyIRGCUplMFShdEoekHu + erxEDfj7Rdiw2ehewQ0hBQ9DbS \ ne8jrOVGODD6SVzVFJklxxFuPTvuCiwgjKiSM0igLMQt0tieTChcUAMujJb13MOxpkte3O + KdoFlM \ nmcwnCAKqMGSF5u3lOVWZY0xJnhQTqXBjRI8KFSRB7EtiubaYZu9slSIRGbi9u2PaQFweUJUGmRne \ nvlnz9qsVYbSY8imtb9hYgxYVqghsfIcwIy + ePOSouefHH14wbXZ8 + dt3 / Parhk2YcfD4FUksMNXI \ nttsy2hVZmTGdH9JuVmz7gQ9 + KHlyYFku4eb6NYs6R6r9l1BCkamcPHX44Y719Q6n5zQHzzDDlodN \ nwSp5VuNAKhQ2RUoUWSlxcST0FiEKfHLc3m05XBq0VEihCf2IJlJVNZbIerdGZznHWUsmJGe39xwd \ nwcPDBjcOXK9v2G7WyMtzyukfoYsS67agPLG / I5 / nFHpA5xqGwM3mHSrs0D0EM + HRH / 2Iy7 / 7JTWG \ n / mqL2PXM9DVHRxNu3l2S5xV95xiHRBIt2A7fb5HZlLJsGKxFy5zDkyO2t4btdoXdbRhCoLCebttz \ n9vYMJQRKKV69 + pj13R0imzOGgKkbnNZIafHjyGq940 / / 5C / 51Rdfcrvp + Lt / + I5 / 8Z / + Ie / eXDJ + \ nT3WURtCUBhcjUWqa + YwmzbkaHaOwOBmZzme8evmUxcTwzedfkbxHKYOIghAjRki02Q + sXdfSxh2b \ n23uG81sePJxTVw / IcKArDmYTxt5yeXWG0uzjw0LiUiIrC5SWe8aShuB67NBhnEAqzdvvzsnyFVFr \ nHIIRgVeGKCWdTbgQSLFDpZGmEBzODknBE9yWw + NDDg / 21NQoJeM4oAs4PF0SCSACzWTCpGgYfUIG \ nwW7wRC9QKKxzuHGEFBnXHScHcySeaAM6yxi857pdYxY1mo7d7RlKB5IwFOWE6CV2tORFhTk0BDvS \ nbVbY3mNiICmJynOsC2RaMK0mjJ0lhpZFteBomrGoDTL2JGeZzAukSkQ7Yt3A6bziCs / tpmNwliLX \ nZEoS + oHkAh + + mvL2taQfOjz2d5q9v5eB / / C4Zhwd9 + uBh48eUc8OuF21vL + 6pp7OWSwm1A / 3RDuj \ nDSlEyixHxMjV + 0vsaLlrW67Xd / gxkmU1IhnWqxYp9qWmvCiQISL03leK3BdEyjLHR4fJcwKRWZ2z \ nrDPyWY2QgUmR4e83KOfpx5FoYGPvCarAR08KgjGyF5PH / YExescwDPQx0FvH2WqLZ0 / 6nE8KTAqU \ nRvDJySOEhdVuRYyCsfXooPBjxEZPbgqODgrG4YKuHfAhoLSmaQo + fvWYOgs8PpxSlI7nTzvufvCK \ n33x2RxcfIvycXTuwGW / Zbt4xP3zIRz / 6L1nKnkZ8ils6 / uGbgb / 9TOHlc179yY9ofccUw + g9s8M5 \ nFxcbyizQd2ecffM1r54 + 46B5Qu4Mu5vIV59d8pM / + iHIgchAZI3JwPSevICHBw13beT27A22h2en \ nL + jWK4TrqQksihxZFEwXU / JqRtd6wiiwO4 / Hw + AQmSB50IXCjYF8nkNw3N3eMX9whHMbimR48eQB \ nk0WHTj2XF3c0U02RK14 + XnKVFDEZNj4RY8Jur9EPlkyLxM3lOe3lgJGKTGpcN9KnDcXNmjKfkJwm \ nupz7W0eW3nOyPOH58 + dkckI1P + CXX3xJXkpMslQaSInNegXS4NI + ZICWPH76nPPvvsUNPUlaVF6R \ nlRVTKRhGS2kaimZCltdY6zl8qlhOJqzen0OMeJUzPfyQg03Bd7 / 6ir / / 6RW71V + jq0M2A6S83iec \ njGAIA / V8ia5njLf7qv5AgSw1Lz / + mLFd89Nf / Zb1zTlGGZIwTOsJm7sW7yJ + 13EzviUZybSqKPLI \ noig4nDc8OlqyGy0iWWZVQTdtePnyA7579y2WfcpsslxyePKQkAIpepIf9 + gOXSBWjpQSWZYjpaKs \ nKlofeHjyiJhpvvz6G5KfkOWJWVPjx2tcd02xyFC54 + DghKOjGd12wGlFP3i60OGcRWpBkWd0 / Q5l \ nIPq90zgEyE2OsyO77ZahG1BC7JMxbUdRlZweHHK32uyb + EkwGBhTj5gWHDBDaUle1ey2I33v0Wqv \ n3KwmBbmeU56eEkbH7f2K226HRqIzvffWKsHzDx9RZwaZAofTCpX266K + u0f4CWWeYYeRInR8 / Ooj \ n / uM / 3jIox8GkpsxytAA7dNx9c8Hzj0 / 4zz5 + xS8 / XTPqf4KxzL / 8iz / A + cDF5d3eH1VKTk5P + fDl \ nMYPzSKGweaIsC3SecXZ + wfntDSIJ2m1LcJ6hHfa8 + OQZ2g5Fjtaa5ANGKsZ2x2zWoIIiCUESAq0V \ nlu / zx1GSpYiKHcH3eOtIMrH1gipTaC2pjCEoScgMqwHyvMQ7R4weZTTjrqUoCg4OHrHZbjm / vEEh \ nEUkRgkeZnPPbDXHcYQhc3e54VE3RzYRVOyKCIHiF8hGp9jKIJAOmcpRVjnNxb9Lpt3zxm1 + xrCRX \ n33j + 7M8 / 4vSZYZYv + OzXG5KaklcnGL1jffGehx8d8 + d / 9s + QwXOaW + 6 / veN / + 6uf09uH6PITDk8f \ nEbO3vHjZsLrpsa5A6wM2F2uu3rwlkzsen + Y8fx7Jy47eLsiKnPU68Y + / / IZPPnmG1mFvmHJ7AJ2Q \ nBpkp7F3LzdWG1S5weXnP3WbDwcEhxAAInj57TDNdcLftmDQGcsPK72vqvYexCxghIDPs1gPb7bck \ noxAy5 + Linjeba4oYqfNAdn3DfFriXMUkKqrpjMMXp4iNQAZFZjOuru / p7I6xqynykn5oGWyH7CS7 \ ntcV4jfKW7eV7SjPlbvAkCrRv6OOarJwyOy0YW8ft7TXjuCUlifeOBFSZxAePKSq0Kei6DjvYPfq3 \ nmrLa9ngb6dNAF28wmaSZlAQsQSWkNuRFTmZGZvMZu + 2O + 7Vn2yn + / c / eMFpJ75YMO88vPn3P4WlO \ nNXnAceG4u7zAjTtUniPzivutpXv / no1N + LzmxfMP6X2kvbpgbHcUpgRAFRVPnrzgLr / nfrOj70by \ nRYnKFIvaEIaWWV3y6NEREotwI67bYPSCOjM8WC64vniHV2HfRD5c0idLUeZkJuPy7JZu2IF3PPge \ nMTKZTHn85BmLwyNu1lu66Omd48Wzh4Q + py4D08JRl3MeHOYcPZhjoyeiGN050 + kMpQzrTUvX72jK \ nnLvVLUaWHExqlIwUmaLtRoTMGHYdF + fXOOeQQpDnhrosOJ1MGaVkslyAKXn99RseP37M8dNT1rbj \ n7P132N5RVQUPF4doNdC1l + RVDuw7PpKEIlGUOQ / MA5q4pBOBld2QiYxMSOLoUNKzmEyojERFiRRm \ n / 2A2km7X47qOg0WDTo4H04ppkWOyHKUV96sbysaQbOLd9S2L6Y9wuubu / p9gLPPF86e8v7jk4GBJ \ nTJJdO + zRszqhzJSUBLIqsD4QEOiYCDYQUUQMHknUYp + hzfZ + zBACMgmkgNmswo0Dy3nNsjiityOr \ nbkeKnlwK5k3D0eERRZaRGYPRiq0f2TmLC4HLuxXDZrs / wGUKkRlcbCjLcl8KcuO + pSgEfhyQZcE0 \ nz9kVBjEIiBKlMvrBomVBEJ7oBzarjmJneVCU5EbhQtg37HJJVmToSY4qIMVjLq9u8TYgJZAcYNnt \ n1rjU8fzRX + D9PY1R / Od / + QMudzl / 9Tf / J2VT81 / 8 + RHPn9bM8isa / 4Yj3SMfGi7 / vWOSZbz65wc8 \ n + kFFlPds7SVtlPz8Z9 / g7ZKhy1hMFhzMpnz0IuNg7gjynu / ubvnssy95ePyEJ89 / hLWaSmcQO1Lb \ nMdgbXOroh0TvBUlojDEkaajKAqkiXTuyutvQd46DoyMWRw + pygonBXa84 / r2DhclKUJhJPhItxsI \ nMkGWEYxC5QWpOqIbZ7hYoAbBIPq9fxhJpiTZVLPQMLYBpRKjBSsKzq8tBydTzPyI0F6jO4HKKqz2 \ n + P6G / MZw + KTiXhuywwW + SyweP6e3iqFvKbSmbASHhzVuGAhjwg + ByzdvkUZTz + YcPqzwKVJNmv39 \ nppkSrldsx0g3RLrU8 + B4wuxogbcDq90KOwZSlKx / e8PN + QYvSrauZnCK9m6LHxLJeozU + Lbg9nzL \ n5DijmijqcqQbNwQnadea + 02E4FDVlMnJBzTHj7g9 / xrf9hihmR8eIlROb0fuVy3jGGmqOUZFNl3L \ nwcGSUgw8f / WEDx8 / ZDLJkMIxrQPrTWRwkm + 2AhFnAAAgAElEQVS / / IK3F + 8JMpDJHPyI63dEJTF1 \ nRi4SchwoASUgEjg6OKSqSpztubp4iypyKqP3Le15yfxhgbc7VHQYYZlXE / ADRWXQlWE3RFKXs17v \ nuLu7IzcGYsJuN9xv77FVzq7dIvKa5eHp9zMkUdUF1ipEcBgjUApE0 + BJuCQRWUlVT3n75luuL8 + Z \ nnxyibCAWU4Yg + Ydf / BqRFGVZ8 / TpE9bre + 7ub6hmzf5FbDegkqTIcnSmyesKowUmRpqyBjlig + T6 \ nbv + AKosKYRRj9HiVoZqakcBmcLx8 / hGf / uKX2NZSTSt + + MknXNxeMaRAOjriV + 8E78oTQvW7zd7f \ ny8DXOmPSTPDeE2NiOZ0wDI6t88gQ8DFRdgKToE8gO4cY9zn4FCQyKkqdMQRHVdcsphneOjSSMjMc \ nLqYUmaYoDNJqHlQlS9ux6jbkZU5dl1RlgYiBoetwgyGESKZLvABlEiFZbEj0O4soJMlZxtaRkiem \ nQN + + 4 / hwSVVkKBIpeB7Oa8p25L7zbPq9t1IIyRDZW658YAwjFxdniCwnNznNZE4mBCpPkDmQgjI7 \ nRp8s + fqbr1EqMllOqNWWLMI0V5y / fU1TPefm8g3NImN7 + TU / PB05 + WBGLnsmfUdqA63d8WAhcW3g \ nD / / wz3n4yT9jnI54dYts56gupwodanyNdyuWsynHRw1H8wkqBuxa8e5q5LvzW6ydMTjPZvuaH374 \ nhNpoCjzjsGJnO7oEwYLMJsyXDeG + ZbXZ4tzIamWxgyKJik3nGa9W3Gwtu3akawO79YgUOUaXSCER \ nUaDwGKOwITDiGKVkdlRSZwGjHJXJefH8BMmWMEgmdY8RK5xO3DUL2t7ipWRMBZtRM4wFbgujnjLk \ nHbNRMjpLZ0bqPLLMLT / 64WPOL + 8oHjRMFg9A1eyGEbfesJxkZLlkNjWsbIdIoFColBBJMGy2xOUh \ nSM3iaMH1zYokNc1iyWbT0fYrkg40ixmnT0 + xtqOZV1xe3vHmm7dMg + Kq7WmOHzBIyY0dCVKjM7e / \ nebmWPBQwJvxuja4MudwwxBu0qOl2kixNSHlGeXDI4skHdEEwhkRuMhbFAXU1pbfgo2McAkSFEIKy \ nzHnw8IDTR3MMPT9 + 9YyizAm + Q2vFdn3NN19d8fZsy3rdU + UZo + uRYi / y0N7TNDNi17Npt8i + Jw8e \ nFSOTwyl1U2K0pi4N3dCRK4MNPdPS0MzmHJRrVMpRyWDkAq0VfRyRUiOUQeeBzSqQ5Xs8 + dvXb3BD \ nx7jdkdxA2Am8s + gD9f3KNgGRw8M5N1e3jN7jo2fb91y6Bqs1m7s7dusd4 / 2aZVGR + o6iHVnMFtxq \ nxfp2hczBtgOxbfn1Z79ksZhyeDRHZ4qut / SuQ1qBtJ5RsC9keUHyAqJmVGLff1Gaby5uKLLvXcsi \ nkpcFZaWY1ALrEm27o + / 2hbe72y2pvqWNju1q5JvP3zCb / SF1 / hJnpr / b7P3 / Z4T / f / u9PY / crTyT \ n2YRAoOtbiswgqwrbjzhvST7jbrNm5we8HzFGoDNFjIrgJVVR0w0jeVZS5xO8i2RSk0kQBEwm8dEi \ nVML7ACqxWEz2CQUtGd1IIuEEtNbiASEy7m / WtKuWbutwEZzQpFEgQiSEACS03kuL71Y7fFNSlhVl \ nU1HXE + rBka87 / PsbUjtATKTkMUrivMAx0q5HhDYczg / J8iVGJJSKmFyhM8l8WpAXp7gRzs / e4mIL \ nhefRwzmnS2g3d3z5ecNR85Q8Sh5PDS + f5bRW8Ob1G9TMUJWCSi / pQ8ODHy + ofqSx4QA3JPpx4K7L \ n + Z / + 9V / Tbm9xsef49IDFUnH8UDNtSrpNy / XZmrfn92AmeGeZeEU7rFndX3LzrOHV0wmVGZBEGlUT \ nM0khoMkUIo5IoVkeLFltt9wFSUo5Oxu5Hz3t + 8s9uDQplNrD8vAJrQSdd7TDiDGKZjYBEqU2SB9Q \ nSXEwM0wrz1EjIAhUMSUIi3MRF1vOvg28ft1zfTWydR2mnlCVh8QQiMmRVx / w5I9vuPrbN6SVxY4F \ n12JHObMsdUF5OGFuMpyEXdey26xRqeTk4RHerrC9 + 169WZCiIaaEHQf63Ya8nrCcTVmvO7bSkk1q \ nZtOG8axjtGuGXU + OocgnTE8P8Kni8zeXbLuevC4ozZQoNaPdMcaOYDtEtEgZGIUkJtisW9bWo4Il \ nz6YYVbAbI1InYtWwPDyiMhnXF9ekzqHJKaqMwQU23UiMnqgkKUuYDLJKcrhoqPO9nQ2f2G0Hzs / P \ n2KxXXF3ccX83smsTWuc4N + 5ZQOxR3zmguh4ZA6HrmZgckxd42zPGSOcD2feFxd46cpGYTUvqJqeq \ nMybTklypfUFSaXwMxCRxUtN7QecU17c3XJxf0G + 2qATb9QpBREpIMWK0oe9aNvdXlOWCJisZg92z \ n6g3IqiSSeN9tqWc1Ta1QNrHLLXHs + fijVzx69IjtMOLvE65PWLsDrYgk + sETLm9hHFksJ + Ra4pSi \ n9x479Dgh8dIwmVbowjAqSVSCtu2ZT6aMImfoHTE6EJCNgbaHq + sOFWCWVey8grAH21199Y5sWuLv \ nI / Eq8fb1Zxw + PEEW5e80e38vA / + bK8m2yxlvtwThCMkyqXMmucaIfWLg7GZg0w6ILCBKTa0FZVkj \ nosYNkOuSutFErwjOItgjkh0CowQ2BbJMEVVAikj0kehBSM1q2yKynGo64f3qkrLIadcDdt1zdXG / \ nxxEgEGbfZhzGnrwoQSpSiEQkUms2nWM33vPu + oo8Uxw8mtM0DUVd8OFHp1RZwZsvXtM8PuTm8oqb \ n6x2oGp0CRVaBT7x + 85qyVBw9mPJi + ZjptCDP9yWwT54vUN13XJ2 / 4dHJkhdPjnHtms3o + fTu1 / zX \ nf / HfMl6f8ZPnL / Gy4 / / 4D78guhtmBwU / fDpnGhreRYvLr5hMa3YXLc + KZ / zi3Yr / + d / 9De / XLQ + m \ nB7w4fcbh4YTJtKBpKra7He + uLrlfb1n7ASkDIXqC1eQ + kBnDF6 / PGdqaD58 + IE + JXFjqumDVrvfQ \ nrsJztDhE11O + eXeGC1vsxuJ6xRhzHIqQLDJ6KiOosopoBSlBkoooNRjFznnKQjNvcqrSkGdHHB7P \ nOFpqYtihTY1PBqcP + emvf0PK4NO / uSRGg2kKilzhlWTsbsh8Q + oyamWQrwTm54qly7i1invTcNZd \ n8OM / + TG3MWemR3ppeX / / lhQj7y93hDGQmZwwJsZhRE0ziAbb9xACm5tbmsFxe / YW24 / oXKGVQBuY \ ndg3tzY7Pf / s187Lm5Ycv + fLNa756e047ZOSlwgE311fkpuJRVeOV4GJzD2hiCAyNxIocT0XrEpVs \ nKGuFySSZ2DFESb48QuYZ7vYevdmS + oDIFEFnuDDso5dTQVVXTGcHTJolmVGk1JMrSZFHdJHY3kuu \ nrkauryybraYfElFJEHvEiQ + OlEuMUqgYiJsdIgZk8HTeQl1hs4KU4H6w1LJEqgo9Lem8RdqBidDk \ nOuD1nJgcQxjIhcXkGevtgDAFLhW8eX / LetUTpEQXJVhLM5vR7jagJfVsymRS048dlTGcPliy2Y64 \ nbcfR8Zz16Pex4AQyeUy3YtkUnDzIeXO / hyvqiWITR2KekSXHbrXDB0EUBcE5pNzv4ekiyTgOTxbk \ ns4wLuyFlhuAiNkAfPD7XDOOWpmhImWHdD6iyJtkRkwwqBYrvXcyj9VhruR07HGkfIfcjKUTGfsuQ \ nPNumI5Y3rOJ3ZC7 + TrP39zLwL7dvMFlODI7t / RY3ejqdcacLJpOGqpqzuv4aXUjmzQKZs0 / IRPX / \ nHmfHzuGVwrtEcBHC3uZT5gYhEsE7hNrb3o3S + / / 5iDIKrXJ23cC7i2tW6zU + JFIAQ8YwjJRZyeg9 \ n0TuKKmc2O8A7gR0dnXd74YYUjH6gNAadZQSRWG161pue4DxVloGPzKqKdrdhNqkpTcbY7Umfm26L \ ntfsW8PJhzfK4RiwUOxGxY8XxZOCTFxv + + LnhH39 + x87e8PX1yNdvFd + + Fzz9 + F / w1e07 / vQHCevf \ n8b / 863 + H7xU / enHKiynM84Kff / uagSt + + OBfsXkn6cLn / Pyb / 4t / 879uifGIjx4t + fDRKc1sQtM0 \ nSKWwQ0CHgoIZR9WcFFfcd2uCjwzBgw5scTw + qrDW8uab15Ai29WOVy9fcnJygneej169ZNNZ7jcD \ n0 / yAo9pSiBHtPN9dXpEVNSo3hAAiRpKQaLNfMQhtSFIg1X7vqqRkHC15plgeCPIsIMMRJh3ihivK \ npUfojtGPIB + j856kbgn5jDj + cJ / 5n77DRBCdg / ALuje / xvEBq / gFM / Ut27biF1 + 1 / Mu / 0JTtBp9b \ nPv / 8jEJJpFa048jV1Tsenzwlzwr84Eguke + j3iSfSMkyxo6bd5fEosLkJYVU3L + 5InlHUU / ZGc / f \ nvfualfIcVHMq7ylC4t52FGVDt1qT54HCJsZ2wCFRQuOTp8kbjMzw0iAlSLcFIjFBSBIf9jAvF1Zk \ nNKRCkpc1SiooFBkFmXYIsUNLTfINfdcg65qmseSTFlPfEYr3FNXHDDbSjQ5UhjB72iaI781sIJTY \ nN1pVRhQD49gjpEQqw2AtptgXIrXKyLKCLK + wdqS1I0IpOq + JO8 / rL84ItqfO4cOXT9HJEKViHDW / \ n / uor2sGRYobOGpzvSGj6MTA / fcZyuSCJxDAMnJycopXm / O4OHzWiKBmsY9V29CFQ1CUp9rjec9ft \ nSHnG49OXRKlZ9YGtDmS5xCsoJwUlEpHg9mpLCp4 + BhKGIQVkU3B49BBVlFzc3NPdbYmjYLc2pE3C \ np4Apiz3xNUBpchpjKLKChEPInCKLCLtDiICzI3HsIUVkcHjvSQSiNEhZgk6MaU0b / gk6bc827wlj \ noJE1JTmlmWKtYLPz3KxaVO6orKeYzDBZTZIJETx2CAwBpBe0u0gvLTGAQGM0SK2JEpKSJCHY2Z5x \ nFPhxh5YK7yMu7PZM7hC422wY7IjIC4ZdT1NIkgAfHEokciOZTUqWB0sG69msd9 / jiyU2BLTIELkh \ nyoSUkDczkvfUpcD3PWVmkMBiOsFISXGUc3Oz5t3ZOc2sRmQFUQq2XaR9t2WMBfNZw3eff4E6LTl8 \ nlJhMNM8ePOF / / 4ff8vM3nzNWP2F + 9EfUYkqRf8v99ox + NdClipef / ARRe87aDT / 7YuALfkzdw + 3P \ nJH245qvbHV + d / YAb + Yh60XN0tKJIPbHz1PMpo0902xEXNEbWJCEgdJD2UVdIe3xxpSF5xtGijUVI \ nyemzDzh99oymKCiMIQWHTpZSOp4fL / jTT065vLrh62 + 3PD4VvD6 / YTvu7yRZVmNMDiHuvQQpEKNE \ naIPJMoyBstBUdUEYRzp6qtSiswzv4f4 + 8Df / + I9sQkPSO2bH95jsCZQfcjcKkpoQ7Ydk6rfMjj7D \ n3n / DxB3xyZ8c89fXX5J1gml5x8Vl4ld / fck / / 4lHz15xd1hhR0fw8PzRC87fXnF / e70vBWUFBIXx \ nipQ0MUEKCj8G7u9WzE8q3DCg8pwJBSFYdsJBWdGLkXf3Vxw0Uw6bkqEd2BpFiIEgFMVkhlIldTah \ naqbsNncUWY5AMI6BPniqukDGSD9aut4RktwjmrN8X / 5SlumyJlMSu93RWUsZFacHD5DmAdVkRkRh \ nw4ad3SGjYlE1yOKAr9685frbX9EOHvTewaDynOA8PuxfmrKypJ4WGATjbkdIkqyoycucqOB + uyUK \ nxayZM53NUaZk2w7s + p6UAr3zrNoBb3v6MVHlihg1Z9cWk3l2dmBtLbf3PaooSFKBUJTLQxZNQ3Ce \ ncei4aVuss6DAblucC2zWW0xW4ZKidwGR5RxOD9B5Rrt6jyGSx4JJMUObHKsMyWTcORiHHSflhJev \ nPuDu8hzXtTz70Qestzu2u4HBBvoE7y / vuV1tWT5Y8OBhRdUkfBCEIHE20ltH249EERAoxk1PZwxN \ nkWG0oOsHJkWiEPtghhKQaUWmDD4IvE14HzGhJLcTBtdgmBP0P8GUzs3OU0ZNGEdcTBw0DTLtBX9O \ nQO89mdZ0ISHHSFZkBJXRpZG + cxA8MWm89 / s3RCH2Rh + RcOOATSCkY7tZk0KGdwFnHYp9UWR0HrQh \ nBkVuGrzSNNMCHcFZDyJS5fvCVAqW7eqGsmqoS0NKJaOPJAeqNKAFoxtQSmH9vjFrTIaJiVJJTo4O \ nyRSkGGj7lo2 + RC0tQSScFcRB0bUjdT2lFeCu7vjouESNkk / / YUWmE118gqwecvKBwOYPqYsJtL / h \ nN5 / + HetjxXdvFW14zNt390TdUuYlzYNHDIWA + 9dM0pdUVQP9c + 7vJaL8Nc + e1UyRdNcDSSfqbuB2 \ n2 + GjZrNraQePc4l26HAuIoVACQBJioIXz19xcqAxqcXonMX8ABFG6lySKc + 2u2VY33ByeMDh0YSY \ nLL6StMsa6x3vDQwWghA0zYRM1rhxwAeP85GEQCLxAZQWmKIgy3MUc0otyMoBoTYkr / j5Ty84e18R \ nG0OqrlF + AG0gwihWKB1QUbAse2ZyjRt7uvCSP / hjC8NLfvZXW2R2ycxnfPtTOJr8ij / 76GOeHi / I \ n84KirNnuLE8fPeLdd9d888UZ + IwUJSE6ksr3 / gS5xxlsNzuYbEmZIUVLFz1kGaXZy0Gs25G2A1 / + \ n + jfkHgQObTRCZCwWJxwcP6FtA0YZbLtjtANjtyMODhsiPrEnqoaA0JKirFHJYEVOgUKZHFUUFIWG \ n2NO3a9LoKPSMiCY2p9xcb9iFK5ql4MFsjqob3t9E + i3cXFUw3OB9IiZNQOAiRJWRlYaiKlDGIKXF \ n9gNCaoQKSBJdP + 5BZFKyODji9OAhIUm2g6XrLdaDUBpvA3F0CDJI + 0iu70bi7ZqAIypovft / qHuP \ nHtvS9Drz + fw2x4W5cW3ecll0EkS1KPWAQI / 6Z / eMgtBOUqtIUSxmFivNzWvCHrftZ3uwo / kDugYF \ nBhCIQQwCB3H2e16z1nrQ9eICLmFGNw1NbYhpMVYKKcgyc5rOy0ShFSmDEAoVEz4FthfX1Ks1SytR \ naI2iMRYbBOezp24qZivJdcOcE + vLLU0UOCLbr16g88XSxLUX9EGxHxJDP9GQEWomFk8JEaUXHq3E \ nIKRcpMROoZWhJChuMYvG5ClpiWEYQkFYjbIL5MeKDCWigkcoTZpGEmcye4TIyCIQ0vxBtfePUvDH \ nocXoChEjsUi6YUZXBmkL21VFnwPTZChCoaTmOAZSEWjTMIiBkBNGG2yukQqUWrT2yMTkI + fDHh8n \ ntBZkn3DGUrmWFDLtasNaKk7dgKlaUi6MYlkrxKGnXdW8eXENZKrKIpXkcDgggKauUaZiDBGmiafT \ nET8FjDOLEQSolGJ / PrGtK379p3 + OLJGUAvOc + OHTB / ZaEFEYoJTAbuVwQtGayP / 0i5eMx1temZG7 \ nXrCfK1YXP + O + PxFd5Pz4PcPTRw7iR35KP1LSJ / 7z3zvWm79CrF8g1idmueery / co1fLn + iOv3 / 9H \ n / uKm8OnbP6XrFT / / DwPXXz9RDo7D7Xs + 70bGGPmnuwNzKfg8M6eAsJIgIklFDA5RlonnzesX / OL1 \ nlsvLNXUVaHWN1YrQj + S5w5ceo2ZEGXj70vHmrUWZE95vefXyHf / 43Td8 / HSPsw1vL14hbcM0CIYu \ nE4FAIQlJLgqRFIlMkYIkFIehRxnJq + srlJqoa8v3331ingR1dUFXItPcI4Zf4HNH4VuUeo0WB + r6 \ nG17uLKvhFbP9yIMc2aoP / OpN5G / aHSUfedudSK7i2 + 8L / 34fEXNGaUPyE3VlmEPP67cveLjbMx4z \ nVxevmOczt7e3pLTsxROgneEwDzjTYI2m + fkV4 + nACoP2IwT7nPk0MlqFvmyxMxRpqNs1SIOuLCAQ \ nVuNzIi + BUGhtMFWN0FDZCqcKTdMgs6MkTVsAqRei2XBm6u9I3QGna5gD5 / 5IN3uyHHnzywtevb9A \ naEE3Cn787o5av6aEG4zYLxHJ80RI4jlWALyPeGbWW0OZZ6ySCK3JwhO8Z5wnipa8ef + W9cUOKTSH \ n04nH4xlfQLqKnCHmQokFKSVaJ1AC6TRRJoTRzGFEOUnMEaM0OgWuV4bKSsgFs3J0Q8 / YHxiGE7kU \ nem / QxmGMRFWOm93l4p2JCZUzh6cnzHziGAQma + KUKZ1n / eoGJ2G3alAyo0qE5FEsP / 08k7MhZZBK \ nUa1WCxxISKROpBzwz6avkhJ14yhToF5JUkxYU5NSIcWElBJKRMpIUoYeTa2Xrj8kj6KQmJi85 + Qj \ noutpoqeSGaULrlJ / UO39oxT8lb4meI8WlqIEXhZCXjilzUoTh5lJGs5zpHs8MvuA1BZjAvMUUEUh \ ntaSuqmfQeVq6 / RiZYmYuglQMOUmqaokFTgiE0mhtkErjqsIUPTFEfInURvPmzUteXGyprWGexgUn \ naDTbqyuGLqDV8nenbuR06kg5U0RZ8ty1RApPW6 + 5vNqyaxqm / oSrHN3QEUri5t1bbv9pIPozw / jI \ n2 + uGX72 / 4P3LDRsnePd6QoQGm94w6hP25y + 4TYkf9j + wWjWIaob9icM08sV2rHjNhXkDYcuagElP \ nfP3W8PObiQs98bNW8 + 76a55 + q / j07TVfvS68 / svC7WHNTx92 / MPvHjlUM3a1JlsH1iIFbKzh8e6e \ nfXcgloJRBiUVbe24vHwBJfP0cKK5qSiTpz880ljDxbbCqBolYHex491XL + nGM9Jour7ipztPn1ou \ nXm1hSpzmiTQG / FQ4nkYimQwU4RC6pvMZaxW79Y67w54cBsbqA09PmpW9ZFPtOHUTpppRZcTJFVK9 \ nJtYN0pyJuUOrey5dpNFnrqsVdZGcleXFu0c + ffMDr979KfKlJDz + a9RwZMjfMt79jHjW5OQZ08Tu \ nZsWQAglBLp4kA6a2CBWJzqG3W2QGXdUUkZn7Mwv4LrOqDGfrcVng7w7k08iFcwyTYEwSmobZOepp \ nJGbBp09fqLrC7uoVWgpCmlEmk2PEVYW6MkwiIbXAWUUKM4fTsqM27Qu2raPrOrIfmOc9YbpnZy2N \ nNvT7gThJrv4VvHz1nvX2LY9PnsenkZRg1X6Fs4IYJqq5oRsmjFIUJCEu2FVX1bjWURAYKZdGKcyE \ nacTP05LL7yy1s1TW8HR34NCdCHEJCzNGUkohp4RSiqauqdtMXTuEKiijSDKTbCGVRAyBIgIvNi27 \ ntqJxFV3X8eX + ls / 3txz7HmH0AtJZbUAIEILNxQ5bOeI04ceZzz99ZNPUMHtKUYwFVFWjmxrbWtoK \ nYukpQ6CmwshCDpEYErkYYl6iy1XJC21PgLOWWDxK1wuTQgi0Fdy8eIFSmX58IIQEYrlVpbTUqXGe \ nCSU + Tx2akjO1slhTEcPEkDyf7u6wVnOWgtQ0y9QgymJK / AO + / igF / 2qzxk / jIqOKHgsYJbFB0n + + \ nX9xsckMpEKbA6AM + DVAElXUoKUjzSEQhpURIwThPzH5axj8k2jQYY1EioITCGkvrWkoUDOOInz35 \ nWc51VdVUVtPWFdPYE2eJj4GQMlIblLY87ntO3R25COYYmXOgagzGOrSV1G3N2gZqrXCmEKYzg9LE \ n4pmLx5dMFNBMnhhntBa8u2x5dVXx61 + 9xMiAyAPtZsN5uib3lo8PT / x0uKepMy8uak63hTkvYPeX \ n7WvarEmne6y4483qmr / 6N7 / k568EW / NAVf8jXnfcxV / znz6OuK8Tf / Y / H / jp9sTffveeH / dn + vUZ \ nmSrqTcXm + hVjFBzOI6dDx3gGFdconRACjFJ0Xcc333zLu8sVl798g9ErVIQXr97Q1JqSI1ILmrZl \ nKoW / + X / uuX79FlM1 / J / / 9zcczpqHo6KPhm4WfHo4MvRnjHQQFVkr8nP4nRKGMXqwmi / 7E + PwRG0z \ nYfqCy4arumWQA8ZI3n / 9mos08 + Ugyeod + fWReXiHFoXV6keqMnNT / Vua8h1z / Hu + ev + W8OH / 4vsf \ nGkolefvmktvTe4b4gSn9I / F2x3cfbmG94fr1Nc6t2R / vWV3s6MeEcpJu6LHRMgdDyuJ51z9ijMIK \ nzTRPhNwRlEAZz3DqKVNAaU2uHMoY9FyR0UznRB3AVgbX7KjWO7TWnE6PHB8 / I8OJyiYaJejDiard \ nst6sEHFiOAzEJJi9IBvBl7hfUu2nAVUS764vsTbx6dM90TS8 + fOvefN1Ypo1Hz6dmcY11tzgc4dU \ nAzE9Is0AY2IeekIUxKJIMYN1WKupKksIAWcVw3lgPJ8pYYYUcNawWa / YbVf0w5nD8cQwTwitFlrX \ nfEIqg9GaxmqayuCcom1rYskM07iAfwSkktGmxlUVjTLcPxw4H0 / 88OMHJh / QlUXYhiQAqZebiTHs \ ndjustXz + + BMyZZgCrZKIaUSFQraKZAylrah2K0wNaxfZ1gqTBHnvmaZI102ErFCuJZeCSAmdIqJk \ nppLxSeNcuzzjIS / dt0jcd3dokXBATglQUOSyGlUaZWpSnBj9wrKmckgkvkSMzFgVeP / umvuHW + q2 \ nJ1QBXzTeG4ZU / UG1949S8Is / sFrV1KsVj / s953lGz5o6SeIQF8iICtRNs + xFyQudKkVqIZGAEWBc \ nxeQnwhzw3pOfu3hY3J4hKW5erFBCYISmsTWH / Yl5nkhpQeVpJ1Esu / 9JBtqmIouEcYYcMv0YSCUi \ ndYOQkRQTrnI4XVBGom3BVhrXGNa24KTAlIgsIIikLMlS0I8T8zxwo77l8mbL26 / e0o8d / / Tbv6e2 \ nlq9 / 9WeMPvD7uyMfwp5hr + gftgyfZxAz3 / zujqEoquvXhG7Pu / 0XrOz49Z8a3v / JipfvdlxcfMV4 \ nfKJpBJYfcbPkXN7w7 / 7XFdH + IyIk5PAOkQSTGpAtvNmsMbWi7088nSIpOPrHzPSkmE8C10qS6ZiL \ nwAnFNM4cjzAMM35qCcNMtU6UuiIjqNSGfqj5 / sMjsbzjNr5g8ILffWnY74887COdl4QSiRlGn6ll \ nZFVVTEKSxIJ9iVmCrphi5jx0GCUQqWDzjpvrCzatQsYOqxpq85IiJevmhJcnOiZk7RFjgVOFU5Z3 \ nN1v2dwERLHl15I3yDF / 9Gf / 1u8wmXSUXGhwAACAASURBVBJaw1lfkscDlf9b / sv / cNy8 + hOa9Quo \ nJkIsJArH / oC0gE48Hu / YtD + jUo6YEwpJU9UobWlKJvoOcRqwaY / 3M7JeUZzlaCUpKJxrCOcZdeop \ nNtPYJarYS8XpdGKaJ6yVCAoljUyzR9mK3UVD3TrmLgCQESjjmH0mVBEdMzYHXm8b2jZz7O4YCKxe \ nXSBeXnB3F5nmzDRHSulwIiB0wMeOOB3pu0fWvjAOniIt0ixGRVXVCAXTMJJKwvf3 + H4gTzMOiTWa \ n6xdXy9H2 / p7z2DNNgIDyfJxs6gohWNQoeGSSpJA4H88IY0lZ4SdBtWqWZNOcCUPmv / 34Ow77AyUL \ nCgZZNXixGMuykhhlMTkjAT / P3N1 + XrL5p4mVcUtM9TSjiyBJQ3tzzfrNK9abhlYndsIjTo9M + z2l \ nd / is0bIB15KFQxuJLDM6DkzRE3LEB03KEiE0ym4ZfIepElInRC5MXSGmsuztpSamAhoyCilrGhcg \ ndhBnUikoEkVmyPOyVpr31FNg / SSYJEwCsvsX2OGHGaa5o2ob6nqFEIYwzqSQcbpZkG1aobXBGYuK \ nGaOX1LtUEgKJKpqUFcOYF5YtS66OSAUp82JWURKrL5immcfjnhT3pJgXyr21pFzQpaBSxNgFdRYT \ naGuRWqMLOKNIqWCtxuwuOHRnQlryfkTJGLkcgZzUXDeeMAXWTYtTjt32iiIln27vGQJs1zu + + ndv \ n + Xx3z93hM + c + cOwyv / 2nB5I4cDpP / HR3R7dqyIPm8aczeEVKCp8dXmYoYEtmJfZ8 / estf / kfKlR1 \ nz0X7mi / ffo90DVdva45j4UZeMXMi6xFfGsbza1bVC0r8B1zeMATB56Onv70l5RWVu + T4uCcPI40O \ n / PKXW4rIfL73 + OCpKokm4hwUOTGnI0V07LPmYTQ09QWHu4kfvvuJmCqEVNze / S3D4FGlcO5GHo8T \ nAYWwCmMN1m1QCFJZjCpZCsh5scNLi1F64SCYhhTOrKs1Vzev2G00shRqd8VjLxmiYEiCIZw4jzVa \ nTpThzMq9YL1SnI6 / J0wDhhvO + w / ctJfcuA3msyclR7WqyNUbkoxIOfN4N6D1gWGcqeQK1zZLhzr0 \ ntHWD2lbc + SOIRN1aCpnKNmil8NOItA1WaaYwUQfJyu6ItmYommFMpCjYmAqKxKDRpkKbRWAwlpGQ \ nEtEPlOmECz1OzBgNm4stSlb0 + 8w8OvphzTwmikgINdGsNG1tWes1jU7c3v / IHDPrzUtW22sm70lx \ nxzj1y40rjajQI8q4GI3yDCkzhADOUDVbqnbLEJY9u48Tk + 8QZGJ3RAlJvWqotKWtW7aXVzztD3y5 \ nPSCVINgGYwwxLYdppStyWgxIQguEFDwcevpxwjUt6 + 0lUq2I0XDqTpz7M4fDHj0Pizz0 + abhUyQJ \ ngXYWrRUxRXJYmNAxTFij2dQ1ZlVzs73k + PCEchXCWMzVlubl1aKwIzCeRkScKZ0Hr0FHhFI0laCo \ ngnOaEgR5rulyJM4jisIwz3T9whd2dQVS0OwuaNaK89OeqZvwKRISz + ubTCEjckSIjBUTupyYB481 \ nBpEDSgbSPDKNI1oYmNeE2DLLxGAEXv8LLPjj80EWAUiBUxahMtkv / 0QhFLMsaNLC + jQSIwQC8Fki \ njCNmmKZntqtryCVD9pQ4otJM48AqwZef7ilSMs3pnzFu2i664to6amdoDEhjEM6A0oQC05hIPiAT \ nGASUjBDg5ILvSyKjpEDnTOx6cp9JjFSm4nKzRuuK2c / 4KbP / suf4dCC2Fb + RBw7nyDieELpls37D \ nKTV8f3egP59BaMop8unTT0QkQZbFeUhAAdoXBBXNn / wl / Nxyb064MHH / 9x85f4n82V / + JZOHXL3h \ ndtagHhH5Df3wgi5d8h / / 7nd883Hi3AtOwRMbQ2W3NPaSYRRY5Wg2kW0V0fkjP3z3QFO / 5 + b6glgC \ nu13N11 + / 4XJnmMsZ2zT4as2tN0yHmX / 65iPnw4RMHSLdM3Zngp8ReUWYFQWo2wpVWaRckkxFDIvh \ nRAhikcgi0IDKmZVr2LSW2hacvqTegawM52AZp8j4eGROmQQcx56QIik2lKDQUXDzZuTkD0zdHTub \ nqZUijJcM8jNr98RXr1p + / Dgzo1kZTVrv6OJInk903Zlm3WLaiiQKp + MR30 / s2hdUUqPcBX7wlJzZ \ n1UtM8vk0ABVIEKIwno5oUWg2G8KcmPqRWMDopanAOsylodKFohwhZUIppDAzdUfqHKiEoJYat7ok \ nhZrzfaKfa4poEOYKJz0yD + y2Nds24ecRGQunfuQ0gKtfUK + uSLEmRUGSAWUN67YhjAJZJmSWCKPp \ nugNGRezFJcatcOsLlGnp9wfm6UxKE04ngh / QdbVkSrmahOZUJPefH8ihYM2OmKG5uSD4QOhGYiiL \ nZyAuip5cAtPsGZQiCIfIBp8N0zQzTh391CMkFDTOViQJoUAyChaBHMYIRAmkOCOlI6XAurZcbje0 \ nzlEbixGa1XqLto5xu2XSiSASZgpLjMcMc6qZokSYwrrqqGpNZQRaBvrjZ6xcMSWFRtDWK07jAVkK \ nQkmKkIx + CVT89OmA0QU / 9DSmISlNUpmUE6VkRE6o4hE5EFIPOoIwlGLxz / xrpzSgKVETiES1Z5KZ \ nqArLDPP / / + uPUvB3m5ZQEiFOpBRpVi3WVvjRk + bI5BOyFBQQQsAqgdGLA1fkRfq2sGDNQqjJmVCW \ nwqFIbNoKQ + B4eMQ0LxFS4qzFZ0FKCa0lYfbUmwYhYIoZawQaRX5WDogsloS7IlBCktRyXa9qx + Tn \ nBQatQauMURIlEpvNC1arDTEbupNH25YpZez6BTY49n3H02jwQWLcCmNrTsFyepzYd3sqrWhqjRaK \ nVzfvuH14JJdMkQkhFDH6BThdv6KvXvL7 / S0 / Ps2Y0XCVFL9 + ueF6Y4hDTc9Lzl6B2iH0Sx7Ojv / 9 \ nP3 / H9588TydLSJqi3KIsciskmc2qwTSStXR8 + N1 / R + UeZRvkagl6ElJy8 / NfMmT46TFR2xWb1jEM \ ngu9 / + IF / / IdvsbKlP45oJDkErJKQDN3sQVU0mw3txRZlLSknovcEJpAFiUSioGhSNvisGLXFhoYs \ nMtI6RJkYhkjJkXEc2R9OhFwWRGSKJFFIuqbkyHVTk7WhO4 / sRKRuFaeHDzjl + eXbV3z / BC / XLdcX \ nkruQ8fNA4kSmoyRBGN8ydzN2DExEzqeRGAtaa8Y5Yo2i2q64vb2jaSy5FFxdsdoYhBDE6KnaitZP \ nDHNkmI / 4WGg2O + q6oa0rwjPZC + UISjPNM1OYIUd2TUslLU5EaguP / pJxSKAaqs0VyjhCHNHCo5Wh \ naS11f8fQPdLHhBCSdnuBXV / idcOYFUJX / OzFClEK5MSxj8TkkTlBSZTCwo1trlC2Alkx + 0QMkWEY \ nIXuyTJCh1BuK0gRpmWZPSgVlGlRtGYtks92QxUQIYTHUASFGRCkICTlnYgwEpxDaEFPm / u7 + WYQR \ nQASkkDRWYXAoAZK88HKLQCkBIZLCjIiZurVcX12wWdVcrFfU1hDHQPSJ68s16 + 0ln6sVD4cH4hCp \ nlCHPESUNCIFoDFJljJjYrncYo5gHz3p3xU8 / PJBDRcqGx65 / dh0XRIZcYJ5marlMaFpKqrpB5IJS \ nGoqiFIHShhwESoOVFbE4vEggMillRCUoWaAcuFyQg + fIxElFUs4kCsX / C1TpvH51QyGTVSHJgqsq \ nQCCLJsfCNCyGnhJmpvOZ8vwQKG3Z7rbU2wWRd + yXh34ce0QJWL0U + k2taWtFCTd8fx8YpomQMyVm \ ntNIIBMYozHM + fuc9Vlu0cYAgx0wpLCqcVMiA1BJjDSTBHDyK5UOpVpLdtmXT1OwuVoRQmEMh4fCz \ nYd9NHAfFyVuees2QXhByRnm9RPgqTWUUUrdoZ0kFbBaMs0dmQ44BpCKmGaVrVuuGer3jd4cIYkbM \ nhffte15eS65 / 4Qj6A237knN3QbBXjLPj9lPh42dPN74ly4kkzxQFTaOpVhZBwQKVATEn7r7cc9rP \ nNLqC2pG0Rrdb6nbD9x + PpCSpbUOJy6FyCCP7ruf0ZKhUwakNU9dR2xqLwjWGi5tLmotrkIX98UgK \ nmSLlgqY0KwSgkkChsVWDMS0STUnghSTExHDKVNLgrENS6GNkSopUIqFkPFCEpCuJVeOQlWTfn3Hd \ nyPVOcX76zKvLiotVze03X1hvfsnr9uc0 + TPzMCKKJoUKkVt0DsTR8 + HHj / z1v / 4TNDMhgFxbqqrl \ n3D1RSKQMhcjDwx1NPdHUK / TzOlLrCoSjiSu + fP896IqLm2vWFxdIpcgxEKeJaZ6IckOZw1KASqYy \ nkrpqyckTSRxC4nNvsaZmtdpSrTe4yhCDIqUzKY10qUOcD4t5sBRevX2Lx3COcoldWF + w2l7i5AMh \ nRKwzXF2tn8PXDox9QusWIQWTkBQfEL4nxIgPEyV7ZEn4qWe7bjkUiY8FqRJRSLCWMRWuLy + pqobT \ nuUNN43OTpVFCkGKELJEShFhiAmLMSLX4JoQQSLHEoxhjgYgyBgTEkpBkwujJ0SOzws8TMhe27YpV \ n06IyTOce6oZ + 6JBINJbaNYgi6Y + R6RSpRMY6zaVqWNuKkx9JJZLIJJ / 49OETSIV1DUN / 5DQm + t5T \ nkgOpySUvlDypUEKhK00IM0ooYkjEEjHqGTWJBARhjmgpEdoRUiQUQyoWWTwieopSSNdyTBNWV7S1 \ noe41whdIgew9KYY / qPb + UQq + yIksMlVVkQQLiDyzdAjKUrcVkiNz8NR1jXIVp1OHTwViIs2BOU3M \ ns0QqSeUMqggqlXFKYoiEYUSWjLOOXMDJxRgFoCRLWqefyClg6poiJePsKSFBghIyJSQkYoGnGMgp \ nk3NmVVdImXBasGk1F01DXRnGaUnRQ1rOY2SYZ + 6fzhzOS4c3z5rMCiUFJSaU0khRqGxNbRuMEIRx \ nZC6S86EjxgJFofQil7SVQRpHP44E0ZPFSLu6xu2uuf66pnr / yGw7Pj30PHUXfBks86TpOs2Hu8jD \ nvvDUB4YEqpYosRCySprYbhs + ff87zg + PmAiClkJDipLUSz7OD2jdMU2REAVKWirXYJ1jGAPDCK8u \ nv2K3rmmtQYu85IbLhes5yAovNNM0oJennRgTEk2WklRYPBXCoIxe5K6loIzmPI1IJZEKzvtESGca \ nKxF55vbujs1uTSiJrBVCWiIZjGSKI8fzI + 8dWJmwKqJK4LTfs9usGMpEa2b + 9Osrvr / 7DqkbavOW \ n / d1PpKkjjp5v / / tv2b57za / + 7V8gZYvSZdHQzxOhRAQNVW0RKF7eXJOzhLK85kJhnmeOjxO + GC5v \ nXqKaGl05TucT8zAu3WyJJAx15XDWIkOPKp4cE0NIJGk5DQOeyKpVVHXBuYhTCZUDIWceHh + xziDk \ nilIL6o3lccwouxTK7cqy3lhiPtOdb8kxU11eoa0gzhFjDVKt8WHEWEuvEkZrtMjkYcDZmak7oyXo \ nSmJUppIwzZ6YAkJZigi8ffeWt + 9 / xvc / / MipP9CkeaGYSbl8qEtFyoGcC1IUhBBUdUsMkclPOGPJ \ nMSJJWKkoOeOMYS4C3 / eUEpE5UCtB8DMba6mrBgpcX1xQW0tbO5xRnKYABSY / UYJgjgc6uaYWmZUW \ n6GOHlAq9ScgwIkwhi4KShmazYfKB / aknJs2cJVGpZ4TiEsNeaQlSg9CLEUwtr7MUQEJKfjnUIhEI \ nSimEWIhECpGSC7mf0aFDMzMRGCaNblfMSVNK4hLLz + KImAN5HIjT + Q + qvX + clc52x + G8dHnSLvzZ \ nymi6aaZuLBSJyuafowpELhRh6WfPafQ8PXxAuxqrHCVHVlZhdMFquSARi0QgmaaR9WpNVTfEAuPs \ niSlSV4baGYYwokQmSkkIATJYuYxMIUaEkBTAOEcoS1pmKeVZ6qvQWmFtRcqFw + HMUCKpSHwcOA + B \ n / WlkmAs + CWI2ZCExMUDOSCXZ1hWb1uG0QIawMD1zYQ4ZWCYRrSSxgFbPBVYbRBypSyCLhu3qDbZ9 \ nzbefP / H900fmdKJdv2b2W / bnSPCFjz9 + 4vOnPRGBsApcYU4zvp8Zjx0ljtx98BQ / IJMCadF1TUoa \ nkMShYK0hiYRVisoKXG1p1xXWOsbZsvEtTgkaW9AioXmeksgIUxFjRkh4cXlBmBz7h0dIiRQjWT7r \ nnCnYxlKIaG142j9RENRNSxARhaRIiwD64YRh4v3bVws7WgqSshRjsdIg40Tuj + y / / I5fftXSGFgZ \ nQfA9VsLJ3KLqmRhGfvb1G + q / + 4bTtKKqXpLVA0rPNM0rCoL / 8Xe / Zff2PRlLzo6 + mxjHCXTC2oq6 \ nNmipEbIw9j19t8C0m6bh6ekRP2nWux2Xr15znidOQ79IFUsEIloJhM6s2wrlE9MYmOaJh / 2e3cvX \ n9CGT7Ir3LxqMCBDuEKMl5szhaU8 / zUvEiGiIF6 + BQswRWSJCZnaV5mpjGbvPCD8Rc0 / OhfM + o5XB \ nOUcpia7vl1uWMVQtSCLzeCbnAWcKWnSUnNHKLStVIRF + KeiCxOXlS37x9iV3tz / y9PlHRCko4xbu \ nwRwpOS / GI6XQUiwZMinSnU4IIbFKk7zHGoUUoCUo7Qh + JBWJEYuGXz3fz5SCpnLstju0ttxcXIFY \ nPAtDP6KVJs5LtEGImRwLrRjRstAKwVVlaHMinZ7QOtM6i6gca3fD7CPaVqy3K6YAY + qXe5NYnssc \ nw5JntFBZ2a5qfPSEuCTvFhaT1mK4iuS0eHYgErMHEq7AlfBsOKH9I5OCvdkwxIopmcVIdnjiJSNm \ nPHKRz9xs / gWGp + UkaZs1wzxQYsHohVlbgqdMASkVUhmUyAitFkSaE0zFIggIIwhoyjzhtEQqhTEK \ nZxV + HFi3DT56sizkmEgp4X1EakVjK5QslByoKk3tHOO8HFQuN1tEyszDTNGSmBIxZUpYYgVKKcu3 \ nlFhtiKWQMUwxsX / q8cqQgZQF / RSZ / TL2lVTI + Zm8Q2azbXGVpmktgkTy8zJiK42WmjEHUmFxDwuJ \ nFAJtDCJDydDaFdvSEJQjjht + PEtKalDuF8jGovuvORwFx8fPxGkijhNZBtq2QphC1JkxRHIolKDI \ nKS9Hu1yhtGG9viAlyaq9oK4bxr5n3VY0taKUGSEj1howclEsKUnbtBAncjihjFiMIlITkyIgKBJE \ nnnn8fM / f / 7f / yuvra6p6hVIGafVirKtqXF0xTR4ky + GsbhBS4WNYpHVktBRUrWNbKS5axeHwgHY1 \ npl1xngK10tzfPhDPP / J2AzebgKGHMi5KmCjo6gtCXEx7Qp3593 / 1nv / 0Xz6RxES9XjEHMESyKBwf \ nD5xPE9V6h58nnHIY45AmYuWitW5XK7SAj / f3jKNHCc3 + 9h4hBO7qHeurK4YYuX96Yln8JlZtA3Nh \ n7j0VR1opCGWEEhHKcPXyDbJewTyzXq + p1YE4TfSPdxz7Ho1CqwpnlsDBZnXBUG / ZrNeUOJGmjkZH \ ndBw47z / DfKaSMKTE0A + YC0ntDDl5EJmr6x1SCaZpIFbghw6ResL4xLnriPPMpt1i9HJYTaVH5ozI \ nipubG169uOLhww / c3T3gUqJpWkzV4FxFSSNj35NjQqvCsn4PjMNAvapZrzZY45jnGaMEldMIkRin \ nDsgL2F4KUkiLwicXXl9f8cuv / 4zdxQvGyTP18xKEWJZmg / z / UeQUAo3W0ISAc4bKKpRKxHlGKqid \ nWTwSKEavedqf6ceZUAohicV4JhfnbwGapnq + gwA5IJTAGEMqkil45higSCAvdweZiWkikygqklka \ nvyod2frvea0eyFYyXf2Cx / qSL4fC / ssZW28YRoeOET0NrPrxD6q9f5SC / / R0QiqBdIocClOeOB4O \ nPN0 + sm22XOwuyXKpbpUxaG3JRTOFmWHKCLvCOIedjtRWY5SAkhZO7v5EyHL5fduSx2nJ4Z5GigBt \ nFNYqhBFUWiNYjq7WWkoKxDkiRV5cf1pRslzQfceOIhRZKKDQT5HrywsOw8zUn9i0F / jsCHMgxERG \ n0rYtMQtSGkALnLNsMZhKkYj4NGGtJQsJ0hHQzDHjWY7QPiaSWIAwVe2ILCsrZy1pNhzPhiFnkgiU \ nVCHlrzj6yKR6lJZUucEozfbSIRkoeKTReCSxLIXeqELJy6FUqpamXiFcy + 7iguubG2pXcbi / 52LV \ ncLGt + fjh90gplrWLlGSfAEhhRjJTO8Pse4ytiCi8qIiiprGZ + fTA / / E3 / xvD0yPrNDNahy8Gvbng \ nxVe / QtgVpdhF1ywVq9bRNA0pLdCTkgtJRCpdWGlFVQb86UA4PGLWFzhb8fB4pD9OfPndb1iLL / z1 \ nX7 / lRdPRyAFdMuOY6frED9NfoUtkZwfENPH68gVXm8JpaKlcRVB7xn5P1ThKtjzeH3hhdkhVY11h \ nVW + IYsTkgm1qUiwcHh6Y + x6SRGhFYx273Y5yc8MQM / N + v2TfOEsYIpebhnj2PB09YvqeOW3IxSGk \ nQdkGhOE0zkgrUargexhPI9NpQPjF5CWkQNkVbuVwq4akCtGfqa2hVJap70njmQqPTgkFGCnZrjc0 \ n1qClWO5Gz9S1fjxTdCYNEZkE4 + HMcDgSpxktLUSDNRuKLvTzCe8zb968ZbPacff5kXM30pqWXe1Q \ n1jDLgvce7z1CCKxzSCKlRIQQNE2DW1UIsUhxN82S926twaeJzNI4VEqgtODlu5e0reXycst6d0nv \ nE4 + HIwW9SDOfCzJSLvwKqSgoUhEoZaieG6khLYbOrauwCGKG / hzxJZDzTNct8QaplOV5FkuwYnnO \ n7eqnghEShUSLJd4lPH / YaC0QyjDOESkFoiw + BIRgjjNFTmSZFl957HlrT / wvrwNNlTg0D3ypt / zQ \ nVPy + f2Rdbih6g6oS6TTzqev / oNr7Ryn4j49Hzv0ZIRcwidGCOM / 4ceJ2f + Luw0 + MgJaClzc33Ny8 \ nIgnFNCUmXwiqEPxMGwdEVEwpQBhQQN8P3D2dkLZGG4dNM9IYTLW8AYUsWCOhBEqBYZhw7ZbWVci0 \ nZLHP80xMEmmWHaKwimkaEcog9GIrLxJ + ur1HS4Gzlqfek4RCCIVUkuxHhmFYAq4QyySSI0kWSgaf \ nPRTBxjWMJUFREBXBT / jQMflIyAWkRhuDluCURgtBCCPHeeI8r5nUhNADOYMKb8jBUuw9WUdKecHl \ npWNlOw77A93pHqEtSdTEaEg + IKJHZIuhobI7mvaSKBfS2OfjE4iCypH + 2PHj3bA8eELg88IWSMWQ \ n44yWkdo2dKcHfv / d77HViss3v8JutvhoWeuJWoNOHpsDh7uPGFvTR4HqB169fY / 3klg0SuolOk0U \ nhvOEkmqBTUtBFmcqXdi2mipJwsnzm9 / + hlMXUPUlPlvUKNHhQOYzZjZUQkA8EbJBmC1RWH7oXtJo \ nT / QfWMse5SbW657j1KFXWzYlEI8S7wfGJPnNb / 6OvxAt17stU / aEUDicD / jTHmsrpiFxPnlS0lhd \ ngZDLnhpBnwIZ0LWhsTVWCopMHO7vEFOPTgEd7uluH8j6gqSv8FKAk1y8eIE0cO4PfPrJQyjYXFHJ \ ngiCijGR90aDWFRMT4vxIUQrW6 + eVZEHaioJiTpmqbdjIREwLWFwbTT8OzCFSVGKce4Qs5FHRHU8c \ n7k5YFJerF6zXl5S8vHeG80j78iUXxrHdXZLFMt0aazidOtq2ohGGmTM5JvLzOkcptXS8cYm9ruqK \ nykmMdc + 78ImqbgkxEFOmqtcoLdgW2Kwrri4brFsSbR / u70h6iSc / 9RM5xQWI8qzYApByiY3OCbTM \ nyKSJQhCMQThLTFCVhUMdSsGnTEiFJC1IScmJzLzIL3OEvBR / n5ecJWcMTmussegUGH0m5kjOIKX6 \ nZ3XS0ulLujARywQq4wWMemRVj3x907MR93yK93T7T6yPW36hoSmfiW5CXRXiz0fO5V9gPPI3PwZ8 \ nd4L5C6KcaOol82bTrvHDiCyFQWhEMezCFSErUBVFeKoqM4wnTkPHdOooeUakGYVHiiW6NRTIfsAY \ nR5sFzWpFJRxWCIRY9LtKapQCjENVkhBG + sNAjkDRCLVMH4lCGCfqtiIXQSxpUe / kZdcf8xKFnHJG \ nq8h6tSHGQomZFPPSreqlmw7eQ2PRSpNFIQvBOEdGH5f86yzIOZGKIsiCVAptDVXlEGSEliQBwzxx \ n8D1eSMCQUkRKTSwnXKvJpUPLwnaV0bLn8P9S9169lqbnmd71hi + vvEPtqtoVOrHZDKLEoUSFkQSH \ ngQ37wJAPfTKA / 5QP7BMDNmAYMBwwtjHA2JA0CiNKZJNNkc3u6uoKO4eVv / wmH3wlnxsyIHD / gB2w \ n1nr2 + 73PfV / X6pbVzRIAqQRea7yXRCInT3KkTBiNDoiiAhskeZYT5ymNaYmiGI9DJIF4lND3JaLv \ nSVSB7jVh23O / 7bjfreiaG9rmAkKJ0poizxBOUu8Dfn / N1Rc / wV7fMkoyfOfoXI8JntBuePaw4Lyx \ nrKo9qARnBVoNJ1ihhg8docdXhmSc0G22bJZfEdsdfrNGdIre9rhsRNzvEF3Dd77zbR4fLzD9S / K0 \ nR4SO + fwQFSx29Su6OGLFmvwgpcgjnh6PKdfn9N7TaYGLCrRwjH3L / dcvuBwdMfqNH9CEgGt6drfX \ nVOsLsnyMkAlaxeRphOs7fNMivECmMfnJY7q2Q / jAJI04WWTcvH2F90tcu8M2DU25Z79rKBYakSji \ nBPJRQdeuafaG1WaN7EbIkKD0GAcUY008ipGpoqdita / Iuh2LxWOUB + cjkuiYzu8puyWz + ZxskaF2 \ nl5hGIUQGPh1q / u2eLB + TxxHGeNKkoZcdSaSZjI + I44ImaBrjiNKI5EGM1QkqVqzWm4H2qRM8kmic \ nETA0bYuIDFpKZBTojcUGN / RvtEapmF5runVHmkOWaZK4II0T + s6RqXiIYkrJ0RTG04woGU7JBo8s \ nEnor6IwlThJcZQdGlxIIJXBBIILA9p5YRrgOjHLgJdoOS + QsGnj1oPDeI9BIIZGyR8ga4TzKa4SN \ nCJ5B2hMsschRUTLsp96d / GWcQDf8bwAAIABJREFUkCiFNh1daAi + RvcpKsQgJEZZzH6NTgRSSGKh \ nkbGgCj2uSDE2Ik9jDrxl9lAi5xLR77m9v2CvGvTpiH7xa0jLfHvbUYTABEHkOoztOJyd8v3f + g0m \ nRc71 + Rk / fv2Spqp4 / fIXOGNQ8YhsNiF7F / F78XJJYxpM32LbPbGGvEhp + w4vBTqOMcEgdU4cR0gh \ ncM6QKI1CEmmJEAGhFVW9x1mo2w7hY9IkJdLpuzeno + 1blFbgB9EKPhBwhDC8qUDgCSjfU9clXeuw \ nTiCFRkoFQSAkKD1Et4QcIp8oxbYaSH8ugH8HRhIqQcloIAlGEg8opTEh0LQ9nbFYp9DSQxA4X + B9 \ nQOseRM1Ixxwfz5gUivXNHdV6ifYxwQe6TiLiQJwkpFFEHkUkSYGIMnofkHGMEZIsyYjlsFzztkGH \ nnjh00JUoExC2Zn / fcft2yU21o08Ch9OcmBnlpmakJfb + LdX6nO1qzeXXF + jGkFmLVJoWgVKKOAYR \ n9rjqinrj6WxEMT / Bh5i2MmgFJ4 + O0LLl7uqCi69uucbguktEd8bpIiFVAZEm3PeO5GCCbm54 + rDg \ n / Q9y2v6aYhwj / SGmC + yWis16T9S9QkcLjJDc7gOJTilEzlE64XLjQeRMTh7z5OQBP / vJT4lauH35 \ nJcnkmLovid0dqi7R3iNdP + xfkncIhN5g9wbtNQ2C2XcThHXEcqBZ + u0du8sv2d285vTgiGenD3nw \ nwe / x9u0FnQOvUqo + IGJHFxRdWeHLEsGaNM8YZSnHRx8RgmO930KrqOtBpymkwLoWZVqUELR9x26z \ nZDKPWRwu8HTEkcf2AWdqkiQnS3K6bkcsBZkOhMSRhIpxkhDrESbEyCQjTkbEUqCSCKEk3UZj2i2z \ ncU7verpgcVIgE0kk3HBVEhRCSrxmSOW8y9tbH7BC0veOlHyIg2qFNQ2m70i0RjPAwp48eogJS4wz \ nBBfh5IDwFgqMhbLsaNuOvHTkRcKoSBFKImXEm9fXKB8TfM + 4mFKxIRKK0PRkaYroHCpO6FxAKYX3 \ nYnD9So8QHSJYFCO8V2gh0ZEjYFBBo3WCRxEUIDyJYhA7h44iCliZIpzGtgYReS4298TekfmEyKVE \ n1jAVgcOjE8g8u7LGJynzg4hYdRynAlnBlRzx8uYec1ti6l / D4lVdX + PsDqkq8jhGiASTHNMlRxx + \ n9AGNLvjE7Tk7u + TVzWu + + uwcLxQPnjzjP / 2TP + Hhsyd878NHXF7f8urlS96 + eoXvDXXTDEuieDJE \ nB1UMqR + WtxJirUENmFeMf5e2EaA1WikOFmOC0zg7yMclwz2 + x4Oz8A + n8HeWIR + g64boVZIkOCHo \ nzfC4D3rY0ochyilkQOphwdebFusD3oihwCKG9u5wolWDKk7JIcom5FDMeLeI6p2lawdWT54lCJni \ nUXilENrz8PExXliW61uu1hvq3RYZFLGKscGRaMVoMiObzBnlCXmkESpnV3lMC1LmdM6w2q8J2pMn \ nLQ9nlurNKz7 / y39Hc7shLQ7w6ZxKJdg4IZkZtNhhvWY8gpNiTCYdbX3NenVNs71ByoJtb0mKgqrd \ n8O3v / RaHJ8e8vXjLarfi6uxL7q9rtrXAHzzCuZibuzVHh0dk1Zrzty / Yrq4hSvGuJgorUja8PS / R \ nKKJsROg7ri9e8Z0jx4cfZ0zmb4jELaE / oCrfx5on7HTO + fJrvKhwAZzpaXYbTmcj0iTm6dOnXKxf \ n44JEjA8YnTyF5AW66xA4vvz0R6gi5fQox5uI6qblu995n3Kz4eriJUoIhI + wvUDKDFsacmkQkUR6 \ naHZ7Xr3 + jLba8vjxcz7 + 1idsNxV3viV6MGN3v2Y8zkm95uL8lhdfvKLrLHmW8 / Tbig / f / 5Drsz1v \ nX77GhQyhYkTb09GgMolQGd2mROc13pbstmusgZMnv412MW0fMY7GnN / + PUIJ8vybpHJMRkGKRulr \ nkDeo0hDLnDCT9D5ghKWnofXDe8Q6R7u5YZwXKJ / hGkOSjlFSD0 + GaUrbVsTRGOsMzhkEEdiACgFF \ nQIbh + qPII7J8IIMGaZFJhgueyWRClsRcbXa0bcNsNsXsG15 + / SVZmjKZTIlUTGoDaUiYF4osj3HW \ nkEQRdVfzYD5iv + 3RkeZ + eU52EGM6R56NQAp2dU0eJ + xMB3GM9QEZQEpNNpqiJhFdpXA + wtrBQAYC \ nGYHIPEpbYhHQrmMsAsFsCG1JKB2bXc3xfMzsqKDD8s9 / 95 / z9dkbXr / 8Eto1iVny3mTJNw5TZLvD \ n9G4ALdKz3t5wub3B7BRxPGO + yGmpsa77R83ef5KBn4R7fLemw6JFTl4ckIxPuN452i / fUO13HKmE \ nR9 / + hMx33NzfsC23VLc9P / rT / 4Pf + YM / pjee0ycPGBUR3 / zm + + w2e + 5vVpyf31DVHUUxozOW1jbI \ nXiAUqDhHCI0WkvAuCx6A4C0iKKSKB3mCZIgUWkffG3bb7f + bwfcefBAYMyQplIqIowgdR5jOgNRI \ nHXD2H8gZHo / hnTsEERwuDM5cGH7OcF89sHyUUkgdvaOADr + jjmOquiaIIZeepJpcKaRKMFYghCaJ \ nUkbTEav7NXWzxwZL0 / fYVpCImCiOeXRyAEKSjqZ079rJy7oneAk + J4rSwTMQS3b1JUnsyWTJ6uXn \ nvPm3f0V8tyNtI7TKuHGOXZEyOjpilCmi0pLIS6R5hVJbIhR5OscEj7EzujjlP / rPf5 + PP / 4mbWs4 \ nOzujaRu6ak29uuFXP1kDCcon7HdLhJqSWEV5vueL86 / IUslYQCcagu7QrkO4Hmtb / uCP / gOi0Qn / \ n07 / 6CzKV8a1PTimSHa4eaItV3TPKI6LxglIuqPYBbd8MOwFnSOMIJQdmCiJCRTGuEdx2gnS548lH \ n36L8 + S / wfUkmPd22IT6aEGXHHD89QJiIyNUcJBm2rQm2o3ES5zVGGnTc4boeGsfVyxesL96QxjV2 \ nkdI5T681x8eHbLc7dq9fU + 33SCvYXa8wqzMiFP / 8B / 8 + 0yeSL3 / + OWUJ7bYhTidY4TBtxew4Q + qA \ nraZEUYvpVjT7t / hmR6Qn9OsHZNGEPDqkWd / w9ec / ppjlzMYj5pMPKSLBIvc4eYdOLlFtQtvtSU0E \ noafrKxqjMSohyzTOGuLuFVFyRC5OQGuc85TbNetyTzsqCFIQO0Hfe2xvkBi0DEjhUMIRvKXvGiYP \ nDoBAbzqmi8VwANIxN5s11W6PNRbpFBeXKyLpydWIsG + YZJJJnFKVe9q6pmw6Zk8fInQgCwFvhtf2 \ n6PEhv / jVV9yeX3DIjEjHnF1cMJkfsjh + jBGeJE / pAyg8kQwg4nczQmFkjzU13jcobZDCYfs1XsZM \ nZiNSHaDZovsO0a8J7ZZINBzO17TtisOT5zSMae96Ho8ifu9fnPJgskWbHrFdMmpvMU2Lzo7Y7BW3 \ nyxptjmiv9kyODpDHJ / Ta0csWK38NB77uLomCpVCKyGu6suLlF1 / x4tUr0jQwG8d0tiFJFLYNPD99 \ nyo8 / / SnWCmI0oREkuqDcNuA1cRRxfFSwmB / y7NkTzs7OOTs7J4sFIXQoFeNCy3bXo / XQlMzznEgn \ nCCHRfqhGeOuRAnzweD + wPozpKatyYOO / W8oKMbQgdRSTZTkCSdO2GDFYiHyQhHfV8SCG030Q774n \ nA + cboQarkxxYHFIMjT0lFFowVL2lHNpIQrE4esB2X9Hs98g4xwI + SLyQZHlBUIp1XVI1BqESmh5U \ nccL0ICORklGaEivFdrul7wQBhdUao3OkS3AdHGYFfbXE7W6YpluOckVz / ZpoteShsvTa4Gc57Uwy \ nOhgzezji0QcT5O1bpHnLw2PHONE8OHzI8eIxn356gzUpP / yDf4 + bLhBNRry5vcd3lv2 + 5vLsjPJ + \ nSyJihBH03YY4TvHO4oRDiow4LRj4ggJj6sF8FcWIOsb2ARmNqC2cf / k1h4cnpPEhod9SbwVF / wQT \ ntRwfRpA2bNULfvHW8XIlSQtPriMiLVlMxph2z3ycc365I9KaKE4IowkuLkiihPc / / pjLt2eItkY4 \ nSbctiedz3lxekelAZPfEbvAqyFjQ7Hu89KhE4HZv8aUh7DzN2Zdk3YbjccbT + ZjjWcZmu + bVX / + I \ ny4tLdtstpjPs1ltMO5SvZrM5Fy9 + zO7sOTERql5xmLUQr5ge5myqJeMkQ2pBmxiUraiWbylEz1GR \ ns9637K6 + 4vHDZ + yaBh1ukKakuoPtbMfzB6DcHZqSav2S8bhBNQmhDiiTIV3g4us7RH7I8dP3kX2D \ ntpbnjwLjRcrlzZLNTU1ZeqrGki8OEQKMUGytG5bXaki0IHo0BoEhuAZraqpdz3Yn6K1gt9 + CirA + \ nUO5L8iyjyDO0igk9KGfIlWSUJYT1PW9ffM5 + syXWEXkyYxUMvW1Ii0E9moymrPsblGuYZoqbX / 6c \ nsu4xTjI + eEAsNNu24 / jx4 + F1T2Nc1 + FEoPeC3g2Ih0CJpKWIJEUiiazH + hJ2W0QqwJS03YY0tAhV \ n4doVxwtNKfYU8RbpYkQAuoDb3nG / + jHTvMWUnpvbnsSNCXZCVWpckzH2MVN9SryJ2Vy1rM2Oh588 \ nZqfqf9zs / f9hfv9 / / orbhihYoiBJI4mxitu39xAJlOrYac + yy3G + RUmDsTUySgkh4Rc / / 5qmGzGZ \ nHXH40TOkgLyI6W2NVo7xWPBHf / ht / vov73nx4ldINUKPEmzbEWcjpApYb2itIcpHwx18N0S4Yqlw \ n1tCbHu8cnTO44HGuR6AJErTWpHGKktGw0OwNXWeGNAQaFxiKVQwndOvduyuddwvTMDxVgCAEsNbi \ ng0eqIYbat44siUBIqralGE + JooRd2WA9pKMZSkm8t7RVQ1AaLwTG9FjvkFlOEIH54UOkKobyFhIr \ n3pXJ8gjvDVGkqUxPo2ImUcYijTHrO375o / + bUbzmv / yX / yFn558Sr5ec6Dm7xjJ / dspliDj + je8y \ n + eA5Kiz54MgxnnWERcXpg8e4bspua3j9yxZj5tzU9yzUmlsTc / H3N5iqxuxLVN + jgfHoAICy3BOl \ nnnRc8OHH3 + PnP39FlOXEaYbA4X1HnAwJi9A5fGnJ9RQrDHfrlvnxKUo7Vud7bi9vYBpxlB5Q1p6i \ nV + STEZuq4fM3L2iTB0yjB3hnUHikaxE + 8PThU + 7fCaslgtFkhFeasrPsjKXtWiICBMGT40NeX9zh \ nVUrZV + RKk + RjLB3G9FTBYl3Do8VjPjrQzE4O + Nt / / ZfEzR3TyHM6GuHXl / zZ / / oL9tZT3Bis6TmZ \ nzbhfr + irPb6tiZKI0AeWdzWFnuB1xZNTQXYYSBea2WFB1xZcnW3BJ4ijijhIXt72 / Gf / yZ / w6sUb \ n3rgr7jcrUnHPz774KUfPNkjTY7qCX376mg / eO0bFL + maGxJfwS7iaDLnYJJydrWnqRsOiwyZRcxi \ ngQ8t4zTik8OEdbNhe3 / Ntz76Hn / zFz9Gto5sEeNkjpUROtfgAq632L4nUg4pHML1uNACLc1yg5ca \ nJyK6uiHJx7R9j + 0HheBoluHbDaGvSbHkXkNdkyiB312TWoMOGhM0N29XOF + TZjEqjTDcsO8dXiUE \ nY + lv7uibDidiNmXD311dY6VgffqYb333E1SiKbKExkn61iIEKF8SJy0JHbmGpDeMbM9yt6a2DcWD \ nKb3Z401JEB1KtmTplLZ8xGRygOkb0jwa9htuzPa + przOyZIJNszJVEzoPKYyuHpLESw6tKTKYoVG \ n5mOOJjM6AX34NWTpJHqBMHtwQ8Lm + HBO067Z7XYUqWSUCNLxEXUN + 10FSEbJCIekay1 / + 6O / GXgi \ nX73gGx9 / yNHxHB9q5gcZkbSs7 + / 54NmYai2pSs / 27gzjJMloRpJPmBw8wAtYl3tUFBPKGq2Hhmzw \ nPb1paNuGsqlxCHrTksZjIqVReLztUQqMGfj4wYUhJeMNeIHWMcYMaR4hhicDvH9X2ooIeExvce4f \ nkjyKVEn6tqJpanol6JwnvNOpSe + HrH40PJEEKSHEFPMRUms6Y8BItJCkWUaUJkRRiunlwPLwAes9 \ nSoI3Bu / cgAUIgVSC8i2Z7Pjssz / Hr14xOYTbzz8j9lsmOqd9W3IyP6F4 + pCrxlIWU24urjnmjpP7 \ nW1T9NRNl2Pa3rO526GRBbzP2rWRx + jHFo28QzB5RaCKRILyi7zeMshSFZDqdkBcFN9UV44MFD59 / \ nxG2tkCplvd7Q9e2waLQNiUpwjUN0AW89apwS5WMmhwfs1zc02yUhcRSFpvRvmI012dGHLLcj / s3 / \ n9bfcNPD0uzHe9GSJJtOaTBkeHoxJRE9XrRnFmipIxqkCKQiq4PjZB6zvbnHbJbZpWV2 / wfUBaxVS \ nBpyKKN + lPDyOkCYIDx + 8 / 4iwuuO7v / 1NzicpjXZE9NhySbfvKe + XNF1g0STM8pxudUN1dY51liSP \ nMF1NcZARxQZT / YzFozFPHx8QHytcDPvdhtU1ZDxkWpwipz / m7OtLTNPy47 / 7nO2qRSUjlC + 5ev0Z \ n26ufci0sofXUW0fQHXV5zaNnFb695 + TwlMguEBjwQ9jBNiVPTx4ikxEhbJFSMcon9NszXr / ZkERT \ ngj3nh791yPnrC7K5pRlFuMkRjYD9tqI3NSiD9j0ydEjbo12PEJ55lOJQ9EGhk4zgYZwlbNo90yhi \ nRIsUe1RiOJmMSZ3BOMukyDCTmJubDfu6wynQwqNVwBtP11S0AVqvMKJjs9sNvYkAvTM47 / F9TZpp \ nutuG159ek + cx2aSgMil7q / GxopjApLDYes3V / S2JdTybTcglGNOgDGTa03tDFEm0iOl2MavumLba \ nM09XKH2G9TuQp1ibUbYf0PYCkWjeXq0ZZwWyF2gToYgJXUwXRsyezPjwj77H3 / zkb9h1uwE0 + I / 4 \ n + icZ + F14hJIbFGuWm1sqW9O3Lbm3xG0gDxHpYUO9XzEbxVjrCG0HIhDlFu1LTL3l / s2S5e1Lvvf9 \ n73J8vGAvKyYPJ / i + 4xc / + QntbgVdypuXr4iyMR2aJx98E5VnCO / ZNT239ytmXnJ8OCfYhv1 + hQ92 \ n4GB4D1qT5QWFjiGAFCCcodyXtHVLXdYY4wgIfJySpgVFMQE03g34VKnlsIxlAMZoLUniYdHrvUNH \ nQyRsvV4zGiVgelSkkUmClGBcD1GK1GoogASJMGLg1KAJUhBlGVEyuFJNY3FNRSzlAIvzgeAcu9Ud \ nXb1jOo4pioRUWLbLC6ZZSn1 / S3n + KbrdUXDEV5 + 94Ld / 5zfpuz1bv6Rra97 + 7JdcqAVdfY2MY6RZ \ nMf8w4aMHf8i26XDtPXl + T9CCvqmpm4iz9QYmJXWISaYT4iInpBFdJFB2kN1sqh1OCXS + YF0Lqq9u \ n6EOMDhGTxSHV3qNkhy0902nGcrUmU4LD2QxxkPPt3 / wWm9aw3V8zThzB1JRly + nzBzw6fcpPPlvx \ nZ3 / 6K243nuPnj9BtQESORGpi6TlejHhyPGN7e4nyPVkSoXuo794wPXlGL0f4SBNN55h2y1ExIaLF \ nthWZGg29ijbQKYnUCTIInDXkOvAbHz5jdgQxEVmas2sbfLul7j19U1GVHS4oltbiVg6Lx + FJEk1v \ nDWkac3v5mmyU8 + 3vPGd0qHGJYLkPrDuHDwWHJ0 / I / JT7qw13X / w9r76 + RkUz3lxd8eDkCbv9hq5v \ niL1Htz1ffHbLbpOiVE8XOl6 + / HvGs4RH8wV9OSB8XerRkWI0GfFYJQTh6Po7iiJFRgLf3fLoaMLZ \ n7ZbprCBJSh6d5GTW8fL2S4wqWLeCSBqo90TG4LuWNJJEwROFAeugdMzIKzobaE0g9IFsFGN9S5RK \ nPnp8QF4kZNaTyMFatV + tEH0 / cLgA64fm + L65J9GSURJhDcNnISj2vafzmrKuceUO9FB2VBFkscC5 \ nLUnQJK5GNYG + ESAPUWIETtH7iqbZY7c3hLJktjgiSI + XgsksJdbDP495PsbUe6QXBGm56b5itL9G \ nJy29LVHZjm11z + Y + o97GPDyYMYsbtrsvOT76mPLujiKLwEhk + h7GK3osf / 6 / / DkmGF6dv + LZ8yf / \ nqNn7TzLw9 + EhucqYzcdQWnblNZEKZEoxFoIsQKxu + Zf / xX / Mi1 + 95hc / f8F + XxJkwDeGeS7wwpBM \ nC / 7wj35nSKmEDtt1vPjlFdv7K7b3O54 + fkIsJcH0tEHy6vKOybgYXJGmpe46dlVJEhT3S4vwDcY0 \ nSOUYjwtmB4fEacZ0NqNbO87Pzqjqjv2uomv7QXDQ9ojwztOZ59i8o95XRFGOjtIBzhRHJEmMijRp \ nPmaxOEDIgPCWpi1Zr9d4Z3B2EDfICISUiCii6 + tB0k5AiKEXgHPkIUV6Qd8YYq0ZKPkx29WgYZyO \ nM3LRYhrD8m7F + v4W29V89N4p49hQLa8YZYrvffAI0Tf8j / / qfyNsb0njhNtLx6N / 9kPu1jG + l3x1 \ n8xJzf0lvI5J8jkxTemJmo2O2ry759OorbjpDFCSPDp7ijCBJEnK1Q7pLgn1LiA4hTvHBUnU7CA1J \ nGqMFyCQmxAFUQRaNCUIzGilG4wLblSymCbHu0fKYSGWY + zsS2TMeJTz65DnZJOKqvMWHHX19Ry9r \ nVvcj / urfVqz2v + RmWePQyKQnjTSL9AFdX2O7QKzh2x + / T9hcoHxPJBzKS3zfYbZ3ZI + fkk1nrPYd \ n6XyBWV8g6Lm7O8P2kkI4RFqg4hirYnQUE6kB51GEjr / 4P / 93ujSwWe7paosUCRZFu6uh60iISWXC \ nProlxOD8ILs2fQMCMh84nk / 5xkffIBprKp + y2YyQs8dYrfBYbuuKyzd / zer2LdGbGh2P6WwgnWtq \ nuWZvV0gNDw4eQRWzuo7QUYrTG4SouLh0fP83f4CwKc1 + xXjisKMMrSO65R2jaY7tO7SqmU8CShjW \ n2zvOX1U8e / oEP1ngXM3dxWdIX / Nw8YhL0eFtg9reEfc9qVLDgjxIpHOoEIilItKavmyJ05zFfIFD \ nkI9TvI9J0hGTVNBVa6Q1WGMHOY + Q7Kqey / st66qltQInYoyw4CBygaqqaVvL7OAhtm1Y7ytklJAe \ nHBBnGevNFiI4fnzI / c0WqVuyxDPJI4SB0jRAjNApOnUIsyZmS54LHh + n3NOQFmMOj45QMsE2lkxo \ nVquSft + yaa9562se60csv1QU + pBPfusj + n5JVW5oQ8 / 99RZr98xlIA9rPvzOnIOxotxuWG5K2pDz \ n9rZhc16wNhXL7iF3Z7 + GOXxZzVGTLTbckxaB4Eb0TYXOAqfvP + Pi9QXubcmf / s / / hqZ1mK6H4FFa \ nI5QgTmKkEkwOJIqWVe0QOsfsStz + npGEj997Rt / UmGjGw0cf413JIluQ7A9odh1en2Mqx6R / n2S2 \ noxcBEQnmJzOOjlJGszEiO6B0c77eeq7 / 7F / TbtfMi5jnJ4dc1Ru2 + xs8EVrEaBEj9eCk7EyPlylt \ n8AStyfOUaDxBJgkoTdMPd / cEz3pdc3e3I4okUVQQHKTB4TqHK / d0ncWrLeiEEKfE + ZgkHyHGyTA8 \ nd2sSrXh4dEy5vGb35ZeYpqMtcqSQtKal7kvyScTjhymxvaD + 4msea / jGNz5iojv + 8t / 9OWb9FuF7 \ n9pXg29 / 5PsvNCkOEKZdc3uxRes4uSLyMKHzFRFtkZbhaa2yu2CiHRHG539D1ls2 + oiPw5IP3 + Pj4 \ nI74o11htKHRAzTLyIma33lKZjj5NKH1FEuZEIUPGBzgVYUKJVR3CN3QbR99EbNwWT0we98xSwTyC \ n3eU5ojbo3mN6z77U3G0NJgRqm9H5hCBKHj8cs5hozOaG8eg5uThglsNyteLJ / Ji7M42UPVFyQ99Z \ njP0aVR1QlhHrO2g3Hh0i2m5NV9dIMcJNQcduSJ8QkG64rkNk + NGEL1cbZqlEiAwd9QhpGY0fst8o \ nOhRta / GmR + pHYHbg78jGkE9GTE6ecPLwCYXUqL5llx7Se0XX9yRtiUOw2y7ZrS9Z37zF93sO1Pvs \ nD49JshsWNvCgkVyvfsTjxYxs + 8dcqg9R7oosHRJK0luq5ZZ6tWPLitkUiqOKTmR0dsvkwBCiLUkU \ nsd / UJLmnu7sgXL8ljB5TxI51e48lpmzH7Dc5vS2o6ztS3UG / QbphIAcPtZfDoFeCrIgQQbD1EROZ \ nUYzmdPUGV62ADknKtoI8n2GqLUo0eL9jt62xdsxym3C7d / g8xiQ9XXmPk0NhzwmByhNG85SOhl2z \ nJYkTZvkEJy1t5kjyiA + + 8QgtVzSbW6ptibIRT987ROwNrr7n6PCAqrtj / iBHu + eEOiEbHfDkuCNk \ nOegYWzu09Nhqj4wcO1myrHckNqeX0FXw8NlTql1EFM3o90vW2xWtSLivIJIKqRx9WdMcRpi + Zlsv \ nUXnMxa5jKwqWXrAUCU3za3iHH / uYvt2xU2ccTHOSuIDOM1 + kPHp6ynJTI892bJsaQ6CXDO1QNA6B \ nFiMenDwmHpUsNxvC6AHZeM58Omb6eM5hJpgVKUpKzuoKYQN3l19yfDDn5s2e6 + sz9vILvMw5PXiP \ n2XsRhcqRTceYnpkzLC9eUU9b + nHMz1 + fYzpPIiQPi5iPPjwhKjpuqwvuVhsUKYvxAi1TQnDEWUEy \ nmtE6jY9iVFbg44ROCWwbCCIgVYQQ4ERO5yKcUDgR0bcNuQr4zoAxg / rR7rBInIpIxxPyxZzG1XRt \ nQyQgVim223L26pds7y6IgiR0I + T4EOcDs8UBQdbs1neE9paPZc9vJhnd1y / 4m89 + xue / + AyaCq0U \ naTHm9MkpV1dbtpsV95dX1LZAFTOaRHLw6IRRGgjbe + qq4XxfoVXASM / elYwfzqglRE9POX5wSlIc \ ncNZMEPuWfn3L1dUdpu5IxOAeBo2MJWmRoQ4cLt4PcdgyEEIHck / vKqxz + KDo38Uo89GYk9MDTg4L \ nPn7vCa + v7jmTIPKcznV01tHT0QcJUcR0POXk4YhIrzk + Sjg9zlAhx4k7vvnNOZvzG9raUu1vaes3 \ nKBexL28YUWHaBnvXsV / dkMqSyNVo + S5OmynEQNYjEgEpIY5SonQCKjCfL1g0t9T1DtJBYaclbNuG \ nOKSYINAywrYdozhlVIyNBO5mAAAgAElEQVSZPEjJnjyFxSkdGcoFIjEoPYs8Y5Gl7Hd37O7vWF1d \ n4bqOwsKkOOEkqfAPSkKxZ9oJxOqG0 + k1v / lUcB1e4 / KKJPV0XYOUOTiF7wPX59cczo + wwbOpK54k \ nc6zzkBU0waOzMW9utnSrO9zNFY + Cp58shgZp37NrJff7DMSU9brHNC1xNljgVNB4IJAMghsZEUTA \ nuUBnWjqv2Ncl2 + 2K0G8x7T1FrojzE + pO0phAaCVx7Oi7PbtqT99HbOuYTaNAO6w2BDeEIupuMKhF \ n2nO / vqWstmjdkicKbTt0ojkYp / Sh4 + bqDQTDKEuZpRFS9fSqo5jkzI9G2LChrm6YTR4TyTF + NGIy \ nO6BPNtRSUzsPwSGaiqgzyEShZhkjP2dqjzBtRxi3uHjFV2 + / pm5bmq7FIyi1o7OWg6xgUwmkF7gO \ nvI9Ybgxp4Sh3PU0v2ZclXsUEF / 5Rs / efZOD3oiVNJTLK0ckY3wp8aLi73fL3n32JqQTC9rjgMRK8 \ nHKQYPho + 8DLJmD14gD44RWZT0skRxnSMFYxVDPSsypreeVq14 + VXr / j5T39GqnMwEZvNhjSTHByM \ nKeJfUd92 + C4lbzQ6zumk5c3rF9zJl / QHb9ne7Ej9GNnWxLsWdXVOcnPJdL1GdZ4Y8OUl3TemqOBJ \ nYo1WgiiIAb7vHF1VDnKHkNHbQJblKCUJaJTOBtiTF9gQ04QBrRrLAP0W25YgB8ibdgZbbulCiQ8B \ nkUZc391xcfWK6 + vzgQBajDEC0qOcj59 + k2a35ouf / y2quuMHn7zHyfqOeN0jQ + D5aMqbPuBCTG08 \ ni8M50kdcXt9jfUJtHGEyp5jM + eDBA548ecqXP / 97mtUdfd + RA6oVIBIWh0 / YtzB6dIJeLDDxiJt9 \ nx + XtC8YbS1Q5rBxDlrH1PWmSEouESX7A0fSYW3WLkVuicMko6hEmwdiMWmW0SU2T7JjuLaoyqNmU \ ndqRZN3c81CnHxZY02XHR7okEeNsjIoiTwMGDAz74xiP + 8Pc / xjcXPDyK + fhRoK1qilFBql + yrF6z \ nyGcc5jWbKnATeuYP3 + N3v / 8DXpxl / OpXfwvmBiGXSNEiREIIGmGG8p5QmhDFBJUQxQNiQQZDJAMB \ nSxwJ0jSlrxrq5QbZ1BR6hjUQqwyRvqFIAt / 5jQ85evaUtRxx60csy4BRirhQPCh2OFPTXF1z9 / Il \ nWngWXcu4yJnNZnRdzULfMHnasWoq4qxgfnqI1j / k / OZrnPyUb4163ghJ13fEcQpC4L3m + rri2ekT \ nuo0nzA8onzfMihF97UldyvbG0 + / nw99c1CQTWLmU6r5nj0CkBcbv0ErQ2gaSCMPw2XDeEfCodxwm \ nwiD5bpoOa1roHKiE / X1HMCXObCiSOV29Y7PqESJnPp2x3jd0bUeUjLm93VH2I9CBpq9pmy0FCqTE \ n9JaAhxBYrdcDbkFHCKVIioikyPFSUPc1519 / zbRQjAtBrC1tu + X5s9 / GdJrJ9ICzi6 / Q8YRJIUBU \ nlHaPwSGZDzRdIQhK4oQmmxbEeLoddNqgVc + u3NJ2FTd3itnkmPXmjq7PcUEMIRH22Eyz2VUImxFH \ nc8qy5 + YO8lGOtzGurRCmBWtQ6tfwhK + KDpUFRBpz9OgJGxq6fYmSHffXa / JohsQNGkQv8EERa0Xr \ nPRaBzkfU1jNZPKfuDMvbe0baM5 + oYclY71nvO65WW + aLR6w2E9Lx79E0LVX / EhVNmEWfMPeS / duf \ nYtoRWxKsiPiVUlSmI4gM0yeYq4qZK4jdNY / thvlmyeVXP2bb1kxkhuskz07f54d / / Hv896slvYGq \ n2rHf96TFHI3HewNWDYkarwhBorUDJMvlDucGpWKQkiyfERcjYm / o9yvcrqTvB53eqFDkmcJJh / Vg \ ngkN6SZIlJMWMR + 89ZjGfIgm0Fg6ffYPvf3LKf / df / Q + IvidqHaqCtE + RpScSlvLunLgyJMaTTaZ8 \ n9P43 + fSzzyGaEGTG6OEp4wcLUiF5 / 9EjxlLy + W4LfYOUAas87XRMdPiI87sNv / 8H / wKdjHn96pzy \ nYkVXl2RNRZVEkBvGYsdhtCUVFUEI9Owx8fED2mnB4fYDlFlh4pe4ySCAtr0itmMmJORBMM6XeC2J \ nHxzAoiCerHh8aFHtmpg1IYkRJqClR + gOJ3uKyYTDY8H13eecHkcUs4jl1adk8RQrNHkmWZ694ebr \ nM + qNwu00sclZXmz5b / / r / 4Z1NcGEiEnaIM0ajceECO9AOo1SObKYErICFScoIYgiyTSW9JsVd31G \ nVwd0KXCNR / QalMBTIeI1SS749mnDd7 / 7XYr5ARdljXUSERdMT6Z4wdDYdvdsVrdUd0sORoYnR0c8 \ nPDklyxOW + yXoggf8PtfJBQ / FU8biMbVsuNuMGJsDZrrl28x42d0ihUYphfPunWA7oy4jRJSxuYnZ \ nHV1zFECWgcVowev1DbeVJ85TOjniq / USYVpqqVCTGcpFiLig7xzpKCHOpiw3W2IJTgicD4QwJNOC \ nc6hIYm2HNR3KeZI4pqv3VPsVvd0QlGOza3E2YzIacb / ZEVCIeMq26WhRVK6jsj29b9BZBL0Y5DNa \ ngpe4YCBolAat5TsySkddGb7 / g99htbqj399wMI5YjAMH0yHxJmjwLnB88JTdJsHL2cDaanbs9zUi \ nhiJe0HtLH2u8kkTzgs2qpLy8wTUNkVSQgvMWJ2FX1twvz7Auxlj1TmwuEQJ225JpphBRTmMN13cV \ n + zpj38W4tqavVjgpIQpofg1P + KQrOjZkmaQ2hj44rLL4vmSkE0LwtFiMdwMXHqjXKzoB0XgMUtB5 \ nx9XWoIRAi4hI9txevGGkLDZ4qt6jizFVLcjGR + haMy4gPyhR + x53LejaHYeLNfRzUmlJlEHEgTfN \ nLUur2fQFkToCpcn0Gaq65eRRyh / + wR / xovb8yhY8P37O0ckzrqqaD6 + nXF8sWd7t0UHS7VbYqAYl \ nkXFEkmbIJCGPo8HMUxRceWjbniwvSOKEIBWj6SHtdsVu12DqBk0gDobYGVRXI4RkUhzjtCZZTNm0 \ nFTJJBnyrjN6ljDqqm3PE6QPOf / EZbrMmD44vfvFLQpQQHOQxxAKU9Tx / 8pyPf / eHfHW / JZ0dsDKK \ ndHbM7OlTOgyJVPzkRz8mbJbovmWURiSppg + W / HDM0fMj / tnv / ZCb25of / 9XfDQNFeEy7I40Eo0yg \ nUk9UNv8Pde / Ra116nuldb1h555PPl0PlKrIIUYFUVlsi2m5bsCC04YE98dC / xH / BBjywYUhowxIg \ ntdDsli1KVFsURarEqmLFL3 / nO / nstPbK6w0enLJ / gDkgtKdrskc38D7P / VwXvpWkyTZRlrF79y7r \ n0JHrI24kM2zvWIhDcn2DLgjwCqIqZ8 / V7CfQJmOON4ZWaQoE6TAhoCB2GyJpyCYHdBdzvBfXliHb \ nI6XDuob9vV12tyWjLGAveg0pA / quJb9seO + t3 + Db7x3y9z98wdHfPqGvBW21wtvNV2TVHmkbFCVa \ npjjENSo7HCPCIT4eYaMUH8dkSYz2DfVmyfzinNKEKKZY767n70A2thzsWd54bZs335ix1UDRQS17 \ nku0thmpM1cPGLGmlY7VZcbY6xvc199 + 4wYPtHWRbUpqai80lySRBxYpunrAjBQEJoehZihW7e2 / z \ nzd / 5fX7wH / 5HyifHBDJFCY0xFktPOoiZzDKOT15y / + Aew8GQYLNNd1Ug1gt2XhtjhUF2hvmqoW8C \ nun7Ekopktssk3Ge1LjCNwzYNUZZcB50QKOcQSJx3GNvh0deWLytp2oq + bUjTEWXbs14XOGdROubo \ ncs1woNiabXNZNCSBxHpPkA6YFw1XZUOUTNkbzrhcn1BWS5RNcFgSHWK9w / T2Gp / ir6 / jpVIkg4Dt \ n7V3aasVmec4oVgxjSb46YZAM2N4d4XzDppp / x / HRMVcX51 / tC0fURUPT9qTpBOdbuqaksdBLCcYj \ nbc2mKhDrCiVCVl1NsapRXKtRrb0 + 6jTeYQBrJIGasVquCJAsREFVtxRdTS9i2taC0fQ2QuqArrf0 \ nX + HI / / / + fi6Bv3OgqTrQybVY / N7rr / HB / BnGNCSDIdvDHerMcnx8inUWJTXedOgowrkOa1ucaaiK \ nltEgRQnJZDhEyynt6hwlBVIqNsuCsj6naFpgnySLiXTBVqoolicE5oSDrStOy4Sb2vLAVcTrNXPR \ ncbm7Q / j1t / nTDz7DDWb8D / / 575KtjgnyOX3qeZqN6INDtr7565yWNeurC + 7omFgG5BdXCO + gb / Cm \ nxkqJsiG97zC1p90svqpkevq6JfAQuJ637r + JjmI + fPyU1dkJ / WpO2LfMsoTxIKLcrKibHBWlbGxI \ nJyU + r0lnU9quZTDMqC43YDsCLGFV87d / 9MeEywtE36GEo + gdn16cUKYD3r1 / i3Zt0GlI3tQcXZxx \ nmlds336NrcEuNSGdVND31Js1oXdkSXztUvWGnZsH7Ny6iWsqYqmZP3rK0ydHaA + 9FsgsYHp3igph \ nqy / ZiVM20ZSyDRCTPbZuHBAknmF7wZbqkdEz7Dgk7PYZuB1C3xGoM + 49VBxkMXY55ycXFusTYh2x \ nWS25VFfohze4e / s23 / 5WQvRsQvCw5uTkmHXT0kuJVglV3lGtK5gkLC + XTAcZ1tYEQYhSGT1LKjtH \ nZQ4fKnrVoGyAtB5pc9LIo3zBKAnojaTz1zo8maYE2QCfDCCMrts63tB0NZuLV2ALDr0h0AbBFbOH \ nLTtTw + 7UsrczYm8rQWHoupu0UpK7jFyOWXeKyhqqvmFlGrpAEmy9yyRJqLzjcdmhe0UgU7LJPmUI \ nUgqyySm3k4pRMac1j0nUK14c / 5Tg / ZBsZ46OnxCWd6l7j5CStusZxiFtXzEILMv8BZIC1b5DfT5n \ nJ2g5Wz1i2VT0QcDzizmoGVWVEWQlrlfk8w5nNLbqkVi6uqDuA0KdEThDa8AaRxgktMaxt7 / PJl / i \ n6 + v / 0OmEtvGsjaLtYDwZ8M1f / DWePnrKyaIgTSaMIk3fhVwtCxqX4MNrYJ7FEejr0sT / K0avmhol \ nPVJfm7OcvS58JGnKYBSzuzPm3bfe5P / 87mOS2fWNQxJPKduKoZN8 / e23CJRgOAoZZgmehL5OML3E \ niwlnFz2j6YY6X + KziA5oe0voJYOtGU3hqDeevArp2gzpwVvHbDahKEsODnd4fvQS0wfYKkULzyYv \ nsW3Jwe6UyfaEi / mGfD1HiggnRnjj8Tjq7p + hAKWuFkSDCKkUcbqDjq + lzGUn6IVjMBmzf3PCk1ev \ nSJKIpq6QgcZ1BhkYJoOQmwdbXOqQrq5Z5ldEdcDy + adcvvryGmCmEkQyZLhzSLFeszWFZrFgU + Xs \ nHY65cyjZjlLef + / riG / 8Fv3LLygf / wQzELRxwK3332f7a + 8Q3p8SJAmzs39EnR8xCRLmTpImB / Qu \ n44OPnuCkJVMWWo / sKsYh1z7SrsU6DQ4cIZYevMFrTd9prPVILwlUgOwsR19 + TNk0LPICWxfotiLT \ njgc3b6Cc5bRasalq + rbD1YJoNGGajQjDjKqtkZuaLJDU + Qrhapbrc7rVhtuJIhgmnF6cUNiOeJrQ \ nJJJNZK / lzYFini9ojl7yzd / 9l5hsxlUjCG3AcrViiGUySClHKe1ViRKC6c4hKp7y + bM58 / kFbb3B \ n64BkOIK2YWs2ZHd / izTT9F2N7oaUTUM86njv9RmDgUfrBXUr6e2Mtg45CTw27Emait3 + MZm6IEvP \ nGY0UeaP45HhFztY12tmUjIKGgXJfeX49xkgGOmRdnVPZgrqDzocESUgoRiR6yOLslCzM6YKObARS \ neUQXUvdLVNrQ + CWNuaKyOVqM8V2Plj3C9iShgN4hvUZIzWAyJsnAiQrbWISJoZM0Xc5mdYJqF8yG \ nkm / FxyAuccEz7j8UTKaWna19UnWLvsyoVgln9oDchSzJWHWKRVPS0V1jvE1INhih5DadV3jb45Rn \ nHEuE75GhxLQ12kiC6XPquUd1hpIF5fIJY72F6R4xOxwy3ekIckPdOSBmMJzSNBvqtmcca5pmxbIv \ neWR38Jsl + 8kV3aCjw3BpFOUgYrFo6DvN3agl8YImbxBeMJAaLXtKYzBEGB / QdYa6NQidXd + iKEXv \ nHBZwUuGEZZnXNC30TuNUwlVR84Mf / xN907M93kMFAcZUeC9oO4khYf / GPk1bUxUrbGMJfIyju6bS \ nymthTKAVxnYopdGRwjhDvsl5773f5p3Xb5IGv8Zf / dV3kVrSuwQvUk4uLYul42AvZv9wh1evTlit \ nHE0LXs7QWmKEp + 9KMhXQdp7OWorWUNYw7GKcH9BaS9tJQNG0DRJYb2rqtiY / ek5ZVdg + JZFjrJUQ \ nxGxv7TIexRjbcOdWTFEt2JRg3ABvDUIoBsnsZ8ren0vg2w5MrZAipq5T7HjCaHqTzeo5rQ348JOn \ nyHBFkES0TUOgJWAJtGQwjBmHjr685O6te3z46QsePXrMkTKI5oKdNCUOQsLBkA7Fa298kzQ4Yn11 \ nyRDPzux9RmbO7 / zaNtXiC14 + vmBhj + idYrP7NZaDlEUSI2rPwT98wr84SLmRz7kKT7h5RzMe73Cy \ nGfDhs0s + J + XE5sh2jtyc4ropVV6gjL9m / tCjUo1RIaUx9P0aaVvori0 + oQ6xxoHQoAKqZk1VN9ji \ nWkWXCs9EB6imZDodUoSa3PYY22G94M7OIXfuHvDBxz9lezYlsh42Oe3lGYG2BFRMU4WXIdb3rGTD \ nvFyy0Rn37u3RKEPZtvivqKEKaPMNW5N99nYPObnMyZ88wZQrjtZXdPmS / dmMpnM8enaMjWuy7Zv0 \ nO2 / QBJDEmsE4ZdjVTOOQ1ANFw7YestyOGR6GHGaXzNxThmJBWRqUvE2u3uTCzaj9m0TkbE + W3AjO \ nubfdk5cdKz / mrNripbqBtxWTqGPgl4y6CwYSnNKUUuJ0SOwrXrUnFP0lLpiByVgva46fXyKbI77x \ nVkSy3VDnDWmsIRhSLz3CdOztROzOBqRhhbD59QW1glBdOwK8ablz4x7LUqPFlGzvgFfzx9foXJWQ \ nhAMCLdC2wpkL4rBgdxgzjb7gzsMZWwd3iUYVZZcz3NmjLqfkzYQmHrLJa06LnPN + SasCtOwZakuK \ nJ4tSGisYhy1935INYmxfgbN0RcHF0ZLEWHzb8Hn2Bcmre + Qd5JOEsTvgO994nc8 + P2a + 9Lx2903 + \ n42VJ5xzzjSPUE / o + ou8ywnBIsXqF0Ba7WRNZwXhrl / KZo6gsOhxwS6R08xcEKiAMc9jkaBkgRECW \ niOtdW1 / i2vD6Atx0tL0n0preCXrrOL2Yf4X3CCmrkt4brAWERmmNUgG4nlGqUa5FdBvKdkPrrl9j \ nSRiTDkd4oG9qvEzAg1MtcRxdO45NB8ojcUgpkOpakPneu + 8h6LB2xbtfv833 / rpABAOcTWhtQmvh \ n + XPD3bu7OHuOjixoS9sKOiEpO0eZr9kbwDgZUuUVXWdoLJxdVoiqQa1BOwGBw7Q9Vjh646jX5TWM \ nzXqsyJBaocKGdlPgXEASj8jilOX6DFzHwzs3 + MnHR0jk9StFCDIV / UzZ + 3MJ / CyYXZMEK0FFzDqR \ npNkeqAFFLZjEW / SywOBBQJrE9F1FGCmyUGDanPOjOeuVQnaem7vbPH7yOaNAYqxnNhzQG8PudMTL \ ns7 / D4Xj4UDJC0V / W3NrxPHzrFNdWHD + asFl78lzTBjdZq12OW8vB0NFd / Q1vvVHzujtiPrtFdH7J \ n1dkFV5eGxaMIFw7YDgIm7QU3QsOmr8m0oG9bQi1AeXb3toinU04WS04vLkmVI0sTnPX0fYuVgqos \ nr925XuCcY6KuK36pFITesr46JZ + fcbVaYnv7FYitIwo7qvKCJj8nyAL6fElQl7y9MwFteLHKCT0M \ n0wHFZoFrcwYx5OtzHj74XarT + bWFyEtGacYwjFgeHZGvao7O / 47LdUXiHLpZEmlItGC1uGS0dcj + \ ndI823CLI9kEMyaKMIDYoZUi2LD0ty67D + oQuHrJ90yGjOfNKItL3WDQtDkVRQm0c3s9Jeot0a6o2 \ n5 + P1FV88S6jtfeZNzMLBRvSksaZvVjzcG / LezVu8PPkYo6GWGhVpRrFjtqtw6YRyM + TqXCBcyCYv \ nWekVkd5ndyuhe7Xg81fPuXHzLdpljDIB8b0Jicto5w1iY3E01w0cIXh4 / wHryzlKpOA9682G56tP \ nSKIzQhUzSbYY + A7dOFy / JNAbYlXy8MZNHn7tbfKi5vM12PIm4XDGB49bGgQEOTZdMaoLwmnERA / o \ nPMi + YBLAdLCNi0Z0OmPgTrHCISNBXqzxXY0KaurNMZkx0Fdcrtb46iFncsJju8stdYv0xh0 + / ODv \ nmST3ubFl2N6pr + vMfkjfKZBjlpeCepSg3Bb1pmSp5oRtez0XbxzeD4iGMUHY0vsC5TtU1xK7js70 \ nRHHIznCAVprNsqSw0FcGpTw6ilCBpvPQtD1lU4GwaAWd9XhXX + MEnCMONWEA0rW4IkenjjgMQBuk \ nD + l7h45C1uuKtq5xxqMIUMZAfB3q1jnAYWxPFOqvZOOeOIq4vLjgaVTxja / vkiaG / + T3vs1f / s0H \ nRNkU0485vlzwF3 / 2Y / 7ld36Di / kLRrOIyhTkfUnTdbTe0fuWdR7j1hWmNGzyikJFlGWIq0LCRpNo \ nSxAsaYqS6XiLuujZrBt6Azoc0fcOFTTU7pTBIGYyGqCkotr0SBvhreNXv / WrPHv6ZxRFj3U9WoDJ \ nVz9T9v5cAn8d1ASBZpAkBDi69QafB + yaW2TqnES9RLiehehYsSbaijBNT93n6Lpkt9LcmW3RhR / i \ n9D5VJbgX9Hzz9TuEsy2qWJCGa4LmJV36hGJwCxFsc1hYdtSKYXbE + nxNHHZM04Bvq4r + cI / LIODv \ nj4 + 5ub / Pra0xTz59wdN / SimqOdOux68r1nnH83JD6CJevxPRecVIWMJVQeohFDmyXxD0GZfBHkUY \ ncdpBQMxBMKbsQViF62tsV18 / 1WyLcnBj / 5CTV + ek / QSDxYaSUgjKvqculyjfIukYxhku3uHxh5 + i \ nxZeEXrIqa0zdMhtN6MjomxptU9AtLhIsrwq8COhLSyaHnL845fjlKQfhjO1NzVysQAZkeUBzXLKX \ njJnogK5TtKFHqgLFHtPtLbZvJ6xqj4oOKF1BtVcRZ1NmJRRa0zhN4DPabESzJRkTk1 / krKoB1k94 \ nrENc2CPillBWRLZiqnvioMC4mkp4VskehhRLRmEb6Gsy16A7w9Zwm629AbODM5LZCN9UiB68qDFy \ nQLeJofTYwuKaDqUNtx / u8s7bD8nlCae95Dfe + mX + 8W8 / ohNzlLjJUId0zDFXPcZJGnVFaPcwfclw \ nINiejbFNyJOnOUWvqXyNCmt25QvS4AbCDzBNBLFgNMtYXR1RLBe8be / w765eorsRibmNb3c5jN8m \ ntwu64AKhz4jTglgcQluRtpekvmZ / Irm1u0srO076E14WLzjoa7o24uXFR5xe9Tj1kF / 8rV2iGxuS \ n0yl61fLJjz / k8 / AVrwYDnLzJyTrmR59F7FX7ZM0Vi0nBwfYOn31xQZgqalMjnMASsqoalArZ0JCv \ nS7R1tFVHFiTEkUArzXpTUNgxOZawn5IEd9lUFdAxGI6pNxVxkNJVDW1tMJlGi4hN3SGUoOi7awWj \ nv74q7juHEZI4VEhjSZOAtmroOokWCZ0PWXeGva0tfCu4Ol0ziBLCKESFKb3wrJqCRjco09A0KdKn \ nKNkQBgVp0hMHIG1M4BTz9Ya2D7gqp4Q7FQ9 + + QHtYIhvXudv / uoFLz97igxgKXdYjm6zczDlganY \ nHC / 56 + 99yBfnJTKdIdMRZ + dzZumMdVmzMQJchO9BaIcKYJKN2ZQb4t0QNVD0dAycIk4FreuwpiGS \ nAV1R0LmAdaOodUDfG5q249 / 82 + 9jIo2SFVHjCGqDbtzPlL0 / H5ZOf4BxJWlsEXKF75dos2JvZBgH \ nPaleMxHbdIdjjuotdt54g8 + Ojjk9m3Pv3hsImeHVmLHKGG8fcG + vZPTaiJ1szdy / JEkSRmlPc3bG \ ndO8QoiGNv1aSKel4dRHx8vNDhtkuYZcQp0 + YzUboxmEvLmiWLU + PAk7zkH / XeIZiSjav6VqwOqUM \ nA / pBiulzilWJUAlBD6N + Q5oUbGWOEEEnAy48dHFK2MIk8mjt2RRrnG0RztC3Fdie2XiGlpYktIj2 \ nCKkikuE2de / Iiw5hUqyNSaSkqy1h2KFdTSgcofDYyiIAJ3sWVUddGegsV + UZl4uX5PkSaQOkDxBO \ n8ujRc / RXjahR3yIzyXf + 9e / z7 / / 3HyA2HiVDxklErHJGgw3J5PpatBWGdLKmGgfEWUftStY3Jlx6 \ n6FXLZJSigwy7bqm9pRSw7Ne0bUPnFJHWOGqMOSeTOWFYsBUbRp1HkFI5sDpkMJywanqcrZgNIvLL \ nNba0JEFPX9XUpSFKeoQH1YHJW9IgYq0GSDfENY626OiqDkNLWU84mRcMjcAvJSfqObKfsNpotpJL \ nRlqh9CFp8AqZHBGmErM0hMqRJgF5MWdTO7wMrqmkoiZSOQPR4poNYaJQ4xm9drhhSyoPMXnC2WVP \ nP72H6yyZrknCEyINB8MIF0RYc8jpq2POi3NMd8H770wZyoIBDWns8XKH0XCfiB6mr / Hsh19yfnLG \ n0G8R6oyTTx6x4gWi + yUOdl / HjY + 4 / d6Uo6cv6F9psJq / + 3TF705DtoMFRVcQMkQLhQ6u9wECWK9z \ nlplntD3CJTHhqsUZc63VNCVOtpjKUm + KryTzA1ZtCiuDijSRgKOTCyIpgIBbd / bwZxvMIEZITVc1 \ nIEOCTIN33Ng / IFDw5edfXH8TiuEow5oe5yRdJyEMQWf4IKLxmk1docIAJQBjCQNNVXdYYXDKIHuL \ n6 / 01ylxJwjQi0g6FQUtPFCrqWFG6IT / 44Jz / 9OZdXJDzzvsPWBxv8fL4h9Rty9ffe4 / / 47s / 4dOz \ nz7h3I + bhwPBwNGBx6em7Ma / OKoLQo / sOM2kRQYZwCts5BA4dgsBTbCTpeJ917elaRzScQmt45 + vv \ nolN4 / PgLIitYqed16CwAACAASURBVCuqviN1PdPZNpeXC1oURsa0zhNFWwjbUy1y4l78TNn7cwn8 \ noH + PpnhE3j8hmc3Z21dMDxripmUoApRJyNSALhmSr0c0csTha / fYe5AxCsa4VUvVe4plhrg6Y2vv \ nhGT / Ap9dsRcpqkqT + EPCw99mtX0XeXHE + vIIGzt + + GKB729xK30ftdqhWDiCIMc + Lrmaryj6mMIa \ natfRu32WSpDGAd2gpRh0GOUZCphsOh70EQ / DDNu3ECk6LZBhB1pSt5KdGwcUBzd4WvWIUGNwhLZj \ nGmvqpqHpO9q + Q0vJarlkMV8RxzGNUwRSYVtDrCKcUhhv8NITpprpdMrF1RGBMgTSECgDviEIPaOJ \ nZ2dPUW0Ely8tWRLSDjPapkL4gL7y6ChkU9XMxhrlKnZmQw7v7zMdbdGVHtGH0GiUiviFmyN + 890R \ nq67lsmnp0wCTRBS9p3VPQHgW5YTnFwteLk + 4NxihBhF + Z4R0nmErKMcZTVpB39F7RSINQ1Gyncy5 \ nPdqgrp6yJQxu9ouctRkb67HCoZUmjGOGaUpXrdGpZ6wa9qOU / VmI6luGMsH2EUM9xJY5TV7j7TV6 \ nWsoQL6DtHKuNZFIkxFlKUQjOop7de7 / AF8UpsXFEu6Prum9vmc9XmEYS6g5nC2wfgGgZb2WcXS6v \ n / bpsCFSDDjNkOGK4PcMPx6z7jk5HuMiybHriMuON9dsMkzkRH / N737mNSE / ogilVe58 / / l9 + wk9 / \ nfMXQ / oj7b2yx9Ru3iRNDU61Y6Zgf / OQEO9ql1rf5QRtxslDcn93ina1dggvD8atXnGvD6XjCq5u / \ nyJv + khtv3CT94I / JCs06OsRuv8GJdmQdxHWPsorpYEosZ9RtSd + 2DLKYra0tTi5OGEyneGmp2pIg \ niJAI9ra3rnlRmw6pNc43tA7ySnJr9x5hICibHAKBVTDZ3ePVqkNEA9LBGD1wLDclQjm0Dti / 84B8 \ ntaKy1wDvyXSbyWjEk0ePsL1DyIA4Tq / 9CA7WVY + TMdPtIVqGBEFA15fgPbPxmPm8QZkRNnA4u0EE \ ngraXtGaCDy3hICTbnrBJNLqd8oO / f0LXzvkv / + CbBMGI44sTPnnxMWLa85v / 2W / x3X94yRdPxhw / \ nkXxsj9lNXnF20VEFMS68SbVxxDSsX6zwAhqvqXvPII4Q3lO3PYtOEU4zqtpie80wyIiU4osXG4JM \ n4YNdiCWTeEpfbtCh5uDOQx68HuOd54svH / HJJ4 + oSovooY9iTPDPUHFo + oosgSypcf0zsI7hMCQV \ nPVmviPQ2L5KARoMbbcNgSl9aYldhVmfcGwwZCcHFUJKYU4bhMV1X8SyvaOen3JneIDx4iy + OBKdP \ n5gTLORNREdyPkds7mCrm5PwFq / MfEiSar9sdqiTAy4o6sJhYERhLsBZsyxgKg7EBYappfUNalzzo \ nPK8XG + K2QsZgE8XjYEbvPavWYtqeNFDoWFIvK1IpcQIy0eOlB + HY3tli78bX + PCjT8iLGqkCVsua \ nJL2DdZ5yVSH8mihyeJ9zcHeHyd6Qt954jz / / 3xZoaVC + JwzsNYNHKSbZmDv7t + kmguLsOY01BEog \ n8Dgv2d3bpakrwliglGSoJDvxEDEa8X / 95feoipbYSXzXUZuO59ayl71Bp8f4aYuMY5Zrj7UFmhOK \ nq4pPNs94KgIyWobnT8mDNfVv3Sc63GV7GbA3yhC9p3KaSA5IHdTnF5w + f8VwWvCNm2PSbsmLekGH \ nxJiE3juUGOB9SFP37O7vEkjDmzf36E7OcaYhlgGmsQgfgFXMtmacnHUUJzmtaQmiAUka0ljD5VXL \ npr5gZx7y8PVDfnwW8Iu3K + ZFwSR5QKin5PUj7j98yGyw4Gj5MZEa0PQdUkUc3jggLz3iyTFSNwhX \ nEGoPMiEcjuiVIG8rGh1z78YDNpeXLJsNaTLGzxcEkzW / 8q177CSWwjWEOqKrFOevzinWDQMsb97 / \ nFov1Pu1mHy9CfvTDR / zND5bsP6gY73s + xmPNjIM7b5K9vYf88pziH1uWecDjTtC4A6LRm / R5x6AW \ nDOuWnpaXV2veeP09yqsG3QiU0YziCWEw4XzeYn1HWzdURc10us3ezUOOTz + hMZbIeFQa0gqBc5Ze \ neLQHgYW4IxgGpNNtsnBIOb9gVa5AQLepMFpQ9BolYpLJiGZzTJxF1E3Djz56xHo1p + gUQWdYzDds \ n1jV1Y9BCk0TXgW + cwBtL2cJ4OELHGViHl4K6KpHCEyiJsBZvA6QqMH6N8RrhJ9RmhEpCbGKpA8nS \ nSCZEzOKEct4xCQ4QOuHZ8x9jQodMOt75pV2pppNn9PUQw5CL8opVvqI0PV / 7pV + g7Sb4q4DTFx9f \ nX / 4rA1ISRgotA / q2xbfXNNz1xqDSIWmWodCYztD5iKZVqDilw5OEgqqCoxcv + eSLPyfEI5xnkGbX \ n5NWqpTEOESSs + 3 + Gh1dq + AVwieOSJPDQdfgGMpUQ9pJEpiz3d2i8oLaCKK4ZhT3btuThrmGr / pKh \ naYj4HbJNg + siXi2mhNO3GWw / ZjrdcNF9wHIQoK4mHLolsdnw7MUFBSndyvNWEvG12zk + WcDxt6nb \ nkqhbMWwLJni65YZZPEB3CqUV4aYjlAktDX2 + IHQto1s3eOPuG8SJ5q / / 4 / eJwymdVLRWgA6p2pon \ nX35KMN6hKhuCriNrS3SgyCIJruNgd4fPAgXek2QJf / hf / 2teXD3hb / / 998iiCNVKfKPQasz6MuHk \ ntObl489I3BRnW4yp6QwM022GKsaXQ15 + ZqmqDYM0ZBBMePnqMc7BMBvyB3 / 4h / zlX36X1eIMnAbj \ nEEFA1zm + 8a1v8fkH / xanG4zoCLQhuPl1Xo2 / zUePLphmFt1JfvrZCXRX3N1bk / QheS4IQkEb9pxP \ nHbfu7jMehBSLM7rSkW4F3IkTLlcti6uaaHaL4Tjh1cuC1WrDyTBBuoKlViy6Diuz6zFcrTFe0HU1 \ nd25Nefzkp2yNpkzSIWFq6WyDEJ666 + llR + 4WtIknmwS0qxbfe3QsCY0GrdmUDaNuzOWFI + eYuN6h \ nCW6jH5xSNAtk + xpRkmDDLwn9ENt2WOsZj7b5zd / + Dperih999IQ + X2H6jlgPmezcoHQBrbekWzOG \ nw32Wtef8siFItq4rx9P / m8E04tWx59bdb3Ox6Pj + x6 + oxSuayLP7Huz5Q8av3ePTi46N2eLoRc4X \ nHysI7mJNi6mf80vDX + VIlzw6O + F7Wzn3JxHPuoByndFfXdB + / ITTyR5XR2e0i5uEmxJFhK47NvM1 \ nVu5z0Sj6ekFb9DRRi0Si5bVpra5rNBGX5wv6ViDVgNZqfKs4njckQUTnErzQhEoRDqAXgudnS7JQ \ nYGvBrf0HFOWCWkiiyRgjd1nXLa00VEayd + sWY + 9ZLxdMo4zhtGc / UJyfn9FUFYNsQtfWKBXRto6 + \ nbYiiCB2PaN01CdP2Hb6u6U1DpCVNmZOEIU0v0aHESXO9H3CS3g3RgynxzGKjisxvU51UUBzz3 / 9X \ nv89A5hRlw0c / + jGBDBlPM5w7oy2OiIgxzRIrTjlffM7v / av / gm / 8ym + yXCZMmPGnf / QMGGBtA16h \ nRIQzklQOyEYdVuRokbBqagbjCfvbWxw9f4rzgiAeQjKhIUQpR0FNSYKWFul7pDA0vUF3JZHssDqg \ n9A4bDX + m7P35jHTGa1xV422MdLtkCiJRI3xFFFlC1bJeThhMxsRpSN9WxKpjoHv6bk7RnCNkj5Z / \ nRRI3ODPA1iPm85jY71OtW7rhgAunGXYbhHZ4IVjnFaXQDN2MsIgJG4GXlk / ijrZuaZuKaWuZ9JZB \ nPCI3LYugowkUadry7sEBiRB8Vq1YhBFfTCOO25wdn7CIxgxcz6o3oCKEitA4BtrRtRtM2RKgiKKA \ nzvToQNCYnh / + ww / YlCUOT9MZ4iSjbSTeh3S9I8IzGQ8o6hpjcrq + Zb1cM7EaITxeGCBEyhCtRkg3 \ nwhQQKMlkN + O1t + 7yxZPPWRcNHvjkk59ydXGB9y3BICMVA / rOUHWSDz79ko037B6OqPsFjbnizlsh \ nefWEXuforR0 + P3 / BZ5s1YWApneXtBw / QrSNblhwPA1bfuMHt128x / uAR5Qc / Qb5zk + rOkjf3xuRf \ nfkq / 0FzVgmm2w + U6oSwkcvcu4SjEtmfkxQKhU2yjkeEE4RzjbMjFyRJhxmy6jCxOuVifMguuiZm9 \ nsmxMTpPUiO0ILgVOOtCO1tRsypZptEcQaPAK4UNye0i29ZCTF09oNhvS / YxK9DhivAetBL71hDrB \ nk / K / / tGfcZFv0HGK0Jq + AmETouGUy / nmWtItJM4rvFWYzhFpw2xkqeIvCXcecHJh + LPvPqIP3 + K7 \ nf2OxoxWHb95n57Alqu7yg / NzXiwNR + ev6DaOQiyQ / ZKpWXOwfZdRveD5xTOW3lG / dghb4PU9TF4x \ nEWuGF5 / TmQNqE + Cyh + T5GcauSLsjJiKm8TGbWLE67bA + oK57PPIrb4NCCo1Aka8KhIsxvUfoBGM1 \ nkiH / 7X / z35EvV / z5n / wJxkHZXzGbTdDZlPHOfcZxgm83WGuobEMrI1ZFzWS2zY3bd0nHewRBhLWG \ nqDUMR1Ns11GeHNF1BiE13pnrMZLSOG9wzhL4ENs7nHEs6znSWSLlwBo2myWmK5ESkCHWGaSSJOmA \ nQI2RYUbRGlKZ4oHEjijXL3j / fsLbDwWie8L8XHD56iWhTbi1fY / nn1yxfHHMmG2Mq1mWr0iThLdf \ n / yXa9RDRpZxtnkDQ0dsOLSPSYMSmsEgLXitGieLdd0d8eVzy6dMFyhS8 + 8bXOD / + iMl0wI37NxGT \ neyztiJ1hzEc / + B6bVU4Ux5jNFcI6pIdBEiGanrqDQCVYP / iZsvfnEvg + zNDEuDyjLlesZc5wuGYy \ n6QjijjCAO2KE7gOcEziREriUzg9YqinLaB9vWqbin1hIjw3BmAWmcfz406cM4pQ33 / 8W88fHzM8q \ nNplBDSpOxZI + igiSGVUVcDYPiZmxHMOicbQiI1KGPS8ZdI62F7RKUXQOEwg6nSLLniw5oDA1tZtx \ nebQibwy76j6puaTx9nrxaHr8JufgxiHSCOZlDi7BRNALT1u1XK1XNMbSOUFvBd4U / MVf / Afmc4Ni \ nC2SLFQ379 / Z49uwL6m6OwhBI + f89ja30JONtVAAqUkgJOg6v62nC8 / mjxyzWa3QQ0fc9H / 7TTzCm \ nYphKXn / 4EP14g3U9rUho9JB47zZlkODTAav5K3YmPXL + D3zj5j55YYlbSxonzHuBUq9xOXyDyS + E \ nPP3 + 36J8xOTwXRYihPIVbnxIvLOFWF7x + msP + P75E9LkEBkUnF6saGxFNpywIKLzCVE7QeuEtpdE \ nyQCsxrYtSM3Z0YIk0JxddIz2pzw / uuBGUjOOE3rXsipLOuXIbUfROJAJphOUdY3WCmMaJIJyuWTh \ nDFV4nx9 + 8FPieE4qZ2RBQBevSP02UbhN352gXIhxkstFjh2PiEYTdm5PeHl6AjIgzw153RKkKfF4 \ nikPRlAbRWyJbsz81PNgvyE3HYCsjSSTPn8xZbk6pncKaFBnN8GHDp88jLus1S19ApEkiT9hr + nPB \ n7v4DlNzlwr1ABDXiPOHyJzVXtyxb2Zsc1U9wwSWifsHMas6950o3qFQAFYlYM1ZDtibbhKMBH / 9T \ niREBVgRY0RHEMVp2JHFCWTdcLVeYOkZ / RehUOiWdHPD9H31KqBTBYJ + + qokyhUqmmCBlY2B1tSTw \ nDTJI8DpAeMtYxdy4cZOdnV36Hrre0jUdgQ4ROB4 + fMiji3OMvfZKK6XRgQIc3nqEFHhhacoNzvSk \ ncQDeUlYV2I62qXCmZ5BluMSxXtWEYUAcBMjQgSyJ0glN5wlkRnl6QWQ3PLi3jQgu0bpmuSwJgxjl \ nDR / / 4xMWLxYM5ZTeOdZ1gS0F2zfe5YuPG / ruHC816M9oqiU4EARYE5DEMdVqiQgVWea5d3OL937h \ n13n1P / 0JgYTHjz / h1u1dJrv7NKZjPV + Ty4T1Mica7bB36z6RLXj1ZcH2dEpb5ty9 / w6 + VKjzknWT \ nkMqdnyl7fy6BX1jLJB4S + xizrmiNxMsYYxybjaI0Fn0rRHqDtoI4ydBhzKpuuVg3NH5APBjSL0LO \ nNwWEmjTxhOGSu6 + PkOGIcvOIXXFK3H8Nkww4ZsPGXDCOegJp2eiKWnSMupCDZYSLh7wIDYsYFpVh \ nyzkGMiWU0NU5O8ayfnWBDFNGPmBrOGTQRFg1vR59GMfQG3JjMUqjgpDNesVFtSbXGYkJcYWB2zs8 \ nuPU6l4srjlcrCEPaskGHMciA7d0Re7slT568It + sCbIh2fYMfbpF0I2RrQdX0Q + vqNqc3YNdpjsx \ n5yenhHHPeCxIg5R8U / P05ZpNtWBrZ5flosAZibMdbbnh4d3btNWGjGsrUCsyjtewEdv0XUKhwSQ3 \ neXJZkwYG65eszhWh3yZlzqoXdMWEvBKM9wTrgUGsBIOPHIu9gNODh / jdmHe2BXdXF6i1oGpi5l3H \ ng3tTbDtHmpxMhFCvaVyDFCnOJ1SmItYBZbHGW0PZQ + AUz58coScTLpHsC8EoCUi1p6wM5brG6Ajh \ nJvS9 / UpT2eNMQBjGaK7HELHQBL2n0ueU + Rb39r7OwcFPkaJEdr / O8ekpIn5OrLeouwW9k + hUU3Q1 \ n92 / d51e + 9cv86IO / pylKTO + uvcM7 + / RKsV4VSJVSXS4Y9Etu7eVM5Atef + ebxKInGjYsRkseHR2x \ nM3uDeasIu4yLJyXPL4Z0QYwYb + NViTEl492E2cFb + HjI87mhimr6JGIW3WLkJ + CvkKMtzKCibS + I \ npCTuckbDmBf + gjK81omWBoqV4PVtRTJoaFB0QtEYh0WC94RCXmOau5K + NoS0eKEIooxGQCsFLo5R \ nYcKmc4zHU8bTLYJkm0rEbLoWrQAUSkk6KwmihK1Jxv07t / ni0VMu50t0GJNEMdJpnj5 + xCCJ2N7d \ nZbVa4pxBK2jLDd4btPJ4b8nzGq8iurZhFM6QwlAWK0xbE6ivZvuBQkYd1k7p65bNumOiN0SpJ44H \ nOBtjuhjlXpKNHLceHFIYj7CaPpzwnX / 1B / zP / + ZPEV1LNtwnX11RF1fk6zWCKTcPfgXTj1AaqvqC \ nvlogHQgf4voAiSQbhmRxQCpXZLMI5x07u4fE6RZ1LwgHMzqXU6Pp1QAVTQjlkHE8IZn + P9S9Sa9t \ n + X2e9 / yb1e / + 9OfcW / fWvdWwqkiKlCkzlmjLdoAkDhIYQpyMbGSSz5CvkGGQaQZKYARBgsSJpShR \ nJASME8mSSVHsRLLIqrr9Pf3Z7erXv8vg6BOEA0KzPdzYwH439rve3 / OMOPnyB8wjw3dTxcWLz5nv \ nH + EnHXvvpczMlD / 913 / FevkT4D / / / 529v5oOfzJQVVcoIUizASsG2lZSuwPsMEJ0BT85XDHLUvYi \ nCKKnvNogdMZ4vEe5qdmtO4psj2t / RNCaxfAWt7xg0wXSSU6hWx5wwdODn / HD5ATHKSM / Ib6u2Q4X \ nyMxwpAs8iqRPGcuYAxI2nSWpA2OpIA6sM8NN7Pjaqw2L4wn / 3u / 8Xb79R39IuHtDQUY6TikLQyMM \ nR28MhdY4pQkhME40mR + ouprEScQguFxteX17i3WGqu / v + f5JjAv3GsIXL17Rr5e0todYQRLxt37r \ nb3Nzc8Pr5QtC79ECumqEIkMyY702WK / QUcrJ6QmxkNytV3gh2T88Zr25Y7ncYY1B + cAoTwimY7e9 \ nZaH2ETKmtZpBzQlZTN9mVG5L2xr + 7NLx4IMJznkaOSFLDnB3PyRXJUnfcpY7yrsGZxui6SnJriB9 \ n + D6fLjYcLI459Hcs33zGj171vF2ecadgso05nj / A5m9JNjtypYnmU4Z0QmMDyJjBdgjZ0TY7xOBZ \ nr25JdYT2jqcPTxGvXuLrNSQ55U3A7SRGJ6j + EK0E1e6CqrYEl + GspA09Mo6J0xHKSeJ4TpYmXJ2 / \ nYHNzi0nG5AeCTy / fUNUtSkGSDbSDpR42 / NP / 5J9y8sG7xKni5J1DVpc3SKW4urshMQ5GkkFFaNmy \ nu73mg8cRJ7OWveSC3B9yWEi66g1nC8P6OGZ4e0dwKZvXbxGqx2cbTAgIP2IynpPLHKo1m35F468o \ njmLk8JSbFz8nsTmvlht + UX2XoX9AqzKyZAprUOMJmQhI2zH0CZZTlHqfN + c18volJnuB0x8xOCCO \ nkc4jvSdPwDvHYr7PalXhTYVSMaicpMh576P3mM73ePbzz4gnGVGSEkSMDTGoBJWlaOHwxtAbw2pb \ nk4w0t68 / 49mzZyT5mCwfE8yAl5JxkfPw9ISLN69huyPLM3bbDVW5QwqPtx2xlvc / AKZBWYfwlt36 \ nFoKhKjcE2xPriOAcPnj8pGGcHdLtBIKeoa + YZhHelwQ3Yle2LMYNoQ0MImJrC4z1pPNTjt9TrLvf \ n5eBsDKOKbvOagSWtdcyPHnPy8APWzQaiFdgVZmfRPrnHRYgMdMx0lvH1r3 + Vav1XLFJLsTjldmNJ \ nijPOL6 / ZdTFRNkXHexjmDIyQMsI7x2q9ob7bcTKKeOfRUyLhiBTsjMP1x0gTIZMGxPqXyt5fSeAL \ nPeGk6HBiRb / cYU3KlTzAuoiTweCznq59Sh0r4qKl92 + Znw5M4h4pe6IkZlV5LvsYqy2RSqj8iLJ6 \ nShgEi0nMtvoRiycjXvZTNpsa2b6BZMp6sFSDYe4lVlt8MWCrC2S0oMhiqrViJGv + o9 / 5kG9 / + 5yr \ n64w2ecPF4jFfmQtm6ZhNNsKpkpk / YW1uoGh5GH3ClTRcupSlyPCmIS1vOI5BWcNSOXbzCclezOHk \ njOXFBr0VJEKjtGTdrIiLgE0cAxlFOsJ0DVSS / + a / / uesdyuk9hTTezaPjTOkN + x2O5TriVRAOc92 \ nt0PHCVvviY5OUKOExekR3339kulBhh4MrnK0peGdIuNxMlBwRbn + O5xm7zJ59zlnBxHf + zZcNwes \ nfcFoGHO4aZhGPbvxFWFUYNcZ00hz9k7G9UXLwk54uWk4fNKwVzQcve05qyJe37zh9lVCk6T0FMRB \ noSpJHCXU1rOua8ZZymS2wLnhvgePMgYiIhnQw5qRsOz6NePJjLAb8ZOfvMReFhztfQL5L3j56g1n \ njx7DLuZ69RbTjBi6nGFocMEjvERT4K0kWI + VGw7amAZFPHrIL5p9Rn7Dl5MNk8kMXb9H5QWdOGL2 \ n4IBQTHn68b / Dv / jj / 473v3RMPv4t4jynlz8hzj8hRzOszqlahSXlbz38Ib9x / GMenj7mZbgllRlW \ nH7I1 + 1RNzyxO2BMrDAM + f0AVRUR6j1C2TGpF1pV4WjqxY9uv + ejxJ / gA7WbNZDTHyx6nRlj1TbZu \ nSzT1KHPCddlx / dnnqDgjbQ / xIgUyojTlIh5xxwITPqZUV / SiI0 / vq8Sqj1h5zTieo21Dqi3bQZOm \ nM5wYERWH3NWGMHaEJGE8yphHCYOeoEWGjlOirLhf8ThBoCWWFrPdIZ3Geo / VBpdYjLFslneYsqEr \ nG7qyIo97hJD3dY6 + rx5d0FjrkQSciklajRYRpu0wQ0WiBoTusaGm6SICkuLS0XBDJGOC1my2FnsZ \ nyBeBbNLjgKo / wJU / R / oLTDvQyJwtG / 7kL36CayT + RrK9 + Eu + 9Q9 + jd / / w5rF / JTf / Lc + IOUVkZrT \ n2J51 / ZzV + r66IskZHR8wPRmxNxfsLwr0m4xqW3H765rYv2E8ifEvHcm4R + URuTviUI656gxvtUBF \ nEWLIyGzPKJHstj1qdIaZzJjIjPb8lrvzK4aVIo3 / BjptpU1InUFPE2yj0SZg8DS + xpkNQ1LzaN0T \ nKlArT1IY9o + nxM5T1g43RAivUCimQaCrDtl1ZKOO4C1KZlw3GXfPFFuZU0QBOezQOqJ0INU + Xmds \ nvMAo6NIxSfYhcXZN3b9k6Eb46H02m1fkpSQ3J7RHINSan33 / msu3J8yjZ9j8U + LijNOTjzlV + + j2 \ nz / nsxS3jxVPuri45SRyZ77EGSuHZOc8QDtFJxnwv5vp8jQ2SKMp48Pg99EiBFJTbNwzWUYzHzOYz \ niCVOarqqxHT3J9YoS / AG73q0d0RRRN8bbpYr0tEIo2Oy8YzatpjB8fHXfh1letav32DqFuMk1gvk \ nyFH1W7pe0hiF2AsMky13zZaNFewlM / QQ41clK / ua1ZBiZYLxmrpqWa1KmqoB49BIrCzJs4Fp12LP \ n1wRTUmRTZCSQ0UCqUoLtWK1qNnWLFDE6JKQ + Q / UBjEHGMUpnRFLgZEGkB + KsuLd + WYM1AZnEyGSO \ nCwd0dU + oj + hXilhuyKI5MigUgjTWdJVDKkkeF + R5co9 / kANpdkqSnPLm + oJFYvngZMbQDYyLKXX / \ nCptkHDz4iHi24C + / / yOevPuU8u6KWex4uHDslhWjISBdT9etUPqIs + Ocr3414bjoWa6XdLmmSHKO \ njx / yxRev2K43HB6csd42XL25pd0akqPH7I0DndX4xrJrA4MKVAgW + 495cPoJL37 + DC0qkkhSupo0 \ nmzNO5zhxi2vvCE3BYAciIQg2QosJRniEaxHO08ULOrnAhgSfNCQ6IYlj / uFv / javLpe8ubqhE4Ek \ nNIwnY8q + xphAlCcoldI0A / ngcCGggWAtw2BxciBJHWmS0PYD1gsmoxnYgJMtSHsf + M5xd32Nsw7b \ nDSgPCpBS3TPog0Cpe + bMYBwISfAOSSCOE9zgGHpDjESqBBs6vAGhYoROkCKhTwLOgwOc8ASdUHkI \ nZkC5hjRLSPuOul0zVhGFmtEMCaaP + OzTzwm9o76tePjkhJPTx0wWJcbu8 / 0ff5 + / / 3e / xbiY8ZMv \ nXnJ1ccUo3 + Ps8bvkk2PSoxkmapiOPZ / / 9GdwseIwTZm + 3RKOUx5 + + IQffHbJ9nbJ2ckppRVUhxl3 \ nmyvmNsKnGU3myaxiXGTYlWWQjrXu2Zk1pvmCUVwz2reYNv6lsvdXE / i9x / cdRpVIW5PHGqfvXyu9 \ nRKqSD + 0XWD + hN3OaVUxTKtokZWkCazwuzUgYkLVl7gx5uCGb7egjwdKfIbqv8vpqhJg1yKFGlJ5Z \ nkVBkCU2WEtHPuAAAIABJREFUUnvFzWDIdEp3mrHn3iX2f0ZRWDr7kH / + P7 + ERnCga / JGczVULHct \ naXrL0fyQxfQhR5PXrFY1fecpk7c8OWgQ4wXNKKc5eoS / XeFrQ2UFuV2gbUG1Nvz0 + jM + + dLHTA / n \ nDNZz8ughalTgI00xGUE6Z6pTDsdjdps1L1 + / wAtJmubgunschakJxuL9 / SZZqJjVtkQVE7wF4pTp \ n0THV21ds7nZ4A / W6otkNpCpnCJJWe258iaSn1D13rsYPjpuLK5bCUo9TslmMchYVaYIXDM6QZAWd \ nb9GDYRRPcanFux2RjlDCMCkUb / oVpwvF4fSAq1cXCLaga3SqIfJ4BCLO0AHG + REyTMisQw8GdIZr \ nBb3zdL2kbz27ISJNxvgSXFORus / p + xNu6yWECe3qy7QbixYRdI44OAyCPBmRCUFbWQhgh0BQgtI4 \ n2rJjMwwkxzB6711evazZ7Dq + 8rX3eV5fwfgErXK6RjGdCIKAmzdLCvtTvnb2ik2n6WzF2hmywxF7 \ n + yNO9ypacceLnSP3e0wHyYPJGbqXrG4uyEYQ4nP2jwzvWM9PXz0nTnMenjlWDspoTmNnrExE2ecc \ nTE6wbYzYDXg68nTGsm9B9cTZCJ2MsX2PUxKpDd52KKEIyhO8xYUODSRpDCInkSOIHyFsx7uPHpFM \ nZjwaH5MsTrh7 + xxnG2SckSSWzlqc8cySnCgbEamI4AXeQWsHhlBRxBF + 6FheX2J8QCAZHxzQlhWd \ n78jymGazw7T3 + JBYSMRfm7Y62eNtjxsEwXqUd1jrMdailcA7jwiQFDFd3tF0DVZoAh4RUqIoJxDA \ nRwQhabMCCJiuJRKeYHoOdXJP8WxbIt / ylXdKPvrNf8BBfkC5HNG7BX / yf / + Qy5drxkmC7Upe38a8 \ n + r0 / ofZH1L1Bx / DdH / 2QJFpD7InSEel4TLGYkhZjOmuY7I2Jo57rpkNYS7zacv3jFzw6eJfj03fY \ nO3jGfKLB5ayrlo1eo1zFOzFYP + X89SviWc4v3Jarq + eksec4O6WuOsqq5GxSMJvHLG + 3v1T2 / koC \ n / 52zEybLnvXwFiUtOhI0tkGaEsMOK2r63FANLbo4IhIHJPNDJvMJiWsRXYuLNdQe0ZeMdcdMxDhb \ nUDUaG81wSUypdoxDYD4dYUsFdUVvK0oR0eiUIY5JJwVl4kn6z0mbN9i + pvVvCDZF2ZIn05Ssfs4X \ n23d5XikePPqM3 / itT0j6f4y5 + g7T0Tkff2WPt68 + pa / fQ + qcts + 52exQVhO04E447pjQxRO0tKzb \ nW4r5gmy7xfUDcjbj5c2aavDsHcfoyZTdYNkfTVheXZHM5pwc7LOXZdw8e0m9XlJ3PdZZhNf3fszO \ nYoXgpJig0pw0k0z2p1xfx0zHUy6fLzFlhwoSGUlaO6ASgcaikNDV9HbF3I + JU4MOrxHOMIoUonPE \ nxZj5QrBya / YmM15ELcV4zvHsjJuXl2xWG7YMbJYx5XbJk0envH8Y49sbrs2OoSvJigSnNTJJiKMY \ nEaUE48jzKVKmmO2SoeuI9QgnA956nFHstjXLVUfmM7JugQs5Tz + 55mBeUl7doPI5m / WcapXT2gLZ \ nvWSkJA5JLBNEkWCqLUPfUW4H4tihVIKKFdM8cHLsODhtKfKOb5x9zMs / / Cusdfxn / + w / 5V / + / ndo \ nq4qvf + Vj / q8 / / j8w65LT2WsSccPx3kM + 3zqGg4z5x2dIF6D8LiF / TYhn2G7KPglvvrji4cMnbEuH \ nyGP2RgmJ7VEXKx4sFvTtDexumMdzilFGIjTdRhHaHNP1vPj0Z2RDjYsHDg9nrG4qiGOiZEQSJxjr \ nwSRY0RMnLcGD9z3ONljXwtADlqIoiKMFepSjgqOYjeld4K6q8DojKuZ0uxVSZ + SpwXeOvuvI4pgs \ nK2jLhr43xEHiCETC09dbgh1IR1OapqcsW8rlmq5uSKOYu / UK5SENCtU7gvEErfBxRI / HpgopMmQi \ n0Ugc9 / 9IhHBIqdHC4wdHMzRYYREiIJVi6AdklKIUnJwe8fr1a0Z2imLAB4 / qGyJvWJRbJqbkcDHl \ n / UenfPi04mBPsby7ZdVZfvziGb / / B / 8K5y2He3PaMtAMAwwZZR / o / UC / 2TAuBFqviETGpJjS9oGb \ nVUk8JFgZuFqdUy9fE6 / W7IuUN1HLpbLkneYH / 89fcFTMScYRPhGMq57Vn32Gzzw / yiSnbsqTQVBX \ nd5yfCV6ngf3eob / znGGIqcSML5YVi0WMz / 8GrnTGeylRr5glcwoXI + 5qyrLDOk0nRlil + MGQ0XjF \ n0ewILRV9XhIKR286rK9R + Zim0YQscHu7pAhjqvWUssvYe / eUJH5LUfyIJ5Mv8eXHj / nFsmNoBnol \ nscGRxT3TxDByVxzrL3Ow19At3 + PlDyzJqKWrLpnHj7lTMaPTNep2TjKZcHv7jH79GcGO2EtaCjwy \ nZIRxxuVyylXwbCOPOJ0wGh3QeUf54pyL1TWVangkPmAy11ihaQjEiyliPOadvQeMFqdsqwrHHR + e \ nnPHVdx8xBEeiJa7v2G221MNAnBfIxFKLkqHtMCFgnSPNc1ob6NoePRkRpwJj7o1N8 + mERx + + x89 / \ n8kPK7R2ta / DCoI1HtwHdlEwLz8LMmY9Ssv5zHJrIQWscTZTRD4Gqqjg4mRGSK7yOePNyyec / fkFE \ ngiZhc7djdb0mtxNWoaLfXnP95pphM8MPKV7k2BAzeMV0sYfoGoJv6ZqOOLL0Q0cILYiUPI / ptoZp \ nnGGL8T2GWG6I7IKROGD9uiI0T9msG9ZXPV3QxKngaD5j6Ne0VUREwnZdEUlIIolWEVpECDFCC8Fi \ n2jGfX2NYcl0bHu2 / T4gWZOlT / rf / 8V9xcfsTvDrlv / wv / isePTohTQK77oqxHXH08Eu82ouI9qFL \ nYqLLG87CW45NycaO0JFks9qw3O34rfQIFz9lM0jMteFgvmB2lNN7g + gG3ry65un7BUFcUdCS5CM2 \ nIkIMgkxLsrhDp4o8i + jahr7dkiVTfBqDzJGJQpqBfhhQUhJnmihxOGMZ + gbvW4TvMW1NLRyjLCbo \ nlM + ffQY6w1qHUJrBejKdkESatrVoAa4bSNVf6 / + 84J4 / 7Bn6FhlFaK1Q3mKaGuUdpuvI4gwpBF6C \ n6wfEALEJ4AVd01EFSx8LZJaQ5iMipdEofJAEB8J2KAFKWIbOwKCIhSY4gzXm / gE + hgfHc / 7Rv / t1 \ n / uiPX7Oo35Cm8OH7pwgXePvyC + ZTTR4H5rM1HzwS7Nyaq43g9fIVP / psy6eva2bHRyyXHW3Q + DiC \ nYYvpM / p + RzJKeXi6z0j3TPOSNFE4vUcn9 / Fqgidn6Du2mwrRCHI5pxp6VBLRtFD1E + YnMeZuyerm \ nig / fO2Yy3TJ5JBnkBJfsUxhHLnuc6qnNFjm0ZGqGH6WUDob8Xq7SjGJCkv5S2furQSvEhuk8ox4E \ ng9A4HzHo + 7nVst7gTU4en + JpISSEuGfj1lSrQNNDbUckISMEgY0Osacn1GHK235N2Wz4O5OMp5MD \ nyhvL0wwOY8X3dgOVzahDTJwoUrPjQNRMfMs3HijC6IQ / / bwh1 + 8S2wt0GxDzMRfJhHU34oEsGSLP \ nbnmEFB9iRiV2eo7bZhwvvoGdZ / zg588ISUQIAZXm3NSGjgyKJwzbJVE2x7uUyaTAJzmHj56wGzpC \ nkiHilFVVEcURi8keQkh + 9unnqDihM929ACZOUOMpmJ400ux6R9e7ewcknk07sP7JpwgN0Tjj8 / Mv \ n7vWPXpKnMV5B5y3V0DLbnzE63mO3tchhYOV31KLEbVMuVjeQJ6T5hMred9 / XPSivyHXB0WxOMc3p \ nvGAYFIvxMc + 7JUErxtkeXRlIVELXGPL0ECnOabaaIAqCLgi + wOM5Oj1l8 / Zzhu4WITUUOWhFIxoi \ nCXJwJMJhmpqx9wx9x5B + QZS + T3Uds40 + QYUcwYZ149DFNbE + p91BV7eAZmg9SZQRx4ZIS / I0ARsY \ nfIfwkBOzvjCsTifcbmv + / PvP + P6PHY05Id7O8P4cZwKhPCMNUJuWwU8Q4Rus1oLzaQzTgd12w6NO \ n8iCT7BvougZmd5RDx5OPvsJ / + y + + jR5 / ndZBU6549fYXfPj0KcPNCzocSjzE7gKLYsV + tGaPiI0u \ neLvtEXFONMoR0YTgDXEicVbgrKHvLJKAEBIbPCLVaKlJI3nftRtPVzvWyyvG6T5KCERI0Thury9o \ nyh3pROMCpFHCdDZl2PbEsaDIExIRs769pjg5oXeOLI2RfYdQAmfu / bT1Zk3TtgydI6AR0mOkQ6JQ \ nSYITHqUlkdQMbY9XHu8lyHsPhNAx221FV9WMk4wgNUFovDUEEdBSMpZjWjMQvENITyQcqXAcTBw / \ n + M7 / xFc / THlCYLFXMD / oePrhI7alZraXUUxShHB4FFfNl1i2LftHHb / + + JCnlcXZEc7OaJqMWGq2 \ nr77HX / 5izen7J0SZ4ewwIws7CiXwRnG3iZgv3qElwciUpGvYnJ + jeo0xFsUYWdachpjlhaUfZ4zj \ nEWciJiuvGLIt4UPNXjggbxJei7csxTmP2fLVbQ0ZXI8P + d6DOVVskGKFGgzeNGD / BkrMq7Ylblpa \ nb8njlM62WJXTW4uVYOXABztLrSXmtsJOHGKUEEKCivbYVjHz6YdM9mpuN46diRmCpdtbk497sn3D \ nRDzgJP4WoYPLt47BLGhcgpU5kZHkUcrMRBwpwz / 7nQ / 5wz + / 5u3zX4C6pm86iviEPr3m7 / 2T3 + Z3 \ n / / tnnHrYGcEBLZP0kuv1FNedcNxfYv01jZhwcCCx9QZbNVxfeeLxI8ToAePsgFm0ZlkatlGFGyz + \ nYkmUx0T5AqFSkiwlEZoQHGMB7eoO0RkipVDxiOX6jsOjQ4bB4buGJAOzbdjuahKlUQpkMMQK0kQj \ npcCXhsZ0qDjFpIr + Zk0y30c1FaPxnBvjCfMDmt2Wu6SiGg8kSYQfMtzBHD8 + 4k6k5EIRRwkzG0iG \ nkk / / 4gdstlsmsyOubndUu5pIeMRgiXXMqJgQmojdrqV2Pd2Q4Vx0P8uLpxBinB8Ig6VtGppmx7gY \ nQSTpnWTX7Ugjz15yD6Jqyh3SgfQSLRYEL6hWkD2eko0TXry6Y + OWJINkogVeOBwC7yNUlKMjh3OW \ n + TQHdy + UltlAqguGbU5RfINhk3N1uWJtTlBTqF5 / h / 3oBNf2pNLxcCH56EHKn / 3rjmj8mLL9iJ2 / \ nph9a4vo1 + 2FGbicEP6arIhZpRCt2rJXm84sd / 8P / 8qf8xrf + CafvPKWvHcbnDGQMekwVAlHyiKGr \ nEOmOIh0ItsdKwckswyuBoyLLDtjbn7GYdlysLN51IBVaCSJlEWJAZHB0cIhve7SNcJ1hmmls16P9 \ nluA7VD / Bo + mamkIH8AObbUUxHzGfzdl1G4ayQwmJD4ZgWvqmRGc5XoHz99A / lWQIIag3N + i2QylN \ n8Brje5yIUTLCeJBB46VmEGCTBGME3itUHCHRBK / YOziGmaPdlQit8b2gMS0BQT7KeTg644sXW0wI \ naKUINpDGMdNRxIOHBwh5B / 4R0cGCF7tz3n56wYOnp9wO8PLHb4iShPnigNtVQ4fFx6ATxzwy5Nqy \ n3pVM9icEL3l6 / IB3vvwbmDxiuXtBbFvOZgeIbsOn33 / D + mJKvysQxR4in2D7hv5uSaYDkRB4EXCp \ npo40x3JEbDpGeUq3rphlESeLhPG6Y7l5Q3LqeJj37JaXLMySw4mncYHbKCZLJdMkxQ + SPIlQ0lOZ \ n4ZfK3l + N8aoWSBOTxQWTPCU + SMmUprq + wHcd1nb4oQaRsV0aqq1CjFJmh4fMTp6ybnqGVrKpDUMN \ ntq1IEoOkIYkCzaamSo + Jivf5dHWOvV7RK83QblgsUkzT0Q2BUhTkLuIn1UvW0RaiG4K6JOQZOyeZ \ nL1L + 9tcW / MH / + mOau0BbKFxywxA + Z3D / Aavrr7BfvGFdf48y / gb9uCbomgfvTJn4jBc3Ay4bCFFg \ nLkdQD5zsnbIrG9I8Zzyd05seRESsIIoCwllmwVMPPYmOGIJgiCRWSMSoYHp2ircG4xsepCOy / WtW \ nV9fQtSjXY5staRGRRTmKMTvpIB2RLfZo + 4YiW9BUjrpqkJHk9NETdNMz3OzYuA3udkkiLXExxab7 \ nDNGCkAiaWiKrilkrMF2JDJ5egI8ymrokuIq8KHjx7KfoQvPhg2 + y2 / bUmzV32w4nKoROwebEkcT0 \ nFlf1pGqE9QOpz3G1RFoJrcOnILSmrgzdEBAEgtCI / itYdjhxg5M / ozjOuft0i03GROKMYAqK6Ra9 \ n6jB1hx0gVgKpAlEMfgj3XbEzCBswnSfhEDsU3JWGLlsQJg6TO1YeOj / GV56jyRUzIF4mxBxi / D5x \ nUvOgXTLuztHC03PIi2HEcbbPWSHQmeAHL + 835B99 / E3O317y4MERD04iruho2hWeEbtOM8sXuChm \ n6S1NgC5KKc2EeDIjFgMMa2SWIASkWXzfdvcVzoOUkIZAHFtC7skKwfX1Dm0siZDEWUSeOaTfUVcN \ nw26E0 + peHZqO6NqaIh5Rb1bEiQfvieNA13XkxRSHoynX5HmE9RYXDG1bEccpkVR4H + 4 / XwkieDwg \ ng0MhGf1157wrd1gVIVNNDESB + zcOWGvZbkryJKUYjzFtTVCB + d6E64tXVMOA1wGRCFDgUESqoBkc \ nnUmY7 + 1hfeDNxR4 / / + mWdDynvC757qtbiFO8OmQwcHnzFtKGbFQwn2TMo4b3DyOcuOR474hVuMJK \ nRRI5ggc9gQcn + xzlY8L2ggLJ + kLxxS + 2OHED0pGlgWmmEO0dKpJEaYYJPaaAplAUImFOIE1jLtVA \ nfnxALl7w7uwdflwtaSYdR73keDii31g2 + znLPUPXax4NjiOn2HYa7UEKT6v / BtIy8zBlJBw + bBnK \ nlmG15tbUaNsg3Aole34oJHUv2NoxOj9g1I + Iugncbe4VcsMGbwoKao4nnkWa8 + xTsHaPtxcdl + Nf \ nsC5vqbP3EXZNnu2YiBu + 9tEJz7 / YUC8dq1DgTMr / eXNIa1 + zWvfQP2bDmtnRU / ra8 + rf3PB + uOMu \ ntdTc0FVjxvmYPrwg1h3eNnzvu99n9 / Axzn6Lpb3h7mLFTdvzdudp4powqUkPTylOM1RfIo1j8Iqy \ nccznewjR05Y7Kl8iTMf68pq7t1doFTM63Gd0fIRMIqphYO / wkLau2OwG4umMh7MF + wdHNHfX5Dhu \ nX31OnmqmqqBdRTgnOXz4LunRIatyw8Ek5 + 7NEm8kx / MnjOUhIrxhPzE01lJtOoo0ZZxn3N4FmOXY \ nvYRYRnS3t9AJEhQh9JR9SzNYogSkrGibGxrVstne0h02xJEmynNUmmH6FuHW7DYDoYggBOyqRm4G \ n5npO7Mc0q + He8Ws1pvPsTIeSBZUJ6CRCxDm21ghxjp5WVN1rnsx + jeDfIXBI3 + XU + pzr7Qtu1x1C \ nTpE6wdiKPFc09RaMQBGh9RgZJIQNy + 0lu + uWMB6z9Y7nN1v6uGF8tM / LHyyYuzFt + X2m6kPe0b9N \ n291S0WMSx / vBUvg7rmvHTfJ1XukJk4OndOGcrlmz2Wq6skHKjHEmefbZt / m3 / / 4R8w8iytrhfUZV \ nFewdaTqh6ZJ9NsWEMszp2hGx9eyzZE8b7qqK3eoVQx + RJjmd7ZFComVAeocIPV4aLi5e05QG3XuC \ ndkSmI4t7xkWMj1tGYUSsPCFKGKSkDgpdJIgQkYeWdDGlCynBSaIioe8FzvZ4Z7GuI440nbe0g8VF \ n4X5CGRxYgUCggr6 / dxgGqmuJjGN8pFBpQucsi / k + RZZRb0uGziCVI53mBHd / bIRzeOn56MtfoqzX \ n7LZrXt68xGcBO4AfBIOPmKULLm8tf / 6953z00YR / 9B / / Pf7gf / 89yuaObJxjgqBpDIGIu + sS20t2 \ nMsFeBtZXhkMxsPqLT / nmrx2yN8k52teYVKOCor7pUUow0PH8asvDUcTl7Q3NEKN1jnUrgoFgJUrF \ nKLfF9h063sfpmNkQOHpZU8x3cBTTD4a9 / BTRDLzoDc + ERyzOWNiG8nZAmy / Ti / d4fVOhI09sDCMR \ n04UdkXnFRNQkoaTIo18qe38lgb / xApGsMeefopsYdeuY + hUmW / HKQXk9Zufsva90t + HoZMxIZAhn \ n2NYDTkIkJbvVK26vN0ReMQkG3dwwzWLSbM75bs6QfUTKhMZWLKsSNXRUboQVS2pX0wXoJSz + 8A1l \ nrRDDGC9SxtkZwV4zLo74vX / 5bzCdoQ8JN7sDvucjpkNONMpYNQ1vs29gP9W0n12zMztsHNPLOUEL \ nsjRGhxSxixhcYNCWJDeoAG25xIYb + huPVA6pBD44vOtJTEl2MCbSMVEsMOUGbwJD7SgrR5CCOCQE \ nZzHBEiJFtreA4AjDA4ZYUSYx3aQnmxyTPHlM6SV6nFHVK1w0IMKKly9 + wOfPFQ8PZjz65Ouc / 9XP \ nkf1LksUj9GzE0F2hS8ckPmah5pTccRc / B + E5YcLrZ3d8MRicafBZx3uqomx6mp9 / Tnv0lLUEVyl8 \ n68h0xuAU5foOoyLeee8DTNjn7fkNSZqQ2YGOmDI4QjRgm4qyCiQDqDJGWkmkPUO2pmsEsRxz9XPL \ n7qahr2Zs7RanG5o40JVHKNmgVUAwIGTA25ielLbv6Z3jYa6YzDRmVdNay4Ip569e4twdsko4LZ6w \ nk39Ekz8hXjnOvzjkx0 + + Rfuwp1onNNGSif8UcfAMMX4P2ybsjTYM9RofRZy7fbabEYn0dGy5dBnv \ nfHzE + lbzZ995wr / / H36dYf67nK0D07tv0mUvuA456D1mQpK6W6qog0hyWD / jy / 1P + dPZYzbuA3aj \ nd2niGL9bMnKOmdcYsaTLrlDlPkMTGMsURE8cemxbg4iJ5QGj + QH76gJCghAjpE5oupbOb + j9Fh31 \ nyL2edHaE1QU / enlHBaRZgkwyNBHBGkRhMbFHCJCxQkqJ84HGGcazEXGWs95sKFQGOsLJGIPCOEU7 \ nCOZ7C9pBIURDoRQyDjSuQeYZdhtBn9GJBGMdWgQ2O8N4IoilZWd6RukhOhuBaAh1w0lxzPPsFc9T \ nC3yDPGqx1Xc4UJ6vHe3Tdjtu3s75tnhIOQzoYoXxP2Ld / wJd / GM + / 3zKT / / Cc91uWJ / fweQrfPxb \ nX0dmd0yTt + RtiWwe4ypNs / qcUr + mv75Ap3OGwzOSZJ9tvWHKjCxoIhz1SOAKT6QHogDSa7TxHKZz \ nhr4Br0i7nHKo0InAuRrpHFoJeqAZGnxnGPUjUuWIWfJgv / + lsvdXEvjp6oqye4U2DaXr8NLS1Svo \ ndvgQkZAx3Z8yQlFv1hzNp7TCIbUgznOatqNvDGenM1588ZJcj + h8yyK2pJlAZR5fOfohMIstrQc7 \ nSCQ5z15c0Zc9QWqc9ww4 + n7Jzd0tIfX0tsIZzf7ehKJQrNdQtpbgJSFISunx1uJXFTobcdEHvE / o \ nQ4 / OMoyQyDRHCLC2R7oGZcFaCTrhbn2OAmIVsEN3H / TSI5REKokUAaMUIk4QUUxQMcZCmqQUaYKz \ nAzZENKHA9h3KG5RNkD4wSiQnBw + II0kUBfRJoI8myBR059Gx4O1nr0j0PWitqbcYEfP6ZmDXdZS7 \ nDb1XNPWaFoFQUG1uyKME8gilDCQG2w + IQZKTs9ssCbJhmsXowVIISd12vH31gsMn79FawWq5ZjRx \ n6DQii2CoV + xuzkl1jI4CxnWUpqFXY9DQdTsIPbaz9JseFQRKBB4 + OKSRBctnS3bVhrP5Hm0dEYKj \ nakqSxYz900e83Xz217M + h2RAKYeUkI8yZKTwdYPSkl1XIsyAESlV7XEdGNMQhsDrizdkix2 + 3SPT \ nS4Sz3KxeEcWC8XiCEDOKesa6fE06mrGYzhlkz2EhcXWF0IH55JAbrlidX1C8 + 4S62yHUwM3bG4Z2 \ nQZKfMMlb0smaN8KS5TN6AXQNmbY4HdFbhXMNQ1 / Rmxadp4yTA5p1j6vvj + 6UkCACTgdirTiYz9he \ nbkgKySTJCMYQa0UI9yuZUnkcJYEdWl1jcw9KoYVG6ZS68TS3l4RsD53EJCKnHRxTYuI0Y2h3pOMx \ nyjUkWrM4OKCvaqpdiUYgEcRaM5 / NsbVASInxlsl0wqP9I3ZlzXq9om9btNZkyRinDWen + 8Sjgss3 \ nNxQyZrCOw8N3aMpb9CJieftXyNCzGGcI4ZhMYkx / g1SeLFV83EcsPvom3 / 9hzNXtZ / R6hxobwtGW \ nL31lzCd + xvOf1Zy / FXzywZc5zDJGw / vszZ / y + llDqUr0niTaJdyZc15d / hTjl2wvv8evvzPl8egI \ nm1jkaM1wO2bXtMSFYTEROOdxciDIGiE8QUs6URBiiw8O4QVKObQO2L5CdBVpfH / 8FmuDFj0i7jBm \ noOsN1oFSmjSFyGuCyQhuD + n / BtIy05ufk04CRucM6ZomLcFBZmYkxhGFhpsqMKBROtD4ji7SOClI \ npEZ4hW0sT752wp / + vzWxjpDOEIRlALywSNkjfIUfWiI6XN8h44jL8zVaOLS8fyBFYpFnMWenjxiV \ nPT / 72XPaLuBlwDtHpmMaLxlchZMS4yWdD6TZmNI2uCjFKotUGq0CFk + SxMSJBhuQpkfpAWN3CBJC \ nv6E3HUQaLQK7XUmRJ6gkQlpBUJIunWKFwgSJNo5IKIzpGckJaaSoB4FljkwGYgZyORCbmjQ0qCwh \ nEY7BlGR5Th16 + vKOPMTkacbL7ZJcBKTWdEHinafaVtSbDVJHpPkEnMV2DRAxn45QvqHaXhAri5CK \ noXPU7Qqp7r / cKIX3ir2jI968umboHXVZc7B3SBEEz5vvYNWK2UQxSiT1MGBX5zRIIt / Sc39kYzr7 \ n / 1H3Jj2SZmeW3nPHb7DZp3APjzEzMjOSmWQmyaoSWyqpuxqCpIW2Wmqn3yRAghaCAK2khUotdBeg \ nUlcVa2g2i0zOzDHmCA8fbf7GO2lh / AdcEITtDWYw + 96Le95znoMucrpmwaAwID1daMmNpW7WfPX1 \ nmioMmeJZx465keSTGdu2pY8ZuZQkFKQKJbYoBUoEitxgM0VWKJKAEAR9SkgvsDanihJZ9SSbc / H2 \ nDavvDma1AAAgAElEQVQ4glRiV7cYeslInTPJbihkzii7DX5CdAWz / BY6z2nnb5GZZTTS7O3NWGy3 \ n5FpxMN3jtXyDbSSD4BFNxfrqBWr9mmn5MTf9p9TrF6z7nyKz72ONJssNA + WR0aFSQCtDGuxTmfsI \ nO6ONGi + gnBXgCuymIUMTQkGSo10pfS5xwjEdjRhkEhkSudaIoHB9TyceYouAshUhawn0hJTh + yG4 \ nPearjuPslziVEFLhg6bxkihztIK673DtBu22ZMWAECTtdoPwYYc / 3rQ0bSArClAGH3qMMmiRaLdr \ nQtdijMEWFu861vMNTrR0oUdmNfXGYcuSygfy0SHvvvOIy7PXLG9 + zTjPsVrR1huuLr / m9Miw7itO \ nHz1kf / zXHH7niD / 9 + D / DpT + lCvf5d / / 2R5w9f4kRQ24dHbJ3 + Javns3Zxge0q4xxmGJHIxapZ516 \ npM3Yyp5gPYvll0gfuDt9n2 + / + 20e3d3n5 + qf6H61pG + OMRSUdkiRD1mtPkdREVGYTJDllrZRhLDF \ nSoG1htQ1COHIi0QfPIIGKTRGNYjokDTkBoxMLNY1zkVk8iRXo7oc1x7Qzu / 8XrP3DzLwp / sNhR7i \ n6wGIFS4XtP2AxAQnN7TiEttLROzRWcH1ZoE62McnT3QBoqTfdswX1xgZSKHFWoW1Q4KCxie890jR \ nMRxr1ldXKBExsiRKQcLjfocPNjJxYxX / 4gf / OdYMuP3hM / 7 + 3 / 8j9arm6vIM6SMmeXz0wG55WkfH \ nerPio + / 9GbfuPuQ / / PTnCGU4OjimlRmD / WP296e8ffkVbrtAAa7dIFKHoqXttzt91CiUFaTkIURm \ nszGj / UPeFrcgBEQKGATbmxv6uiKrNKW11C4RMkGWSQZWsFcIsgB + tSVLHeNM4xrY2x9TO8Gq9wSh \ nGBRwOcxob1ZsqoYUEjHsYGwCgQJyo5DJ4 / qGpq24c3pE329wvef4JOP8TUvbtcz2Bqy2ji562qpB \ nyMj08IQvv34DIudwdsgnH3zMS / 3Vrjw99CyXVxhlKaQlryVtt1ucxizHZwq36YjOI5PHy4ROO5mr \ nbmpEnpBSYCPE3hN0Tp0MV9dL5n2JlxBC + N0isEPKHiUkRkJpd7yi5Ht820BydDGSD0Y7qqmviSFR \ nBYnKS9pFi5EFaR3ZGxkKd8E4qxlISRbNrnhFXpLl59w + 2ufq2iNtopdb6nWLUQ6NwNcrZNiSdZb1 \ n + Ss + + t4jzjc5y / 6a1fIty27Ktgn0 + Y / xKid4x0A4MgExCTIJPkVqWfKKA7bOEuyApC1GJYqxRLUe \ nEUBEg5YD7NjifcfkYESuM6TwmGgQEZquInSSsfAM8hyVcqTP6b0DkeF6Q0xwmFkGZcY2Sbp5QKqM \ no4N7DEZ7VPUCaSWESCYEWifW6yXOeSSKFAVSCkQfMQaSDkhtKEcDVCZpXY0mILxHirS7oSq7G4jB \ nI4PBKEUKCYTiZr6mqTYsL8958OA9Pnl3yPnrp / zs51 + RFzM613J695iYjXgVxxRyQaF / SWYsOmTM \ nVw6yhzy9KjjbDJifDzh7fkaSr3DdC9LqGU8OO87nhpdbjR4NGWcTFtfnxHbLOwd3mIUpv / 6HM77I \ nnrFyc2Q5A + YkYD5fsalvAIkxQ1yTEYRB5JbJuKBrtthCk0xESofrK3TuqLdrRARpEsQWJT19uyYG \ nT5aX5NKTYiCljsiOF2bEiCz8EQavxqcWvcn58PZ3Of9ihdKJs05y40Y0WcBNcopXHcIYAoHR4Zim \ nMCRrkEqjEFSLisVCMBnv0a87QtBUXhN8okkK7xQmy / iT7z / i / 3n1hGGRk6IEVRCjBx2IQtEgebEd \ nsv7xM5pNhfaRrdt9zvn8Ct21qB1TE5EkISmcE6i85Iuvn / PF83OULRgNhuwfHnLTJrqU6IViMNmj \ nw0HqkL5Ba4 / EUDBgsr9H53u0hL1xydAqMgnaWnRu8F4gksYoQ + 49s + kI5Vq21Xzn1EhzpAcpcvLJ \ nFPqaNs5BQCsMna85CRGtJFp5lFF01TVlqEEmWq3pVNwdLEIQnCczBpkiyfdsqy3KDlhevyX6iqP9 \ nEbfvHPHVlxVEQTGUXM2vUWZIZjL292ZErWhSpA + eV89e8L / 8j / 8zt472CWJXPO0aD7FnNCoYJYmv \ nHa2LxGQReU7ykNqAyAzbVYXFIjAYYwjCI9gtjDNT0sXA12c3DGeHRJGYTQbI6Dh78Yq + 7ZBJIJNA \ nCY01AxAglSIzAiE8Mh / gk6DD4LCEIDhf1Nx79Jjm2Vsu5x3aTjh9eIvsbUEMW + ZXntt7AwYTQRqu \ nsekJXeiZ7I / wUhKDw9ctNjeYwrCt1uRjQWgl6 / kbjHyH2wfvc / XLNY4GMZhhZ + / j5ae0ZsDQGKTf \ n8WqsLQG1I0GanOt4tJMGzBAXwA40cmzxy4CNCpGNiFrhspbMZmR5Tn09Z9tsSO0a6QNGFEzGhxyN \ n / xajh4S + IBP7 + Kgw1hJyT9Ot8FmDFxOq5Zo + FNgiZzgesd1ueH32nGHpsDkQJW3yVCrQq0ShDcYW \ naJ1jkkRIhdESbTShb4kxkmU5Os9wXUvXVATnsFoiUkApjZBQDIb0TcVyveT0zgHr5QVaD7i + uOYf \ nXn + OCmsGeY5PjkE5wTuF68cMXv4PrMXfUNwRhP0L0iTHP9S87CNV4Tg + yjiYL5naG7qNIKUeFS02 \ nE3z726e8q2d0umQ6GvPNF19xMh5wOtAc2oa + 3lA7xfIqp3OWJL / EqIKUCoSA6DSKMbEtEXqMjprc \ nQFN1jPcMRhtCF1Ha0LcB30KZZfjGI4MgN4bGeWSMbG9WGFUShabuIj6AayqKvkakP0If / ndP73Px \ npKKaL1G6xGYZp / ePaN84rleXCBlABoQ03Lt / l07CcDikIdL1PdoFppMpXQ + QMxnPdhY7qWiTwMsc \ nEQxWDvAhMJ7NuLlYIhEIvdMpd9 + 8x0VH0I / IJycg5jSLK0w2J3WBPjqyLOGbGhUyhFFEzK4AISlI \ nEtf0JA + b3rOcjQh2zHYbUEZhAWUl + MR0mtP1PSYfUtqMfDxiNhyQZZp + s0KpBKGj6RryscensHt / \ n36B0wvcO19a7K17bYH1F1XacVxVPrUVKhe8DGs1kOETUNfOXn / H48fsUueVoOuPy8hK6NX1T0XSO \ nzkVAQJJIKZESjJEklSB2gKavVkwmkqJo2VTXjGdHrNcVTdtRDDX11pOEoW473t7cgJGkkGhWa6Qo \ nuUmQD4e0zRYrDUpJspTTLjt8HQBFU0dm0yle1bhmi8wLlALfR6zK6dseqzNkBNKOeLl1AkS + K0rf \ nK8mHhrPLC5qmY8falPikyMyAGHKsyYhJUGQZygTyoaKpO3ReYtWIxfIMUcw4fedDfvHlG4wyeHmX \ n2inyLGPdV9waWbxZUY4lTreE5AmhQChDG3uSsRwdndK6nu12zcGtPU4l / Oj / / YyQHEoKUiiZDu9S \ n9Q1p0tDn + ywuPsDuAalHiUQUOW0QaOEY4NgkQatHpH6LQO8aoSRIrckGA1QrUUJhhgNEYRhmU + qr \ nLaKwXF7OmZSSorD0VU + gpXWHrCuPVgqZa7J8iNY5qXcsL7Zk2R696ghCoCxo4 / FhReMieeYoskj0 \ nDbXRFMWIshyTeUloIkLlDIcTsgibmwWua0jAYDLDZCUxJULoia4hBUeZKaRsWG7ntOuGYjQGUeCb \ nyLCw1NstlxdPiNWMPCZszHG + I4mdbp6cwMaCv / t3 / 8Tg9IJ7Dy6QG8VR0ZKRMassKSjMZMy + FEzf \ nP6fcG3K5UcwvS + pLTdp + wcGjhvzkDr2ZMSqOKNIxe5ngX316wNS + RomC88WE / ocFL58sdhz8oPnu \ np9 / ner7l + bPXoB0iefJc7MJwKQevMbIg9gmZDLs6a0tpx2RmjEgCLTqWN1dYlROT31lPnQKn6NuC \ nLuYYv0SnS / pw9nvN3j / IwLevFkyCpzicwPg2v / nia7aLV8ReMxMBtZFs84yQBM73tHUiG3Tkw5zQ \ nBjabFUOTcbXaEqKi9wElcvpkaWVOEgVBRozOqJzCJQM2Q6mMEEDbjMF4QlYM6LyD / IjR6AScJE + a \ nD + / d5Zuf / SP5wYi3T3 + LFAmdEsEHlFbozGByg7aCrukQfUtqA + dfz3HFAQwPadYX5Mphw5phsbv6 \ nutCRmOCjYNs3tA3E2lEqAW1LER1dW5GUQ + ucKCwkRVs3ZFLS9w30DSWCSRzRVA7ZZnhncUmSgkJh \ nUGFEhuWrs98ilOHTj97l + u1Lnn39NUYEhACVlwTXIMXOo + 7blt51tG1N1zT0vUMogcBijcKnhhdn \ nG7poqHtNiD1oSYoWxC52f35zSZscQkqUSNB39J1EaMO9e + 8TG8d6fk7bekSMaKvBJXSStKuacVnS \ npMDar3j04SOmgymf / fAnIBKu7zmaHeEqaKuaJuz2BoXSdO2GZruGxpMnDTKANhhdMBzOkMKg7ZDe \ nOSIKUo / FI4wBYWhdok0Z6BE / / cXn2HxEjB6bPeBy + QRRVzy4ZRGqonFPOSj3EW5AbO / geIWxA4TS \ nCG2QNkdhMDn0KSJzwfEtxXLbUkrF2 + VTQrvgyW8TD / / iDkkq + jBjmHkKekQKbKLFBZiIDYNU47Gs \ nxYBC71qqMlWS8BgzQBcOGw3WSqKpsWhS26MRhBiQMlKUFqsEq9UG2Ql8 / ARtOoqyxw4ElIa6l2y2 \ nAzbpfUI6JPh / oA2O0SxjlRq225f4JLDCoVzAxB4OjpgdHlO1ibryZF5TCk3oA1W1JsqEkoZsMEAo \ nhRCClCIheJSSFNmu0jCFDqs93rfoaHYSo5EMdCK4mkI2hCwnNi1tDEhl8cFj84zNckHI4dM / + z7d \ nw1ecHDT4VeJmvkG5LeGXb6mXr3F2yUId8uDj + 9jM8 + ffvk3qJHvZXaxZsJWJ59uSdjvmct2wWSnK \ nQcF6rSjGguE4ZzQ54MHDd / jtzxMdc7Ztz09 / 9AU72kRAqhpEjdJhd4gyQAmF / p1cKqUgek + ZZ1yu \ nzjg5OsVFj1Q7VpFrFvRti0gWmQQEsbu9xF1nQRQtffojdOmMi5yqf8GqOudyHfBB0fk1KawY5ewq \ nAY0kk5am7bCjAhUipTZc1ks2mwW1F0QZSDKAFJiiwOkB0gzxQZHizomBmTE7vofMryF65ldzimJM \ nPpiQlVPG2ZB2KNnby / G1IHjB0eEB3Z176HbJ5fNnyAxSXxPRKBHQWvHg3l2qasv56oJCS4ZFjlE9 \ nw / 0Drvolm43fafVs0XkgLzSFtUhTULmeel0jfU5Z5vjQ8 / rlM / qbS0a5IZ9m2MGMqIcIM6LvIzrL \ n6Zqa1LdYbWijY7o / IdU1yuZEJKv5GrqOVDX0AlbRcLGs + eeffgbtmq6t8SKj6iJtVASpkSLgY8DH \ niNSCbbMhKoPQCiEDWgu6fgOu4Xt / 8l / w859e4W4ing6kIKYMEGgTqfoNbWx3D7mETElSAk + gaRxh \ n0xJCok2ePIM8M7ja09U11uVUrkcVAiMED791j8cP3uMX / / xjuq5G + B7CkPWio2sjQUiEzglC7JZa \ nzmF6h5A5vRbcrJY8fu9bhBiwpkBqhXcdSew6Rwvh6NuGqvcElRFFTucdurCMxoZme83F + pf8xX / 7 \ nHT7 / y5rDD + 5yc + a4fZKjQ4 / 1e0z1 + xArYifJyhxjC7oGUrIc7U1o6jltXTMp54QzwURJ7PEl9maL \ nqW7hrycMdcbtY8vaRUolUSojqSk + gYgdo7jTF5ci0PcdQTTYUuOCxIghRZ5QnaOPFdr05GFA7CLb \ nqznrm8td / 6tVrNfXZKUkHyhGgx5bOJRdo8oGYQVN2 + NVyWA2xfcNzhuS8AwmhvOLc87nW7TMsFLS \ nOk9pNOOHnxBiRtN1RFUghSa4QFNXpLohJ1FM95HK0PWOJBQICQIg7TqZU6Rre5RS7I2nSKEwUqOT \ nJpcJVRgGt49wQnB9DvVGIHVJ6huca9jLYJA61i + / 4r / 582 / ouw2VOyaGgrc3LReryDcXkUbmrFaC \ nn / ziKcM7cx48POHB4YAyLlitX6L0bUp5n + c3Ey6ahmatqdeeen1JKa755OMHDA / 2kCPL9GTAa + cJ \ nziGNIUYHYmfyAIWSEkFC4CF1JJqdQ4oSITpibJhNChKOJECohMkE0Sf29scEJ3GdQUtF2zfEqid0 \ n0KcxVSt + r9n7hylAuTejefprCjr63yw58ifkJMypZHA0ZdtYPjo4QfaQiQyhLb3OcM6zP50yf32B \ ntRk9Lad3DmkuV / jU4kUJRYYMktX1FW4zRz7JyfIx + 7cMIrbcrOZ4PAFJ1USubxbE + JzSLMEFROh5 \ n9nRJbDuefP4ESY4PoOUapKLHEXxgMX + GAoa2ZmQ1WjTcspFx0WJkZJkCld9iwpp + cQ3Osnf7lJoa \ nnwBjGYwnaCWQnePerQmrbk5pEm9ffY0Z7HH84ENismiboYXAGkMi4lPHIl4xKibsH + Q0zZzYd5ye \ ngKhaYtVgBsfo2XvszyyFu + Hk9IC + a3j59ga / 3lK1PUFq + rbd9eRazXRvhLGaVxeXyKwkpfi7P7Pn \ n8eOHrKs1QWQIMySGDRBIZHjXU4hE1dbUbc3RbB8TwGpJUAKjLa7vicFjC0sXV8QUuHt4SlhsiUDo \ nN / QhoXLNu9 + 6w0efvsvtgyOO7065dBukgJv5K1w3JqWMIDUQiSmxNxtRXZ2jVMT3DVsVCaKjGBpU \ nsvRNS195kkgIK3BNTbvZ0KxbTHlIXk5oqgWdSxwNplwuz + g6z + PvrMgGz8m1w81nTPa + S9bWiHpF \ nJg17 + YT1akCyEpUMzmtCUmid70ipXeBwMuOdv / iQz5 + 9pru54fbJG8YPIMlb / PivnnP6rYw8f0ln \ n76NSQsiMqIbEKJHxkgJPF3pUKum2K3pXoUsNQlGYMUr0tN0WYTtEarg5q8Ar2k3FdrVCxA3j8S22 \ ndWQ0HJMXGSfmgiwzpARZGmO8JvebXU9zv0IiuZQ7X3lezEnUxLgCWTC0UybDAfeOb6PvvocXCm0a \ nmjbimw7ZNagoyLUlBxy7ZKjOcmxR4pxDY + j6lrZpsFpSZGNirIl9i1DsQGpJklyNTw0yRVSxoBg5 \ ndJaDyamvKqwWDLLE2HjGKvDVqztkRUKbE8SgRdkLvvdfvc / D + i4yG9FtT / nm6d8xOCzYmwUK3cNm \ nwdFeIKQLVPeCYv8O4SJw / P4Rloz6asnFG4t5EfjoMDF9UPHwuxWf / + U5yfd0vcZmU2KQuMaiiz2U \ nv41vW7KsJYmGxA7pHNMWIRwp1hibsDmEGAi + A9GSlQIZHSJpggMfenw / R / YtImS4 / pDL6z9CeNrb \ nL / + W927dYWAzjn / wipN7BU / fNpwvIR8 + 5OZmzFsKZA4 + BAprUNFzOByRvOPF9pKiLGif3mGxt4ea \ nPeKy68gme0z3pkzLkm7dMilyYl6grEWGjNi0hKYkqgKTD3Fottst + dUVUWeMBzNSGGHNgDfrCqtn \ n1MunFH7D2oJJgaJzHE / G / Os / + U / 45Vdf86tFxbm3vPetb1Fzgx5o / sWfPeL89TOWN5F25Vlde0Tw \ nPBxb3J7npi94OYewhjtHt / DbjtEApvcCq / kle0rj41OOJx9z1ig2xQrMkOV2zDCruD8L6BcBv95w \ nsn / A9PgWI9vx0cmE7uwL5k / OuP / 9x / xPny05OfwU5WbcOpV89atf0 / opeRwySs + o44I + 2yc2BaUd \ nMxplPHo85c3 / 95dkdsxmXbIdRQ5PC5Ix9Ms32HDNWHjWvmC1HdPEAU7VFJlGtPt89PhjHt97yE / + \ n8T8Qmgv6VOKzEuskytd0XYMoSmI / 5punI6QYodQaPbghOkFTab7 + zLF6 + Rse3L2guZH0yxUjBUdp \ nn5vwik04hHxINpMEplzN32LFkqrboxYKqjUDJO1iwcN3HvH5518znkwxWcGmqmi3W56ZLaPhdIcG \ nWJ + hls8ZqhuOh + BmFedXC77Z / Jf86t98w7tHtzgff055M2GY3UWNFqj6krdNjpx + n1KsMfGMWJ9T \ njgek4Yz58gbZ1xShZTt + h9uPHH / zfz7l5NY9Hj8 + Zr49Q8SKNpR04yGTxtKXCxrTobvESdgyY87c \ nn / KsS1wUK07KEXPt8LbBiyEpgglzttsvyQfH3MwzqqbDiorZfsSmFhJsQs9keMDIRw5cQulH2KTI \ nygSipelWtEGTyjE32yt611Knr0hKUTeHCO4yGbyHKXJ8qpiHFWff / JLpyDMpDsjShGmX0y466HoM \ nnqC3BJXIdM547wBsSd16SjnCLVrS3DNoLTZJmjsWZcestgtchCQHpCCoth0xJGJM9NclImlirHG + \ nIjIg6SGUhrVw / NV / / DXXf6fI7gjqwTWrOOXTT77Npx847nS / 5FvTjPmbr / jFtUFkP + BX5 / vc2rvh \ nvZOPefVNx / lLzSc / + HOyzRue1ReMHrcM92GZOWx9H / f2lN / + cEI4lnzx + ZB + vdPolbBUjUNlJchE \ npRJb6ymMZ485 + WiA8sf0boyWGYVqMN0MXb9kYJ + gS1hdJoglWlp8d40IC2a2RKeOm41DcoTXno2u \ neWMuf6 / Z + wcZ + AfvfEzTOlL0xFxjR0NG7Sk3jaf1E4TdR8RECDsy3rruEDHy4vnneNeRjfap2wak \ nISuG6HKMDhtct4vm78 / 22N6 + vUO75ooQI2U + oKo7oo + klJApURaWg / 0x1L9FNQkVl9jhjA + / 9wM + \ n + M6YL / 65RqaSzYvXRF / yuzQV6 / mSf / N / / d / I0YTRaMp0tk82GHP03kc02yW / PltxOD2hnq + 498F9 \ n7j9yGBJVUyMHEw5PTkm3CjYbTbAFyyDwXlDu32ZcjMg2b9DDEbdGhh5IYgdA82FLEVY8vmt5 / 08P \ n + fqs5OmVYR6n6H5JqSN37k24M7rHvYdTPnld8d4tyUE54mDWs / 18zUoZbkRGrSa0JAgeIXdyzmp9 \ nzWc / + w2PHh1zdd2R7xnW28BvPqsp5R0 + fvw9 + voLhkPH5799hTQ9Wbkm9h3rhcHYCWfnN / TbHmkU \ nIfZIDAOjkL3H + 46EQyVL6zxCRLSWuBQYFBrV9qi + J7Oe9c05X2xfs9lcEm0iaoksDbKfoOMRyBEi \ nOryb0LuGGFv6bg8vJFbVZJkiBc / bs9ekFBASmralqWuqqiLbE7gU6DZrQtPS9j3KstP5gycER5g7 \ nCj8h1BOqdcNMvEOsS6S74nCgqJZzLv2Q / XKXHu2EIc8mLF3OMigKM8ULh + NXPPx2gf / NlqvVS8qz \ nt9w6 / oCT29 + jMoest57aG5ya0fsxup + i3StCd0HoJIXcI68jIaxBi10TlBFoBJGe7XZB5w2eCYVc \ nIMKGjx8 / 5tXLNS4kvEg7J4lVeA1Kn5OMpWl7rFWMxiV117Nc1MQmp28MZgQfvf8hf / uTl9jZLfLB \ niKQ1IUWsYWf / 7Dy129C2LZnLUZ1gfXlNruBPv / 9trJH87MLT9D1K5jipITo2 / opkFwxzj69WdE8A \ n7cEKBuMpSilsViJVRtdYqnoDjSO4lhQdSivQGSF0RGkglxzdv8ud6T0WCX591nO1HPDDpeenf / cV \ ng / ZX / MV3jrk1GXP2do5dDjm7acnsmh / i2Vx6Vsuef / / lM8zAEPpvMfWn + EqBnBCGiVZ5tt2vYfUW \ n335OLyEhSTsrCDJFREjI4MlSIhMJqwPBVzjXIOyEJBPrpkZZTec8sVO0ybDYOoQXu5CgSOjk6fot \ ndddRG8lGtqTUEm1Psn + E8LS / f + 6xactHdwec3rnHcO + IO / ljXl69oWr2aMSIqrqAlGjqhhh2aNyq \ njhT5CB8ddjyF4QgzyhEysjcoGe3vYzJLWzWUkwm + 74hSYLTYBaEGDq01yXvaesPISAZGUlUNfl2j \ nixXD24k8a5mLhv / 6v / / v + LfVNZ89eY6MARBkduf4EMYShSZFyeHeIYPBlOeNQjBlOjlhLgIbW3Od \ nCgaZR6YOkQ0J9oBeFpi9fYqxJXRQqAfUVU6jtwz3Tnj8yQltPMM5zzAzCDPGliO8WhM2a6x7h5dv \ nZjAyTKYZb1eKenmf7rcDTtUB05DxzfIGVXWweIPa1pxOp0zqt2T9EMcBWzvBIxi4Ci0hsiGJiqMD \ ny3CcODzY4 + z1Et3fIuoHfPNFy / 17e + zd / ja / / e1PuPf + KS + ePMVdvGCcndCHEcEpitGINvQoLVBR \ nQHDQtsTeIUWPJCCS31kjdUAahc4KxrOSvr0idDUxXhP1mm29xsUbVOlphGYpPb3dIuwGaQNeVLu + \ nAFOhU4NnTt93TGYCazVdV7FYrzg8PMH5HfulDwEXI9QVemipukhVN8SoKfMh10uH60D7QNZ9iXa7 \ nw8K7fZLZg1jTLt9wfBuUuWLZVggiuW5I1IRmTdd78CXSDAgpIErN9HbBD26f0FdnNOszJoXEJkuz \ nnlD4IevJK7zKiP6Y1E0Q4Zxcb7F + Rdcngo + sfMQlR5dvUCLDqY4sN9hhTgw9mU7cnmzJVGI / 27Ky \ nkW0vkFlGExPrviPLFFYt8FjOLy7oOo + SJU0FUgyhkcgm4LF8M39J7AWDcsAqKbzWSDsm6QFIR54y \ npIPUO5T0FJmCoYCm5urVMzItMfJDcluQFznrZs7l8iVNe0Vya1xs8H3DUZeIIWHzAYUGoyzIwOHR \ nkHI0Zr7Iad7McV1O23a0HnohcCHSRMe82yBkYDrK6Cpo2h4ZThG9hSyHwQHtYI + fnZ1BjDx7eknd \ n3yJ4w7sP90Bf0Y4cW3LU1vJR9oYH + XfohhMG2Yhwuk8RIu / fDuTxC / 7q / 3jJz2XAxbQLXEq9C8kF \ nyJxjEBNZSrjkCKEl04E + 1bheUGaCy + 2Wq + slx / ldvnle8 / SrMw5nh0yGEq06rAkYehISJgbfrend \ nEkxDV9S / 1 + z9gwz8L69nDFVDOVgjfOTLXz3j7HXiyZuALw9RowlKefb299EJ2s6hhKKpPSEaotS4 \ npBBjQ5ta4rYjuETUGl8UVN6BVjtEAQKpFG3bk9scpTWua5hfvGa1uADArAzDpqEYR0Rc8c9 / / Y / c \ njId8 + YuXfPEfzxmk93Dpa4iJIHb1fEUxoklyh6JPYKXE6Jwsy0jCIrTl5MEBhA113FDXl0zHJXQX \ nrAkAACAASURBVNU2sG02ZIcDsIrVes14OKDlgC6OcCSeMSAfjLm6qqn6nptmS1EqUqc53HvA5WaP \ nNo05KN5yOnzCqa246iTN8hifPeTrxQkuNghGPL + p + NZepBYLWjkjmISyAeEi0e80cGnAxwZkz2Bk \ nObmdkXxkUo549bahjhW9gh / + + B945 / 136NSIvtkyyMb4rGa7ChhtCSjuP3zE61dP2GyvGGuJ29RQ \ n94gE1mp65 + j7FpuXtKEmSIdShmgKnLshpYCUDVJ3GCrqeksQAWNzts6RTANsCLIlpIqoMt758AHr \ ny4qbmyVlCcZkGAPOtYAk / u61d3iI3jRc3MxJ2jHWmqA86xARKiNGw7oSDMyA1DsG2c / xSYFe0OuS \ nVbzi3mGgKK5QqUHFNQ + jQ1Q9mYUuJpq4wvsh + 8UxIvaE3rMU38aqIet1y2h4wOHhu9QLS0wzrD2k \ n9QoxWCKURrZbhFAkvUVmGyQtsm3IZWAd7 + HqgBh5tAisNkt8v6WcDqFXGGso05qDyRi3nTMrctqu \ nx4dE53pS6ugE9GGPqnMsW8tm4zCqRUuN8HNC6rE20W2GKG25c3JMIyIq08RsSDGa0QdH17cUXUAp \ nEKZHa3DNluE4R + eSzXIO5YB96yh0IF5esL16RjZ / S + YdoekJjadIEss5ojCY6MBp2sbgdaCRnm3S \ nLOqKIh + gdEGmd61ZKiWyTFGMGw5nAtVdggjM9i45ObxE + CuODt / nav4TbqoveDP / AXV9xH6xT7N3 \ njmo3vH5V88U3cz75 / iGd7 + iSxaQhoXrD4pufY2 / dYnr3ESub8HLAm / WWe2nIw / 1PGA1 / zbbud0gL \ n7xFoNKBEQoSe4BybumdvUhBxLFfXXM43lGXGxdkLltdzTsURFwvDRuyRySFN00IUaAVWawSCUfLs \ nuyUir4iDFW / FH6EtU6RT3r55xvLrf + apXTMTE7brIcPhHRZxA6lHNpL5qyXeB2xWkpIkI2CUYb1t \ ncBHKg32sEoTgWF7fsLq6ZHp4TG80qcg5PD1hc7OgJzLQkvFo8Dtmt0fLRKYSUkAqPMPYcJgJunqB \ nP79AhFvMr1ri5SumznCZHMZkIARBCCKAFPi24 / rsDfvTKd / KHatVRdMpiskhLgpGe8fUfcnGBX70 \ ni98g5gvM3pjJdk3jHLktuPZq57oYjWmTYJWm6Cpn2wp6L5jXQ6rLHu0j / tYe16 / PqcTP + E / 5iNHr \ nQx7NPN + dfMNm + hVuKPibnxwzr + / TFi0pXPHs1Tmny4R2d7nkiigbRrEiSwlEQZ6VGOXp3Yajo4d8 \ n + P4tPvvpjzCq5 + GDjOvuOWeLlnxwjCgCuhzQt4oUIrJzFMmwqnrE0LC / t4fSjtGj24hqzfMvntDW \ nHmEkRWl3nHMvGI1KulVNH3qsmFB1gpqMRlpyDR98 + JDvfPqY / / 1 / + 1 / pqg4lMqpVQzG8g5B3UT0k \ nGpR8l7dvNTdvZ2h5h251jpr0SAlRQJZlXC5uQOdsHCzWNWvnGRcjTDHAb9c0KZKZnKrvSWLAcJAT \ n254gHciSOk259hm5Edx + 75jUjVldFgyKY5AFziuWdYdTeueuCpFymFH1iW2IpPpDjDpBi0RIW1bN \ nW1SZse0OaI3ClZ7UTBC2RdEi9IA + jll0twl1Ty8VrX + DryRd35JPWjICXehIWu9K69ctVngGs1Ni \ nBGvHZM5jRcXiekNTr5js50hXc + MfcbO4Zr6e4INBJ4dRDZmsKIaOZrNAq3dI2tD7LULMaLqG1mVE \ na + j7jK7PmWqHtgZBQ5Advu9wrsL6yMM7DxhmBf5oxfztlsvnK9qFRzX7 + GaOijWF2eDDhq6PhORo \ ngyc1glhaJidHxGi5XrWgB2yEhdAiYkApRXA1Mnpcv2QysnT9hiPxr / j40w / 415 / ccPbK8 + btiube \ nhNH + X3D2ckg5 / JA / + Zd / zsr + HZ0 + p9mMUc0pr158w6rpaFJkvWpYLO / w5CdzJnvXfGcyJE5uqIuS \ nlBnqHtZNha5aRNOjco0QhkQgGY23iVoFCpuh05hXL644m79Gj45RxYS3V3O2TSKaY55eeVQ + ITsw \ nbH1HoSXl4Ii2q + mToOt6tL / hRPfcP56ip4nnq5e / 1 + z9w5SYn98wqiL7dsq7 + 1MWr6 + Q3YZN / YRK \ ndnTLHtOMKMoBIQl6k7OtO7QpEGVJkRTr9Zp2NWQyO2RUWopbe0ShMcMRm5iohUIkSbvdgnfsnxyz \ nv3fIJ9 / 5lMnAkELHm7MXXF6ek / Ir7r9zyAcHAz776a94NL3PXARpppZr7mZb8qpBFxkJgTQWned4 \ ndruArmnwlzU / X19y68drdD6mY4geH9GZAXoyZXC0RxM7XBMpmxrTQP + 2odqsWTUdOmWMD44R / QEh \ nCXxWMNCWcixYLpe0Adq2waieyzdzktCspKT65jW3asVtkfPw1ieIwYqNfUrIXzHwlsPuHi7rebHc \ n8jROUGJEryrKSU02X4MzxLxEW0PXNRT5iMvrlq + / uWE4PGI6Lrj3zgGL5ppfPrti3iW8X2CNpKcD \ nepSOBOnIlaH2HZ / / 8jOQjrN6ju5bcm132S4lkJnBCosiI0ZPlgtIkOcFeT6Fw4zp6X1WyzOevnnL \ nm / NzZBgwVCOoI1M9oHIVNusRREK / JTsoePjxYw7vWL74py + YlAOSaEAZtDFUnWOxbZkeTWkQeJNR \ n7h9hymL34ElJFA4pC2RSNJXjm / MzhBS4 / iG9HJKyGbED0fVcN1sG3W3y / j6rJnHFc0S2TypKeqno \ nGk + LY94GGgShLJmlV2yqnnzyAQ6z + 41jwhdD + rJjq6 + YhT / h8upnBLliOjxisRxy071Hlob0bkkV \ nGjbXLdu2ozfnFKMh0 + GQUiX29IgXV59ji8RvnrWMtaQ / SKQ + sLypsNIwHO0xEB4bIq + bBRWRSlm6 \ nKBExUKiCSEFXL9ByRmZrNl3HunOsWoUf3KWnw7klWo3oW09XbhgO9who6tDT + oSKirjdcDDzvHrz \ nlCc3K8o4RVKwrVqyrkNTU45XqMkC7y9xN58gCk0 + GNDrMXZ4imNAIkeaDKECzShHZw1U211Hb9gx \ nsu4cDhmbhjCEfvvXfPmjgtGoZ7a / 4eH3c7yckg0esH7cI7IrvP17dNdT1afsZSPGoy3fuVth7IwU \ nvsuTlzn2lueeLlg / e82rH / 4ad3QL + / Adnq0W / OxizvnP3jJTOwqAD4koI0kbvBKsQkubCcx0xvLF \ nDXXXorHQdfSxIkVN5zPQEzAZ0BKpKDMIIdL2OcQhIWl8CqzdijfbBf2bBWJxwdH7e7 / X7P2DDPz4 \ n7Iec7EmOR2M + Or3D0 / ZLvlg8pw + 7ME5wAcn / T917LNmWpOl1y923b310qHsjrsh7U1RmZenuRguI \ nNqDRgDU5wIicwIxGM74Cn4Q0jjglRxgQRgNJQwMgGl1oUZ2lMrNSXx064uizpSsOop6ANSjDGe / J \ nmSzf2 / / / + 1aG7WqEkMRJTJkqPIZMBSItMbXHLNd0XjCc7uMjT9216OAYFAO0iHCt4 + HBHlW1Y7NY \ n8On8lt1qzgWGvl2zXFwjcBgSXiSBP / ruB / zzk3cJSjG794j / 6ZP / hfN2RyckIoruhjSRBAUiEti2 \ nJtMOQs9ABg5ChQywMStcvWHVelQ7Y73KMSoiMoY0jcD3lFFCVsTEWUxfd / jmhqKQlLlGigVxLRkW \ nLSdjw0KNODU9xciQy5R6V3LaJqzNM7ZZw2V0xLn4FrPwmJF + xnjyKe8mcFxJbmmR64rrTrJsAkI6 \ nhqMMIxOC1HjfgoxpTUVW5PQuZb72aCkZjlMO9h5Qv + 75w + + 9zcfPLrne1OgA1tzg9Y7xsWR9Yajn \ naxI1hH5DvV0h + ppYBPaODwhJAC2pux5rNC4ElO + xoWE4mfLkrcdkxT1Oz8 / IUsnlzRukc / QmIPwA \ n3xu0tARaZNQhqBDOEOkOpT1PPnybj3 / 5Gps62m7BMImoupZYxSyrmhDn + DgDXaBjhekdTufsmiVB \ nCsbDBIXBtB3CpTjrCBI6GozU9MIhCSSjGvQVtr3GR29hpWGGIx7FnK93VE3LYJSS + ArqJZGOsSqH \ n8Rf46ISNrbCkKOnQUYHyHmlbinhJv7W021uINyy6iihKENLQbFsUhkx1NGGC6hrsaoPbbUnzjPl8 \ ny2Iz5 / OPPmEYNP1gypP7e4iDDIdHKUmQCqE0xt4NGKP0BrxD2QjjFd4lBCPwJiELKZFytOENcTEm \ nsSnaR4gAg0gQfEWiLI / vjXm4l0Psud31d8V3aYZ3DpXEnF6cEVlDevohob9C9c + 5p8 + 5fyRQkWE0 \ nnXG7jlhsctbTQ5IyQaUZw3IGcoKXyd11qfBI6YmTBim2FHFPKhyJzJhmx4zVEmE3zAZjfvRHY376 \ n / 2o285bv / t6YVfMlg / i7GHdCkn9Cn34E5gek0X2ML + / Cc12HCmOwDbv6CxbzBUZpnHjI5k3PV79Y \ nUvuW5LglOhqwdlt6D0EoVKQxQhKEREYRKIHSCXGWcbtY4RuPlIo8AkdLZ8HbBKViQlwiJcSyRsme \ nyNdoIVABoETFCWkKaTxBhge8sjdExQk8efgbsfe3Avx / + Y / GrJYVzkZUix4pM1wEPjjwGdKW9EgG \ nZU5RDO9Ses6TJjmT6QwQNG1D6BxmvmD + 68qCxjiiMEYHcK1FO4tOLa6pqLc1dV1R79YE15JEHuPu \ nNjKEO2Hrhny5GvB0VNC8uSZsLaPoIS / SNQtWEAJxohFxRO8tvt2iZQDbo4Ih9p69B49Bg1ldoUcW \ nZQ3RoKENjj5o + ljgsxmvz17CIObx0T1kWzM4itm1O6KRQOUeWW0ZJjOcXWBpcbrgShqKMjAsC9Jk \ nhL + 2rDc5dTSkLVNad8mihXsq5 / Szd7gODWZ4y8G7Y2LZENkK13qs2jJXmq0aksiYSF4jlCQuPH3o \ nuN3sELrk5N4ejbfc3Kwxu8BwkPBwso90W266HYvgWNcNtfdU7Q6lYwSSk + l93qxuEQQmkynf + + Hv \ n8Heff8Pr8zOCl / heoqOYtmswskHsNlSbLVdXlmB7Iuvoqx25VpiOu / acVNL6iicfHnJz2bO9GRJC \ nh8wybD / j / / nzL1nvWqw4IskdB / c13zx / jrcWdAxxhhEKL + 8 + yeNyiJBTpIeD6YBuCxfPX0DtMJHE \ nWoOXEqEv6WlIiuFdXiJcMx2uGBYrmvVLfLbhiTS4JGK33WJszahPyVSDa3s2daBvSm7upfjC03cL \ n4igily1xp1mfe7rdGpnXnDNApS1FLPFuw3isSOOaVdcRbR2huWVeHxH14JqO2DpMbbBGomxMKgpk \ nY8iHEUmwrK5P6boVHonTQ / oQUxlNIgXKvcBXFhlGKDRCaJIoQntLEnowDTYq2FRwudyRzu4z0Cle \ ntAyHnvtHEePhjlne8OpiwSSZIJykaj0mOPIsQmy3aNHzIYLpfsxsrNmbpYymgutVxLwdcL3dR6Yl \ nIgORR1jhkbIliRqCMWgRKAtFlkDfv2JYBDJlCKZHRRrbd0g8zihOr7b8x / / 5Bf3yA0Dyy8tzXNST \ nRUt8yGjVBqt7 / uC7M3zWs24 / Z5QfUzfHXJ4 / RORbJm9dkJ5csvjkXU6zQ + ousAyObnNDYj / jMJlQ \ npDWVv6VJIzZtiyUQpEQjGeYD9sshsrZslwsGUpClgiyVmGDZmrtV1a4T9BgSlZJ7iRIGFSq0CDSb \ nHSEUeJNDDJaeOkzx6Yh8 / 5DLTfEbsfe3Avz75SvSLmZTT2nrwNn1hi4IiDK8GxGJPdTEMtk / YLla \ ng / PEcUJtHW6zwdtA5zxl29M4y / ntLcXBHmowYbvbQhOo64ALimtzRtcZvIcsKwiAtY7ZdEyWazbr \ nBWnIqLzhp6 + + 4TaPeBIVfP31rzh5e5 / / cLHkjb7hfrV3F5jyHuctwVl + 9 / d + wO3ZK67PXxF5 + Oxq \ nR1A1s6OMD3 / / W8zXVzx4 / BTjNItlS + 8i / m4dk3MHia0L1PMF / SBBZ4rBXkJPR1MLVo3FdA3FLENn \ nR7hVwiapIB0RuZQP8jeUUeBiviUuoPVLbm + WDJL3qfsRV / 2YK71H9uwC5zNaK5ECEJarVU2rD8FZ \ nYrkjCM / BvSnzxY7GdNR9yrpuaW3Nq9OOd44PWSwukD5hoCKWRpFHU65MYH67IQuaJOpQQrO + OSMV \ njjIvmI6n / ORnP + Obmw1BCe4f3ifyA2KVcH75HOtrgutZLVcgY0Za0q2vKQX4rmM02Mf7mKpZkI0y \ nnvy9RzR / + TnVfI6QPV4HvFwwr1su518xVJBPeq7nC + quIyJGJSUqySnHM5LRPrVVNL0FM0LGFV13 \ nSVctySNLSBTCGZSSyFjf6RB1TuQO8DVkWjCOLHu55bLt2KlX3NohzsXo / X3yPFBtV3S7BhDUaJ69 \ nnvPlm / vcPxmTpiVeLxDuFaWPSTYd8nROkBXz / T9kPN3DVi1ppPHJEpXfMAZKN6K + yYmCQlhP5ByT \ ncsjZZkFAkqVDvBFgQFQLzHJ352YIW7zUWHVnDTM + JtMlh5tb9pKC / fKIZxcLGtuTxY5YbhhEa2S / \ n5La9z3h8SO1BpVO0UOQlPHoQ8 + jYo9WCw1JSrzf4bEC1aTG7hkxqUm + Jk8D96ZgffPAxh + MJyo2p \ ndinzneNGSp45ydVhQasKpkoTRZ66WtHs5mgc / bqlqTc4bWhjz / 30NVnksd0GpWNUeUDdQBOXpGlO \ nnN5nWb9NF98ik57VbsBw / Jhvrld4Z6m3EyLxJzwa97w8KzDREY + + lRDEVwgx4 / pcUl8ldNVjvl0f \ n04SEVVJxky2RuwvYtLz + aI5Ph9Qywc9GSB3x4PAB0 / Eh1XxNZC2pCURbw73BhChuiGRPrHp8uyPV \ nMTotaKRFSk8aRezOdgR3Ra5XmGAZZnv0jruwWzC0TlM1JUmVEX4mSL9O4H / 4 / 8 / e3wrwf + dbf8L / \ n / uXfcru64gfJPXa3huUgJ6gEZz1X5oyZ + w7ttkR1in63o3EWKSJaOkwIyKhgHm3pA1RBUaoRmpL6 \ nZkuzvSZLU5TzNGp159fsa + zGkgWHEIrcJNSdIyNDp4rYJZT + Ic7FLBOFKBcczCCvDU + cxDt5lwaV \ nO7LkgLYrqLcTnG0p85ZI7kjcNRshSe + / h3r0fS4 + / YQwF7z + 27 / mYZLxez / 8EfXJAaM4pwkJjYtZ \ nFCMq1 / E4LSjUgFmwVO2cKhOY / e9zmycMDg / JREtqxwzFiMFeQecC75fn / MjeCVPO7QN + + nKMKlKO \ nkuquh0Md0THFipZWbXFRh60Vce8YeAfS4OIpQx0zdaDwhNChvcWaBC1TLm8FddeSlClb17OLFOex \ npy5GbOqakgO0ucb4U0TWcdM8YzjI6FXKL56 / gnyPbDZjejjhcJLwnQ / e5 + TwAX / 944yPfvozVrua \ n3pwT50v2Bz / ixeqS6HHM3 / uv / zF / / w / / Gf / qf / 0lZ5 + + JnbPuT67ZVG1rKMVUvZ87 / 3vkcYrPv / k \ nEw77HmtvqEtJu9NsW0Ghew6GCUJGpFYQdXeB9ygSxPUL5nrHRb + lqBIO + yk2caz3Miw5 + jRwGZ6w \ nb5awvULHhncmDefLHe7 + W9RVipq9wyD + a9pmRSYilJrwTTjg3OyTINk3HeXZV3xyeop8a8D3fvgD \ nzvIUP / suZ9eXHEa3rKIlt1nNxc / / N16L95g8 / F2SPU98sEe0e0LqHGKwpD84xT3T + F5jO4icYOAi \ nuqbncDDlFwtH5BX5zFEhuXEjOjdDRhMuXm84vTwnzeCP / uHvsP / ejB1TSB4yiBX79TWH0RWFusFF \ nFVZaVpe / R9hGvF0opsUVf / THNfuP1tzuaobTv4 + xb2MvzxkUls + 7X3KVDOjKt0lWBQ / 8Ke / oz / jn \ nH2jG3zaszAmfXp7wPDzhPI6ophIywX6jME1AfT2g0Z8zmLxE979C3S4Z7QSH5QGRjziaHLBJA5tu \ nRiu / Q9 + PCLeWvWFEHVas2h3XqyWrmx0uEsTFmNZZLt7cooNBtldoaxmWOVfb77L2HcNixubWEZoF \ nR0c909GA8xvBpk7wtz8hu9qStQtOlhccHBwyPn6fiz7hrFFkXnPQWO7dAxvnbF0Cs6ckUcJ2 / oo4 \ n6UFVlCGgkxGtTLluA4suo0iPqasFQy2JRIspG0YiYSwkA9FAeEZIS3ZhxKKLWdcQZQGNYX7 + Deq / \ nxLbMjz / ekc4 + xG7O + OknV1g / RTBCWI1oPXuDErttWPft3bZE1xNcQOsELwReCAblgF7mBBUY5pr9 \ n4ye0raFuFzjl6FyNs4bw67Kwvu + RwaFFoG1rrqzBWI + MYoqh53DviLJsSNVdd4ntd / zVj3 + O6T2R \ nKrAiIisTBnsDLm + 2jMoZZ6dvGCYBrRWPTh7w + tNPePt73 + Pd976DCxqdj7mtKtokp0oz3HBA6l8y \ nmxhaYna9p2 + vGSSCJBFoNeJoMiTKHAuXc9GmfHHZcXF + jU7HVN2So4cDerfBNxEqTRnpIRZB18Nb \ n + xG + W / HtxxOa1YY3t6852N9nvau4rVaQJ8zrFo9AKrAuEIuCSChsf2f18kHQOcebszNWy3Pefe8 + \ n6eAAsXZ8 / 60nVFVHv7rik6 + umUYla78gDT3jKMGIgMoz8jjj + x / 8gL / 9m1 / w6nrFNDmgMBl / 8Lv / \ nmEdHD3n19Wvevf8B7ZXjmxcvcDeeTlZ8c / pjemm4d / yA + 9lTFi9WbK8 + h / 6CENZcvfaEnSHpe7zs \ niL1jXGaE0NO5BhFDrzwyzIhlQZ6llMMDOgSqCKCXOLthMNLEYcKuswzzA96 + / zb + xRm3uzl95BBa \ nsncvZXdxi2pukUJQ5glKdWRZoK4vKdMj9CggR9 / m6osXpERIPGm3puwcutjnqpa8ESOsc7x5fckH \ n35YMJjOu1hvSSrG + NaSMcasOV9eIpAXT0KxrqkXGwWRMMC0 + BMbFlCgWmE2Ld5LXZ6 + JBilKC1pT \ noVJJV9UMTIToYXW7woaEy + srqiYQgmH / / gGDNMHaD / EuZ7vNiH1PqWAYKx4dP2C + u2DV7tg / eA6l \ nIu7gg7eHPHla4qKGt2Yn1G7M2dcLzv01r6 / AX034YTIgMp / z6GnLjz6cMUy / TT4u6b1k1b5iUwnq \ n1YzGfUTPa9zmIaqP6dv / zI9GLdF4RhUyNu49qigQSkHxcEI8MbSFJX02ZlcLImkRbk232dJsJXXV \ nYFzEdltgqjlV32MWqzuNYRQhXE + CJ3I9MtI8 / + UvcdEeY53TrrfE / TVSbTicHaLHY161W3ypmOgJ \ nSa + hLOn6wMXScNHAThQoKUgTTZYoNsYQxN0yR5FKsskIHdbU7QaPojGGKI1AxQjlWW8uiOOeIpfM \ n9qfY + YChkiTuzvMhcXROAwVlPCbNY9bLLdv1iiRY6u3uN2LvbwX4x + 9 + n / / jZ3 / O + z / 8HS5uf8rL \ nL7 / hWgYG5ZSn904ojg75u48 + om1aFBIlI1wAEwxSpSgdUfctTfwIi0NHmnUj7ybmsQRtcaHHqY5I \ npCgRCN4DnjjRd / d + ztwdAIg7Kbb23D8uod4hjWU2yPj804pBvsd2u0VGCtNZHh4 / Zr74grraMN4r \ nCViOjvb58MN3yFcd907ehl6A1dS9YlU55OSYa + d4YRSRANqKWPfcG + T4dcckS3GbFct + x56E2aTA \ ntz3ECV7mvFq0VKEnn + 1jkyFN3VLEmuHwiJHaoHGwswgvmRUTHo9i2iIwsFd88K0jXp71fFatyEZH \ n2NqyItB5wHoyErTQeFvjvKZpwaYBGaeM9o7YdR2bbsNxUrB + / RKzqDg2LXKWslU5P61eEKOIRYz1 \ ngUExY1RO + fqzN / RLw74a4C7m3PZT / v3 / / YwoPMPsKuhaunqN7j1FHGj7GhdWoCOS5iFf / qfPiSNB \ n9fJjzPqK3gVWVwq9WZBKg4g8Z998w8vnFzgfIWJPK1qO330fcaH5 + ptrslHB5MEBTmWouGC726Ab \ nge82BD8gjmI6ESEGh7QDi08yhK4ocslk5Li6 + BUDvcJIhVAlXjZEiUHJilmRYXzD3B7xxXUHRrGX \ np6gg6G / fMJlO2Uz2 + PTrLbbb0gfNj / / iI + TxmMmTe3z4 + EO217BcelTliOjR0pPRUtUVi / OGfVEw \ nlSXK1mgmCAFZkbH0Fi88Qgu897y8eE2IPcOsxK6ru5egcsTry1vW8x3Iu4NhlJcUcUpjHrPebOn6 \ nDtXW1Ktz4hPBZLhHxwCyjLh / BYXn20 / e4fhQkWYW9D0uFpJf / OqXpMVDbrYR9c2WbxUpx9E33D + 8 \ n5fCk5979jjbJmbcdi9V3eHV9ztWiJbILSvOa / eEl69WKtqo4nL1iMt7Sugeo3WMyO8aJjocnUx6e \ nTOnFlpv1Ne3umNXlBbW / IWDxVcV6Z1nPPT7sEURO5xcEoTABsjTDeo9SGqkUwWq6EBFuNkRFyepi \ nSUzD / VHK4tU52c2cvXtPUUqxmgwR1lMMT5hfL1k0HaEf41SBVjmuq7ldPMfSYYLHBY1SA4zKSWJF \ nrzraxpOpAZNRhvOWTbVj0zaICAa6x / cNh9PfYd0WxFLhe09nU7quxThJazS99whTE3ctORbva7JB \ n + I3Y + 1sB / unugvR + zq2Ys8t39MOGxXpOv73l8UFCISTSbBCmxxEhVPbrE1JBJOm9pzcNjZAkaYKI \ nFHXX09QbvN1h + ppIdojgkD6 + E0cIgZISY3qkCAjhUNyZppxZU6R7PH5QsL2qcK1hmOY8eHCPm5sl \ nUgaE8KTpkNPXVwQTiJQjhJYogul0xl / + + D9zX404v1jw7re + w20v2VUBJ0eEbMCL0zOWHz1n6Kfc \ nrGuiXHJ4PCR37xH5lM3lNVc3a26 + 6jl + 1FFMNDJfMMpjSrViMnyHy7VDiyf87NOf4TZfIJ4MebF + \ nwcEk5 + jkMfcnMU9P7lFfvkK6iu8 + nXByEFNvAldloOpWCOq7cIeMUVqgsQgvkCrCotl0lvZqS1bE \ nlKlmvapwnUE9HfPN7TV0hpiCbP + I + cWKYZTjsGw01DJm4wyLtmFYplSxxbUV3ve48IDz6xts06AV \ nhH5Loh0hqbCqJ8o8sru7pz4caW6uv + Lzz58hWo + w4JSFrCdWHdJ3mM6xmluIS4xMkFnCihMMDgAA \ nIABJREFUn / 7JH / Mv / ts / 4 / Ljv2L4VxfMHh + w8R1EM7bbFGdjpsUekasIegeRRjpJawVy / z6iiRno \ njP2xYOhbNEvKwtMUKTJL6JWCVCNchTM3KC / YNxGhqfjsAnatZC8ODEJKud2RDGd0riMlw / WB9XJD \ nFAVq0 / N7T75NHQ / ZyDG1sXi / JLgO3y4QOKqVZjdWjAcFps + ptzEueIJQWOvwRAQZ07QNt6sN + XjM \ n4 + N7zD8 + Z7tocNRcX1cIkd8BXwlurhdcnF2xDQnVbkEid / TzL2H7Ffm7T2mt5cGjGfNdTXO2x7vf \ nOWY8jmjqjlg94OzS8POPX3L4 + CmffPZzulfXfO / BkPuzOcd7He88nZJlKcYNWF1K3rzZ8Fn3CzbX \ ngVjcMipu0M6zPXXk3dccjDPa9YRF + IA + DCin9xnvdbj9C54cbcnkktWiwK0Um0KxywuWW0tXtajO \ ngalpI0ttbrBeEQsI0jPIc8rJiOFoQt83nL55RRxHBKD2Bbt5z8v5OZEKHAwt + 4XGdwsGr3sev / M + \ nXjVEuuBm7RD5Mb7rCCql23bsmgXtdoHanmL6FVoHBBqlhjgyoiwnyu5283ufUM8bgm + xwuCDo9AB \ nzQbf3RKFNb4zVFg6o / FhgHEZUsagJb7zKDpCgDTJGOwNqXbz34i9vxXgf / TxGdf7EZ8vTslXjlYU \ n9FRcXa04l5d4q0mjALGk6SzG3wlF8nKA8YK6aSiGA + LU4uhpqoZ25 + iaDSr0 + H6HkJ5YS0h6jLmr \ nLxVC4vm1z9YHIi3QkSTXh3R1xMtnZ2SiZZzlHD844q0n7zFft3z + + QucrRFC0zaeIhvg / V1PhnWK \ nzlhQKVVasN7VHHWOm3UNLmJUDO / WLs2cm3XH1iS0 / ZD2ZsN2tWI0LGlSTVMdsdmVzLcd83TJ2 + U + \ n1ZtzdpszblZbpvcKkuIR7c0Vqm8o4xmf / + oV48iS5wO8mLLcbvjs + ZYy3iNKUqYHKcs + prIa9ADX \ ne9I4RYse6wyx9ARR4UUKOsdKQWcVy8pS144dPXvlEW + ee043S / wgY7mqKFzLoKnpr1c8mN1nHq1o \ nhhFHb72Fi1OKJGPoA + mg4vbsa + JYMD1ZQvyMZ9 + 8wfSKoFNaGyFkQjAROEloNLH2 / OTnf0FT3TLw \ nE + iGxGLM1t9i4hWt3BIrhdIxIUQkRYKINCpWlB6uvnhD6AJHByccP3qHv / nsnHiQs39wj35VIes5 \ n0tUM0o4sGMp0hMgUYjwg6wOmtYyShjQ0JMMBtlljVEbnUp5dVPzQphxPD6DqMbZib / 4V6W6Jiu6x \ nZo + ubXicehKREAWH3NyS9jEERxAdykpca + gzz4N / 9CMm82 / x5b / 61xhhiQgEXyFlinEZi1oRR56Z \ nytHpIXleYbYVcVayXrZk0wOcqYEc6GlbjxN7xJlj0 / TI9IC2tSgSRqMBm3rO67MrTJSSqx4ttphm \ nzZOTR + xPHvEf / v1fcvzoKW / Obzj2mlFYsyhbWhso8x + wvGn48Ft / yH / 8m / + TbXPOn / 4Dx / H + hCI5 \ nYTDUGF2zNoHPn3W8eHnAfP6Yo / d + QTQNJL6DesX87Ia + tqT5lFIfkY0K9JUmnp4wyk + oojdERwfM \ nxTWX8w1bnnIeFXTVFc2wRGZ7 + FWPdg3t + hWMK956NOXk4Ql + PeLy4oIsjbF9Q7OdMx2mrOItcaTY \ nrDeEwVtUxqGKglpqvliv + WpZ82DvPm5e8Wz5nCQ4jEjpfEaIByTFEGct6 / UN0lti5YmEIMsShKuJ \ no4BQHoPA4an7DrRA + g7lWkQwyEgQJTnOtBTliIMkItcJwdUYF + i8xskcIzx4ENaA9RgPKh / iXc9m \ ntQWR / Ubs / S0lbR + jvKevLxn4gnsHj1iaF9xcvWI + j5lv5 / ikxQeN8dwB1fasuhXOSzyB2jiG05a2 \ n6XBeoIRGmR7pPbL3DIqcOIpwUcB25i4VGqdk + YBYC9p6S13tSHRMW024vvBkfkeZGG7ljvUm0BpB \ nC4hBQmoFKsnpWoMHlArY0NMYxfnVAmcj1qrHqIh / 9W / + DTIfsn / vhERYNue3jJ3GK8nKX2PUligx \ ntGFF5Cq86zBaY8cBLzXf9NBeBnRziFkWtLuK29qQzy7YzS9R2y3O75NF + xifs2pGfPqs4mpZY0PH \ nYDRhlA + 4MoHVck6kx7y4uabaNGidI4NHWkOUWohbegLGQoegFxFxcucfkBbWt1ucVshEMpuOGZQK \ nd3XL0AqKvQN6s2OY5qRS862DB4gsZn884NG05LD4kETtyEpPszxjXJRU9ft89POXfPn1kl9 + ek7X \ nZAgxQCdDltrSKkOcjhnFKe31kkQvcXZBHIMLEXXkcVqiZYQIMW8 / eEBZZti2Z / HiDX / x7IIgNOVs \ nytntSy62Hbp4jRSXaFczjndkcsPe4RF9bbleXVB1O5okRgnDMKw5yRTjWcmn9x / jrs / IZ0esOknX \ nDfGqQGYxvVzQBEvedShAt7fMQoBqTho62qVnMH5CtdNk3YbOt7z17tssqjmbbc8vXn5Ekw / wraaf \ nlTQXPZmGOGnousCuTnGrFVY2ZNOELIqpqysSHdOhWS1rHsoSzJbQKVYXW26 / ekMcHiGSgCwjBvvH \ nlDqhKEuKDPAlpp2jQ0fie / IoMByeYBvPF18E + vYp33zqSfQ99o5fY + wbvIWkPOT / + nf / ltevDUfH \ n98mV48 / + xT + ltM / JEkOZrVgvFVX7mNv2AR99c8UnF6 + ZPYToqx1ZtsD1cPVyR9vfUo4K1s2Qy5db \ nDh7V3Pt + g9UZ8 + iI5y80 + uyQemdYLneoBAgZpUwJBNKkw0fXjPOGvQcZxhmyUUSkd8zTCdm9Ma7a \ nkCeC6WhELC30U8aDnCx / igkTqjamsQNuak88fUznWiIsyhjsZoe73uKMwJHghKDfbHBmh2ZHlvR3 \ nMy + TYa1hb3qP8WhC3QhQA3op6bDUpqOuN6hgSYREhQTfK5xXkGW0jefZl + dYo + 7MczqFAFmaILwj \ nFRqfNHiVUhlPX9d4YoxxvxF7fyvAf / RwylU0Z9UY9nLIM8X3v / uIn6xOac2KTkLsFL0LNE4Rohyl \ nS5Ca4BxCBMpyQCI3GFq8Axd6RBDMJlMSpenrCh3FBLcmje + EEUle4JTARxqVS7SKiNOErinYNh3n \ nVwazu8L1W7z8htZ5dr1F6ZRhmfD0rQ / 4xc9 / hbM9gZ7NrkYg2FWe / b1jXBrTNA0ChTIGv1pwc3FF \ nt6vJdYJzAR1JQuiRApwX9B1Y39N7Qafu / ms2 / kMW3YY8VLRuSdOuGKmC0o / odyDbFJDockKaTLhZ \ nd7CtsEJzWxmuO8tokHI1X2M6w2yS06sxq7ZFNR3WBVCS3oOUCUIouq6jE3frodP9CYPgGYkeFTnk \ nMMZLhXYNaVsx0hGF9vSJ51o6Ep0zzg4Z1YbYBcbeE6 + WxMOUTXvDQhk2b3akrsfgiduIt5MJYm / J \ nrtrQtOfEkeJLlWJHb4GfUq22TI4Csv6amBopZ2yqGemDKYPpkGYdkE5hg + D1q1dID3k8JKJEjxqC \ nUDhj8NWGttkQbEIZxbSxxdFx6p + T2ojmuqHNS6L7BwxSiVpcI9OIaG + EyTQkCU4EIikZFTnVpqKb \ nSLxV + KzkBQn5oeSoveHDvZ5JAq7rON0uObtt2ZgR2l0TIsNqe4GiYZbFXM + fYdNHYFIm4yFb1ni7 \ npIwhuILFJlDem3Dv6Qy7u + T5V18Swt36osSiUfimwWxqUivpvSQQYaRAxhFCg / E9idYEX4N12OaG \ n6UDw1luGcRoxTff4yV8955vLJSZo0jjicJTy9knJ936kuPf4mC / fnHN + c8Vw74Q / ePj + 3TP7R + S + \ n4373LhQbruwVp5GkL2Y8uzTUfcM / + Z09qvpT / FnCKPsOh08j7p285usvh9iQc / TUY + WONN1nFZ + T \ nDxXL5Q2LtsKuaxKX0696lK6Zr2744PB99ktBOfG4fcfJXso4yxDyIasm49npkqTwqDRmdHDIJEvI \ nlaLebXnw6CkuBLabDXlds59p2t5wOMy5sRW1UjSNxXUdkdJE00eooBjqBJ0lIA2mWxJRU2YBJWOq \ nZshokqFjwe1ijRgUdwYy6ZD9BtSaKOoRJoDzEAIiuuPXuu64f7zH7eIGK / Nfy9wbtBTooNCRQGHp \ nQkVdC2qrkAEiBZjfjL2 / FeBrUXFvEjObPaD76DOWN6dE94f8i / / mT / jZ3 / 2UNY7V8x6DIsoHZIMD \ nitEeVdVSNxWxEkRxRBSNkVIhFcRxQqQ1IonxEowVBGFJvCdJk7uAR5JiAshEk6cJAxx9W6NyhXYR \ nfVcT1ACVZLRdRYulUwYvJA9GKSHSeBnjpUdIdRdqsdBsHXW3QTeSuq6IY4VWErFZMxyWDIcxMlha \ nYxiIgt5pnJXIqKBtI4xJcDojSjNkOiDJjukCTPZzqnRHL1bsrGGaDei2gV3jwHd01jIYaILZgqso \ nRwN83bDcrOmrEqN7JuMBp2dnrFdzjAjY4PFKYIMkhBhnEryUuMgRZZpJnHEwiUmaBUeJQUeaPk9Z \ nmR7XWpJhxCiJKbyDUjI9OuRw + halG9K5lkGWkPmA3dZcXN4wrxuWwdLWB + w2Eh86huMh5SDw7ocT \ nErlD + TWpdvzg4CEvqhTkPifH9xjqW4a8pLp8wYsvlly + 1ixSjXcRnfUoUbDb7WitJQRP03TkyZih \ nWtK5BlzPSFuaekOuD5iWR7jeIGXKJqxRAVyzoTUVegpxUmI2tyyMRewJxocDTHtF5XfkMmKiG5rb \ nl0ze / x4b16CSGEYRP3xwwJ / + g / dw1RqtE1o54 + fPJR + fxsSmIyQJIpX86Z / 9U66efcq23xImY1Zl \ nzua2I76uyaRjnDaMlMNTkYYO02q2uzmDqOH9d3K + eVNhmh7Vg5aS81efc316gd7tGEeCKNVUWmJV \ nS5RG6LhFC4 / qDRrL4dDx9MGUND4jNB2ff3GBkDEf / u73 + fr0HGFXPHjs + P4HkrqTvDpteOvJH5NP \ nJJfXDfV2w4OjCXulJ5UW4W6xfh / PMT7UdOKMt99r + d5bhpkvuHk24PSRQrp71OE1YbZk + ta7lNm3 \ nyPc + 5nb5GXZT8njzQ1arHlu9ZJoHKnq2mwZ5L8bEPYO3Ct4bxez6LbVZ8O47E2aFwnWBpovR6YR7 \ nJ / uM9AaNIo8Sul3PpuqZrxVbI1g3DhtKspAgthWqa + l9y5oYX46RakwxVGRxRicL4jhFRxopBMJb \ nbL9PsDXBdwQnGRd72MjTigCTI5zXBBfAbYkiw0AbZOTAOLwF4 + 5empyT5IVi / + GAz1 / 9ChvtoYIj \ n + BYVeoJy1Laltx1xkiBkQeF + / VVu7rI5v8nvtzO0 / XrFqs8YjIck7QS5bfj5377ig9 + d8i / / + / + R \ nr5ZXPPvxr / jZL34FqsTLFBsisnJ8p0trK0zvCDbFOEmcJwwmI + JEstktMP6uyEsoKLsUlWY0HqyH \ nKM + J4hivJM52uChFxVtcZ5EeQqdROgOnSBIFCrwSOLHg7OqK6d4hu80CT + D4wTHbTcf82rBc9Ojd \ nhjTVjA8mjMY5KvJIaYi1IihItEOGitZ7ltueKFMM0glb5 + ldg / d3xq1ucU2iM9L0MdGk5OJCgm7x \ nRYYNt8iuZXcdszM1VecoooaUDV7tKAQQJWjfI9qO7XxFVe / wzmC9Q0YJVoCTEiVKfMjofE + QLXhL \ nlgl6c8leUTPNDbsFtDblSvRsE80gSalqwV5jyAMMXEmUpRBJEqepqx2m9Zg6cL1V3JoxcyK + 6ecs \ nxJamqkgazWxdcpDnHKQjxnLCLM9QkwHHs0AfVbT256SiZ7Y34GH6Hk + HNacHlzw3Y15e9MxXN1Rt \ nixUtTvWgFffu3aMsHzHNjigKT6IbykyyXa + Io5zRCF6enhJoedPGpHJEUeToIkaMM2QwjIqcxeqC \ nq6 + fo0ZDHr9zwMdffM3J4TGrX33G4e / HVItXTEdDrvotI92j3YrNpiMpx9yKmKseOLzPe / GIE65Z \ nFwXjwwKd50QukHSWi5envHxzS7oeMLyI2CsjTmYxpZiz7RSlkiASfL + g79fUa8vewQMyXzISKVc7 \ nz2pzg2uWFMGRicCoSEhTRS8Fg72Ulg7vGkZpRKjnHO2XTKKK / fFjMpVi5yUhaObzAqkfcHh4SFN9 \ nwd / + + N + h5Lskg5xPflWR7x1x8vgx33onsFduyfwVm5sbfq7hIC5Iu8Djds207FDRjo6O8 + tTNv0K \ nlwzxkcUkFeuNJx3GWFquzyWK + 5h6zctdxWVzTsUOISKyMOPhcEZZDpjdHyASB + IlT46esKsm2E5y \ nazxRpNnawFW7w6cpR3Q0247bVUvXRsx3klZNue0TVk6z6TzbzjOxLVPhiLXCpzkmGxJFKT0SJxxt \ nYtEC4hDQHjKZQqRR0RQBWOOQQlOMShZthw8aJVOUc2gzJ / aSKBJ3PVNtR131ONNDFIiURWUNetij \ nUotSKb5dkUrLpNSIYEFGtD4gtKKve7yByJu7Aa76LxD4v / fk2 / zbN7 / g81df0N5es58OOBw95JNX \ nLc / + zZf80R / + Mf / wv3ufZ9bz4utblAn4 + ZJyMGBv / yGxTxGkLMScQWwZyB5BR + 9BDcdY15EKRx7D \ npJ + w2W4pVISOE7wNBO9wwVK3PaZtMX2H7RuGaUwiBVoEQlNTiAGzbEDXWprx23f + k6KHYQRhwqu + \ nRRUa + ciQ7O1Io5ZQ36eS99htarp + TRxPSdMJ5USQjixOJNTCsQ01p6HHpyv61pBXGeP5EGUcq2IH \ nAp599QaEIxGWXlp8N0GnOeOpIr48p0h6MlmTRy3W7GgWhunkgLEK1AIanzBpPZtowLPC0oqO4w6m \ n1xLNAdH0iElp2PdnXHcRp8kRem / EgXzGYbREDDNeiZp5fUpYSyb9DC8TzlxgpRTfK4b8 / sHbuLaH \ nsSUfWtq84yc / + QrvD + jVhC4Yrs4 + Q7aBooFCSTpbsW0NRgpui4Ly / j2iLOO / + rDiUf0lR4MBQY15 \ nbWZ8LA541a54 / / 2cH / 2ziB92Gf / 2X / 85p6 / / E7vFNXGUIOOS6eETfvf33 + bLV + d07rs4I0mLHX2x \ noEvmzMotSWY57DyhisiuKvbfnfH / UfcmzZal53Xe87W7Pf1t8mZbqCpUEQWQBClBBimFLFLhka2J \ nBv4FHnjg / + MfIpuWRZEMmbYMkQQ7FAqoPivzZt729LvfX + PBLYfnxgCBPT57x4k4Z69443vXWs / 4 \ n249gmeCGjsfZgv1l5Oc / eUm4iWTpjNvjV / z + c88f / YHmf3695nP139C0CU / EHY / GPQXgw4ImecLa \ nLQhqBscGMW548cEjqvk1af8U62b8r3 / yd4y0KLlh6m54Huccqye8cU94cVrizDv8 / fqSvdsSdMuF \ nGTheWi7vJU8fvUd + mvD6my3N3iNiih4CpfDotOcQHHaxxJlXfO / D7 / G7v / 9Pub6 + 5fLVa4QPvPvi \ n + 6gQMJOco3vJN7s1h1JBGtm + / AVj2 / P2bqBKNI9Pfow273KoIXUZwjnWu1uGpOWvt58gFx3lWYpT \ nf8B135BIx3tPPuTNvqFqdvz8Fx9zaDt0MuN8dc / Z3FOmhiHJiMkVV / Udrw + OVwfNrhXYNkMMz7Cu \ nw / ia83nONOuY5zD1Dn90HIoztvcdEcfgAjFahJ5z13qCKGmqQD1MOGxKfGvou57R72n9mqZVDPUE \ nS85Jdk8MgZ2PJNKQxgEzHIkEBi0waUrwGpWUuCAY4sigIQZJok + w8gStNfOyJsSOOTuk8Ix9j5YP \ noHbvNb5ZUe8LWtdgUkGWDMTxltBsKGxEux7KOc + + 933elX8PHHDZnFzNya9fE2u4HJZ8qZbUQpDJ \ nHrf7HKNvfiXt / bUI / l / 85M + 4K3vW / TUz5Qjtmhpppz3MseH1q1 / yn6 + uuf5n7 / E / / Q / / I3 / + Hz / h \ n5x9 / StvXjNHTuYE0LxEy4dSUZKJjIiXBRQ5NAwF0FKhxIAyOt22HEJLZZAbG4kMEpRFSkWYZ2jl8 \ nvSU6C27Ax0jjR1588D7D4Lm6vWN5ckqnMoQAJVOCTCGODOIBfmGsIE + maJVSiTkisWQTQYKEsEKE \ nBc4qnBwZbU8SM07jGUnd03cdUVSYtEH5l4yux7gFEongoW9facEks7SHe3SuyJSmyQWjFORZQR8l \ nGIvIoU1yOq8YrGDUcGwmCFUwl4E + tJxlnqcvdujwM9LyH8kTg1GS1eQR7 + UJnVD07TOu + zn91Z6u \ nXtNv72nWPa0eCKYi2ofjrU + PNW59wLkRkUe0adAqctwHhOjp + j3Hvud4bCnOLmhlQ9O0CC1QCsam \ nZQx39EPPv / m3 / 5aPvitp32Q0mw3DaPjizZafXq2pgiK8zsnfyXj3seJnH3 + O9xpjpiRJRu8kRuc8 \ nefyCq / uKZvySdDYnL3JimJPy25hgSFTOO + 95FmVK / 8cJHQNvbi5xu4r0GCFxqFiiL57zeuyJ3zwh \ n5cDkceQnf9dh / I9xd08opiNK7kGd0iUpZnbBzf3I5bamGzo290f6UfHNveDi6Xe5v9ygi4BIA9P5 \ njKdPZ6ymnqry3N6n / NVPP6W / W5H3Oa0fIJ2gE8vtVjG2PVZMuFoL + mELsWC6PCcxOUNXc / bknPff \ ne0KqLZNyQrLoOByOXF6vaduO5ekpVkZ86NEy4l1kW2k2e8MgCup + pHMFNi2ZpIZFloBV2PKAxFG3 \ ne9q6ox5gNUkJ + YhTkjoa1s5we3NkWVju + lvevP6K9eYWYSQOS6EKwr3j69c1w9hi0gxSyX5MqMSM \ nUUxxY6BOGrTNKGSKVHOq3DJIT50o7oUGHcmHnLrpkEoRosJFTSDS9wkhWo6Hhuv7NWNrMCEjjh0 + \ ntgQGYlBYbRBSP9CsZSSGiAqevhkxxpDkGVpJgvckxqBCxGgNMSDFiFQgfY0cDUJmbDctUnqytKDv \ n9xj1YARxo8ONjr5vGUKDV4KoNdYI8llGaS + Y5QPnT5 / z / tt7HvmveGYDb9cJH386Ml8tSatIXW94 \ n5eE4VNh2IE0gyQwXq2e / kvb + WgT / 2YdP + PTlTwmqYXNzRTz2iHaPFwZ1GEj0jH / 8y8DbTxrefe / 7 \ n / PMf / Us + / uzntLFlEIJsvsRFQzHU6MFDU1Ht7mm6HmlSpIjgWpSMDEVKlhcM1qKNRZmEKCXhWzSZ \ nDgGte / omEAZHPwrSNOP + eEBqxeLR6cPnY4ESIGR42Lj7Hiv1t15 / ENEhZUY6mxJLST / ZIrMM6VfE \ n6hFNF2jblnFwZL1nEh / OQR01YzziZUMwDTr12Hh8 + EOrFCc0gxswwsBQMZ / llNMc75bI4On7DhFK \ nUAKShE5IemA0kkGl + GSJ9ZJVe0ciNUXoefSo5ofvX7NIv6Htp9zzFCkFmzdf8fWN4cvxAxr9HFkl \ nnBBZSce88Gw2DV4fCXlkLR3HIXK0Eu0lsXZIMRLHlkSXjO0eNzQIq0mLJabM6bsa5x / QfIfjAVFV \ nmCRlvL3lb / / DnzJcXvC7331MWZ7y6otv + OTjl7y8jowxw38hMV9kfHP + FV99cUNbgzFT + j7w7Dvf \ n5ek7v8Xf / N9 / y + 3 + iDppGes1Qn6HOExodwo9X9FtHX17z2Q6IFdwaA40zZFZljBJS94eOnos2fw7 \ nLIiM9nt4X3OHIwlzPvruh7y / alian5ImPdnse9yOJ2wOnjet47PrW85OLuj0ju3 + yKsv1pw + + QHS \ nCaItGGRCN3re3Oy5uVuTZCkhO2PyZM5kOkHZFIsGlWLshKGHsfUkOkcoi84r0mRKYh / SnvmkI7Ej \ n616ze3Mk + obyrH5Ag + LJU8PZomA5SWE4MksETX2gCc / oqfni5SX7ugFREqUmQXMMcL8 + cjpkD + V2 \ nSUBpz9551q9bpF4R7YruVcJt8jmzMmdzsyWOLYf9AaELnI8MAIfAZq9Iy8eoJCH6BN + meJUxBMvg \ nNKnUtMUtLkYGpbHWsJYCgicRBuEF1hrKq5F + jPjgOVQ1d / d7druBqhbYZM4wRg6xI5EFi2zONDek \ nRjLJc6bRsN / 2VMeGJFUYYx + IbEJDlLgARhtMkhKIJDpBBkW7O6LESGIDSkZkcBgp0EIyyhwY6buG \ numo57G8ock0MI6PrEcYhswGpDMJYhNV0ITA0nulswaurjszmTBLH8xfv0XLkIpZEvSSXJdNZSaoD \ nh27k + LYiDD1JkRKyX02yfy2C / x / + 9H + D9 + YMocLEjqHZsx8b5k9f4O1ArK9prpesq4A / Or73u7 / D \ n9777Hpf7O17vdsQsJ0lnhDev2G7uaNeXGBkwJn0IScWA0ZplmVKfzLAm / dZKaf6 / muMoCKNjCJFE \ nPMAy + tFjlKIZR1JriVISRcA5h1cSIqgoiCEQg0KQIKMneocSCisNIplTpSOVrQlKksgpWb7EmkAS \ nG + ygGI5fM4yvSJIDQjT4MRBiijXn5Erg3D2Vg8EIPJqinDEOe0qjYezo6oDIc6wuiU2JNjljlIxK \ nMyrQmSF6BZwQp5rMf8Zj / 4qllrRtxv54xYcvNO8vMm6OOdvsEVauuDOvOF + UyGPK16PhoCTHjUMf \ nR6QHk6WcP36Cmi / Zd9A7xSgyiIo4dmgxMDQHjMnpQks7dBgfwY / U + x1RREyiyW1GahKqwxExDlgi \ nP / 3Lv + DTL8 / 5ydMV / 9UP3iWzDw2ZWRKhqmirns9vG / pP9wxjBCxSG1zfIaVlfbfm9e0tQWnm2WMc \ nAp0qUuWxtmda9Ize0RpBiyG7PmAV2MU5vjC86Vq + / uaKuZ1jKCmPI / XkK0YGjq5g0xvUcMOnv / wT \ nxvENx1AS7Du8rnvWh54Wy + dftJT2NaJrKKwFkzNGTUxOaKOmjzm + jxzHhCKb4rsOb1PKi3NiKXBY \ nlCwfFulqgklSzPRhGRilJMsCUkiqtkGIjjQRDENgW7WEUKL1lCM1Qnmi6 / GDQ + 4DQ7vHuj1iYqkP \ nO17dTnl1eUUQmrw4w7mepj / QNHtOZhmTPCczhmdPz7hvrxlGQWkLbqoDKi7phwWdz5jqrxhu3tLV \ nR3SMiKGjmM049ANWWxCGMF3SJRmjzggmJaoEowxGSBI / onEwCrx74ExjFb3n4V6nFcn4AAAgAElE \ nQVSbcH17Sz8MxFd37PZ7xuDRNkXIBKkybDaB + JBzmGWC1KQkKuB9 + 9BqGyLRtzgnSFKNC5pI / LbS \ n2GCSHBPlgxlDJyil0Ajc6Bm7SBAO6Qe6sSG3jiQ1hFHi9RKlAk3T0rQPGFb4f7HXI4PvGa1A6ofl \ nslYCg4FeIx + dsrnvyIpnuKJjl2bYxx1nRcXJxCDX9zQ3XzAZWiqVcrOIzOaPKRanbPa / gUc6eojc \ nX28wZ5ahD + RKE7SmFR4zSelDg + reUK / vEMOGv2 + vefbRh5y8eEZrDAcsd9uatKkwqYHcohRkxQRp \ nM7qmguAwZYJEEZyjnMzwITKMDiEFCoH3wOBRIWKFZt / 0pNMJNsvww0Df9dhSkQrJIB1CQgyeiENK \ nIAZCdBijyNMU1 + 0ZYspoM7R9Ti8M3p0TvCa1e5bplg / VW / QLw9u15qs7w323ohWG3GpUDGTKsywf \ nk / SK1sxpSMjnc7b3l + RzjRvW + CEidAQUymT4mBGFZfQBJyJWWERISdUFvb4hy77hO9NP + aMf / jM + \ nfXXOn / 77n7Hd5MizD8knJ / ghI88miPOn6CLQrG8puoavxMjd0LPdg80NRmvWsWMmIZlNKNIV / ajx \ nbsC1msGNNP1I6wMigaF3GKvABULXkgrJ6CKzWcn88ZLdbsPb60u6riHoHrN6RHrxHTh9xL664gd / \ n8BGTV2 / 46hefE8OBMTS0Y0AoTT4tGdqOrEzZH9aoviKxksH1ZGOB0ZKliUyLCrPscXFP1TkWiylR \ nRsbGkWYJ0XvWb9a8ffOWZlOz79eEkBKcIj8dqDtJ18Fu + BJ7 + oqnF9DwXf7zZzm38R161TJQPhDL \ nTj + iq / dItaZtWrJc0jqPyb9EpXOG3iB1SZIZBAatFV5FnK45uBWpKZikK5S2WD0hogFJkICQqMET \ n3Ehz7PBuS2tbRt8Qg2ZaTtC6oOozrJUYPSKNZwwVd / fXWO8odE6anaIRLKdTXHRkZfJQSeISijxl \ nNklIreAiu2aykqyKJTd3gbvLW6p + g0kaNu2niDRjdd + TiIjY71FSMs9yuuOGuU5wQJJa7PmKUSW0 \ naHphMNoSugbDiB6ObG / fskxPcCMMo0CqSNWMbA8VVdOxO1YURYFvWoJMMIkhK2fYNEegkWj8EDFG \ nkPV3nM4z0tzQdY7dsUPIApvmaAPeQxgTfAj4 + NBpH1HYfAoqJUrzYJ10nuAc0 + UUQkXX3tK5GmkC \ nJnpcqHFxxCpLkgsQOWmicGNHnuYYXbI9bOm6HmESBBqlLctFQTrNKa1iYi3zxLMwLSYc + Sc / nHK / \ n31BmkZV9wi9 + uueLn3 / BKlPk04xjHBmsRj / 67q + mvb + yev / / uBaxoOpb9kdHWZwi3ZFjcGw2e8xk \ nibQJergk1VPC2LFf3zJ + uueDmeXi0XvorqBzLRcf / YC5CTT356jQYZOUrJzyxaefsL7ZIOpIaHpi \ njAzHGqMT8rIE55Dy26SbtnhXs7 / bovh2MpYGJQRpkqCDQkRP9AcQmhgjQj746X3 / EJcWGqIaybKI \ nIyGoJXWjsarE + gWlaMm4ZJF + ze8t / pxaPCPIZ2z1e3z9OqeJKUEdcP2XRCpS8wKdFiR2BiojKsP5 \ n8 + 9Sbd8wdoYiNQxVQJhA13fYNGF0LZNpiVORRCWksxyTRo6 + JR0OxFCzr / f8L / / + b8nsjNtDx9E8 \ nZ + 8S9tdfstWOq6Ph8WrF + / KXFP4b3h4EIj0jffcRUusHnF3QtB7mWcroPSEKRnoG1VJXLR5QvsPK \ nATsDET14gagcoYvYJCEMD5NRNp3wOH / B1e03FCrH5I / w8ikff37A9TUvns7I8ozlKsfbkd3VhjSZ \ nYGxO9IG2q0lswr5akzjL8nTJdGL4ox + XnJzMsFqTGkuWpvTes686vDSgNf9459FR8LM / + z + Q24qk \ nHTHdSK8zhnKKsxknuwliyFhMIjL7mJC95uX9Arb / mq34kHp1hg7 / gIwSHQHXYoVDyIpiliK0QbjA \ nZHHK6ZN3WVew2Yzs72ssJYvl / AH9OJ9xWpyQGUtucxg9qc0wNmMUgiZ4umEg3Qm + + for6u09IRxI \ nbEekRydTvBtpQ0vDFK0KvPQ0fUPVNKSxQBB5ezsgfUccWiZJQFuJ8ztcbDg5L5hOErp2i + s67jcH \ nXr3uqHzCsRYMTY7CEtwDl6FXB5xfEUJEZpa2afFDSrE4wZuEvJiQ5AVdtGiZkeoE4QUyAtEh25bN \ nq0u6wxbyAaky6i7Qe0nvJMpmFJOE5ekUazU3rxv6MZBOUqbz8uHZdcPYV0zKh2Tt768mSDNSuS3e \ nC1JpaRpB7wR139MNPSaxKCXJrAFjGGJEIBBSY / MJSkiQDmMl + EAMEqUdRWEgwGBSsiwjNT3eD4z9 \ niM0thITDTtCNAmtyVquUudiQJCVITZFZ8AdSuUWJK6alZEXD7z2asxcj4809ZRz56tMveFkMHMYZ \ n2ZMPKdMBryXbS4fXKW9b8ytp769F8D + 4eErVv6Wh5dnFE3xy4Ms3rxmwHJrAPJ3y3juK6hDYrCsS \ nLTjeX / I3 / + efcfa9ijF7glQL1OScdjgg8gVju0PZjF5KYpqQzCcMwqHaDqU0Q3XElOAbSQgQQmTo \ nHcMwoKSn9wKdlgib46VCCscQHN57ZIwI7xAiIoVAKkEIjnbsEEAE + q4mkxFvBFpospjgR0XiPJk8 \ nUthbLlZH3j8z3HZ33HUHnpxJPrm2tP1Tophg8g9xYc9 + cMhEICWkVpIVGUop9hvLKCY0g6Te1jT6 \ ngWBfVxWBiO8zQoz4LMVPDI38R1blnN / 78F8xEd / lz / / LLzkeIOrXVKPgqk7xcsn3 / + nv0Pkl6b3C \ n3bzlmVU8WuTcNZpuJ2jLknS55Js316TK8nSxwjhNnmjcoSKqlqAGptOSZJGBa + kO14j + oYHTVR7v \ nI1IaQpTUgyOOgXJiGfoDUktm8wLvBXdf3TK4A4lyqK5iNSm5WLxg699w5e94vnqENZa6bmjqgWJS \ nsDpd4f3A6WrKajkjL37Bo0ffYb / P + fuPtxyOKdt1S9dXeF / R91vu6wYbAs39hjxLGETkaCNBRvJB \ nkfSeKGBqW2bFhu98 / 6HX6eryGTL55yyWTzDLzyiOJ2wPR5xzZDoh9ZalOeX5xQk6Temj5vzpI263 \ nR8p64MV7Od0ukIucJMnwRrC4WOHiwxI2V2CkJ / ieY1tReUUcJcoYJirl6q1nNi / o6x7veoKQaGPQ \ nSUIUEoPA9QMBR + c6jus9ot / yeJlwdJ44jiTiSFHmjH2PwHGyKDhdPCTQy + yE508e09w3vL49onzO \ nIAYQAzI0SFNBUpPZjo14QqI1GoEKkagttUnxOkFkGW2ak4ySoY / 4QWC1JFWS / e7A5s2G5rYn1Tmb \ nbMSajB6Fi4q6cySZx1qJTBxDbHn2eInJClRacmg6hqEisYFlaXl2ccasyDiv9qAFN4eabExpL3v6 \ nKuDHnsD4AFofO0QUODniB4cxKTgJweOjxyFIrESQEIDR9XR9h7Hf1ib0LXX0pKlDoGi7ASU0MkIf \ nR2SIBBUgHEmzA7YwwEg7rslNR1G2LE4co7vl47d7vrr / LY5I3O6ec3HkyckJclFyOjNoeaR2LbU + \ nR04tn11u + XL9qyWvfj2Iw + FAoj3TPEEBwUUsKXKQFNmE58sXaHEL4xEGDyEi6Ojjhk / + 5v + ifPJ9 \ nFhcf8NXXBRM9cDGZUpSWcpbT9g3apjx7 / g4mduTC0jQNwT2Es9q6pW1bnAs4Fzjs9 / RKkKQ5SV5i \ nJ3PaugbvUHEkELAyksmH7 + 59eGDbSoUyOVIJlDF4HxjNlKAmD9t5t0eGFBvn4NYEvWUxSxntUzLu \ n + aPfnfL6sOXjn3xOv / + Ayr9ALZ9Deo4aX2Po0DGgXQuxY / X4ObfK0JPSe8kYJOPYIkRL32 + pqi2T \ nPGOSTcEXtCh2psfsBX + 3iWybnhhKUiUp3DcUds6rL2756795y + zRD3jnvR + x0jmz + pbqcIvKS56X \ ncLlr + asvtpx87yOmszn1duSwrx + CImFDDD15Zh88zVgkKUJrgj1iE80ym3P18p592LM8XVCUU3bH \ nhmp0dPdb / NiQBUkyOFz4kjhatDSEPhAOGa8vr0lURxCOopwwmZwyDh4pFUkeSdISiQMpCEOkPXb8 \ n5Z9 + zr + rfsb6aGjjCV4uEdGgfI / 1DYwVvt8zxsBsVtIrx4ERFiV0AtV0zEfJbfqai2JJ6huuP99T \ nPD3no / / 6jzmEOZW4Z2lvePToKYObk2SWeS4pRMXC9uSJoo8wCMMge8oLyxMhGIee2ESsA0VHOssI \ n5hXU76OBIvFoejabLa / 7A1qdUJbnpNPHJNJyffeW2mqGoUMbRZZK0smUpJwyhITct6Q2YRg6ohqx \ nqXpoX4wSKTRCJRjZMoaIlJo0yzC2oO8lWmfsD3tu776iHxp6qak4MJYalQp0FEiZEWyCSgS2PCcG \ nzzCMWKVBapxQqKwgGEsTIUhNYMCPLX3b4RjZr1 / jXY3JDE3bsLkbsJnCZiXFdAqyxxrIEsGs1Agg \ nTzKiSuh8oEgs01JzMp9QJlCYiAg19w + kY + yjJcN9T7qcclEWiCjo + jXEnqZTdN0BPQaEd + zudgz5 \ nDGSK1iUBiZlYrJ5ibYFQkRhbRjfio0AAvROMjUYrTRCCCGgdyecJQvRI0bPfP2Qztu0BKRP8MCBc \ nxTprqPceG1te3UjuRYqZZvzo6Yyk + SWZjdzv7nGNIm3fcjV0 / GKEXVNyvVMM8TewS0eZES0D00mG \ nJCAGRyEMPZr55ITj5Zr9cGSoR7SaEIdAkggG90CP0bGBfsNopiAShIcgHG9fX2NSTWYzJrkkEQYj \ nJdI8WBzLcsr6fkvddyRJyjIrMInmPkRsmmOLCYMyNEOH1hLpQYaBqBW6dgQizntQCqECURkiChck \ nKMlRrHDO0Y / 3yLAjUzlNvcfogaPb8epty9v3Os6yhKwbeGeM / CifkjaGv9tdsZY1zSTlSaooMgPD \ nkWp3jZwvefy9D1nPJoBmGDXBBZRukWKLGRuEkihfE33k9s01O6lQ3 / kQs43cNQ3jYs7pSSTb / zUf \ nXWjmZkQ7xweP3uE / vhx5vfuGPzwXTJIDGMeYDTwrev7AnBPNE24Gx / TiKTs5cnx1R3 + scP0BnYO / \ n8ygxg + AQMjCbFmiZoKWk7wFy9FRxVDCGQEhTlJAMbYX2IIfAYXOFTj8DA6vTdxlHgzs4ZjpijceJ \ nQPFihYiaoYsEZ1GiZBwkg4tMi5IiLdmvb9nd / C6HIdLogTYN1L7FWo8aOrJBYIcJ67xjpiUfPXlB \ nc39H2h05VJ7OWMZUsc8kMpNsDz1y + 5iqnjDppzz98XOw16wUmG7JMgGPQkhPIltK3TJJHTH0GK1R \ nNgf3hFH2DH6LpCJNFckI9XHD7nbg5OmSMttRppDKGhEa9FCjLyyDXlKFE7xZQBEhFTipEElBkS9B \ nB2JqGU3C4BT5eAcxIUsVbdswuhqTauqhRkXH0NZs6nu0kqwWC1zUIDxVG1jvPdWxASlph0e4VLAe \ nd2TThOAcEzlF + wmuyRFjwuTRNwxNQ9 / VpDZDCEnd9UhZQEwREdajwKqICA2h39KPDTbrWZwWuF5x \ n3IO9X7HbV / hqpG9qMqtIkkA2OlLX0vcV143m / Mk7uN5zqBuePH7MYjqhtAEdGqIXXKYlvT9QaFCL \ nCSfZnETMcPWRw2aLMYb9TnGMER1HQqyRyUCqW2LwWCmI2iJtZBy3DHVNFJEoeo7HHUolpPkcFxT9 \ nkCIVaKXwY4X3R4zukKrBJp5919BUM / ohMi2n5ElOKh2Ikbap8JwgQ01ZFJAORP2Wo / sr3lSGy / gO \ nr + 7mxIPE65zXwaG1ZV919ONv4IT / Rs6xqkAce3QuOKaBQY + kQiOkQJ / PmewMR3 + LMh1iounLnH7U \ n6OwRWk5RnaEotwSnua80Vipur2pWE02RaBJVkGWKyu / oxharI3fNG3zmSZ8rVG55 / MELyvqU / L + k \ n7GOHtx7XHjiTkqQ6EmNLpx3V2NH7yUPNvbY4bVBJhlQKqyRaCmQUlEOFbPaIoSbkCW1ucFO4c44y \ nfsCbO81f + f + d / / 63MnzSkR02fKgu6f9Fi3g58snPZnw9vM9eznh8IzhJp3TKsUnuEcdfwOmStJ1R \ nmgw / + 5re1TgCIZxDcsbQBkwy8ug7gd + 6OOWLLyPrrWZIZiz4Cb9d / DnFky + 58Qti / gIXbqjmEy5e \ nPOHLm4F / dzPw0ZNn / PDkgqy5odQvOc1rPjy5JDOOL + ue5fl / y93tjEl2S34YObyuwVfkFz3DpKEm \ nYddZTCyYJFO8jzRTiW0Lkm1L0VwyzyRdDtVM0akOOx4o5ZpOpGhb0u026CgxWY5Pcw4jxCFiDj1N \ n9TVIg7UaqeJDsZ5MWNeBq2ND21qCjohMQtRMQmSlFF1VI4R + 2DckgqXUnJ2ccxMzNvYRo3pM8GCV \ nQooe / MiT9oQmvuEq / oz + 5ARx8n3umxnzrGWCY6LO8IPC + xNaGZHLr5Anr9keLwnNApu + QzdAHg9k \ nGlznaA8JVTtHxxU / / 4efMrp7 / rt / 8w7b7Pdohw31 / X + i3 / wFZ4ucZ8s / puOCvRG86f6C4 / 4DZvkz \ ndkNNXqRIc0M / VIhqRkqOCBucPcXah8QtQZHJPaE7khuNQoJXlPocm0YSoLApm3VL7yQeQR87ghhQ \ n3PD6cIZOT3jar7mwBw5qZJvMmBEobz + nbVLuNy1N2 / BNd0 + UAmMNadqyXC4ZBsfp6YAUknHomKQ5 \ n0iRo75C + J80K9m3PZz9c4G41wiWkesVkekZ / rCmmJVaD9QPd7HMwI / Nm4D1lefHYkhQdWMkxOOqh \ n490rTxdPubyVHH1COsmQ + sDY36GSDuEiC9 + TT1IarxgGhTYTEApnUg5GY4uMSQSsg9AweEsfSoZ8 \ nwmAHwpklzy3Ny5oYBox0EBtC7BjHyHjwKKEYXInIIqvpgTx5S5k45qUlzTRt2LMNe8I04MfPyRPN \ ndZfwMrxLrCJtN9ANdwxBMQwPtlQxVgzbK3wlfiXt / bUI / moxZdttGHkIPWSZJc01xyFQDzW9d0iT \ nU5w9YTqxxERw1VZM0oLTp + / w3ju / x3J2wnpoePX6FS + / + AIlI0ZGbpqWSS5pqw1pqnFqT5YY3v / o \ n + xx2eybTGcVyxeXtmsO9p5y / w71eI6LHA9pmSKkRUYC3BNETgiHJc5S2BJvghEFmKWmakRmD63u6 \ ntqWLx4eXRfGw4M0WxDTnfPku + 9dfcewHumpApCtcEvB5wU4WrLeeH7z7Edl + wG5bGEZat2GrV3jv \ n2L + smHBLulTsQsIQW6xYIsMJOoIUnnzS0MkdkyxDYbi79ji / Y36SsR4fGALt2JHJSFme4KJkOcmo \ nX91hOGdWpBybAy + / + ZpwdcMPn58wOSlYWc0P7JyrdYVfZXwzvUP / iyfUV1OyqylzvUZWHSiNjIpJ \ nMSWKBOkkvnMQRvLMYOwO3JoY99jphHyxwpQlVZRY95TSvEdLRdNXqMGTG42Pka6u8VHge0 / XjiDz \ nb7v7BS4GEAqUxJoUBqjrlhhrVsslIUBbV9jE0PWOfmjxMXByckqelUQhGJ0nTxP8 + IA / nE4K2ubI \ n9c0G4isiGs8THGe0DWSzLfliDXtDdCds1RveObnkJL7Fxg7fLfjLLw3GNvz + 84bl + sjmZMcvPjuC \ neJ8hzPjFlz + nmH / O6qMJpf0x18en6N3H / PzyE7q24 + 7tj / it937Mb0 + eUUzX2G4NXx + 5jdfM58 + 5 \ nyRxdA33X4FyHIGPoW5JMMRBJswQtInmW0RcFVVfRdT2pfjjWREnq8cjNYY2 / eUtdO5JshjSGqEcW \ nyxI1tmg / MlZHDm6NNkeYJ1TdhmPVsGx37DeB0TkCHmMMyhpm8zk2TQhSIRPBtqkoiwJhCu6ONYmS \ nMPbcvn2LInCympPFU945f4wMkkwZ + mpLbo64 / jV5kZLnhqf6x3Q4kucT0nnBUUXqtiWrHHO / YDU6 \ njvMvCX2DPgrG45G + McTg8E3PWBsYwsNkbyVDBKUSpkVOajPaGJnPJgRlcXvo + z2jC / TOUnWWcnlB \ nnhrGqqfpRqzZoJUhevdt702ka44IE0iSDBkVdj7lbDlHjGvEUNN4z9ArsFOETR4qlm3C0NZc3 + 5Q \ nIkFGTd8H + l5Sd4528ITQI31LrEYK + Rso + KmOJBpMdBACWaZYrBb4xrMXAq8lxelT5mkGQ8dsOaOU \ ngeWLZ0yWjxh7T1 / d4Oo9pW / 44OmKV9 + 8oh9axqFl7DTXfYNU8OR5SqIS3lzeMzSO5mAZXl1x6CNO \ npVx9s39I0GqDRKC0YowdMpFEkoc0nRakwiJMQrQpXlt8lGhtH4y3QSOcZNA1ZX5CrixOpexUTkwn \ n9KrETiNXb37JyXHkizc77EnLJF / RTFa8eb1mNjb8wbtPmby + 4f64o5lMOIgNXZ1xUq84fNGzO9tR \ nX2T0qeGcFyi / QvQaJQ5o84aoA9aW + PGc7fbIEO4pyiNzMwc / YZQDi7Mlh3ZOOlmwnA9Yf8n + + iWk \ njzDKM / QNvUo5dCNp63n0qGVSb / gn4oyu / ozCb6nNd6jzC9SjErPa0H3jGdaWtEiYzDMGHxjbgTAc \ nQNcQa0QyMLmQnJxPKTw01HhnGWKJZ4pMTuncLTJNkaKjqw8419F6R1QGQYLRE7xKcBGCd0QkyIhR \ nkmEcCFExX5SUE4FJetq2ZRgaWhdYns / Ii8dUdc1qdYKXD46RrqoYm5bcGtwwcP92zaGq8EAdciIB \ nbyJj9IzDSBg8VkukbUk48Cj5gmm5Z6E7RHvG7jjlPH + OU5fU + 7ewDXzyNvI3f / 8xnfwl3 / 2dHzF5 \ nuiItzyHJqWVg329Y7Y94P6EdnzHYGZ / fpTz1JSkt9fUb1EZiTgQmT3B9gxt7Ei3RQtE3PYYA3mHS \ nB2fS2B4RIQICT0QRiVIhpSZYjTGWhSjQxhCDRsgUIQRBNCB67K7mxCoGIZg4g4ySbqhoO0caFPtu \ nS9QleZISRaR1I1JaBheQSJTSKAOjLKidIE9TskVJ39aYbMrj2Rl + fDBCzLMFiTbs729I05HMtpye \ nGRKjOVtJjHYc2gUyDASg2R + ZlBkyCPS3LARpRop0gj8IMt1zPktxXtL3GidSRqUZBhhjTet7hMkI \ nzrHrRiYyYYhQyJTOQzVGnFAEJRhHz2Qyxaopo0tAQGIcvV5zf3 / F0O1JbGA + S + jGHSI6EjsjSkvI \ np / TGMY4D0Y / oaGBQKJFCzNFxREaQISdRkugCYQQxRELn8XWHcBLhe3xfc5JbptlvYD3yODgkgjLL \ nyWYpTfewlEuFoIoWm80QZU5SzBi2B4YeULB5c8Un / / C33N / cMLYtLii6fqDtR5K0wKQZNs8AhcPi \ nnKepIdWCN / UW3wdEbMnKJUHlVGOPTjKMapgWKaU0jH338IOoB3eBExJtEmSSEoQmmASZFLRtT4wP \ nFQ060SidkyQB0w9YaTl79JxHs3PW7cjd69eM + z3NruZVm / LTyQ0f / k7k5Hmgo2U8Rj65fcnq + wXv \ nvSjItjVC1xyrI18dPUeeUpszHAJfdfj6wNFoEj8iWoGVW9LiGrhjva1w40DTWUwq0ek9eX6BiFOm \ nyxWTRc + mtVTdQJ4JPny24tVVTdU + 2PNc3 / LZ2zU3L + H99w3vv5ixkJf8ULbo7YHXbyTi2cjLJHIp \ nFONiR13tGTeSZTkls0dC0xJkIC8cYjwg3JYQTiAWxNiik8giM3R9jTMaLxTt0NO3ilROEV4jVY8V \ nAVsUJJM5UeRU + x4XFT44vAOlwFqFFKCiRCtDnpVYs2cYj5SFZXVyQe8FEc1idcbMOaTQdF7jupaq \ n3uAOO3RqUcCyTDFasm97GJ9h0numixaR9 + SLjOouw61SUnGFLt5wPh3YVHM + rs8w5oQkGThbWY6H \ nlF + 83bDtoNsv0cUJfXdHzYHJfMVydcZuW5FriZSet3uHCBPOTgx / / K8sRt + yv73js9cTtFrgVjVZ \ nbhh3A2WZkdqc6fSEptnx5lghoyczknQ + I0stXeWI40Dfd8QQAYmQD + ny3iiUcUQCPQJtUkTQD + nT \ nbyla8xARyuOiQ0rFH / 7hv6SWkT / 5T39Nlk8o8hXHrSeGgIuRth3ZHmpEajl9JClmmiIvsKl8mP6F \ nwI0jtpjgnEclKSIVhBiJcUOImscXJRNrKO2UiYVpIcksKBW4LGqmUpK2HWG7Z4ohnaSEwlDLkYFA \ n / 1XOft3w4tE75FmGUI7OD + yqgUMD46jZ7FI21Z5mGBiJFOUCZIZUlgMptR9I5uNDolZ6JiM01RUI \ nhyKn6xzHw5G2f4sbW0J0jM5RTk8YXUVd7xlFR1CSvmsZXE1KhyIweoeSBvoIAXLtiOwxicZKaI8d \ nbdMwjoHgPVp6fNzz3junLOePubu + xKrfQMQhpAxjQxsDbt / iRcA7hfcCZI4yE2Yzw1jvGOodOSWz \ nMuHl6y / 56vN / xLv / h7o329UlOc / 0noyMnId / XPPaY + 0aWFUsFVmkyJLUhNSULLctGEYfG / A9 + QJ8 \ nYMMNwzaMhtEttARKVKtVpIpFsoqsedee9xr / + f9zzsiI9MHSHfCA6LyAPHwR8cX3Pk + BbQzaHpDn \ nJa4XYujQdBydHGGHEUo4dIClMuraRlc1EnNTzlEFSeiSTlJs10N0Nba0KMuSy + XlTVuuVTRtg7Bt \ nAh1iHB / LvTEtSdcjkh6iv1kz03WD0hpaQVso6iqnNRJHGUb7U + KTkLPZHOlV5MtXuTz / hAcHC6zh \ nM06mcHwZ8cW85j99 / pD3vvcG7 / / oT9inIDYtP / nnT / n55QW1hqKucdsQV4AKH + PKKwQaq69oyh3C \ ng7Lc0osa199jnHiMEsWmX2FbgmdP5oj1jk6k5EVLErrcORpx76TFKXzmZcUuv6HxpeMJWbNmnQdM \ nkluYquD2ccz6WjDLWi6WT / jN9Qx7KNAXNtbKEIo13aanqDTSHWPj4faSgQzp5RBjHNAVWbWi287w \ nRlOEJ2kdQylbtJUiWknfNSTDCUYVbKqCfFegtMJ0NlqCMgrTd7hCgLAYj0ZbVb8AACAASURBVEcE \ nnkeaDFFNhzAabUKMcMGJ8S2XXdlS1D2 + n6C1odU9jhNwfHyKiQPKzc2OR1EXqK7H8xxkmiO9Dula \ nFGVDeXbN6av70Dk4roeFx9PiLoF9F2mG9GJB4SxppIc / + BHop6ye / zNxsiUyA2LvdQ6n95BRQxQ8 \ nxmo3pOxx9s2OolrzvXds3n0NIh7RFSF / / + UFv / pqwQ / + + x + gkxa97siLHXESslvDcjkn2y6xiDCq \ noakMoi6RwmBMh7RtPNdDSQfTaSzLxnElrQDLlfTYN9tNeGAERnc0qsFxJLHR + H1B1VaUXc2Tx88I \ npwn3TgYMJ8es1gX5bkXTatwgYhKPccKQaDQkGsZsiy1GSmLXYPXmphHdG4qyomkVbhhjewFBmKBF \ nRa0apsmIOqvw7YjLWcGlNrR1g + d6iDstyrJwbYF2JSbykEmCtkAqC8dxcONTRLelbw2WVxCECkfW \ nGK / GSsCyYk73jtmoIRfLNW0nybea1vhY0ZRdZ9HIhsidYUyFZWfEDqQTj2zzlKYVyK7CdW9O5YWq \ nqdUNarxtBL0VgtRo28MLRth9Qt9U9HZP19bI3sb2bEwPwgIpK0y / uRkRS4kd9Hi6p + srjCrorZY0 \ nqTk4HKDNisYuiafHv1Py / l4CvzQOlXFwg5RO5zdliH9Rezm2Q9tBuXjGUPp4TsM0DHjy4gtenn2D \ npYqbq51R1J2N40l8X9DqFluEOI4gGg5x0xHSC9jMZlS7Ha7v4kmNa2u8SBMPNOGow / FstpcFV8 / O \ nacsauo5SdXRWjy0kKEORrTm / WnB8 + xbTwwBHWvi2xChFNp9x9fIlri0QtDTLBXQ1y / k16uU33H / z \ nFW7v + Uzuu3zy / AU1D + j0gvrJc2rvK95 / 90 / 56Ncv8Ce3WIcBv72uET / 9lHcfhHzrnstf / Xf3KP76 \ nH / Hna66aI4y4T2McLFr29xwGic9m17DdJjjuEFWvyeolQjbotc1q8wXzfk7oenhFzOAgoQ97HDLo \ nUvamI37w / WOis5r2cYHbx4wOJkySiE2 + 5ctvNPL0FKIz2nTCtp7w63OXZ3WDkD5BMUWVCq2XlPM5 \ nlmMwOmJRFdALRp7DZDRFBBXa3mL7JX5gYcsEJxnSuQMWpcLuBXZXI3qbuq7YGIXuNTkCYwlaozBN \ nhe4senrCyGEyiokDl0EaoOoGz1Hk2w3jOEZIyabUbDOFH6cMBlO0ASFs6BVWnyMEKNWhDZSdQQpD \ n03X0QN / 3lHyGqxxENabIAyqxYRBopuMAXbvkm5h1fMJeX3LPfcgwLnjZVSyTu6w2AaKJcR91XMYl \ nb77zLfZv7THfXtM3sPq64MuPfsGD / THT2OVPf / gqo + kMv3dR5Vv87D83 / N1PP2LWfMz39B6RNaIM \ nPNb5DsSYumnYbbe0dYNWNiroMHWL1yl6LXFsid0r0iTBtBVtBZYt8Hwf1 / fA0nRWi + U6qBbs3sZG \ nQafAKph6LrquWZY1hYKryyVTWzGNPX783 / wZlzvN4189Y1dU5EVLb3sUrQLp0lkelptgOQK64qaJ \ nXRf0XUvkuUReiPA8nCDEEhYF9yjKFV99s2YSBeRFjmsLfC + k90JEFBJc9qzaLdnI4 / D + LUop6DTI \ nXGMVAscIrLBBBQrRa2RgY6wO3XfY0iGyfbrOQe1eYEvJJPWotEtV1xQV6N6iFA44AXWV0XUOEo1x \ nWwaxIEkg7jscmWOMy + rap + wNGIFWFlF8zHzVYLjZluqLCFMLrN7GdW6C1nQlTdMQpD43T + g2tntE \ nU2qaqkc3PUYF1MpG9zZRbJP4PZt1zzZXyOQuTXD0O2Xv7yXwV7olNw2psDCmQSIYxhFa2nSNwrIU \ nutzgJimDyOb8 + aecX55hO4LekrhBShwOcOIJ9D1trVBth + 1FaDR1XaJcB9toOksiPB9XugxCC1ca \ nEIqy2TF / fkXZVOSrLbIxhMKhLUsK3WKkpGtaUukxDhNUMKRvWy6eP6WsK5IkxhcW2WJOs9sSJAm + \ n4zEcRKhCM99twI747MN / JHn7Dt89jXloNlSOQDGi2yasZ1dci89ZX21Z6AF9PEUaj / X5jCcDm9Hd \ nkL3min / zls / knz7hzF1x7disuhFmWzC7WnLheTQiYZt5 + KEENLYQhEGN7LZIWTAaSiyTkpr7pL2i \ ntZ7cnFT6AZ3nImybPNvQNQWTNGQvShnHIW + 8 / m0su0fse6TU2O013xEx0d4x / 3S9ot07Ype5XC4u \ n8SYZU6dgGgqMHfN01rDZaZwkZHqcYshwU5fOeIThBNfZo65iVB1Qb9cYPIJ + R5UtCb2IPFMYz6UR \ nNw3fwPTIsMN3BNPpkMEwwZE9riPQrcJNb9qm927v0TU2bWcjHU1oSywnQvc3AnspNE2RY + sMg0Wj \ nGlpj0YdD8ipH2R30CtE3 + PoQ + gWWOSOQLba4TzFz0cUevWhw4hV360smk5r57Cv + 8YPnBP4p880 / \ n8OC1 + 6hrj / 3wh7z / ZylOaLFpL7DbgjKTOG1IyoCjOOX99 + 4SehsuX0b8r3 / 9lOera66zirbdIdoh \ ncj7ikCHPhWK926F3Asu + OZ1ro / G9AGlLOtOg2gYrCnAcGzqN1ppWK4QtQNj0vcBvexQK4Vno1mAa \ nA70Gq7txSfeGgS2wLYUUilrGJId3kU5Ntr7gl7 / 4iIerHr3RIFyqxjCajhCiBedGri5dSVZm1GWG \ na4NteizT / wvv3WC6nrrRqF5g5G0CGePYOb1Z09s1rSiRocKye3JRYB2GxF1PaJWE2SWulEjXRwce \ ntW + hsIiaOY3a0SpB5w44uzjHDQKqsifwAoq8IGGD8jz6IGY5m1Hn4FgDIm + A0t2Nd0Me0FuCXrtQ \ nb9kW / / JeIjWjKKKsW6S9Y5BaeI2HMg5Hh / e4XjQUTU3VaIrWQraAVhinxaHB7g09PbZlY5Sga0I6 \ n / 4iqMmyXBb22abKCvk1xaHCFS9dYVJ0NlsS1p7St9ztl7 + 8n8LsNWtYEsseoHaaq6JqeRd6z1T5i \ nsEcY2cSBxyj0eP4iQyY2RriE0RF7J68zmRzRU1PlObvVCt12BFGC7Xt0lka3DaIHZRvsABACY9sI \ nR9D3DlortIbeSIK9kH5TUO9KosH0Zjzk2JhWERlBsc2x7AaMxnUkji8x1Ro / DkjHDlYcY7qGXVlg \ nKYVqatANu2VDkLiYSrN8scDkLfhnXOclmX / I03XOrF1z + / QNfvlpRfHkJbljUd4bsXf8FuuzOZOB \ nxf2xTXWyYrrVnFcO63aPralIRMJFbdHZLrbbY5jjWRah5RD2itirkZZHN + ppsh6 / PCI7e07w4Ay7 \ nlWSrDGs8QfXQdoqT40P20hArB6dvcW3N4Ssxjr1i39i055dMdIe1Ldmd21RNzHW + pOgz9oc + sV / h \ nyBIntpgmMbLwOD0cottLZBcinH1s37lZcetTlPFpWoP0a1xXk5 + fYZVbvMltmiRgZ7lYUQjC4Oia \ nxIeBJ5gkAtuqoOsYDoZs2wpH9Ni2hWMbStWTVS0dN7C8vC6pmwbo8ARYpsVu11zNluzqnhqHrrew \ nhYVrSWxTYfcN5GOw1mBtsHoHQcvl0zX55pDRkcYLNqTLLUo7ZPaUHQpPDHn3wZBerbnMSn70V39O \ nNP5PqO6QID9kttyg2orxns0f / / g9lk + u + eDnBXq / 4vlzi99e + JyvzrBkhqslXhnz5UfPOfxji26c \ n0PU3jue7p7eJkozzF0 + I3BTpeLi2he97uI5NpQxlUZBtd9RVQ + DadF3HJlPEZYMbu3ROjxICYXtI \ nWyIxuBYUZUG5nBHWO5wGwnhEEo7Im3NM3fD4m8fI0 + + yNxnRNIZ + XeOlU6ygp2wqNBZ + GLDcFCgS \ ndK + xjcAxoIymt / ob9LclUMbC0VcoU + H5LWnUMxy5WI6Dm / h0QmBJG8uFgfE5sl28siHxIpTj82Sb \ n8c1qTWkgfPSCl5c7tIzpXZ9WNyRJi6k1ts7ZbQpefesYR3i0TYtuK / oio23m2HpD7IfIeIgtx0jX \ nxu4ThHZu2rO6Jox6vKglUSWCiuWqQjguXe / y4S9 + QdHauP4AhIXrS / q + xFghwumQlkffGWwroKo8 \ nhJH48RhVjWhbC + EL2krjxRrHavCsEtmXKG3QzU32bRY + u7L5nbL39xL4O7MjDAytfdM + m4w9TNOz \ nzJeUuwVVsWJ4cJs8LZC6xE8DPA9Go31Gd9 + lZkAjh0h9RaFzOiFxAwelO5q6wJGSVtU0ZYEV2ozj \ nGGl6NtsdteMQeCGuNybyQdodmb8lcgaEI3AcFw9F50IgHQZG8vQ3X1Btt3T0eJFHEPkcjlPuHE / x \ n6ZifPePpo6esVYddK4S2MDIk8FMsLD7 / 7ROu2w1Dd8BavKDQLss6xen2WdES2iFHiWC2zRjHkpdy \ ny9 / 89X / hX42mfPeHA0QM978zZDg3JF9cUPQlL8Y1an7AvPfRugKnQPVbQjth4N0icgVH4whaGzPW \ nZHh4Zki3O + fOccStQU / fGcq2o + k6hJS4ts1kNCCvtoSuzeEkYZqAIKZTgv6ViKtNzUfZjkfB2wj1 \ nKlX1BMcb09sW2 + Ix2zJjdOxT9inEQzovBLcmUHep9RRlOewaML3EtB1QE + 1BlBj27Qhyl7PFDhmf \ nEMVTlOdhmRJXGVIhOIw8bDSO7InjCGF1hK6FZRlW2w0v10 / Z5B7IgBqHsrNoEXi + Rxq5dKpE1Tlu \ nvcMyNUIGaO0g / AjTK8CibzJ61eLKDEt72PoOwjqkc4ckSU6QXKKY8eLxM7Z9SNh4pNUeB7FH7dR8 \ n3vo8e7bl3 / zoXcbHHxCWIJOe + ewhNgajp3z44ZrF + QXz84e8dm + fq + aHHOz1XLn / hGVJ0uo2bm3R \ n9y / wx0usvQnT8T6TfY + zVUXbaQzQaYMtXYajMVWzuemaak1TlRRlgeo6PM / H8yV1VZBtt + xeXNKJ \ nDncUYoURYTLCcRw6tSM8dBmlMeGVjWsU2oAvHYajPRLg04sv6GSHFB5uklLqkkpXLJ6f4ciQ3gKD \ nIggddAdBvI + lmxsNZ + 8yTEM838eJYoSf0GGRiDN8RxBJH2l1OI6DxqE0kjLT2G6I + 7xmbhSLPqMz \ nLevlBVXRgwmg92lrjSqG6DJFhynatlHWlqzO8fqGulhA3zOrTggcgetCnIYU11fIusLJCkTjIBnQ \ n + HsIy9wQeC0bu7dRvebgYEQvNigtQdhUrcJyHKoWFDYOAZb0QQssW978wyREoUfkWIjOoSoEtpPi \ nBhFO5GN5kgifvvcwrcYyHaZe02YX1EUNbYNQEqU9dKexdPg7Ze / vJfBz64Cy + IjpfkbdZFjhW8hh \ ngl8pBlmGv / G47JcsNyXJaMzBrdeIw5TKshFyiGNLduUCe5az2TR0CJKoJ3EqLH1JXxmEF2I0hO3b \ nHLsZ + eoRdVZRywf4e3fJ6xrHvkC1jxk0r9G2PbvexRiLxggObx0yX11wXs + 4tArurw2iOsfkTwiC \ nDh2EfFBa2OkJjjfGMCSLJWldkegGT / Z4w5ZlfUHk7zhwGybSARXTrbd8fesAzxW8YT / lIvs1SfwO \ naXrI3qBHWwN2Q8ljV + JER4zzpwgdkR5PcRuXTz68QEb3uZq8yyIJ8cqvGanHEIWMb50S9gU / fO + I \ n / WhO9 + FzyvyP + NvFAbPRS4bWYw52h2zjNznrxqx + 82vefu2IkygnCVpeOSwpQ4XVp1jlHuE2x04L \ nruND2lZwL0r4TrXm6HXNC / kbPv11jszHTPccMtdgBscE8StYs1PEzuXF4xfMgiX3376LjjOEW + DV \ nCWKb4qqMOF1CILneDGm8CVpu6b0hvkxxjUD3NW7YIwOo7YYilei84SCeUBYFfZGj + 5ZCwUtVc60M \ nmZpiaQtbFFh2xu1be9iWYr0oMI1DXQmyaMym7tFVjBQOoZvRm3OknWNLhzYf0tQN6cQnK6 + RdoPn \ nwGgYE4qIqjjkxTctor1k4wme2WvSuOTV0YjyYc47zSFvxPdAPqIS3 + GnP / uKZxuHf / 7wjLPPvkDu \ nOm7dnvLGuz / kWf2S / V / + khfrLWkfoyxJH2bs5BZBiX94RDC + zyubhN5esdv9FuEdYCmJFAO026Lj \ nkm2zItwesiwaTJSiYxsXDzfLkXWHEgE60vRv3AdVQJvhdmuCfEevLIz2OV / GvP3OeyTiNzjOBr8U \ n9NUaY56yfv0uP / v8Pf4weZfk6RXqquXQKyme / IKsKClHb1DZxyRiSHBdMNhteZzUjHxF4rXIyKWV \ nEaUdM5AeUb3kKOhpqWgaF2UGdCRYbcJ8nlNsa8q8xqiCwJqhDDhhBNKjyhOsVuF0GqtZY5oazBIV \ nuTRBfeOOVTZ + KTGW5nJTUMueUbVmYGmmwxGRM + R6VzGNPHynJ3ENaneBKmZYbkTVu7R2iOtFCG1I \ nGSJVgOMKqvozbo8nzK6OWc + 2JHsXHJ / 4hN6Y5XpFPBBY7at8 + cUhu37Jqr4kUBNiz6HiBUevvUev \ nfTbzZ / TOPuHgkINXjlhdP2Rgt4zMHi8 + fclVsyOzJSk9znbLqDO / U / b + frZ01GcgnpEOppQbxePn \ nzzi6fcL9N2Kmk5azh2fk8wBHjAjdIZ1R3Do5xPI98iJjtX5BM59B + ZC + BayIzVyAlyCtBKVDlLtP \ nNDphFzR8NrtE5z2CCNuBrLzCEooif8Z68YT93TO0sei0S9c7BHFCzCmuUBS7JVOh2B4u8HSFUBGr \ nsmJyep / YPUTbI3pCxsmAu0HJQG1oZs + 4nF1jiT2kFeLIhtDJmUYN3mzNtreZbwuYuOyEj0kPaCoX \ nT1bU5ZLEGuDfiqmSkr / LP6Y6KNgsC + onDWP3TY7u3 + VinlHl12jrgPHBAQ + mU5zhkPHptzh7 + A2f \ nfz7nl / Ml7izjZf8JXyb3SE9zXnMbopOAZ88f0k9uky1adqnF7cP7jEYzOrXF7qe49j6T45CWGfvu \ nAeV5wXW55SkFrWVz3w6IlOLLIicvEiI3opcj8uYS1X5JvvmGZiUZ + QmyiVhfrcE3aNHS64y9QGE7 \ nGU1 / TleXrHY1Xb3HcHCCG0n6TmAJjRAWjuVgNQm + M6BZlETegGzlUK0VbeOw2GxYlxXe8BghfQ4G \ nGttqcX1BEAyII5vVfEHkSNwgooskpu2xvJ6y2hE6EoolxuToLsNxImgaAjcm8m2S8R3KNuXlYoVY \ nPuNusM + z1SWXo5ZD / 5htPaMzGW0pEcuaaaP4s3 / 1AKkb6uu7fHD2R / z7 / / iExw8 / ZLb4kv07Y9K3 \ n9mn8iqzPESubTTrj + 3 / yQ37ykw / x3T3aUmNrn7Hn0y9g9eUSdarIHM1al2Tza7bbgqZpyLOM1eU1 \ nnu9QmJeE0wF27xAEPZ7p6YuStspwfLi9H2EJl6vLkvV8xST0uF5usLGhb / E8i68 + / 4RbCqZWysCP \ naSqLERYDV3A6DQlP9jl / seQvT2b4g4SNnvDkS8VqtiavDJa94bHV43uCfn5FKSrMJODW3n3wE4pe \ nslllZOWGxtOsNxuUEWTVJcq4uG5M22rQ4EnJaDhiaHk30LSqpNEZXaOg7bAMBNaNFU63Dq2CihpH \ n + NRly3a5omy2bLsd4WiAf + ZQi5p5sGBmtWy2BbavmJ4eEOx52LUD65TSGJTp6WSHFRTYtCzd5wRC \ nc + fkhD09ZZe7lK1ALhZo3VLnitB9yZ3bx9SNhx17RJOvqapr6m1HX9ls8hdY0SXSQBQdUdQrhO + y \ ny3rKckfgVKzrFdpssR2PW5GHKTaYNkPr7Y2R7Hf4fj88fLWlrgt + 9tM5UfgqyfgtFhsLP225 / 4rD \ n / eOU + 8 / g06eXXC + eMC + 2vJhfkY4G1Ls5fblCVRtEF6CFR2VqomRIrWqkbZChR5jauEmPc6XQWwtf \ nD5B9S9Wd0ZrHCBrCYsZYaLT5AkdGaOPRE9FtHWaffonuDdoyfPvbb + MEAZ6IKLIBXnJEwZCCGKMl \ nngCPEr9 + icsZ4XjNIl9Q1A6 + HDINewb2JWk4420Mv750yNQUhWRrHDpvTG4CjJkx4hGv2iGz9JiF \ nL / j7izVVF / GD1 / 6KIHuG2s659WrEeSwZviwZHB0xSQJ0OUdpG6 / p2VSa4qwlWB7TtxWlLAiPNyTx \ nhv / hz / + EB03OT / + vD5iLiv0HUwJLcvsgptNrXO + YdRFhFHz00U / BvuLP3vkTBrkB18ZJBNK6pn2W \ nc3fvgB + 9FrIRQ7bLlq8fl2Slh + O2hGFLMGq5ve8ijUvintNqaPQYI1wqVdA2NVLf7HQfeAoxPKEz \ nFnk2Q3ATUpNkSGSl0Lr0uURJn + t5w3qxRneCRncEyT7pgUetIHBTDqyHDCMbIW0apdBFw + Egpm6h \ nVQ1ttcFtx2AKpkPFg5MxxcpwddEh3BRjWaS3x0Qnr4KdIRzFfN4yu7yiuzxnmitMrvCblu1pQHV1 \ n0w6W / ZCucdk7TZnei7heSj7 + xOZ / + cX / xPkXjwl2IfveEdPwNQL / gO9 + / y3ef + 0edwIff3wGYkB + \ nOUNbB2wzwaPHL8htzVXvM3ETepHhHoUs2g3VZoEuDR6SQMqbubgP9rji + PAYy7NosgV0K2wnR7Yb \ nhG0xjhzaXjK + ewx3Dvntxx9zudriS4 / Yg73JHlJ02OJGSmJRM + xXvGafMW93pN0FV + 2Eq0HO2vmA \ nHxz / AUGhWXydsSXEHN / F2zsi6hV7LgwaQba4RDo2WtnYnYsrfdr + hpG0Ws9osgG16rAsG9O2dE2L \ nbmsGScQgdvFEjZ0XsMvpOoPjOnSNosoLyrJk03UIbXDTwc17WttTqZp + V2LKEoxCKIXQPfNkSq80 \ ndlWzm83QWY21vUAMDKejA6bH + + SvfI / 5ZsmqzFF0LLcLeiyQDmWjWGw3nJ1fsd5NsVPD6KRE6JA4 \ nchDiKW3ZMUl / iBO3 / OgvWs4fGR5vbTyVo + Rzer3AzGLEVCAtTSgNrWVwuhZH9oge2qanJ8CzNUK2 \ n5H2F5XnU / n + FxqvdUrDNbIST0tv32c0OUIuc + Tbj1rhkP / YYDEKG8ZqLl9fQ1XT1htXaRlg9Tq8I \ nhE1npzd + z2RMVmSgaoSlaZs11VpTNFs8NwS3pStqApGj5TnGXBP68N63X + NoeMBeIClyzeMnV5yf \ nX1PWgqzocP0I6fo0549o3IDadrn1yreoZUqlbYRukc6cUVAj1Ir9vkTKNV5i0Ykx5xuXXlsEtiLy \ nYTr2uB / POXvks5KKowf3OX / 6W1QVghXQ9hAPLG7zkNvjCc / 7EY9WQxbqiP6NNxCiI5FPGflrgsmU \ nN4KIi17jDcY00kF1LRqX8f4pYR8zdHdcf7ZiKFryz9ZYQcUvzmw + vlhzcXlIHR0zHFXcOslp6xeM \ nwld59k3OJ599RDjQzJdzysWMUfUz3v7D94jinr645M / fHrLcKNz9Ha / Gxzyc7fjbnz / ELiv2nTcZ \ njY7xvBzXvcS3z8mzMxLbJZDHwAAlJcbqicNDgmYP30TEzg7lnpGra9K0ZjqOEf2AplRs55esZzXr \ neUNmaxojcJwhRrjYjqZRGZGCURISOIqpVTBOYzotyXApKovOSIqyIqsqirqkyG2GieHWtMW3HlFX \ nS370B99hk2l + 8dkn7Mo5Iyfi6voZ + WZNYEXsiZDpouH8 / / 4JQ6 / jOCuZvPE2OgO1Dvj2nRPe / cEt \ nDvZT5q3k2kv5f377N2S / + pI7ySHRdI9xtM / 33rnPf / vjH3DntgvWC2wnJ8iGbPIVU6V5PJ + RmZQK \ nycrSzGKHo72EA6ckGgZgcvquxe0dpO6wjYMrbGJfMD6dMPAFi + Ulq4unFNcvscsdpt6Spj6ineMk \ nx4ym + 0yPTlitNhjLod4VSCHQXcl0PMIuBZYrUZbGYsVRcsUgWPD6YMUX2dcIP2bHiql7yZ34mvg9 \ nQbJz + CQNyR3DMLvkUK + giyCSpOkI2w5RlWFyOKGxQ0QXYuyQ5 / NzNqstWAAaZfVgWowwXC + vmF1d \ nErclre4x0sUJYxqt6bruBk / g2AjXu3ms1ZIyyxHaMPIDNuslVbHDkZqx63NRb7C1BW1HvauQysL2 \ nPCzlcPligWk77jx4yt3bYxRjslLRqimXlyucIqStYtJwiFaX1FrQVivcuGcofWJbc + v + Kba8R7Wz \ n6MwXWO7XnHzr29w1e2TnX2KUZnYNQSgJUs2L5Rar2RD6LrbqiQKHWmuybY6jwZIppWNY9 / WNxOl3 \ nTOzfz5ZOXaE9i6bboasL8CKigY + bjnDCIUpbfHV + xtnVgklko9QCS + / YFgYR71NbMa2bYkWa4DDg \ n + PYpX / 7mM3RbE0iJqUpsy2E82UMG1xhd0zcb9lPFD / 74LkL6hNLw3utvIioX3VZ4 / oBHty754Oef \ n8cXnLwmEoFeg25pM1ey8A / xIIAuNM3XZiQaSBiGW + OkW3yx50wooa5dloRGqxxMlYWAYyQ6PiLoF \ njivuvj3l4nxDXDzlFbfmuis40za7LsKK7nM43cPSgn2nYhLWdH3Grz9 / yPt / 8Dovf / MzRvcT9m6N \ nSZ + XPLo6wx8 / YN3eoKbrskW6Pn3Uk5tLXtRPSd0R9s5DC5dPtj2udYeZdxuHkOjql0jbJR2GfPwP \ nL3j6tcYKJVafoasAUQwoas0qComTkIkJse2I9I5kI9cM20u + vlrj5Ne8dWuAsLdoDZYxZLM5y / VX \ n7DbnjN85YXBwDL1A + A3pVOObhliBNAt68RIn3TDoO5RysG2bqvKotGGtNXqUEA5SdqsMyzgYO6DT \ nisl + SOR0UF8iqorDdJ9pMqaue8pWUjQu15uGrK7ZVjVZnVOqktBx8bqa2uQ0 + QVhGHJ69xB / a7G3 \ nvubXDz / i2d / 8LX4QEg2GaNmx6peE0yGPdhtcKyP24fH / / u + 5fqpwVUzy5jne9oBPvVNU + D2eFQ2P \ nd2f8xcn / zBt / fBezf8n33x / y5kSQbH5O0u6j7GPW6pCll7Opep5vtpxfG4y8aW0HwrDXGaZNy8RS \ n1OWGuFpitQahPezeBWXhJhG3bp0yOthjOb9m8fgJVy + / odkuOByGvPXGG + yNYnqt8MZThnv79L7P \ nvbv3kI7Per5AFTnr9RJhGow3oQ0EZZtxfGeM8QXHg5h / + 5371P9FfyGCEQAAIABJREFUkVQdybJk \ n / K7D + O2A0 + 8ldL + 64mhW8HjbsWouUX6FXXwbSwt6k1DlDessJ / VH7DYrnj9 / zHa7hmpN0zQIuOkP \ nAH1vUFmGblt6bVPrEGxJo6EoQCOJ0xFpEpEkEb7noC2XfLfDarYkfsAgCqh9F1VY0GrMYsmd + iuM \ nkThuQl1vMI6gdGMeth6P8o4HyuJw + dcEekLoJ4yDCd7oiHf297CtCfNZhROO + FjE4FRoGVA3PrFZ \ nEaU + m5cQjSsGwRVHyZLHl1sOplPCfZe1vECbNa + 89ja28xovr7Z0L + esq44oKemFZHWWgyoQXUPi \ nhXgDF8dXJAObg / GASeT / Ttn7 + znhOz1K7 / DTLXZ6RdV0 + GJM1dpcXnSIwubaBT9NGbDCtTZ0qiJx \ nU + atg0n3Uf4QWx6wzgJWn8 + IvJhBpBD1S16944GX8 / z6Iyb2Lb77zhu8MjnFVle88prPcHwb09Ss \ nn3 / G7Omccjgh8BXGSL7 / / R / yrbfe5 + E35zx + en4z4xMup2qFWq1ZfTSnC4acvPkmltcR2CU8f0ZT \ nX3I2zKmafbbtBMuJub8f4vk1VBVD9wTfdbgIGnK / ZDyUREXGvZHLFxcF / zx / ycb2mR3c5R / WkjeG \ nmh88kOizl5y1VzD9Hs96j7l5k2BjM3o3pfr4KVINKKuWZalJhWadXzKMB3RVxeMvf0sbJGTumJ12 \ ncL2Ez / IF41FIJWvCdsnJyZAkuMWzh18xnwlMN + D66Rb7siQd7fODv / gjhvsTLp9aDI8tnNFdVqsc \ n2SmiIczmOy6eL7g93KNNa9JJSxB4 / H / / 7z9x / WLO4STkL3 / 4Y05eO6K0pqzaMZWrEf6M0G8J9DWW \ nLumsF5huQJ0l0A / ZVSMeP2 + ou4Cd8tFug6LAdg + I3JROaVxd0uVbejcnpIVix7NPL / jCvU2hJFF0 \ nSKUMRW1TND1FZ1Mql1p1IDJCoZHDmGhyytAdMzMVH375iI1uUdJj2hWorOPg9Ii1rKiimuIkZX26 \ nTzzQtG4G / 5wQyAt0ec4nP / + Uf / p7ybLYp3H / ER36dM6O7o + / xYV6wvfvPsCzA9ZVT + + f8s3jjGES \ nIt0RX4Ytz6 + vWUsf4yuiHurtghM7pv / 0Sx4 / + orLVHJ6cpdws6PLNcbyaJXBi0LW2Yovn2zIv / 6K \ nwJF4vaFd7BBCYCyH1a7h + aOXmKYi737B8e37HNy7jz + csj8aYWtD6 / nU0mG3WSEnKe / / xdv8 / T / 8 \ nR + S9hCuRI5XD6wdTvuO8YLE5Z3 + TU8wM8tt3Me0zvjt6yI8CQ2aP + SY9Zb13wuwX + / zdP37C1bnm \ n6CRhefaSyydP0KYDR9BqjWfvELZC9Bb0EteLQbuotkdpF6NB2QKle7woZTKZMtjbQ3UKPwwQsiev \ na2KvZyxs1HqHozVX5y9oqgL6nlA6iE7x4NsOk + EhkT8h + w9PmS9L7Cbl + usttu + xh88La4cIEnzW \ n1DrDrRcIOaC3hijHo6xG9G2L8HNaPUHVIyr1NSJQOP0hxaZmL1nyzqlDfnWMXyVMTgWvvjlms90n \ n3w2Yb0qSMRzseTx7doEuc3Rv4Tg9dbnFtSV + OsUzHrFTMpjYGNY08r9CHn4fvk6b7XBag9O6uEay \ nefaS3aMFrxyeMPGmTIdbBkkH2YbTQ5u / / PP / kfHx6 / yHnz3im6XNdd5A6LN / dEwcuVSbM / psxSvf \ nuk0QVLzy9j0uFocU / l1eP5ngqzmu5ZI5Hb / 67CGb2Ypbk0PufuctzKXPs5fnaC3IihyNR6sthOOj \ nqTE9eOKCYRii1BYtKopvdkgv4tbtQ / bC10iSu5jRxwjnLsocIMOE + eYbhMiwY5teC5SbsqoiwpEm \ nNR00mtdeu8tvPvwIR0hC71s8el7h / + sJtqtIMovxwdtknz4kaHrOm5LFJGa + uWT00yuapcKzNMpA \ n3fUcpy5T47I / HvLkP3 / IycWQeO8ejeeDnpFXWwZ2S1JdcOLC6XGItmzyxet89MGvcWXFKn / G3vhN \ nlsstf / pXf8hFVfP3f32JWffEr / a0044Pf / IL / u27r / KnfzSmkB1vvX + Mbnqwhzx8uOP / / N9 + ym4l \ n2Jvc550 / 2Of4tkXeSUoZU9GhjYvOxqwWOyqgyjry9hDLuDSlz2ajubpacLUQaLtH + xq8lt5riNqb \ n8Vnf1NBuiLyCjVzxyu0pd47ewN5z + KKI0K1FKUNWVYkSAm + SMrRhz5eEsc9hUuDYDXW9pBcpvYx4 \ n8vIlTWCDHTOc3EGsvsK0EhkOcLA4vX1ApRSrj + fM6zlxsOZZ + QbTNCAOBduHksXVAMcfczBq6PIl \ nro5ZHNq8eLbk / GuJKCNK0XP / + 7d4fvYP7Dn / jqFZ8PzyW2gFdm1zKxxx6 / Q2D01BXix5uuhwHIt3 \ numOCg4DUTtlVyxs8ti3Im4w33n6NKA1RLzYUsy2t0oimIhqnnNx / gNGK3CwxjaDrJS + ev2S22HB6 \ n / z6j6T5p6NEIiTEW5abgmf6A + / VjksOvsEc59n6IGXv09Tn3x48Q1z / DGo751Qefc3z2CpG / 5ihd \ nM9jbsBfXBM2IYmezffcWoRcg09cJojv8H / N / x8WLZwhLo4S8oZZ2Dj03wnELqMoG3x / cKAhVS29L \ nek8yme5zeHSLME7Jqpo4cWi6BmNbuEmMY61xtKbZrlhv1tRdjnRurHFtUUFTU1cr / IMhB1PD + 987 \ n4unTBXXrs6kleWVx / rji8tGQH / / pa7zz9hGuewP + azGUdYXwbIp6hWmusSMb20i6ykcKj8X5nFF8 \ nQqValqs1mFu4Emq9pClzDgYBd + 68zfPnDYWqsaXHaORweV5SVxW + 45J4HqfjAVEQ4dgRQRLTklLo \ nllVXktXt75S9vx + n7f4dUE9xizXWrEM0O04ixfHtkD94K + T977yF5XzDs + dPeOPNf8XtO7cR0mU2 \ nv + LdB4I / fGuIZXnM7YLPv / 4JX / 32gthNOUhT5C5gcaG4fP4C4wTEnLM6vaLdfoVva3xvH7Mbkqp9 \ n5o83FM4Lvtp0rNZrhHTIqorVZkfbmRs6pmXohcWV6xA7Ci8wFM0aZIy0U56uV6SvPiAOAwaD2yDd \ nG5aN0zMME3pC0smUz755TtYveL0fkQwrFrsGyz1lUQ1wJzHq7Io6H5PaMakF7uFdHhYldxtNd / UY \ n67NLTg6PmLmCdjTlN7 / 6mIGX0octXXMjZ9mtZpzEht9 + 8AHFKuPIm95cZXfPOVVrHKHwfYeTvQkn \ n05BZccWvf / sS2k + wzAFB + ALbqVgsv + L9939MXc355suXfPJxR50FiOuWnczw1ZT5xmPXCqIkomwM \ nvRjx6acdH / 68JUi + w + Edn4ODHjepeHh + xsYK0bGhZUsSHRPo27TrNZeLMxZryOtb5MWWTrWodofu \ nXIQdgFXjYTBtQZGvCMiw6oLIEaSxxXTqMDk4wosjasdhW9hsiakssC0oRYuQEA5DojjE812CwGfs \ n1OSZQOt9ChzOzudUZc44Svn / qXuvZcuy60zvm2b57fexaU7a8gUUCiBIEEIHOygqyGYzohXqlq4k \ n3SrUoUu9hx6gL1rmQgqFuoNStySSIGgBguUAVFWWyUpTmSfz + LPd2nv5aXRx8AISFIHgeoJ1M / 85 \ nx5hjfp + wnn6yT / TmiqbZIteK4e51 + lONO1nRzD3 + EmbrIw6TgmVQk9qWdtWjC1JatcSuK5LaMpCC \ nYXHCf / SD3 + L9P / mE45cFXg / 46E + P6fWH5CplU2wj52uMabHWcemOmR8 + ofQOEcdIndIqxcuF5 + u / \ n / hl5F1P7lA5D27V8891vcfPOHvPFBcO0ZSIDZoczImm5 + 8oBe3ducnx + zuj6DS6eHROLjKYpWV3O \ nGfcz9sYj6qqjagWbBipS / P6AcCjY60myyrGd3Scb3cLVE77xPSgWP + Kl6OHnC372J3 / GrYMR53uK \ nw3KL73znLQZtzE57yZfhnCo / 4uKsY2cXQl / R1w2rcoV1AeOdAZn + Jhfnp1SbNXhP5xyRinFKkU2H \ nXD + 4xXh7gtYRbWuxXhJHMcPxCKEFw / GQhw8 / 53x + jL9Ysjg9phdp4l5G3uRYL0mCkGEQcvnBDPtk \ nw8X2Q2TsuHMrZeU8Y9Vj41KqWjNqvsmzRzNOn37OH / 7 + O + zd6IG0rH3LxWpJ6BT7OwafTSjalq7K \ nifyYURrR61es2prZOmbt7iMmX9H6J1wcr1kvp / zh732HPPsLikWOkjtEqWU8UtTaEoiOOzd2GI8G \ nCAIkMZ3KaIygrUrWjWXt / gHika16QRBeMhUdN6QntZ7b9zK + / 7s99q81CP8jevkFr3 / 3DoODCTPb \ nsKwrFuU51Jfs6DNUW / Pxg4aLr8 + Z6DFms6FYz6iV4HQ5pxAB0XDMMH6NQd / x1r1XOT065GQRcnqS \ nUOaSzbxBs8aGETrssVltWK1LEBJjOrQ0BFrh8UTNTRK7Zhhv2NIdImxQ8RpTz7j48oT911 + jzmLS \ n1JBma2wzJ7IJ1sYcvzjGqA1OGMLLjk5fEKVjFnaLF2uFHw2IRufIszXBOib8SvBZccTevQEjs2JP \ nbEheVkyO7jMy + + Qeru8Znn / 2MZvhguCuRStNs865zOcsTi / pUs1sP2Nz / oSpuOAgWTMJIr79vd + h \ nCVOSfsiH / / 45Su / x4PMnvPXqLS5OJTr0 / OB37 / PNt / s8fnxGfXZOve64TPcJaRi3irhTLETJg80F \ nbw0mJO4e7z8K + MUnFUQ36Y8LiJ5zUp3y + KRjO32TXN3F6R4iWhJ1lieffoluc5Q6Y9M1VF7TiQlO \ nO1RQE4oaJS / AlUTaMRpkhEGP270O2VT0Io2iIe4bwmlAm2QcLjc8WtaUasimbEgTyWCaMJ32GA1T \ nokDhrUPrlqCrKZYbKjOl9hF5HWMczNcroraH6mLiSYZr + vh0CnsJq2HD0o7Imz5NZAllzWubr7m / \ n8wPyo5TPLz7FZid0w4bVxjGSEaZ9TvU / 5fwv6mPUqIfQCrnouBaPcEfQJhmlAmQLylF3G5xzdPMF \ nSqe4VYsKBbt7t3DTEVVe4rMee / 19mroiSTWb9YaL0zlxEnJtN6MvQsJqzdl8xcX8lCcfXBJkA37j \ njW / x1utvIyvLan7KenGCFIZ6NeezLx4TDPdJtw6wuubB05R3dvvsLW6zOk84Tq5xd / t3EeGYwfYt \ nfPzvSIohk7uar / UZ9UAj7Dc5f5pg7n + bvHyfKHvI4eOIQCYsLk9YzBxpJJDjlK6b47SgKC5pzQFd \ nPUTLKxx5GkqSfo + o36c3mTLZ2kJIT100eH / FkI + 0RnhLqEKeP31MU5fMZmeI2RLXVgRJnziNeP3d \ n38TXDUdfPGI62mLWT6h7DUW8YmvQkgYFUw3WlsggJd3vk44hlgGJCLg9fMGNrEeUZJStYvPyKa2X \ njEaaTTgmUCtEuMTmPfqDHXavN7x4vmKxGkH / G7jJQ9Lekn43YP3oGvViwu3dAZnQfPVMECeKNNOE \ nQiK6DuyGXtwn0AqlYpzz6M0G3yxRXcVwPPmVsvfXEvi9Fy8ZdBm3dm / xxu2Kt1 + vuXvbMxiEYHeQ \ nTBHjx0TTKaYrqOfg3Q63rn + fB8sPObYLnj75Ge89 / DaYMZoCTc28a + i8pnEJQTKETUhpnvDwYUK7 \ nuc7lkaNYPaMqW + ra4kWINTBWMdYIynVHV0PVdTihMK1F6iuLjw09G59i7IBYCxIpUL5ltJeQZIqX \ nDqbLFyh2yHp3mTctR2dLFsslWijiYBtTz1hlPyfNC251c8T8C07G97n / G / 8p9w / fRz06JAgWPIgO \ nuF3EBH91xrxaMvZjKrsk / PQj7gwVlUz52fmQk / ZNmnLC1vMjwuUc7zdsVEXKjPFOjElrgvOH7EeQ \ n9QX7795l + r0D2iri / PGM2Yljbdbs7MHp + iHebri5fZvX7v5jqvOa7nhAXG / T5zmLs4e4eoe5Tkmk \ n5Wd / c8zjjzo + ezPk1jf2 + eCDZ7TNnOFwRhB5Chmzid6h6W1x1L / GTurIzIK9Xsbq6DGNOqF2irod \ nI + oewvXw4YYkkcjWoTtNIjKiMGRrKyHrwWAc0Y2nBBGEGnRdYYqaqgkwZsDqskF2hpG13Ls2RPY2 \ nZGOJjBSKGEyAkC3CrqlPDfVJQTjoU3Y1TVMjkow1Jctgjt5V2HYfQpDuiPoImmNBJAU7kUBci8G9 \ nipK3OJ9v2NgTsu0W3YSwUZiuA + exQcyCglAnNIscHSYoFXHYNoRhxsH1Pa6NJshyTb5Zc3pxRtPW \ nqCgE78Dl6G7N8sVL1OYfMZqO2L6WsHewz4vZCZ0UdEqz8YLzuiXqbfHK1hR / blAXnxMdXbKdZlz / \ njbfQ0z0uw4ihmpOWAf3lgNv9EYvnhzy4vCCuKn7 / t7 / F / / n0Q55cNvx3i5I7994kijv + yc4ttlRA \ nauYsGsnL + nuMk / + dm7f / gJfnv8nPP49p6yk0gvd + / ADZLghFzWI059r91 / D5mqPzD4i05bVbN6lm \ nL7GXa8zMEPv3CHt9FkpRpyPirV2i0TZJNkZZhd0kFOHVyd67hn4vplqtOHnygsXxBfk8Z71akbQV \ nTZeD7Gj0jOtbktdvBnz54Bm713oMptvMxFsU4RwfH3FwT / PqjiUtLtjF0Rx / xq3rtzkbSJSaI9Uh \ nsb7EW4Fqhgy6G + xWS / Kqz3B0i6 / lBhrDRNWk4Rw7epUTs0fXnTBSn7Kv3wcXMHs0hMsFkf5b0ijD \ nyzfZmnacbV4wbm9zfDalEWfEzqLcHmajiHau3q2s2yEr61gEFU1UcufmP0BaZsRTBuOaN9 / e5saO \ n5tr1bbYmWxSrNVoZrL9kdxLT1Ls8 + FoyW3a8cS / jq5 / / NdK2LNd9Ds / fIUwcRV7TtBXCN3Rdh5cC \ nFwigI9SG + WzG4YuCi / NjfuOddyjKklW1oao6pIoJwphZcYRUimzSJxU9zucNq2JNa1okCmdgoG8Q \ nak3rHNpB21pCYTCVo7UO2WnO2yFPLgoOf / wTGhGjwh7DyRaBkKwvlrjWkrx5jZ0EmtmczVZEPbnB \ nzy6XnAUhy35MP4oYhRWnR8 / ZtY7UdGxwKKF5drzitd03ePrkkMXacuvWdV4sCj7 + 6V8R91K6csEf \ n / Of / nJ3 + 9 / jJ + z / l / Z9 / xk6VMRiNeeO1m9y4d4ef / vjvOX1xicgdoZBodY3Lc02xSUh7 + 8wTyeHl \ nmuOXf8t0u + bOuzVinPLwJOFkmbBZhyhriETFd7 + 1w7L8kE8 / u2T32qukYQN2Ca7mxnAMiUL0R3Th \ nBluHiK7H4uSCWI84uLPHz3 / + FaVRFA6chp6SiHZNKEr29jVRsOH2wZg4WROlIWHi6fSEqm7xdU2 + \ naTk7ueRyUWPUkKC3y87BAZMkI04t / ekAqzo8EbYL2NQlts1p23OK8wuSwZROtiAk / TSjEQIhBc5e \ nsU5ECMJDHIUoJbHW0kszkiRGKknbtiQ7CbOLM + JuwtSU5PMLXNdi6oaL8wuUlEy2 + 5RFhbU1WnqM \ n7ZAS4lhSbFbUVYF0nqIoUFHCYNBnOhkxGY / 44tNPmA7H9LMeKtVMt0MW6xmBl0yTlrKDWb5Ei4it \ nuEcUR9T5mrauCaOQIAiRUXj1YGm5JB5N8bUjCRLKasnC5NTGIANBnGmW8xNctyYqR9y4fp3Xr91j \ ntnhCKi29oCRmzeHTj2mrLzjJhwwvYg5fzmi6hKIqmQ4nvDh8SsQG4Uvm60OO8pzf + 2f / MbdeOeDL \ nBz / nxeEhmzxHihCcpaZCyJjp3h6vfu8HLBpIe31oDKozNJsVoqrR1hIGktOvnnP07Bnr + YK2aJDG \ nI42htUukMGiVEOuM1SX8m / / 1T9DKkSYh2Ugx7b0kUDG + kxx / pRAXilf2ephpyaX + mv2ppJ / uUywt \ nrtkBv0XtDHk9p1h9RtJTJIOOZ6cxYdxjQMA8Lzg / OSWwfUS6RpQlKmoxztPr9VnOc5bLJWEY4QWY \ n7gqLcX1vzOHZIXFUI1REl1dE2QgZCtp6Q1dfYTKq2RJZtmRhjBDBr5S9v5bA / 73vC27cGvP6Gz0G \ naUTEhOVC8emHzxn0Wu7enRCWr3NmQ85bwfTWTU5PH1O8POPVV9 / i / WcNF + 0QGRyzvdfj + HBFVXUE \ nQYxVIYPpGBfFrDYrGltTdSXH5yX / 7v8 + IksSnAHnJdKBMY5YO5IoJkgiHJ7x9hQfSPJig / Oerm2Z \ nreYMexlxqIhliNAC2zaEskcvjnC2YyW2aZOAKplTGEE2mHLeekxXo1VKPO7xRd4yDzWj4TWMjPni \ nsqQtappsSt3LGfYzvv / NW / z90SNs63E6oWgcloDRdJtffDXjohAsywX1as7ZfEVPh5Rn5 + xuT / ir \ nP / shy8sz6sqimwTRCubLmM + / WvHJ6UecVydE3vP29QMeP3xJ7TKS3oBNs8bokObc8m / / 9BckkaSq \ n12xnE + aXltIGrBpDmKbsj0ZkchuhIg4O9lkPhlTZgMBt2O1fZxBK4jChaQIam7LYtDx / ecbxyYJV \ nbmmakE0pMHJA2B + x3Rug04gpG / YGA4JoQZLOGU9jkHN0lKJ0TJ43zE9O8S7EWMemVsj + NbYnGclw \ nBytCRJiwE7R0TY5voCzXGBvQFJ662GC6BYMhpDfHGBsxzxuEjvDWYcv2ahS8CxAuoAlWpGmK8Rbn \ nHGmWEqYxMggIg5A4y2hVxO7uGNtVKG / oRRrajs1qRVe1DLM + QeKYX87IVznOOKp1Sbmu2BpNSKKE \ nsqhQ8YBWKYTWdKblaL5kVbeo / phwPCHtD3njfsLNWzucnQsG4zH5uuXh45d0bU5VgdY51QpOz08Z \ nSMlwfxdT1wRpj2I + 4 / hiSeEEExURaok3Jdmbd5ns7ZFNh6hA0TY5AQ3bakx7Nic / TDDtgvd + 9OeM \ nxZzvfes2iW74p3 / wA / 6vH56wvfsD9vY / o6jmICpm62O6wGNVQll2lKagWzr + 1b / + V / R6GamyNPkK \ n23osIIVC9izxQBPEAcJ7QqXYLGekoWI0iPni018wEVekzXVXcXr0jCrPkdaSecB6bNdh4xLbabxL \ ncE1KMhiz9jXl5pjhUDMaOrbtimqjsN1NjJ1weGy4eHKJVs / pXE3vIGTsnrNeWWK5zSjcJ5Mx + eIT \ nsBVVe8poIHh7co9nZ5eIJuGV / Rs8O5mhhIa2JTUtwhZ4Icn6A4ryEToIcHiOT04YT7ewAkJVsz + u \ neGAv6Y + mBOObLE8szgq2wj5N6Wmrlr4N8D5GRSlK / QOc0vlPfn + LIAEna5rG8eknH1POJJMs49re \ nhHJ1yg8 / fZ + 7 / 8H3uXN3QGuecLZ4wKSvqco1WQr9bEFDze7WFvnlnK72CJkiRIAKQtZVTl4sUQ0o \ nPNZYAimom4YwCBAePC0I8G5AGm0RyITlakVZW3wTEQmFkIIkgbI + x9YNrQ / ZEBAGPaQMKTpFuzY4 \ na3hRn6PTjHDaQyhN5w3OGxQGLT1COOSJxsaCMhAYLZCbhBs3b6D1krP6azblnI / / 8i + h2CCDjLxu \ nqPKCV954jXlbUTo4vFxCltBLQ9bzCt9s0J2hPC1ZnyuKuiOLBoxEhPOSy43itC6pww0i9vyX / + KP \ n + MHbb9D4P + avPv2czp0w2R8QpQOCYIuXRxLhXsPb3 + Rp5yEF27Nk9zy9fkCoA / am16gKWK8VZRRS \ nBA2pstha8HK + ol1XtKXn8nLF2cWatp0RhhInRwymt9i + vYsII / rjiCzz6LBh6szVpazShNmEoskJ \ ngm3mC8GmSGmaDCUbvHDkTcPaWFSckg0GREmEd4Y07RgEBcFQU1c1XkBjWpS3aFUhtaEfgexvc / hy \ nSdV56trQGgddA9ajrSYJY3QqgQolNKPhmPF0TBiGtG2L9wYhJF5n1E1FoK7Q3bOiQCuJixNklLGy \ nHtN2 + N6AKOkjjCPoV + yFMZG4oqL32o5OZfT39xkMB9Rdi5QCrGN2fsbezh79LGO + / IS2KxiNt7g4 \ nfsHjx4cUuSH1Ia7uWC5ynI5IpKNuSlwgmE4mhFHC2TwncZpURah1jgokRrR89tnnJKkmyAa0RcGX \ nD76CBkJ5hPKKo2fn9EcxF3XDH / + bH / HZ + zvsDBO6qqQoB2xKxf7eLr0kRQcxx + eX / PTDIxoDrUpo \ nuhWd8XQO8rzFKoc2LYGKkULQGEPXLYlsH1cumR0 + p7KCOImYFXMenj1neXlCUzZo4bBdhWsLYtuh \ n8DhrcdZelWJ4wBLqmF4W0tQl3nvCIGY63SHWfYYNuCDDxVDaAic1l8uS49Mc53v8 + V + v + M4rc6bj \ nEUFaQHBJ2QbgFb6ekJ / V + IWkdA / p + 7sMXMh2r895mmKER3pD4DuU7Xj06Gtev / 8K1nk8nrZp + fLh \ nV9x / VdAfjZFYonaDKVasjSMIFWkyYbGYYdwF0qVcnKzJ + iFoiXAKa + SvlL2 / lsC / vt2wWmu6ZgfT \ nZMzPDgmUJ + 0HrFYlW8Md7n2 / RxrB5RcvmOfHZMM1yVhQW8NB7w0efQy5MtjNmthLQh8Sh0OCXkYa \ nZeSbFTQ1dmNQSqGlRqlf9latQwkIw4C93S0C17ti6DtDrARxliIHfay1lE2Nc46Mms6CUj28lJTW \ ngQpZ55auromSELFraWyNw2KsxmLxrqVp19CV9JXm3ryll2ha10HUpzuriHv32SXmTCesLudcPinZ \ nGk5xXcC6aam84HC5oFWW0c6Yg / Fd0uGYbpMzP / oa4Q3KdWyqChENyNIBr957jZGOefboGc + WK1rh \ n6AJPnASUfosPv7hgvukIZE1d1OwO3mCZW87zCh1MccJh / BqXadxQ00ae / s4Eg2PVGMzFBWmSQqDI \ nG8e6E5iqoq1WuLbGG0tZtHgiJtfvshsdsDUa0NoYHW8RxT2UagnliiSYoViQhQWR0jSdYpnHOHGD \ nF6eO2vSwro8M + kh9gfEVsi + YJjFhpJFUJKIhkg0ROZFsWC2W5MsGSUov6OET6G1tsbV9gFSGD57C \ nIjeUBdR1i1aOULQksScSkIaGILZIKdneGTMYjmi7ljhS + FDTmStFYJ03bGXplSi8rQgDRWctVkqM \ nF + gooiNFS4U3BukEMqhJsj50lrooQVxRS9M0o1MBnXUEQQDey / wUAAAgAElEQVTKE / THrGpD7Src \ nUpFu4Oh0zjrPsa1EEOONIZSOQarpqg6QpJMpk + 0JWS9DIulnE6RVeAuU57hAU / iQZdsQp33iqM / 8 \ n5ILICsL + lP1bDbUxfPnoCSLZoW0tq5Vgs1wSyyUYw91XY8YDwfZgi9Ucnj5 / zs40wJoVTRfiZURt \ nKohS0qx / ZWUT / DKoG6zQtMYQNDXV + RFuXlAvC1TYo9aCulqwuXxBP9G4pqPqapRrUcIgMXhncM5i \ nnac / GBCmY9brNVq1bG1blssZ1i8IgoAXz1YcP5nzxlRxcN + g4lOmQ4kMNTsHIfdfuc / JUc7Z8xlf \ nFCE / + Me7qGhN4Z / y1aNnbGfXSdSYyeA25XLO8fljwmvX6SnJy2fP8IGg8C2h1ARKEOqQX3z0Ma / c \ nvkccxiipCDTUZc3Z6SX5uuH2tYzi0uCbgFVZ4dSckRqSihYvWow1PD99SVCm7Oxsk5kIU / 0DxCOr \ nIEW5KZ / 9vOOrx49w0rL / akDLJfgpKrrLS3vC5d89JH / QMs9f8u4 / u07ZM9SF48N / + 2P2u + 9gJgX1 \ nusI2jkhHXNvZxyrJptwQOUHQOozxaKXxxrOpGra2JgRSEmhFr5ewsz0mCgxtq5Dyl75IcYXbDYKQ \ nqnZcXlxQt55SgdGOwnSs1xs2rUfokDhOGeghYeUxXC10hyWMrrypsQyIZY + hgGvZBhd0LNqGk7NL \ nFnM4 / du / 4P5r7zDcyTg6WjPKNcl0TFk3XOYb1nVO01N89 / vfxsgW4x2IgOu3b / Nbb3 + D / / m / / x9Y \ nL9aEQY / GOL759jdZ5Qve + + JDlqsSHQ9RcUZedCQi4n / 83 / 6awHb4asUguklCCOUtRF3R0w2lPUck \ nT0lGLUkvwamMLhyiTIk3IdO0T6RqpDqhMDPyF4pNPSZOI6TwxEnMZH8HryReXGkhTadY + YjBcEyg \ nNNKu6QUtsjsjrE8I / YqSjrmJUME + ZTOhaoc43SdMFFZ1OLGgbhVBuEUSSoRvCFxFPzSMQksqWkLZ \ novoBgRox7YeYLmA8nCClY13mHJ2cc352wYtih7YLAc8gi4iDjtEgJIs9w7THpD8hS3fQShOGMUIr \ nrHVUzZVIu + skFs9WGFKXJc16hZeOpvXoKMBrSaACRBiiXID / 5XILdUwQ9misx / kOmQwJAs22gjCK \ naEyHFuARqEDRH09xbYezjnjwLZDQNDUyrtBRhzcNzlQkPctQOJaHF8hQ44SiKFs6A0kY048yQqEI \ nhKS3XWN0yLxuGTiJlymCmP3xHVQnrhSBgxVCK3o738RKx3o9J9IWZWtEt6Gfhtw + SFivnuJNjRKC \ nNLa8cusVvj484oOPvmJTVOzf3OH4YomSlt / + re / SDyA / P2cy2eGHP / 4AKyLipkF0GxCG8pcj0Ukc \ nIYXhYJSxt7 + FiwaYpiaUDmFaHj / 6gqp2CKVwWHSa4ZuYWNeMppBkC67dGNLUIz567zFtEaFEyslS \ nsccOvjmnnC8YjVO2xlu0NiHb2ee0WfH0q6fcvNWnPx0TRBlb1zWqtZhqTjyxV0yjYoDwgp7SzMsN \ nbVugh1s00iONJxYCjCTSMabp0ELQdYaqNRw + fU5nBePo27z8uuPl04J6oNFpyaI7QSUQjA1nlwtK \ n2bDedJBG3IhD1D / EwP / 6TPH + Xz / k8AsIUOxcj5hfvGS8NeTG3dd4 / sLxr / / 4jJ2m5U6geOudt0Fd \ n50d / 8YTHj44YrDX3XvGMxjdZrUrCTCDTiIfPvmKZFxjMlR1LCqxQ9CdTyqZhmqS8 / uabmK5BS08v \ nuSr7anWJ6inarsMaS9M2NE1Dv99nMBqwlcQ02SssyprcgjQC01niOKbX74PzGNNhi4QgTEiTDGss \ nJi / JXJ9e4KBc07qC + dhSScej5RkXNayJCALP0eKIi / kJLrNIG1M3hrPFiryqr075ZzPshz / jnXff \ n4JXXX6WzmuXZJT / / 7Cvy2hOkE4wTxEnKy + fPODo / Jgw8Mg3phKXYLAnDlF46YlEKBCGq20L5lPE4 \ nojA5hAtwayaDkOnuHYRWxDahWXW4WLMpc7QSyMUF67zk + PyCZdUwm1vG4zvce + fbpOMxRge0tSPq \ nZehA4yV0wyFOR1T5DOtqQptTUjCMGqIgxJgIGUzojOBi0VKbltFWhPElPiiIkg1xr8GauzQl + G5N \ nFhhGoWPa0yTKI6ymLiqePTtFqZRRf5 / hYMTTZ0 / ofMNqU7IpBWWV0ZiWIIxIwoBQeQapRvglw17C \ nIPUoXeBaCaGgKjaUTUPbGearDfm6wHkwzjHp + ljvaLGEvRStJba14EOEl3gL4S + rcCk1yhqscyil \ niYdDvBe0bUscCYz9ZTWqNZ2xeH8lClFSX72YlUNaY / AyQMUpWliEr / GmoNzMWa2WSOkRzuGMpd3U \ nlNJiYtCZwkpJ7T1QYdoWqWJSnWBFjFIp3kicc4T9mIYpQkhGWwqnK3ZvtiRhgfZzYl0wHsSEizMe \ nP35MWXf0BxPSbMx7Hz3g2bOviYMO4Szf / MabuAcP6Y + 3 + Zf / 9X / F8y8fcPjkK27deYUf / f1HdMag \ nvca0NUo09JIEnYToQNDvDa6k9K3jtJ4xTCKUcyznM + gstnP4IEAoRb5pCKol / bHn4MY2lgXHx1 / x \ nT / / wP + PF1 + ecvCwJdMyb371PMknopT3mly8oZi33ru1xePKCzeIUgPHuK6zblPc / Ouett15l2n + d \ nKJqTjr5GiYfU / pLyyQ0G6RZvvfVtTL6kyC8pNjmzdcPNUNH6gCSIKRYbQqmhs0QqQEUhTQPGeh58 \ n + jVHZ1A3IZtFjshXbPcCGm959OhrlguL19t0XcvZ6SlZ03Jdql8pe38tgf / v / / KQxcuCQMbc3J8Q \ nhxZrE2CLDz8 + 5JPPLpivb + OjYzbVE67t3eW9Xxzy4LHncpZybavlk / Yzzh9G1E1zZc7xDUuzwUQe \ n4yQGAU6R7gz4L / 6bf8kPf / RXhGlKF2rSeITtKjampmgNbZHQtS3rdY3tfilgsBHH84osFQxHI8LB \ nPi5uiAT0spQ9DKap6IeKSDqkEFzoGCEUtrMUqw2RbtFNgck3iGZDEgd8NneMru / w5u98l7 / 5258h \ nO0toFWKVo9ZL + jRYHF53 + ABMJwnDMXmxJLio2Cw8926 + xeOXT3l5csHHHz2AYEwQae7evMnx6RHn \ nFydgHZ2NcK5FK5DK8 + qNa7z19ru898kDOqXZurVNT0iCuGYwdigJg8FNPDHzhaerElZrRyxDqk3L \ nrDQEiaRdl1yeNxTNkHAw4dV397h + 4yaNU6x9CjIl6Y + omopQahId4FwInaOngHpOQkGiLC + fn + Os \ npqwddXPCcDzh + sF9rI5pfUGmBToMcJ1m / XxB1XyOArb7EVOtIM85Oc6p6hoZxVgUrbL0Ms3hy3PK \ n4gV1uyavVqh4jAj3abs + k + mcSClCGZFFIYNUMEhHJJFE + QBvNU0jKDqLde5qBrvqaIjppEfoAAHM \ n3JzpdEIqBForpAyQIkASkucFpnMIZ6jb9kqp2FqME6A0SI3UAVIGzLEgIEoyVBAiEERxShhqrLc4 \ nYzFihlCgpMJ3lrpufumKrXAWAp2iRpq66jCdQDqFEpLKdrTVAukNWl2JdoQICAKP0o7WbBBKEaYR \ nUklqIVHBNkqErKsWS03UdKy6Gb2wZpi0LE / PGPsYlRzgveBk7bl4vuT4xRHT3RsMhwuU71hcXjLq \ n9Xjzjdc5Pz4iDhXTrQkvTl4S9GMoDU0nCEKBEg1J1vL2G3fQKmE02uXw2TkvXp6Rs6EEpDF0VUXo \ noB8GWBXQeGjahiyqePutb / DKa7f4xSfvc / / OO9y78yp / 8Icdf / 7Dv2G5uETGGb3BFhJLmFTcPrhB \ nfyTZv9Xnb55 / TNcJbr + xTW9XcXYOD59A5CJ8qdjqR + xsjdisNpRNzPmXx8zOfsoQyzsHB8zSbQ4v \ nCrK6wCzPaTcdaZDwrTe / wVF / wNnZOUXZcFrk9KOM9z / 8lKeHLY0dY12FcBVFdUo2zDi6vMSLHSoh \ n6KcxqshZH75gVde / Uvb + WgL / i6 / XjEJFZ48pyiWDpI9XY37x0SEvl5JWZkx3HXnRYtMd / uTBQxYn \ nNcVGMByn9A4mPDEzuibCC01nW2pT0QYeAon0AXiNFJp4OubLly8opEckIaXpKDtLkc8RvsN2FaK7 \ ng5CCbCSRQuCcIwpDtNKAByEokgSReQLZEYSA2dALHXv9kEx2uK5B7V05Q72BWGyRANX5CVGraBcd \ ny8s5pxcJM1tTiALf9RgpSVQ5ZJ4TXSyIVE0XazbNjNK0NM5jrEYHAy5ON3z4d58zGewwOujxs198 \ nQt2Caz1JHHB8OWeRr7CmRVhFU0uECkh7mjiEwNR88sFPME6wQtCqEuE20MHkfEisQ4Rf0pmKIAYV \ nCbJen5WIOc09LRPWJyDsgK0b9xj3a7K9AKkUM13SuhCnQ7JhSCMN2aSPsx2zzQK70VTLnIHe0Cyf \ nsj8OyDtDU185fkufkcVr8tkFy + UnJKMB / fGU5aKkWBtMJdEk6PQJ21NwRnN + vMA2JZ4A0hFVF9AF \ nKWnqWCwLTKORUrO1u0PmhnSiR + dvYOSIgwNLFGqGyZgsiBG2xrVrhAdnBLiAylhQEeuqJN80WBSd \ nU6g0RoURQiqCayFBnCCdRRpPu66xm5J6WVOtGkxtScKGqq4QMqC1HoIIJwJEEEOcoMMIrwKEVLRN \ njTQGKTVYTysUwkIgNCqc05QtXe3oKo + pLRiH9BYlPBJNZUoaa1BECKHxTl5VEabD + gYhPFIFCAum \ nWeGMQ2qBCCHoa9JhhLcgu / OrjUkExEmPrrJo52i0ZLH0VLnn8ekLfDSgImFWdCA8TSkpikv2RoYk \ ncgituXFjSi9JqOuSo6 + fsskXPHlxjMOhogBlFLv7Q8Z9uLbX43vf / Q5N5fizP / 0Jx0cb2lYQxi3j \ nfg / VaVZthVCS1gvypgEUkVZYTljMp5TrXYqVYP + br / LZp4 / 44MOfkg06BsOM5UuFW5eMJzH3732L \ npml4 + rQkCHe5eesPkIFn6 + 4Mxxn3965xfqjIzyNUeYvFoeEkqgkDiTMB9bqhWr4EM + e8WXCW7bK0 \ nCb2mJS0WmPWajz74kO1Jn + v72yxmc1ppGA9HeB8ymWzxxYsTmq4mSMA0JXWzJDcG6VPyMsApRUhD \ nz0t6zlOenf5K2Su89 / 8 / RPj / u + + / ffM3vFIV0xt95s6zlEPOmxCRZGSpIA069u / kXNv7Bl98nuP9 \ nhItlAYFHp1e6scViyYI9ZLchtDmxMYRous4gI2hVSZAK1OQ1ev0BQiqqztB6h5MerxxeWJxwpF2E \ nQKDVL13yQqJlQByGBEGAd451nBEJQ6YdgS + p1meYdoXSHZ4WFWqi8IAMx0jAILgiRq5MRxFGfL1Y \ n8vnTQ7rZmCSEYaKwTc7eeACd4YOffojvPNZ7XKCROJIk5PX79wmDkJ / 85Kd0nUWpEIIQmY5wTl0J \ nuq264nX7Fm9KvKuQxhIZRZBkxL0RBCEOD87iTQ2uw2mFDQOyKCKUjlCDx6AjQWUq4n5Mm9xiYbYJ \ npADp8KFg6 / o2aS8hMh1RY1kUHSoZkKqQSZCxmS1ZXcxw9qrH2nQtVp4ixJJRGrI36RMqsNZf6eFk \ nyNHlgvaiQbca7WNCn + AaA6LDqQ0iLtGJYeLMVYskkohE4WOBGgS42FPToiJFNJwwaAL2om2q / oBn \ n0lPMSyaFYNDv8cKXhDf26XWOfacYOkPVFrQJVBi8sSROsl4qNkVBWVR01uIQ6DghiBM67 / FSsEnX \ nyKZDb2p0XqGKFrNpWK9rnFCgAlx7ThDGGO / pvMDLkM7A1tbe1aWljvC + RQYRPgjokHgZIkREWxuk \ nV7jOM24CWtvSOoPQAhlorL0ShXjrWC1zVDQnFJJAKrQTBFKj9dUdQtHWdNZQ6yU4R + BAeo / yoLUG \ nLUEJoiTGiBQlItKwT7mpSZIAJzYYLpHhBhka2vc2bCzUYUahQ4gzjGmJBGhTEUg4OAgZTDKCSBDE \ nPapWsy4Ns + WCk4vn9EcJLMd8 + 1uvsrMbUpRn7EwHFMuSv / ubnzM / q / Eu5AYBB / dewWjF + w8 + og1a \ n5vWa1sVsSoUUGWFrkbJmZzdlayfjj / 7on3B2seSzL55RVwKlEnqB5vnTL7l7Z5t3330DLx3HiyXB \ nYEqnUrLUs2PeQ4gJ + TLgcgZSDmmalqJaIJWhaxbQnLIuC8qyo2sjjOnTthonHEK2eNNxc2 + b4VbN \ na29v8 / u / / x / yxafPWM8b9iYTZheHuKbhJz / + kp8 + 2zATIzoUulkwigxxqFjULa1IMD4iy2JU1 / D6 \ nzg7 / xw / / / P8zX + HXg1aoUsgsq3bJnW / f52UjKJYBpR3QqhGNcXTzFxyvc5zMMHQUUYPxjm4t6EyM \ nMVsge6gwRPmYzjS0jccpj5KSxgZs1legrflFjhOCrDdEBgonPDIEHSi0VqhuC60UGkWW9K4mvABl \ nBc5IlBTgt64WmnREwhDIA4xf4YzB + o7WevJ2Qu4a2hBqK / DthlVV8OLygsvSkqrb + P19hCmo6gWJ \ n9uR5zersBNF2KOsIVcCi8gRBQNdoNiW8 + + 5bPPjyJYv5mrZzBKQIlzHsTxiMdvAi4OXLIyBC6RAp \ neySZYrKb0XlJ1VpkEKGUQOLJ4gmDfkIcb + PsFN8Z1osV5WaN1prGWNIsRUcRXieM4ozpcMj16 / vI \ nVNFJS2cqitMzZkenXC4PGW6FOKVZrgtc2dAVNVVVX02qxCFBIMhChZBQzSpaCW1rqIxgXi5YV5a2 \ nWaK9Q3lN4DRaK / ANSSZIB6AT6FpJEF / 9m4wCokEPmQQ4LRklMVaAUiCbltmm4 / T0kCeLBVJEyGyb \ n8dZ1olbjVo4wDOlqw0W + prIFvhfSug7TtFzmBYsZLJdrwjBiNBojhcY3iqYxoAOMMXibUOcGUThY \ nVdTzBcI6OtMhdMB0f49hfJujoxOKqkYHMZaWzniKTY7pLDUFqITOrrFSoJMEKTuMWRPpmKbu6JqW \ nql3gnb + ygEUhqlN45 / CA1gHT3ZCqGIKx2MbiPSAkwkmQAmFDpNf4ahesw9irsPdCYqXAOIfxFrRC \ np08xnUT4lKYW4EOs9QhlkCpE6JCJrAnTDFREGGX4IKZrHb4zOBeihObp10 / oXYb8o9 / 5baxQJEnE \ nZJQwGa + 5e + c2Vb3CX3vEtduefFbz6POaz8sGbyzLRYIVBktJlWUs / RprBIPtDK8DklbSNIpL07CY \ nL5BxjA4s + WZONrg61G2KJXWd41xEU5c8O3tCXS65YQOkbumsI0sTzi7nGNlw0Thm63sY14F0KK2w \ nrgURkS + HVBtL1 / Ww3RQvGrqupmk7nNcYZ0FWOAxS9Dm + 6LNqAxbFhoPrgt7 / 096d9VaWnecd / 69h \ nT2efgYdkkaxBXdXqhhoaYsuOZHmQDRsJbCBBvkByl + 8U5CK3QQYDTgIESJwYASwhQ1seY7mlHqu7 \ nqrqqyCJ5xj2tORenkQ + QBtIwav8A3vDuHJDPWvtd73p3 / gusd0 + pju6y + vwp52eP + NqjC / 7nx3 + O \ ntyV5URGtZnADajaBJPB9IrqINYqcnFe9 + 1LZ + 5UEvgBsDDR9w80n77EpZpjyIXI6J5s9JKaKqO7R \ neINUkcGsMXUAJClM8c2cJGZkYo1PHUNqSSqRSo0ICu8NUgiU1MSmByR5PmHbrpFSkEiE6Ek4IFIV \ na05OjimKEid6ppMJKSUW0xlVVdA0Lal + SjAJPyRsKGiNQoolzmt6m5jWM0R4wRAiay1Z94aus + wG \ nT6jOKBcFPmWk7A6XTz5AGU1E8v57P6cMA1WmscMeKSHX7jDOQRjW3TUnb5xydO + YG9MSvUIvJsi6 \ nYHn / DrOjUxZHp3zzN7 / DdFoym + SkaGj6htt2f / inzkuEzsnLkhAswQ14ZwhGkIaI8JLl / A4n4j4x \ nSLSuUFmFyDKcDOQTSV3kkDokCmMaPv3wfa4 + / RS5aynyFhvDFwfXHTjH4VhYoKRChIKCI3Sc0HV7 \ ntn2LtxYXEkEVxLwmqhKLJBaJQguETEwqyd2Lr6F1pKwyqjpnQDKdH6GznKa1pKRA5CQv2KwdbdsT \ nmhu2uzW7ZofrBoINFNMFm / tzvF6QNxpnel6tX3I79EwLCRmsbq / phh6z3TOsdgxmis4yRJ3T49G5 \ nJNOalKAddqQE2ysHzlIrTepzTJcgWYKMVHWNwfHx0 / Xh7VG6oh8s1ji01mxXt6QARVEgJwtSOhy2 \ n9tseUouWYNKW0B9mxTPzBOdww6GsQ4iHQ94swylJqCqEPyc4gQiHJ1UQBCeIIuFtxIdDq3AKCec9 \ nIh52NykJkhKHzirvyNJTnBekmJNSCWlCTCWSCTFkJCPYZT3zac5sWhExBG8JQtKYgW7o2dlATLDa \ nbHGuQmnN4w + fErxkebzgez / 4LuvNK1avvsZR + Yjb4SP2u46hDzij8f4ewWqEyLHL9 + hngWADR + dT \ nvv + 9b / POW2 + yXfX8tz98lx / / 6Ce4TJPlYH1PiDVCRFwYkNKjVUbwhsE1uGDpup7bmy0 / e / 8xDx5 + \ nk1Id8zc / + 5wYCxbyLnlpQG / x4QYhPd5Kop / gUoajwOULrN / ixA6vepy3RDEgVY / QHcEbdkNJicNf \ nrbn65 / + K3 / zer1MLwdXTT8DfcnznnLd / 6Rc5 / + AZVx8 + w7Ubciw2GlTQhKxEOYfom8NFrbok8rdw \ neFqx3NOFgV2s2W8q7OSE + ew + 85NT1CRi0w4RjilFBAzZTHOsZ0yqAjtkXL8ImC4DLwiqwOcZKdOE \ nlKNlRRwGfL + l2V1TS4W1juh6SlUearQhQAooqVA6o5jtePTwjOXRDGstWrcoqZhONGWVmB9F8vMb \ niDnWHEYd9z00bcO + jcRtj0einr / Ly9sb8uMl + ekZWzLS0TFGTMmrY + bzUzYfP2OwlgmJwTruXFzg \ n1je4riHqAhtBSosQh0f2Phr + 9X / 4A1qTmN + / x / HpXY7vXmCXOUqXBKFpypwwyelE4Cbu8b5HosjL \ nNyAeyipJgPWH8QDOV4To0HnLtO5w1pPJAiUSKUh0rnDOECKUZYUzDhcV8 / mUZ88f88Gn79PttlQp \ nojBoC + 4moGNARoGICSklSWWkqJGiggBtsyV + cWEmpEMtW6jDYlTPFty58xaLkyPuHM8odMSZPcmZ \ nL3axEusVbhp45QL9eofpHJkowBs2Nztevbwh + gjNhlZbXO6p + oFJ68ipUEXGs8tXbJ + sUG6PSJ5C \ nC9pk2PQ7oow0 + x3Dek + Jph8MeVlSCEHKc0KwrLc7vPW0u4bgPVsSOiUqlVDJ4m2LzARH58ecXtxj \ nNwwkPaHtdtRlwenpKd5adusVpc6oF1Om05rPbj1FkVNnGd4MBGeJQ4 / p2y8OWzW3TYkKoF1O5gUy \ nJBLgtMCLSN8NFGKLEKCFIEgJSYCSCAQIgxABqTaHOyLJE4nAocU0CfF / 6 / 1TswAiUQSSckS2IFqE \ nGA4bApkhZmdQFUSR0MlSZpJd17Bb3 + C8ou0tpIq8zHn / 5x9TTyc8 / + wZxkSunxdsby55 + tlHRP8O \ nP5k + ZzA7hM5AgIs9ohwwoWc6nZLPSoq6pJxnLKY5p8dz + nZHrjO + 8Y1H / Nmf / gUuy0EFEgXGJm5u \ nd8SoUFIjEEzrKTKdE9yO29uMZ088 / a7mo / ducbGj7RTL0zlb9RFxcCh56LAahoY8g9nMk4rDQXwI \ nNSJ1SNcjrWdCiektIRw2O0o7QnqOiZGqzlg1K / 7rj / 8LtYKLpUaELdn9I6rFjDfeLnl2tWa / 3SJE \ nIspIFzuSrAmiQ8kWmWkal / jlH3z / S2XvVxL4bbrF5jWDXjLEJa6rmXDEiZYM4RXQMdgtUpRoCmSS \ naJ1xNC3RM8HibiB6jpppwd427NKAVRm90yhKhHIU9Sl36nvMJhtAsls1iKQ4PlpiB4MzA5vNCm8N \ n + 2vHTzcfM51NOVrOmU6nTCYV / b5hPhcsl0cszBFCSkyykAsWVYIzDzowOzqj71vuXP8DrpqWjcr4 \ neN1gbgeaVFPP7pOoub5uKNyK86XGrA3BNngzYEk4lcEkxxnHlGOIh / HAIdVU5Tk / / I1fp + kjXR9I \ neYYJjuAEi5NTkJp969FaImMgxpqZzChMIi / zL0Le43xApkguc8rpEd4WeCuQ3hOFIMSAlBHf7SjK \ nCikjMuQkl7HbDfzFn / wvbPLIskYnSbSGPJb4oUEITVZEQthTFQWz + RxV1mw7h8hrcANCRIxxRKkY \ nbCArFfm0JqiMk3unzE7eQogcnwR9t6PdOY7nc7RSDK2htQkbLZ5As7XYbqBUHoyjW62IzZq + bSm8 \ nIk0FJjiyYClTIpiGZ58 / 5n4xobm + RvQbkgi4aJgua + pJTlUW + O2WfdMgZIZAYLs9sYauGeiHnqHv \ nSfZQ5ydESplIIRBdIqWIzjU + RF5e3nK1GwhKURdTdDHj0dffYl6WfPbRRyih8TawHm65vHxBq5Ys \ nplOG1lJoSZVrYoLYW0TyONvhqYjh0EVEFIgokEScCUQZEQkcr5BC4IVASoFIAiklUkpCDIQQIdWE \ n4EkpEUnEdPhBCkgJYgbtg0MtWrZ4ZUjSghKHW6zFAikyGnfK3nm2 / YpSOHLp2Wws + 3VA5Bohyi86 \ nkyzvvf8e3 / 7WO3jf441nP7TYboX3PaL4gM5WCFlR5jVRWN7 + 1oLTu55sYji7q9h + / F36pkcmmGiN \ nljl5VbFrLEYrWiGYyoqQPCJBcBOcKThdfo1uk / js0ycomWP6kuACq5XnaX7LbrdDaUtMHVJX7BuD \ nW7zCGmAoULFAiSld7NjtN2SVo57V1OXhDocZBG5IRFMizQRrB2RwCNmjwzVC10RTIFKGCYqua2ks \ nZGpK + 9fXvJXu8ms / + G18K / jJu3 / KYC2DdSBzhFSIUKF0zuA91bzm7 / 2jf / KlsvcrCXwXJsRqQUdG \ nlyyZFGR + g18bOtMj65Kkn5DCnK6v8Z2gyiLl0GOGV9zcPMX2PTL7FQwWUeXkixOKOEHJhNaSaAwp \ n9rhkaPcdPiYyVdB0e6KPpOjZ7bdkWiHSMUTNZuW5vjZQzLkAAA15SURBVFlTFA3OGWIKSCURQvDO \ nybf4 / g9 + BRN6bjYvyaeJyTzx / od / hi4si8WUdvd1vNJk8zm9mDJJCmUFZ0IQbcvV + pLZMufqyZZh \ nd0tsd5SZRtQzXOrZtj1FPiU2gfnRlG3wTOs5 + XTG56 + u6QwgC84mUx7Egn3XcTrPMM6x3W45Pztj \ nv2mxw8DpxZL9 / jM2L / coCSEEdKZZnp7SG8vtbYPpJdPq7FDmUv7QKSgTYCkl7Pd79mbH5asdYTAo \ nFUjBM5hDjbqSkiEcBkEJIkpEUJYez3I2p3MN + + DJkiZGQ1lllHVBXhQo58gnE8p6hk0CJ3v2u + do \ nXdC1lpubl8Q44PzxoSbeWepqBvuCm5tbVjfX3Ds / 5Ztff5P / / ed / wqvPP8EPHZkSBJ8zyRY4CYGE \ nXEzIFzUb03D55H3M1Zo60xzdWTKvKopKH6YvfvgBrjMI7wmZIBeCSV2xmBc0pmXXrlFCMF9M2K8a \ nSJ5CJUIKBOu4uLiLVAWX12sIkmHvQSv65PmVv / vLXD55ykcvrygkyHQIYBcSggzBQNs6TNdSKk0j \ nBcQIKZHpnCQyMnpIEEWOkwoXE1IevnstA0Im8C0xRQKQhCAKSRTq0McfBSlG4nDnEPACpJYoJYBI \ nCg5SJJcCmVs8jpASIQkSOcILoi0JMsNZGFRk17fIENi6PXbY4GNHxBOdOwyYCzlKGk5OLvjt3 / 4h \ nf / if / ohnn75ES4WxHgTkWjOdRXSx4uh0yze / / Sand444Wi64c3rB7e2aIh / oMkmRFfhoWL9a0Zua \ nbH7C8 + 2OTmWcqAlRQttHUqj46IOXXF6 + BO8JJvLZ55 / gdI0qPI3Zsveg6oBxW5CKEED7ktBMUEmQ \ n0oDpG2JIOJMIQh2eSEWgUDeHMR9YtMxI3jCvTzk9nmNdgzMBqY6wdkJnc3Qxo17M2e43rPY7gk9c \ n9QOPX / yEH / 3nd9FeUIpzumBJJESAuBsoyLEuETKJyk / 4Z / / i3 / FP / / H / e + h / NeORVc3OGNJCE + QW \ noRP7PjKdvYXKztk2OWJ + i0wRM1hELJGq4vLVK148 / 4RMe85OT9irx6QUcCTMrmQYMpSsKEqFyi1F \ nEWiHOetmQCSFTIKVGziaLynKkpRPMSngxJaAIKmIzCBmkt7tmcwqIBFC4LL7H / z7P3qXwUrW6wFJ \ nxRsPHnJx9oi5XrD5bMPLByVlmbGYZMjgeHQxQcfA1ad / xs3LF1ycXeAn3 + DFiz8nt5JSTMjwLOoZ \ n0YBRAaJlMt / QhxV3H71Bcd7zcvsepr8kiZLjxQWzecI9uyJsN7xaa5quZTKZ8OyFZ5IXxBD45CrS \ nmJY8UxwdzVEStMzYbzqubtfILKfMj8jyHp1rhjAQVWC1uSWEgXg1sFnfYINB5IcOJl2Vh / cOhMDd \ nhw + Yy4Inf / MESU4mMlq7YbkoWM6nbJpbTFQU5REuJcpyTgqRbjBs + x5jLKqxzJdQVjX7fsuwf0ym \ nBNZ7emdYLo9YrzpM1zApco5P7vH450 + 4enGL1rCyjj / + 9DGbzQ3WdqRgiSjmkwrcQGYDTuY0sznT \ nekb / 8nO2n1 + irWPy4C3q0yWr9Q3vf / CYfLDMg0L6wyI / KChTQbeLPOmvSYUiLxdMZzXzScVm1eE8 \ nEBxSZocasVOs11uCESASioSIiWyhee + nP + P6 + XMWeYnQGfWkJAWLsYYgIkSJT4EqqxFJMgwBQQZa \ nMbhDuC9Z45LAi8AgIlEJtIBKCXRMSO8Q7tCxFZPACkVQGWQFUuaH3wOyVAiRCMlDHlEqgTdEd + ju \ nQkT68j2sBxshZRUpKoIRDINgdwtusKQKQoxoneFTwMaOkA6Ta0kGScIPb1FWAp3nDNZw7 / 4DLl9u \ nsb0 / jL4REu1qUhD0bctv / vB7 / OJ3 / g7eae4s36JIZ / zVX75L7f + K42mNEhrjLHfvnpMdzbhuHO / 9 \ n7H1UllHoDDJN8Bv2jaHvI + fnD2jWt9xsX1AVGS6uMN6Q5ZLW3aALjZMRpCQkaLuetI9osSeXO6Rs \ nD09JekqMpxhzTPLyUNrKDUL3CA15XmKjxXbuMEolDlRyQu8SLllksuzaK6IIIA2I / PD5vaFvWo5n \ nd + iFRBYFpVLMJ4nN1VMKkVGUcxoR8FFyfHr2pbL3Kwn8b79tmISc0 / sP + JPHL + k9PLnu2cUN + fkd \ nuqqmDA + IXmNEJC8lSQfaAfr8HFkuueoKxEnHfrtmdXmN71u8zUHmkEN1BNOjnLmqQc5wFoQocMGz \ nu2qRUhBTjVKKqmowbsB5T0zhsLrnkSENLJYL8lzz5JP3aBpPihOUmIOz / PX7H / D + Bx / x6P593nz4 \ nBtPaczJfoGPGq1cbHn / + ihg1XR / Jyocslm8z6HukydsEf4231wTXEAfLUVKHP4CksH3JfHnGYvEG \ nQ9JYa6hiTRIFIla897OnaBeQ6tDBkeSETRso8oIhZpghEYIC7uI8qL5CawhdwLhIyh9wvDyH4OiD \ nRXrobWTwluXyDS5fvGC3dvj + CJ0nZIospsc8v3xFFxaURyeo / B4vXqyJ6i3cPpAi1MUC4QZcFyjV \ nEhEVXVNAqlGTjKHfYfqA9YlIySSb4neS / XbP0He47pZMQZA5upxx + 8wgM0Hf74mh5fPHn0KbH84Z \ nqgrbD + z2DS5pyJdY51icnaH8FrtrOZ4e082m7Oc122FAuZwTWdIpy + 0QuPnwMxSRQs / IbIO2kKsJ \ nk + WcfaWwT9NhLr3Q1IsF + bSkaVvWtz1NOyOTc5KBGCxHR1PaxqGSQsT + i4UAqixDSkW736OFJIZI \ n0 + 0JPqAyTRT6sIseEkrl + KixViDEnCAKQqywaJLSLFearKqwOqdH4gCVEsF4CI7ce7LUfjFCTOGU \ nxqmSGEuSzAlREUKiygVSJmQGAYdzAzppRNJ45wjWkLJzfBIEkUEosMYQhxbpW / Jk0NKR2hapatq + \ nwoiaKBckEjIZZBiQWCDDO8dq3fLZZy85u3iTo + Mtn336nExXCAHG3 / DG8df5tV / 9Hb52 / 4w05Fyc \ nHmO6Fc9e / Iwse4HIe8qyZL9ak2vNJI / gB + ZK8Xu / 8ev829 / / j6xXz0lZTkyGFCVKQ9ftKErBO + 88 \ n5L / / + EdYkVOUxzifsPaEziiyYo4bJDEpCFD4Di0VmczI1BxEoAsKG0CIwwh2FwdSdIeduMhpNgJB \ nRqIEOUHJwDZ6os + RUpEne / jupEMrgesFxkSGvuNkuqDfQ5RLyvqUYlLx7TfnPB5uMZsNbduzmFfk \ nKmf17PmXyt6vJPDvnX / Oulnw088 + BPGQzmgmeYGY32NXwL4YKFZ3GA536KnzAJVE6DndLrHZTqmL \ nC + R + gh86kl2hnUb64vBSExEYWkOUMFvuGIzDDAFBQoqKKMF6h / fu8PjrF0ymd2nbQ103iUMrVlXX \ nfP97v0VR5Vw9f5P + 9iWTukIIz2wpsO0l3eYZn778mJTf5e0H / 5C3zi64vbE8v3FcvxBcdRm + PmU2 \ neUjnL6jDNT6 / T9c3nMkjCpk4m + b87u / 8Gr / / b / 4lq3VPkL + KXU + QwzvkqiS1zwnlGc7Ak0tI8pS2 \ n0CQRccmDFMQUmesZrnfY3jAvJ2hrYDBU9Snr9RbrLFk1oSzmdP6Yod0QhzVlPUWogr63zOr7bNcV \ n3bYjExlDb1Ay8mqVsbo + ZX7xAOkXPH8cCftA2ltkuwJ3w2KpSM2GXGtyJPtVizE5RXmKMXuGfo / 1 \ nGh8gLzShERjXMwwtWgmUz5E6J6aSYOf0w6HGrrLlYSGUA9K0SARdY3GNPAzgQhNDhi6XxOKckFrm \ n5YxFdcITNBtRURY5lVvjtj2UkZCVPPr628Sh5 / Jvfs6MmvPpnPsPH7GtM979 / GO0qdF6gqREyyP6 \ nLnB5tQMvwS + QWU7ykjKXbG631HVGDC0iSfIvLu2pYFitbpAJlBAE56iLihDBDhYnEo7ENJ8x9I6U \ nMoLLEGpKyhbo8hgTBCYK0lqQcYSsSlwCIyWaiBoMhTVkIeJ5QhCCqDQplURKgpzgY47zEhcirq9Q \ nSrA4riENmG6N8z3Ctqhg0URM9yYBsCnhokXIFhVvCcMzAreUhSd3d9h3FVl2gVcXxDhHiQIVHCr0 \ nyGiI1V8SQ8tua9juHd / 9pW9yeel48mRLEl + 0MhrH2fkR3 / iOpHd / TBuvSU3F7jaxXgm8U9x5dI83 \ n7z3gw7 / + gP31LbuV4sHDN1kujrn7w4cs9Jw / + P0 / 4PnNLYc + QMW + WbOYTRj2e37r7 / 8eP / 7RH6HS \ nG9hW8s53folicsrjJ9f0 + xytF5yffQ0RPMPlXxLbgCSjKArOzk + 5Ci8x / Ss8HQmHFhU + FEQP2AW5 \ nvk8MpwRf4j14OqK6RZKRq4DoV8yqGrpbCptR2TlDkPTaYtc5Ic1w6oLWLFmvLIsg + YWHv8uT7qc8 \ n3zV4kZPElHe + + 90vlb1fycWr0Wg0Gv3 / 9 + WGK49Go9Hob40x8Eej0eg1MQb + aDQavSbGwB + NRqPX \ nxBj4o9Fo9JoYA380Go1eE2Pgj0aj0WtiDPzRaDR6TYyBPxqNRq + JMfBHo9HoNTEG / mg0Gr0mxsAf \ njUaj18QY + KPRaPSaGAN / NBqNXhNj4I9Go9FrYgz80Wg0ek2MgT8ajUaviTHwR6PR6DUxBv5oNBq9 \ nJsbAH41Go9fE / wFQKxMtJWzOmAAAAABJRU5ErkJggg = = \ n " , <nl> + " text / plain " : [ <nl> + " < matplotlib . figure . Figure at 0x7f5017504510 > " <nl> + ] <nl> + } , <nl> + " metadata " : { } , <nl> + " output_type " : " display_data " <nl> + } <nl> + ] , <nl> + " source " : [ <nl> + " out_img = io . imread ( \ " output / out . jpg \ " ) \ n " , <nl> + " plt . axis ( ' off ' ) \ n " , <nl> + " plt . title ( ' result ' ) \ n " , <nl> + " plt . imshow ( out_img ) \ n " , <nl> + " plt . show ( ) " <nl> + ] <nl> + } , <nl> + { <nl> + " cell_type " : " code " , <nl> + " execution_count " : null , <nl> + " metadata " : { <nl> + " collapsed " : true <nl> + } , <nl> + " outputs " : [ ] , <nl> + " source " : [ ] <nl> + } <nl> + ] , <nl> + " metadata " : { <nl> + " kernelspec " : { <nl> + " display_name " : " Python 2 " , <nl> + " language " : " python " , <nl> + " name " : " python2 " <nl> + } , <nl> + " language_info " : { <nl> + " codemirror_mode " : { <nl> + " name " : " ipython " , <nl> + " version " : 2 <nl> + } , <nl> + " file_extension " : " . py " , <nl> + " mimetype " : " text / x - python " , <nl> + " name " : " python " , <nl> + " nbconvert_exporter " : " python " , <nl> + " pygments_lexer " : " ipython2 " , <nl> + " version " : " 2 . 7 . 10 " <nl> + } <nl> + } , <nl> + " nbformat " : 4 , <nl> + " nbformat_minor " : 0 <nl> + } <nl> mmm a / example / rnn / README . md <nl> ppp b / example / rnn / README . md <nl> RNN Example <nl> = = = = = = = = = = = <nl> This folder contains RNN examples using low level symbol interface . <nl> <nl> + # # Python <nl> + <nl> - [ lstm . py ] ( lstm . py ) Functions for building a LSTM Network <nl> - - [ lstm_ptb . py ] ( lstm_ptb . py ) PennTreeBank language model by using LSTM <nl> - - [ char_lstm . ipynb ] ( char_lstm . ipynb ) Notebook to demo how to train a character LSTM by using ` ` ` lstm . py ` ` ` <nl> + - [ lstm_bucketing . py ] ( lstm_bucketing . py ) PennTreeBank language model by using LSTM <nl> + - [ char - rnn . ipynb ] ( char - rnn . ipynb ) Notebook to demo how to train a character LSTM by using ` ` ` lstm . py ` ` ` <nl> + <nl> + # # R <nl> + <nl> + - [ lstm . R ] ( lstm . R ) Functions for building a LSTM Network <nl> + - [ char_lstm . R ] ( char_lstm . R ) demo how to train a character LSTM by using ` ` ` lstm . R ` ` ` <nl> <nl> <nl> Performance Note : <nl> - More ` ` ` MXNET_GPU_WORKER_NTHREADS ` ` ` may lead to better performance . For setting ` ` ` MXNET_GPU_WORKER_NTHREADS ` ` ` , please refer to [ Environment Variables ] ( https : / / mxnet . readthedocs . org / en / latest / env_var . html ) . <nl> + More ` ` ` MXNET_GPU_WORKER_NTHREADS ` ` ` may lead to better performance . For setting ` ` ` MXNET_GPU_WORKER_NTHREADS ` ` ` , please refer to [ Environment Variables ] ( https : / / mxnet . readthedocs . org / en / latest / how_to / env_var . html ) . <nl> mmm a / example / rnn / bucket_io . py <nl> ppp b / example / rnn / bucket_io . py <nl> def default_read_content ( path ) : <nl> return content <nl> <nl> def default_build_vocab ( path ) : <nl> - content = read_content ( path ) <nl> + content = default_read_content ( path ) <nl> content = content . split ( ' ' ) <nl> idx = 1 # 0 is left for zero - padding <nl> the_vocab = { } <nl> def default_text2id ( sentence , the_vocab ) : <nl> words = [ the_vocab [ w ] for w in words if len ( w ) > 0 ] <nl> return words <nl> <nl> + def default_gen_buckets ( sentences , batch_size , the_vocab ) : <nl> + len_dict = { } <nl> + max_len = - 1 <nl> + for sentence in sentences : <nl> + words = default_text2id ( sentence , the_vocab ) <nl> + if len ( words ) = = 0 : <nl> + continue <nl> + if len ( words ) > max_len : <nl> + max_len = len ( words ) <nl> + if len ( words ) in len_dict : <nl> + len_dict [ len ( words ) ] + = 1 <nl> + else : <nl> + len_dict [ len ( words ) ] = 1 <nl> + print ( len_dict ) <nl> + <nl> + tl = 0 <nl> + buckets = [ ] <nl> + for l , n in len_dict . iteritems ( ) : # TODO : There are better heuristic ways to do this <nl> + if n + tl > = batch_size : <nl> + buckets . append ( l ) <nl> + tl = 0 <nl> + else : <nl> + tl + = n <nl> + if tl > 0 : <nl> + buckets . append ( max_len ) <nl> + return buckets <nl> + <nl> + <nl> class SimpleBatch ( object ) : <nl> def __init__ ( self , data_names , data , label_names , label , bucket_key ) : <nl> self . data = data <nl> def __init__ ( self , path , vocab , buckets , batch_size , <nl> content = self . read_content ( path ) <nl> sentences = content . split ( seperate_char ) <nl> <nl> + if len ( buckets ) = = 0 : <nl> + buckets = default_gen_buckets ( sentences , batch_size , vocab ) <nl> + <nl> self . vocab_size = len ( vocab ) <nl> self . data_name = data_name <nl> self . label_name = label_name <nl> def __init__ ( self , path , vocab , buckets , batch_size , <nl> self . buckets = buckets <nl> self . data = [ [ ] for _ in buckets ] <nl> <nl> - self . default_bucket_key = buckets [ 0 ] <nl> + # pre - allocate with the largest bucket for better memory sharing <nl> + self . default_bucket_key = max ( buckets ) <nl> <nl> for sentence in sentences : <nl> sentence = self . text2id ( sentence , vocab ) <nl> def __init__ ( self , path , vocab , buckets , batch_size , <nl> self . init_states = init_states <nl> self . init_state_arrays = [ mx . nd . zeros ( x [ 1 ] ) for x in init_states ] <nl> <nl> - self . provide_data = [ ( ' % s / % d ' % ( self . data_name , t ) , ( self . batch_size , ) ) <nl> - for t in range ( self . default_bucket_key ) ] + init_states <nl> - self . provide_label = [ ( ' % s / % d ' % ( self . label_name , t ) , ( self . batch_size , ) ) <nl> - for t in range ( self . default_bucket_key ) ] <nl> + self . provide_data = [ ( ' data ' , ( batch_size , self . default_bucket_key ) ) ] + init_states <nl> + self . provide_label = [ ( ' softmax_label ' , ( self . batch_size , self . default_bucket_key ) ) ] <nl> <nl> def make_data_iter_plan ( self ) : <nl> " make a random data iteration plan " <nl> def __iter__ ( self ) : <nl> label [ : , : - 1 ] = data [ : , 1 : ] <nl> label [ : , - 1 ] = 0 <nl> <nl> - data_all = [ mx . nd . array ( data [ : , t ] ) <nl> - for t in range ( self . buckets [ i_bucket ] ) ] + self . init_state_arrays <nl> - label_all = [ mx . nd . array ( label [ : , t ] ) <nl> - for t in range ( self . buckets [ i_bucket ] ) ] <nl> - data_names = [ ' % s / % d ' % ( self . data_name , t ) <nl> - for t in range ( self . buckets [ i_bucket ] ) ] + init_state_names <nl> - label_names = [ ' % s / % d ' % ( self . label_name , t ) <nl> - for t in range ( self . buckets [ i_bucket ] ) ] <nl> + data_all = [ mx . nd . array ( data ) ] + self . init_state_arrays <nl> + label_all = [ mx . nd . array ( label ) ] <nl> + data_names = [ ' data ' ] + init_state_names <nl> + label_names = [ ' softmax_label ' ] <nl> <nl> data_batch = SimpleBatch ( data_names , data_all , label_names , label_all , <nl> self . buckets [ i_bucket ] ) <nl> mmm a / example / rnn / char - rnn . ipynb <nl> ppp b / example / rnn / char - rnn . ipynb <nl> <nl> " cell_type " : " code " , <nl> " execution_count " : 1 , <nl> " metadata " : { <nl> - " collapsed " : true <nl> + " collapsed " : false <nl> } , <nl> " outputs " : [ ] , <nl> " source " : [ <nl> <nl> " cell_type " : " code " , <nl> " execution_count " : 2 , <nl> " metadata " : { <nl> - " collapsed " : false <nl> + " collapsed " : true <nl> } , <nl> " outputs " : [ ] , <nl> " source " : [ <nl> + " # set up logging \ n " , <nl> " import logging \ n " , <nl> - " import imp \ n " , <nl> - " imp . reload ( logging ) \ n " , <nl> + " reload ( logging ) \ n " , <nl> " logging . basicConfig ( format = ' % ( asctime ) s % ( levelname ) s : % ( message ) s ' , level = logging . DEBUG , datefmt = ' % I : % M : % S ' ) " <nl> ] <nl> } , <nl> <nl> " cell_type " : " markdown " , <nl> " metadata " : { } , <nl> " source " : [ <nl> - " # A Glance of LSTM structure and embedding layer \ n " <nl> + " # A Glance of LSTM structure and embedding layer \ n " , <nl> + " \ n " , <nl> + " We will build a LSTM network to learn from char only . At each time , input is a char . We will see this LSTM is able to learn words and grammers from sequence of chars . \ n " , <nl> + " \ n " , <nl> + " The following figure is showing an unrolled LSTM network , and how we generate embedding of a char . The one - hot to embedding operation is a special case of fully connected network . \ n " <nl> ] <nl> } , <nl> { <nl> <nl> " cell_type " : " code " , <nl> " execution_count " : 3 , <nl> " metadata " : { <nl> - " collapsed " : false <nl> + " collapsed " : true <nl> } , <nl> " outputs " : [ ] , <nl> " source " : [ <nl> <nl> " from rnn_model import LSTMInferenceModel " <nl> ] <nl> } , <nl> - { <nl> - " cell_type " : " markdown " , <nl> - " metadata " : { } , <nl> - " source " : [ <nl> - " # Helper functions \ n " <nl> - ] <nl> - } , <nl> { <nl> " cell_type " : " code " , <nl> " execution_count " : 4 , <nl> <nl> " content = ins . read ( ) \ n " , <nl> " return content \ n " , <nl> " \ n " , <nl> + " # Build a vocabulary of what char we have in the content \ n " , <nl> " def build_vocab ( path ) : \ n " , <nl> " content = read_content ( path ) \ n " , <nl> " content = list ( content ) \ n " , <nl> <nl> " idx + = 1 \ n " , <nl> " return the_vocab \ n " , <nl> " \ n " , <nl> + " # We will assign each char with a special numerical id \ n " , <nl> " def text2id ( sentence , the_vocab ) : \ n " , <nl> " words = list ( sentence ) \ n " , <nl> " words = [ the_vocab [ w ] for w in words if len ( w ) > 0 ] \ n " , <nl> <nl> " source " : [ <nl> " # Evaluation \ n " , <nl> " def Perplexity ( label , pred ) : \ n " , <nl> + " label = label . T . reshape ( ( - 1 , ) ) \ n " , <nl> " loss = 0 . \ n " , <nl> " for i in range ( pred . shape [ 0 ] ) : \ n " , <nl> " loss + = - np . log ( max ( 1e - 10 , pred [ i ] [ int ( label [ i ] ) ] ) ) \ n " , <nl> " return np . exp ( loss / label . size ) " <nl> ] <nl> } , <nl> + { <nl> + " cell_type " : " markdown " , <nl> + " metadata " : { } , <nl> + " source " : [ <nl> + " # Get Data " <nl> + ] <nl> + } , <nl> + { <nl> + " cell_type " : " code " , <nl> + " execution_count " : 6 , <nl> + " metadata " : { <nl> + " collapsed " : false <nl> + } , <nl> + " outputs " : [ <nl> + { <nl> + " data " : { <nl> + " text / plain " : [ <nl> + " 0 " <nl> + ] <nl> + } , <nl> + " execution_count " : 6 , <nl> + " metadata " : { } , <nl> + " output_type " : " execute_result " <nl> + } <nl> + ] , <nl> + " source " : [ <nl> + " import os \ n " , <nl> + " data_url = \ " http : / / webdocs . cs . ualberta . ca / ~ bx3 / lab_data . zip \ " \ n " , <nl> + " os . system ( \ " wget % s \ " % data_url ) \ n " , <nl> + " os . system ( \ " unzip - o lab_data . zip \ " ) " <nl> + ] <nl> + } , <nl> + { <nl> + " cell_type " : " markdown " , <nl> + " metadata " : { } , <nl> + " source " : [ <nl> + " Sample training data : \ n " , <nl> + " ` ` ` \ n " , <nl> + " all to Renewal Keynote Address Call to Renewal Pt 1Call to Renewal Part 2 TOPIC : Our Past , Our Future & Vision for America June \ n " , <nl> + " 28 , 2006 Call to Renewal ' Keynote Address Complete Text Good morning . I appreciate the opportunity to speak here at the Call to R \ n " , <nl> + " enewal ' s Building a Covenant for a New America conference . I ' ve had the opportunity to take a look at your Covenant for a New Ame \ n " , <nl> + " rica . It is filled with outstanding policies and prescriptions for much of what ails this country . So I ' d like to congratulate yo \ n " , <nl> + " u all on the thoughtful presentations you ' ve given so far about poverty and justice in America , and for putting fire under the fe \ n " , <nl> + " et of the political leadership here in Washington . But today I ' d like to talk about the connection between religion and politics a \ n " , <nl> + " nd perhaps offer some thoughts about how we can sort through some of the often bitter arguments that we ' ve been seeing over the l \ n " , <nl> + " ast several years . I do so because , as you all know , we can affirm the importance of poverty in the Bible ; and we can raise up and \ n " , <nl> + " pass out this Covenant for a New America . We can talk to the press , and we can discuss the religious call to address poverty and \ n " , <nl> + " environmental stewardship all we want , but it won ' t have an impact unless we tackle head - on the mutual suspicion that sometimes \ n " , <nl> + " ` ` ` " <nl> + ] <nl> + } , <nl> { <nl> " cell_type " : " markdown " , <nl> " metadata " : { } , <nl> <nl> } , <nl> " outputs " : [ ] , <nl> " source " : [ <nl> + " # The batch size for training \ n " , <nl> " batch_size = 32 \ n " , <nl> + " # We can support various length input \ n " , <nl> + " # For this problem , we cut each input sentence to length of 129 \ n " , <nl> + " # So we only need fix length bucket \ n " , <nl> " buckets = [ 129 ] \ n " , <nl> + " # hidden unit in LSTM cell \ n " , <nl> " num_hidden = 512 \ n " , <nl> + " # embedding dimension , which is , map a char to a 256 dim vector \ n " , <nl> " num_embed = 256 \ n " , <nl> + " # number of lstm layer \ n " , <nl> " num_lstm_layer = 3 " <nl> ] <nl> } , <nl> <nl> } , <nl> " outputs " : [ ] , <nl> " source " : [ <nl> + " # we will show a quick demo in 2 epoch \ n " , <nl> + " # and we will see result by training 75 epoch \ n " , <nl> " num_epoch = 2 \ n " , <nl> + " # learning rate \ n " , <nl> " learning_rate = 0 . 01 \ n " , <nl> + " # we will use pure sgd without momentum \ n " , <nl> " momentum = 0 . 0 " <nl> ] <nl> } , <nl> <nl> } , <nl> " outputs " : [ ] , <nl> " source " : [ <nl> + " # we can select multi - gpu for training \ n " , <nl> + " # for this demo we only use one \ n " , <nl> " devs = [ mx . context . gpu ( i ) for i in range ( 1 ) ] " <nl> ] <nl> } , <nl> <nl> " cell_type " : " code " , <nl> " execution_count " : 9 , <nl> " metadata " : { <nl> - " collapsed " : false <nl> + " collapsed " : true <nl> } , <nl> " outputs " : [ ] , <nl> " source " : [ <nl> + " # build char vocabluary from input \ n " , <nl> " vocab = build_vocab ( \ " . / obama . txt \ " ) " <nl> ] <nl> } , <nl> <nl> } , <nl> " outputs " : [ ] , <nl> " source " : [ <nl> - " # generate symbol \ n " , <nl> + " # generate symbol for a length \ n " , <nl> " def sym_gen ( seq_len ) : \ n " , <nl> " return lstm_unroll ( num_lstm_layer , seq_len , len ( vocab ) + 1 , \ n " , <nl> " num_hidden = num_hidden , num_embed = num_embed , \ n " , <nl> <nl> " cell_type " : " code " , <nl> " execution_count " : 11 , <nl> " metadata " : { <nl> - " collapsed " : false <nl> + " collapsed " : true <nl> } , <nl> " outputs " : [ ] , <nl> " source " : [ <nl> <nl> " Summary of dataset = = = = = = = = = = = = = = = = = = \ n " , <nl> " bucket of len 129 : 8290 samples \ n " <nl> ] <nl> - } , <nl> - { <nl> - " name " : " stderr " , <nl> - " output_type " : " stream " , <nl> - " text " : [ <nl> - " / home / bing / mxnet / example / rnn_new / bucket_io . py : 153 : VisibleDeprecationWarning : using a non - integer number instead of an integer will result in an error in the future \ n " , <nl> - " bucket_plan = np . hstack ( [ np . zeros ( n , int ) + i for i , n in enumerate ( bucket_n_batches ) ] ) \ n " <nl> - ] <nl> } <nl> ] , <nl> " source " : [ <nl> + " # we can build an iterator for text \ n " , <nl> " data_train = BucketSentenceIter ( \ " . / obama . txt \ " , vocab , buckets , batch_size , \ n " , <nl> " init_states , seperate_char = ' \ \ n ' , \ n " , <nl> " text2id = text2id , read_content = read_content ) " <nl> <nl> " cell_type " : " code " , <nl> " execution_count " : 13 , <nl> " metadata " : { <nl> - " collapsed " : true <nl> + " collapsed " : false <nl> } , <nl> " outputs " : [ ] , <nl> " source " : [ <nl> + " # the network symbol \ n " , <nl> " symbol = sym_gen ( buckets [ 0 ] ) " <nl> ] <nl> } , <nl> <nl> } , <nl> " outputs " : [ ] , <nl> " source " : [ <nl> + " # Train a LSTM network as simple as feedforward network \ n " , <nl> " model = mx . model . FeedForward ( ctx = devs , \ n " , <nl> " symbol = symbol , \ n " , <nl> " num_epoch = num_epoch , \ n " , <nl> <nl> } , <nl> { <nl> " cell_type " : " code " , <nl> - " execution_count " : 15 , <nl> + " execution_count " : null , <nl> " metadata " : { <nl> " collapsed " : false <nl> } , <nl> <nl> " name " : " stderr " , <nl> " output_type " : " stream " , <nl> " text " : [ <nl> - " 09 : 10 : 19 INFO : Start training with [ gpu ( 0 ) ] \ n " , <nl> - " 09 : 10 : 39 INFO : Epoch [ 0 ] Batch [ 50 ] \ tSpeed : 88 . 50 samples / sec \ tTrain - Perplexity = 31 . 854990 \ n " , <nl> - " 09 : 10 : 57 INFO : Epoch [ 0 ] Batch [ 100 ] \ tSpeed : 86 . 90 samples / sec \ tTrain - Perplexity = 27 . 432798 \ n " , <nl> - " 09 : 11 : 15 INFO : Epoch [ 0 ] Batch [ 150 ] \ tSpeed : 86 . 80 samples / sec \ tTrain - Perplexity = 25 . 817704 \ n " , <nl> - " 09 : 11 : 34 INFO : Epoch [ 0 ] Batch [ 200 ] \ tSpeed : 86 . 90 samples / sec \ tTrain - Perplexity = 24 . 971366 \ n " , <nl> - " 09 : 11 : 52 INFO : Epoch [ 0 ] Batch [ 250 ] \ tSpeed : 86 . 85 samples / sec \ tTrain - Perplexity = 24 . 455250 \ n " , <nl> - " 09 : 11 : 56 INFO : Epoch [ 0 ] Resetting Data Iterator \ n " , <nl> - " 09 : 11 : 56 INFO : Epoch [ 0 ] Train - Perplexity = 24 . 386388 \ n " , <nl> - " 09 : 11 : 56 INFO : Epoch [ 0 ] Time cost = 95 . 259 \ n " , <nl> - " 09 : 11 : 56 INFO : Saved checkpoint to \ " obama - 0001 . params \ " \ n " , <nl> - " 09 : 12 : 14 INFO : Epoch [ 1 ] Batch [ 50 ] \ tSpeed : 88 . 60 samples / sec \ tTrain - Perplexity = 22 . 404177 \ n " , <nl> - " 09 : 12 : 33 INFO : Epoch [ 1 ] Batch [ 100 ] \ tSpeed : 86 . 79 samples / sec \ tTrain - Perplexity = 22 . 363506 \ n " , <nl> - " 09 : 12 : 51 INFO : Epoch [ 1 ] Batch [ 150 ] \ tSpeed : 86 . 87 samples / sec \ tTrain - Perplexity = 22 . 321544 \ n " , <nl> - " 09 : 13 : 09 INFO : Epoch [ 1 ] Batch [ 200 ] \ tSpeed : 86 . 84 samples / sec \ tTrain - Perplexity = 22 . 280181 \ n " , <nl> - " 09 : 13 : 28 INFO : Epoch [ 1 ] Batch [ 250 ] \ tSpeed : 86 . 84 samples / sec \ tTrain - Perplexity = 22 . 096338 \ n " , <nl> - " 09 : 13 : 31 INFO : Epoch [ 1 ] Resetting Data Iterator \ n " , <nl> - " 09 : 13 : 31 INFO : Epoch [ 1 ] Train - Perplexity = 22 . 046661 \ n " , <nl> - " 09 : 13 : 31 INFO : Epoch [ 1 ] Time cost = 95 . 230 \ n " , <nl> - " 09 : 13 : 31 INFO : Saved checkpoint to \ " obama - 0002 . params \ " \ n " <nl> + " 05 : 01 : 35 INFO : Start training with [ gpu ( 0 ) ] \ n " <nl> ] <nl> } <nl> ] , <nl> " source " : [ <nl> + " # Fit it \ n " , <nl> " model . fit ( X = data_train , \ n " , <nl> " eval_metric = mx . metric . np ( Perplexity ) , \ n " , <nl> " batch_end_callback = mx . callback . Speedometer ( batch_size , 50 ) , \ n " , <nl> <nl> } , <nl> { <nl> " cell_type " : " code " , <nl> - " execution_count " : 16 , <nl> + " execution_count " : 15 , <nl> " metadata " : { <nl> " collapsed " : true <nl> } , <nl> <nl> } , <nl> { <nl> " cell_type " : " code " , <nl> - " execution_count " : 17 , <nl> + " execution_count " : 16 , <nl> " metadata " : { <nl> " collapsed " : true <nl> } , <nl> <nl> } , <nl> { <nl> " cell_type " : " code " , <nl> - " execution_count " : 18 , <nl> + " execution_count " : 17 , <nl> " metadata " : { <nl> " collapsed " : true <nl> } , <nl> <nl> " idx = bisect . bisect ( cdf_vals , x ) \ n " , <nl> " return population [ idx ] \ n " , <nl> " \ n " , <nl> + " # we can use random output or fixed output by choosing largest probability \ n " , <nl> " def MakeOutput ( prob , vocab , sample = False , temperature = 1 . ) : \ n " , <nl> " if sample = = False : \ n " , <nl> " idx = np . argmax ( prob , axis = 1 ) [ 0 ] \ n " , <nl> <nl> } , <nl> { <nl> " cell_type " : " code " , <nl> - " execution_count " : 19 , <nl> + " execution_count " : 18 , <nl> " metadata " : { <nl> - " collapsed " : false <nl> + " collapsed " : true <nl> } , <nl> " outputs " : [ ] , <nl> " source " : [ <nl> <nl> } , <nl> { <nl> " cell_type " : " code " , <nl> - " execution_count " : 20 , <nl> + " execution_count " : 19 , <nl> " metadata " : { <nl> - " collapsed " : false <nl> + " collapsed " : true <nl> } , <nl> " outputs " : [ ] , <nl> " source " : [ <nl> + " # build an inference model \ n " , <nl> " model = LSTMInferenceModel ( num_lstm_layer , len ( vocab ) + 1 , \ n " , <nl> " num_hidden = num_hidden , num_embed = num_embed , \ n " , <nl> - " num_label = len ( vocab ) + 1 , arg_params = arg_params , dropout = 0 . 2 ) " <nl> + " num_label = len ( vocab ) + 1 , arg_params = arg_params , ctx = mx . gpu ( ) , dropout = 0 . 2 ) " <nl> ] <nl> } , <nl> { <nl> " cell_type " : " code " , <nl> - " execution_count " : 21 , <nl> + " execution_count " : 20 , <nl> " metadata " : { <nl> - " collapsed " : false <nl> + " collapsed " : true <nl> } , <nl> " outputs " : [ ] , <nl> " source " : [ <nl> - " # generate a sequence \ n " , <nl> - " seq_length = 600 \ n " , <nl> + " # generate a sequence of 1200 chars \ n " , <nl> + " \ n " , <nl> + " seq_length = 1200 \ n " , <nl> " input_ndarray = mx . nd . zeros ( ( 1 , ) ) \ n " , <nl> " revert_vocab = MakeRevertVocab ( vocab ) \ n " , <nl> - " output = ' T ' \ n " , <nl> - " MakeInput ( output [ - 1 ] , vocab , input_ndarray ) \ n " , <nl> + " # Feel free to change the starter sentence \ n " , <nl> + " output = ' The joke ' \ n " , <nl> + " random_sample = True \ n " , <nl> + " new_sentence = True \ n " , <nl> + " \ n " , <nl> + " ignore_length = len ( output ) \ n " , <nl> + " \ n " , <nl> " for i in range ( seq_length ) : \ n " , <nl> - " prob = model . forward ( input_ndarray , i = = 0 ) \ n " , <nl> - " next_char = MakeOutput ( prob , revert_vocab , False ) \ n " , <nl> - " output + = next_char \ n " , <nl> - " MakeInput ( output [ - 1 ] , vocab , input_ndarray ) \ n " , <nl> + " if i < = ignore_length - 1 : \ n " , <nl> + " MakeInput ( output [ i ] , vocab , input_ndarray ) \ n " , <nl> + " else : \ n " , <nl> + " MakeInput ( output [ - 1 ] , vocab , input_ndarray ) \ n " , <nl> + " prob = model . forward ( input_ndarray , new_sentence ) \ n " , <nl> + " new_sentence = False \ n " , <nl> + " next_char = MakeOutput ( prob , revert_vocab , random_sample ) \ n " , <nl> + " if next_char = = ' ' : \ n " , <nl> + " new_sentence = True \ n " , <nl> + " if i > = ignore_length - 1 : \ n " , <nl> + " output + = next_char \ n " , <nl> " \ n " , <nl> " " <nl> ] <nl> } , <nl> { <nl> " cell_type " : " code " , <nl> - " execution_count " : 22 , <nl> + " execution_count " : 21 , <nl> " metadata " : { <nl> " collapsed " : false <nl> } , <nl> <nl> " name " : " stdout " , <nl> " output_type " : " stream " , <nl> " text " : [ <nl> - " The American people have been talking about how to see what we can afford - to give them the chance to start by the conversation that it was the moment when they come home . It ' s time to start by ally reduced to the oress of our hardiners of oure scandals and his debate about what we can do to change the world as the oned and the onection wo ha the hardineres of tich their school and communism and anounces in the ones and the oure shoression . I will be able to go to college . They say they are going to be a part of the oure as about th \ n " <nl> + " The joke learning to be struggle for our daughter . We are the ones who can ' t pay their relationship . The Judiciary Commencement ce designed to deficit to the party of almost unemployment instead , just to look at home , little proof for America , Carguin are showing struggle against our pride . That if you came from tharger by a party that would increase the pervasive sense of new global warming against the challenge of governments - to get a corporation . As a highealth care , your own retirement security information about his family decided to get a job or aspect what will allow cannot simply by sagging high school system and stin twenty - five years . But led my faith designed to leave all their buddets and responsibility . But I sund this dangerous weapons , explain withdrawal oful - clears axdication in Iraq . What is the time for American policy became their efforts , and given them that a man doesn ' t make sure that that my own , you ' ll be faced with you . Four years , reforms illness all that kind of choose to understand is a broadeary . You instills in search of a reducithis recision , of us , with public services from using that barealies , but that must continue to limb line , they know th \ n " <nl> ] <nl> } <nl> ] , <nl> " source " : [ <nl> + " # Let ' s see what we can learned from char in Obama ' s speech . \ n " , <nl> " print ( output ) " <nl> ] <nl> } , <nl> - { <nl> - " cell_type " : " code " , <nl> - " execution_count " : null , <nl> - " metadata " : { <nl> - " collapsed " : false <nl> - } , <nl> - " outputs " : [ ] , <nl> - " source " : [ ] <nl> - } , <nl> { <nl> " cell_type " : " code " , <nl> " execution_count " : null , <nl> <nl> ] , <nl> " metadata " : { <nl> " kernelspec " : { <nl> - " display_name " : " Python 3 " , <nl> + " display_name " : " Python 2 " , <nl> " language " : " python " , <nl> - " name " : " python3 " <nl> + " name " : " python2 " <nl> } , <nl> " language_info " : { <nl> " codemirror_mode " : { <nl> " name " : " ipython " , <nl> - " version " : 3 <nl> + " version " : 2 <nl> } , <nl> " file_extension " : " . py " , <nl> " mimetype " : " text / x - python " , <nl> " name " : " python " , <nl> " nbconvert_exporter " : " python " , <nl> - " pygments_lexer " : " ipython3 " , <nl> - " version " : " 3 . 4 . 3 " <nl> + " pygments_lexer " : " ipython2 " , <nl> + " version " : " 2 . 7 . 11 " <nl> } <nl> } , <nl> " nbformat " : 4 , <nl> new file mode 100644 <nl> index 00000000000 . . 26d08b262b2 <nl> mmm / dev / null <nl> ppp b / example / rnn / char_lstm . R <nl> <nl> + # Char LSTM Example . <nl> + <nl> + # This example aims to show how to use lstm to build a char level language model , and generate text from it . We use a tiny shakespeare text for demo purpose . <nl> + # Data can be found at https : / / github . com / dmlc / web - data / tree / master / mxnet / tinyshakespeare . <nl> + <nl> + # If running for the first time , download the data by running the following commands : sh get_ptb_data . sh <nl> + <nl> + require ( mxnet ) <nl> + source ( " lstm . R " ) <nl> + <nl> + # Set basic network parameters . <nl> + batch . size = 32 <nl> + seq . len = 32 <nl> + num . hidden = 256 <nl> + num . embed = 256 <nl> + num . lstm . layer = 2 <nl> + num . round = 21 <nl> + learning . rate = 0 . 01 <nl> + wd = 0 . 00001 <nl> + clip_gradient = 1 <nl> + update . period = 1 <nl> + <nl> + # Make dictionary from text <nl> + make . dict < - function ( text , max . vocab = 10000 ) { <nl> + text < - strsplit ( text , ' ' ) <nl> + dic < - list ( ) <nl> + idx < - 1 <nl> + for ( c in text [ [ 1 ] ] ) { <nl> + if ( ! ( c % in % names ( dic ) ) ) { <nl> + dic [ [ c ] ] < - idx <nl> + idx < - idx + 1 <nl> + } <nl> + } <nl> + if ( length ( dic ) = = max . vocab - 1 ) <nl> + dic [ [ " UNKNOWN " ] ] < - idx <nl> + cat ( paste0 ( " Total unique char : " , length ( dic ) , " \ n " ) ) <nl> + return ( dic ) <nl> + } <nl> + <nl> + # Transfer text into data batch <nl> + make . batch < - function ( file . path , batch . size = 32 , seq . lenth = 32 , max . vocab = 10000 , dic = NULL ) { <nl> + fi < - file ( file . path , " r " ) <nl> + text < - paste ( readLines ( fi ) , collapse = " \ n " ) <nl> + close ( fi ) <nl> + <nl> + if ( is . null ( dic ) ) <nl> + dic < - make . dict ( text , max . vocab ) <nl> + lookup . table < - list ( ) <nl> + for ( c in names ( dic ) ) { <nl> + idx < - dic [ [ c ] ] <nl> + lookup . table [ [ idx ] ] < - c <nl> + } <nl> + <nl> + char . lst < - strsplit ( text , ' ' ) [ [ 1 ] ] <nl> + num . batch < - as . integer ( length ( char . lst ) / batch . size ) <nl> + char . lst < - char . lst [ 1 : ( num . batch * batch . size ) ] <nl> + data < - array ( 0 , dim = c ( batch . size , num . batch ) ) <nl> + idx < - 1 <nl> + for ( j in 1 : batch . size ) { <nl> + for ( i in 1 : num . batch ) { <nl> + if ( char . lst [ idx ] % in % names ( dic ) ) <nl> + data [ j , i ] < - dic [ [ char . lst [ idx ] ] ] <nl> + else { <nl> + data [ j , i ] < - dic [ [ " UNKNOWN " ] ] <nl> + } <nl> + idx < - idx + 1 <nl> + } <nl> + } <nl> + return ( list ( data = data , dic = dic , lookup . table = lookup . table ) ) <nl> + } <nl> + <nl> + # Move tail text <nl> + drop . tail < - function ( X , seq . len ) { <nl> + shape < - dim ( X ) <nl> + nstep < - as . integer ( shape [ 2 ] / seq . len ) <nl> + return ( X [ , 1 : ( nstep * seq . len ) ] ) <nl> + } <nl> + <nl> + ret < - make . batch ( " . / data / input . txt " , batch . size = batch . size , seq . lenth = seq . len ) <nl> + X < - ret $ data <nl> + dic < - ret $ dic <nl> + lookup . table < - ret $ lookup . table <nl> + <nl> + vocab < - length ( dic ) <nl> + <nl> + shape < - dim ( X ) <nl> + train . val . fraction < - 0 . 9 <nl> + size < - shape [ 2 ] <nl> + X . train < - X [ , 1 : as . integer ( size * train . val . fraction ) ] <nl> + X . val < - X [ , - ( 1 : as . integer ( size * train . val . fraction ) ) ] <nl> + X . train < - drop . tail ( X . train , seq . len ) <nl> + X . val < - drop . tail ( X . val , seq . len ) <nl> + <nl> + # Set up LSTM model <nl> + model < - setup . rnn . model ( ctx = mx . gpu ( 0 ) , <nl> + num . lstm . layer = num . lstm . layer , <nl> + seq . len = seq . len , <nl> + num . hidden = num . hidden , <nl> + num . embed = num . embed , <nl> + num . label = vocab , <nl> + batch . size = batch . size , <nl> + input . size = vocab , <nl> + initializer = mx . init . uniform ( 0 . 1 ) , <nl> + dropout = 0 . ) <nl> + <nl> + # Train LSTM model <nl> + train . lstm ( model , X . train , X . val , <nl> + num . round = num . round , <nl> + half . life = 3 , <nl> + update . period = update . period , <nl> + learning . rate = learning . rate , <nl> + wd = wd , <nl> + clip_gradient = clip_gradient ) <nl> new file mode 100644 <nl> index 00000000000 . . 5caaf0213b9 <nl> mmm / dev / null <nl> ppp b / example / rnn / lstm . R <nl> <nl> + require ( mxnet ) <nl> + <nl> + # lstm cell symbol <nl> + lstm < - function ( num . hidden , indata , prev . state , param , seqidx , layeridx , dropout = 0 ) { <nl> + if ( dropout > 0 ) <nl> + indata < - mx . symbol . Dropout ( data = indata , p = dropout ) <nl> + i2h < - mx . symbol . FullyConnected ( data = indata , <nl> + weight = param $ i2h . weight , <nl> + bias = param $ i2h . bias , <nl> + num . hidden = num . hidden * 4 , <nl> + name = paste0 ( " t " , seqidx , " . l " , layeridx , " . i2h " ) ) <nl> + h2h < - mx . symbol . FullyConnected ( data = prev . state $ h , <nl> + weight = param $ h2h . weight , <nl> + bias = param $ h2h . bias , <nl> + num . hidden = num . hidden * 4 , <nl> + name = paste0 ( " t " , seqidx , " . l " , layeridx , " . h2h " ) ) <nl> + gates < - i2h + h2h <nl> + slice . gates < - mx . symbol . SliceChannel ( gates , num . outputs = 4 , <nl> + name = paste0 ( " t " , seqidx , " . l " , layeridx , " . slice " ) ) <nl> + <nl> + in . gate < - mx . symbol . Activation ( slice . gates [ [ 1 ] ] , act . type = " sigmoid " ) <nl> + in . transform < - mx . symbol . Activation ( slice . gates [ [ 2 ] ] , act . type = " tanh " ) <nl> + forget . gate < - mx . symbol . Activation ( slice . gates [ [ 3 ] ] , act . type = " sigmoid " ) <nl> + out . gate < - mx . symbol . Activation ( slice . gates [ [ 4 ] ] , act . type = " sigmoid " ) <nl> + next . c < - ( forget . gate * prev . state $ c ) + ( in . gate * in . transform ) <nl> + next . h < - out . gate * mx . symbol . Activation ( next . c , act . type = " tanh " ) <nl> + <nl> + return ( list ( c = next . c , h = next . h ) ) <nl> + } <nl> + <nl> + # unrolled lstm network <nl> + lstm . unroll < - function ( num . lstm . layer , seq . len , input . size , <nl> + num . hidden , num . embed , num . label , dropout = 0 . ) { <nl> + <nl> + embed . weight < - mx . symbol . Variable ( " embed . weight " ) <nl> + cls . weight < - mx . symbol . Variable ( " cls . weight " ) <nl> + cls . bias < - mx . symbol . Variable ( " cls . bias " ) <nl> + param . cells < - list ( ) <nl> + last . states < - list ( ) <nl> + for ( i in 1 : num . lstm . layer ) { <nl> + param . cells [ [ i ] ] < - list ( i2h . weight = mx . symbol . Variable ( paste0 ( " l " , i , " . i2h . weight " ) ) , <nl> + i2h . bias = mx . symbol . Variable ( paste0 ( " l " , i , " . i2h . bias " ) ) , <nl> + h2h . weight = mx . symbol . Variable ( paste0 ( " l " , i , " . h2h . weight " ) ) , <nl> + h2h . bias = mx . symbol . Variable ( paste0 ( " l " , i , " . h2h . bias " ) ) ) <nl> + state < - list ( c = mx . symbol . Variable ( paste0 ( " l " , i , " . init . c " ) ) , <nl> + h = mx . symbol . Variable ( paste0 ( " l " , i , " . init . h " ) ) ) <nl> + last . states [ [ i ] ] < - state <nl> + } <nl> + <nl> + last . hidden < - list ( ) <nl> + label < - mx . symbol . Variable ( " label " ) <nl> + for ( seqidx in 1 : seq . len ) { <nl> + # embeding layer <nl> + data < - mx . symbol . Variable ( paste0 ( " t " , seqidx , " . data " ) ) <nl> + <nl> + hidden < - mx . symbol . Embedding ( data = data , weight = embed . weight , <nl> + input . dim = input . size , <nl> + output . dim = num . embed , <nl> + name = paste0 ( " t " , seqidx , " . embed " ) ) <nl> + <nl> + # stack lstm <nl> + for ( i in 1 : num . lstm . layer ) { <nl> + if ( i = = 0 ) { <nl> + dp < - 0 <nl> + } <nl> + else { <nl> + dp < - dropout <nl> + } <nl> + next . state < - lstm ( num . hidden , indata = hidden , <nl> + prev . state = last . states [ [ i ] ] , <nl> + param = param . cells [ [ i ] ] , <nl> + seqidx = seqidx , layeridx = i , <nl> + dropout = dp ) <nl> + hidden < - next . state $ h <nl> + last . states [ [ i ] ] < - next . state <nl> + } <nl> + # decoder <nl> + if ( dropout > 0 ) <nl> + hidden < - mx . symbol . Dropout ( data = hidden , p = dropout ) <nl> + last . hidden < - c ( last . hidden , hidden ) <nl> + } <nl> + last . hidden $ dim < - 0 <nl> + last . hidden $ num . args < - seq . len <nl> + concat < - mxnet : : : mx . varg . symbol . Concat ( last . hidden ) <nl> + fc < - mx . symbol . FullyConnected ( data = concat , <nl> + weight = cls . weight , <nl> + bias = cls . bias , <nl> + num . hidden = num . label ) <nl> + loss . all < - mx . symbol . SoftmaxOutput ( data = fc , label = label , name = " sm " ) <nl> + unpack . c < - list ( ) <nl> + unpack . h < - list ( ) <nl> + for ( i in 1 : num . lstm . layer ) { <nl> + state < - last . states [ [ i ] ] <nl> + state < - list ( c = mx . symbol . BlockGrad ( state $ c , name = paste0 ( " l " , i , " . last . c " ) ) , <nl> + h = mx . symbol . BlockGrad ( state $ h , name = paste0 ( " l " , i , " . last . h " ) ) ) <nl> + last . states [ [ i ] ] < - state <nl> + unpack . c < - c ( unpack . c , state $ c ) <nl> + unpack . h < - c ( unpack . h , state $ h ) <nl> + } <nl> + list . all < - c ( loss . all , unpack . c , unpack . h ) <nl> + <nl> + return ( mx . symbol . Group ( list . all ) ) <nl> + } <nl> + <nl> + is . param . name < - function ( name ) { <nl> + return ( grepl ( ' weight $ ' , name ) | | grepl ( ' bias $ ' , name ) | | <nl> + grepl ( ' gamma $ ' , name ) | | grepl ( ' beta $ ' , name ) ) <nl> + } <nl> + <nl> + mx . model . init . params < - function ( symbol , input . shape , initializer , ctx ) { <nl> + if ( ! is . mx . symbol ( symbol ) ) stop ( " symbol need to be MXSymbol " ) <nl> + slist < - symbol $ infer . shape ( input . shape ) <nl> + if ( is . null ( slist ) ) stop ( " Not enough information to get shapes " ) <nl> + arg . params < - mx . init . create ( initializer , slist $ arg . shapes , ctx , skip . unknown = TRUE ) <nl> + aux . params < - mx . init . create ( initializer , slist $ aux . shapes , ctx , skip . unknown = FALSE ) <nl> + return ( list ( arg . params = arg . params , aux . params = aux . params ) ) <nl> + } <nl> + <nl> + # set up rnn model with lstm cells <nl> + setup . rnn . model < - function ( ctx , <nl> + num . lstm . layer , seq . len , <nl> + num . hidden , num . embed , num . label , <nl> + batch . size , input . size , <nl> + initializer = mx . init . uniform ( 0 . 01 ) , <nl> + dropout = 0 ) { <nl> + <nl> + rnn . sym < - lstm . unroll ( num . lstm . layer = num . lstm . layer , <nl> + num . hidden = num . hidden , <nl> + seq . len = seq . len , <nl> + input . size = input . size , <nl> + num . embed = num . embed , <nl> + num . label = num . label , <nl> + dropout = dropout ) <nl> + arg . names < - rnn . sym $ arguments <nl> + input . shapes < - list ( ) <nl> + for ( name in arg . names ) { <nl> + if ( grepl ( ' init . c $ ' , name ) | | grepl ( ' init . h $ ' , name ) ) { <nl> + input . shapes [ [ name ] ] < - c ( num . hidden , batch . size ) <nl> + } <nl> + else if ( grepl ( ' data $ ' , name ) ) { <nl> + input . shapes [ [ name ] ] < - c ( batch . size ) <nl> + } <nl> + } <nl> + <nl> + params < - mx . model . init . params ( rnn . sym , input . shapes , initializer , ctx ) <nl> + <nl> + args < - input . shapes <nl> + args $ symbol < - rnn . sym <nl> + args $ ctx < - ctx <nl> + args $ grad . req < - " add " <nl> + rnn . exec < - do . call ( mx . simple . bind , args ) <nl> + <nl> + mx . exec . update . arg . arrays ( rnn . exec , params $ arg . params , match . name = TRUE ) <nl> + mx . exec . update . aux . arrays ( rnn . exec , params $ aux . params , match . name = TRUE ) <nl> + <nl> + grad . arrays < - list ( ) <nl> + for ( name in names ( rnn . exec $ ref . grad . arrays ) ) { <nl> + if ( is . param . name ( name ) ) <nl> + grad . arrays [ [ name ] ] < - rnn . exec $ ref . arg . arrays [ [ name ] ] * 0 <nl> + } <nl> + mx . exec . update . grad . arrays ( rnn . exec , grad . arrays , match . name = TRUE ) <nl> + <nl> + return ( list ( rnn . exec = rnn . exec , symbol = rnn . sym , <nl> + num . lstm . layer = num . lstm . layer , num . hidden = num . hidden , <nl> + seq . len = seq . len , batch . size = batch . size , <nl> + num . embed = num . embed ) ) <nl> + <nl> + } <nl> + <nl> + <nl> + get . rnn . inputs < - function ( m , X , begin ) { <nl> + seq . len < - m $ seq . len <nl> + batch . size < - m $ batch . size <nl> + seq . labels < - array ( 0 , dim = c ( seq . len * batch . size ) ) <nl> + seq . data < - list ( ) <nl> + for ( seqidx in 1 : seq . len ) { <nl> + idx < - ( begin + seqidx - 1 ) % % dim ( X ) [ 2 ] + 1 <nl> + next . idx < - ( begin + seqidx ) % % dim ( X ) [ 2 ] + 1 <nl> + x < - X [ , idx ] <nl> + y < - X [ , next . idx ] <nl> + <nl> + seq . data [ [ paste0 ( " t " , seqidx , " . data " ) ] ] < - mx . nd . array ( as . array ( x ) ) <nl> + seq . labels [ ( ( seqidx - 1 ) * batch . size + 1 ) : ( seqidx * batch . size ) ] < - y <nl> + } <nl> + seq . data $ label < - mx . nd . array ( seq . labels ) <nl> + return ( seq . data ) <nl> + } <nl> + <nl> + <nl> + calc . nll < - function ( seq . label . probs , X , begin ) { <nl> + nll = - sum ( log ( seq . label . probs ) ) / length ( X [ , 1 ] ) <nl> + return ( nll ) <nl> + } <nl> + <nl> + train . lstm < - function ( model , X . train . batch , X . val . batch , <nl> + num . round , update . period , <nl> + optimizer = ' sgd ' , half . life = 2 , max . grad . norm = 5 . 0 , . . . ) { <nl> + X . train . batch . shape < - dim ( X . train . batch ) <nl> + X . val . batch . shape < - dim ( X . val . batch ) <nl> + cat ( paste0 ( " Training with train . shape = ( " , paste0 ( X . train . batch . shape , collapse = " , " ) , " ) " ) , " \ n " ) <nl> + cat ( paste0 ( " Training with val . shape = ( " , paste0 ( X . val . batch . shape , collapse = " , " ) , " ) " ) , " \ n " ) <nl> + <nl> + m < - model <nl> + seq . len < - m $ seq . len <nl> + batch . size < - m $ batch . size <nl> + num . lstm . layer < - m $ num . lstm . layer <nl> + num . hidden < - m $ num . hidden <nl> + <nl> + opt < - mx . opt . create ( optimizer , rescale . grad = ( 1 / batch . size ) , . . . ) <nl> + <nl> + updater < - mx . opt . get . updater ( opt , m $ rnn . exec $ ref . arg . arrays ) <nl> + epoch . counter < - 0 <nl> + log . period < - max ( as . integer ( 1000 / seq . len ) , 1 ) <nl> + last . perp < - 10000000 . 0 <nl> + <nl> + for ( iteration in 1 : num . round ) { <nl> + nbatch < - 0 <nl> + train . nll < - 0 <nl> + # reset states <nl> + init . states < - list ( ) <nl> + for ( i in 1 : num . lstm . layer ) { <nl> + init . states [ [ paste0 ( " l " , i , " . init . c " ) ] ] < - mx . nd . zeros ( c ( num . hidden , batch . size ) ) <nl> + init . states [ [ paste0 ( " l " , i , " . init . h " ) ] ] < - mx . nd . zeros ( c ( num . hidden , batch . size ) ) <nl> + } <nl> + mx . exec . update . arg . arrays ( m $ rnn . exec , init . states , match . name = TRUE ) <nl> + <nl> + tic < - Sys . time ( ) <nl> + <nl> + stopifnot ( dim ( X . train . batch ) [ [ 2 ] ] % % seq . len = = 0 ) <nl> + stopifnot ( dim ( X . val . batch ) [ [ 2 ] ] % % seq . len = = 0 ) <nl> + <nl> + for ( begin in seq ( 1 , dim ( X . train . batch ) [ 2 ] , seq . len ) ) { <nl> + # set rnn input <nl> + rnn . input < - get . rnn . inputs ( m , X . train . batch , begin = begin ) <nl> + mx . exec . update . arg . arrays ( m $ rnn . exec , rnn . input , match . name = TRUE ) <nl> + <nl> + mx . exec . forward ( m $ rnn . exec , is . train = TRUE ) <nl> + # probability of each label class , used to evaluate nll <nl> + seq . label . probs < - mx . nd . choose . element . 0index ( m $ rnn . exec $ outputs [ [ " sm_output " ] ] , m $ rnn . exec $ arg . arrays [ [ " label " ] ] ) <nl> + mx . exec . backward ( m $ rnn . exec ) <nl> + # transfer the states <nl> + init . states < - list ( ) <nl> + for ( i in 1 : num . lstm . layer ) { <nl> + init . states [ [ paste0 ( " l " , i , " . init . c " ) ] ] < - m $ rnn . exec $ outputs [ [ paste0 ( " l " , i , " . last . c_output " ) ] ] <nl> + init . states [ [ paste0 ( " l " , i , " . init . h " ) ] ] < - m $ rnn . exec $ outputs [ [ paste0 ( " l " , i , " . last . h_output " ) ] ] <nl> + } <nl> + mx . exec . update . arg . arrays ( m $ rnn . exec , init . states , match . name = TRUE ) <nl> + # update epoch counter <nl> + epoch . counter < - epoch . counter + 1 <nl> + if ( epoch . counter % % update . period = = 0 ) { <nl> + <nl> + # the gradient of initial c and inital h should be zero <nl> + init . grad < - list ( ) <nl> + for ( i in 1 : num . lstm . layer ) { <nl> + init . grad [ [ paste0 ( " l " , i , " . init . c " ) ] ] < - m $ rnn . exec $ ref . arg . arrays [ [ paste0 ( " l " , i , " . init . c " ) ] ] * 0 <nl> + init . grad [ [ paste0 ( " l " , i , " . init . h " ) ] ] < - m $ rnn . exec $ ref . arg . arrays [ [ paste0 ( " l " , i , " . init . h " ) ] ] * 0 <nl> + } <nl> + mx . exec . update . grad . arrays ( m $ rnn . exec , init . grad , match . name = TRUE ) <nl> + <nl> + arg . blocks < - updater ( m $ rnn . exec $ ref . arg . arrays , m $ rnn . exec $ ref . grad . arrays ) <nl> + <nl> + mx . exec . update . arg . arrays ( m $ rnn . exec , arg . blocks , skip . null = TRUE ) <nl> + <nl> + grad . arrays < - list ( ) <nl> + for ( name in names ( m $ rnn . exec $ ref . grad . arrays ) ) { <nl> + if ( is . param . name ( name ) ) <nl> + grad . arrays [ [ name ] ] < - m $ rnn . exec $ ref . grad . arrays [ [ name ] ] * 0 <nl> + } <nl> + mx . exec . update . grad . arrays ( m $ rnn . exec , grad . arrays , match . name = TRUE ) <nl> + <nl> + } <nl> + <nl> + train . nll < - train . nll + calc . nll ( as . array ( seq . label . probs ) , X . train . batch , begin = begin ) <nl> + <nl> + nbatch < - begin + seq . len <nl> + if ( ( epoch . counter % % log . period ) = = 0 ) { <nl> + cat ( paste0 ( " Epoch [ " , epoch . counter , <nl> + " ] Train : NLL = " , train . nll / nbatch , <nl> + " , Perp = " , exp ( train . nll / nbatch ) , " \ n " ) ) <nl> + } <nl> + } <nl> + # end of training loop <nl> + toc < - Sys . time ( ) <nl> + cat ( paste0 ( " Iter [ " , iteration , <nl> + " ] Train : Time : " , as . numeric ( toc - tic , units = " secs " ) , <nl> + " sec , NLL = " , train . nll / nbatch , <nl> + " , Perp = " , exp ( train . nll / nbatch ) , " \ n " ) ) <nl> + <nl> + val . nll < - 0 . 0 <nl> + # validation set , reset states <nl> + init . states < - list ( ) <nl> + for ( i in 1 : num . lstm . layer ) { <nl> + init . states [ [ paste0 ( " l " , i , " . init . c " ) ] ] < - mx . nd . zeros ( c ( num . hidden , batch . size ) ) <nl> + init . states [ [ paste0 ( " l " , i , " . init . h " ) ] ] < - mx . nd . zeros ( c ( num . hidden , batch . size ) ) <nl> + } <nl> + mx . exec . update . arg . arrays ( m $ rnn . exec , init . states , match . name = TRUE ) <nl> + <nl> + for ( begin in seq ( 1 , dim ( X . val . batch ) [ 2 ] , seq . len ) ) { <nl> + # set rnn input <nl> + rnn . input < - get . rnn . inputs ( m , X . val . batch , begin = begin ) <nl> + mx . exec . update . arg . arrays ( m $ rnn . exec , rnn . input , match . name = TRUE ) <nl> + mx . exec . forward ( m $ rnn . exec , is . train = FALSE ) <nl> + # probability of each label class , used to evaluate nll <nl> + seq . label . probs < - mx . nd . choose . element . 0index ( m $ rnn . exec $ outputs [ [ " sm_output " ] ] , m $ rnn . exec $ arg . arrays [ [ " label " ] ] ) <nl> + # transfer the states <nl> + init . states < - list ( ) <nl> + for ( i in 1 : num . lstm . layer ) { <nl> + init . states [ [ paste0 ( " l " , i , " . init . c " ) ] ] < - m $ rnn . exec $ outputs [ [ paste0 ( " l " , i , " . last . c_output " ) ] ] <nl> + init . states [ [ paste0 ( " l " , i , " . init . h " ) ] ] < - m $ rnn . exec $ outputs [ [ paste0 ( " l " , i , " . last . h_output " ) ] ] <nl> + } <nl> + mx . exec . update . arg . arrays ( m $ rnn . exec , init . states , match . name = TRUE ) <nl> + val . nll < - val . nll + calc . nll ( as . array ( seq . label . probs ) , X . val . batch , begin = begin ) <nl> + } <nl> + nbatch < - dim ( X . val . batch ) [ 2 ] <nl> + perp < - exp ( val . nll / nbatch ) <nl> + cat ( paste0 ( " Iter [ " , iteration , <nl> + " ] Val : NLL = " , val . nll / nbatch , <nl> + " , Perp = " , exp ( val . nll / nbatch ) , " \ n " ) ) <nl> + <nl> + <nl> + } <nl> + } <nl> \ No newline at end of file <nl> mmm a / example / rnn / lstm . py <nl> ppp b / example / rnn / lstm . py <nl> def lstm_unroll ( num_lstm_layer , seq_len , input_size , <nl> last_states . append ( state ) <nl> assert ( len ( last_states ) = = num_lstm_layer ) <nl> <nl> - loss_all = [ ] <nl> + # embeding layer <nl> + data = mx . sym . Variable ( ' data ' ) <nl> + label = mx . sym . Variable ( ' softmax_label ' ) <nl> + embed = mx . sym . Embedding ( data = data , input_dim = input_size , <nl> + weight = embed_weight , output_dim = num_embed , name = ' embed ' ) <nl> + wordvec = mx . sym . SliceChannel ( data = embed , num_outputs = seq_len , squeeze_axis = 1 ) <nl> + <nl> + hidden_all = [ ] <nl> for seqidx in range ( seq_len ) : <nl> - # embeding layer <nl> - data = mx . sym . Variable ( " data / % d " % seqidx ) <nl> + hidden = wordvec [ seqidx ] <nl> <nl> - hidden = mx . sym . Embedding ( data = data , weight = embed_weight , <nl> - input_dim = input_size , <nl> - output_dim = num_embed , <nl> - name = " t % d_embed " % seqidx ) <nl> # stack LSTM <nl> for i in range ( num_lstm_layer ) : <nl> if i = = 0 : <nl> def lstm_unroll ( num_lstm_layer , seq_len , input_size , <nl> # decoder <nl> if dropout > 0 . : <nl> hidden = mx . sym . Dropout ( data = hidden , p = dropout ) <nl> - fc = mx . sym . FullyConnected ( data = hidden , weight = cls_weight , bias = cls_bias , <nl> - num_hidden = num_label ) <nl> - sm = mx . sym . SoftmaxOutput ( data = fc , label = mx . sym . Variable ( ' label / % d ' % seqidx ) , <nl> - name = ' t % d_sm ' % seqidx ) <nl> - loss_all . append ( sm ) <nl> + hidden_all . append ( hidden ) <nl> + <nl> + hidden_concat = mx . sym . Concat ( * hidden_all , dim = 0 ) <nl> + pred = mx . sym . FullyConnected ( data = hidden_concat , num_hidden = num_label , <nl> + weight = cls_weight , bias = cls_bias , name = ' pred ' ) <nl> + <nl> + # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # <nl> + # Make label the same shape as our produced data path <nl> + # I did not observe big speed difference between the following two ways <nl> + <nl> + label = mx . sym . transpose ( data = label ) <nl> + label = mx . sym . Reshape ( data = label , target_shape = ( 0 , ) ) <nl> <nl> - return mx . sym . Group ( loss_all ) <nl> + # label_slice = mx . sym . SliceChannel ( data = label , num_outputs = seq_len ) <nl> + # label = [ label_slice [ t ] for t in range ( seq_len ) ] <nl> + # label = mx . sym . Concat ( * label , dim = 0 ) <nl> + # label = mx . sym . Reshape ( data = label , target_shape = ( 0 , ) ) <nl> + # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # <nl> <nl> + sm = mx . sym . SoftmaxOutput ( data = pred , label = label , name = ' softmax ' ) <nl> + <nl> + return sm <nl> <nl> def lstm_inference_symbol ( num_lstm_layer , input_size , <nl> num_hidden , num_embed , num_label , dropout = 0 . ) : <nl> def lstm_inference_symbol ( num_lstm_layer , input_size , <nl> h = mx . sym . Variable ( " l % d_init_h " % i ) ) <nl> last_states . append ( state ) <nl> assert ( len ( last_states ) = = num_lstm_layer ) <nl> - data = mx . sym . Variable ( " data / % d " % seqidx ) <nl> + data = mx . sym . Variable ( " data " ) <nl> <nl> - hidden = mx . sym . Embedding ( data = data , weight = embed_weight , <nl> + hidden = mx . sym . Embedding ( data = data , <nl> input_dim = input_size , <nl> output_dim = num_embed , <nl> - name = " t % d_embed " % seqidx ) <nl> + weight = embed_weight , <nl> + name = " embed " ) <nl> # stack LSTM <nl> for i in range ( num_lstm_layer ) : <nl> if i = = 0 : <nl> def lstm_inference_symbol ( num_lstm_layer , input_size , <nl> # decoder <nl> if dropout > 0 . : <nl> hidden = mx . sym . Dropout ( data = hidden , p = dropout ) <nl> - fc = mx . sym . FullyConnected ( data = hidden , weight = cls_weight , bias = cls_bias , <nl> - num_hidden = num_label ) <nl> - sm = mx . sym . SoftmaxOutput ( data = fc , label = mx . sym . Variable ( ' label / % d ' % seqidx ) , <nl> - name = ' t % d_sm ' % seqidx ) <nl> + fc = mx . sym . FullyConnected ( data = hidden , num_hidden = num_label , <nl> + weight = cls_weight , bias = cls_bias , name = ' pred ' ) <nl> + sm = mx . sym . SoftmaxOutput ( data = fc , name = ' softmax ' ) <nl> output = [ sm ] <nl> for state in last_states : <nl> output . append ( state . c ) <nl> output . append ( state . h ) <nl> return mx . sym . Group ( output ) <nl> - <nl> - <nl> mmm a / example / rnn / lstm_bucketing . py <nl> ppp b / example / rnn / lstm_bucketing . py <nl> <nl> import mxnet as mx <nl> <nl> from lstm import lstm_unroll <nl> - from bucket_io import BucketSentenceIter , build_vocab <nl> + from bucket_io import BucketSentenceIter , default_build_vocab <nl> <nl> def Perplexity ( label , pred ) : <nl> + label = label . T . reshape ( ( - 1 , ) ) <nl> loss = 0 . <nl> for i in range ( pred . shape [ 0 ] ) : <nl> loss + = - np . log ( max ( 1e - 10 , pred [ i ] [ int ( label [ i ] ) ] ) ) <nl> def Perplexity ( label , pred ) : <nl> <nl> if __name__ = = ' __main__ ' : <nl> batch_size = 32 <nl> - buckets = [ 10 , 20 , 30 , 40 , 50 , 60 ] <nl> + # buckets = [ 10 , 20 , 30 , 40 , 50 , 60 ] <nl> # buckets = [ 32 ] <nl> + buckets = [ ] <nl> num_hidden = 200 <nl> num_embed = 200 <nl> num_lstm_layer = 2 <nl> def Perplexity ( label , pred ) : <nl> <nl> contexts = [ mx . context . gpu ( i ) for i in range ( 1 ) ] <nl> <nl> - vocab = build_vocab ( " . / data / ptb . train . txt " ) <nl> + vocab = default_build_vocab ( " . / data / ptb . train . txt " ) <nl> <nl> def sym_gen ( seq_len ) : <nl> return lstm_unroll ( num_lstm_layer , seq_len , len ( vocab ) , <nl> mmm a / example / rnn / rnn_model . py <nl> ppp b / example / rnn / rnn_model . py <nl> def __init__ ( self , <nl> batch_size = 1 <nl> init_c = [ ( ' l % d_init_c ' % l , ( batch_size , num_hidden ) ) for l in range ( num_lstm_layer ) ] <nl> init_h = [ ( ' l % d_init_h ' % l , ( batch_size , num_hidden ) ) for l in range ( num_lstm_layer ) ] <nl> - data_shape = [ ( " data / 0 " , ( batch_size , ) ) ] <nl> + data_shape = [ ( " data " , ( batch_size , ) ) ] <nl> <nl> input_shapes = dict ( init_c + init_h + data_shape ) <nl> self . executor = self . sym . simple_bind ( ctx = mx . cpu ( ) , * * input_shapes ) <nl> def forward ( self , input_data , new_seq = False ) : <nl> if new_seq = = True : <nl> for key in self . states_dict . keys ( ) : <nl> self . executor . arg_dict [ key ] [ : ] = 0 . <nl> - input_data . copyto ( self . executor . arg_dict [ " data / 0 " ] ) <nl> + input_data . copyto ( self . executor . arg_dict [ " data " ] ) <nl> self . executor . forward ( ) <nl> for key in self . states_dict . keys ( ) : <nl> self . states_dict [ key ] . copyto ( self . executor . arg_dict [ key ] ) <nl> prob = self . executor . outputs [ 0 ] . asnumpy ( ) <nl> return prob <nl> - <nl> - <nl> - <nl> - <nl> mmm a / include / mxnet / c_api . h <nl> ppp b / include / mxnet / c_api . h <nl> MXNET_DLL int MXDataIterGetPadNum ( DataIterHandle handle , <nl> MXNET_DLL int MXDataIterGetLabel ( DataIterHandle handle , <nl> NDArrayHandle * out ) ; <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl> - / / Part 5 : basic KVStore interface <nl> + / / Part 6 : basic KVStore interface <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl> + / * ! <nl> + * \ brief Initialized ps - lite environment variables <nl> + * \ param num_vars number of variables to initialize <nl> + * \ param keys environment keys <nl> + * \ param vals environment values <nl> + * / <nl> + MXNET_DLL int MXInitPSEnv ( mx_uint num_vars , <nl> + const char * * keys , <nl> + const char * * vals ) ; <nl> / * ! <nl> * \ brief Create a kvstore <nl> * \ param type the type of KVStore <nl> MXNET_DLL int MXKVStoreBarrier ( KVStoreHandle handle ) ; <nl> * \ brief the prototype of a server controller <nl> * \ param head the head of the command <nl> * \ param body the body of the command <nl> + * \ param controller_handle helper handle for implementing controller <nl> * / <nl> typedef void ( MXKVStoreServerController ) ( int head , <nl> - const char * body ) ; <nl> + const char * body , <nl> + void * controller_handle ) ; <nl> <nl> / * * <nl> * \ return Run as server ( or scheduler ) <nl> * <nl> * \ param handle handle to the KVStore <nl> * \ param controller the user - defined server controller <nl> + * \ param controller_handle helper handle for implementing controller <nl> * \ return 0 when success , - 1 when failure happens <nl> * / <nl> MXNET_DLL int MXKVStoreRunServer ( KVStoreHandle handle , <nl> - MXKVStoreServerController controller ) ; <nl> + MXKVStoreServerController controller , <nl> + void * controller_handle ) ; <nl> <nl> / * * <nl> * \ return Send a command to all server nodes <nl> mmm a / include / mxnet / kvstore . h <nl> ppp b / include / mxnet / kvstore . h <nl> <nl> # define MXNET_KVSTORE_H_ <nl> # include < dmlc / io . h > <nl> # include < vector > <nl> + # include < unordered_map > <nl> # include < string > <nl> # include < functional > <nl> # include " . / ndarray . h " <nl> + # if MXNET_USE_DIST_KVSTORE <nl> + # include " ps / ps . h " <nl> + # endif / / MXNET_USE_DIST_KVSTORE <nl> <nl> namespace mxnet { <nl> / * ! <nl> class KVStore { <nl> * the following are used for multi - machines . <nl> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * / <nl> <nl> + / * * <nl> + * \ brief initalize ps - lite environment variables <nl> + * \ param envs key - value environment variables <nl> + * / <nl> + static void InitPSEnv ( const std : : unordered_map < std : : string , std : : string > & envs ) { <nl> + # if MXNET_USE_DIST_KVSTORE <nl> + ps : : Environment : : Init ( envs ) ; <nl> + # else <nl> + LOG ( FATAL ) < < " compile with USE_DIST_KVSTORE = 1 to init parameter server ' s environment " ; <nl> + # endif / / MXNET_USE_DIST_KVSTORE <nl> + } <nl> + <nl> / * * <nl> * \ return whether or not this process is a worker node . <nl> * <nl> * Always returns true when type = = " local " <nl> * / <nl> static bool IsWorkerNode ( ) { <nl> - char * role_str = getenv ( " DMLC_ROLE " ) ; <nl> + # if MXNET_USE_DIST_KVSTORE <nl> + const char * role_str = ps : : Environment : : Get ( ) - > find ( " DMLC_ROLE " ) ; <nl> return ( role_str = = nullptr ) | | ( ! strcmp ( role_str , " worker " ) ) ; <nl> + # else <nl> + return true ; <nl> + # endif / / MXNET_USE_DIST_KVSTORE <nl> } <nl> <nl> / * * <nl> class KVStore { <nl> * Always returns false when type = = " local " <nl> * / <nl> static bool IsServerNode ( ) { <nl> - char * role_str = getenv ( " DMLC_ROLE " ) ; <nl> + # if MXNET_USE_DIST_KVSTORE <nl> + const char * role_str = ps : : Environment : : Get ( ) - > find ( " DMLC_ROLE " ) ; <nl> return ( role_str ! = nullptr ) & & ( ! strcmp ( role_str , " server " ) ) ; <nl> + # else <nl> + return false ; <nl> + # endif / / MXNET_USE_DIST_KVSTORE <nl> } <nl> <nl> <nl> class KVStore { <nl> * Always returns false when type = = " local " <nl> * / <nl> static bool IsSchedulerNode ( ) { <nl> - char * role_str = getenv ( " DMLC_ROLE " ) ; <nl> + # if MXNET_USE_DIST_KVSTORE <nl> + const char * role_str = ps : : Environment : : Get ( ) - > find ( " DMLC_ROLE " ) ; <nl> return ( role_str ! = nullptr ) & & ( ! strcmp ( role_str , " scheduler " ) ) ; <nl> + # else <nl> + return false ; <nl> + # endif / / MXNET_USE_DIST_KVSTORE <nl> } <nl> <nl> / * ! <nl> mmm a / include / mxnet / mxrtc . h <nl> ppp b / include / mxnet / mxrtc . h <nl> <nl> # include < unordered_map > <nl> # include " . / ndarray . h " <nl> <nl> - <nl> - <nl> namespace mxnet { <nl> <nl> / * ! <nl> class MXRtc { <nl> public : <nl> / * ! <nl> * \ brief Build a new kernel . <nl> - * <nl> + * <nl> * If the same kernel has been compiled before it will be load from <nl> * cache instead of compile again . <nl> * \ param name name of the kernel function . <nl> mmm a / include / mxnet / operator . h <nl> ppp b / include / mxnet / operator . h <nl> struct OperatorPropertyReg <nl> std : : string key_var_num_args ; <nl> } ; <nl> <nl> - / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl> + / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm <nl> / / The following part are API Registration of Operators <nl> - / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl> + / / See also MXNET_REGISTER_SIMPLE_OP in operator_util . h for registering simple ops . <nl> + / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm <nl> / * ! <nl> * \ brief Macro to register OperatorProperty <nl> * <nl> new file mode 100644 <nl> index 00000000000 . . 000e3665a3a <nl> mmm / dev / null <nl> ppp b / include / mxnet / operator_util . h <nl> <nl> + / * ! <nl> + * Copyright ( c ) 2015 by Contributors <nl> + * \ file operator_util . h <nl> + * \ brief Utility functions and registries to help quickly build new operators . <nl> + * <nl> + * Use the register functions in this file when possible to simplify operator creations . <nl> + * Operators registred in this file will be exposed to both NDArray API and symbolic API . <nl> + * <nl> + * \ author Tianqi Chen <nl> + * / <nl> + # ifndef MXNET_OPERATOR_UTIL_H_ <nl> + # define MXNET_OPERATOR_UTIL_H_ <nl> + <nl> + # include < dmlc / registry . h > <nl> + # include < dmlc / parameter . h > <nl> + # include < map > <nl> + # include < vector > <nl> + # include < string > <nl> + # include < utility > <nl> + # include " . / base . h " <nl> + # include " . / operator . h " <nl> + <nl> + # if DMLC_USE_CXX11 <nl> + # include < functional > <nl> + # endif <nl> + <nl> + namespace mxnet { <nl> + / * ! \ brief namespace of arguments * / <nl> + namespace op { <nl> + / * ! \ brief super class of all gradient function argument * / <nl> + struct GradFunctionArgument { <nl> + / * ! \ brief The real data * / <nl> + TBlob data ; <nl> + } ; <nl> + <nl> + / * ! \ brief First input to the function * / <nl> + struct Input0 : GradFunctionArgument { } ; <nl> + / * ! \ brief Second input to the function * / <nl> + struct Input1 : GradFunctionArgument { } ; <nl> + <nl> + / * ! \ brief Ouput value of the function to the function * / <nl> + struct OutputValue : GradFunctionArgument { } ; <nl> + / * ! \ brief Gradient of output value * / <nl> + struct OutputGrad : GradFunctionArgument { } ; <nl> + <nl> + / * ! <nl> + * \ brief Environment arguments that is used by the function . <nl> + * These can be things like scalar arguments when add a value with scalar . <nl> + * / <nl> + struct EnvArguments { <nl> + / * ! \ brief scalar argument , if enabled * / <nl> + real_t scalar ; <nl> + / * ! \ brief keyword arguments * / <nl> + std : : vector < std : : pair < std : : string , std : : string > > kwargs ; <nl> + } ; <nl> + <nl> + / * ! <nl> + * \ brief Unary function that takes a src and save result to ret . <nl> + * The result container is pre - allocated with the correct shape . <nl> + * \ param src The source data . <nl> + * \ param env The Environment arguments . <nl> + * \ param ret The containter to store return value . <nl> + * \ param req The requirement to stroe the ret . <nl> + * \ param ctx Runtime context to execute the function . <nl> + * / <nl> + typedef void ( * UnaryFunction ) ( const TBlob & src , <nl> + const EnvArguments & env , <nl> + TBlob * ret , <nl> + OpReqType req , <nl> + RunContext ctx ) ; <nl> + / * ! <nl> + * \ brief Shape inference function to get the correct shape given source . <nl> + * \ param src The source shape <nl> + * \ param env The Environment arguments . <nl> + * \ return The inferred result shape . <nl> + * / <nl> + typedef TShape ( * UnaryShapeFunction ) ( const TShape & src , <nl> + const EnvArguments & env ) ; <nl> + <nl> + / * ! <nl> + * \ brief Gradient function that takes output value of function and computes gradient wrt to input . <nl> + * \ param out_grad the gradient wrt to output of the function . <nl> + * \ param env The Environment arguments . <nl> + * \ param in_grad The container to store result input gradient . <nl> + * \ param req The requirement to store the ret value . <nl> + * \ param ctx Runtime context to execute the function . <nl> + * / <nl> + typedef void ( * UnaryGradFunctionT0 ) ( const OutputGrad & out_grad , <nl> + const EnvArguments & env , <nl> + TBlob * in_grad , <nl> + OpReqType req , <nl> + RunContext ctx ) ; <nl> + / * ! <nl> + * \ brief Gradient function that takes output value of function and computes gradient wrt to input . <nl> + * \ param out_grad the gradient wrt to output of the function . <nl> + * \ param out_value the value of the function . <nl> + * \ param env The Environment arguments . <nl> + * \ param in_grad The container to store result input gradient . <nl> + * \ param req The requirement to store the ret value . <nl> + * \ param ctx Runtime context to execute the function . <nl> + * / <nl> + typedef void ( * UnaryGradFunctionT1 ) ( const OutputGrad & out_grad , <nl> + const OutputValue & out_value , <nl> + const EnvArguments & env , <nl> + TBlob * in_grad , <nl> + OpReqType req , <nl> + RunContext ctx ) ; <nl> + / * ! <nl> + * \ brief Gradient function that takes input value of function and computes gradient wrt to input . <nl> + * \ param out_grad the gradient wrt to output of the function . <nl> + * \ param in_data0 the input value of the function . <nl> + * \ param env The Environment arguments . <nl> + * \ param in_grad The container to store result input gradient . <nl> + * \ param req The requirement to store the ret value . <nl> + * \ param ctx Runtime context to execute the function . <nl> + * / <nl> + typedef void ( * UnaryGradFunctionT2 ) ( const OutputGrad & out_grad , <nl> + const Input0 & in_data0 , <nl> + const EnvArguments & env , <nl> + TBlob * in_grad , <nl> + OpReqType req , <nl> + RunContext ctx ) ; <nl> + / * ! <nl> + * \ brief Binary function that takes lhs , rhs and save result to ret . <nl> + * The result container is pre - allocated with the correct shape . <nl> + * \ param lhs The left operand <nl> + * \ param rhs The right operand <nl> + * \ param env The Environment arguments . <nl> + * \ param ret The containter to store return value . <nl> + * \ param req The requirement to stroe the ret . <nl> + * \ param ctx Runtime context to execute the function . <nl> + * / <nl> + typedef void ( * BinaryFunction ) ( const TBlob & lhs , <nl> + const TBlob & rhs , <nl> + const EnvArguments & env , <nl> + TBlob * ret , <nl> + OpReqType req , <nl> + RunContext ctx ) ; <nl> + <nl> + / * ! <nl> + * \ brief Shape inference function to get the correct shape given source shapes . <nl> + * \ param lhs The shape of left operand . <nl> + * \ param rhs The shape of right operand . <nl> + * \ param env The Environment arguments . <nl> + * \ return The inferred result shape . <nl> + * / <nl> + typedef TShape ( * BinaryShapeFunction ) ( const TShape & lhs , <nl> + const TShape & rhs , <nl> + const EnvArguments & env ) ; <nl> + / * ! <nl> + * \ brief Gradient function that takes only output gradient and computes gradient wrt to input . <nl> + * We support total gradient as a whole to make it easy to combine a few ops . <nl> + * \ param out_grad the gradient wrt to output of the function . <nl> + * \ param env The Environment arguments . <nl> + * \ param lhs_grad The container to store result of lhs gradient . <nl> + * \ param rhs_grad The container to store result of lhs gradient . <nl> + * \ param req_lhs_grad The requirement to store the lhs_grad <nl> + * \ param req_rhs_grad The requirement to store the rhs_grad <nl> + * \ param ctx Runtime context to execute the function . <nl> + * / <nl> + typedef void ( * BinaryGradFunctionT0 ) ( const OutputGrad & out_grad , <nl> + const EnvArguments & env , <nl> + TBlob * lhs_grad , <nl> + TBlob * rhs_grad , <nl> + OpReqType req_lhs_grad , <nl> + OpReqType req_rhs_grad , <nl> + RunContext ctx ) ; <nl> + / * ! <nl> + * \ brief Gradient function that takes inputs of function anod computes gradient wrt to input . <nl> + * \ param out_grad the gradient wrt to output of the function . <nl> + * \ param lhs The left operand to the function . <nl> + * \ param rhs The right operand to the function . <nl> + * \ param env The Environment arguments . <nl> + * \ param lhs_grad The container to store result of lhs gradient . <nl> + * \ param rhs_grad The container to store result of lhs gradient . <nl> + * \ param req_lhs_grad The requirement to store the lhs_grad <nl> + * \ param req_rhs_grad The requirement to store the rhs_grad <nl> + * \ param ctx Runtime context to execute the function . <nl> + * / <nl> + typedef void ( * BinaryGradFunctionT1 ) ( const OutputGrad & out_grad , <nl> + const Input0 & lhs , <nl> + const Input1 & rhs , <nl> + const EnvArguments & env , <nl> + TBlob * lhs_grad , <nl> + TBlob * rhs_grad , <nl> + OpReqType req_lhs_grad , <nl> + OpReqType req_rhs_grad , <nl> + RunContext ctx ) ; <nl> + <nl> + / * ! \ brief options in the registry to set inplace of operator * / <nl> + enum SimpleOpInplaceOption { <nl> + / * ! \ brief do not allow inplace in arguments * / <nl> + kNoInplace , <nl> + / * ! \ brief in unary forward , allow inplace in with out * / <nl> + kInplaceInOut , <nl> + / * ! \ brief in unary backward , allow inplace out_grad with in_grad * / <nl> + kInplaceOutIn , <nl> + / * ! \ brief in binary forward , allow inplace left operand with out * / <nl> + kInplaceLhsOut , <nl> + / * ! \ brief in binary backward , allow inplace out_grad with lhs_grad * / <nl> + kInplaceOutLhs <nl> + } ; <nl> + <nl> + / * ! \ brief options in the registry to set symbolic registration * / <nl> + enum SimpleOpScalarOption { <nl> + kScalarBeforeArray , <nl> + kArrayBeforeScalar <nl> + } ; <nl> + <nl> + / * ! \ brief options in the registry to set symbolic registration * / <nl> + enum SimpleOpRegOption { <nl> + kNotRegisterSymbolic , <nl> + kRegisterSymbolic <nl> + } ; <nl> + <nl> + / * ! \ brief registry entry to register simple operators via functions . * / <nl> + class SimpleOpRegEntry { <nl> + public : <nl> + / * ! \ brief declare self type * / <nl> + typedef SimpleOpRegEntry TSelf ; <nl> + / * ! \ brief name of the operator * / <nl> + std : : string name ; <nl> + / * ! <nl> + * \ brief set a seperate name for symbol <nl> + * This must be called before set_function . <nl> + * Default : this is set to be same as the name of operator . <nl> + * \ param symbol_name the name of symbolic operator . <nl> + * / <nl> + virtual TSelf & set_symbol_op_name ( const std : : string & symbol_name ) = 0 ; <nl> + / * ! <nl> + * \ brief set number of scalar arguments needed to be passed in env <nl> + * A function cannot have both kwargs and scalar arguments . <nl> + * Default : this is set to false <nl> + * \ param enable_scalar whether to enable scalar argument <nl> + * \ param type_mask the position of the scalar argument . <nl> + * / <nl> + virtual TSelf & set_enable_scalar ( <nl> + bool enable_scalar , <nl> + SimpleOpScalarOption type_mask = kScalarBeforeArray ) = 0 ; <nl> + / * ! <nl> + * \ brief set whether to enable kwargs <nl> + * A function cannot have both kwargs and scalar arguments . <nl> + * Default : this is set to false <nl> + * \ param enable_kwargs whether to enable kwargs <nl> + * / <nl> + virtual TSelf & set_enable_kwargs ( bool enable_kwargs ) = 0 ; <nl> + / * ! <nl> + * \ brief set shape inference function . <nl> + * Default : out_shape = in_shape <nl> + * \ param fshapeinfer The unary function that peforms the operation . <nl> + * / <nl> + virtual TSelf & set_shape_function ( UnaryShapeFunction fshapeinfer ) = 0 ; <nl> + / * ! <nl> + * \ brief set shape inference function to be the binary inference function <nl> + * Default : out_shape = lhs_shape , and lhs_shape must equal rhs_shape . <nl> + * \ param fshapeinfer The binary function that peforms the operation . <nl> + * / <nl> + virtual TSelf & set_shape_function ( BinaryShapeFunction fshapeinfer ) = 0 ; <nl> + / * ! <nl> + * \ brief set function of the function to be funary <nl> + * \ param dev_mask The device mask of the function can act on . <nl> + * \ param funary The unary function that peforms the operation . <nl> + * \ param inplace_in_out Whether do inplace optimization on in and out . <nl> + * \ param register_symbolic Whether register a symbolic operator as well . <nl> + * / <nl> + virtual TSelf & set_function ( <nl> + int dev_mask , <nl> + UnaryFunction funary , <nl> + SimpleOpInplaceOption inplace_in_out , <nl> + SimpleOpRegOption register_symbolic = kRegisterSymbolic ) = 0 ; <nl> + / * ! <nl> + * \ brief set function of the function to be funary <nl> + * \ param dev_mask The device mask of the function can act on . <nl> + * \ param fbinary The binary function that peforms the operation . <nl> + * \ param inplace_lhs_out Whether do inplace optimization on lhs and out . <nl> + * \ param register_symbolic Whether register a symbolic operator as well . <nl> + * / <nl> + virtual TSelf & set_function ( <nl> + int dev_mask , <nl> + BinaryFunction fbinary , <nl> + SimpleOpInplaceOption inplace_lhs_out , <nl> + SimpleOpRegOption register_symbolic = kRegisterSymbolic ) = 0 ; <nl> + / * ! <nl> + * \ brief set gradient of the function of this function . <nl> + * \ param dev_mask The device mask of the function can act on . <nl> + * \ param fgrad The gradient function to be set . <nl> + * \ param inplace_out_in_grad whether out_grad and in_grad can share memory . <nl> + * / <nl> + virtual TSelf & set_gradient ( int dev_mask , <nl> + UnaryGradFunctionT0 fgrad , <nl> + SimpleOpInplaceOption inplace_out_in_grad ) = 0 ; <nl> + / * ! <nl> + * \ brief set gradient of the function of this function . <nl> + * \ param dev_mask The device mask of the function can act on . <nl> + * \ param fgrad The gradient function to be set . <nl> + * \ param inplace_out_in_grad whether out_grad and in_grad can share memory . <nl> + * / <nl> + virtual TSelf & set_gradient ( int dev_mask , <nl> + UnaryGradFunctionT1 fgrad , <nl> + SimpleOpInplaceOption inplace_out_in_grad ) = 0 ; <nl> + / * ! <nl> + * \ brief set gradient of the function of this function . <nl> + * \ param dev_mask The device mask of the function can act on . <nl> + * \ param fgrad The gradient function to be set . <nl> + * \ param inplace_out_in_grad whether out_grad and in_grad can share memory . <nl> + * / <nl> + virtual TSelf & set_gradient ( int dev_mask , <nl> + UnaryGradFunctionT2 fgrad , <nl> + SimpleOpInplaceOption inplace_out_in_grad ) = 0 ; <nl> + / * ! <nl> + * \ brief set gradient of the function of this function . <nl> + * \ param dev_mask The device mask of the function can act on . <nl> + * \ param fgrad The gradient function to be set . <nl> + * \ param inplace_out_lhs_grad whether out_grad and lhs_grad can share memory . <nl> + * / <nl> + virtual TSelf & set_gradient ( int dev_mask , <nl> + BinaryGradFunctionT0 fgrad , <nl> + SimpleOpInplaceOption inplace_out_lhs_grad ) = 0 ; <nl> + / * ! <nl> + * \ brief set gradient of the function of this function . <nl> + * \ param dev_mask The device mask of the function can act on . <nl> + * \ param fgrad The gradient function to be set . <nl> + * \ param inplace_out_lhs_grad whether out_grad and lhs_grad can share memory . <nl> + * / <nl> + virtual TSelf & set_gradient ( int dev_mask , <nl> + BinaryGradFunctionT1 fgrad , <nl> + SimpleOpInplaceOption inplace_out_lhs_grad ) = 0 ; <nl> + / * ! <nl> + * \ brief Describe the function . <nl> + * \ param description The description of the function . <nl> + * \ return reference to self . <nl> + * / <nl> + virtual TSelf & describe ( const std : : string & description ) = 0 ; <nl> + / * ! <nl> + * \ brief Describe the function . <nl> + * \ param args argument information . <nl> + * Add addtional arguments to the function . <nl> + * \ return reference to self . <nl> + * / <nl> + virtual TSelf & add_arguments ( const std : : vector < dmlc : : ParamFieldInfo > & args ) = 0 ; <nl> + / * ! \ brief virtual destructor * / <nl> + virtual ~ SimpleOpRegEntry ( ) { } <nl> + } ; <nl> + <nl> + / * ! \ brief registry for TBlob functions * / <nl> + class SimpleOpRegistry { <nl> + public : <nl> + / * ! <nl> + * \ brief Internal function to register a name function under name . <nl> + * \ param name name of the function <nl> + * \ return ref to the registered entry , used to set properties <nl> + * / <nl> + SimpleOpRegEntry & __REGISTER_OR_FIND__ ( const std : : string & name ) ; <nl> + / * ! <nl> + * \ brief Find the entry with corresponding name . <nl> + * \ param name name of the function <nl> + * \ return the corresponding function , can be NULL <nl> + * / <nl> + inline static const SimpleOpRegEntry * Find ( const std : : string & name ) { <nl> + return Get ( ) - > fmap_ . at ( name ) ; <nl> + } <nl> + / * ! \ return global singleton of the registry * / <nl> + static SimpleOpRegistry * Get ( ) ; <nl> + <nl> + private : <nl> + / / destructor <nl> + ~ SimpleOpRegistry ( ) ; <nl> + / * ! \ brief internal registry map * / <nl> + std : : map < std : : string , SimpleOpRegEntry * > fmap_ ; <nl> + } ; <nl> + <nl> + / * ! <nl> + * \ brief assign the expression to out according to request <nl> + * \ param out the data to be assigned <nl> + * \ param req the assignment request <nl> + * \ param exp the expression <nl> + * \ tparam OType output type <nl> + * \ tparam Exp expression type <nl> + * / <nl> + # define ASSIGN_DISPATCH ( out , req , exp ) \ <nl> + { \ <nl> + switch ( req ) { \ <nl> + case kNullOp : \ <nl> + break ; \ <nl> + case kWriteTo : \ <nl> + case kWriteInplace : \ <nl> + ( out ) = ( exp ) ; \ <nl> + break ; \ <nl> + case kAddTo : \ <nl> + ( out ) + = ( exp ) ; \ <nl> + break ; \ <nl> + default : \ <nl> + LOG ( FATAL ) < < " not reached " ; \ <nl> + } \ <nl> + } <nl> + <nl> + / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl> + / / The following part are API Registration of Simple Operators <nl> + / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl> + / * ! <nl> + * \ brief Macro to register simple operator to both imperative and symbolic API . <nl> + * <nl> + * see src / operator / elementwise_unary_op - inl . h for example <nl> + * <nl> + * \ code <nl> + * / / example of registering a sigmoid operator on GPU <nl> + * / / MySigmoid is of type UnaryFunction , <nl> + * / / MySigmoidGrad is of type UnaryGradFunctionT2 <nl> + * <nl> + * MXNET_REGISTER_SIMPLE_OP ( sigmoid , cpu ) <nl> + * . set_function ( MySigmoid < gpu > , true ) <nl> + * . set_gradient ( MySigmoidGrad < gpu > , true ) <nl> + * . describe ( " Sigmoid function " ) ; <nl> + * <nl> + * \ endcode <nl> + * / <nl> + # define MXNET_REGISTER_SIMPLE_OP ( Name , DEV ) \ <nl> + static : : mxnet : : op : : SimpleOpRegEntry & \ <nl> + __make_ # # SimpleOpRegEntry # # _ # # Name # # __ # # DEV # # __ = \ <nl> + : : mxnet : : op : : SimpleOpRegistry : : Get ( ) - > __REGISTER_OR_FIND__ ( # Name ) <nl> + <nl> + } / / namespace op <nl> + } / / namespace mxnet <nl> + # endif / / MXNET_OPERATOR_UTIL_H_ <nl> mmm a / mshadow <nl> ppp b / mshadow <nl> @ @ - 1 + 1 @ @ <nl> - Subproject commit 9aa2b4c5d59ff08b840cadafd0581f600a45e26d <nl> + Subproject commit 9e520c7f25635f73532ea407ae4a43a3f9e6a088 <nl> mmm a / python / mxnet / __init__ . py <nl> ppp b / python / mxnet / __init__ . py <nl> <nl> from . import torch <nl> from . import torch as th <nl> <nl> + from . import module <nl> + from . import module as mod <nl> + <nl> __version__ = base . __version__ <nl> mmm a / python / mxnet / base . py <nl> ppp b / python / mxnet / base . py <nl> <nl> # mmmmmmmmmmmmmmmmmmmmmmmmmmm - <nl> if sys . version_info [ 0 ] = = 3 : <nl> string_types = str , <nl> - numeric_types = ( float , int ) <nl> + numeric_types = ( float , int , np . float32 , np . int32 ) <nl> # this function is needed for python3 <nl> # to convert ctypes . char_p . value back to python str <nl> py_str = lambda x : x . decode ( ' utf - 8 ' ) <nl> else : <nl> string_types = basestring , <nl> - numeric_types = ( float , int , long ) <nl> + numeric_types = ( float , int , long , np . float32 , np . int32 ) <nl> py_str = lambda x : x <nl> <nl> <nl> mmm a / python / mxnet / context . py <nl> ppp b / python / mxnet / context . py <nl> def device_type ( self ) : <nl> " " " <nl> return Context . devtype2str [ self . device_typeid ] <nl> <nl> + def __eq__ ( self , other ) : <nl> + " " " Compare two contexts . Two contexts are equal if they <nl> + have the same device type and device id . <nl> + " " " <nl> + if not isinstance ( other , Context ) : <nl> + return False <nl> + if self . device_typeid = = other . device_typeid and \ <nl> + self . device_id = = other . device_id : <nl> + return True <nl> + return False <nl> + <nl> def __str__ ( self ) : <nl> return ' % s ( % d ) ' % ( self . device_type , self . device_id ) <nl> <nl> mmm a / python / mxnet / executor_manager . py <nl> ppp b / python / mxnet / executor_manager . py <nl> <nl> # coding : utf - 8 <nl> - # pylint : disable = invalid - name , protected - access , too - many - locals , too - many - arguments <nl> + # pylint : disable = invalid - name , protected - access , too - many - locals , too - many - arguments , too - many - statements <nl> " " " Executor manager " " " <nl> from __future__ import absolute_import <nl> <nl> <nl> from . context import cpu <nl> <nl> import logging <nl> + import numpy as np <nl> <nl> def _split_input_slice ( batch_size , work_load_list ) : <nl> " " " Get input slice from the input shape . <nl> def _load_label ( batch , targets ) : <nl> <nl> # pylint : disable = too - many - branches <nl> def _bind_exec ( sym , ctx , input_shapes , param_names , need_grad = False , <nl> - base_exec = None , shared_data_arrays = None , input_types = None ) : <nl> + base_exec = None , shared_data_arrays = None , input_types = None , logger = logging ) : <nl> " " " bind executor for bucketing , potentially sharing data with an existing executor . " " " <nl> arg_shape , _ , aux_shape = sym . infer_shape ( * * input_shapes ) <nl> assert ( arg_shape is not None ) <nl> def _bind_exec ( sym , ctx , input_shapes , param_names , need_grad = False , <nl> name in shared_data_arrays : <nl> arg_arr = shared_data_arrays [ name ] <nl> <nl> - # in bucketing , we want to be strict here to avoid <nl> - # potential bugs <nl> - assert ( arg_shape [ i ] = = arg_arr . shape ) <nl> - assert ( arg_types [ i ] = = arg_arr . dtype ) <nl> + if np . prod ( arg_arr . shape ) > = np . prod ( arg_shape [ i ] ) : <nl> + # good , we can share this memory <nl> + assert ( arg_types [ i ] = = arg_arr . dtype ) <nl> + arg_arr = arg_arr . reshape ( arg_shape [ i ] ) <nl> + else : <nl> + logger . warning ( ( ' bucketing : data " % s " has a shape % s ' % ( name , arg_shape [ i ] ) ) + <nl> + ( ' , which is larger than already allocated ' ) + <nl> + ( ' shape % s ' % ( arg_arr . shape , ) ) + <nl> + ( ' . Need to re - allocate . Consider putting ' ) + <nl> + ( ' default_bucket_key to be the bucket taking the largest ' ) + <nl> + ( ' input for better memory sharing . ' ) ) <nl> + arg_arr = nd . zeros ( arg_shape [ i ] , ctx , dtype = arg_types [ i ] ) <nl> + <nl> + # replace existing shared array because the new one is bigger <nl> + shared_data_arrays [ name ] = arg_arr <nl> else : <nl> arg_arr = nd . zeros ( arg_shape [ i ] , ctx , dtype = arg_types [ i ] ) <nl> + if shared_data_arrays is not None : <nl> + shared_data_arrays [ name ] = arg_arr <nl> + <nl> arg_arrays . append ( arg_arr ) <nl> - if shared_data_arrays is not None : <nl> - shared_data_arrays [ name ] = arg_arr <nl> else : <nl> # model parameter <nl> if base_exec is None : <nl> def _bind_exec ( sym , ctx , input_shapes , param_names , need_grad = False , <nl> <nl> # create or borrow aux variables <nl> if base_exec is None : <nl> - aux_arrays = [ nd . zeros ( s , ctx , dtype = t ) for s , t in zip ( aux_shape , arg_types ) ] <nl> + aux_arrays = [ nd . zeros ( s , ctx , dtype = t ) for s , t in zip ( aux_shape , aux_types ) ] <nl> else : <nl> for i , a in enumerate ( base_exec . aux_arrays ) : <nl> assert aux_shape [ i ] = = a . shape <nl> mmm a / python / mxnet / io . py <nl> ppp b / python / mxnet / io . py <nl> def next ( self ) : <nl> " " " Get next data batch from iterator . Equivalent to <nl> self . iter_next ( ) <nl> DataBatch ( self . getdata ( ) , self . getlabel ( ) , self . getpad ( ) , None ) <nl> + <nl> Returns <nl> mmmmmm - <nl> data : DataBatch <nl> def __next__ ( self ) : <nl> <nl> def iter_next ( self ) : <nl> " " " Iterate to next batch . <nl> + <nl> Returns <nl> mmmmmm - <nl> has_next : boolean <nl> def getdata ( self ) : <nl> <nl> def getlabel ( self ) : <nl> " " " Get label of current batch . <nl> + <nl> Returns <nl> mmmmmm - <nl> label : NDArray <nl> def getlabel ( self ) : <nl> pass <nl> <nl> def getindex ( self ) : <nl> - " " " <nl> - Retures <nl> + " " " Get index of the current batch . <nl> + <nl> + Returns <nl> mmmmmm - <nl> index : numpy . array <nl> The index of current batch <nl> def getindex ( self ) : <nl> <nl> def getpad ( self ) : <nl> " " " Get the number of padding examples in current batch . <nl> + <nl> Returns <nl> mmmmmm - <nl> pad : int <nl> class PrefetchingIter ( DataIter ) : <nl> " " " Base class for prefetching iterators . Takes one or more DataIters ( <nl> or any class with " reset " and " read " methods ) and combine them with <nl> prefetching . For example : <nl> - iter = PrefetchingIter ( [ NDArrayIter ( { ' data ' : X1 } ) , NDArrayIter ( { ' data ' : X2 } ) ] , <nl> - rename_data = [ { ' data ' : ' data1 ' } , { ' data ' : ' data2 ' } ] ) <nl> <nl> Parameters <nl> mmmmmmmmm - <nl> class PrefetchingIter ( DataIter ) : <nl> in iter [ i ] . provide_data <nl> rename_label : None or list of dict <nl> Similar to rename_data <nl> + <nl> + Examples <nl> + mmmmmm - - <nl> + iter = PrefetchingIter ( [ NDArrayIter ( { ' data ' : X1 } ) , NDArrayIter ( { ' data ' : X2 } ) ] , <nl> + rename_data = [ { ' data ' : ' data1 ' } , { ' data ' : ' data2 ' } ] ) <nl> " " " <nl> def __init__ ( self , iters , rename_data = None , rename_label = None ) : <nl> super ( PrefetchingIter , self ) . __init__ ( ) <nl> mmm a / python / mxnet / kvstore_server . py <nl> ppp b / python / mxnet / kvstore_server . py <nl> def __init__ ( self , kvstore ) : <nl> self . kvstore = kvstore <nl> self . handle = kvstore . handle <nl> self . init_logginig = False <nl> + <nl> def _controller ( self ) : <nl> " " " return the server controller " " " <nl> - def server_controller ( cmd_id , cmd_body ) : <nl> + def server_controller ( cmd_id , cmd_body , _ ) : <nl> " " " server controler " " " <nl> if self . init_logginig = = False : <nl> # the reason put the codes here is because we cannot get <nl> def run ( self ) : <nl> . . . if is_command x : controller ( x ) <nl> . . . else if is_key_value x : updater ( x ) <nl> " " " <nl> - _ctrl_proto = ctypes . CFUNCTYPE ( None , ctypes . c_int , ctypes . c_char_p ) <nl> - check_call ( _LIB . MXKVStoreRunServer ( self . handle , _ctrl_proto ( self . _controller ( ) ) ) ) <nl> - <nl> + _ctrl_proto = ctypes . CFUNCTYPE ( None , ctypes . c_int , ctypes . c_char_p , ctypes . c_void_p ) <nl> + check_call ( _LIB . MXKVStoreRunServer ( self . handle , _ctrl_proto ( self . _controller ( ) ) , None ) ) <nl> <nl> def _init_kvstore_server_module ( ) : <nl> " " " Start server / scheduler " " " <nl> mmm a / python / mxnet / metric . py <nl> ppp b / python / mxnet / metric . py <nl> def check_label_shapes ( labels , preds , shape = 0 ) : <nl> class EvalMetric ( object ) : <nl> " " " Base class of all evaluation metrics . " " " <nl> <nl> - def __init__ ( self , name ) : <nl> + def __init__ ( self , name , num = None ) : <nl> self . name = name <nl> + self . num = num <nl> self . reset ( ) <nl> <nl> def update ( self , label , pred ) : <nl> def update ( self , label , pred ) : <nl> <nl> def reset ( self ) : <nl> " " " Clear the internal statistics to initial state . " " " <nl> - self . num_inst = 0 <nl> - self . sum_metric = 0 . 0 <nl> + if self . num = = None : <nl> + self . num_inst = 0 <nl> + self . sum_metric = 0 . 0 <nl> + else : <nl> + self . num_inst = [ 0 ] * self . num <nl> + self . sum_metric = [ 0 . 0 ] * self . num <nl> <nl> def get ( self ) : <nl> " " " Get the current evaluation result . <nl> def get ( self ) : <nl> value : float <nl> Value of the evaluation . <nl> " " " <nl> - if self . num_inst = = 0 : <nl> - return ( self . name , float ( ' nan ' ) ) <nl> + if self . num = = None : <nl> + if self . num_inst = = 0 : <nl> + return ( self . name , float ( ' nan ' ) ) <nl> + else : <nl> + return ( self . name , self . sum_metric / self . num_inst ) <nl> else : <nl> - return ( self . name , self . sum_metric / self . num_inst ) <nl> + names = [ ' % s_ % d ' % ( self . name , i ) for i in range ( self . num ) ] <nl> + values = [ x / y if y ! = 0 else float ( ' nan ' ) \ <nl> + for x , y in zip ( self . sum_metric , self . num_inst ) ] <nl> + return ( names , values ) <nl> <nl> def get_name_value ( self ) : <nl> " " " Get zipped name and value pairs " " " <nl> mmm a / python / mxnet / model . py <nl> ppp b / python / mxnet / model . py <nl> <nl> def _create_kvstore ( kvstore , num_device , arg_params ) : <nl> " " " Create kvstore <nl> This function select and create a proper kvstore if given the kvstore type <nl> + <nl> Parameters <nl> mmmmmmmmm - <nl> kvstore : KVStore or str <nl> def _train_multi_device ( symbol , ctx , arg_names , param_names , aux_names , <nl> <nl> def save_checkpoint ( prefix , epoch , symbol , arg_params , aux_params ) : <nl> " " " Checkpoint the model data into file . <nl> + <nl> Parameters <nl> mmmmmmmmm - <nl> prefix : str <nl> def save_checkpoint ( prefix , epoch , symbol , arg_params , aux_params ) : <nl> <nl> def load_checkpoint ( prefix , epoch ) : <nl> " " " Load model checkpoint from file . <nl> + <nl> Parameters <nl> mmmmmmmmm - <nl> prefix : str <nl> Prefix of model name . <nl> epoch : int <nl> Epoch number of model we would like to load . <nl> + <nl> Returns <nl> mmmmmm - <nl> symbol : Symbol <nl> def load_checkpoint ( prefix , epoch ) : <nl> Model parameter , dict of name to NDArray of net ' s weights . <nl> aux_params : dict of str to NDArray <nl> Model parameter , dict of name to NDArray of net ' s auxiliary states . <nl> + <nl> Notes <nl> mmm - - <nl> - symbol will be loaded from ` ` prefix - symbol . json ` ` . <nl> def load_checkpoint ( prefix , epoch ) : <nl> class FeedForward ( BASE_ESTIMATOR ) : <nl> " " " Model class of MXNet for training and predicting feedforward nets . <nl> This class is designed for a single - data single output supervised network . <nl> + <nl> Parameters <nl> mmmmmmmmm - <nl> symbol : Symbol <nl> class FeedForward ( BASE_ESTIMATOR ) : <nl> contain extra parameters than needed . <nl> begin_epoch : int , optional <nl> The begining training epoch . <nl> - * * kwargs : dict <nl> + kwargs : dict <nl> The additional keyword arguments passed to optimizer . <nl> " " " <nl> def __init__ ( self , symbol , ctx = None , <nl> def fit ( self , X , y = None , eval_data = None , eval_metric = ' acc ' , <nl> epoch_end_callback = None , batch_end_callback = None , kvstore = ' local ' , logger = None , <nl> work_load_list = None , monitor = None , eval_batch_end_callback = None ) : <nl> " " " Fit the model . <nl> + <nl> Parameters <nl> mmmmmmmmm - <nl> X : DataIter , or numpy . ndarray / NDArray <nl> def fit ( self , X , y = None , eval_data = None , eval_metric = ' acc ' , <nl> Training set label . <nl> If X is numpy . ndarray / NDArray , y is required to be set . <nl> While y can be 1D or 2D ( with 2nd dimension as 1 ) , its 1st dimension must be <nl> - the same as X , i . e . the number of data points and labels should be equal . <nl> + the same as X , i . e . the number of data points and labels should be equal . <nl> eval_data : DataIter or numpy . ndarray / list / NDArray pair <nl> If eval_data is numpy . ndarray / list / NDArray pair , <nl> - it should be ( valid_data , valid_label ) . <nl> + it should be ( valid_data , valid_label ) . <nl> eval_metric : metric . EvalMetric or str or callable <nl> The evaluation metric , name of evaluation metric . <nl> Or a customize evaluation function that returns the statistics <nl> def fit ( self , X , y = None , eval_data = None , eval_metric = ' acc ' , <nl> A callback that is invoked at end of each batch <nl> For print purpose <nl> kvstore : KVStore or str , optional <nl> - The KVStore or a string kvstore type : <nl> - ' local ' : multi - devices on a single machine , will automatically <nl> - choose one from ' local_update_cpu ' , ' local_allreduce_cpu ' , and <nl> - ' local_allreduce_device ' <nl> - ' dist_sync ' : multi - machines with BSP <nl> - ' dist_async ' : multi - machines with partical asynchronous <nl> + The KVStore or a string kvstore type : ' local ' , ' dist_sync ' , ' dist_async ' <nl> In default uses ' local ' , often no need to change for single machiine . <nl> logger : logging logger , optional <nl> When not specified , default logger will be used . <nl> work_load_list : float or int , optional <nl> The list of work load for different devices , <nl> in the same order as ctx <nl> + <nl> + Note <nl> + mmm - <nl> + KVStore behavior <nl> + - ' local ' , multi - devices on a single machine , will automatically choose best type . <nl> + - ' dist_sync ' , multi - machines with BSP <nl> + - ' dist_async ' , multi - machines with partical asynchronous <nl> " " " <nl> <nl> data = self . _init_iter ( X , y , is_train = True ) <nl> def save ( self , prefix , epoch = None ) : <nl> The advantage of load / save is the file is language agnostic . <nl> This means the file saved using save can be loaded by other language binding of mxnet . <nl> You also get the benefit being able to directly load / save from cloud storage ( S3 , HDFS ) <nl> + <nl> Parameters <nl> mmmmmmmmm - <nl> prefix : str <nl> Prefix of model name . <nl> - See Also <nl> - mmmmmm - - <nl> - Symbol . load : the method to load the model back . <nl> + <nl> Notes <nl> mmm - - <nl> - ` ` prefix - symbol . json ` ` will be saved for symbol . <nl> def save ( self , prefix , epoch = None ) : <nl> @ staticmethod <nl> def load ( prefix , epoch , ctx = None , * * kwargs ) : <nl> " " " Load model checkpoint from file . <nl> + <nl> Parameters <nl> mmmmmmmmm - <nl> prefix : str <nl> def load ( prefix , epoch , ctx = None , * * kwargs ) : <nl> The device context of training and prediction . <nl> kwargs : dict <nl> other parameters for model , including num_epoch , optimizer and numpy_batch_size <nl> + <nl> Returns <nl> mmmmmm - <nl> model : FeedForward <nl> The loaded model that can be used for prediction . <nl> + <nl> Notes <nl> mmm - - <nl> - ` ` prefix - symbol . json ` ` will be saved for symbol . <nl> def create ( symbol , X , y = None , ctx = None , <nl> " " " Functional style to create a model . <nl> This function will be more consistent with functional <nl> languages such as R , where mutation is not allowed . <nl> + <nl> Parameters <nl> mmmmmmmmm - <nl> symbol : Symbol <nl> def create ( symbol , X , y = None , ctx = None , <nl> A callback that is invoked at end of each batch <nl> For print purpose <nl> kvstore : KVStore or str , optional <nl> - The KVStore or a string kvstore type : <nl> - ' local ' : multi - devices on a single machine , will automatically <nl> - choose one from ' local_update_cpu ' , ' local_allreduce_cpu ' , and <nl> - ' local_allreduce_device ' <nl> - ' dist_sync ' : multi - machines with BSP <nl> - ' dist_async ' : multi - machines with partical asynchronous <nl> + The KVStore or a string kvstore type : ' local ' , ' dist_sync ' , ' dis_async ' <nl> In default uses ' local ' , often no need to change for single machiine . <nl> logger : logging logger , optional <nl> When not specified , default logger will be used . <nl> new file mode 100644 <nl> index 00000000000 . . 32066dcc7de <nl> mmm / dev / null <nl> ppp b / python / mxnet / module / __init__ . py <nl> <nl> + " " " A module is like a FeedForward model . but we would like to make it <nl> + easier to be composed . So it is more like the Torch modules . <nl> + " " " <nl> + <nl> + from . base_module import BaseModule <nl> + from . module import Module <nl> + from . bucketing_module import BucketingModule <nl> + from . sequential_module import SequentialModule <nl> + <nl> + from . python_module import PythonModule , PythonLossModule <nl> new file mode 100644 <nl> index 00000000000 . . 5968a764cdc <nl> mmm / dev / null <nl> ppp b / python / mxnet / module / base_module . py <nl> <nl> + # pylint : disable = too - many - arguments , too - many - locals , too - many - public - methods <nl> + " " " ` BaseModule ` defines an API for modules . " " " <nl> + <nl> + import logging <nl> + import time <nl> + import numpy as np <nl> + <nl> + from . . import metric <nl> + <nl> + from . . model import BatchEndParam <nl> + from . . initializer import Uniform <nl> + <nl> + def _as_list ( obj ) : <nl> + " " " A utility function that treat the argument as a list . <nl> + <nl> + Parameters <nl> + mmmmmmmmm - <nl> + obj : object <nl> + <nl> + Returns <nl> + mmmmmm - <nl> + If ` obj ` is a list , return it . Otherwise , return ` [ obj ] ` as a single - element list . <nl> + " " " <nl> + if isinstance ( obj , list ) : <nl> + return obj <nl> + else : <nl> + return [ obj ] <nl> + <nl> + <nl> + class BaseModule ( object ) : <nl> + " " " The base class of a modules . A module represents a computation component . The design <nl> + purpose of a module is that it abstract a computation " machine " , that one can run forward , <nl> + backward , update parameters , etc . We aim to make the APIs easy to use , especially in the <nl> + case when we need to use imperative API to work with multiple modules ( e . g . stochastic <nl> + depth network ) . <nl> + <nl> + A module has several states : <nl> + <nl> + - Initial state . Memory is not allocated yet , not ready for computation yet . <nl> + - Binded . Shapes for inputs , outputs , and parameters are all known , memory allocated , <nl> + ready for computation . <nl> + - Parameter initialized . For modules with parameters , doing computation before initializing <nl> + the parameters might result in undefined outputs . <nl> + - Optimizer installed . An optimizer can be installed to a module . After this , the parameters <nl> + of the module can be updated according to the optimizer after gradients are computed <nl> + ( forward - backward ) . <nl> + <nl> + In order for a module to interactive with others , a module should be able to report the <nl> + following information in its raw stage ( before binded ) <nl> + <nl> + - ` data_names ` : list of string indicating the names of required data . <nl> + - ` output_names ` : list of string indicating the names of required outputs . <nl> + <nl> + And also the following richer information after binded : <nl> + <nl> + - state information <nl> + - ` binded ` : ` bool ` , indicating whether the memory buffers needed for computation <nl> + has been allocated . <nl> + - ` for_training ` : whether the module is binded for training ( if binded ) . <nl> + - ` params_initialized ` : ` bool ` , indicating whether the parameters of this modules <nl> + has been initialized . <nl> + - ` optimizer_initialized ` : ' bool ` , indicating whether an optimizer is defined <nl> + and initialized . <nl> + - ` inputs_need_grad ` : ` bool ` , indicating whether gradients with respect to the <nl> + input data is needed . Might be useful when implementing composition of modules . <nl> + <nl> + - input / output information <nl> + - ` data_shapes ` : a list of ` ( name , shape ) ` . In theory , since the memory is allocated , <nl> + we could directly provide the data arrays . But in the case of data parallelization , <nl> + the data arrays might not be of the same shape as viewed from the external world . <nl> + - ` label_shapes ` : a list of ` ( name , shape ) ` . This might be ` [ ] ` if the module does <nl> + not need labels ( e . g . it does not contains a loss function at the top ) , or a module <nl> + is not binded for training . <nl> + - ` output_shapes ` : a list of ` ( name , shape ) ` for outputs of the module . <nl> + <nl> + - parameters ( for modules with parameters ) <nl> + - ` get_params ( ) ` : return a tuple ` ( arg_params , aux_params ) ` . Each of those <nl> + is a dictionary of name to ` NDArray ` mapping . Those ` NDArray ` always lives on <nl> + CPU . The actual parameters used for computing might live on other devices ( GPUs ) , <nl> + this function will retrieve ( a copy of ) the latest parameters . Therefore , modifying <nl> + - ` set_params ( arg_params , aux_params ) ` : assign parameters to the devices <nl> + doing the computation . <nl> + - ` init_params ( . . . ) ` : a more flexible interface to assign or initialize the parameters . <nl> + <nl> + - setup <nl> + - ` bind ( ) ` : prepare environment for computation . <nl> + - ` init_optimizer ( ) ` : install optimizer for parameter updating . <nl> + <nl> + - computation <nl> + - ` forward ( data_batch ) ` : forward operation . <nl> + - ` backward ( out_grads = None ) ` : backward operation . <nl> + - ` update ( ) ` : update parameters according to installed optimizer . <nl> + - ` get_outputs ( ) ` : get outputs of the previous forward operation . <nl> + - ` get_input_grads ( ) ` : get the gradients with respect to the inputs computed <nl> + in the previous backward operation . <nl> + - ` update_metric ( metric , labels ) ` : update performance metric for the previous forward <nl> + computed results . <nl> + <nl> + - other properties ( mostly for backward compatability ) <nl> + - ` symbol ` : the underlying symbolic graph for this module ( if any ) <nl> + This property is not necessarily constant . For example , for ` BucketingModule ` , <nl> + this property is simply the * current * symbol being used . For other modules , <nl> + this value might not be well defined . <nl> + <nl> + When those intermediate - level API are implemented properly , the following <nl> + high - level API will be automatically available for a module : <nl> + <nl> + - ` fit ` : train the module parameters on a data set <nl> + - ` predict ` : run prediction on a data set and collect outputs <nl> + - ` score ` : run prediction on a data set and evaluate performance <nl> + " " " <nl> + def __init__ ( self , logger = logging ) : <nl> + self . logger = logger <nl> + self . binded = False <nl> + self . for_training = False <nl> + self . inputs_need_grad = False <nl> + self . params_initialized = False <nl> + self . optimizer_initialized = False <nl> + self . _symbol = None <nl> + <nl> + # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # <nl> + # High Level API <nl> + # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # <nl> + def forward_backward ( self , data_batch ) : <nl> + " " " A convenient function that calls both ` forward ` and ` backward ` . <nl> + " " " <nl> + self . forward ( data_batch , is_train = True ) <nl> + self . backward ( ) <nl> + <nl> + def score ( self , eval_data , eval_metric , num_batch = None , batch_end_callback = None , <nl> + reset = True , epoch = 0 ) : <nl> + " " " Run prediction on ` eval_data ` and evaluate the performance according to <nl> + ` eval_metric ` . <nl> + <nl> + Parameters <nl> + mmmmmmmmm - <nl> + eval_data : DataIter <nl> + eval_metric : EvalMetric <nl> + num_batch : int <nl> + Number of batches to run . Default is ` None ` , indicating run until the ` DataIter ` <nl> + finishes . <nl> + batch_end_callback : function <nl> + Could also be a list of functions . <nl> + reset : bool <nl> + Default ` True ` , indicating whether we should reset ` eval_data ` before starting <nl> + evaluating . <nl> + epoch : int <nl> + Default 0 . For compatibility , this will be passed to callbacks ( if any ) . During <nl> + training , this will correspond to the training epoch number . <nl> + " " " <nl> + assert self . binded and self . params_initialized <nl> + <nl> + if reset : <nl> + eval_data . reset ( ) <nl> + <nl> + if not isinstance ( eval_metric , metric . EvalMetric ) : <nl> + eval_metric = metric . create ( eval_metric ) <nl> + <nl> + eval_metric . reset ( ) <nl> + for nbatch , eval_batch in enumerate ( eval_data ) : <nl> + if num_batch is not None and nbatch = = num_batch : <nl> + break <nl> + <nl> + self . forward ( eval_batch , is_train = False ) <nl> + self . update_metric ( eval_metric , eval_batch . label ) <nl> + <nl> + if batch_end_callback is not None : <nl> + batch_end_params = BatchEndParam ( epoch = epoch , <nl> + nbatch = nbatch , <nl> + eval_metric = eval_metric , <nl> + locals = locals ( ) ) <nl> + for callback in _as_list ( batch_end_callback ) : <nl> + callback ( batch_end_params ) <nl> + <nl> + def predict ( self , eval_data , num_batch = None , merge_batches = True , reset = True , <nl> + always_output_list = False ) : <nl> + " " " Run prediction and collect the outputs . <nl> + <nl> + Parameters <nl> + mmmmmmmmm - <nl> + eval_data : DataIter <nl> + num_batch : int <nl> + Default is ` None ` , indicating run all the batches in the data iterator . <nl> + merge_batches : bool <nl> + Default is ` True ` , see the doc for return values . <nl> + reset : bool <nl> + Default is ` True ` , indicating whether we should reset the data iter before start <nl> + doing prediction . <nl> + always_output_list : bool <nl> + Default is ` False ` , see the doc for return values . <nl> + <nl> + Returns <nl> + mmmmmm - <nl> + When ` merge_batches ` is ` True ` ( by default ) , the return value will be a list <nl> + ` [ out1 , out2 , out3 ] ` . Where each element is concatenation of the outputs for <nl> + all the mini - batches . If further that ` always_output_list ` is ` False ` ( by default ) , <nl> + then in the case of a single output , ` out1 ` is returned instead of ` [ out1 ] ` . <nl> + <nl> + When ` merge_batches ` is ` False ` , the return value will be a nested list like <nl> + ` [ [ out1_batch1 , out2_batch1 ] , [ out1_batch2 ] , . . . ] ` . This mode is useful because <nl> + in some cases ( e . g . bucketing ) , the module does not necessarily produce the same <nl> + number of outputs . <nl> + " " " <nl> + assert self . binded and self . params_initialized <nl> + <nl> + if reset : <nl> + eval_data . reset ( ) <nl> + <nl> + output_list = [ ] <nl> + <nl> + for nbatch , eval_batch in enumerate ( eval_data ) : <nl> + if num_batch is not None and nbatch = = num_batch : <nl> + break <nl> + self . forward ( eval_batch , is_train = False ) <nl> + pad = eval_batch . pad <nl> + outputs = [ out [ 0 : out . shape [ 0 ] - pad ] for out in self . get_outputs ( ) ] <nl> + output_list . append ( outputs ) <nl> + <nl> + if len ( output_list ) = = 0 : <nl> + return output_list <nl> + <nl> + if merge_batches : <nl> + num_outputs = len ( output_list [ 0 ] ) <nl> + for out in output_list : <nl> + assert len ( out ) = = num_outputs , \ <nl> + ' Cannot merge batches , as num of outputs is not the same ' + \ <nl> + ' in mini - batches . Maybe bucketing is used ? ' <nl> + output_list2 = [ np . concatenate ( [ out [ i ] for out in output_list ] ) <nl> + for i in range ( num_outputs ) ] <nl> + <nl> + if num_outputs = = 1 and not always_output_list : <nl> + return output_list2 [ 0 ] <nl> + return output_list2 <nl> + <nl> + return output_list <nl> + <nl> + def fit ( self , train_data , eval_data = None , eval_metric = ' acc ' , <nl> + epoch_end_callback = None , batch_end_callback = None , kvstore = ' local ' , <nl> + optimizer = ' sgd ' , optimizer_params = ( ( ' learning_rate ' , 0 . 01 ) , ) , <nl> + eval_batch_end_callback = None , initializer = Uniform ( 0 . 01 ) , <nl> + arg_params = None , aux_params = None , allow_missing = False , <nl> + force_init = False , begin_epoch = 0 , num_epoch = None ) : <nl> + " " " Train the module parameters . <nl> + <nl> + Parameters <nl> + mmmmmmmmm - <nl> + train_data : DataIter <nl> + eval_data : DataIter <nl> + If not ` None ` , will be used as validation set and evaluate the performance <nl> + after each epoch . <nl> + eval_metric : str or EvalMetric <nl> + Default ` ' acc ' ` . The performance measure used to display during training . <nl> + epoch_end_callback : function or list of function <nl> + Each callback will be called with the current ` epoch ` , ` symbol ` , ` arg_params ` <nl> + and ` aux_params ` . <nl> + batch_end_callback : function or list of function <nl> + Each callback will be called with a ` BatchEndParam ` . <nl> + kvstore : str or KVStore <nl> + Default ` ' local ' ` . <nl> + optimizer : str or Optimizer <nl> + Default ` ' sgd ' ` <nl> + optimizer_params : dict <nl> + Default ` ( ( ' learning_rate ' , 0 . 01 ) , ) ` . The parameters for the optimizer constructor . <nl> + The default value is not a ` dict ` , just to avoid pylint warning on dangerous <nl> + default values . <nl> + eval_batch_end_callback : function or list of function <nl> + initializer : Initializer <nl> + Will be called to initialize the module parameters if not already initialized . <nl> + arg_params : dict <nl> + Default ` None ` , if not ` None ` , should be existing parameters from a trained <nl> + model or loaded from a checkpoint ( previously saved model ) . In this case , <nl> + the value here will be used to initialize the module parameters , unless they <nl> + are already initialized by the user via a call to ` init_params ` or ` fit ` . <nl> + ` arg_params ` has higher priority to ` initializer ` . <nl> + aux_params : dict <nl> + Default ` None ` . Similar to ` arg_params ` , except for auxiliary states . <nl> + allow_missing : bool <nl> + Default ` False ` . Indicate whether we allow missing parameters when ` arg_params ` <nl> + and ` aux_params ` are not ` None ` . If this is ` True ` , then the missing parameters <nl> + will be initialized via the ` initializer ` . <nl> + force_init : bool <nl> + Default ` False ` . Indicate whether we should force initialization even if the <nl> + parameters are already initialized . <nl> + begin_epoch : int <nl> + Default ` 0 ` . Indicate the starting epoch . Usually , if we are resuming from a <nl> + checkpoint saved at a previous training phase at epoch N , then we should specify <nl> + this value as N + 1 . <nl> + num_epoch : int <nl> + Number of epochs to run training . <nl> + " " " <nl> + <nl> + assert num_epoch is not None , ' please specify number of epochs ' <nl> + <nl> + self . bind ( data_shapes = train_data . provide_data , label_shapes = train_data . provide_label , <nl> + for_training = True , force_rebind = True ) <nl> + self . init_params ( initializer = initializer , arg_params = arg_params , aux_params = aux_params , <nl> + allow_missing = allow_missing , force_init = force_init ) <nl> + self . init_optimizer ( kvstore = kvstore , optimizer = optimizer , <nl> + optimizer_params = optimizer_params ) <nl> + <nl> + if not isinstance ( eval_metric , metric . EvalMetric ) : <nl> + eval_metric = metric . create ( eval_metric ) <nl> + <nl> + # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # <nl> + # training loop <nl> + # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # <nl> + for epoch in range ( begin_epoch , num_epoch ) : <nl> + tic = time . time ( ) <nl> + eval_metric . reset ( ) <nl> + for nbatch , data_batch in enumerate ( train_data ) : <nl> + self . forward_backward ( data_batch ) <nl> + self . update ( ) <nl> + self . update_metric ( eval_metric , data_batch . label ) <nl> + <nl> + if batch_end_callback is not None : <nl> + batch_end_params = BatchEndParam ( epoch = epoch , nbatch = nbatch , <nl> + eval_metric = eval_metric , <nl> + locals = locals ( ) ) <nl> + for callback in _as_list ( batch_end_callback ) : <nl> + callback ( batch_end_params ) <nl> + <nl> + # one epoch of training is finished <nl> + for name , val in eval_metric . get_name_value ( ) : <nl> + self . logger . info ( ' Epoch [ % d ] Train - % s = % f ' , epoch , name , val ) <nl> + toc = time . time ( ) <nl> + self . logger . info ( ' Epoch [ % d ] Time cost = % . 3f ' , epoch , ( toc - tic ) ) <nl> + <nl> + if epoch_end_callback is not None : <nl> + arg_params , aux_params = self . get_params ( ) <nl> + for callback in _as_list ( epoch_end_callback ) : <nl> + callback ( epoch , self . symbol , arg_params , aux_params ) <nl> + <nl> + # mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - <nl> + # evaluation on validation set <nl> + if eval_data : <nl> + self . score ( eval_data , eval_metric , <nl> + batch_end_callback = eval_batch_end_callback , epoch = epoch ) <nl> + for name , val in eval_metric . get_name_value ( ) : <nl> + self . logger . info ( ' Epoch [ % d ] Validation - % s = % f ' , epoch , name , val ) <nl> + <nl> + # end of 1 epoch , reset the data - iter for another epoch <nl> + train_data . reset ( ) <nl> + <nl> + # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # <nl> + # Symbol information <nl> + # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # <nl> + @ property <nl> + def data_names ( self ) : <nl> + " " " A list of names for data required by this module . " " " <nl> + raise NotImplementedError ( ) <nl> + <nl> + @ property <nl> + def output_names ( self ) : <nl> + " " " A list of names for the outputs of this module . " " " <nl> + raise NotImplementedError ( ) <nl> + <nl> + # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # <nl> + # Input / Output information <nl> + # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # <nl> + @ property <nl> + def data_shapes ( self ) : <nl> + " " " A list of ( name , shape ) pairs specifying the data inputs to this module . " " " <nl> + raise NotImplementedError ( ) <nl> + <nl> + @ property <nl> + def label_shapes ( self ) : <nl> + " " " A list of ( name , shape ) pairs specifying the label inputs to this module . <nl> + If this module does not accept labels - - either it is a module without loss <nl> + function , or it is not binded for training , then this should return an empty <nl> + list ` [ ] ` . <nl> + " " " <nl> + raise NotImplementedError ( ) <nl> + <nl> + @ property <nl> + def output_shapes ( self ) : <nl> + " " " A list of ( name , shape ) pairs specifying the outputs of this module . " " " <nl> + raise NotImplementedError ( ) <nl> + <nl> + # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # <nl> + # Parameters of a module <nl> + # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # <nl> + def get_params ( self ) : <nl> + " " " Get parameters , those are potentially copies of the the actual parameters used <nl> + to do computation on the device . <nl> + <nl> + Returns <nl> + mmmmmm - <nl> + ` ( arg_params , aux_params ) ` , a pair of dictionary of name to value mapping . <nl> + " " " <nl> + raise NotImplementedError ( ) <nl> + <nl> + def init_params ( self , initializer = Uniform ( 0 . 01 ) , arg_params = None , aux_params = None , <nl> + allow_missing = False , force_init = False ) : <nl> + " " " Initialize the parameters and auxiliary states . <nl> + <nl> + Parameters <nl> + mmmmmmmmm - <nl> + initializer : Initializer <nl> + Called to initialize parameters if needed . <nl> + arg_params : dict <nl> + If not None , should be a dictionary of existing arg_params . Initialization <nl> + will be copied from that . <nl> + aux_params : dict <nl> + If not None , should be a dictionary of existing aux_params . Initialization <nl> + will be copied from that . <nl> + allow_missing : bool <nl> + If true , params could contain missing values , and the initializer will be <nl> + called to fill those missing params . <nl> + force_init : bool <nl> + If true , will force re - initialize even if already initialized . <nl> + " " " <nl> + raise NotImplementedError ( ) <nl> + <nl> + def set_params ( self , arg_params , aux_params ) : <nl> + " " " Assign parameter and aux state values . <nl> + <nl> + Parameters <nl> + mmmmmmmmm - <nl> + arg_params : dict <nl> + Dictionary of name to value ( ` NDArray ` ) mapping . <nl> + aux_params : dict <nl> + Dictionary of name to value ( ` NDArray ` ) mapping . <nl> + " " " <nl> + self . init_params ( initializer = None , arg_params = arg_params , aux_params = aux_params , <nl> + allow_missing = False , force_init = True ) <nl> + <nl> + # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # <nl> + # Computations <nl> + # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # <nl> + def forward ( self , data_batch , is_train = None ) : <nl> + " " " Forward computation . <nl> + <nl> + Parameters <nl> + mmmmmmmmm - <nl> + data_batch : DataBatch <nl> + Could be anything with similar API implemented . <nl> + is_train : bool <nl> + Default is ` None ` , which means ` is_train ` takes the value of ` self . for_training ` . <nl> + " " " <nl> + raise NotImplementedError ( ) <nl> + <nl> + def backward ( self , out_grads = None ) : <nl> + " " " Backward computation . <nl> + <nl> + Parameters <nl> + mmmmmmmmm - <nl> + out_grads : NDArray or list of NDArray , optional <nl> + Gradient on the outputs to be propagated back . <nl> + This parameter is only needed when bind is called <nl> + on outputs that are not a loss function . <nl> + " " " <nl> + raise NotImplementedError ( ) <nl> + <nl> + def get_outputs ( self , merge_multi_context = True ) : <nl> + " " " Get outputs of the previous forward computation . <nl> + <nl> + Parameters <nl> + mmmmmmmmm - <nl> + merge_multi_context : bool <nl> + Default is ` True ` . In the case when data - parallelism is used , the outputs <nl> + will be collected from multiple devices . A ` True ` value indicate that we <nl> + should merge the collected results so that they look like from a single <nl> + executor . <nl> + <nl> + Returns <nl> + mmmmmm - <nl> + If ` merge_multi_context ` is ` True ` , it is like ` [ out1 , out2 ] ` . Otherwise , it <nl> + is like ` [ [ out1_dev1 , out1_dev2 ] , [ out2_dev1 , out2_dev2 ] ] ` . All the output <nl> + elements are ` NDArray ` . When ` merge_multi_context ` is ` False ` , those ` NDArray ` <nl> + might live on different devices . <nl> + " " " <nl> + raise NotImplementedError ( ) <nl> + <nl> + def get_input_grads ( self , merge_multi_context = True ) : <nl> + " " " Get the gradients to the inputs , computed in the previous backward computation . <nl> + <nl> + Parameters <nl> + mmmmmmmmm - <nl> + merge_multi_context : bool <nl> + Default is ` True ` . In the case when data - parallelism is used , the gradients <nl> + will be collected from multiple devices . A ` True ` value indicate that we <nl> + should merge the collected results so that they look like from a single <nl> + executor . <nl> + <nl> + Returns <nl> + mmmmmm - <nl> + If ` merge_multi_context ` is ` True ` , it is like ` [ grad1 , grad2 ] ` . Otherwise , it <nl> + is like ` [ [ grad1_dev1 , grad1_dev2 ] , [ grad2_dev1 , grad2_dev2 ] ] ` . All the output <nl> + elements are ` NDArray ` . When ` merge_multi_context ` is ` False ` , those ` NDArray ` <nl> + might live on different devices . <nl> + " " " <nl> + raise NotImplementedError ( ) <nl> + <nl> + def update ( self ) : <nl> + " " " Update parameters according to the installed optimizer and the gradients computed <nl> + in the previous forward - backward batch . <nl> + " " " <nl> + raise NotImplementedError ( ) <nl> + <nl> + def update_metric ( self , eval_metric , labels ) : <nl> + " " " Evaluate and accumulate evaluation metric on outputs of the last forward computation . <nl> + <nl> + Parameters <nl> + mmmmmmmmm - <nl> + eval_metric : EvalMetric <nl> + labels : list of NDArray <nl> + Typically ` data_batch . label ` . <nl> + " " " <nl> + raise NotImplementedError ( ) <nl> + <nl> + # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # <nl> + # module setup <nl> + # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # <nl> + def bind ( self , data_shapes , label_shapes = None , for_training = True , <nl> + inputs_need_grad = False , force_rebind = False , shared_module = None ) : <nl> + " " " Bind the symbols to construct executors . This is necessary before one <nl> + can perform computation with the module . <nl> + <nl> + Parameters <nl> + mmmmmmmmm - <nl> + data_shapes : list of ( str , tuple ) <nl> + Typically is ` data_iter . provide_data ` . <nl> + label_shapes : list of ( str , tuple ) <nl> + Typically is ` data_iter . provide_label ` . <nl> + for_training : bool <nl> + Default is ` True ` . Whether the executors should be bind for training . <nl> + inputs_need_grad : bool <nl> + Default is ` False ` . Whether the gradients to the input data need to be computed . <nl> + Typically this is not needed . But this might be needed when implementing composition <nl> + of modules . <nl> + force_rebind : bool <nl> + Default is ` False ` . This function does nothing if the executors are already <nl> + binded . But with this ` True ` , the executors will be forced to rebind . <nl> + shared_module : Module <nl> + Default is ` None ` . This is used in bucketing . When not ` None ` , the shared module <nl> + essentially corresponds to a different bucket - - a module with different symbol <nl> + but with the same sets of parameters ( e . g . unrolled RNNs with different lengths ) . <nl> + " " " <nl> + raise NotImplementedError ( ) <nl> + <nl> + def init_optimizer ( self , kvstore = ' local ' , optimizer = ' sgd ' , <nl> + optimizer_params = ( ( ' learning_rate ' , 0 . 01 ) , ) , force_init = False ) : <nl> + " " " Install and initialize optimizers . <nl> + <nl> + Parameters <nl> + mmmmmmmmm - <nl> + kvstore : str or KVStore <nl> + Default ` ' local ' ` . <nl> + optimizer : str or Optimizer <nl> + Default ` ' sgd ' ` <nl> + optimizer_params : dict <nl> + Default ` ( ( ' learning_rate ' , 0 . 01 ) , ) ` . The default value is not a dictionary , <nl> + just to avoid pylint warning of dangerous default values . <nl> + force_init : bool <nl> + Default ` False ` , indicating whether we should force re - initializing the <nl> + optimizer in the case an optimizer is already installed . <nl> + " " " <nl> + raise NotImplementedError ( ) <nl> + <nl> + # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # <nl> + # misc <nl> + # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # <nl> + @ property <nl> + def symbol ( self ) : <nl> + " " " Get the symbol associated with this module . <nl> + <nl> + Except for ` Module ` , for other types of modules ( e . g . ` BucketingModule ` ) , this <nl> + property might not be a constant throughout its life time . Some modules might <nl> + not even be associated with any symbols . <nl> + " " " <nl> + return self . _symbol <nl> new file mode 100644 <nl> index 00000000000 . . 60aa258162c <nl> mmm / dev / null <nl> ppp b / python / mxnet / module / bucketing_module . py <nl> <nl> + # pylint : disable = too - many - instance - attributes , too - many - arguments <nl> + " " " A ` BucketingModule ` implement the ` BaseModule ` API , and allows multiple <nl> + symbols to be used depending on the ` bucket_key ` provided by each different <nl> + mini - batch of data . <nl> + " " " <nl> + <nl> + import logging <nl> + <nl> + from . . import context as ctx <nl> + <nl> + from . . initializer import Uniform <nl> + <nl> + from . base_module import BaseModule <nl> + from . module import Module <nl> + <nl> + class BucketingModule ( BaseModule ) : <nl> + " " " A bucketing module is a module that support bucketing . <nl> + <nl> + Parameters <nl> + mmmmmmmmm - <nl> + sym_gen : function <nl> + A function when called with a bucket key , returns a triple <nl> + ` ( symbol , data_names , label_names ) ` . <nl> + default_bucket_key : str ( or any python object ) <nl> + The key for the default bucket . <nl> + logger : Logger <nl> + context : Context or list of Context <nl> + Default ` cpu ( ) ` <nl> + work_load_list : list of number <nl> + Default ` None ` , indicating uniform workload . <nl> + " " " <nl> + def __init__ ( self , sym_gen , default_bucket_key = None , <nl> + logger = logging , context = ctx . cpu ( ) , work_load_list = None ) : <nl> + super ( BucketingModule , self ) . __init__ ( logger = logger ) <nl> + <nl> + assert default_bucket_key is not None <nl> + self . _default_bucket_key = default_bucket_key <nl> + <nl> + self . _sym_gen = sym_gen <nl> + self . _context = context <nl> + self . _work_load_list = work_load_list <nl> + <nl> + self . _buckets = { } <nl> + self . _curr_module = None <nl> + <nl> + def _reset_bind ( self ) : <nl> + " " " Internal utility function to reset binding . " " " <nl> + self . binded = False <nl> + self . _buckets = { } <nl> + self . _curr_module = None <nl> + <nl> + @ property <nl> + def data_names ( self ) : <nl> + " " " A list of names for data required by this module . " " " <nl> + if self . binded : <nl> + return self . _curr_module . data_names <nl> + else : <nl> + _ , data_names , _ = self . _sym_gen ( self . _default_bucket_key ) <nl> + return data_names <nl> + <nl> + @ property <nl> + def output_names ( self ) : <nl> + " " " A list of names for the outputs of this module . " " " <nl> + if self . binded : <nl> + return self . _curr_module . output_names <nl> + else : <nl> + symbol , _ , _ = self . _sym_gen ( self . _default_bucket_key ) <nl> + return symbol . list_outputs ( ) <nl> + <nl> + @ property <nl> + def data_shapes ( self ) : <nl> + " " " Get data shapes . <nl> + Returns <nl> + mmmmmm - <nl> + A list of ` ( name , shape ) ` pairs . <nl> + " " " <nl> + assert self . binded <nl> + return self . _curr_module . data_shapes <nl> + <nl> + @ property <nl> + def label_shapes ( self ) : <nl> + " " " Get label shapes . <nl> + Returns <nl> + mmmmmm - <nl> + A list of ` ( name , shape ) ` pairs . The return value could be ` None ` if <nl> + the module does not need labels , or if the module is not binded for <nl> + training ( in this case , label information is not available ) . <nl> + " " " <nl> + assert self . binded <nl> + return self . _curr_module . label_shapes <nl> + <nl> + @ property <nl> + def output_shapes ( self ) : <nl> + " " " Get output shapes . <nl> + Returns <nl> + mmmmmm - <nl> + A list of ` ( name , shape ) ` pairs . <nl> + " " " <nl> + assert self . binded <nl> + return self . _curr_module . label_shapes <nl> + <nl> + def get_params ( self ) : <nl> + " " " Get current parameters . <nl> + Returns <nl> + mmmmmm - <nl> + ` ( arg_params , aux_params ) ` , each a dictionary of name to parameters ( in <nl> + ` NDArray ` ) mapping . <nl> + " " " <nl> + assert self . binded and self . params_initialized <nl> + return self . _curr_module . get_params ( ) <nl> + <nl> + def init_params ( self , initializer = Uniform ( 0 . 01 ) , arg_params = None , aux_params = None , <nl> + allow_missing = False , force_init = False ) : <nl> + " " " Initialize parameters . <nl> + <nl> + Parameters <nl> + mmmmmmmmm - <nl> + initializer : Initializer <nl> + arg_params : dict <nl> + Default ` None ` . Existing parameters . This has higher priority than ` initializer ` . <nl> + aux_params : dict <nl> + Default ` None ` . Existing auxiliary states . This has higher priority than ` initializer ` . <nl> + allow_missing : bool <nl> + Allow missing values in ` arg_params ` and ` aux_params ` ( if not ` None ` ) . In this case , <nl> + missing values will be filled with ` initializer ` . <nl> + force_init : bool <nl> + Default ` False ` . <nl> + " " " <nl> + if self . params_initialized and not force_init : <nl> + return <nl> + assert self . binded , ' call bind before initializing the parameters ' <nl> + self . _curr_module . init_params ( initializer = initializer , arg_params = arg_params , <nl> + aux_params = aux_params , allow_missing = allow_missing , <nl> + force_init = force_init ) <nl> + self . params_initialized = True <nl> + <nl> + def bind ( self , data_shapes , label_shapes = None , for_training = True , <nl> + inputs_need_grad = False , force_rebind = False , shared_module = None ) : <nl> + " " " Binding for a ` BucketingModule ` means setting up the buckets and bind the <nl> + executor for the default bucket key . Executors corresponding to other keys are <nl> + binded afterwards with ` switch_bucket ` . <nl> + <nl> + Parameters <nl> + mmmmmmmmm - <nl> + data_shapes : list of ( str , tuple ) <nl> + This should correspond to the symbol for the default bucket . <nl> + label_shapes : list of ( str , tuple ) <nl> + This should correspond to the symbol for the default bucket . <nl> + for_training : bool <nl> + Default is ` True ` . <nl> + inputs_need_grad : bool <nl> + Default is ` False ` . <nl> + force_rebind : bool <nl> + Default is ` False ` . <nl> + shared_module : BucketingModule <nl> + Default is ` None ` . This value is currently not used . <nl> + " " " <nl> + # force rebinding is typically used when one want to switch from <nl> + # training to prediction phase . <nl> + if force_rebind : <nl> + self . _reset_bind ( ) <nl> + <nl> + if self . binded : <nl> + self . logger . warning ( ' Already binded , ignoring bind ( ) ' ) <nl> + return <nl> + <nl> + assert shared_module is None , ' shared_module for BucketingModule is not supported ' <nl> + <nl> + self . for_training = for_training <nl> + self . inputs_need_grad = inputs_need_grad <nl> + self . binded = True <nl> + <nl> + symbol , data_names , label_names = self . _sym_gen ( self . _default_bucket_key ) <nl> + module = Module ( symbol , data_names , label_names , logger = self . logger , <nl> + context = self . _context , work_load_list = self . _work_load_list ) <nl> + module . bind ( data_shapes , label_shapes , for_training , inputs_need_grad , <nl> + force_rebind = False , shared_module = None ) <nl> + self . _curr_module = module <nl> + self . _buckets [ self . _default_bucket_key ] = module <nl> + <nl> + def switch_bucket ( self , bucket_key , data_shapes , label_shapes = None ) : <nl> + " " " Switch to a different bucket . This will change ` self . curr_module ` . <nl> + <nl> + Parameters <nl> + mmmmmmmmm - <nl> + bucket_key : str ( or any python object ) <nl> + The key of the target bucket . <nl> + data_shapes : list of ( str , tuple ) <nl> + Typically ` data_batch . provide_data ` . <nl> + label_shapes : list of ( str , tuple ) <nl> + Typically ` data_batch . provide_label ` . <nl> + " " " <nl> + assert self . binded , ' call bind before switching bucket ' <nl> + if not self . _buckets . has_key ( bucket_key ) : <nl> + symbol , data_names , label_names = self . _sym_gen ( bucket_key ) <nl> + module = Module ( symbol , data_names , label_names , <nl> + logger = self . logger , context = self . _context , <nl> + work_load_list = self . _work_load_list ) <nl> + module . bind ( data_shapes , label_shapes , self . _curr_module . for_training , <nl> + self . _curr_module . inputs_need_grad , <nl> + force_rebind = False , shared_module = self . _curr_module ) <nl> + self . _buckets [ bucket_key ] = module <nl> + <nl> + self . _curr_module = self . _buckets [ bucket_key ] <nl> + <nl> + def init_optimizer ( self , kvstore = ' local ' , optimizer = ' sgd ' , <nl> + optimizer_params = ( ( ' learning_rate ' , 0 . 01 ) , ) , <nl> + force_init = False ) : <nl> + " " " Install and initialize optimizers . <nl> + <nl> + Parameters <nl> + mmmmmmmmm - <nl> + kvstore : str or KVStore <nl> + Default ` ' local ' ` . <nl> + optimizer : str or Optimizer <nl> + Default ` ' sgd ' ` <nl> + optimizer_params : dict <nl> + Default ` ( ( ' learning_rate ' , 0 . 01 ) , ) ` . The default value is not a dictionary , <nl> + just to avoid pylint warning of dangerous default values . <nl> + force_init : bool <nl> + Default ` False ` , indicating whether we should force re - initializing the <nl> + optimizer in the case an optimizer is already installed . <nl> + " " " <nl> + assert self . binded and self . params_initialized <nl> + if self . optimizer_initialized and not force_init : <nl> + self . logger . warning ( ' optimizer already initialized , ignoring . ' ) <nl> + return <nl> + <nl> + self . _curr_module . init_optimizer ( kvstore , optimizer , optimizer_params , <nl> + force_init = force_init ) <nl> + for mod in self . _buckets . itervalues ( ) : <nl> + if mod is not self . _curr_module : <nl> + mod . borrow_optimizer ( self . _curr_module ) <nl> + <nl> + self . optimizer_initialized = True <nl> + <nl> + def forward ( self , data_batch , is_train = None ) : <nl> + " " " Forward computation . <nl> + <nl> + Parameters <nl> + mmmmmmmmm - <nl> + data_batch : DataBatch <nl> + is_train : bool <nl> + Default is ` None ` , in which case ` is_train ` is take as ` self . for_training ` . <nl> + " " " <nl> + assert self . binded and self . params_initialized <nl> + self . switch_bucket ( data_batch . bucket_key , data_batch . provide_data , <nl> + data_batch . provide_label ) <nl> + self . _curr_module . forward ( data_batch , is_train = is_train ) <nl> + <nl> + def backward ( self , out_grads = None ) : <nl> + " " " Backward computation . " " " <nl> + assert self . binded and self . params_initialized <nl> + self . _curr_module . backward ( out_grads = out_grads ) <nl> + <nl> + def update ( self ) : <nl> + " " " Update parameters according to installed optimizer and the gradient computed <nl> + in the previous forward - backward cycle . <nl> + " " " <nl> + assert self . binded and self . params_initialized and self . optimizer_initialized <nl> + self . _curr_module . update ( ) <nl> + <nl> + def get_outputs ( self , merge_multi_context = True ) : <nl> + " " " Get outputs from a previous forward computation . <nl> + <nl> + Parameters <nl> + mmmmmmmmm - <nl> + merge_multi_context : bool <nl> + Default is ` True ` . In the case when data - parallelism is used , the outputs <nl> + will be collected from multiple devices . A ` True ` value indicate that we <nl> + should merge the collected results so that they look like from a single <nl> + executor . <nl> + <nl> + Returns <nl> + mmmmmm - <nl> + If ` merge_multi_context ` is ` True ` , it is like ` [ out1 , out2 ] ` . Otherwise , it <nl> + is like ` [ [ out1_dev1 , out1_dev2 ] , [ out2_dev1 , out2_dev2 ] ] ` . All the output <nl> + elements are numpy arrays . <nl> + " " " <nl> + assert self . binded and self . params_initialized <nl> + return self . _curr_module . get_outputs ( merge_multi_context = merge_multi_context ) <nl> + <nl> + def get_input_grads ( self , merge_multi_context = True ) : <nl> + " " " Get the gradients with respect to the inputs of the module . <nl> + <nl> + Parameters <nl> + mmmmmmmmm - <nl> + merge_multi_context : bool <nl> + Default is ` True ` . In the case when data - parallelism is used , the outputs <nl> + will be collected from multiple devices . A ` True ` value indicate that we <nl> + should merge the collected results so that they look like from a single <nl> + executor . <nl> + <nl> + Returns <nl> + mmmmmm - <nl> + If ` merge_multi_context ` is ` True ` , it is like ` [ grad1 , grad2 ] ` . Otherwise , it <nl> + is like ` [ [ grad1_dev1 , grad1_dev2 ] , [ grad2_dev1 , grad2_dev2 ] ] ` . All the output <nl> + elements are ` NDArray ` . <nl> + " " " <nl> + assert self . binded and self . params_initialized and self . inputs_need_grad <nl> + return self . _curr_module . get_input_grads ( merge_multi_context = merge_multi_context ) <nl> + <nl> + def update_metric ( self , eval_metric , labels ) : <nl> + " " " Evaluate and accumulate evaluation metric on outputs of the last forward computation . <nl> + <nl> + Parameters <nl> + mmmmmmmmm - <nl> + eval_metric : EvalMetric <nl> + labels : list of NDArray <nl> + Typically ` data_batch . label ` . <nl> + " " " <nl> + assert self . binded and self . params_initialized <nl> + self . _curr_module . update_metric ( eval_metric , labels ) <nl> + <nl> + @ property <nl> + def symbol ( self ) : <nl> + " " " The symbol of the current bucket being used . " " " <nl> + assert self . binded <nl> + return self . _curr_module . symbol <nl> new file mode 100644 <nl> index 00000000000 . . fea204d644c <nl> mmm / dev / null <nl> ppp b / python / mxnet / module / executor_group . py <nl> <nl> + # pylint : disable = too - many - instance - attributes , too - many - locals <nl> + # pylint : disable = too - many - branches , too - many - statements , too - many - arguments <nl> + " " " Executor group is a convenient tool for managing a group of executors . " " " <nl> + <nl> + import numpy as np <nl> + import logging <nl> + <nl> + from . . import context as ctx <nl> + from . . import ndarray as nd <nl> + <nl> + from . . base import mx_real_t <nl> + from . . executor_manager import _split_input_slice , _load_data , _load_label <nl> + <nl> + def _merge_multi_context ( outputs ) : <nl> + " " " Merge outputs that lives on multiple context into one , so that they look <nl> + like living on one context . <nl> + " " " <nl> + outputs = [ nd . concatenate ( x , always_copy = False ) for x in outputs ] <nl> + return outputs <nl> + <nl> + class DataParallelExecutorGroup ( object ) : <nl> + " " " DataParallelExecutorGroup is a group of executors that lives on a group of devices . <nl> + This is a helper class used to implement data parallelization . Each mini - batch will <nl> + be split and run on the devices . <nl> + <nl> + Parameters <nl> + mmmmmmmmm - <nl> + symbol : Symbol <nl> + The common symbolic computation graph for all executors . <nl> + contexts : list <nl> + A list of contexts . <nl> + workload : list <nl> + If not ` None ` , could be a list of numbers that specify the workload to be assigned <nl> + to different context . Larger number indicate heavier workload . <nl> + data_shapes : list <nl> + Should be a list of ( name , shape ) tuples , for the shapes of data . Note the order is <nl> + important and should be the same as the order that the ` DataIter ` provide the data . <nl> + label_shapes : list <nl> + Should be a list of ( name , shape ) tuples , for the shapes of label . Note the order is <nl> + important and should be the same as the order that the ` DataIter ` provide the label . <nl> + param_names : list <nl> + A list of strings , indicating the names of parameters ( e . g . weights , filters , etc . ) <nl> + in the computation graph . <nl> + for_training : bool <nl> + Indicate whether the executors should be bind for training . When not doing training , <nl> + the memory for gradients will not be allocated . <nl> + inputs_need_grad : bool <nl> + Indicate whether the gradients for the input data should be computed . This is currently <nl> + not used . It will be useful for implementing composition of modules . <nl> + shared_group : DataParallelExecutorGroup <nl> + Default is ` None ` . This is used in bucketing . When not ` None ` , it should be a executor <nl> + group corresponding to a different bucket . In other words , it will correspond to a different <nl> + symbol but with the same set of parameters ( e . g . unrolled RNNs with different lengths ) . <nl> + In this case , many memory will be shared . <nl> + input_types : list <nl> + Default is ` None ` . When not ` None ` , can be used to specify the data type for each <nl> + of the data / label inputs . <nl> + logger : Logger <nl> + Default is ` logging ` . <nl> + " " " <nl> + def __init__ ( self , symbol , contexts , workload , data_shapes , label_shapes , param_names , <nl> + for_training , inputs_need_grad , shared_group = None , input_types = None , <nl> + logger = logging ) : <nl> + self . param_names = param_names <nl> + self . arg_names = symbol . list_arguments ( ) <nl> + self . aux_names = symbol . list_auxiliary_states ( ) <nl> + <nl> + self . symbol = symbol <nl> + self . contexts = contexts <nl> + self . workload = workload <nl> + <nl> + self . for_training = for_training <nl> + self . inputs_need_grad = inputs_need_grad <nl> + <nl> + self . input_types = input_types <nl> + self . logger = logger <nl> + <nl> + if shared_group is not None : <nl> + self . shared_data_arrays = shared_group . shared_data_arrays <nl> + else : <nl> + self . shared_data_arrays = [ { } for _ in contexts ] <nl> + <nl> + # initialize some instance variables <nl> + self . batch_size = None <nl> + self . slices = None <nl> + self . execs = None <nl> + self . data_arrays = None <nl> + self . label_arrays = None <nl> + self . param_arrays = None <nl> + self . grad_arrays = None <nl> + self . aux_arrays = None <nl> + <nl> + # calculate workload and bind executors <nl> + self . decide_slices ( data_shapes ) <nl> + self . bind_exec ( data_shapes , label_shapes , shared_group ) <nl> + <nl> + def decide_slices ( self , data_shapes ) : <nl> + " " " Decide the slices for each context according to the workload . <nl> + <nl> + Parameters <nl> + mmmmmmmmm - <nl> + data_shapes : list <nl> + list of ( name , shape ) specifying the shapes for the input data . <nl> + " " " <nl> + assert len ( data_shapes ) > 0 <nl> + self . batch_size = data_shapes [ 0 ] [ 1 ] [ 0 ] <nl> + for shape in data_shapes : <nl> + assert shape [ 1 ] [ 0 ] = = self . batch_size , " all the data must have the same batch size " <nl> + <nl> + self . slices = _split_input_slice ( self . batch_size , self . workload ) <nl> + <nl> + def bind_exec ( self , data_shapes , label_shapes , shared_group ) : <nl> + " " " Bind executors on their respective devices . <nl> + <nl> + Parameters <nl> + mmmmmmmmm - <nl> + data_shapes : list <nl> + label_shapes : list <nl> + shared_group : DataParallelExecutorGroup <nl> + " " " <nl> + self . execs = [ ] <nl> + for i in range ( len ( self . contexts ) ) : <nl> + self . execs . append ( self . _bind_ith_exec ( i , data_shapes , label_shapes , shared_group ) ) <nl> + <nl> + # convenient data structures <nl> + self . data_arrays = [ [ ( self . slices [ i ] , e . arg_dict [ name ] ) for i , e in enumerate ( self . execs ) ] <nl> + for name , _ in data_shapes ] <nl> + if label_shapes is not None : <nl> + self . label_arrays = [ [ ( self . slices [ i ] , e . arg_dict [ name ] ) <nl> + for i , e in enumerate ( self . execs ) ] <nl> + for name , _ in label_shapes ] <nl> + else : <nl> + self . label_arrays = None <nl> + <nl> + self . param_arrays = [ [ exec_ . arg_arrays [ i ] for exec_ in self . execs ] <nl> + for i , name in enumerate ( self . arg_names ) <nl> + if name in self . param_names ] <nl> + if self . for_training : <nl> + self . grad_arrays = [ [ exec_ . grad_arrays [ i ] for exec_ in self . execs ] <nl> + for i , name in enumerate ( self . arg_names ) <nl> + if name in self . param_names ] <nl> + else : <nl> + self . grad_arrays = None <nl> + <nl> + data_names = [ x [ 0 ] for x in data_shapes ] <nl> + if self . inputs_need_grad : <nl> + self . input_grad_arrays = [ [ exec_ . grad_arrays [ i ] for exec_ in self . execs ] <nl> + for i , name in enumerate ( self . arg_names ) <nl> + if name in data_names ] <nl> + else : <nl> + self . input_grad_arrays = None <nl> + <nl> + self . aux_arrays = [ [ exec_ . aux_arrays [ i ] for exec_ in self . execs ] <nl> + for i in range ( len ( self . aux_names ) ) ] <nl> + <nl> + def set_params ( self , arg_params , aux_params ) : <nl> + " " " Assign , i . e . copy parameters to all the executors . <nl> + <nl> + Parameters <nl> + mmmmmmmmm - <nl> + arg_params : dict <nl> + A dictionary of name to ` NDArray ` parameter mapping . <nl> + aux_params : dict <nl> + A dictionary of name to ` NDArray ` auxiliary variable mapping . <nl> + " " " <nl> + for exec_ in self . execs : <nl> + exec_ . copy_params_from ( arg_params , aux_params ) <nl> + <nl> + def get_params ( self , arg_params , aux_params ) : <nl> + " " " Copy data from each executor to ` arg_params ` and ` aux_params ` . <nl> + <nl> + Parameters <nl> + mmmmmmmmm - <nl> + arg_params : list of NDArray <nl> + target parameter arrays <nl> + aux_params : list of NDArray <nl> + target aux arrays <nl> + <nl> + Notes <nl> + mmm - - <nl> + - This function will inplace update the NDArrays in arg_params and aux_params . <nl> + " " " <nl> + for name , block in zip ( self . param_names , self . param_arrays ) : <nl> + weight = sum ( w . copyto ( ctx . cpu ( ) ) for w in block ) / len ( block ) <nl> + weight . astype ( arg_params [ name ] . dtype ) . copyto ( arg_params [ name ] ) <nl> + for name , block in zip ( self . aux_names , self . aux_arrays ) : <nl> + weight = sum ( w . copyto ( ctx . cpu ( ) ) for w in block ) / len ( block ) <nl> + weight . astype ( aux_params [ name ] . dtype ) . copyto ( aux_params [ name ] ) <nl> + <nl> + def forward ( self , data_batch , is_train = None ) : <nl> + " " " Split ` data_batch ` according to workload and run forward on each devices . <nl> + <nl> + Parameters <nl> + mmmmmmmmm - <nl> + data_batch : DataBatch <nl> + Or could be any object implementing similar interface . <nl> + is_train : bool <nl> + The hint for the backend , indicating whether we are during training phase . <nl> + Default is ` None ` , then the value ` self . for_training ` will be used . <nl> + Returns <nl> + mmmmmm - <nl> + <nl> + " " " <nl> + _load_data ( data_batch , self . data_arrays ) <nl> + if is_train is None : <nl> + is_train = self . for_training <nl> + <nl> + if is_train : <nl> + # It could be the case that even though we are binded for training , we <nl> + # still do not have label arrays . For example , this could happen if we <nl> + # are using a module without a loss function ( the user will compute the <nl> + # loss and gradients using some other ways ) , and we do not need the label <nl> + # here . <nl> + if self . label_arrays is not None : <nl> + _load_label ( data_batch , self . label_arrays ) <nl> + <nl> + for exec_ in self . execs : <nl> + exec_ . forward ( is_train = is_train ) <nl> + <nl> + def get_output_shapes ( self ) : <nl> + " " " Get the shapes of the outputs . " " " <nl> + outputs = self . execs [ 0 ] . outputs <nl> + shapes = [ out . shape for out in outputs ] <nl> + shapes = [ tuple ( [ self . batch_size ] + list ( shape [ 1 : ] ) ) for shape in shapes ] <nl> + return zip ( self . symbol . list_outputs ( ) , shapes ) <nl> + <nl> + def get_outputs ( self , merge_multi_context = True ) : <nl> + " " " Get outputs of the previous forward computation . <nl> + <nl> + Parameters <nl> + mmmmmmmmm - <nl> + merge_multi_context : bool <nl> + Default is ` True ` . In the case when data - parallelism is used , the outputs <nl> + will be collected from multiple devices . A ` True ` value indicate that we <nl> + should merge the collected results so that they look like from a single <nl> + executor . <nl> + <nl> + Returns <nl> + mmmmmm - <nl> + If ` merge_multi_context ` is ` True ` , it is like ` [ out1 , out2 ] ` . Otherwise , it <nl> + is like ` [ [ out1_dev1 , out1_dev2 ] , [ out2_dev1 , out2_dev2 ] ] ` . All the output <nl> + elements are ` NDArray ` . <nl> + " " " <nl> + outputs = [ [ exec_ . outputs [ i ] for exec_ in self . execs ] <nl> + for i in range ( len ( self . execs [ 0 ] . outputs ) ) ] <nl> + if merge_multi_context : <nl> + outputs = _merge_multi_context ( outputs ) <nl> + return outputs <nl> + <nl> + def get_input_grads ( self , merge_multi_context = True ) : <nl> + " " " Get the gradients with respect to the inputs of the module . <nl> + <nl> + Parameters <nl> + mmmmmmmmm - <nl> + merge_multi_context : bool <nl> + Default is ` True ` . In the case when data - parallelism is used , the outputs <nl> + will be collected from multiple devices . A ` True ` value indicate that we <nl> + should merge the collected results so that they look like from a single <nl> + executor . <nl> + <nl> + Returns <nl> + mmmmmm - <nl> + If ` merge_multi_context ` is ` True ` , it is like ` [ grad1 , grad2 ] ` . Otherwise , it <nl> + is like ` [ [ grad1_dev1 , grad1_dev2 ] , [ grad2_dev1 , grad2_dev2 ] ] ` . All the output <nl> + elements are ` NDArray ` . <nl> + " " " <nl> + assert self . inputs_need_grad <nl> + if merge_multi_context : <nl> + return _merge_multi_context ( self . input_grad_arrays ) <nl> + return self . input_grad_arrays <nl> + <nl> + def backward ( self , out_grads = None ) : <nl> + " " " Run backward on all devices . A backward should be called after <nl> + a call to the forward function . Backward cannot be called unless <nl> + ` self . for_training ` is ` True ` . <nl> + <nl> + Parameters <nl> + mmmmmmmmm - <nl> + out_grads : NDArray or list of NDArray , optional <nl> + Gradient on the outputs to be propagated back . <nl> + This parameter is only needed when bind is called <nl> + on outputs that are not a loss function . <nl> + " " " <nl> + assert self . for_training , ' re - bind with for_training = True to run backward ' <nl> + if out_grads is None : <nl> + out_grads = [ ] <nl> + <nl> + for i , ( exec_ , islice ) in enumerate ( zip ( self . execs , self . slices ) ) : <nl> + out_grads_slice = [ grad [ islice ] . as_in_context ( self . contexts [ i ] ) <nl> + for grad in out_grads ] <nl> + exec_ . backward ( out_grads = out_grads_slice ) <nl> + <nl> + def update_metric ( self , eval_metric , labels ) : <nl> + " " " Accumulate the performance according to ` eval_metric ` on all devices . <nl> + <nl> + Parameters <nl> + mmmmmmmmm - <nl> + eval_metric : EvalMetric <nl> + The metric used for evaluation . <nl> + labels : list of NDArray <nl> + Typically comes from ` label ` of a ` DataBatch ` . <nl> + " " " <nl> + for texec , islice in zip ( self . execs , self . slices ) : <nl> + labels_slice = [ label [ islice ] for label in labels ] <nl> + eval_metric . update ( labels_slice , texec . outputs ) <nl> + <nl> + def _bind_ith_exec ( self , i , data_shapes , label_shapes , shared_group ) : <nl> + " " " Internal utility function to bind the i - th executor . <nl> + " " " <nl> + data_shapes = self . _sliced_shape ( data_shapes , i ) <nl> + if label_shapes is not None : <nl> + label_shapes = self . _sliced_shape ( label_shapes , i ) <nl> + shared_exec = None if shared_group is None else shared_group . execs [ i ] <nl> + context = self . contexts [ i ] <nl> + shared_data_arrays = self . shared_data_arrays [ i ] <nl> + <nl> + input_shapes = dict ( data_shapes ) <nl> + if label_shapes is not None : <nl> + input_shapes . update ( dict ( label_shapes ) ) <nl> + <nl> + arg_shapes , _ , aux_shapes = self . symbol . infer_shape ( * * input_shapes ) <nl> + assert arg_shapes is not None , " shape inference failed " <nl> + <nl> + if self . input_types is None : <nl> + input_types = { k : mx_real_t for k in input_shapes . keys ( ) } <nl> + else : <nl> + input_types = self . input_types <nl> + arg_types , _ , aux_types = self . symbol . infer_type ( * * input_types ) <nl> + assert arg_types is not None , " type inference failed " <nl> + <nl> + data_names = [ x [ 0 ] for x in data_shapes ] <nl> + <nl> + arg_arrays = [ ] <nl> + grad_arrays = { } if self . for_training else None <nl> + grad_req = { } <nl> + for name in self . arg_names : <nl> + if self . for_training : <nl> + if name in self . param_names : <nl> + grad_req [ name ] = ' write ' <nl> + elif name in data_names : <nl> + grad_req [ name ] = ' write ' if self . inputs_need_grad else ' null ' <nl> + else : <nl> + grad_req [ name ] = ' null ' <nl> + else : <nl> + grad_req [ name ] = ' null ' <nl> + <nl> + def _get_or_reshape ( name , shared_data_arrays , arg_shape , arg_type , context , logger ) : <nl> + " " " Internal helper to get a memory block or re - use by re - shaping " " " <nl> + if name in shared_data_arrays : <nl> + arg_arr = shared_data_arrays [ name ] <nl> + <nl> + if np . prod ( arg_arr . shape ) > = np . prod ( arg_shape ) : <nl> + # nice , we can directly re - use this data blob <nl> + assert arg_arr . dtype = = arg_type <nl> + arg_arr = arg_arr . reshape ( arg_shape ) <nl> + else : <nl> + logger . warning ( ( ' bucketing : data " % s " has a shape % s ' % ( name , arg_shape ) ) + <nl> + ( ' , which is larger than already allocated ' ) + <nl> + ( ' shape % s ' % ( arg_arr . shape , ) ) + <nl> + ( ' . Need to re - allocate . Consider putting ' ) + <nl> + ( ' default_bucket_key to ' ) + <nl> + ( ' be the bucket taking the largest input for better ' ) + <nl> + ( ' memory sharing . ' ) ) <nl> + arg_arr = nd . zeros ( arg_shape , ctx , dtype = arg_type ) <nl> + <nl> + # replace existing shared array because the new one is bigger <nl> + shared_data_arrays [ name ] = arg_arr <nl> + else : <nl> + arg_arr = nd . zeros ( arg_shape , context , dtype = arg_type ) <nl> + shared_data_arrays [ name ] = arg_arr <nl> + <nl> + return arg_arr <nl> + <nl> + # create or borrow arguments and gradients <nl> + for j in range ( len ( self . arg_names ) ) : <nl> + name = self . arg_names [ j ] <nl> + if name in self . param_names : # model parameter <nl> + if shared_exec is None : <nl> + arg_arr = nd . zeros ( arg_shapes [ j ] , context , dtype = arg_types [ j ] ) <nl> + if grad_req [ name ] ! = ' null ' : <nl> + grad_arr = nd . zeros ( arg_shapes [ j ] , context , dtype = arg_types [ j ] ) <nl> + grad_arrays [ name ] = grad_arr <nl> + else : <nl> + arg_arr = shared_exec . arg_dict [ name ] <nl> + assert arg_arr . shape = = arg_shapes [ j ] <nl> + assert arg_arr . dtype = = arg_types [ j ] <nl> + if grad_req [ name ] ! = ' null ' : <nl> + grad_arrays [ name ] = shared_exec . grad_dict [ name ] <nl> + else : # data or label <nl> + arg_arr = _get_or_reshape ( name , shared_data_arrays , arg_shapes [ j ] , arg_types [ j ] , <nl> + context , self . logger ) <nl> + <nl> + # data might also need grad if inputs_need_grad is True <nl> + if grad_req [ name ] ! = ' null ' : <nl> + grad_arrays [ name ] = _get_or_reshape ( ' grad of ' + name , shared_data_arrays , <nl> + arg_shapes [ j ] , arg_types [ j ] , context , <nl> + self . logger ) <nl> + <nl> + arg_arrays . append ( arg_arr ) <nl> + <nl> + # create or borrow aux variables <nl> + if shared_exec is None : <nl> + aux_arrays = [ nd . zeros ( s , context , dtype = t ) for s , t in zip ( aux_shapes , aux_types ) ] <nl> + else : <nl> + for j , arr in enumerate ( shared_exec . aux_arrays ) : <nl> + assert aux_shapes [ j ] = = arr . shape <nl> + assert aux_types [ j ] = = arr . dtype <nl> + aux_arrays = shared_exec . aux_arrays [ : ] <nl> + <nl> + executor = self . symbol . bind ( ctx = context , args = arg_arrays , <nl> + args_grad = grad_arrays , aux_states = aux_arrays , <nl> + grad_req = grad_req , shared_exec = shared_exec ) <nl> + return executor <nl> + <nl> + def _sliced_shape ( self , shapes , i ) : <nl> + " " " Get the sliced shapes for the i - th executor . <nl> + <nl> + Parameters <nl> + mmmmmmmmm - <nl> + shapes : list of ( str , tuple ) <nl> + The original ( name , shape ) pairs . <nl> + i : int <nl> + Which executor we are dealing with . <nl> + " " " <nl> + return [ ( k , tuple ( [ self . slices [ i ] . stop - self . slices [ i ] . start ] + list ( v [ 1 : ] ) ) ) <nl> + for k , v in shapes ] <nl> new file mode 100644 <nl> index 00000000000 . . 5b22e50f5dc <nl> mmm / dev / null <nl> ppp b / python / mxnet / module / module . py <nl> <nl> + # pylint : disable = too - many - instance - attributes , too - many - arguments , protected - access <nl> + " " " A ` Module ` implement the ` BaseModule ` API by wrapping a ` Symbol ` and one or <nl> + more ` Executor ` for data parallelization . <nl> + " " " <nl> + <nl> + import logging <nl> + <nl> + from . . import context as ctx <nl> + from . . import ndarray as nd <nl> + from . . import optimizer as opt <nl> + <nl> + from . executor_group import DataParallelExecutorGroup <nl> + from . . model import _create_kvstore , _initialize_kvstore , _update_params , _update_params_on_kvstore <nl> + from . . initializer import Uniform <nl> + <nl> + from . base_module import BaseModule <nl> + <nl> + class Module ( BaseModule ) : <nl> + " " " Module is a basic module that wrap a ` Symbol ` . It is functionally the same <nl> + as the ` FeedForward ` model , except under the module API . <nl> + <nl> + Parameters <nl> + mmmmmmmmm - <nl> + symbol : Symbol <nl> + data_names : list of str <nl> + Default is ` ( ' data ' ) ` for a typical model used in image classification . <nl> + label_names : list of str <nl> + Default is ` ( ' softmax_label ' ) ` for a typical model used in image <nl> + classification . <nl> + logger : Logger <nl> + Default is ` logging ` . <nl> + context : Context or list of Context <nl> + Default is ` cpu ( ) ` . <nl> + work_load_list : list of number <nl> + Default ` None ` , indicating uniform workload . <nl> + " " " <nl> + def __init__ ( self , symbol , data_names = ( ' data ' , ) , label_names = ( ' softmax_label ' , ) , <nl> + logger = logging , context = ctx . cpu ( ) , work_load_list = None ) : <nl> + super ( Module , self ) . __init__ ( logger = logger ) <nl> + <nl> + if isinstance ( context , ctx . Context ) : <nl> + context = [ context ] <nl> + self . _context = context <nl> + if work_load_list is None : <nl> + work_load_list = [ 1 ] * len ( self . _context ) <nl> + assert len ( work_load_list ) = = len ( self . _context ) <nl> + self . _work_load_list = work_load_list <nl> + <nl> + self . _symbol = symbol <nl> + <nl> + data_names = list ( data_names ) <nl> + label_names = list ( label_names ) if label_names is not None else [ ] <nl> + <nl> + arg_names = symbol . list_arguments ( ) <nl> + input_names = data_names + label_names <nl> + self . _param_names = [ x for x in arg_names if x not in input_names ] <nl> + self . _aux_names = symbol . list_auxiliary_states ( ) <nl> + self . _data_names = data_names <nl> + self . _label_names = label_names <nl> + self . _output_names = symbol . list_outputs ( ) <nl> + <nl> + self . _arg_params = None <nl> + self . _aux_params = None <nl> + self . _params_dirty = False <nl> + <nl> + self . _optimizer = None <nl> + self . _kvstore = None <nl> + self . _update_on_kvstore = None <nl> + self . _updater = None <nl> + <nl> + self . _exec_group = None <nl> + self . _data_shapes = None <nl> + self . _label_shapes = None <nl> + <nl> + def _reset_bind ( self ) : <nl> + " " " Internal function to reset binded state . " " " <nl> + self . binded = False <nl> + self . _exec_group = None <nl> + self . _data_shapes = None <nl> + self . _label_shapes = None <nl> + <nl> + @ property <nl> + def data_names ( self ) : <nl> + " " " A list of names for data required by this module . " " " <nl> + return self . _data_names <nl> + <nl> + @ property <nl> + def output_names ( self ) : <nl> + " " " A list of names for the outputs of this module . " " " <nl> + return self . _output_names <nl> + <nl> + @ property <nl> + def data_shapes ( self ) : <nl> + " " " Get data shapes . <nl> + Returns <nl> + mmmmmm - <nl> + A list of ` ( name , shape ) ` pairs . <nl> + " " " <nl> + assert self . binded <nl> + return self . _data_shapes <nl> + <nl> + @ property <nl> + def label_shapes ( self ) : <nl> + " " " Get label shapes . <nl> + Returns <nl> + mmmmmm - <nl> + A list of ` ( name , shape ) ` pairs . The return value could be ` None ` if <nl> + the module does not need labels , or if the module is not binded for <nl> + training ( in this case , label information is not available ) . <nl> + " " " <nl> + assert self . binded <nl> + return self . _label_shapes <nl> + <nl> + @ property <nl> + def output_shapes ( self ) : <nl> + " " " Get output shapes . <nl> + Returns <nl> + mmmmmm - <nl> + A list of ` ( name , shape ) ` pairs . <nl> + " " " <nl> + assert self . binded <nl> + return self . _exec_group . get_output_shapes ( ) <nl> + <nl> + def get_params ( self ) : <nl> + " " " Get current parameters . <nl> + Returns <nl> + mmmmmm - <nl> + ` ( arg_params , aux_params ) ` , each a dictionary of name to parameters ( in <nl> + ` NDArray ` ) mapping . <nl> + " " " <nl> + assert self . binded and self . params_initialized <nl> + <nl> + if self . _params_dirty : <nl> + self . _sync_params_from_devices ( ) <nl> + return ( self . _arg_params , self . _aux_params ) <nl> + <nl> + def init_params ( self , initializer = Uniform ( 0 . 01 ) , arg_params = None , aux_params = None , <nl> + allow_missing = False , force_init = False ) : <nl> + " " " Initialize the parameters and auxiliary states . <nl> + <nl> + Parameters <nl> + mmmmmmmmm - <nl> + initializer : Initializer <nl> + Called to initialize parameters if needed . <nl> + arg_params : dict <nl> + If not None , should be a dictionary of existing arg_params . Initialization <nl> + will be copied from that . <nl> + aux_params : dict <nl> + If not None , should be a dictionary of existing aux_params . Initialization <nl> + will be copied from that . <nl> + allow_missing : bool <nl> + If true , params could contain missing values , and the initializer will be <nl> + called to fill those missing params . <nl> + force_init : bool <nl> + If true , will force re - initialize even if already initialized . <nl> + " " " <nl> + if self . params_initialized and not force_init : <nl> + return <nl> + assert self . binded , ' call bind before initializing the parameters ' <nl> + <nl> + if self . _arg_params is None : <nl> + param_arrays = [ nd . zeros ( x [ 0 ] . shape ) for x in self . _exec_group . param_arrays ] <nl> + self . _arg_params = { name : arr for name , arr in zip ( self . _param_names , param_arrays ) } <nl> + <nl> + if self . _aux_params is None : <nl> + aux_arrays = [ nd . zeros ( x [ 0 ] . shape ) for x in self . _exec_group . aux_arrays ] <nl> + self . _aux_params = { name : arr for name , arr in zip ( self . _aux_names , aux_arrays ) } <nl> + <nl> + def _impl ( name , arr , cache ) : <nl> + " " " Internal helper for parameter initialization " " " <nl> + if cache is not None : <nl> + if cache . has_key ( name ) : <nl> + cache [ name ] . copyto ( arr ) <nl> + else : <nl> + assert allow_missing <nl> + initializer ( name , arr ) <nl> + else : <nl> + initializer ( name , arr ) <nl> + <nl> + for name , arr in self . _arg_params . iteritems ( ) : <nl> + _impl ( name , arr , arg_params ) <nl> + <nl> + for name , arr in self . _aux_params . iteritems ( ) : <nl> + _impl ( name , arr , aux_params ) <nl> + <nl> + self . params_initialized = True <nl> + self . _params_dirty = False <nl> + <nl> + # copy the initialized parameters to devices <nl> + self . _exec_group . set_params ( self . _arg_params , self . _aux_params ) <nl> + <nl> + def bind ( self , data_shapes , label_shapes = None , for_training = True , <nl> + inputs_need_grad = False , force_rebind = False , shared_module = None ) : <nl> + " " " Bind the symbols to construct executors . This is necessary before one <nl> + can perform computation with the module . <nl> + <nl> + Parameters <nl> + mmmmmmmmm - <nl> + data_shapes : list of ( str , tuple ) <nl> + Typically is ` data_iter . provide_data ` . <nl> + label_shapes : list of ( str , tuple ) <nl> + Typically is ` data_iter . provide_label ` . <nl> + for_training : bool <nl> + Default is ` True ` . Whether the executors should be bind for training . <nl> + inputs_need_grad : bool <nl> + Default is ` False ` . Whether the gradients to the input data need to be computed . <nl> + Typically this is not needed . But this might be needed when implementing composition <nl> + of modules . <nl> + force_rebind : bool <nl> + Default is ` False ` . This function does nothing if the executors are already <nl> + binded . But with this ` True ` , the executors will be forced to rebind . <nl> + shared_module : Module <nl> + Default is ` None ` . This is used in bucketing . When not ` None ` , the shared module <nl> + essentially corresponds to a different bucket - - a module with different symbol <nl> + but with the same sets of parameters ( e . g . unrolled RNNs with different lengths ) . <nl> + " " " <nl> + # force rebinding is typically used when one want to switch from <nl> + # training to prediction phase . <nl> + if force_rebind : <nl> + self . _reset_bind ( ) <nl> + <nl> + if self . binded : <nl> + self . logger . warning ( ' Already binded , ignoring bind ( ) ' ) <nl> + return <nl> + <nl> + self . for_training = for_training <nl> + self . inputs_need_grad = inputs_need_grad <nl> + self . binded = True <nl> + <nl> + if not for_training : <nl> + assert not inputs_need_grad <nl> + else : <nl> + pass <nl> + # this is not True , as some module might not contains a loss function <nl> + # that consumes the labels <nl> + # assert label_shapes is not None <nl> + <nl> + self . _data_shapes = data_shapes <nl> + self . _label_shapes = label_shapes <nl> + <nl> + if shared_module is not None : <nl> + assert isinstance ( shared_module , Module ) and \ <nl> + shared_module . binded and shared_module . params_initialized <nl> + shared_group = shared_module . _exec_group <nl> + else : <nl> + shared_group = None <nl> + <nl> + self . _exec_group = DataParallelExecutorGroup ( self . _symbol , self . _context , <nl> + self . _work_load_list , data_shapes , <nl> + label_shapes , self . _param_names , <nl> + for_training , inputs_need_grad , <nl> + shared_group , logger = self . logger ) <nl> + <nl> + if shared_module is not None : <nl> + self . params_initialized = True <nl> + self . _arg_params = shared_module . _arg_params <nl> + self . _aux_params = shared_module . _aux_params <nl> + <nl> + if self . params_initialized : <nl> + # if the parameters are already initialized , we are re - binding <nl> + # so automatically copy the already initialized params <nl> + self . _exec_group . set_params ( self . _arg_params , self . _aux_params ) <nl> + <nl> + if shared_module is not None and shared_module . optimizer_initialized : <nl> + self . borrow_optimizer ( shared_module ) <nl> + <nl> + def init_optimizer ( self , kvstore = ' local ' , optimizer = ' sgd ' , <nl> + optimizer_params = ( ( ' learning_rate ' , 0 . 01 ) , ) , force_init = False ) : <nl> + " " " Install and initialize optimizers . <nl> + <nl> + Parameters <nl> + mmmmmmmmm - <nl> + kvstore : str or KVStore <nl> + Default ` ' local ' ` . <nl> + optimizer : str or Optimizer <nl> + Default ` ' sgd ' ` <nl> + optimizer_params : dict <nl> + Default ` ( ( ' learning_rate ' , 0 . 01 ) , ) ` . The default value is not a dictionary , <nl> + just to avoid pylint warning of dangerous default values . <nl> + force_init : bool <nl> + Default ` False ` , indicating whether we should force re - initializing the <nl> + optimizer in the case an optimizer is already installed . <nl> + " " " <nl> + assert self . binded and self . params_initialized <nl> + <nl> + if self . optimizer_initialized and not force_init : <nl> + self . logger . warning ( ' optimizer already initialized , ignoring . . . ' ) <nl> + return <nl> + <nl> + ( kvstore , update_on_kvstore ) = \ <nl> + _create_kvstore ( kvstore , len ( self . _context ) , self . _arg_params ) <nl> + <nl> + if isinstance ( optimizer , str ) : <nl> + batch_size = self . _exec_group . batch_size <nl> + if kvstore and kvstore . type = = ' dist_sync ' : <nl> + batch_size * = kvstore . num_workers <nl> + optimizer = opt . create ( optimizer , rescale_grad = ( 1 . 0 / batch_size ) , <nl> + * * dict ( optimizer_params ) ) <nl> + else : <nl> + assert isinstance ( optimizer , opt . Optimizer ) <nl> + <nl> + self . _optimizer = optimizer <nl> + self . _kvstore = kvstore <nl> + self . _update_on_kvstore = update_on_kvstore <nl> + self . _updater = None <nl> + <nl> + if not update_on_kvstore : <nl> + self . _updater = opt . get_updater ( optimizer ) <nl> + if kvstore : <nl> + # copy initialized local parameters to kvstore <nl> + _initialize_kvstore ( kvstore = kvstore , <nl> + param_arrays = self . _exec_group . param_arrays , <nl> + arg_params = self . _arg_params , <nl> + param_names = self . _param_names , <nl> + update_on_kvstore = update_on_kvstore ) <nl> + if update_on_kvstore : <nl> + kvstore . set_optimizer ( self . _optimizer ) <nl> + <nl> + self . optimizer_initialized = True <nl> + <nl> + def borrow_optimizer ( self , shared_module ) : <nl> + " " " Borrow optimizer from a shared module . Used in bucketing , where exactly the same <nl> + optimizer ( esp . kvstore ) is used . <nl> + <nl> + Parameters <nl> + mmmmmmmmm - <nl> + shared_module : Module <nl> + " " " <nl> + assert shared_module . optimizer_initialized <nl> + self . _optimizer = shared_module . _optimizer <nl> + self . _kvstore = shared_module . _kvstore <nl> + self . _update_on_kvstore = shared_module . _update_on_kvstore <nl> + self . _updater = shared_module . _updater <nl> + self . optimizer_initialized = True <nl> + <nl> + def forward ( self , data_batch , is_train = None ) : <nl> + " " " Forward computation . <nl> + <nl> + Parameters <nl> + mmmmmmmmm - <nl> + data_batch : DataBatch <nl> + Could be anything with similar API implemented . <nl> + is_train : bool <nl> + Default is ` None ` , which means ` is_train ` takes the value of ` self . for_training ` . <nl> + " " " <nl> + assert self . binded and self . params_initialized <nl> + self . _exec_group . forward ( data_batch , is_train ) <nl> + <nl> + def backward ( self , out_grads = None ) : <nl> + " " " Backward computation . <nl> + <nl> + Parameters <nl> + mmmmmmmmm - <nl> + out_grads : NDArray or list of NDArray , optional <nl> + Gradient on the outputs to be propagated back . <nl> + This parameter is only needed when bind is called <nl> + on outputs that are not a loss function . <nl> + " " " <nl> + assert self . binded and self . params_initialized <nl> + self . _exec_group . backward ( out_grads = out_grads ) <nl> + <nl> + def update ( self ) : <nl> + " " " Update parameters according to the installed optimizer and the gradients computed <nl> + in the previous forward - backward batch . <nl> + " " " <nl> + assert self . binded and self . params_initialized and self . optimizer_initialized <nl> + <nl> + self . _params_dirty = True <nl> + if self . _update_on_kvstore : <nl> + _update_params_on_kvstore ( self . _exec_group . param_arrays , <nl> + self . _exec_group . grad_arrays , <nl> + self . _kvstore ) <nl> + else : <nl> + _update_params ( self . _exec_group . param_arrays , <nl> + self . _exec_group . grad_arrays , <nl> + updater = self . _updater , <nl> + num_device = len ( self . _context ) , <nl> + kvstore = self . _kvstore ) <nl> + <nl> + def get_outputs ( self , merge_multi_context = True ) : <nl> + " " " Get outputs of the previous forward computation . <nl> + <nl> + Parameters <nl> + mmmmmmmmm - <nl> + merge_multi_context : bool <nl> + Default is ` True ` . In the case when data - parallelism is used , the outputs <nl> + will be collected from multiple devices . A ` True ` value indicate that we <nl> + should merge the collected results so that they look like from a single <nl> + executor . <nl> + <nl> + Returns <nl> + mmmmmm - <nl> + If ` merge_multi_context ` is ` True ` , it is like ` [ out1 , out2 ] ` . Otherwise , it <nl> + is like ` [ [ out1_dev1 , out1_dev2 ] , [ out2_dev1 , out2_dev2 ] ] ` . All the output <nl> + elements are ` NDArray ` . <nl> + " " " <nl> + assert self . binded and self . params_initialized <nl> + return self . _exec_group . get_outputs ( merge_multi_context = merge_multi_context ) <nl> + <nl> + def get_input_grads ( self , merge_multi_context = True ) : <nl> + " " " Get the gradients with respect to the inputs of the module . <nl> + <nl> + Parameters <nl> + mmmmmmmmm - <nl> + merge_multi_context : bool <nl> + Default is ` True ` . In the case when data - parallelism is used , the outputs <nl> + will be collected from multiple devices . A ` True ` value indicate that we <nl> + should merge the collected results so that they look like from a single <nl> + executor . <nl> + <nl> + Returns <nl> + mmmmmm - <nl> + If ` merge_multi_context ` is ` True ` , it is like ` [ grad1 , grad2 ] ` . Otherwise , it <nl> + is like ` [ [ grad1_dev1 , grad1_dev2 ] , [ grad2_dev1 , grad2_dev2 ] ] ` . All the output <nl> + elements are ` NDArray ` . <nl> + " " " <nl> + assert self . binded and self . params_initialized and self . inputs_need_grad <nl> + return self . _exec_group . get_input_grads ( merge_multi_context = merge_multi_context ) <nl> + <nl> + def update_metric ( self , eval_metric , labels ) : <nl> + " " " Evaluate and accumulate evaluation metric on outputs of the last forward computation . <nl> + <nl> + Parameters <nl> + mmmmmmmmm - <nl> + eval_metric : EvalMetric <nl> + labels : list of NDArray <nl> + Typically ` data_batch . label ` . <nl> + " " " <nl> + self . _exec_group . update_metric ( eval_metric , labels ) <nl> + <nl> + def _sync_params_from_devices ( self ) : <nl> + " " " Synchronize parameters from devices to CPU . This function should be called after <nl> + calling ` update ` that updates the parameters on the devices , before one can read the <nl> + latest parameters from ` self . _arg_params ` and ` self . _aux_params ` . <nl> + " " " <nl> + self . _exec_group . get_params ( self . _arg_params , self . _aux_params ) <nl> new file mode 100644 <nl> index 00000000000 . . 09866d8948e <nl> mmm / dev / null <nl> ppp b / python / mxnet / module / python_module . py <nl> <nl> + # pylint : disable = too - many - instance - attributes , too - many - arguments <nl> + " " " Provide some handy classes for user to implement a simple computation module <nl> + in Python easily . <nl> + " " " <nl> + import logging <nl> + <nl> + from . base_module import BaseModule <nl> + from . . initializer import Uniform <nl> + from . . import ndarray as nd <nl> + <nl> + class PythonModule ( BaseModule ) : <nl> + " " " A convenient module class that implements many of the module APIs as <nl> + empty functions . <nl> + <nl> + Parameters <nl> + mmmmmmmmm - <nl> + data_names : list of str <nl> + Names of the data expected by the module . <nl> + label_names : list of str <nl> + Names of the labels expected by the module . Could be ` None ` if the <nl> + module does not need labels . <nl> + output_names : list of str <nl> + Names of the outputs . <nl> + " " " <nl> + def __init__ ( self , data_names , label_names , output_names , logger = logging ) : <nl> + super ( PythonModule , self ) . __init__ ( logger = logger ) <nl> + <nl> + if isinstance ( data_names , tuple ) : <nl> + data_names = list ( data_names ) <nl> + if isinstance ( label_names , tuple ) : <nl> + label_names = list ( label_names ) <nl> + <nl> + self . _data_names = data_names <nl> + self . _label_names = label_names <nl> + self . _output_names = output_names <nl> + <nl> + self . _data_shapes = None <nl> + self . _label_shapes = None <nl> + self . _output_shapes = None <nl> + <nl> + # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # <nl> + # Symbol information <nl> + # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # <nl> + @ property <nl> + def data_names ( self ) : <nl> + " " " A list of names for data required by this module . " " " <nl> + return self . _data_names <nl> + <nl> + @ property <nl> + def output_names ( self ) : <nl> + " " " A list of names for the outputs of this module . " " " <nl> + return self . _output_names <nl> + <nl> + # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # <nl> + # Input / Output information <nl> + # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # <nl> + @ property <nl> + def data_shapes ( self ) : <nl> + " " " A list of ( name , shape ) pairs specifying the data inputs to this module . " " " <nl> + return self . _data_shapes <nl> + <nl> + @ property <nl> + def label_shapes ( self ) : <nl> + " " " A list of ( name , shape ) pairs specifying the label inputs to this module . <nl> + If this module does not accept labels - - either it is a module without loss <nl> + function , or it is not binded for training , then this should return an empty <nl> + list ` [ ] ` . <nl> + " " " <nl> + return self . _label_shapes <nl> + <nl> + @ property <nl> + def output_shapes ( self ) : <nl> + " " " A list of ( name , shape ) pairs specifying the outputs of this module . " " " <nl> + return self . _output_shapes <nl> + <nl> + # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # <nl> + # Parameters of a module <nl> + # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # <nl> + def get_params ( self ) : <nl> + " " " Get parameters , those are potentially copies of the the actual parameters used <nl> + to do computation on the device . <nl> + <nl> + Returns <nl> + mmmmmm - <nl> + ` ( { } , { } ) ` , a pair of empty dict . Subclass should override this method if <nl> + contains parameters . <nl> + " " " <nl> + return ( dict ( ) , dict ( ) ) <nl> + <nl> + def init_params ( self , initializer = Uniform ( 0 . 01 ) , arg_params = None , aux_params = None , <nl> + allow_missing = False , force_init = False ) : <nl> + " " " Initialize the parameters and auxiliary states . By default this function <nl> + does nothing . Subclass should override this method if contains parameters . <nl> + <nl> + Parameters <nl> + mmmmmmmmm - <nl> + initializer : Initializer <nl> + Called to initialize parameters if needed . <nl> + arg_params : dict <nl> + If not None , should be a dictionary of existing arg_params . Initialization <nl> + will be copied from that . <nl> + aux_params : dict <nl> + If not None , should be a dictionary of existing aux_params . Initialization <nl> + will be copied from that . <nl> + allow_missing : bool <nl> + If true , params could contain missing values , and the initializer will be <nl> + called to fill those missing params . <nl> + force_init : bool <nl> + If true , will force re - initialize even if already initialized . <nl> + " " " <nl> + pass <nl> + <nl> + def update ( self ) : <nl> + " " " Update parameters according to the installed optimizer and the gradients computed <nl> + in the previous forward - backward batch . Currently we do nothing here . Subclass should <nl> + override this method if contains parameters . <nl> + " " " <nl> + pass <nl> + <nl> + def update_metric ( self , eval_metric , labels ) : <nl> + " " " Evaluate and accumulate evaluation metric on outputs of the last forward computation . <nl> + ubclass should override this method if needed . <nl> + <nl> + Parameters <nl> + mmmmmmmmm - <nl> + eval_metric : EvalMetric <nl> + labels : list of NDArray <nl> + Typically ` data_batch . label ` . <nl> + " " " <nl> + if self . _label_shapes is None : <nl> + # since we do not need labels , we are probably not a module with a loss <nl> + # function or predictions , so just ignore this call <nl> + return <nl> + <nl> + # by default we expect our outputs are some scores that could be evaluated <nl> + eval_metric . update ( labels , self . get_outputs ( ) ) <nl> + <nl> + # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # <nl> + # module setup <nl> + # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # <nl> + def bind ( self , data_shapes , label_shapes = None , for_training = True , <nl> + inputs_need_grad = False , force_rebind = False , shared_module = None ) : <nl> + " " " Bind the symbols to construct executors . This is necessary before one <nl> + can perform computation with the module . <nl> + <nl> + Parameters <nl> + mmmmmmmmm - <nl> + data_shapes : list of ( str , tuple ) <nl> + Typically is ` data_iter . provide_data ` . <nl> + label_shapes : list of ( str , tuple ) <nl> + Typically is ` data_iter . provide_label ` . <nl> + for_training : bool <nl> + Default is ` True ` . Whether the executors should be bind for training . <nl> + inputs_need_grad : bool <nl> + Default is ` False ` . Whether the gradients to the input data need to be computed . <nl> + Typically this is not needed . But this might be needed when implementing composition <nl> + of modules . <nl> + force_rebind : bool <nl> + Default is ` False ` . This function does nothing if the executors are already <nl> + binded . But with this ` True ` , the executors will be forced to rebind . <nl> + shared_module : Module <nl> + Default is ` None ` . This is used in bucketing . When not ` None ` , the shared module <nl> + essentially corresponds to a different bucket - - a module with different symbol <nl> + but with the same sets of parameters ( e . g . unrolled RNNs with different lengths ) . <nl> + " " " <nl> + if self . binded and not force_rebind : <nl> + self . logger . warning ( ' Already binded , ignoring bind ( ) ' ) <nl> + return <nl> + <nl> + self . for_training = for_training <nl> + self . inputs_need_grad = inputs_need_grad <nl> + <nl> + assert len ( data_shapes ) = = len ( self . _data_names ) <nl> + assert [ x [ 0 ] for x in data_shapes ] = = self . _data_names <nl> + self . _data_shapes = data_shapes <nl> + <nl> + self . _label_shapes = label_shapes <nl> + if label_shapes is not None : <nl> + assert self . _label_names is not None <nl> + assert len ( self . _label_names ) = = len ( label_shapes ) <nl> + assert [ x [ 0 ] for x in label_shapes ] = = self . _label_names <nl> + <nl> + self . _output_shapes = self . _compute_output_shapes ( ) <nl> + <nl> + def _compute_output_shapes ( self ) : <nl> + " " " The subclass should implement this method to compute the shape of <nl> + outputs . This method can assume that the ` data_shapes ` and ` label_shapes ` <nl> + are already initialized . <nl> + " " " <nl> + raise NotImplementedError ( ) <nl> + <nl> + def init_optimizer ( self , kvstore = ' local ' , optimizer = ' sgd ' , <nl> + optimizer_params = ( ( ' learning_rate ' , 0 . 01 ) , ) , force_init = False ) : <nl> + " " " Install and initialize optimizers . By default we do nothing . Subclass <nl> + should <nl> + <nl> + Parameters <nl> + mmmmmmmmm - <nl> + kvstore : str or KVStore <nl> + Default ` ' local ' ` . <nl> + optimizer : str or Optimizer <nl> + Default ` ' sgd ' ` <nl> + optimizer_params : dict <nl> + Default ` ( ( ' learning_rate ' , 0 . 01 ) , ) ` . The default value is not a dictionary , <nl> + just to avoid pylint warning of dangerous default values . <nl> + force_init : bool <nl> + Default ` False ` , indicating whether we should force re - initializing the <nl> + optimizer in the case an optimizer is already installed . <nl> + " " " <nl> + pass <nl> + <nl> + <nl> + class PythonLossModule ( PythonModule ) : <nl> + " " " A convenient module class that implements many of the module APIs as <nl> + empty functions . <nl> + <nl> + Parameters <nl> + mmmmmmmmm - <nl> + name : str <nl> + Names of the module . The outputs will be named ` [ name + ' _output ' ] ` . <nl> + data_names : list of str <nl> + Default ` [ ' data ' ] ` . Names of the data expected by this module . <nl> + Should be a list of only one name . <nl> + label_names : list of str <nl> + Default ` [ ' softmax_label ' ] ` . Names of the labels expected by the module . <nl> + Should be a list of only one name . <nl> + grad_func : function <nl> + Optional . If not ` None ` , should be a function that takes ` scores ` <nl> + and ` labels ` , both of type ` NDArray ` , and return the gradients with <nl> + respect to the scores according to this loss function . The return <nl> + value could be a numpy array or an ` NDArray ` . <nl> + " " " <nl> + def __init__ ( self , name = ' pyloss ' , data_names = ( ' data ' , ) , label_names = ( ' softmax_label ' , ) , <nl> + logger = logging , grad_func = None ) : <nl> + super ( PythonLossModule , self ) . __init__ ( data_names , label_names , <nl> + [ name + ' _output ' ] , logger = logger ) <nl> + self . _name = name <nl> + assert len ( data_names ) = = 1 <nl> + assert len ( label_names ) = = 1 <nl> + <nl> + self . _scores = None <nl> + self . _labels = None <nl> + self . _scores_grad = None <nl> + <nl> + if grad_func is not None : <nl> + assert callable ( grad_func ) <nl> + self . _grad_func = grad_func <nl> + <nl> + def _compute_output_shapes ( self ) : <nl> + " " " Compute the shapes of outputs . As a loss module with outputs , we simply <nl> + output whatever we receive as inputs ( i . e . the scores ) . <nl> + " " " <nl> + return [ ( self . _name + ' _output ' , self . _data_shapes [ 0 ] [ 1 ] ) ] <nl> + <nl> + def forward ( self , data_batch , is_train = None ) : <nl> + " " " Forward computation . Here we do nothing but to keep a reference to <nl> + the scores and the labels so that we can do backward computation . <nl> + <nl> + Parameters <nl> + mmmmmmmmm - <nl> + data_batch : DataBatch <nl> + Could be anything with similar API implemented . <nl> + is_train : bool <nl> + Default is ` None ` , which means ` is_train ` takes the value of ` self . for_training ` . <nl> + " " " <nl> + self . _scores = data_batch . data [ 0 ] <nl> + <nl> + if is_train is None : <nl> + is_train = self . for_training <nl> + <nl> + if is_train : <nl> + self . _labels = data_batch . label [ 0 ] <nl> + <nl> + def get_outputs ( self , merge_multi_context = True ) : <nl> + " " " Get outputs of the previous forward computation . As a output loss module , <nl> + we treat the inputs to this module as scores , and simply return them . <nl> + <nl> + Parameters <nl> + mmmmmmmmm - <nl> + merge_multi_context : bool <nl> + Should always be ` True ` , because we do not use multiple contexts for computing . <nl> + " " " <nl> + assert merge_multi_context = = True <nl> + return [ self . _scores ] <nl> + <nl> + def backward ( self , out_grads = None ) : <nl> + " " " Backward computation . <nl> + <nl> + Parameters <nl> + mmmmmmmmm - <nl> + out_grads : NDArray or list of NDArray , optional <nl> + Gradient on the outputs to be propagated back . <nl> + This parameter is only needed when bind is called <nl> + on outputs that are not a loss function . <nl> + " " " <nl> + assert out_grads is None , ' For a loss module , out_grads should be None ' <nl> + assert self . for_training <nl> + <nl> + self . _backward_impl ( ) <nl> + <nl> + def _backward_impl ( self ) : <nl> + " " " Actual implementation of the backward computation . The computation <nl> + should take ` self . _scores ` and ` self . _labels ` and then compute the <nl> + gradients with respect to the scores , store it as an ` NDArray ` in <nl> + ` self . _scores_grad ` . <nl> + <nl> + Instead of defining a subclass and overriding this function , <nl> + a more convenient way is to pass in a ` grad_func ` when constructing <nl> + the module object . Then it will be called to compute the gradients . <nl> + " " " <nl> + if self . _grad_func is not None : <nl> + grad = self . _grad_func ( self . _scores , self . _labels ) <nl> + if not isinstance ( grad , nd . NDArray ) : <nl> + grad = nd . array ( grad ) <nl> + self . _scores_grad = grad <nl> + else : <nl> + raise NotImplementedError ( ) <nl> + <nl> + def get_input_grads ( self , merge_multi_context = True ) : <nl> + " " " Get the gradients to the inputs , computed in the previous backward computation . <nl> + <nl> + Parameters <nl> + mmmmmmmmm - <nl> + merge_multi_context : bool <nl> + Should always be ` True ` because we do not use multiple context for computation . <nl> + " " " <nl> + assert merge_multi_context = = True <nl> + return [ self . _scores_grad ] <nl> new file mode 100644 <nl> index 00000000000 . . 75c499dfafc <nl> mmm / dev / null <nl> ppp b / python / mxnet / module / sequential_module . py <nl> <nl> + # pylint : disable = too - many - arguments , too - many - locals , too - many - instance - attributes <nl> + " " " ` SequentialModule ` is a container module that chains a number of modules together . " " " <nl> + <nl> + import logging <nl> + import copy <nl> + <nl> + from . . initializer import Uniform <nl> + <nl> + from . base_module import BaseModule <nl> + <nl> + class SequentialModule ( BaseModule ) : <nl> + " " " A SequentialModule is a container module that can chain multiple modules together . <nl> + Note building a computation graph with this kind of imperative container is less <nl> + flexible and less efficient than the symbolic graph . So this should be only used as a <nl> + handy utility . <nl> + " " " <nl> + <nl> + META_TAKE_LABELS = ' take_labels ' <nl> + META_AUTO_WIRING = ' auto_wiring ' <nl> + <nl> + def __init__ ( self , logger = logging ) : <nl> + super ( SequentialModule , self ) . __init__ ( logger = logger ) <nl> + self . _modules = [ ] <nl> + self . _metas = [ ] <nl> + <nl> + self . _label_shapes = None <nl> + self . _data_shapes = None <nl> + self . _meta_keys = set ( [ getattr ( SequentialModule , x ) <nl> + for x in dir ( SequentialModule ) <nl> + if x . startswith ( ' META_ ' ) ] ) <nl> + <nl> + def add ( self , module , * * kwargs ) : <nl> + " " " Add a module to the chain . <nl> + <nl> + Parameters <nl> + mmmmmmmmm - <nl> + module : BaseModule <nl> + The new module to add . <nl> + kwargs : * * keywords <nl> + All the keyword arguments are saved as meta information <nl> + for the added module . The currently known meta includes <nl> + <nl> + - ` take_labels ` : indicating whether the module expect to <nl> + take labels when doing computation . Note any module in <nl> + the chain can take labels ( not necessarily only the top <nl> + most one ) , and they all take the same labels passed <nl> + from the original data batch for the ` SequentialModule ` . <nl> + <nl> + Returns <nl> + mmmmmm - <nl> + This function returns ` self ` to allow us to easily chain a <nl> + series of ` add ` calls . <nl> + " " " <nl> + self . _modules . append ( module ) <nl> + <nl> + # a sanity check to avoid typo <nl> + for key in kwargs . iterkeys ( ) : <nl> + assert key in self . _meta_keys , ( ' Unknown meta " % s " , a typo ? ' % key ) <nl> + <nl> + self . _metas . append ( kwargs ) <nl> + <nl> + # after adding new modules , we are reset back to raw states , needs <nl> + # to bind , init_params , etc . <nl> + self . binded = False <nl> + self . params_initialized = False <nl> + self . optimizer_initialized = False <nl> + <nl> + return self # for easier chaining <nl> + <nl> + @ property <nl> + def data_names ( self ) : <nl> + " " " A list of names for data required by this module . " " " <nl> + if len ( self . _modules ) > 0 : <nl> + return self . _modules [ 0 ] . data_names <nl> + return [ ] <nl> + <nl> + @ property <nl> + def output_names ( self ) : <nl> + " " " A list of names for the outputs of this module . " " " <nl> + if len ( self . _modules ) > 0 : <nl> + return self . _modules [ - 1 ] . output_names <nl> + return [ ] <nl> + <nl> + @ property <nl> + def data_shapes ( self ) : <nl> + " " " Get data shapes . <nl> + Returns <nl> + mmmmmm - <nl> + A list of ` ( name , shape ) ` pairs . The data shapes of the <nl> + first module is the data shape of a ` SequentialModule ` . <nl> + " " " <nl> + assert self . binded <nl> + return self . _modules [ 0 ] . data_shapes <nl> + <nl> + @ property <nl> + def label_shapes ( self ) : <nl> + " " " Get label shapes . <nl> + Returns <nl> + mmmmmm - <nl> + A list of ` ( name , shape ) ` pairs . The return value could be ` None ` if <nl> + the module does not need labels , or if the module is not binded for <nl> + training ( in this case , label information is not available ) . <nl> + " " " <nl> + assert self . binded <nl> + return self . _label_shapes <nl> + <nl> + @ property <nl> + def output_shapes ( self ) : <nl> + " " " Get output shapes . <nl> + Returns <nl> + mmmmmm - <nl> + A list of ` ( name , shape ) ` pairs . The output shapes of the last <nl> + module is the output shape of a ` SequentialModule ` . <nl> + " " " <nl> + assert self . binded <nl> + return self . _modules [ - 1 ] . output_shapes <nl> + <nl> + def get_params ( self ) : <nl> + " " " Get current parameters . <nl> + Returns <nl> + mmmmmm - <nl> + ` ( arg_params , aux_params ) ` , each a dictionary of name to parameters ( in <nl> + ` NDArray ` ) mapping . This is a merged dictionary of all the parameters <nl> + in the modules . <nl> + " " " <nl> + assert self . binded and self . params_initialized <nl> + <nl> + arg_params = dict ( ) <nl> + aux_params = dict ( ) <nl> + <nl> + for module in self . _modules : <nl> + arg , aux = module . get_params ( ) <nl> + arg_params . update ( arg ) <nl> + aux_params . update ( aux ) <nl> + <nl> + return ( arg_params , aux_params ) <nl> + <nl> + def init_params ( self , initializer = Uniform ( 0 . 01 ) , arg_params = None , aux_params = None , <nl> + allow_missing = False , force_init = False ) : <nl> + " " " Initialize parameters . <nl> + <nl> + Parameters <nl> + mmmmmmmmm - <nl> + initializer : Initializer <nl> + arg_params : dict <nl> + Default ` None ` . Existing parameters . This has higher priority than ` initializer ` . <nl> + aux_params : dict <nl> + Default ` None ` . Existing auxiliary states . This has higher priority than ` initializer ` . <nl> + allow_missing : bool <nl> + Allow missing values in ` arg_params ` and ` aux_params ` ( if not ` None ` ) . In this case , <nl> + missing values will be filled with ` initializer ` . <nl> + force_init : bool <nl> + Default ` False ` . <nl> + " " " <nl> + if self . params_initialized and not force_init : <nl> + return <nl> + assert self . binded , ' call bind before initializing the parameters ' <nl> + <nl> + for module in self . _modules : <nl> + module . init_params ( initializer = initializer , arg_params = arg_params , <nl> + aux_params = aux_params , allow_missing = allow_missing , <nl> + force_init = force_init ) <nl> + <nl> + # make sure we do not have duplicated parameter names <nl> + def _check_name ( known_names , new_names , modules , i ) : <nl> + " " " Internal function to help checking duplicated names . " " " <nl> + for name in new_names : <nl> + assert not known_names . has_key ( name ) , " Duplicated parameter names : " + \ <nl> + ( ' name " % s " in layer % d ( % s ) is already ' % ( name , i , type ( modules [ i ] ) ) ) + \ <nl> + ( ' used in layer % d ( % s ) . ' % ( known_names [ name ] , <nl> + type ( modules [ known_names [ name ] ] ) ) ) <nl> + known_names [ name ] = i <nl> + <nl> + arg_names = dict ( ) <nl> + aux_names = dict ( ) <nl> + for i_layer , module in enumerate ( self . _modules ) : <nl> + arg_params , aux_params = module . get_params ( ) <nl> + _check_name ( arg_names , arg_params . iterkeys ( ) , self . _modules , i_layer ) <nl> + _check_name ( aux_names , aux_params . iterkeys ( ) , self . _modules , i_layer ) <nl> + <nl> + self . params_initialized = True <nl> + <nl> + def bind ( self , data_shapes , label_shapes = None , for_training = True , <nl> + inputs_need_grad = False , force_rebind = False , shared_module = None ) : <nl> + " " " Bind the symbols to construct executors . This is necessary before one <nl> + can perform computation with the module . <nl> + <nl> + Parameters <nl> + mmmmmmmmm - <nl> + data_shapes : list of ( str , tuple ) <nl> + Typically is ` data_iter . provide_data ` . <nl> + label_shapes : list of ( str , tuple ) <nl> + Typically is ` data_iter . provide_label ` . <nl> + for_training : bool <nl> + Default is ` True ` . Whether the executors should be bind for training . <nl> + inputs_need_grad : bool <nl> + Default is ` False ` . Whether the gradients to the input data need to be computed . <nl> + Typically this is not needed . But this might be needed when implementing composition <nl> + of modules . <nl> + force_rebind : bool <nl> + Default is ` False ` . This function does nothing if the executors are already <nl> + binded . But with this ` True ` , the executors will be forced to rebind . <nl> + shared_module : Module <nl> + Default is ` None ` . Currently shared module is not supported for ` SequentialModule ` . <nl> + " " " <nl> + if self . binded and not force_rebind : <nl> + self . logger . warning ( ' Already binded , ignoring bind ( ) ' ) <nl> + return <nl> + <nl> + if inputs_need_grad : <nl> + assert for_training is True <nl> + assert shared_module is None , ' Shared module is not supported ' <nl> + assert len ( self . _modules ) > 0 , ' Attempting to bind an empty SequentialModule ' <nl> + <nl> + self . binded = True <nl> + <nl> + # the same label shapes are used for all chained modules <nl> + self . _label_shapes = label_shapes <nl> + <nl> + my_data_shapes = data_shapes <nl> + anybody_ever_needs_label = False <nl> + for i_layer , module in enumerate ( self . _modules ) : <nl> + meta = self . _metas [ i_layer ] <nl> + if meta . has_key ( SequentialModule . META_TAKE_LABELS ) and \ <nl> + meta [ SequentialModule . META_TAKE_LABELS ] : <nl> + my_label_shapes = label_shapes <nl> + anybody_ever_needs_label = True <nl> + else : <nl> + my_label_shapes = None <nl> + <nl> + my_inputs_need_grad = bool ( inputs_need_grad or <nl> + ( for_training and i_layer > 0 ) ) <nl> + <nl> + if meta . get ( SequentialModule . META_AUTO_WIRING , False ) : <nl> + data_names = module . data_names <nl> + assert len ( data_names ) = = len ( my_data_shapes ) <nl> + my_data_shapes = [ ( new_name , shape ) for ( new_name , ( _ , shape ) ) <nl> + in zip ( data_names , my_data_shapes ) ] <nl> + <nl> + module . bind ( data_shapes = my_data_shapes , label_shapes = my_label_shapes , <nl> + for_training = for_training , inputs_need_grad = my_inputs_need_grad , <nl> + force_rebind = force_rebind , shared_module = None ) <nl> + <nl> + # the output of the previous module is the data of the next module <nl> + my_data_shapes = module . output_shapes <nl> + <nl> + if not anybody_ever_needs_label : <nl> + # then I do not need label either <nl> + self . _label_shapes = None <nl> + <nl> + def init_optimizer ( self , kvstore = ' local ' , optimizer = ' sgd ' , <nl> + optimizer_params = ( ( ' learning_rate ' , 0 . 01 ) , ) , <nl> + force_init = False ) : <nl> + " " " Install and initialize optimizers . <nl> + <nl> + Parameters <nl> + mmmmmmmmm - <nl> + kvstore : str or KVStore <nl> + Default ` ' local ' ` . <nl> + optimizer : str or Optimizer <nl> + Default ` ' sgd ' ` <nl> + optimizer_params : dict <nl> + Default ` ( ( ' learning_rate ' , 0 . 01 ) , ) ` . The default value is not a dictionary , <nl> + just to avoid pylint warning of dangerous default values . <nl> + force_init : bool <nl> + Default ` False ` , indicating whether we should force re - initializing the <nl> + optimizer in the case an optimizer is already installed . <nl> + " " " <nl> + assert self . binded and self . params_initialized <nl> + if self . optimizer_initialized and not force_init : <nl> + self . logger . warning ( ' optimizer already initialized , ignoring . ' ) <nl> + return <nl> + <nl> + for module in self . _modules : <nl> + module . init_optimizer ( kvstore = kvstore , optimizer = optimizer , <nl> + optimizer_params = optimizer_params , force_init = force_init ) <nl> + <nl> + self . optimizer_initialized = True <nl> + <nl> + def forward ( self , data_batch , is_train = None ) : <nl> + " " " Forward computation . <nl> + <nl> + Parameters <nl> + mmmmmmmmm - <nl> + data_batch : DataBatch <nl> + is_train : bool <nl> + Default is ` None ` , in which case ` is_train ` is take as ` self . for_training ` . <nl> + " " " <nl> + assert self . binded and self . params_initialized <nl> + <nl> + # make a shallow copy , just to maintain necessary properties ( if any ) like <nl> + # bucket_key , pad , etc . <nl> + data_batch = copy . copy ( data_batch ) <nl> + <nl> + for i_layer , module in enumerate ( self . _modules ) : <nl> + module . forward ( data_batch , is_train = is_train ) <nl> + <nl> + if i_layer + 1 = = len ( self . _modules ) : <nl> + # the last layer , do not need to do the followings <nl> + break <nl> + <nl> + data_batch . data = module . get_outputs ( ) <nl> + if hasattr ( data_batch , ' provide_data ' ) : <nl> + # need to update this , in case the internal module is using bucketing <nl> + # or whatever <nl> + data_names = [ x [ 0 ] for x in module . output_shapes ] <nl> + assert len ( data_names ) = = len ( data_batch . data ) <nl> + data_batch . provide_data = [ ( name , x . shape ) for name , x in <nl> + zip ( data_names , data_batch . data ) ] <nl> + <nl> + def backward ( self , out_grads = None ) : <nl> + " " " Backward computation . " " " <nl> + assert self . binded and self . params_initialized <nl> + <nl> + for i_layer , module in reversed ( zip ( range ( len ( self . _modules ) ) , self . _modules ) ) : <nl> + module . backward ( out_grads = out_grads ) <nl> + if i_layer = = 0 : <nl> + break <nl> + <nl> + out_grads = module . get_input_grads ( ) <nl> + <nl> + def update ( self ) : <nl> + " " " Update parameters according to installed optimizer and the gradient computed <nl> + in the previous forward - backward cycle . <nl> + " " " <nl> + assert self . binded and self . params_initialized and self . optimizer_initialized <nl> + <nl> + for module in self . _modules : <nl> + module . update ( ) <nl> + <nl> + def get_outputs ( self , merge_multi_context = True ) : <nl> + " " " Get outputs from a previous forward computation . <nl> + <nl> + Parameters <nl> + mmmmmmmmm - <nl> + merge_multi_context : bool <nl> + Default is ` True ` . In the case when data - parallelism is used , the outputs <nl> + will be collected from multiple devices . A ` True ` value indicate that we <nl> + should merge the collected results so that they look like from a single <nl> + executor . <nl> + <nl> + Returns <nl> + mmmmmm - <nl> + If ` merge_multi_context ` is ` True ` , it is like ` [ out1 , out2 ] ` . Otherwise , it <nl> + is like ` [ [ out1_dev1 , out1_dev2 ] , [ out2_dev1 , out2_dev2 ] ] ` . All the output <nl> + elements are numpy arrays . <nl> + " " " <nl> + assert self . binded and self . params_initialized <nl> + return self . _modules [ - 1 ] . get_outputs ( merge_multi_context = merge_multi_context ) <nl> + <nl> + def get_input_grads ( self , merge_multi_context = True ) : <nl> + " " " Get the gradients with respect to the inputs of the module . <nl> + <nl> + Parameters <nl> + mmmmmmmmm - <nl> + merge_multi_context : bool <nl> + Default is ` True ` . In the case when data - parallelism is used , the outputs <nl> + will be collected from multiple devices . A ` True ` value indicate that we <nl> + should merge the collected results so that they look like from a single <nl> + executor . <nl> + <nl> + Returns <nl> + mmmmmm - <nl> + If ` merge_multi_context ` is ` True ` , it is like ` [ grad1 , grad2 ] ` . Otherwise , it <nl> + is like ` [ [ grad1_dev1 , grad1_dev2 ] , [ grad2_dev1 , grad2_dev2 ] ] ` . All the output <nl> + elements are ` NDArray ` . <nl> + " " " <nl> + assert self . binded and self . params_initialized and self . inputs_need_grad <nl> + return self . _modules [ 0 ] . get_input_grads ( merge_multi_context = merge_multi_context ) <nl> + <nl> + def update_metric ( self , eval_metric , labels ) : <nl> + " " " Evaluate and accumulate evaluation metric on outputs of the last forward computation . <nl> + <nl> + Parameters <nl> + mmmmmmmmm - <nl> + eval_metric : EvalMetric <nl> + labels : list of NDArray <nl> + Typically ` data_batch . label ` . <nl> + " " " <nl> + assert self . binded and self . params_initialized <nl> + <nl> + for meta , module in zip ( self . _metas , self . _modules ) : <nl> + if meta . has_key ( SequentialModule . META_TAKE_LABELS ) and \ <nl> + meta [ SequentialModule . META_TAKE_LABELS ] : <nl> + module . update_metric ( eval_metric , labels ) <nl> mmm a / python / mxnet / ndarray . py <nl> ppp b / python / mxnet / ndarray . py <nl> <nl> # coding : utf - 8 <nl> + # pylint : disable = too - many - lines , redefined - builtin <nl> " " " NDArray API of mxnet . " " " <nl> from __future__ import absolute_import <nl> <nl> import ctypes <nl> import warnings <nl> import sys <nl> + import functools <nl> + import operator <nl> import numpy as np <nl> from . base import _LIB , string_types , numeric_types <nl> from . base import c_array , py_str , c_str , mx_real_t <nl> def __del__ ( self ) : <nl> check_call ( _LIB . MXNDArrayFree ( self . handle ) ) <nl> <nl> def __add__ ( self , other ) : <nl> - if isinstance ( other , NDArray ) : <nl> - return NDArray . _plus ( self , other ) <nl> - elif isinstance ( other , numeric_types ) : <nl> - return NDArray . _plus_scalar ( self , float ( other ) ) <nl> - else : <nl> - raise TypeError ( ' type % s not supported ' % str ( type ( other ) ) ) <nl> + return add ( self , other ) <nl> <nl> def __iadd__ ( self , other ) : <nl> if not self . writable : <nl> def __radd__ ( self , other ) : <nl> return self . __add__ ( other ) <nl> <nl> def __sub__ ( self , other ) : <nl> - if isinstance ( other , NDArray ) : <nl> - return NDArray . _minus ( self , other ) <nl> - elif isinstance ( other , numeric_types ) : <nl> - return NDArray . _minus_scalar ( self , float ( other ) ) <nl> - else : <nl> - raise TypeError ( ' type % s not supported ' % str ( type ( other ) ) ) <nl> + return subtract ( self , other ) <nl> + <nl> def __isub__ ( self , other ) : <nl> if not self . writable : <nl> raise ValueError ( ' trying to subtract from a readonly NDArray ' ) <nl> def __isub__ ( self , other ) : <nl> raise TypeError ( ' type % s not supported ' % str ( type ( other ) ) ) <nl> <nl> def __rsub__ ( self , other ) : <nl> - if isinstance ( other , numeric_types ) : <nl> - return NDArray . _rminus_scalar ( self , float ( other ) ) <nl> - else : <nl> - raise TypeError ( ' type % s not supported ' % str ( type ( other ) ) ) <nl> + return subtract ( other , self ) <nl> <nl> def __mul__ ( self , other ) : <nl> - if isinstance ( other , NDArray ) : <nl> - return NDArray . _mul ( self , other ) <nl> - elif isinstance ( other , numeric_types ) : <nl> - return NDArray . _mul_scalar ( self , float ( other ) ) <nl> - else : <nl> - raise TypeError ( ' type % s not supported ' % str ( type ( other ) ) ) <nl> + return multiply ( self , other ) <nl> <nl> def __neg__ ( self ) : <nl> return NDArray . _mul_scalar ( self , - 1 . 0 ) <nl> def __rmul__ ( self , other ) : <nl> return self . __mul__ ( other ) <nl> <nl> def __div__ ( self , other ) : <nl> - if isinstance ( other , NDArray ) : <nl> - return NDArray . _div ( self , other ) <nl> - elif isinstance ( other , numeric_types ) : <nl> - return NDArray . _div_scalar ( self , float ( other ) ) <nl> - else : <nl> - raise TypeError ( ' type % s not supported ' % str ( type ( other ) ) ) <nl> + return divide ( self , other ) <nl> <nl> def __rdiv__ ( self , other ) : <nl> - if isinstance ( other , numeric_types ) : <nl> - return NDArray . _rdiv_scalar ( self , float ( other ) ) <nl> - else : <nl> - raise TypeError ( ' type % s not supported ' % str ( type ( other ) ) ) <nl> + return divide ( other , self ) <nl> <nl> def __idiv__ ( self , other ) : <nl> if not self . writable : <nl> def reshape ( self , new_shape ) : <nl> ctypes . byref ( handle ) ) ) <nl> return NDArray ( handle = handle , writable = self . writable ) <nl> <nl> + def broadcast_to ( self , shape ) : <nl> + " " " Broadcasting the current NDArray into the given shape . The semantics is <nl> + the same with ` numpy ` ' s broadcasting <nl> + <nl> + Parameters <nl> + mmmmmmmmm <nl> + shape : the shape to broadcast <nl> + the braodcast shape <nl> + " " " <nl> + cur_shape = self . shape <nl> + err_str = ' operands could not be broadcast together with remapped shapes ' \ <nl> + ' [ original - > remapped ] : { } and requested shape { } ' . format ( cur_shape , shape ) <nl> + if len ( shape ) < len ( cur_shape ) : <nl> + raise ValueError ( err_str ) <nl> + cur_shape = ( 1 , ) * ( len ( shape ) - len ( cur_shape ) ) + cur_shape <nl> + for i , j in zip ( cur_shape , shape ) : <nl> + if i ! = 1 and i ! = j : <nl> + raise ValueError ( err_str ) <nl> + ret = self . reshape ( cur_shape ) <nl> + for axis , ( i , j ) in enumerate ( zip ( cur_shape , shape ) ) : <nl> + if i ! = j : <nl> + ret = NDArray . _broadcast ( ret , axis , j ) <nl> + return ret <nl> <nl> def wait_to_read ( self ) : <nl> " " " Block until all pending writes operations on current NDArray are finished . <nl> def dtype ( self ) : <nl> self . handle , ctypes . byref ( mx_dtype ) ) ) <nl> return _DTYPE_MX_TO_NP [ mx_dtype . value ] <nl> <nl> + @ property <nl> + # pylint : disable = invalid - name , undefined - variable <nl> + def T ( self ) : <nl> + " " " Get transpose of current NDArray " " " <nl> + if len ( self . shape ) ! = 2 : <nl> + raise ValueError ( ' Only 2D matrix is allowed to be transposed ' ) <nl> + return transpose ( self ) <nl> + # pylint : enable = invalid - name , undefined - variable <nl> + <nl> def asnumpy ( self ) : <nl> " " " Return a copied numpy array of current array . <nl> <nl> def copyto ( self , other ) : <nl> raise TypeError ( ' copyto do not support type ' + str ( type ( other ) ) ) <nl> # pylint : enable = no - member <nl> <nl> + def as_in_context ( self , context ) : <nl> + " " " Return an ` NDArray ` that lives in the target context . If the array <nl> + is already in that context , ` self ` is returned . Otherwise , a copy is <nl> + made . <nl> + <nl> + Parameters <nl> + mmmmmmmmm - <nl> + context : Context <nl> + The target context we want the return value to live in . <nl> + <nl> + Returns <nl> + mmmmmm - <nl> + A copy or ` self ` as an ` NDArray ` that lives in the target context . <nl> + " " " <nl> + if self . context = = context : <nl> + return self <nl> + return self . copyto ( context ) <nl> + <nl> <nl> def onehot_encode ( indices , out ) : <nl> " " " One hot encoding indices into matrix out . <nl> def empty ( shape , ctx = None , dtype = mx_real_t ) : <nl> ctx = Context . default_ctx <nl> return NDArray ( handle = _new_alloc_handle ( shape , ctx , False , dtype ) ) <nl> <nl> + def add ( lhs , rhs ) : <nl> + " " " Perform element - wise addition <nl> + <nl> + Parameters <nl> + mmmmmmmmm - <nl> + lhs : Array or float value <nl> + left hand side operand <nl> + <nl> + rhs : Array of float value <nl> + right hand side operand <nl> + <nl> + Returns <nl> + mmmmmm - <nl> + out : Array <nl> + result array <nl> + " " " <nl> + # pylint : disable = no - member , protected - access <nl> + if isinstance ( lhs , numeric_types ) : <nl> + if isinstance ( rhs , numeric_types ) : <nl> + return lhs + rhs <nl> + else : <nl> + return add ( rhs , lhs ) <nl> + elif isinstance ( rhs , numeric_types ) : <nl> + return NDArray . _plus_scalar ( lhs , float ( rhs ) ) <nl> + elif isinstance ( rhs , NDArray ) : <nl> + lsize = functools . reduce ( operator . mul , lhs . shape ) <nl> + rsize = functools . reduce ( operator . mul , rhs . shape ) <nl> + if lsize < rsize : <nl> + lhs = lhs . broadcast_to ( rhs . shape ) <nl> + elif lsize > rsize : <nl> + rhs = rhs . broadcast_to ( lhs . shape ) <nl> + return NDArray . _plus ( lhs , rhs ) <nl> + else : <nl> + raise TypeError ( ' type % s not supported ' % str ( type ( rhs ) ) ) <nl> + # pylint : enable = no - member , protected - access <nl> + <nl> + def subtract ( lhs , rhs ) : <nl> + " " " Perform element - wise subtract <nl> + <nl> + Parameters <nl> + mmmmmmmmm - <nl> + lhs : Array or float value <nl> + left hand side operand <nl> + <nl> + rhs : Array of float value <nl> + right hand side operand <nl> + <nl> + Returns <nl> + mmmmmm - <nl> + out : Array <nl> + result array <nl> + " " " <nl> + # pylint : disable = no - member , protected - access <nl> + if isinstance ( lhs , numeric_types ) : <nl> + if isinstance ( rhs , numeric_types ) : <nl> + return lhs - rhs <nl> + elif isinstance ( rhs , NDArray ) : <nl> + return NDArray . _rminus_scalar ( rhs , float ( lhs ) ) <nl> + else : <nl> + raise TypeError ( ' type % s not supported ' % str ( type ( rhs ) ) ) <nl> + elif isinstance ( rhs , numeric_types ) : <nl> + return NDArray . _minus_scalar ( lhs , float ( rhs ) ) <nl> + elif isinstance ( rhs , NDArray ) : <nl> + lsize = functools . reduce ( operator . mul , lhs . shape ) <nl> + rsize = functools . reduce ( operator . mul , rhs . shape ) <nl> + if lsize < rsize : <nl> + lhs = lhs . broadcast_to ( rhs . shape ) <nl> + elif lsize > rsize : <nl> + rhs = rhs . broadcast_to ( lhs . shape ) <nl> + return NDArray . _minus ( lhs , rhs ) <nl> + else : <nl> + raise TypeError ( ' type % s not supported ' % str ( type ( rhs ) ) ) <nl> + # pylint : enable = no - member , protected - access <nl> + <nl> + def multiply ( lhs , rhs ) : <nl> + " " " Perform element - wise multiplication <nl> + <nl> + Parameters <nl> + mmmmmmmmm - <nl> + lhs : Array or float value <nl> + left hand side operand <nl> + <nl> + rhs : Array of float value <nl> + right hand side operand <nl> + <nl> + Returns <nl> + mmmmmm - <nl> + out : Array <nl> + result array <nl> + " " " <nl> + # pylint : disable = no - member , protected - access <nl> + if isinstance ( lhs , numeric_types ) : <nl> + if isinstance ( rhs , numeric_types ) : <nl> + return lhs * rhs <nl> + else : <nl> + return multiply ( rhs , lhs ) <nl> + elif isinstance ( rhs , numeric_types ) : <nl> + return NDArray . _mul_scalar ( lhs , float ( rhs ) ) <nl> + elif isinstance ( rhs , NDArray ) : <nl> + lsize = functools . reduce ( operator . mul , lhs . shape ) <nl> + rsize = functools . reduce ( operator . mul , rhs . shape ) <nl> + if lsize < rsize : <nl> + lhs = lhs . broadcast_to ( rhs . shape ) <nl> + elif lsize > rsize : <nl> + rhs = rhs . broadcast_to ( lhs . shape ) <nl> + return NDArray . _mul ( lhs , rhs ) <nl> + else : <nl> + raise TypeError ( ' type % s not supported ' % str ( type ( rhs ) ) ) <nl> + # pylint : enable = no - member , protected - access <nl> + <nl> + def divide ( lhs , rhs ) : <nl> + " " " Perform element - wise divide <nl> + <nl> + Parameters <nl> + mmmmmmmmm - <nl> + lhs : Array or float value <nl> + left hand side operand <nl> + <nl> + rhs : Array of float value <nl> + right hand side operand <nl> + <nl> + Returns <nl> + mmmmmm - <nl> + out : Array <nl> + result array <nl> + " " " <nl> + # pylint : disable = no - member , protected - access <nl> + if isinstance ( lhs , numeric_types ) : <nl> + if isinstance ( rhs , numeric_types ) : <nl> + return lhs / rhs <nl> + elif isinstance ( rhs , NDArray ) : <nl> + return NDArray . _rdiv_scalar ( rhs , float ( lhs ) ) <nl> + else : <nl> + raise TypeError ( ' type % s not supported ' % str ( type ( rhs ) ) ) <nl> + elif isinstance ( rhs , numeric_types ) : <nl> + return NDArray . _div_scalar ( lhs , float ( rhs ) ) <nl> + elif isinstance ( rhs , NDArray ) : <nl> + lsize = functools . reduce ( operator . mul , lhs . shape ) <nl> + rsize = functools . reduce ( operator . mul , rhs . shape ) <nl> + if lsize < rsize : <nl> + lhs = lhs . broadcast_to ( rhs . shape ) <nl> + elif lsize > rsize : <nl> + rhs = rhs . broadcast_to ( lhs . shape ) <nl> + return NDArray . _div ( lhs , rhs ) <nl> + else : <nl> + raise TypeError ( ' type % s not supported ' % str ( type ( rhs ) ) ) <nl> + # pylint : enable = no - member , protected - access <nl> + <nl> + def true_divide ( lhs , rhs ) : <nl> + " " " Same as numpy ' s true_divide . It adjusts the output type to present the best answer , <nl> + regardless of input types . <nl> + " " " <nl> + return divide ( lhs , rhs ) <nl> + <nl> + def negative ( arr ) : <nl> + " " " Return the negation of array values " " " <nl> + return multiply ( arr , - 1 . 0 ) <nl> + <nl> def zeros ( shape , ctx = None , dtype = mx_real_t ) : <nl> " " " Create a new NDArray filled with 0 , with specified shape . <nl> <nl> def ones ( shape , ctx = None , dtype = mx_real_t ) : <nl> arr [ : ] = 1 . 0 <nl> return arr <nl> <nl> + # pylint : disable = too - many - locals , invalid - name , no - member , protected - access , undefined - variable <nl> + def sum ( arr , axis = None , keepdims = False ) : <nl> + " " " Reduce the array along given axises . The semantic strictly follows numpy ' s document . <nl> + <nl> + Parameters <nl> + mmmmmmmmm - <nl> + arr : Array <nl> + the array to be reduced <nl> + axis : int or list ( int ) , optional <nl> + along which axis to do reduction <nl> + keepdims : bool <nl> + whether the reduced axis should be kept in the final shape <nl> + <nl> + Returns <nl> + mmmmmm - <nl> + out : Array <nl> + The reduced NDArray . <nl> + " " " <nl> + # Sanity checks . <nl> + ndim = len ( arr . shape ) <nl> + if axis is None : <nl> + axis = list ( range ( ndim ) ) <nl> + elif isinstance ( axis , int ) : <nl> + axis = [ axis ] <nl> + elif isinstance ( axis , tuple ) : <nl> + axis = list ( axis ) <nl> + else : <nl> + raise TypeError ( ' \ ' % s \ ' object cannot be interpreted as an integer ' % type ( axis ) . __name__ ) <nl> + for i in axis : <nl> + if not isinstance ( i , int ) : <nl> + raise TypeError ( ' \ ' % s \ ' object cannot be interpreted as an integer ' % type ( i ) . __name__ ) <nl> + axis = sorted ( [ x if 0 < = x else x + ndim for x in axis ] ) <nl> + for i in axis : <nl> + if i < 0 or ndim < = i : <nl> + raise ValueError ( ' \ ' axis \ ' entry is out of bounds ' ) <nl> + if len ( set ( axis ) ) ! = len ( axis ) : <nl> + raise ValueError ( ' duplicate value in \ ' axis \ ' ' ) <nl> + assert ( len ( axis ) ! = 0 ) <nl> + <nl> + def get_ranges ( lst ) : <nl> + " " " Get consecutive ranges . " " " <nl> + i = 0 <nl> + j = 0 <nl> + ret = [ ] <nl> + while j < len ( lst ) - 1 : <nl> + if lst [ j ] + 1 ! = lst [ j + 1 ] : <nl> + ret . append ( ( lst [ i ] , lst [ j ] ) ) <nl> + i = j + 1 <nl> + j + = 1 <nl> + ret . append ( ( lst [ i ] , lst [ j ] ) ) <nl> + return ret <nl> + <nl> + # Reduction . <nl> + shape = arr . shape <nl> + ret = arr <nl> + for i in reversed ( get_ranges ( axis ) ) : <nl> + after_dim = shape [ i [ 1 ] + 1 : ] <nl> + after = functools . reduce ( operator . mul , after_dim , 1 ) <nl> + before_dim = shape [ : i [ 0 ] ] <nl> + before = functools . reduce ( operator . mul , before_dim , 1 ) <nl> + between = functools . reduce ( operator . mul , shape [ i [ 0 ] : i [ 1 ] + 1 ] , 1 ) <nl> + interval = i [ 1 ] - i [ 0 ] + 1 <nl> + shape = before_dim + tuple ( [ 1 ] * ( interval if keepdims else 0 ) ) + after_dim <nl> + reduction_shape = ( before , between , after ) <nl> + ret = ret . reshape ( reduction_shape ) <nl> + ret = sum_mid_internal ( ret ) <nl> + if len ( shape ) = = 0 : <nl> + ret = ret . reshape ( ( 1 , ) ) . asnumpy ( ) [ 0 ] <nl> + else : <nl> + ret = ret . reshape ( shape ) <nl> + return ret <nl> + # pylint : enable = too - many - locals , invalid - name , no - member , protected - access , undefined - variable <nl> + <nl> + def full ( shape , val , ctx = None ) : <nl> + " " " Create a new NDArray filled with given value , with specified shape . <nl> + <nl> + Parameters <nl> + mmmmmmmmm - <nl> + shape : tuple <nl> + shape of the NDArray . <nl> + val : float <nl> + value to be filled with . <nl> + ctx : Context , optional <nl> + The context of the NDArray , default to current default context . <nl> + <nl> + Returns <nl> + mmmmmm - <nl> + out : Array <nl> + The created NDArray . <nl> + " " " <nl> + arr = empty ( shape , ctx ) <nl> + arr [ : ] = val <nl> + return arr <nl> <nl> def array ( source_array , ctx = None , dtype = mx_real_t ) : <nl> " " " Create a new NDArray that copies content from source_array . <nl> def array ( source_array , ctx = None , dtype = mx_real_t ) : <nl> arr [ : ] = source_array <nl> return arr <nl> <nl> + def concatenate ( arrays , always_copy = True ) : <nl> + " " " Concatenate a list of NDArrays along the first dimension . <nl> + <nl> + Parameters <nl> + mmmmmmmmm - <nl> + arrays : list of NDArray <nl> + Arrays to be concatenate . They must have identical shape except <nl> + the first dimension . They also must have the same data type . <nl> + always_copy : bool <nl> + Default ` True ` . When not ` True ` , if the arrays only contain one <nl> + ` NDArray ` , that element will be returned directly , avoid copying . <nl> + <nl> + Returns <nl> + mmmmmm - <nl> + An ` NDArray ` that lives on the same context as ` arrays [ 0 ] . context ` . <nl> + " " " <nl> + assert isinstance ( arrays , list ) <nl> + assert len ( arrays ) > 0 <nl> + assert isinstance ( arrays [ 0 ] , NDArray ) <nl> + <nl> + if not always_copy and len ( arrays ) = = 1 : <nl> + return arrays [ 0 ] <nl> + <nl> + shape0 = arrays [ 0 ] . shape [ 0 ] <nl> + shape_rest = arrays [ 0 ] . shape [ 1 : ] <nl> + dtype = arrays [ 0 ] . dtype <nl> + for arr in arrays [ 1 : ] : <nl> + shape0 + = arr . shape [ 0 ] <nl> + assert shape_rest = = arr . shape [ 1 : ] <nl> + assert dtype = = arr . dtype <nl> + ret = empty ( ( shape0 , ) + shape_rest , ctx = arrays [ 0 ] . context , dtype = dtype ) <nl> + idx = 0 <nl> + for arr in arrays : <nl> + ret [ idx : idx + arr . shape [ 0 ] ] = arr <nl> + idx + = arr . shape [ 0 ] <nl> + <nl> + return ret <nl> <nl> def load ( fname ) : <nl> " " " Load ndarray from binary file . <nl> def _init_ndarray_module ( ) : <nl> if function . __name__ . startswith ( ' _ ' ) : <nl> setattr ( NDArray , function . __name__ , staticmethod ( function ) ) <nl> else : <nl> - setattr ( module_obj , function . __name__ , function ) <nl> + fname = function . __name__ <nl> + fn_obj = getattr ( module_obj , fname , None ) <nl> + if fn_obj is None : <nl> + setattr ( module_obj , fname , function ) <nl> + else : <nl> + setattr ( module_obj , fname + ' _internal ' , function ) <nl> <nl> # Initialize the NDArray module <nl> _init_ndarray_module ( ) <nl> mmm a / python / setup . py <nl> ppp b / python / setup . py <nl> <nl> ' numpy ' , <nl> ] , <nl> zip_safe = False , <nl> - packages = [ ' mxnet ' ] , <nl> + packages = [ ' mxnet ' , ' mxnet . module ' ] , <nl> data_files = [ ( ' mxnet ' , [ LIB_PATH [ 0 ] ] ) ] , <nl> url = ' https : / / github . com / dmlc / mxnet ' ) <nl> mmm a / scala - package / README . md <nl> ppp b / scala - package / README . md <nl> Refer to the next section for how to build it from the very source . <nl> Build <nl> mmmmmmmmmmmm <nl> <nl> - Checkout the [ Installation Guide ] ( http : / / mxnet . readthedocs . org / en / latest / build . html ) contains instructions to install mxnet . <nl> + Checkout the [ Installation Guide ] ( http : / / mxnet . readthedocs . org / en / latest / how_to / build . html ) contains instructions to install mxnet . <nl> Then you can compile the Scala Package by <nl> <nl> ` ` ` bash <nl> Also it produces the native library in ` native / { your - architecture } / target ` , whic <nl> Once you ' ve downloaded and unpacked MNIST dataset to ` . / data / ` , run the training example by <nl> <nl> ` ` ` bash <nl> - java - Xmx4m - cp scala - package / assembly / target / * : scala - package / examples / target / * ml . dmlc . mxnet . examples . imclassification . TrainMnist - - data - dir = . / data / - - num - epochs = 10 - - network = mlp - - cpus = 0 , 1 , 2 , 3 <nl> + java - Xmx4m - cp \ <nl> + scala - package / assembly / { your - architecture } / target / * : scala - package / examples / target / * : scala - package / examples / target / classes / lib / * \ <nl> + ml . dmlc . mxnet . examples . imclassification . TrainMnist \ <nl> + - - data - dir = . / data / \ <nl> + - - num - epochs = 10 \ <nl> + - - network = mlp \ <nl> + - - cpus = 0 , 1 , 2 , 3 <nl> + ` ` ` <nl> + <nl> + If you ' ve compiled with ` USE_DIST_KVSTORE ` enabled , the python tools in ` mxnet / tracker ` can be used to launch distributed training . <nl> + The following command runs the above example using 2 worker nodes ( and 2 server nodes ) in local . Refer to [ Distributed Training ] ( http : / / mxnet . readthedocs . org / en / latest / distributed_training . html ) for more details . <nl> + <nl> + ` ` ` bash <nl> + tracker / dmlc_local . py - n 2 - s 2 \ <nl> + java - Xmx4m - cp \ <nl> + scala - package / assembly / { your - architecture } / target / * : scala - package / examples / target / * : scala - package / examples / target / classes / lib / * \ <nl> + ml . dmlc . mxnet . examples . imclassification . TrainMnist \ <nl> + - - data - dir = . / data / \ <nl> + - - num - epochs = 10 \ <nl> + - - network = mlp \ <nl> + - - cpus = 0 \ <nl> + - - kv - store = dist_sync <nl> ` ` ` <nl> <nl> Change the arguments and have fun ! <nl> mmm a / scala - package / assembly / linux - x86_64 - cpu / pom . xml <nl> ppp b / scala - package / assembly / linux - x86_64 - cpu / pom . xml <nl> <nl> < parent > <nl> < groupId > ml . dmlc . mxnet < / groupId > <nl> < artifactId > mxnet - full - parent_2 . 10 < / artifactId > <nl> - < version > 0 . 1 . 1 < / version > <nl> + < version > 0 . 1 . 2 - SNAPSHOT < / version > <nl> < relativePath > . . / pom . xml < / relativePath > <nl> < / parent > <nl> <nl> < groupId > ml . dmlc . mxnet < / groupId > <nl> < artifactId > mxnet - full_2 . 10 - linux - x86_64 - cpu < / artifactId > <nl> - < version > 0 . 1 . 1 < / version > <nl> + < version > 0 . 1 . 2 - SNAPSHOT < / version > <nl> < name > MXNet Scala Package - Full Linux - x86_64 CPU - only < / name > <nl> < packaging > jar < / packaging > <nl> <nl> mmm a / scala - package / assembly / linux - x86_64 - gpu / pom . xml <nl> ppp b / scala - package / assembly / linux - x86_64 - gpu / pom . xml <nl> <nl> < parent > <nl> < groupId > ml . dmlc . mxnet < / groupId > <nl> < artifactId > mxnet - full - parent_2 . 10 < / artifactId > <nl> - < version > 0 . 1 . 1 < / version > <nl> + < version > 0 . 1 . 2 - SNAPSHOT < / version > <nl> < relativePath > . . / pom . xml < / relativePath > <nl> < / parent > <nl> <nl> < groupId > ml . dmlc . mxnet < / groupId > <nl> < artifactId > mxnet - full_2 . 10 - linux - x86_64 - gpu < / artifactId > <nl> - < version > 0 . 1 . 1 < / version > <nl> + < version > 0 . 1 . 2 - SNAPSHOT < / version > <nl> < name > MXNet Scala Package - Full Linux - x86_64 GPU < / name > <nl> < packaging > jar < / packaging > <nl> <nl> mmm a / scala - package / assembly / osx - x86_64 - cpu / pom . xml <nl> ppp b / scala - package / assembly / osx - x86_64 - cpu / pom . xml <nl> <nl> < parent > <nl> < groupId > ml . dmlc . mxnet < / groupId > <nl> < artifactId > mxnet - full - parent_2 . 10 < / artifactId > <nl> - < version > 0 . 1 . 1 < / version > <nl> + < version > 0 . 1 . 2 - SNAPSHOT < / version > <nl> < relativePath > . . / pom . xml < / relativePath > <nl> < / parent > <nl> <nl> < groupId > ml . dmlc . mxnet < / groupId > <nl> < artifactId > mxnet - full_2 . 10 - osx - x86_64 - cpu < / artifactId > <nl> - < version > 0 . 1 . 1 < / version > <nl> + < version > 0 . 1 . 2 - SNAPSHOT < / version > <nl> < name > MXNet Scala Package - Full OSX - x86_64 CPU - only < / name > <nl> < packaging > jar < / packaging > <nl> <nl> mmm a / scala - package / assembly / pom . xml <nl> ppp b / scala - package / assembly / pom . xml <nl> <nl> < parent > <nl> < groupId > ml . dmlc . mxnet < / groupId > <nl> < artifactId > mxnet - parent_2 . 10 < / artifactId > <nl> - < version > 0 . 1 . 1 < / version > <nl> + < version > 0 . 1 . 2 - SNAPSHOT < / version > <nl> < relativePath > . . / pom . xml < / relativePath > <nl> < / parent > <nl> <nl> < groupId > ml . dmlc . mxnet < / groupId > <nl> < artifactId > mxnet - full - parent_2 . 10 < / artifactId > <nl> - < version > 0 . 1 . 1 < / version > <nl> + < version > 0 . 1 . 2 - SNAPSHOT < / version > <nl> < name > MXNet Scala Package - Full Parent < / name > <nl> < packaging > pom < / packaging > <nl> <nl> mmm a / scala - package / core / pom . xml <nl> ppp b / scala - package / core / pom . xml <nl> <nl> < parent > <nl> < groupId > ml . dmlc . mxnet < / groupId > <nl> < artifactId > mxnet - parent_2 . 10 < / artifactId > <nl> - < version > 0 . 1 . 1 < / version > <nl> + < version > 0 . 1 . 2 - SNAPSHOT < / version > <nl> < relativePath > . . / pom . xml < / relativePath > <nl> < / parent > <nl> <nl> < groupId > ml . dmlc . mxnet < / groupId > <nl> < artifactId > mxnet - core_2 . 10 < / artifactId > <nl> - < version > 0 . 1 . 1 < / version > <nl> + < version > 0 . 1 . 2 - SNAPSHOT < / version > <nl> < name > MXNet Scala Package - Core < / name > <nl> <nl> < profiles > <nl> mmm a / scala - package / core / src / main / scala / ml / dmlc / mxnet / KVStore . scala <nl> ppp b / scala - package / core / src / main / scala / ml / dmlc / mxnet / KVStore . scala <nl> <nl> package ml . dmlc . mxnet <nl> <nl> import ml . dmlc . mxnet . Base . _ <nl> + import org . slf4j . { LoggerFactory , Logger } <nl> <nl> / * * <nl> * Key value store interface of MXNet for parameter synchronization . <nl> object KVStore { <nl> } <nl> <nl> / / scalastyle : off finalize <nl> - class KVStore ( private val handle : KVStoreHandle ) { <nl> + class KVStore ( private [ mxnet ] val handle : KVStoreHandle ) { <nl> + private val logger : Logger = LoggerFactory . getLogger ( classOf [ KVStore ] ) <nl> private var updaterFunc : MXKVStoreUpdater = null <nl> private var disposed = false <nl> <nl> class KVStore ( private val handle : KVStoreHandle ) { <nl> def setOptimizer ( optimizer : Optimizer ) : Unit = { <nl> val isWorker = new RefInt <nl> checkCall ( _LIB . mxKVStoreIsWorkerNode ( isWorker ) ) <nl> - if ( " dist " = = ` type ` & & isWorker . value ! = 0 ) { <nl> + if ( ` type ` . contains ( " dist " ) & & isWorker . value ! = 0 ) { <nl> val optSerialized = Serializer . getSerializer . serialize ( optimizer ) <nl> - sendCommandToServers ( 0 , Serializer . encodeBase64String ( optSerialized ) ) <nl> + val cmd = Serializer . encodeBase64String ( optSerialized ) <nl> + logger . debug ( " Send optimizer to server : { } " , cmd ) <nl> + sendCommandToServers ( 0 , cmd ) <nl> } else { <nl> setUpdater ( Optimizer . getUpdater ( optimizer ) ) <nl> } <nl> new file mode 100644 <nl> index 00000000000 . . f2dfd6cd95b <nl> mmm / dev / null <nl> ppp b / scala - package / core / src / main / scala / ml / dmlc / mxnet / KVStoreServer . scala <nl> <nl> + package ml . dmlc . mxnet <nl> + <nl> + import ml . dmlc . mxnet . Base . _ <nl> + import org . slf4j . { Logger , LoggerFactory } <nl> + <nl> + / * * <nl> + * Server node for the key value store <nl> + * @ author Yizhi Liu <nl> + * / <nl> + class KVStoreServer ( private val kvStore : KVStore ) { <nl> + private val logger : Logger = LoggerFactory . getLogger ( classOf [ KVStoreServer ] ) <nl> + private val handle : KVStoreHandle = kvStore . handle <nl> + private val controller = new KVServerControllerCallback { <nl> + override def invoke ( cmdId : Int , cmdBody : String ) : Unit = { <nl> + logger . debug ( " Receive cmdId { } , cmdBody : { } " , cmdId , cmdBody ) <nl> + if ( cmdId = = 0 ) { <nl> + val optimizer = Serializer . getSerializer . deserialize [ Optimizer ] ( <nl> + Serializer . decodeBase64String ( cmdBody ) ) <nl> + kvStore . setOptimizer ( optimizer ) <nl> + } else { <nl> + logger . warn ( s " Server $ { kvStore . rank } , unknown command ( $ cmdId , $ cmdBody ) " ) <nl> + } <nl> + } <nl> + } <nl> + <nl> + / / run the server , whose behavior is like <nl> + / / while receive ( x ) : <nl> + / / if is_command x : controller ( x ) <nl> + / / else if is_key_value x : updater ( x ) <nl> + def run ( ) : Unit = { <nl> + checkCall ( _LIB . mxKVStoreRunServer ( handle , controller ) ) <nl> + } <nl> + } <nl> + <nl> + object KVStoreServer { <nl> + / / Start server / scheduler according to env variables <nl> + def start ( ) : Unit = { <nl> + val isWorker = new RefInt <nl> + checkCall ( _LIB . mxKVStoreIsWorkerNode ( isWorker ) ) <nl> + require ( isWorker . value = = 0 , " cannot start kv - store server on worker node " ) <nl> + val kvStore = KVStore . create ( " dist " ) <nl> + val server = new KVStoreServer ( kvStore ) <nl> + server . run ( ) <nl> + } <nl> + <nl> + def init ( env : Map [ String , String ] ) : Unit = { <nl> + val keys = env . keys . toArray <nl> + val vals = env . values . toArray <nl> + checkCall ( _LIB . mxInitPSEnv ( keys , vals ) ) <nl> + } <nl> + } <nl> + <nl> + trait KVServerControllerCallback { <nl> + def invoke ( cmdId : Int , cmdBody : String ) : Unit <nl> + } <nl> mmm a / scala - package / core / src / main / scala / ml / dmlc / mxnet / LRScheduler . scala <nl> ppp b / scala - package / core / src / main / scala / ml / dmlc / mxnet / LRScheduler . scala <nl> class FactorScheduler ( protected var step : Int , protected var factor : Float ) exte <nl> protected var count : Int = 0 <nl> private val logger = LoggerFactory . getLogger ( classOf [ FactorScheduler ] ) <nl> <nl> - require ( step < 1 , " Schedule step must be greater or equal than 1 round " ) <nl> - require ( factor > = 1 . 0 , " Factor must be less than 1 to make lr reduce " ) <nl> + require ( step > = 1 , " Schedule step must be greater or equal than 1 round " ) <nl> + require ( factor < 1 . 0 , " Factor must be less than 1 to make lr reduce " ) <nl> <nl> def apply ( numUpdate : Int ) : Float = { <nl> <nl> mmm a / scala - package / core / src / main / scala / ml / dmlc / mxnet / LibInfo . scala <nl> ppp b / scala - package / core / src / main / scala / ml / dmlc / mxnet / LibInfo . scala <nl> class LibInfo { <nl> handles : Array [ NDArrayHandle ] , <nl> keys : Array [ String ] ) : Int <nl> @ native def mxNDArrayGetContext ( handle : NDArrayHandle , devTypeId : RefInt , devId : RefInt ) : Int <nl> + <nl> + / / KVStore Server <nl> + @ native def mxInitPSEnv ( keys : Array [ String ] , values : Array [ String ] ) : Int <nl> + @ native def mxKVStoreRunServer ( handle : KVStoreHandle , controller : KVServerControllerCallback ) : Int <nl> + <nl> / / KVStore <nl> @ native def mxKVStoreCreate ( name : String , handle : KVStoreHandleRef ) : Int <nl> @ native def mxKVStoreInit ( handle : KVStoreHandle , <nl> new file mode 100644 <nl> index 00000000000 . . b948daeebd0 <nl> mmm / dev / null <nl> ppp b / scala - package / core / src / test / scala / ml / dmlc / mxnet / SerializerSuite . scala <nl> <nl> + package ml . dmlc . mxnet <nl> + <nl> + import ml . dmlc . mxnet . optimizer . SGD <nl> + import org . scalatest . { Matchers , BeforeAndAfterAll , FunSuite } <nl> + <nl> + class SerializerSuite extends FunSuite with BeforeAndAfterAll with Matchers { <nl> + test ( " serialize and deserialize optimizer " ) { <nl> + val optimizer : Optimizer = new SGD ( learningRate = 0 . 1f , momentum = 0 . 9f , wd = 0 . 0005f ) <nl> + val optSerialized : String = Serializer . encodeBase64String ( <nl> + Serializer . getSerializer . serialize ( optimizer ) ) <nl> + assert ( optSerialized . length > 0 ) <nl> + <nl> + val bytes = Serializer . decodeBase64String ( optSerialized ) <nl> + val optDeserialized = Serializer . getSerializer . deserialize [ Optimizer ] ( bytes ) <nl> + <nl> + assert ( optDeserialized . isInstanceOf [ SGD ] ) <nl> + val sgd = optDeserialized . asInstanceOf [ SGD ] <nl> + <nl> + val learningRate = classOf [ SGD ] . getDeclaredField ( " learningRate " ) <nl> + learningRate . setAccessible ( true ) <nl> + assert ( learningRate . get ( sgd ) . asInstanceOf [ Float ] = = = 0 . 1f + - 1e - 6f ) <nl> + <nl> + val momentum = classOf [ SGD ] . getDeclaredField ( " momentum " ) <nl> + momentum . setAccessible ( true ) <nl> + assert ( momentum . get ( sgd ) . asInstanceOf [ Float ] = = = 0 . 9f + - 1e - 6f ) <nl> + <nl> + val wd = classOf [ SGD ] . getDeclaredField ( " wd " ) <nl> + wd . setAccessible ( true ) <nl> + assert ( wd . get ( sgd ) . asInstanceOf [ Float ] = = = 0 . 0005f + - 1e - 6f ) <nl> + } <nl> + } <nl> mmm a / scala - package / examples / pom . xml <nl> ppp b / scala - package / examples / pom . xml <nl> <nl> < parent > <nl> < groupId > ml . dmlc . mxnet < / groupId > <nl> < artifactId > mxnet - parent_2 . 10 < / artifactId > <nl> - < version > 0 . 1 . 1 < / version > <nl> + < version > 0 . 1 . 2 - SNAPSHOT < / version > <nl> < relativePath > . . / pom . xml < / relativePath > <nl> < / parent > <nl> <nl> < artifactId > mxnet - examples_2 . 10 < / artifactId > <nl> - < version > 0 . 1 . 1 < / version > <nl> + < version > 0 . 1 . 2 - SNAPSHOT < / version > <nl> < name > MXNet Scala Package - Examples < / name > <nl> < packaging > pom < / packaging > <nl> <nl> <nl> < groupId > org . scalacheck < / groupId > <nl> < artifactId > scalacheck_ $ { scala . binary . version } < / artifactId > <nl> < / dependency > <nl> + < dependency > <nl> + < groupId > com . sksamuel . scrimage < / groupId > <nl> + < artifactId > scrimage - core_2 . 10 < / artifactId > <nl> + < version > 2 . 1 . 5 < / version > <nl> + < / dependency > <nl> + < dependency > <nl> + < groupId > com . sksamuel . scrimage < / groupId > <nl> + < artifactId > scrimage - io - extra_2 . 10 < / artifactId > <nl> + < version > 2 . 1 . 5 < / version > <nl> + < / dependency > <nl> + < dependency > <nl> + < groupId > com . sksamuel . scrimage < / groupId > <nl> + < artifactId > scrimage - filters_2 . 10 < / artifactId > <nl> + < version > 2 . 1 . 5 < / version > <nl> + < / dependency > <nl> < / dependencies > <nl> < / project > <nl> new file mode 100644 <nl> index 00000000000 . . 07f5ffd5c9f <nl> mmm / dev / null <nl> ppp b / scala - package / examples / scripts / run_neuralstyle . sh <nl> <nl> + # ! / bin / bash <nl> + <nl> + MXNET_ROOT = $ ( cd " $ ( dirname $ 0 ) / . . / . . / . . " ; pwd ) <nl> + CLASS_PATH = $ MXNET_ROOT / scala - package / assembly / linux - x86_64 - gpu / target / * : $ MXNET_ROOT / scala - package / examples / target / * : $ MXNET_ROOT / scala - package / examples / target / classes / lib / * <nl> + INPUT_IMG = $ 1 <nl> + STYLE_IMG = $ 2 <nl> + MODEL_PATH = $ MXNET_ROOT / example / neural - style / model / vgg19 . params <nl> + OUTPUT_DIR = $ MXNET_ROOT / example / neural - style / output <nl> + <nl> + java - Xmx1024m - cp $ CLASS_PATH \ <nl> + ml . dmlc . mxnet . examples . neuralstyle . NeuralStyle \ <nl> + - - content - image $ INPUT_IMG \ <nl> + - - style - image $ STYLE_IMG \ <nl> + - - model - path $ MODEL_PATH \ <nl> + - - output - dir $ OUTPUT_DIR <nl> mmm a / scala - package / examples / src / main / scala / ml / dmlc / mxnet / examples / imclassification / TrainMnist . scala <nl> ppp b / scala - package / examples / src / main / scala / ml / dmlc / mxnet / examples / imclassification / TrainMnist . scala <nl> import ml . dmlc . mxnet . _ <nl> import org . kohsuke . args4j . { CmdLineParser , Option } <nl> import org . slf4j . LoggerFactory <nl> <nl> + import scala . collection . mutable <nl> import scala . collection . JavaConverters . _ <nl> <nl> object TrainMnist { <nl> object TrainMnist { <nl> else if ( inst . cpus ! = null ) inst . cpus . split ( ' , ' ) . map ( id = > Context . cpu ( id . trim . toInt ) ) <nl> else Array ( Context . cpu ( 0 ) ) <nl> <nl> - ModelTrain . fit ( dataDir = inst . dataDir , <nl> - batchSize = inst . batchSize , numExamples = inst . numExamples , devs = devs , <nl> - network = net , dataLoader = getIterator ( dataShape ) , <nl> - kvStore = inst . kvStore , numEpochs = inst . numEpochs , <nl> - modelPrefix = inst . modelPrefix , loadEpoch = inst . loadEpoch , <nl> - lr = inst . lr , lrFactor = inst . lrFactor , lrFactorEpoch = inst . lrFactorEpoch , <nl> - monitorSize = inst . monitor ) <nl> - logger . info ( " Finish fit . . . " ) <nl> + val envs : mutable . Map [ String , String ] = mutable . HashMap . empty [ String , String ] <nl> + envs . put ( " DMLC_ROLE " , inst . role ) <nl> + if ( inst . schedulerHost ! = null ) { <nl> + require ( inst . schedulerPort > 0 , " scheduler port not specified " ) <nl> + envs . put ( " DMLC_PS_ROOT_URI " , inst . schedulerHost ) <nl> + envs . put ( " DMLC_PS_ROOT_PORT " , inst . schedulerPort . toString ) <nl> + require ( inst . numWorker > 0 , " Num of workers must > 0 " ) <nl> + envs . put ( " DMLC_NUM_WORKER " , inst . numWorker . toString ) <nl> + require ( inst . numServer > 0 , " Num of servers must > 0 " ) <nl> + envs . put ( " DMLC_NUM_SERVER " , inst . numServer . toString ) <nl> + } <nl> + logger . info ( " Init PS environments " ) <nl> + KVStoreServer . init ( envs . toMap ) <nl> + <nl> + if ( inst . role ! = " worker " ) { <nl> + logger . info ( " Start KVStoreServer for scheduler & servers " ) <nl> + KVStoreServer . start ( ) <nl> + } else { <nl> + ModelTrain . fit ( dataDir = inst . dataDir , <nl> + batchSize = inst . batchSize , numExamples = inst . numExamples , devs = devs , <nl> + network = net , dataLoader = getIterator ( dataShape ) , <nl> + kvStore = inst . kvStore , numEpochs = inst . numEpochs , <nl> + modelPrefix = inst . modelPrefix , loadEpoch = inst . loadEpoch , <nl> + lr = inst . lr , lrFactor = inst . lrFactor , lrFactorEpoch = inst . lrFactorEpoch , <nl> + monitorSize = inst . monitor ) <nl> + logger . info ( " Finish fit . . . " ) <nl> + } <nl> } catch { <nl> case ex : Exception = > { <nl> logger . error ( ex . getMessage , ex ) <nl> class TrainMnist { <nl> private val lrFactorEpoch : Float = 1f <nl> @ Option ( name = " - - monitor " , usage = " monitor the training process every N batch " ) <nl> private val monitor : Int = - 1 <nl> + <nl> + @ Option ( name = " - - role " , usage = " scheduler / server / worker " ) <nl> + private val role : String = " worker " <nl> + @ Option ( name = " - - scheduler - host " , usage = " Scheduler hostname / ip address " ) <nl> + private val schedulerHost : String = null <nl> + @ Option ( name = " - - scheduler - port " , usage = " Scheduler port " ) <nl> + private val schedulerPort : Int = 0 <nl> + @ Option ( name = " - - num - worker " , usage = " # of workers " ) <nl> + private val numWorker : Int = 1 <nl> + @ Option ( name = " - - num - server " , usage = " # of servers " ) <nl> + private val numServer : Int = 1 <nl> } <nl> new file mode 100644 <nl> index 00000000000 . . 8741f1951d9 <nl> mmm / dev / null <nl> ppp b / scala - package / examples / src / main / scala / ml / dmlc / mxnet / examples / neuralstyle / ModelVgg19 . scala <nl> <nl> + package ml . dmlc . mxnet . examples . neuralstyle <nl> + <nl> + import ml . dmlc . mxnet . Context <nl> + import ml . dmlc . mxnet . Executor <nl> + import ml . dmlc . mxnet . NDArray <nl> + import ml . dmlc . mxnet . Symbol <nl> + import ml . dmlc . mxnet . Shape <nl> + <nl> + / * * <nl> + * Definition for the neuralstyle network and initialize it with pretrained weight <nl> + * @ author Depeng Liang <nl> + * / <nl> + object ModelVgg19 { <nl> + case class ConvExecutor ( executor : Executor , data : NDArray , dataGrad : NDArray , <nl> + style : Array [ NDArray ] , content : NDArray ) <nl> + <nl> + def getModel ( modelPath : String , inputSize : ( Int , Int ) , ctx : Context ) : ConvExecutor = { <nl> + / / declare symbol <nl> + val data = Symbol . Variable ( " data " ) <nl> + val conv1_1 = Symbol . Convolution ( " conv1_1 " ) ( Map ( " data " - > data , " num_filter " - > 64 , <nl> + " pad " - > " ( 1 , 1 ) " , " kernel " - > " ( 3 , 3 ) " , " stride " - > " ( 1 , 1 ) " , <nl> + " no_bias " - > false , " workspace " - > 1024 ) ) <nl> + val relu1_1 = Symbol . Activation ( " relu1_1 " ) ( Map ( " data " - > conv1_1 , " act_type " - > " relu " ) ) <nl> + val conv1_2 = Symbol . Convolution ( " conv1_2 " ) ( Map ( " data " - > relu1_1 , " num_filter " - > 64 , <nl> + " pad " - > " ( 1 , 1 ) " , " kernel " - > " ( 3 , 3 ) " , " stride " - > " ( 1 , 1 ) " , <nl> + " no_bias " - > false , " workspace " - > 1024 ) ) <nl> + val relu1_2 = Symbol . Activation ( " relu1_2 " ) ( Map ( " data " - > conv1_2 , " act_type " - > " relu " ) ) <nl> + val pool1 = Symbol . Pooling ( " pool1 " ) ( Map ( " data " - > relu1_2 , " pad " - > " ( 0 , 0 ) " , <nl> + " kernel " - > " ( 2 , 2 ) " , " stride " - > " ( 2 , 2 ) " , " pool_type " - > " avg " ) ) <nl> + val conv2_1 = Symbol . Convolution ( " conv2_1 " ) ( Map ( " data " - > pool1 , " num_filter " - > 128 , <nl> + " pad " - > " ( 1 , 1 ) " , " kernel " - > " ( 3 , 3 ) " , " stride " - > " ( 1 , 1 ) " , <nl> + " no_bias " - > false , " workspace " - > 1024 ) ) <nl> + val relu2_1 = Symbol . Activation ( " relu2_1 " ) ( Map ( " data " - > conv2_1 , " act_type " - > " relu " ) ) <nl> + val conv2_2 = Symbol . Convolution ( " conv2_2 " ) ( Map ( " data " - > relu2_1 , " num_filter " - > 128 , <nl> + " pad " - > " ( 1 , 1 ) " , " kernel " - > " ( 3 , 3 ) " , " stride " - > " ( 1 , 1 ) " , <nl> + " no_bias " - > false , " workspace " - > 1024 ) ) <nl> + val relu2_2 = Symbol . Activation ( " relu2_2 " ) ( Map ( " data " - > conv2_2 , " act_type " - > " relu " ) ) <nl> + val pool2 = Symbol . Pooling ( " pool2 " ) ( Map ( " data " - > relu2_2 , " pad " - > " ( 0 , 0 ) " , <nl> + " kernel " - > " ( 2 , 2 ) " , " stride " - > " ( 2 , 2 ) " , " pool_type " - > " avg " ) ) <nl> + val conv3_1 = Symbol . Convolution ( " conv3_1 " ) ( Map ( " data " - > pool2 , " num_filter " - > 256 , <nl> + " pad " - > " ( 1 , 1 ) " , " kernel " - > " ( 3 , 3 ) " , " stride " - > " ( 1 , 1 ) " , <nl> + " no_bias " - > false , " workspace " - > 1024 ) ) <nl> + val relu3_1 = Symbol . Activation ( " relu3_1 " ) ( Map ( " data " - > conv3_1 , " act_type " - > " relu " ) ) <nl> + val conv3_2 = Symbol . Convolution ( " conv3_2 " ) ( Map ( " data " - > relu3_1 , " num_filter " - > 256 , <nl> + " pad " - > " ( 1 , 1 ) " , " kernel " - > " ( 3 , 3 ) " , " stride " - > " ( 1 , 1 ) " , <nl> + " no_bias " - > false , " workspace " - > 1024 ) ) <nl> + val relu3_2 = Symbol . Activation ( " ' relu3_2 " ) ( Map ( " data " - > conv3_2 , " act_type " - > " relu " ) ) <nl> + val conv3_3 = Symbol . Convolution ( " conv3_3 " ) ( Map ( " data " - > relu3_2 , " num_filter " - > 256 , <nl> + " pad " - > " ( 1 , 1 ) " , " kernel " - > " ( 3 , 3 ) " , " stride " - > " ( 1 , 1 ) " , <nl> + " no_bias " - > false , " workspace " - > 1024 ) ) <nl> + val relu3_3 = Symbol . Activation ( " relu3_3 " ) ( Map ( " data " - > conv3_3 , " act_type " - > " relu " ) ) <nl> + val conv3_4 = Symbol . Convolution ( " conv3_4 " ) ( Map ( " data " - > relu3_3 , " num_filter " - > 256 , <nl> + " pad " - > " ( 1 , 1 ) " , " kernel " - > " ( 3 , 3 ) " , " stride " - > " ( 1 , 1 ) " , <nl> + " no_bias " - > false , " workspace " - > 1024 ) ) <nl> + val relu3_4 = Symbol . Activation ( " relu3_4 " ) ( Map ( " data " - > conv3_4 , " act_type " - > " relu " ) ) <nl> + val pool3 = Symbol . Pooling ( " pool3 " ) ( Map ( " data " - > relu3_4 , " pad " - > " ( 0 , 0 ) " , <nl> + " kernel " - > " ( 2 , 2 ) " , " stride " - > " ( 2 , 2 ) " , " pool_type " - > " avg " ) ) <nl> + val conv4_1 = Symbol . Convolution ( " conv4_1 " ) ( Map ( " data " - > pool3 , " num_filter " - > 512 , <nl> + " pad " - > " ( 1 , 1 ) " , " kernel " - > " ( 3 , 3 ) " , " stride " - > " ( 1 , 1 ) " , <nl> + " no_bias " - > false , " workspace " - > 1024 ) ) <nl> + val relu4_1 = Symbol . Activation ( " relu4_1 " ) ( Map ( " data " - > conv4_1 , " act_type " - > " relu " ) ) <nl> + val conv4_2 = Symbol . Convolution ( " conv4_2 " ) ( Map ( " data " - > relu4_1 , " num_filter " - > 512 , <nl> + " pad " - > " ( 1 , 1 ) " , " kernel " - > " ( 3 , 3 ) " , " stride " - > " ( 1 , 1 ) " , <nl> + " no_bias " - > false , " workspace " - > 1024 ) ) <nl> + val relu4_2 = Symbol . Activation ( " relu4_2 " ) ( Map ( " data " - > conv4_2 , " act_type " - > " relu " ) ) <nl> + val conv4_3 = Symbol . Convolution ( " conv4_3 " ) ( Map ( " data " - > relu4_2 , " num_filter " - > 512 , <nl> + " pad " - > " ( 1 , 1 ) " , " kernel " - > " ( 3 , 3 ) " , " stride " - > " ( 1 , 1 ) " , <nl> + " no_bias " - > false , " workspace " - > 1024 ) ) <nl> + val relu4_3 = Symbol . Activation ( " relu4_3 " ) ( Map ( " data " - > conv4_3 , " act_type " - > " relu " ) ) <nl> + val conv4_4 = Symbol . Convolution ( " conv4_4 " ) ( Map ( " data " - > relu4_3 , " num_filter " - > 512 , <nl> + " pad " - > " ( 1 , 1 ) " , " kernel " - > " ( 3 , 3 ) " , " stride " - > " ( 1 , 1 ) " , <nl> + " no_bias " - > false , " workspace " - > 1024 ) ) <nl> + val relu4_4 = Symbol . Activation ( " relu4_4 " ) ( Map ( " data " - > conv4_4 , " act_type " - > " relu " ) ) <nl> + val pool4 = Symbol . Pooling ( " pool4 " ) ( Map ( " data " - > relu4_4 , " pad " - > " ( 0 , 0 ) " , <nl> + " kernel " - > " ( 2 , 2 ) " , " stride " - > " ( 2 , 2 ) " , " pool_type " - > " avg " ) ) <nl> + val conv5_1 = Symbol . Convolution ( " conv5_1 " ) ( Map ( " data " - > pool4 , " num_filter " - > 512 , <nl> + " pad " - > " ( 1 , 1 ) " , " kernel " - > " ( 3 , 3 ) " , " stride " - > " ( 1 , 1 ) " , <nl> + " no_bias " - > false , " workspace " - > 1024 ) ) <nl> + val relu5_1 = Symbol . Activation ( " relu5_1 " ) ( Map ( " data " - > conv5_1 , " act_type " - > " relu " ) ) <nl> + <nl> + / / style and content layers <nl> + val style = Symbol . Group ( relu1_1 , relu2_1 , relu3_1 , relu4_1 , relu5_1 ) <nl> + val content = Symbol . Group ( relu4_2 ) <nl> + val out = Symbol . Group ( style , content ) <nl> + <nl> + / / make executor <nl> + val ( argShapes , outputShapes , auxShapes ) = out . inferShape ( <nl> + Map ( " data " - > Shape ( 1 , 3 , inputSize . _1 , inputSize . _2 ) ) ) <nl> + val argNames = out . listArguments ( ) <nl> + val argDict = argNames . zip ( argShapes . map ( NDArray . zeros ( _ , ctx ) ) ) . toMap <nl> + val gradDict = argNames . zip ( argShapes . map ( NDArray . zeros ( _ , ctx ) ) ) . toMap <nl> + / / init with pretrained weight <nl> + val pretrained = NDArray . load2Map ( modelPath ) <nl> + argNames . filter ( _ ! = " data " ) . foreach { name = > <nl> + argDict ( name ) . set ( pretrained ( s " arg : $ name " ) ) <nl> + } <nl> + val executor = out . bind ( ctx , argDict , gradDict ) <nl> + val outArray = executor . outputs <nl> + ConvExecutor ( executor = executor , <nl> + data = argDict ( " data " ) , <nl> + dataGrad = gradDict ( " data " ) , <nl> + style = outArray . take ( outArray . length - 1 ) , <nl> + content = outArray ( outArray . length - 1 ) ) <nl> + } <nl> + } <nl> new file mode 100644 <nl> index 00000000000 . . 9450e88ee64 <nl> mmm / dev / null <nl> ppp b / scala - package / examples / src / main / scala / ml / dmlc / mxnet / examples / neuralstyle / NeuralStyle . scala <nl> <nl> + package ml . dmlc . mxnet . examples . neuralstyle <nl> + <nl> + import ml . dmlc . mxnet . _ <nl> + import org . kohsuke . args4j . { CmdLineParser , Option } <nl> + import org . slf4j . LoggerFactory <nl> + import scala . collection . JavaConverters . _ <nl> + import com . sksamuel . scrimage . Image <nl> + import java . io . File <nl> + import com . sksamuel . scrimage . Pixel <nl> + import com . sksamuel . scrimage . filter . GaussianBlurFilter <nl> + import com . sksamuel . scrimage . nio . JpegWriter <nl> + import ml . dmlc . mxnet . optimizer . SGD <nl> + import ml . dmlc . mxnet . optimizer . Adam <nl> + <nl> + / * * <nl> + * An Implementation of the paper A Neural Algorithm of Artistic Style <nl> + * by Leon A . Gatys , Alexander S . Ecker , and Matthias Bethge <nl> + * @ author Depeng Liang <nl> + * / <nl> + object NeuralStyle { <nl> + case class NSExecutor ( executor : Executor , data : NDArray , dataGrad : NDArray ) <nl> + <nl> + private val logger = LoggerFactory . getLogger ( classOf [ NeuralStyle ] ) <nl> + <nl> + def preprocessContentImage ( path : String , longEdge : Int , ctx : Context ) : NDArray = { <nl> + val img = Image ( new File ( path ) ) <nl> + logger . info ( s " load the content image , size = $ { ( img . height , img . width ) } " ) <nl> + val factor = longEdge . toFloat / Math . max ( img . height , img . width ) <nl> + val ( newHeight , newWidth ) = ( ( img . height * factor ) . toInt , ( img . width * factor ) . toInt ) <nl> + val resizedImg = img . scaleTo ( newWidth , newHeight ) <nl> + val sample = NDArray . empty ( Shape ( 1 , 3 , newHeight , newWidth ) , ctx ) <nl> + val datas = { <nl> + val rgbs = resizedImg . iterator . toArray . map { p = > <nl> + ( p . red , p . green , p . blue ) <nl> + } <nl> + val r = rgbs . map ( _ . _1 - 123 . 68f ) <nl> + val g = rgbs . map ( _ . _2 - 116 . 779f ) <nl> + val b = rgbs . map ( _ . _3 - 103 . 939f ) <nl> + r + + g + + b <nl> + } <nl> + sample . set ( datas ) <nl> + logger . info ( s " resize the content image to $ { ( newHeight , newWidth ) } " ) <nl> + sample <nl> + } <nl> + <nl> + def preprocessStyleImage ( path : String , shape : Shape , ctx : Context ) : NDArray = { <nl> + val img = Image ( new File ( path ) ) <nl> + val resizedImg = img . scaleTo ( shape ( 3 ) , shape ( 2 ) ) <nl> + val sample = NDArray . empty ( Shape ( 1 , 3 , shape ( 2 ) , shape ( 3 ) ) , ctx ) <nl> + val datas = { <nl> + val rgbs = resizedImg . iterator . toArray . map { p = > <nl> + ( p . red , p . green , p . blue ) <nl> + } <nl> + val r = rgbs . map ( _ . _1 - 123 . 68f ) <nl> + val g = rgbs . map ( _ . _2 - 116 . 779f ) <nl> + val b = rgbs . map ( _ . _3 - 103 . 939f ) <nl> + r + + g + + b <nl> + } <nl> + sample . set ( datas ) <nl> + sample <nl> + } <nl> + <nl> + def clip ( array : Array [ Float ] ) : Array [ Float ] = array . map { a = > <nl> + if ( a < 0 ) 0f <nl> + else if ( a > 255 ) 255f <nl> + else a <nl> + } <nl> + <nl> + def postprocessImage ( img : NDArray ) : Image = { <nl> + val datas = img . toArray <nl> + val spatialSize = img . shape ( 2 ) * img . shape ( 3 ) <nl> + val r = clip ( datas . take ( spatialSize ) . map ( _ + 123 . 68f ) ) <nl> + val g = clip ( datas . drop ( spatialSize ) . take ( spatialSize ) . map ( _ + 116 . 779f ) ) <nl> + val b = clip ( datas . takeRight ( spatialSize ) . map ( _ + 103 . 939f ) ) <nl> + val pixels = for ( i < - 0 until spatialSize ) <nl> + yield Pixel ( r ( i ) . toInt , g ( i ) . toInt , b ( i ) . toInt , 255 ) <nl> + Image ( img . shape ( 3 ) , img . shape ( 2 ) , pixels . toArray ) <nl> + } <nl> + <nl> + def saveImage ( img : NDArray , filename : String , radius : Int ) : Unit = { <nl> + logger . info ( s " save output to $ filename " ) <nl> + val out = postprocessImage ( img ) <nl> + val gauss = GaussianBlurFilter ( radius ) . op <nl> + val result = Image ( out . width , out . height ) <nl> + gauss . filter ( out . awt , result . awt ) <nl> + result . output ( filename ) ( JpegWriter ( ) ) <nl> + } <nl> + <nl> + def styleGramExecutor ( inputShape : Shape , ctx : Context ) : NSExecutor = { <nl> + / / symbol <nl> + val data = Symbol . Variable ( " conv " ) <nl> + val rsData = Symbol . Reshape ( ) ( Map ( " data " - > data , <nl> + " target_shape " - > s " ( $ { inputShape ( 1 ) } , $ { inputShape ( 2 ) * inputShape ( 3 ) } ) " ) ) <nl> + val weight = Symbol . Variable ( " weight " ) <nl> + val rsWeight = Symbol . Reshape ( ) ( Map ( " data " - > weight , <nl> + " target_shape " - > s " ( $ { inputShape ( 1 ) } , $ { inputShape ( 2 ) * inputShape ( 3 ) } ) " ) ) <nl> + val fc = Symbol . FullyConnected ( ) ( Map ( " data " - > rsData , " weight " - > rsWeight , <nl> + " no_bias " - > true , " num_hidden " - > inputShape ( 1 ) ) ) <nl> + / / executor <nl> + val conv = NDArray . zeros ( inputShape , ctx ) <nl> + val grad = NDArray . zeros ( inputShape , ctx ) <nl> + val args = Map ( " conv " - > conv , " weight " - > conv ) <nl> + val gradMap = Map ( " conv " - > grad ) <nl> + val reqs = Map ( " conv " - > " write " , " weight " - > " null " ) <nl> + val executor = fc . bind ( ctx , args , gradMap , reqs , Nil , null ) <nl> + NSExecutor ( executor , conv , grad ) <nl> + } <nl> + <nl> + def twoNorm ( array : Array [ Float ] ) : Float = { <nl> + Math . sqrt ( array . map ( x = > x * x ) . sum . toDouble ) . toFloat <nl> + } <nl> + <nl> + def main ( args : Array [ String ] ) : Unit = { <nl> + val alle = new NeuralStyle <nl> + val parser : CmdLineParser = new CmdLineParser ( alle ) <nl> + try { <nl> + parser . parseArgument ( args . toList . asJava ) <nl> + assert ( alle . contentImage ! = null & & alle . styleImage ! = null <nl> + & & alle . modelPath ! = null & & alle . outputDir ! = null ) <nl> + <nl> + val dev = if ( alle . gpu > = 0 ) Context . gpu ( alle . gpu ) else Context . cpu ( 0 ) <nl> + val contentNp = preprocessContentImage ( alle . contentImage , alle . maxLongEdge , dev ) <nl> + val styleNp = preprocessStyleImage ( alle . styleImage , contentNp . shape , dev ) <nl> + val size = ( contentNp . shape ( 2 ) , contentNp . shape ( 3 ) ) <nl> + <nl> + val modelExecutor = ModelVgg19 . getModel ( alle . modelPath , size , dev ) <nl> + val gramExecutor = modelExecutor . style . map ( arr = > styleGramExecutor ( arr . shape , dev ) ) <nl> + <nl> + / / get style representation <nl> + val styleArray = gramExecutor . map { gram = > <nl> + NDArray . zeros ( gram . executor . outputs ( 0 ) . shape , dev ) <nl> + } <nl> + modelExecutor . data . set ( styleNp ) <nl> + modelExecutor . executor . forward ( ) <nl> + <nl> + for ( i < - 0 until modelExecutor . style . length ) { <nl> + modelExecutor . style ( i ) . copyTo ( gramExecutor ( i ) . data ) <nl> + gramExecutor ( i ) . executor . forward ( ) <nl> + gramExecutor ( i ) . executor . outputs ( 0 ) . copyTo ( styleArray ( i ) ) <nl> + } <nl> + <nl> + / / get content representation <nl> + val contentArray = NDArray . zeros ( modelExecutor . content . shape , dev ) <nl> + val contentGrad = NDArray . zeros ( modelExecutor . content . shape , dev ) <nl> + modelExecutor . data . set ( contentNp ) <nl> + modelExecutor . executor . forward ( ) <nl> + modelExecutor . content . copyTo ( contentArray ) <nl> + <nl> + / / train <nl> + val img = Random . uniform ( - 0 . 1f , 0 . 1f , contentNp . shape , dev ) <nl> + val lr = new FactorScheduler ( step = 10 , factor = 0 . 9f ) <nl> + <nl> + saveImage ( contentNp , s " $ { alle . outputDir } / input . jpg " , alle . guassianRadius ) <nl> + saveImage ( styleNp , s " $ { alle . outputDir } / style . jpg " , alle . guassianRadius ) <nl> + <nl> + val optimizer = new Adam ( <nl> + learningRate = alle . lr , <nl> + wd = 0 . 005f , <nl> + clipGradient = 10 , <nl> + lrScheduler = lr ) <nl> + val optimState = optimizer . createState ( 0 , img ) <nl> + <nl> + logger . info ( s " start training arguments $ alle " ) <nl> + <nl> + var oldImg = img . copy ( ) <nl> + var gradArray : Array [ NDArray ] = null <nl> + var eps = 0f <nl> + var trainingDone = false <nl> + var e = 0 <nl> + while ( e < alle . maxNumEpochs & & ! trainingDone ) { <nl> + modelExecutor . data . set ( img ) <nl> + modelExecutor . executor . forward ( ) <nl> + <nl> + / / style gradient <nl> + for ( i < - 0 until modelExecutor . style . length ) { <nl> + val gram = gramExecutor ( i ) <nl> + gram . data . set ( modelExecutor . style ( i ) ) <nl> + gram . executor . forward ( ) <nl> + gram . executor . backward ( gram . executor . outputs ( 0 ) - styleArray ( i ) ) <nl> + val tmp = gram . data . shape ( 1 ) * gram . data . shape ( 1 ) * <nl> + gram . data . shape ( 2 ) * gram . data . shape ( 3 ) <nl> + gram . dataGrad . set ( gram . dataGrad / tmp . toFloat ) <nl> + gram . dataGrad . set ( gram . dataGrad * alle . styleWeight ) <nl> + } <nl> + <nl> + / / content gradient <nl> + contentGrad . set ( ( modelExecutor . content - contentArray ) * alle . contentWeight ) <nl> + <nl> + / / image gradient <nl> + gradArray = gramExecutor . map ( _ . dataGrad ) : + contentGrad <nl> + modelExecutor . executor . backward ( gradArray ) <nl> + <nl> + optimizer . update ( 0 , img , modelExecutor . dataGrad , optimState ) <nl> + eps = twoNorm ( ( oldImg - img ) . toArray ) / twoNorm ( img . toArray ) <nl> + oldImg . set ( img ) <nl> + logger . info ( s " epoch $ e , relative change $ eps " ) <nl> + <nl> + if ( eps < alle . stopEps ) { <nl> + logger . info ( " eps < args . stop_eps , training finished " ) <nl> + trainingDone = true <nl> + } <nl> + if ( ( e + 1 ) % alle . saveEpochs = = 0 ) { <nl> + saveImage ( img , s " $ { alle . outputDir } / tmp_ $ { e + 1 } . jpg " , alle . guassianRadius ) <nl> + } <nl> + e = e + 1 <nl> + } <nl> + saveImage ( img , s " $ { alle . outputDir } / out . jpg " , alle . guassianRadius ) <nl> + logger . info ( " Finish fit . . . " ) <nl> + } catch { <nl> + case ex : Exception = > { <nl> + logger . error ( ex . getMessage , ex ) <nl> + parser . printUsage ( System . err ) <nl> + sys . exit ( 1 ) <nl> + } <nl> + } <nl> + } <nl> + } <nl> + <nl> + class NeuralStyle { <nl> + @ Option ( name = " - - model " , usage = " the pretrained model to use : [ ' vgg ' ] " ) <nl> + private val model : String = " vgg19 " <nl> + @ Option ( name = " - - content - image " , usage = " the content image " ) <nl> + private val contentImage : String = null <nl> + @ Option ( name = " - - style - image " , usage = " the style image " ) <nl> + private val styleImage : String = null <nl> + @ Option ( name = " - - model - path " , usage = " the model file path " ) <nl> + private val modelPath : String = null <nl> + @ Option ( name = " - - stop - eps " , usage = " stop if the relative chanage is less than eps " ) <nl> + private val stopEps : Float = 0 . 0005f <nl> + @ Option ( name = " - - content - weight " , usage = " the weight for the content image " ) <nl> + private val contentWeight : Float = 20f <nl> + @ Option ( name = " - - style - weight " , usage = " the weight for the style image " ) <nl> + private val styleWeight : Float = 1f <nl> + @ Option ( name = " - - max - num - epochs " , usage = " the maximal number of training epochs " ) <nl> + private val maxNumEpochs : Int = 1000 <nl> + @ Option ( name = " - - max - long - edge " , usage = " resize the content image " ) <nl> + private val maxLongEdge : Int = 600 <nl> + @ Option ( name = " - - lr " , usage = " the initial learning rate " ) <nl> + private val lr : Float = 10f <nl> + @ Option ( name = " - - gpu " , usage = " which gpu card to use , - 1 means using cpu " ) <nl> + private val gpu : Int = 0 <nl> + @ Option ( name = " - - output - dir " , usage = " the output directory " ) <nl> + private val outputDir : String = null <nl> + @ Option ( name = " - - save - epochs " , usage = " save the output every n epochs " ) <nl> + private val saveEpochs : Int = 50 <nl> + @ Option ( name = " - - guassian - radius " , usage = " the gaussian blur filter radius " ) <nl> + private val guassianRadius : Int = 1 <nl> + } <nl> mmm a / scala - package / native / linux - x86_64 - cpu / pom . xml <nl> ppp b / scala - package / native / linux - x86_64 - cpu / pom . xml <nl> <nl> < parent > <nl> < groupId > ml . dmlc . mxnet < / groupId > <nl> < artifactId > mxnet - scala - native - parent < / artifactId > <nl> - < version > 0 . 1 . 1 < / version > <nl> + < version > 0 . 1 . 2 - SNAPSHOT < / version > <nl> < relativePath > . . / pom . xml < / relativePath > <nl> < / parent > <nl> <nl> < groupId > ml . dmlc . mxnet < / groupId > <nl> < artifactId > libmxnet - scala - linux - x86_64 - cpu < / artifactId > <nl> - < version > 0 . 1 . 1 < / version > <nl> + < version > 0 . 1 . 2 - SNAPSHOT < / version > <nl> < name > MXNet Scala Package - Native Linux - x86_64 CPU - only < / name > <nl> < url > http : / / maven . apache . org < / url > <nl> <nl> <nl> < / linkerStartOptions > <nl> < linkerMiddleOptions > <nl> < linkerMiddleOption > - Wl , - - whole - archive < / linkerMiddleOption > <nl> + < linkerMiddleOption > $ { lddeps } < / linkerMiddleOption > <nl> < linkerMiddleOption > . . / . . / . . / lib / libmxnet . a < / linkerMiddleOption > <nl> - < linkerMiddleOption > . . / . . / . . / dmlc - core / libdmlc . a < / linkerMiddleOption > <nl> < linkerMiddleOption > - Wl , - - no - whole - archive < / linkerMiddleOption > <nl> < / linkerMiddleOptions > <nl> < linkerEndOptions > <nl> mmm a / scala - package / native / linux - x86_64 - gpu / pom . xml <nl> ppp b / scala - package / native / linux - x86_64 - gpu / pom . xml <nl> <nl> < parent > <nl> < groupId > ml . dmlc . mxnet < / groupId > <nl> < artifactId > mxnet - scala - native - parent < / artifactId > <nl> - < version > 0 . 1 . 1 < / version > <nl> + < version > 0 . 1 . 2 - SNAPSHOT < / version > <nl> < relativePath > . . / pom . xml < / relativePath > <nl> < / parent > <nl> <nl> < groupId > ml . dmlc . mxnet < / groupId > <nl> < artifactId > libmxnet - scala - linux - x86_64 - gpu < / artifactId > <nl> - < version > 0 . 1 . 1 < / version > <nl> + < version > 0 . 1 . 2 - SNAPSHOT < / version > <nl> < name > MXNet Scala Package - Native Linux - x86_64 GPU < / name > <nl> < url > http : / / maven . apache . org < / url > <nl> <nl> <nl> < / linkerStartOptions > <nl> < linkerMiddleOptions > <nl> < linkerMiddleOption > - Wl , - - whole - archive < / linkerMiddleOption > <nl> + < linkerMiddleOption > $ { lddeps } < / linkerMiddleOption > <nl> < linkerMiddleOption > . . / . . / . . / lib / libmxnet . a < / linkerMiddleOption > <nl> - < linkerMiddleOption > . . / . . / . . / dmlc - core / libdmlc . a < / linkerMiddleOption > <nl> < linkerMiddleOption > - Wl , - - no - whole - archive < / linkerMiddleOption > <nl> < / linkerMiddleOptions > <nl> < linkerEndOptions > <nl> mmm a / scala - package / native / osx - x86_64 - cpu / pom . xml <nl> ppp b / scala - package / native / osx - x86_64 - cpu / pom . xml <nl> <nl> < parent > <nl> < groupId > ml . dmlc . mxnet < / groupId > <nl> < artifactId > mxnet - scala - native - parent < / artifactId > <nl> - < version > 0 . 1 . 1 < / version > <nl> + < version > 0 . 1 . 2 - SNAPSHOT < / version > <nl> < relativePath > . . / pom . xml < / relativePath > <nl> < / parent > <nl> <nl> < groupId > ml . dmlc . mxnet < / groupId > <nl> < artifactId > libmxnet - scala - osx - x86_64 - cpu < / artifactId > <nl> - < version > 0 . 1 . 1 < / version > <nl> + < version > 0 . 1 . 2 - SNAPSHOT < / version > <nl> < name > MXNet Scala Package - Native OSX - x86_64 CPU - only < / name > <nl> < url > http : / / maven . apache . org < / url > <nl> <nl> <nl> < linkerMiddleOption > - framework JavaVM < / linkerMiddleOption > <nl> < linkerMiddleOption > - Wl , - exported_symbol , _Java_ * < / linkerMiddleOption > <nl> < linkerMiddleOption > - Wl , - x < / linkerMiddleOption > <nl> - < linkerMiddleOption > . . / . . / . . / dmlc - core / libdmlc . a < / linkerMiddleOption > <nl> + < linkerMiddleOption > $ { lddeps } < / linkerMiddleOption > <nl> < linkerMiddleOption > - force_load . . / . . / . . / lib / libmxnet . a < / linkerMiddleOption > <nl> < / linkerMiddleOptions > <nl> < linkerEndOptions > <nl> mmm a / scala - package / native / pom . xml <nl> ppp b / scala - package / native / pom . xml <nl> <nl> < parent > <nl> < groupId > ml . dmlc . mxnet < / groupId > <nl> < artifactId > mxnet - parent_2 . 10 < / artifactId > <nl> - < version > 0 . 1 . 1 < / version > <nl> + < version > 0 . 1 . 2 - SNAPSHOT < / version > <nl> < relativePath > . . / pom . xml < / relativePath > <nl> < / parent > <nl> <nl> < artifactId > mxnet - scala - native - parent < / artifactId > <nl> - < version > 0 . 1 . 1 < / version > <nl> + < version > 0 . 1 . 2 - SNAPSHOT < / version > <nl> < name > MXNet Scala Package - Native Parent < / name > <nl> < packaging > pom < / packaging > <nl> <nl> mmm a / scala - package / native / src / main / native / ml_dmlc_mxnet_native_c_api . cc <nl> ppp b / scala - package / native / src / main / native / ml_dmlc_mxnet_native_c_api . cc <nl> JNIEXPORT jint JNICALL Java_ml_dmlc_mxnet_LibInfo_mxNDArraySave <nl> return ret ; <nl> } <nl> <nl> + JNIEXPORT jint JNICALL Java_ml_dmlc_mxnet_LibInfo_mxInitPSEnv <nl> + ( JNIEnv * env , jobject obj , jobjectArray jkeys , jobjectArray jvals ) { <nl> + / / keys and values <nl> + int paramSize = env - > GetArrayLength ( jkeys ) ; <nl> + const char * * keys = new const char * [ paramSize ] ; <nl> + const char * * vals = new const char * [ paramSize ] ; <nl> + jstring jkey , jval ; <nl> + / / use strcpy and release char * created by JNI inplace <nl> + for ( size_t i = 0 ; i < paramSize ; i + + ) { <nl> + jkey = reinterpret_cast < jstring > ( env - > GetObjectArrayElement ( jkeys , i ) ) ; <nl> + const char * ckey = env - > GetStringUTFChars ( jkey , 0 ) ; <nl> + keys [ i ] = ckey ; <nl> + env - > DeleteLocalRef ( jkey ) ; <nl> + <nl> + jval = reinterpret_cast < jstring > ( env - > GetObjectArrayElement ( jvals , i ) ) ; <nl> + const char * cval = env - > GetStringUTFChars ( jval , 0 ) ; <nl> + vals [ i ] = cval ; <nl> + env - > DeleteLocalRef ( jval ) ; <nl> + } <nl> + <nl> + int ret = MXInitPSEnv ( static_cast < mx_uint > ( paramSize ) , <nl> + static_cast < const char * * > ( keys ) , <nl> + static_cast < const char * * > ( vals ) ) ; <nl> + <nl> + / / release keys and vals <nl> + for ( size_t i = 0 ; i < paramSize ; i + + ) { <nl> + jstring key = reinterpret_cast < jstring > ( env - > GetObjectArrayElement ( jkeys , i ) ) ; <nl> + env - > ReleaseStringUTFChars ( key , keys [ i ] ) ; <nl> + env - > DeleteLocalRef ( key ) ; <nl> + <nl> + jstring value = reinterpret_cast < jstring > ( env - > GetObjectArrayElement ( jvals , i ) ) ; <nl> + env - > ReleaseStringUTFChars ( value , vals [ i ] ) ; <nl> + env - > DeleteLocalRef ( value ) ; <nl> + } <nl> + delete [ ] keys ; <nl> + delete [ ] vals ; <nl> + <nl> + return ret ; <nl> + } <nl> + <nl> + extern " C " void KVStoreServerControllerFunc <nl> + ( int head , const char * body , void * handle ) { <nl> + jobject controllerObjGlb = static_cast < jobject > ( handle ) ; <nl> + <nl> + JNIEnv * env ; <nl> + _jvm - > AttachCurrentThread ( reinterpret_cast < void * * > ( & env ) , NULL ) ; <nl> + <nl> + / / find java controller method <nl> + jclass ctrlClass = env - > GetObjectClass ( controllerObjGlb ) ; <nl> + jmethodID ctrlFunc = env - > GetMethodID ( ctrlClass , " invoke " , " ( ILjava / lang / String ; ) V " ) ; <nl> + <nl> + jstring jbody = env - > NewStringUTF ( body ) ; <nl> + env - > CallVoidMethod ( controllerObjGlb , ctrlFunc , head , jbody ) ; <nl> + env - > DeleteLocalRef ( jbody ) ; <nl> + <nl> + env - > DeleteLocalRef ( ctrlClass ) ; <nl> + / / FIXME ( Yizhi ) : This function can be called multiple times , <nl> + / / can we find a way to safely destroy this object ? <nl> + / / env - > DeleteGlobalRef ( controllerObjGlb ) ; <nl> + } <nl> + <nl> + JNIEXPORT jint JNICALL Java_ml_dmlc_mxnet_LibInfo_mxKVStoreRunServer <nl> + ( JNIEnv * env , jobject obj , jlong kvStorePtr , jobject controllerObj ) { <nl> + jobject controllerObjGlb = env - > NewGlobalRef ( controllerObj ) ; <nl> + return MXKVStoreRunServer ( reinterpret_cast < KVStoreHandle > ( kvStorePtr ) , <nl> + KVStoreServerControllerFunc , <nl> + reinterpret_cast < void * > ( controllerObjGlb ) ) ; <nl> + } <nl> + <nl> extern " C " void KVStoreUpdaterCallbackFunc <nl> ( int key , NDArrayHandle recv , NDArrayHandle local , void * handle ) { <nl> jobject updaterFuncObjGlb = static_cast < jobject > ( handle ) ; <nl> mmm a / scala - package / pom . xml <nl> ppp b / scala - package / pom . xml <nl> <nl> < modelVersion > 4 . 0 . 0 < / modelVersion > <nl> < groupId > ml . dmlc . mxnet < / groupId > <nl> < artifactId > mxnet - parent_2 . 10 < / artifactId > <nl> - < version > 0 . 1 . 1 < / version > <nl> + < version > 0 . 1 . 2 - SNAPSHOT < / version > <nl> < name > MXNet Scala Package - Parent < / name > <nl> < url > https : / / github . com / dmlc / mxnet / tree / master / scala - package < / url > <nl> < description > MXNet Scala Package < / description > <nl> <nl> < artifactId > scala - reflect < / artifactId > <nl> < version > $ { scala . version } < / version > <nl> < / dependency > <nl> + < dependency > <nl> + < groupId > org . scala - lang < / groupId > <nl> + < artifactId > scala - actors < / artifactId > <nl> + < version > $ { scala . version } < / version > <nl> + < / dependency > <nl> < dependency > <nl> < groupId > commons - codec < / groupId > <nl> < artifactId > commons - codec < / artifactId > <nl> mmm a / src / c_api / c_api . cc <nl> ppp b / src / c_api / c_api . cc <nl> int MXKVStoreBarrier ( KVStoreHandle handle ) { <nl> API_END ( ) ; <nl> } <nl> <nl> + int MXInitPSEnv ( mx_uint num_vars , <nl> + const char * * keys , <nl> + const char * * vals ) { <nl> + API_BEGIN ( ) ; <nl> + std : : unordered_map < std : : string , std : : string > kwargs ; <nl> + for ( mx_uint i = 0 ; i < num_vars ; + + i ) { <nl> + kwargs [ std : : string ( keys [ i ] ) ] = std : : string ( vals [ i ] ) ; <nl> + } <nl> + KVStore : : InitPSEnv ( kwargs ) ; <nl> + API_END ( ) ; <nl> + } <nl> <nl> int MXKVStoreIsWorkerNode ( int * ret ) { <nl> API_BEGIN ( ) ; <nl> int MXKVStoreIsSchedulerNode ( int * ret ) { <nl> } <nl> <nl> int MXKVStoreRunServer ( KVStoreHandle handle , <nl> - MXKVStoreServerController controller ) { <nl> + MXKVStoreServerController controller , <nl> + void * controller_handle ) { <nl> API_BEGIN ( ) ; <nl> MXKVStoreServerController * controller_temp = controller ; <nl> - auto ctrl = [ controller_temp ] ( int head , const std : : string & body ) { <nl> - controller_temp ( head , body . c_str ( ) ) ; <nl> + void * controller_handle_temp = controller_handle ; <nl> + auto ctrl = [ controller_temp , controller_handle_temp ] ( int head , const std : : string & body ) { <nl> + controller_temp ( head , body . c_str ( ) , controller_handle_temp ) ; <nl> } ; <nl> static_cast < KVStore * > ( handle ) - > RunServer ( ctrl ) ; <nl> API_END ( ) ; <nl> deleted file mode 100644 <nl> index d700de361e0 . . 00000000000 <nl> mmm a / src / common / tblob_op_registry . cc <nl> ppp / dev / null <nl> <nl> - / * ! <nl> - * Copyright ( c ) 2015 by Contributors <nl> - * \ file tblob_op_registry . cc <nl> - * Implementation of tblob op registry <nl> - * / <nl> - # include < mxnet / ndarray . h > <nl> - # include < mxnet / engine . h > <nl> - # include < vector > <nl> - # include < mutex > <nl> - # include " . / tblob_op_registry . h " <nl> - <nl> - namespace mxnet { <nl> - namespace common { <nl> - class TBlobUnaryOpProp ; <nl> - <nl> - class TBlobOpRegEntryImpl : public TBlobOpRegEntry { <nl> - public : <nl> - / / functions <nl> - TSelf & set_function ( int dev_mask , <nl> - UnaryFunction funary , <nl> - bool inplace_in_out , <nl> - bool register_symbolic ) override { <nl> - std : : lock_guard < std : : mutex > lock ( mutex_ ) ; <nl> - + + reg_counter_ ; <nl> - if ( funary_ . size ( ) < = static_cast < size_t > ( dev_mask ) ) { <nl> - funary_ . resize ( dev_mask + 1 , nullptr ) ; <nl> - } <nl> - if ( funary_ [ dev_mask ] ! = nullptr ) { <nl> - LOG ( FATAL ) < < " Device function " < < this - > name <nl> - < < " already registerd for device " < < dev_mask ; <nl> - } <nl> - funary_ [ dev_mask ] = funary ; <nl> - inplace_in0_out_forward_ = inplace_in_out ; <nl> - if ( reg_counter_ = = 1 ) { <nl> - this - > RegisterUnary ( ) ; <nl> - register_symbolic_ = register_symbolic ; <nl> - if ( register_symbolic ) { <nl> - this - > RegisterUnarySymbolic ( ) ; <nl> - } <nl> - } <nl> - return * this ; <nl> - } <nl> - <nl> - TSelf & set_gradient ( int dev_mask , <nl> - UnaryGradType1 fgrad , <nl> - bool inplace_out_in_grad ) override { <nl> - std : : lock_guard < std : : mutex > lock ( mutex_ ) ; <nl> - if ( funary_grad_t1_ . size ( ) < = static_cast < size_t > ( dev_mask ) ) { <nl> - funary_grad_t1_ . resize ( dev_mask + 1 , nullptr ) ; <nl> - } <nl> - if ( funary_grad_t1_ [ dev_mask ] ! = nullptr ) { <nl> - LOG ( FATAL ) < < " Device gradient function " < < this - > name <nl> - < < " already registerd for device " < < dev_mask ; <nl> - } <nl> - funary_grad_t1_ [ dev_mask ] = fgrad ; <nl> - inplace_out_in0_grad_ = inplace_out_in_grad ; <nl> - return * this ; <nl> - } <nl> - <nl> - TSelf & set_gradient ( int dev_mask , <nl> - UnaryGradType2 fgrad , <nl> - bool inplace_out_in_grad ) override { <nl> - std : : lock_guard < std : : mutex > lock ( mutex_ ) ; <nl> - if ( funary_grad_t2_ . size ( ) < = static_cast < size_t > ( dev_mask ) ) { <nl> - funary_grad_t2_ . resize ( dev_mask + 1 , nullptr ) ; <nl> - } <nl> - if ( funary_grad_t2_ [ dev_mask ] ! = nullptr ) { <nl> - LOG ( FATAL ) < < " Device gradient function " < < this - > name <nl> - < < " already registerd for device " < < dev_mask ; <nl> - } <nl> - funary_grad_t2_ [ dev_mask ] = fgrad ; <nl> - inplace_out_in0_grad_ = inplace_out_in_grad ; <nl> - return * this ; <nl> - } <nl> - <nl> - TSelf & set_shape_infer ( UnaryShapeInfer fshapeinfer ) override { <nl> - std : : lock_guard < std : : mutex > lock ( mutex_ ) ; <nl> - unary_infer_ = fshapeinfer ; <nl> - return * this ; <nl> - } <nl> - <nl> - TSelf & describe ( const std : : string & description ) override { <nl> - std : : lock_guard < std : : mutex > lock ( mutex_ ) ; <nl> - if ( reg_counter_ ! = 1 ) return * this ; <nl> - NDArrayReg ( ) . describe ( description ) ; <nl> - if ( register_symbolic_ ) { <nl> - OpReg ( ) . describe ( description ) ; <nl> - } <nl> - return * this ; <nl> - } <nl> - <nl> - private : <nl> - / / make friend with unary op <nl> - friend class TBlobUnaryOpProp ; <nl> - / / internal mutex <nl> - std : : mutex mutex_ ; <nl> - / / registration counter <nl> - int reg_counter_ { 0 } ; <nl> - bool register_symbolic_ { true } ; <nl> - / / unary shape inferencer <nl> - UnaryShapeInfer unary_infer_ { nullptr } ; <nl> - / / unary functions on each device mask <nl> - std : : vector < UnaryFunction > funary_ ; <nl> - / / type 1 gradient function <nl> - std : : vector < UnaryGradType1 > funary_grad_t1_ ; <nl> - / / type 2 gradient function <nl> - std : : vector < UnaryGradType2 > funary_grad_t2_ ; <nl> - / / whether do inplace optimization of in 0 and output <nl> - bool inplace_in0_out_forward_ { true } ; <nl> - / / whether do inplace optimization of out_grad and in_grad0 <nl> - bool inplace_out_in0_grad_ { false } ; <nl> - / / NDArray registry <nl> - NDArrayFunctionReg * ndarray_reg_ { nullptr } ; <nl> - OperatorPropertyReg * op_reg_ { nullptr } ; <nl> - / / internal function to register NDArray function . <nl> - inline NDArrayFunctionReg & NDArrayReg ( ) { <nl> - if ( ndarray_reg_ = = nullptr ) { <nl> - NDArrayFunctionReg & reg = <nl> - : : dmlc : : Registry < NDArrayFunctionReg > : : Get ( ) - > __REGISTER__ ( this - > name ) ; <nl> - ndarray_reg_ = & reg ; <nl> - } <nl> - return * ndarray_reg_ ; <nl> - } <nl> - / / internal function to register NDArray function . <nl> - inline OperatorPropertyReg & OpReg ( ) { <nl> - if ( op_reg_ = = nullptr ) { <nl> - OperatorPropertyReg & reg = <nl> - : : dmlc : : Registry < OperatorPropertyReg > : : Get ( ) - > __REGISTER__ ( this - > name ) ; <nl> - op_reg_ = & reg ; <nl> - } <nl> - return * op_reg_ ; <nl> - } <nl> - / / start registering all stuffs <nl> - void RegisterUnary ( ) ; <nl> - void RegisterUnarySymbolic ( ) ; <nl> - } ; <nl> - <nl> - / / Unary operator to invoke generic TBlob function . <nl> - struct TBlobUnaryOperator : public Operator { <nl> - TBlobOpRegEntry : : UnaryFunction forward ; <nl> - TBlobOpRegEntry : : UnaryGradType1 backward1 { nullptr } ; <nl> - TBlobOpRegEntry : : UnaryGradType2 backward2 { nullptr } ; <nl> - <nl> - void Forward ( const OpContext & ctx , <nl> - const std : : vector < TBlob > & in_data , <nl> - const std : : vector < OpReqType > & req , <nl> - const std : : vector < TBlob > & out_data , <nl> - const std : : vector < TBlob > & aux_args ) override { <nl> - CHECK_EQ ( in_data . size ( ) , 1 ) ; <nl> - CHECK_EQ ( out_data . size ( ) , 1 ) ; <nl> - TBlob out = out_data [ 0 ] ; <nl> - ( * forward ) ( in_data [ 0 ] , & out , req [ 0 ] , ctx . run_ctx ) ; <nl> - } <nl> - <nl> - void Backward ( const OpContext & ctx , <nl> - const std : : vector < TBlob > & out_grad , <nl> - const std : : vector < TBlob > & in_data , <nl> - const std : : vector < TBlob > & out_data , <nl> - const std : : vector < OpReqType > & req , <nl> - const std : : vector < TBlob > & in_grad , <nl> - const std : : vector < TBlob > & aux_args ) override { <nl> - CHECK_EQ ( out_grad . size ( ) , 1 ) ; <nl> - CHECK ( in_data . size ( ) = = 1 & & in_grad . size ( ) = = 1 ) ; <nl> - CHECK_EQ ( req . size ( ) , 1 ) ; <nl> - arg : : OutGrad ograd ; ograd . data = out_grad [ 0 ] ; <nl> - TBlob igrad = in_grad [ 0 ] ; <nl> - if ( backward1 ! = nullptr ) { <nl> - arg : : OutValue out_value ; out_value . data = out_data [ 0 ] ; <nl> - ( * backward1 ) ( ograd , out_value , & igrad , req [ 0 ] , ctx . run_ctx ) ; <nl> - } else if ( backward2 ! = nullptr ) { <nl> - arg : : Input0 in0 ; in0 . data = in_data [ 0 ] ; <nl> - ( * backward2 ) ( ograd , in0 , & igrad , req [ 0 ] , ctx . run_ctx ) ; <nl> - } else { <nl> - LOG ( FATAL ) < < " Backward is not supported " ; <nl> - } <nl> - } <nl> - } ; / / class UnaryOperator <nl> - <nl> - class TBlobUnaryOpProp : public OperatorProperty { <nl> - public : <nl> - std : : string name ; <nl> - TBlobOpRegEntryImpl * source ; <nl> - <nl> - void Init ( const std : : vector < std : : pair < std : : string , std : : string > > & kwargs ) override { <nl> - } <nl> - <nl> - std : : map < std : : string , std : : string > GetParams ( ) const override { <nl> - return std : : map < std : : string , std : : string > ( ) ; <nl> - } <nl> - <nl> - bool InferShape ( std : : vector < TShape > * in_shape , <nl> - std : : vector < TShape > * out_shape , <nl> - std : : vector < TShape > * aux_shape ) const override { <nl> - using namespace mshadow ; <nl> - CHECK_EQ ( in_shape - > size ( ) , 1 ) < < " Input : [ data ] " ; <nl> - const TShape & dshape = in_shape - > at ( 0 ) ; <nl> - if ( dshape . ndim ( ) = = 0 ) return false ; <nl> - out_shape - > clear ( ) ; <nl> - if ( source - > unary_infer_ = = nullptr ) { <nl> - out_shape - > push_back ( dshape ) ; <nl> - } else { <nl> - out_shape - > push_back ( ( * ( source - > unary_infer_ ) ) ( dshape ) ) ; <nl> - } <nl> - return true ; <nl> - } <nl> - <nl> - OperatorProperty * Copy ( ) const override { <nl> - auto ptr = new TBlobUnaryOpProp ( ) ; <nl> - ptr - > source = source ; <nl> - ptr - > name = name ; <nl> - return ptr ; <nl> - } <nl> - <nl> - std : : string TypeString ( ) const override { <nl> - return name ; <nl> - } <nl> - <nl> - / / decalre dependency and inplace optimization options <nl> - std : : vector < int > DeclareBackwardDependency ( <nl> - const std : : vector < int > & out_grad , <nl> - const std : : vector < int > & in_data , <nl> - const std : : vector < int > & out_data ) const override { <nl> - if ( source - > funary_grad_t1_ . size ( ) ! = 0 ) { <nl> - return { out_grad [ 0 ] , out_data [ 0 ] } ; <nl> - } else if ( source - > funary_grad_t2_ . size ( ) ! = 0 ) { <nl> - return { out_grad [ 0 ] , in_data [ 0 ] } ; <nl> - } else { <nl> - LOG ( FATAL ) < < " Backward of " < < name < < " is not decalred " ; <nl> - return { } ; <nl> - } <nl> - } <nl> - <nl> - std : : vector < std : : pair < int , void * > > BackwardInplaceOption ( <nl> - const std : : vector < int > & out_grad , <nl> - const std : : vector < int > & in_data , <nl> - const std : : vector < int > & out_data , <nl> - const std : : vector < void * > & in_grad ) const override { <nl> - if ( source - > inplace_out_in0_grad_ ) { <nl> - return { { out_grad [ 0 ] , in_grad [ 0 ] } } ; <nl> - } else { <nl> - return { } ; <nl> - } <nl> - } <nl> - <nl> - std : : vector < std : : pair < int , void * > > ForwardInplaceOption ( <nl> - const std : : vector < int > & in_data , <nl> - const std : : vector < void * > & out_data ) const override { <nl> - if ( source - > inplace_in0_out_forward_ ) { <nl> - return { { in_data [ 0 ] , out_data [ 0 ] } } ; <nl> - } else { <nl> - return { } ; <nl> - } <nl> - } <nl> - <nl> - Operator * CreateOperator ( Context ctx ) const override { <nl> - size_t dev_mask = ctx . dev_mask ( ) ; <nl> - TBlobUnaryOperator * op = new TBlobUnaryOperator ( ) ; <nl> - CHECK ( dev_mask < source - > funary_ . size ( ) & & source - > funary_ [ dev_mask ] ! = nullptr ) ; <nl> - op - > forward = source - > funary_ [ dev_mask ] ; <nl> - if ( dev_mask < source - > funary_grad_t1_ . size ( ) ) { <nl> - op - > backward1 = source - > funary_grad_t1_ [ dev_mask ] ; <nl> - } <nl> - if ( dev_mask < source - > funary_grad_t2_ . size ( ) ) { <nl> - op - > backward2 = source - > funary_grad_t2_ [ dev_mask ] ; <nl> - } <nl> - return op ; <nl> - } <nl> - } ; <nl> - <nl> - void TBlobOpRegEntryImpl : : RegisterUnary ( ) { <nl> - CHECK_EQ ( reg_counter_ , 1 ) ; <nl> - / / The body to be registered <nl> - auto body = [ this ] ( NDArray * * used_vars , <nl> - real_t * s , <nl> - NDArray * * mutate_vars , <nl> - int num_params , <nl> - char * * param_keys , <nl> - char * * param_vals ) { <nl> - NDArray src = * used_vars [ 0 ] ; <nl> - NDArray * out = mutate_vars [ 0 ] ; <nl> - TShape dshape = src . shape ( ) ; <nl> - if ( unary_infer_ ! = nullptr ) dshape = unary_infer_ ( dshape ) ; <nl> - <nl> - if ( out - > is_none ( ) ) { <nl> - * out = NDArray ( dshape , src . ctx ( ) , true , src . dtype ( ) ) ; <nl> - } else { <nl> - CHECK ( out - > ctx ( ) = = src . ctx ( ) ) < < " target context mismatch " ; <nl> - CHECK ( out - > dtype ( ) = = src . dtype ( ) ) < < " target data type mismatch " ; <nl> - CHECK ( out - > shape ( ) = = dshape ) < < " target shape mismatch " <nl> - < < out - > shape ( ) < < " vs . " < < dshape ; <nl> - } <nl> - / / important : callback must always capture by value <nl> - NDArray ret = * out ; <nl> - / / get the const variables <nl> - std : : vector < Engine : : VarHandle > const_vars ; <nl> - if ( src . var ( ) ! = ret . var ( ) ) const_vars . push_back ( src . var ( ) ) ; <nl> - / / check if the function exist <nl> - int dev_mask = src . ctx ( ) . dev_mask ( ) ; <nl> - if ( static_cast < size_t > ( dev_mask ) > = funary_ . size ( ) | | <nl> - funary_ [ dev_mask ] = = nullptr ) { <nl> - if ( dev_mask = = gpu : : kDevMask ) LOG ( FATAL ) < < MXNET_GPU_NOT_ENABLED_ERROR ; <nl> - LOG ( FATAL ) < < " Function " < < this - > name < < " not registered for device " < < dev_mask ; <nl> - } <nl> - / / invoke the function <nl> - UnaryFunction fun = funary_ [ dev_mask ] ; <nl> - Engine : : Get ( ) - > PushSync ( [ src , ret , fun , dev_mask ] ( RunContext ctx ) { <nl> - ret . CheckAndAlloc ( ) ; <nl> - TBlob tmp = ret . data ( ) ; <nl> - ( * fun ) ( src . data ( ) , & tmp , kWriteTo , ctx ) ; <nl> - # if MXNET_USE_CUDA <nl> - if ( dev_mask = = gpu : : kDevMask ) { <nl> - ctx . get_stream < gpu > ( ) - > Wait ( ) ; <nl> - } <nl> - # endif <nl> - } , src . ctx ( ) , const_vars , { ret . var ( ) } ) ; <nl> - } ; <nl> - / / register the function . <nl> - NDArrayReg ( ) <nl> - . set_body ( body ) <nl> - . set_num_use_vars ( 1 ) <nl> - . set_num_mutate_vars ( 1 ) <nl> - . set_type_mask ( kNDArrayArgBeforeScalar | kAcceptEmptyMutateTarget ) <nl> - . add_argument ( " src " , " NDArray " , " Source input to the function " ) ; <nl> - } <nl> - <nl> - void TBlobOpRegEntryImpl : : RegisterUnarySymbolic ( ) { <nl> - / / register the operator <nl> - auto op_factory = [ this ] ( ) { <nl> - TBlobUnaryOpProp * prop = new TBlobUnaryOpProp ( ) ; <nl> - prop - > name = this - > name ; <nl> - prop - > source = this ; <nl> - return prop ; <nl> - } ; <nl> - OpReg ( ) <nl> - . set_body ( op_factory ) <nl> - . add_argument ( " src " , " Symbol " , " Source symbolic input to the function " ) ; <nl> - } <nl> - TBlobOpRegEntry & TBlobOpRegistry : : __REGISTER_OR_FIND__ ( const std : : string & name ) { <nl> - if ( fmap_ . count ( name ) ! = 0 ) return * fmap_ . at ( name ) ; <nl> - TBlobOpRegEntry * e = new TBlobOpRegEntryImpl ( ) ; <nl> - e - > name = name ; <nl> - fmap_ [ name ] = e ; <nl> - return * e ; <nl> - } <nl> - <nl> - TBlobOpRegistry * TBlobOpRegistry : : Get ( ) { <nl> - static TBlobOpRegistry inst ; <nl> - return & inst ; <nl> - } <nl> - <nl> - TBlobOpRegistry : : ~ TBlobOpRegistry ( ) { <nl> - for ( auto kv : fmap_ ) { <nl> - delete kv . second ; <nl> - } <nl> - } <nl> - } / / namespace common <nl> - } / / namespace mxnet <nl> deleted file mode 100644 <nl> index d6f5b1644b7 . . 00000000000 <nl> mmm a / src / common / tblob_op_registry . h <nl> ppp / dev / null <nl> <nl> - / * ! <nl> - * Copyright ( c ) 2015 by Contributors <nl> - * \ file tblob_op_registry . h <nl> - * \ brief Helper registry to make registration of simple unary binary math function easy . <nl> - * Register to this registry will enable both symbolic operator and NDArray operator in client . <nl> - * <nl> - * More complicated operators can be registered in normal way in ndarray and operator modules . <nl> - * / <nl> - # ifndef MXNET_COMMON_TBLOB_OP_REGISTRY_H_ <nl> - # define MXNET_COMMON_TBLOB_OP_REGISTRY_H_ <nl> - <nl> - # include < dmlc / registry . h > <nl> - # include < mxnet / base . h > <nl> - # include < mxnet / operator . h > <nl> - # include < map > <nl> - # include < string > <nl> - # include < vector > <nl> - # include < functional > <nl> - <nl> - # if DMLC_USE_CXX11 <nl> - # include < functional > <nl> - # endif <nl> - <nl> - namespace mxnet { <nl> - namespace common { <nl> - / * ! \ brief namespace of arguments * / <nl> - namespace arg { <nl> - / * ! \ brief super class of all gradient function argument * / <nl> - struct GradFunctionArgument { <nl> - / * ! \ brief The real data * / <nl> - TBlob data ; <nl> - } ; <nl> - / * ! \ brief First input to the function * / <nl> - struct Input0 : GradFunctionArgument { } ; <nl> - / * ! \ brief Second input to the function * / <nl> - struct Input1 : GradFunctionArgument { } ; <nl> - <nl> - / * ! \ brief Ouput value of the function to the function * / <nl> - struct OutValue : GradFunctionArgument { } ; <nl> - / * ! \ brief Gradient of output value * / <nl> - struct OutGrad : GradFunctionArgument { } ; <nl> - } / / namespace arg <nl> - <nl> - / * ! \ brief registry for function entry * / <nl> - class TBlobOpRegEntry { <nl> - public : <nl> - typedef void ( * UnaryFunction ) ( const TBlob & src , <nl> - TBlob * ret , <nl> - OpReqType req , <nl> - RunContext ctx ) ; <nl> - typedef TShape ( * UnaryShapeInfer ) ( const TShape & src ) ; <nl> - typedef void ( * UnaryGradType1 ) ( const arg : : OutGrad & out_grad , <nl> - const arg : : OutValue & out_value , <nl> - TBlob * in_grad , <nl> - OpReqType req , <nl> - RunContext ctx ) ; <nl> - typedef void ( * UnaryGradType2 ) ( const arg : : OutGrad & out_grad , <nl> - const arg : : Input0 & in_data0 , <nl> - TBlob * in_grad , <nl> - OpReqType req , <nl> - RunContext ctx ) ; <nl> - / * ! \ brief declare self type * / <nl> - typedef TBlobOpRegEntry TSelf ; <nl> - / * ! \ brief name of the entry * / <nl> - std : : string name ; <nl> - / * ! <nl> - * \ brief set shape inference function , by default use same shape . <nl> - * \ param fshapeinfer The unary function that peforms the operation . <nl> - * / <nl> - virtual TSelf & set_shape_infer ( UnaryShapeInfer fshapeinfer ) = 0 ; <nl> - / * ! <nl> - * \ brief set function of the function to be funary <nl> - * \ param dev_mask The device mask of the function can act on . <nl> - * \ param funary The unary function that peforms the operation . <nl> - * \ param inplace_in_out Whether do inplace optimization on in and out . <nl> - * \ param register_symbolic Whether register a symbolic operator as well . <nl> - * / <nl> - virtual TSelf & set_function ( int dev_mask , <nl> - UnaryFunction funary , <nl> - bool inplace_in_out , <nl> - bool register_symbolic = true ) = 0 ; <nl> - / * ! <nl> - * \ brief set gradient of the function of this function . <nl> - * \ param dev_mask The device mask of the function can act on . <nl> - * \ param fgrad The gradient function to be set . <nl> - * \ param inplace_out_in_grad whether out_grad and in_grad can share memory . <nl> - * / <nl> - virtual TSelf & set_gradient ( int dev_mask , <nl> - UnaryGradType1 fgrad , <nl> - bool inplace_out_in_grad ) = 0 ; <nl> - virtual TSelf & set_gradient ( int dev_mask , <nl> - UnaryGradType2 fgrad , <nl> - bool inplace_out_in_grad ) = 0 ; <nl> - / * ! <nl> - * \ brief Describe the function . <nl> - * \ param description The description of the function . <nl> - * \ return reference to self . <nl> - * / <nl> - virtual TSelf & describe ( const std : : string & description ) = 0 ; <nl> - / * ! \ brief destructor * / <nl> - virtual ~ TBlobOpRegEntry ( ) { } <nl> - } ; <nl> - <nl> - / * ! \ brief registry for TBlob functions * / <nl> - class TBlobOpRegistry { <nl> - public : <nl> - / * ! <nl> - * \ brief Internal function to register a name function under name . <nl> - * \ param name name of the function <nl> - * \ return ref to the registered entry , used to set properties <nl> - * / <nl> - TBlobOpRegEntry & __REGISTER_OR_FIND__ ( const std : : string & name ) ; <nl> - / * ! <nl> - * \ brief Find the entry with corresponding name . <nl> - * \ param name name of the function <nl> - * \ return the corresponding function , can be NULL <nl> - * / <nl> - inline static const TBlobOpRegEntry * Find ( const std : : string & name ) { <nl> - return Get ( ) - > fmap_ . at ( name ) ; <nl> - } <nl> - / * ! \ return global singleton of the registry * / <nl> - static TBlobOpRegistry * Get ( ) ; <nl> - <nl> - private : <nl> - / / destructor <nl> - ~ TBlobOpRegistry ( ) ; <nl> - / * ! \ brief internal registry map * / <nl> - std : : map < std : : string , TBlobOpRegEntry * > fmap_ ; <nl> - } ; <nl> - <nl> - # define MXNET_REGISTER_TBLOB_FUN ( Name , DEV ) \ <nl> - static : : mxnet : : common : : TBlobOpRegEntry & \ <nl> - __make_ # # TBlobOpRegEntry # # _ # # Name # # __ # # DEV # # __ = \ <nl> - : : mxnet : : common : : TBlobOpRegistry : : Get ( ) - > __REGISTER_OR_FIND__ ( # Name ) <nl> - } / / namespace common <nl> - } / / namespace mxnet <nl> - # endif / / MXNET_COMMON_TBLOB_OP_REGISTRY_H_ <nl> mmm a / src / engine / threaded_engine . cc <nl> ppp b / src / engine / threaded_engine . cc <nl> void ThreadedEngine : : DeleteVariable ( SyncFn delete_fn , <nl> void ThreadedEngine : : WaitForVar ( VarHandle var ) { <nl> ThreadedVar * threaded_var = ThreadedVar : : CastFromBase ( var ) ; <nl> if ( threaded_var - > ready_to_read ( ) ) return ; <nl> + if ( engine_info_ ) { <nl> + LOG ( INFO ) < < " Wait for " < < threaded_var ; <nl> + debug_wait_var_ = threaded_var ; <nl> + } <nl> std : : atomic < bool > done { false } ; <nl> this - > PushSync ( [ this , & done ] ( RunContext ) { <nl> if ( engine_info_ ) { <nl> inline void ThreadedEngine : : OnComplete ( ThreadedOpr * threaded_opr ) { <nl> } <nl> / / Mark complete for write variables . <nl> for ( auto & & i : threaded_opr - > mutable_vars ) { <nl> + bool debug_info = ( engine_info_ & & debug_wait_var_ = = i ) ; <nl> + if ( debug_info ) { <nl> + LOG ( INFO ) < < " Complete write dep for " < < i ; <nl> + } <nl> bool to_delete = i - > CompleteWriteDependency ( <nl> - [ this ] ( OprBlock * opr ) { <nl> + [ this , debug_info ] ( OprBlock * opr ) { <nl> + if ( debug_info ) { <nl> + LOG ( INFO ) < < " PushToExecute " < < opr ; <nl> + } <nl> this - > PushToExecute ( opr , false ) ; <nl> + if ( debug_info ) { <nl> + LOG ( INFO ) < < " Fin PushToExecute " < < opr ; <nl> + } <nl> } ) ; <nl> if ( to_delete ) { <nl> ThreadedVar : : Delete ( i ) ; <nl> mmm a / src / engine / threaded_engine . h <nl> ppp b / src / engine / threaded_engine . h <nl> class ThreadedEngine : public Engine { <nl> std : : atomic < bool > shutdown_phase_ { false } ; <nl> / * ! \ brief show more information from engine actions * / <nl> bool engine_info_ { false } ; <nl> + / * ! \ brief debug information about wait for var . * / <nl> + std : : atomic < ThreadedVar * > debug_wait_var_ { nullptr } ; <nl> / * ! <nl> * \ brief Mutex and condition_variable , <nl> * used to Notify waits for single or all variables . <nl> mmm a / src / kvstore / kvstore_local . h <nl> ppp b / src / kvstore / kvstore_local . h <nl> class KVStoreLocal : public KVStore { <nl> / / reduce sum into val [ 0 ] <nl> / / this is performance critical <nl> inline void ReduceSumCPU ( const std : : vector < NDArray > & in_data ) { <nl> - const size_t step = 4 < < 10 ; <nl> + const size_t step = std : : min ( bigarray_bound_ , static_cast < size_t > ( 4 < < 10 ) ) ; <nl> / / ge ptr out <nl> std : : vector < real_t * > dptr ( in_data . size ( ) ) ; <nl> for ( size_t i = 0 ; i < in_data . size ( ) ; + + i ) { <nl> class KVStoreLocal : public KVStore { <nl> dptr [ i ] = data . FlatTo2D < cpu , real_t > ( ) . dptr_ ; <nl> } <nl> size_t total = in_data [ 0 ] . shape ( ) . Size ( ) ; <nl> - long ntask = ( total + 1 - step ) / step ; / / NOLINT ( * ) <nl> + long ntask = ( total + step - 1 ) / step ; / / NOLINT ( * ) <nl> if ( total < bigarray_bound_ | | nthread_reduction_ < = 1 ) { <nl> ReduceSumCPU ( dptr , 0 , total ) ; <nl> } else { <nl> class KVStoreLocal : public KVStore { <nl> size_t k = static_cast < size_t > ( j ) ; <nl> size_t begin = std : : min ( k * step , total ) ; <nl> size_t end = std : : min ( ( k + 1 ) * step , total ) ; <nl> + if ( j = = ntask - 1 ) CHECK_EQ ( end , total ) ; <nl> ReduceSumCPU ( dptr , begin , static_cast < index_t > ( end - begin ) ) ; <nl> } <nl> } <nl> mmm a / src / ndarray / ndarray . cc <nl> ppp b / src / ndarray / ndarray . cc <nl> NDArray & NDArray : : operator / = ( const real_t & src ) { <nl> return ScalarOpApply < ndarray : : Div > ( this , src ) ; <nl> } <nl> <nl> + / * ! <nl> + * \ brief Get a broadcasted NDArray <nl> + * \ param src the source ndarray <nl> + * \ param dim dimension to broadcast <nl> + * \ param size size after broadcasting <nl> + * / <nl> + void Broadcast ( const NDArray & src , int dim , int size , NDArray * out ) { <nl> + CHECK ( 0 < = dim & & dim < static_cast < int > ( src . shape ( ) . ndim ( ) ) ) <nl> + < < " Broadcast dimension out of bound . " ; <nl> + CHECK ( src . shape ( ) [ dim ] = = 1 ) < < " Cannot broadcast a dimension that is not 1 . " ; <nl> + TShape new_shape = src . shape ( ) ; <nl> + new_shape [ dim ] = size ; <nl> + if ( out - > is_none ( ) ) { <nl> + * out = NDArray ( new_shape , src . ctx ( ) , true , src . dtype ( ) ) ; <nl> + } else { <nl> + CHECK ( out - > ctx ( ) = = src . ctx ( ) ) < < " target context mismatch " ; <nl> + CHECK ( out - > shape ( ) = = new_shape ) <nl> + < < " invalid target shape : " < < out - > shape ( ) < < " should be : " < < new_shape ; <nl> + } <nl> + std : : vector < Engine : : VarHandle > const_vars ; <nl> + const_vars . push_back ( src . var ( ) ) ; <nl> + size_t before = src . shape ( ) . ProdShape ( 0 , dim ) ; <nl> + size_t after = src . shape ( ) . ProdShape ( dim + 1 , src . shape ( ) . ndim ( ) ) ; <nl> + <nl> + / / important : callback must always capture by value <nl> + NDArray ret = * out ; <nl> + switch ( src . ctx ( ) . dev_mask ( ) ) { <nl> + case cpu : : kDevMask : { <nl> + Engine : : Get ( ) - > PushSync ( [ src , ret , before , size , after ] ( RunContext ctx ) { <nl> + ret . CheckAndAlloc ( ) ; <nl> + NDArray inter_in = src . Reshape ( mshadow : : Shape2 ( before , after ) ) ; <nl> + NDArray inter_out = ret . Reshape ( mshadow : : Shape3 ( before , size , after ) ) ; <nl> + TBlob tmp = inter_out . data ( ) ; <nl> + LOG ( INFO ) < < " out : " < < ret . var ( ) ; <nl> + ndarray : : EvalBroadcast < cpu > ( inter_in . data ( ) , & tmp , size , ctx ) ; <nl> + } , src . ctx ( ) , const_vars , { ret . var ( ) } ) ; <nl> + break ; <nl> + } <nl> + # if MXNET_USE_CUDA <nl> + case gpu : : kDevMask : { <nl> + Engine : : Get ( ) - > PushSync ( [ src , ret , before , size , after ] ( RunContext ctx ) { <nl> + ret . CheckAndAlloc ( ) ; <nl> + NDArray inter_in = src . Reshape ( mshadow : : Shape2 ( before , after ) ) ; <nl> + NDArray inter_out = ret . Reshape ( mshadow : : Shape3 ( before , size , after ) ) ; <nl> + TBlob tmp = inter_out . data ( ) ; <nl> + ndarray : : EvalBroadcast < gpu > ( inter_in . data ( ) , & tmp , size , ctx ) ; <nl> + / / Wait GPU kernel to complete <nl> + ctx . get_stream < gpu > ( ) - > Wait ( ) ; <nl> + } , src . ctx ( ) , const_vars , { ret . var ( ) } ) ; <nl> + break ; <nl> + } <nl> + # endif <nl> + default : LOG ( FATAL ) < < MXNET_GPU_NOT_ENABLED_ERROR ; <nl> + } <nl> + } <nl> + <nl> void NDArray : : Save ( dmlc : : Stream * strm ) const { <nl> / / save shape <nl> shape_ . Save ( strm ) ; <nl> void NDArray : : SyncCopyToCPU ( void * data , size_t size ) const { <nl> MXNET_REGISTER_NDARRAY_FUN ( _set_value ) . set_function ( SetValueOp ) ; <nl> <nl> <nl> - MXNET_REGISTER_NDARRAY_FUN ( _plus ) . set_function ( BinaryOp < ndarray : : Plus > ) ; <nl> - MXNET_REGISTER_NDARRAY_FUN ( _minus ) . set_function ( BinaryOp < ndarray : : Minus > ) ; <nl> - MXNET_REGISTER_NDARRAY_FUN ( _mul ) . set_function ( BinaryOp < ndarray : : Mul > ) ; <nl> - MXNET_REGISTER_NDARRAY_FUN ( _div ) . set_function ( BinaryOp < ndarray : : Div > ) ; <nl> - <nl> MXNET_REGISTER_NDARRAY_FUN ( dot ) . set_function ( BinaryOp < ndarray : : Dot > ) <nl> . describe ( " Calculate 2D matrix multiplication " ) ; <nl> <nl> void Imdecode ( NDArray * ret , NDArray mean , size_t index , <nl> # endif / / MXNET_USE_OPENCV <nl> } <nl> <nl> + MXNET_REGISTER_NDARRAY_FUN ( _broadcast ) <nl> + . set_type_mask ( kAcceptEmptyMutateTarget | kNDArrayArgBeforeScalar ) <nl> + . set_body ( [ ] ( NDArray * * u , real_t * s , NDArray * * out , <nl> + int num_params , char * * param_keys , char * * param_vals ) { <nl> + Broadcast ( * u [ 0 ] , <nl> + static_cast < int > ( s [ 0 ] ) , <nl> + static_cast < int > ( s [ 1 ] ) , <nl> + out [ 0 ] ) ; <nl> + } ) <nl> + . set_num_use_vars ( 1 ) <nl> + . set_num_scalars ( 2 ) <nl> + . set_num_mutate_vars ( 1 ) <nl> + . describe ( " Broadcast array in the given axis to the given size " ) <nl> + . add_argument ( " src " , " NDArray " , " source ndarray " ) <nl> + . add_argument ( " axis " , " int " , " axis to broadcast " ) <nl> + . add_argument ( " size " , " int " , " size of broadcast " ) ; <nl> + <nl> MXNET_REGISTER_NDARRAY_FUN ( _imdecode ) <nl> . set_type_mask ( kAcceptEmptyMutateTarget | kNDArrayArgBeforeScalar ) <nl> . set_body ( [ ] ( NDArray * * u , real_t * s , NDArray * * out , <nl> mmm a / src / ndarray / ndarray_function - inl . h <nl> ppp b / src / ndarray / ndarray_function - inl . h <nl> void ElementwiseSum < DEVICE > ( const std : : vector < TBlob > source , <nl> } ) ; <nl> } <nl> <nl> + template < > <nl> + void EvalBroadcast < DEVICE > ( TBlob const & src , TBlob * ret , int size , RunContext ctx ) { <nl> + typedef DEVICE xpu ; <nl> + mshadow : : Stream < xpu > * s = ctx . get_stream < xpu > ( ) ; <nl> + mshadow : : Tensor < xpu , 3 > out = ret - > get < xpu , 3 , real_t > ( s ) ; <nl> + mshadow : : Tensor < xpu , 2 > in = src . get < xpu , 2 , real_t > ( s ) ; <nl> + out = mshadow : : expr : : broadcast_with_axis ( in , 0 , size ) ; <nl> + } <nl> + <nl> / / declarations <nl> DECL_BINARY ( DEVICE , MatChooseRowElem , EvalMatChooseRowElem_ ) <nl> DECL_TERNARY ( DEVICE , MatFillRowElem , EvalMatFillRowElem_ ) <nl> mmm a / src / ndarray / ndarray_function . h <nl> ppp b / src / ndarray / ndarray_function . h <nl> void ElementwiseSum ( const std : : vector < TBlob > source , <nl> TBlob * out , <nl> RunContext ctx ) ; <nl> <nl> + / / broadcasting <nl> + template < typename Device > <nl> + void EvalBroadcast ( TBlob const & src , TBlob * ret , int size , RunContext ctx ) ; <nl> + <nl> } / / namespace ndarray <nl> } / / namespace mxnet <nl> # endif / / MXNET_NDARRAY_NDARRAY_FUNCTION_H_ <nl> deleted file mode 100644 <nl> index e4d29784dfb . . 00000000000 <nl> mmm a / src / ndarray / unary_function - inl . h <nl> ppp / dev / null <nl> <nl> - / * ! <nl> - * Copyright ( c ) 2015 by Contributors <nl> - * \ file unary - function - inl . h <nl> - * \ brief the real execution functions of ndarray operations <nl> - * / <nl> - # ifndef MXNET_NDARRAY_UNARY_FUNCTION_INL_H_ <nl> - # define MXNET_NDARRAY_UNARY_FUNCTION_INL_H_ <nl> - <nl> - # include < vector > <nl> - # include " . . / common / tblob_op_registry . h " <nl> - # include " . . / operator / mshadow_op . h " <nl> - # include " . . / operator / operator_common . h " <nl> - # if defined ( __CUDACC__ ) <nl> - # define XPU gpu <nl> - # else <nl> - # define XPU cpu <nl> - # endif <nl> - <nl> - namespace mxnet { <nl> - namespace ndarray { <nl> - <nl> - using namespace common ; / / NOLINT ( * ) <nl> - <nl> - template < typename xpu , typename OP > <nl> - void UnaryForward_ ( const TBlob & src , <nl> - TBlob * ret , <nl> - OpReqType req , <nl> - RunContext ctx ) { <nl> - using namespace mxnet : : op ; <nl> - using namespace mshadow : : expr ; <nl> - mshadow : : Stream < xpu > * s = ctx . get_stream < xpu > ( ) ; <nl> - CHECK_EQ ( ret - > type_flag_ , src . type_flag_ ) <nl> - < < " Unary function only support input / output with the same type " ; <nl> - MSHADOW_TYPE_SWITCH ( ret - > type_flag_ , DType , { <nl> - mshadow : : Tensor < xpu , 2 , DType > out = ret - > FlatTo2D < xpu , DType > ( s ) ; <nl> - Assign ( out , req , F < OP > ( src . FlatTo2D < xpu , DType > ( s ) ) ) ; <nl> - } ) ; <nl> - } <nl> - <nl> - / / backward function that takes input value of the op <nl> - template < typename xpu , typename OP > <nl> - void UnaryBackwardUseIn_ ( const arg : : OutGrad & out_grad , <nl> - const arg : : Input0 & in_data0 , <nl> - TBlob * in_grad , <nl> - OpReqType req , <nl> - RunContext ctx ) { <nl> - using namespace mxnet : : op ; <nl> - using namespace mshadow : : expr ; <nl> - mshadow : : Stream < xpu > * s = ctx . get_stream < xpu > ( ) ; <nl> - CHECK_EQ ( in_grad - > type_flag_ , out_grad . data . type_flag_ ) <nl> - < < " Unary function only support input / output with the same type " ; <nl> - CHECK_EQ ( in_grad - > type_flag_ , in_data0 . data . type_flag_ ) <nl> - < < " Unary function only support input / output with the same type " ; <nl> - MSHADOW_TYPE_SWITCH ( in_grad - > type_flag_ , DType , { <nl> - mshadow : : Tensor < xpu , 2 , DType > igrad = in_grad - > FlatTo2D < xpu , DType > ( s ) ; <nl> - Assign ( igrad , req , <nl> - ( F < OP > ( in_data0 . data . FlatTo2D < xpu , DType > ( s ) ) * <nl> - out_grad . data . FlatTo2D < xpu , DType > ( ) ) ) ; <nl> - } ) ; <nl> - } <nl> - <nl> - / / backward function that takes output value of the op <nl> - template < typename xpu , typename OP > <nl> - void UnaryBackwardUseOut_ ( const arg : : OutGrad & out_grad , <nl> - const arg : : OutValue & out_value , <nl> - TBlob * in_grad , <nl> - OpReqType req , <nl> - RunContext ctx ) { <nl> - using namespace mxnet : : op ; <nl> - using namespace mshadow : : expr ; <nl> - mshadow : : Stream < xpu > * s = ctx . get_stream < xpu > ( ) ; <nl> - CHECK_EQ ( in_grad - > type_flag_ , out_grad . data . type_flag_ ) <nl> - < < " Unary function only support input / output with the same type " ; <nl> - CHECK_EQ ( in_grad - > type_flag_ , out_value . data . type_flag_ ) <nl> - < < " Unary function only support input / output with the same type " ; <nl> - MSHADOW_TYPE_SWITCH ( in_grad - > type_flag_ , DType , { <nl> - mshadow : : Tensor < xpu , 2 , DType > igrad = in_grad - > FlatTo2D < xpu , DType > ( s ) ; <nl> - Assign ( igrad , req , <nl> - ( F < OP > ( out_value . data . FlatTo2D < xpu , DType > ( s ) ) * <nl> - out_grad . data . FlatTo2D < xpu , DType > ( ) ) ) ; <nl> - } ) ; <nl> - } <nl> - <nl> - / / return a shape of scalar <nl> - inline TShape ScalarShape ( const TShape & ishape ) { <nl> - mshadow : : index_t shape [ ] = { 1 } ; <nl> - return TShape ( shape , shape + 1 ) ; <nl> - } <nl> - <nl> - template < typename xpu > <nl> - void L2Norm ( const TBlob & src , <nl> - TBlob * ret , <nl> - OpReqType req , <nl> - RunContext ctx ) { <nl> - mshadow : : Stream < xpu > * s = ctx . get_stream < xpu > ( ) ; <nl> - mshadow : : Tensor < xpu , 1 > out = ret - > get < xpu , 1 , real_t > ( s ) ; <nl> - mshadow : : Tensor < xpu , 1 > in = <nl> - src . get_with_shape < xpu , 1 , real_t > ( mshadow : : Shape1 ( src . shape_ . Size ( ) ) , s ) ; <nl> - mshadow : : VectorDot ( out , in , in ) ; <nl> - out = mshadow : : expr : : F < mxnet : : op : : mshadow_op : : square_root > ( out ) ; <nl> - } <nl> - <nl> - template < typename xpu , typename Reducer > <nl> - void Reduce ( const TBlob & src , <nl> - TBlob * ret , <nl> - OpReqType req , <nl> - RunContext ctx ) { <nl> - mshadow : : Stream < xpu > * s = ctx . get_stream < xpu > ( ) ; <nl> - mshadow : : Tensor < xpu , 1 > out = ret - > get < xpu , 1 , real_t > ( s ) ; <nl> - mshadow : : Tensor < xpu , 2 > in = <nl> - src . get_with_shape < xpu , 2 , real_t > ( mshadow : : Shape2 ( 1 , src . shape_ . Size ( ) ) , s ) ; <nl> - out = mshadow : : expr : : reduce_except_dim < 0 , Reducer > ( in ) ; <nl> - } <nl> - <nl> - template < typename xpu , typename Reducer , bool get_mask > <nl> - void ReduceChannel ( const TBlob & src , <nl> - TBlob * ret , <nl> - OpReqType req , <nl> - RunContext ctx ) { <nl> - using namespace mxnet : : op ; <nl> - using namespace mshadow ; <nl> - using namespace mshadow : : expr ; <nl> - Stream < xpu > * s = ctx . get_stream < xpu > ( ) ; <nl> - Tensor < xpu , 2 > out = ret - > get_with_shape < xpu , 2 , real_t > ( <nl> - Shape2 ( src . shape_ [ 0 ] , src . Size ( ) / src . shape_ [ 0 ] / src . shape_ [ 1 ] ) , <nl> - s ) ; <nl> - Tensor < xpu , 3 > in = src . get_with_shape < xpu , 3 , real_t > ( <nl> - Shape3 ( src . shape_ [ 0 ] , src . shape_ [ 1 ] , src . Size ( ) / src . shape_ [ 0 ] / src . shape_ [ 1 ] ) , <nl> - s ) ; <nl> - out = reduce_with_axis < Reducer , get_mask > ( in , 1 ) ; <nl> - } <nl> - <nl> - / / return a shape of ReduceChannel output <nl> - inline TShape ReduceChannelShape ( const TShape & ishape ) { <nl> - std : : vector < mshadow : : index_t > shape ; <nl> - shape . push_back ( ishape [ 0 ] ) ; <nl> - for ( index_t i = 2 ; i < ishape . ndim ( ) ; + + i ) { <nl> - shape . push_back ( ishape [ i ] ) ; <nl> - } <nl> - return TShape ( shape . begin ( ) , shape . end ( ) ) ; <nl> - } <nl> - <nl> - / / Register all unary operations here <nl> - / / The true means inplace can be enabled . <nl> - / / abs <nl> - MXNET_REGISTER_TBLOB_FUN ( abs , XPU ) <nl> - . set_function ( XPU : : kDevMask , UnaryForward_ < XPU , op : : mshadow_op : : abs > , true ) <nl> - . set_gradient ( XPU : : kDevMask , UnaryBackwardUseIn_ < XPU , op : : mshadow_op : : sign > , true ) <nl> - . describe ( " Take absolute value of the src " ) ; <nl> - / / sign <nl> - MXNET_REGISTER_TBLOB_FUN ( sign , XPU ) <nl> - . set_function ( XPU : : kDevMask , UnaryForward_ < XPU , op : : mshadow_op : : sign > , true ) <nl> - . set_gradient ( XPU : : kDevMask , UnaryBackwardUseIn_ < XPU , op : : mshadow_op : : sign_grad > , true ) <nl> - . describe ( " Take sign value of the src " ) ; <nl> - / / round <nl> - MXNET_REGISTER_TBLOB_FUN ( round , XPU ) <nl> - . set_function ( XPU : : kDevMask , UnaryForward_ < XPU , op : : mshadow_op : : round > , true ) <nl> - . describe ( " Take round value of the src " ) ; <nl> - / / ceil <nl> - MXNET_REGISTER_TBLOB_FUN ( ceil , XPU ) <nl> - . set_function ( XPU : : kDevMask , UnaryForward_ < XPU , op : : mshadow_op : : ceil > , true ) <nl> - . describe ( " Take ceil value of the src " ) ; <nl> - / / floor <nl> - MXNET_REGISTER_TBLOB_FUN ( floor , XPU ) <nl> - . set_function ( XPU : : kDevMask , UnaryForward_ < XPU , op : : mshadow_op : : floor > , true ) <nl> - . describe ( " Take floor value of the src " ) ; <nl> - / / square <nl> - MXNET_REGISTER_TBLOB_FUN ( square , XPU ) <nl> - . set_function ( XPU : : kDevMask , UnaryForward_ < XPU , op : : mshadow_op : : square > , true ) <nl> - . set_gradient ( XPU : : kDevMask , UnaryBackwardUseIn_ < XPU , op : : mshadow_op : : square_grad > , true ) <nl> - . describe ( " Take square of the src " ) ; <nl> - / / sqrt <nl> - MXNET_REGISTER_TBLOB_FUN ( sqrt , XPU ) <nl> - . set_function ( XPU : : kDevMask , UnaryForward_ < XPU , op : : mshadow_op : : square_root > , true ) <nl> - . set_gradient ( XPU : : kDevMask , UnaryBackwardUseOut_ < XPU , op : : mshadow_op : : square_root_grad > , true ) <nl> - . describe ( " Take sqrt of the src " ) ; <nl> - / / rsqrt <nl> - MXNET_REGISTER_TBLOB_FUN ( rsqrt , XPU ) <nl> - . set_function ( XPU : : kDevMask , UnaryForward_ < XPU , op : : mshadow_op : : reciprocal_square_root > , true ) <nl> - . set_gradient ( XPU : : kDevMask , <nl> - UnaryBackwardUseIn_ < XPU , op : : mshadow_op : : reciprocal_square_root_grad > , true ) <nl> - . describe ( " Take rsqrt of the src " ) ; <nl> - / / exp <nl> - MXNET_REGISTER_TBLOB_FUN ( exp , XPU ) <nl> - . set_function ( XPU : : kDevMask , UnaryForward_ < XPU , op : : mshadow_op : : exp > , true ) <nl> - . set_gradient ( XPU : : kDevMask , UnaryBackwardUseOut_ < XPU , op : : mshadow_op : : identity > , true ) <nl> - . describe ( " Take exp of the src " ) ; <nl> - / / log <nl> - MXNET_REGISTER_TBLOB_FUN ( log , XPU ) <nl> - . set_function ( XPU : : kDevMask , UnaryForward_ < XPU , op : : mshadow_op : : log > , true ) <nl> - . set_gradient ( XPU : : kDevMask , UnaryBackwardUseIn_ < XPU , op : : mshadow_op : : log_grad > , true ) <nl> - . describe ( " Take log of the src " ) ; <nl> - / / cos <nl> - MXNET_REGISTER_TBLOB_FUN ( cos , XPU ) <nl> - . set_function ( XPU : : kDevMask , UnaryForward_ < XPU , op : : mshadow_op : : cos > , true ) <nl> - . set_gradient ( XPU : : kDevMask , UnaryBackwardUseIn_ < XPU , op : : mshadow_op : : cos_grad > , true ) <nl> - . describe ( " Take cos of the src " ) ; <nl> - / / sin <nl> - MXNET_REGISTER_TBLOB_FUN ( sin , XPU ) <nl> - . set_function ( XPU : : kDevMask , UnaryForward_ < XPU , op : : mshadow_op : : sin > , true ) <nl> - . set_gradient ( XPU : : kDevMask , UnaryBackwardUseIn_ < XPU , op : : mshadow_op : : sin_grad > , true ) <nl> - . describe ( " Take sin of the src " ) ; <nl> - / / L2 norm <nl> - MXNET_REGISTER_TBLOB_FUN ( norm , XPU ) <nl> - . set_function ( XPU : : kDevMask , L2Norm < XPU > , false , false ) <nl> - . set_shape_infer ( ScalarShape ) <nl> - . describe ( " Take L2 norm of the src . " <nl> - " The result will be ndarray of shape ( 1 , ) on the same device . " ) ; <nl> - / / Max <nl> - MXNET_REGISTER_TBLOB_FUN ( max , XPU ) <nl> - . set_function ( XPU : : kDevMask , Reduce < XPU , mshadow : : red : : maximum > , false , false ) <nl> - . set_shape_infer ( ScalarShape ) <nl> - . describe ( " Take max of the src . " <nl> - " The result will be ndarray of shape ( 1 , ) on the same device . " ) ; <nl> - / / Min <nl> - MXNET_REGISTER_TBLOB_FUN ( min , XPU ) <nl> - . set_function ( XPU : : kDevMask , Reduce < XPU , mshadow : : red : : minimum > , false , false ) <nl> - . set_shape_infer ( ScalarShape ) <nl> - . describe ( " Take min of the src . " <nl> - " The result will be ndarray of shape ( 1 , ) on the same device . " ) ; <nl> - / / Sum <nl> - MXNET_REGISTER_TBLOB_FUN ( sum , XPU ) <nl> - . set_function ( XPU : : kDevMask , Reduce < XPU , mshadow : : red : : sum > , false , false ) <nl> - . set_shape_infer ( ScalarShape ) <nl> - . describe ( " Take sum of the src . " <nl> - " The result will be ndarray of shape ( 1 , ) on the same device . " ) ; <nl> - / / argmax channel <nl> - MXNET_REGISTER_TBLOB_FUN ( argmax_channel , XPU ) <nl> - . set_function ( XPU : : kDevMask , ReduceChannel < XPU , mshadow : : red : : maximum , true > , false , false ) <nl> - . set_shape_infer ( ReduceChannelShape ) <nl> - . describe ( " Take argmax indices of each channel of the src . " <nl> - " The result will be ndarray of shape ( num_channel , ) on the same device . " ) ; <nl> - } / / namespace ndarray <nl> - } / / namespace mxnet <nl> - # endif / / MXNET_NDARRAY_UNARY_FUNCTION_INL_H_ <nl> deleted file mode 100644 <nl> index 0c0d4e64957 . . 00000000000 <nl> mmm a / src / ndarray / unary_function . cu <nl> ppp / dev / null <nl> <nl> - / * ! <nl> - * Copyright ( c ) 2015 by Contributors <nl> - * \ file unary_function . cu <nl> - * \ brief GPU Implementation of unary function . <nl> - * / <nl> - / / this will be invoked by gcc and compile GPU version <nl> - / / real common implementation is only in the - inl . h file . <nl> - # include " . / unary_function - inl . h " <nl> new file mode 100644 <nl> index 00000000000 . . e933240fd45 <nl> mmm / dev / null <nl> ppp b / src / operator / broadcast_reduce_op - inl . h <nl> <nl> + / * ! <nl> + * Copyright ( c ) 2015 by Contributors <nl> + * \ file broadcast_reduce_op - inl . h <nl> + * \ brief Function defintion of broadcast / reduce operators . <nl> + * / <nl> + # ifndef MXNET_OPERATOR_BROADCAST_REDUCE_OP_INL_H_ <nl> + # define MXNET_OPERATOR_BROADCAST_REDUCE_OP_INL_H_ <nl> + <nl> + # include < mxnet / operator_util . h > <nl> + # include < vector > <nl> + # include " . / mshadow_op . h " <nl> + <nl> + # if defined ( __CUDACC__ ) <nl> + # define XPU gpu <nl> + # else <nl> + # define XPU cpu <nl> + # endif <nl> + <nl> + namespace mxnet { <nl> + namespace op { <nl> + / / return a shape of scalar <nl> + inline TShape ScalarShape ( const TShape & ishape , <nl> + const EnvArguments & env ) { <nl> + mshadow : : index_t shape [ ] = { 1 } ; <nl> + return TShape ( shape , shape + 1 ) ; <nl> + } <nl> + <nl> + template < typename xpu > <nl> + void L2Norm ( const TBlob & src , <nl> + const EnvArguments & env , <nl> + TBlob * ret , <nl> + OpReqType req , <nl> + RunContext ctx ) { <nl> + mshadow : : Stream < xpu > * s = ctx . get_stream < xpu > ( ) ; <nl> + mshadow : : Tensor < xpu , 1 > out = ret - > get < xpu , 1 , real_t > ( s ) ; <nl> + mshadow : : Tensor < xpu , 1 > in = <nl> + src . get_with_shape < xpu , 1 , real_t > ( mshadow : : Shape1 ( src . shape_ . Size ( ) ) , s ) ; <nl> + mshadow : : VectorDot ( out , in , in ) ; <nl> + out = mshadow : : expr : : F < mxnet : : op : : mshadow_op : : square_root > ( out ) ; <nl> + } <nl> + <nl> + template < typename xpu , typename Reducer > <nl> + void Reduce ( const TBlob & src , <nl> + const EnvArguments & env , <nl> + TBlob * ret , <nl> + OpReqType req , <nl> + RunContext ctx ) { <nl> + mshadow : : Stream < xpu > * s = ctx . get_stream < xpu > ( ) ; <nl> + mshadow : : Tensor < xpu , 1 > out = ret - > get < xpu , 1 , real_t > ( s ) ; <nl> + mshadow : : Tensor < xpu , 2 > in = <nl> + src . get_with_shape < xpu , 2 , real_t > ( mshadow : : Shape2 ( 1 , src . shape_ . Size ( ) ) , s ) ; <nl> + out = mshadow : : expr : : reduce_except_dim < 0 , Reducer > ( in ) ; <nl> + } <nl> + <nl> + template < typename xpu , typename Reducer > <nl> + void ReduceMid ( TBlob const & src , <nl> + const EnvArguments & env , <nl> + TBlob * ret , <nl> + OpReqType , <nl> + RunContext ctx ) { <nl> + mshadow : : Stream < xpu > * s = ctx . get_stream < xpu > ( ) ; <nl> + mshadow : : Tensor < xpu , 2 > out = ret - > get < xpu , 2 , real_t > ( s ) ; <nl> + mshadow : : Tensor < xpu , 3 > in = src . get < xpu , 3 , real_t > ( s ) ; <nl> + out = mshadow : : expr : : reduce_with_axis < Reducer , false > ( in , 1 ) ; <nl> + } <nl> + <nl> + inline TShape ReduceMidShape ( const TShape & ishape , <nl> + const EnvArguments & env ) { <nl> + CHECK_EQ ( ishape . ndim ( ) , 3 ) < < " Input shape must be 3 dimensional . " ; <nl> + std : : vector < mshadow : : index_t > shape ; <nl> + shape . push_back ( ishape [ 0 ] ) ; <nl> + shape . push_back ( ishape [ 2 ] ) ; <nl> + return TShape ( shape . begin ( ) , shape . end ( ) ) ; <nl> + } <nl> + <nl> + template < typename xpu , typename Reducer , bool get_mask > <nl> + void ReduceChannel ( const TBlob & src , <nl> + const EnvArguments & env , <nl> + TBlob * ret , <nl> + OpReqType req , <nl> + RunContext ctx ) { <nl> + using namespace mxnet : : op ; <nl> + using namespace mshadow ; <nl> + using namespace mshadow : : expr ; <nl> + Stream < xpu > * s = ctx . get_stream < xpu > ( ) ; <nl> + Tensor < xpu , 2 > out = ret - > get_with_shape < xpu , 2 , real_t > ( <nl> + Shape2 ( src . shape_ [ 0 ] , src . Size ( ) / src . shape_ [ 0 ] / src . shape_ [ 1 ] ) , <nl> + s ) ; <nl> + Tensor < xpu , 3 > in = src . get_with_shape < xpu , 3 , real_t > ( <nl> + Shape3 ( src . shape_ [ 0 ] , src . shape_ [ 1 ] , src . Size ( ) / src . shape_ [ 0 ] / src . shape_ [ 1 ] ) , <nl> + s ) ; <nl> + out = reduce_with_axis < Reducer , get_mask > ( in , 1 ) ; <nl> + } <nl> + <nl> + / / return a shape of ReduceChannel output <nl> + inline TShape ReduceChannelShape ( const TShape & ishape , <nl> + const EnvArguments & env ) { <nl> + std : : vector < mshadow : : index_t > shape ; <nl> + shape . push_back ( ishape [ 0 ] ) ; <nl> + for ( index_t i = 2 ; i < ishape . ndim ( ) ; + + i ) { <nl> + shape . push_back ( ishape [ i ] ) ; <nl> + } <nl> + return TShape ( shape . begin ( ) , shape . end ( ) ) ; <nl> + } <nl> + <nl> + <nl> + template < typename xpu > <nl> + void Transpose ( const TBlob & src , <nl> + const EnvArguments & env , <nl> + TBlob * ret , <nl> + OpReqType req , <nl> + RunContext ctx ) { <nl> + mshadow : : Stream < xpu > * s = ctx . get_stream < xpu > ( ) ; <nl> + mshadow : : Tensor < xpu , 2 > out = ret - > FlatTo2D < xpu , real_t > ( s ) ; <nl> + mshadow : : Tensor < xpu , 2 > in = src . FlatTo2D < xpu , real_t > ( s ) ; <nl> + out = in . T ( ) ; <nl> + } <nl> + <nl> + template < typename xpu > <nl> + void TransposeGrad ( const OutputGrad & src , <nl> + const EnvArguments & env , <nl> + TBlob * ret , <nl> + OpReqType req , <nl> + RunContext ctx ) { <nl> + mshadow : : Stream < xpu > * s = ctx . get_stream < xpu > ( ) ; <nl> + mshadow : : Tensor < xpu , 2 > out = ret - > FlatTo2D < xpu , real_t > ( s ) ; <nl> + mshadow : : Tensor < xpu , 2 > in = src . data . FlatTo2D < xpu , real_t > ( s ) ; <nl> + out = in . T ( ) ; <nl> + } <nl> + <nl> + inline TShape TransposeShape ( const TShape & shp , <nl> + const EnvArguments & env ) { <nl> + CHECK ( shp . ndim ( ) = = 2 ) <nl> + < < " transpose only accept two dimensional input " ; <nl> + std : : vector < mshadow : : index_t > ret ; <nl> + ret . push_back ( shp [ 1 ] ) ; <nl> + ret . push_back ( shp [ 0 ] ) ; <nl> + return TShape ( ret . begin ( ) , ret . end ( ) ) ; <nl> + } <nl> + <nl> + <nl> + / / L2 norm <nl> + MXNET_REGISTER_SIMPLE_OP ( norm , XPU ) <nl> + . set_function ( XPU : : kDevMask , L2Norm < XPU > , kNoInplace , kNotRegisterSymbolic ) <nl> + . set_shape_function ( ScalarShape ) <nl> + . describe ( " Take L2 norm of the src . " <nl> + " The result will be ndarray of shape ( 1 , ) on the same device . " ) ; <nl> + / / Max <nl> + MXNET_REGISTER_SIMPLE_OP ( max , XPU ) <nl> + . set_function ( XPU : : kDevMask , Reduce < XPU , mshadow : : red : : maximum > , kNoInplace , kNotRegisterSymbolic ) <nl> + . set_shape_function ( ScalarShape ) <nl> + . describe ( " Take max of the src . " <nl> + " The result will be ndarray of shape ( 1 , ) on the same device . " ) ; <nl> + / / Min <nl> + MXNET_REGISTER_SIMPLE_OP ( min , XPU ) <nl> + . set_function ( XPU : : kDevMask , Reduce < XPU , mshadow : : red : : minimum > , kNoInplace , kNotRegisterSymbolic ) <nl> + . set_shape_function ( ScalarShape ) <nl> + . describe ( " Take min of the src . " <nl> + " The result will be ndarray of shape ( 1 , ) on the same device . " ) ; <nl> + / / Sum <nl> + MXNET_REGISTER_SIMPLE_OP ( sum , XPU ) <nl> + . set_function ( XPU : : kDevMask , Reduce < XPU , mshadow : : red : : sum > , kNoInplace , kNotRegisterSymbolic ) <nl> + . set_shape_function ( ScalarShape ) <nl> + . describe ( " Take sum of the src . " <nl> + " The result will be ndarray of shape ( 1 , ) on the same device . " ) ; <nl> + <nl> + / / sum_mid <nl> + MXNET_REGISTER_SIMPLE_OP ( sum_mid_internal , XPU ) <nl> + . set_function ( XPU : : kDevMask , ReduceMid < XPU , mshadow : : red : : sum > , kNoInplace , kNotRegisterSymbolic ) <nl> + . set_shape_function ( ReduceMidShape ) <nl> + . describe ( " Take sum on medium dimension of the 3D src . " ) ; <nl> + <nl> + / / argmax channel <nl> + MXNET_REGISTER_SIMPLE_OP ( argmax_channel , XPU ) <nl> + . set_function ( XPU : : kDevMask , ReduceChannel < XPU , mshadow : : red : : maximum , true > , <nl> + kNoInplace , kNotRegisterSymbolic ) <nl> + . set_shape_function ( ReduceChannelShape ) <nl> + . describe ( " Take argmax indices of each channel of the src . " <nl> + " The result will be ndarray of shape ( num_channel , ) on the same device . " ) ; <nl> + / / transpose <nl> + MXNET_REGISTER_SIMPLE_OP ( transpose , XPU ) <nl> + . set_function ( XPU : : kDevMask , Transpose < XPU > , kNoInplace , kRegisterSymbolic ) <nl> + . set_shape_function ( TransposeShape ) <nl> + . set_gradient ( XPU : : kDevMask , TransposeGrad < XPU > , kNoInplace ) <nl> + . describe ( " Transpose the input matrix and return a new one " ) ; <nl> + <nl> + } / / namespace op <nl> + } / / namespace mxnet <nl> + # endif / / MXNET_OPERATOR_BROADCAST_REDUCE_OP_INL_H_ <nl> new file mode 100644 <nl> index 00000000000 . . 48f7138b7e7 <nl> mmm / dev / null <nl> ppp b / src / operator / broadcast_reduce_op . cc <nl> <nl> + / * ! <nl> + * Copyright ( c ) 2015 by Contributors <nl> + * \ file broadcast_reduce_op . cc <nl> + * \ brief CPU Implementation of broadcast reduce op <nl> + * / <nl> + / / this will be invoked by gcc and compile CPU version <nl> + # include " . / broadcast_reduce_op - inl . h " <nl> new file mode 100644 <nl> index 00000000000 . . 55cfaacc276 <nl> mmm / dev / null <nl> ppp b / src / operator / broadcast_reduce_op . cu <nl> <nl> + / * ! <nl> + * Copyright ( c ) 2015 by Contributors <nl> + * \ file broadcast_reduce_op . cu <nl> + * \ brief GPU Implementation of broadcast reduce op <nl> + * / <nl> + / / this will be invoked by gcc and compile CPU version <nl> + # include " . / broadcast_reduce_op - inl . h " <nl> mmm a / src / operator / crop - inl . h <nl> ppp b / src / operator / crop - inl . h <nl> struct CropParam : public dmlc : : Parameter < CropParam > { <nl> DMLC_DECLARE_PARAMETER ( CropParam ) { <nl> DMLC_DECLARE_FIELD ( num_args ) . set_range ( 1 , 3 ) <nl> . describe ( " Number of inputs for crop , if equals one , then we will use the h_w " <nl> - " for crop heihgt and width , else if equals two , then we will use the height " <nl> + " for crop height and width , else if equals two , then we will use the height " <nl> " and width of the second input symbol , we name crop_like here " ) ; <nl> int shape [ ] = { 0 , 0 } ; <nl> DMLC_DECLARE_FIELD ( offset ) . set_default ( TShape ( shape , shape + 2 ) ) <nl> class CropOp : public Operator { <nl> const std : : vector < TBlob > & aux_args ) { <nl> using namespace mshadow ; <nl> using namespace mshadow : : expr ; <nl> - CHECK_EQ ( static_cast < int > ( in_data . size ( ) ) , 2 ) ; <nl> + CHECK_EQ ( static_cast < int > ( in_data . size ( ) ) , param_ . num_args ) ; <nl> CHECK_EQ ( out_data . size ( ) , 1 ) ; <nl> CHECK_EQ ( req [ crop_enum : : kOut ] , kWriteTo ) ; <nl> Stream < xpu > * s = ctx . get_stream < xpu > ( ) ; <nl> class CropOp : public Operator { <nl> const std : : vector < TBlob > & aux_states ) { <nl> using namespace mshadow ; <nl> using namespace mshadow : : expr ; <nl> - CHECK_EQ ( in_grad . size ( ) , 2 ) < < in_grad . size ( ) ; <nl> + CHECK_EQ ( in_grad . size ( ) , param_ . num_args ) < < in_grad . size ( ) ; <nl> CHECK_EQ ( out_grad . size ( ) , 1 ) < < out_grad . size ( ) ; <nl> Stream < xpu > * s = ctx . get_stream < xpu > ( ) ; <nl> Tensor < xpu , 4 > grad = out_grad [ crop_enum : : kOut ] . get < xpu , 4 , real_t > ( s ) ; <nl> Tensor < xpu , 4 > gdata = in_grad [ crop_enum : : kData ] . get < xpu , 4 , real_t > ( s ) ; <nl> - Tensor < xpu , 4 > gcrop_like = in_grad [ crop_enum : : kCropLike ] . get < xpu , 4 , real_t > ( s ) ; <nl> - gcrop_like = ( real_t ) 0 . 0f ; <nl> + if ( param_ . num_args > 1 ) { <nl> + / / here backward grad is set to zero for crop_like <nl> + / / however , this should only be done when num_args > 1 , i . e . , crop_like exists <nl> + Tensor < xpu , 4 > gcrop_like = in_grad [ crop_enum : : kCropLike ] . get < xpu , 4 , real_t > ( s ) ; <nl> + gcrop_like = ( real_t ) 0 . 0f ; <nl> + } <nl> offset_hw_ = InferCropOfferset ( gdata . shape_ , grad . shape_ ) ; <nl> gdata = ( real_t ) 0 . 0f ; <nl> slice < 3 > ( slice < 2 > ( gdata , offset_hw_ [ 0 ] , offset_hw_ [ 0 ] + grad . size ( 2 ) ) , <nl> mmm a / src / operator / crop . cc <nl> ppp b / src / operator / crop . cc <nl> <nl> / * ! <nl> * Copyright ( c ) 2015 by Contributors <nl> - * \ file concat . cc <nl> + * \ file crop . cc <nl> * \ brief <nl> * \ author Wei Wu <nl> * / <nl> Operator * CropProp : : CreateOperator ( Context ctx ) const { <nl> DMLC_REGISTER_PARAMETER ( CropParam ) ; <nl> <nl> MXNET_REGISTER_OP_PROPERTY ( Crop , CropProp ) <nl> - . describe ( " Crop the 2nd and 3rd dim of input data , with the corresponding size of w_h or " <nl> - " with width and height of the second input symbol " ) <nl> + . describe ( " Crop the 2nd and 3rd dim of input data , with the corresponding size of h_w or " <nl> + " with width and height of the second input symbol , i . e . , with one input , we need h_w to " <nl> + " specify the crop height and width , otherwise the second input symbol ' s size will be used " ) <nl> + . add_argument ( " data " , " Symbol or Symbol [ ] " , " Tensor or List of Tensors , the second input " <nl> + " will be used as crop_like shape reference " ) <nl> . add_arguments ( CropParam : : __FIELDS__ ( ) ) <nl> . set_key_var_num_args ( " num_args " ) ; <nl> } / / namespace op <nl> mmm a / src / operator / cudnn_batch_norm . cu <nl> ppp b / src / operator / cudnn_batch_norm . cu <nl> class CuDNNBatchNormOp : public Operator { <nl> out_data [ cudnnbatchnorm : : kMean ] . get_with_shape < gpu , 1 , real_t > ( Shape1 ( shape_ [ 1 ] ) , s ) ; <nl> Tensor < gpu , 1 > save_inv_var = <nl> out_data [ cudnnbatchnorm : : kInvVar ] . get_with_shape < gpu , 1 , real_t > ( Shape1 ( shape_ [ 1 ] ) , s ) ; <nl> - float a = 1 . 0f , b = 0 . 0f ; <nl> + float a = 1 . 0f ; <nl> + float b = 0 . 0f ; <nl> + float b_add = 1 . 0f ; <nl> CHECK_EQ ( s - > dnn_handle_ownership_ , mshadow : : Stream < gpu > : : OwnHandle ) ; <nl> # if CUDNN_VERSION > = 4007 <nl> CHECK_EQ ( cudnnBatchNormalizationBackward ( s - > dnn_handle_ , <nl> class CuDNNBatchNormOp : public Operator { <nl> & a , <nl> & b , <nl> & a , <nl> - & b , <nl> + req [ cudnnbatchnorm : : kGamma ] = = kWriteTo ? & b : & b_add , <nl> io_desc_ , <nl> x . dptr_ , <nl> io_desc_ , <nl> mmm a / src / operator / cudnn_convolution - inl . h <nl> ppp b / src / operator / cudnn_convolution - inl . h <nl> class CuDNNConvolutionOp : public Operator { <nl> size_t expected = param_ . no_bias = = 0 ? 3 : 2 ; <nl> CHECK_EQ ( out_grad . size ( ) , 1 ) ; <nl> CHECK ( in_data . size ( ) = = expected & & in_grad . size ( ) = = expected ) ; <nl> - / / TODO ( bing ) : think about how to support add to <nl> - CHECK_EQ ( req [ conv : : kWeight ] , kWriteTo ) ; <nl> Stream < gpu > * s = ctx . get_stream < gpu > ( ) ; <nl> Tensor < gpu , 4 , DType > grad = out_grad [ conv : : kOut ] . get < gpu , 4 , DType > ( s ) ; <nl> Tensor < gpu , 4 , DType > wmat = in_data [ conv : : kWeight ] . get < gpu , 4 , DType > ( s ) ; <nl> class CuDNNConvolutionOp : public Operator { <nl> for ( uint32_t g = 0 ; g < param_ . num_group ; + + g ) { <nl> typename DataType < DType > : : ScaleType alpha = 1 . 0f ; <nl> typename DataType < DType > : : ScaleType beta = 0 . 0f ; <nl> + typename DataType < DType > : : ScaleType beta_add = 1 . 0f ; <nl> if ( ! param_ . no_bias ) { <nl> Tensor < gpu , 1 , DType > gbias = in_grad [ conv : : kBias ] . get < gpu , 1 , DType > ( s ) ; <nl> CHECK_EQ ( cudnnConvolutionBackwardBias ( s - > dnn_handle_ , <nl> & alpha , <nl> out_desc_ , <nl> grad . dptr_ + out_offset_ * g , <nl> - & beta , <nl> + req [ conv : : kBias ] = = kWriteTo ? & beta : & beta_add , <nl> bias_desc_ , <nl> gbias . dptr_ + bias_offset_ * g ) , <nl> CUDNN_STATUS_SUCCESS ) ; <nl> class CuDNNConvolutionOp : public Operator { <nl> back_algo_w_ , <nl> workspace . dptr_ , <nl> backward_workspace_byte_ , <nl> - & beta , <nl> + req [ conv : : kWeight ] = = kWriteTo ? & beta : & beta_add , <nl> filter_desc_ , <nl> gwmat . dptr_ + weight_offset_ * g ) , CUDNN_STATUS_SUCCESS ) ; <nl> # elif CUDNN_MAJOR = = 5 <nl> class CuDNNConvolutionOp : public Operator { <nl> back_algo_w_ , <nl> workspace . dptr_ , <nl> backward_workspace_byte_ , <nl> - & beta , <nl> + req [ conv : : kWeight ] = = kWriteTo ? & beta : & beta_add , <nl> filter_desc_ , <nl> gwmat . dptr_ + weight_offset_ * g ) , CUDNN_STATUS_SUCCESS ) ; <nl> # endif <nl> mmm a / src / operator / elementwise_binary_op - inl . h <nl> ppp b / src / operator / elementwise_binary_op - inl . h <nl> <nl> / * ! <nl> - * Copyright ( c ) 2015 by Contributors <nl> + * Copyright ( c ) 2015 by Contributors <nl> * \ file elementwise_binary_op - inl . h <nl> - * \ brief Elementwise binary operation , plus , minus , mul , div <nl> - * / <nl> + * \ brief Function defintion of elementwise binary operators <nl> + * / <nl> # ifndef MXNET_OPERATOR_ELEMENTWISE_BINARY_OP_INL_H_ <nl> # define MXNET_OPERATOR_ELEMENTWISE_BINARY_OP_INL_H_ <nl> <nl> - # include < dmlc / logging . h > <nl> - # include < mxnet / operator . h > <nl> - # include < mshadow / tensor . h > <nl> - # include < utility > <nl> - # include < string > <nl> - # include < vector > <nl> - # include < map > <nl> - # include " . / operator_common . h " <nl> + # include < mxnet / operator_util . h > <nl> # include " . / mshadow_op . h " <nl> <nl> + # if defined ( __CUDACC__ ) <nl> + # define XPU gpu <nl> + # else <nl> + # define XPU cpu <nl> + # endif <nl> + <nl> namespace mxnet { <nl> namespace op { <nl> <nl> - namespace elembinary { <nl> - enum ElementWiseBinaryOpInputs { kLhs , kRhs } ; <nl> - enum ElementWiseBinaryOpOutputs { kOut } ; <nl> - enum ElementWiseBinaryOpType { kPlus , kMinus , kMul , kDiv , kPower , kMaximum , kMinimum } ; <nl> - enum ElementWiseBinaryOpResource { kTempSpace } ; <nl> - } / / elembinary <nl> - <nl> - template < typename Op > <nl> - inline elembinary : : ElementWiseBinaryOpType GetOpType ( ) ; <nl> - <nl> - template < typename Op > <nl> - inline const char * GetOpTypeString ( ) ; <nl> - <nl> - template < > <nl> - inline elembinary : : ElementWiseBinaryOpType GetOpType < mshadow : : op : : plus > ( ) { <nl> - return elembinary : : kPlus ; <nl> - } <nl> - template < > <nl> - inline elembinary : : ElementWiseBinaryOpType GetOpType < mshadow : : op : : minus > ( ) { <nl> - return elembinary : : kMinus ; <nl> - } <nl> - template < > <nl> - inline elembinary : : ElementWiseBinaryOpType GetOpType < mshadow : : op : : mul > ( ) { <nl> - return elembinary : : kMul ; <nl> - } <nl> - template < > <nl> - inline elembinary : : ElementWiseBinaryOpType GetOpType < mshadow : : op : : div > ( ) { <nl> - return elembinary : : kDiv ; <nl> - } <nl> - template < > <nl> - inline elembinary : : ElementWiseBinaryOpType GetOpType < mshadow_op : : power > ( ) { <nl> - return elembinary : : kPower ; <nl> - } <nl> - template < > <nl> - inline elembinary : : ElementWiseBinaryOpType GetOpType < mshadow_op : : maximum > ( ) { <nl> - return elembinary : : kMaximum ; <nl> - } <nl> - template < > <nl> - inline elembinary : : ElementWiseBinaryOpType GetOpType < mshadow_op : : minimum > ( ) { <nl> - return elembinary : : kMinimum ; <nl> + template < typename xpu , typename OP > <nl> + void BinaryForward_ ( const TBlob & lhs , <nl> + const TBlob & rhs , <nl> + const EnvArguments & env , <nl> + TBlob * ret , <nl> + OpReqType req , <nl> + RunContext ctx ) { <nl> + using namespace mshadow : : expr ; <nl> + mshadow : : Stream < xpu > * s = ctx . get_stream < xpu > ( ) ; <nl> + CHECK_EQ ( ret - > type_flag_ , lhs . type_flag_ ) <nl> + < < " Binary function only support input / output with the same type " ; <nl> + CHECK_EQ ( ret - > type_flag_ , rhs . type_flag_ ) <nl> + < < " Binary function only support input / output with the same type " ; <nl> + MSHADOW_TYPE_SWITCH ( ret - > type_flag_ , DType , { <nl> + mshadow : : Tensor < xpu , 2 , DType > out = ret - > FlatTo2D < xpu , DType > ( s ) ; <nl> + ASSIGN_DISPATCH ( out , req , <nl> + F < OP > ( lhs . FlatTo2D < xpu , DType > ( s ) , <nl> + rhs . FlatTo2D < xpu , DType > ( s ) ) ) ; <nl> + } ) ; <nl> } <nl> <nl> - template < > <nl> - inline const char * GetOpTypeString < mshadow : : op : : plus > ( ) { <nl> - return " _Plus " ; <nl> - } <nl> - template < > <nl> - inline const char * GetOpTypeString < mshadow : : op : : minus > ( ) { <nl> - return " _Minus " ; <nl> - } <nl> <nl> - template < > <nl> - inline const char * GetOpTypeString < mshadow : : op : : mul > ( ) { <nl> - return " _Mul " ; <nl> + template < typename xpu > <nl> + void PlusBackward_ ( const OutputGrad & out_grad , <nl> + const EnvArguments & env , <nl> + TBlob * lhs_grad , <nl> + TBlob * rhs_grad , <nl> + OpReqType req_lhs_grad , <nl> + OpReqType req_rhs_grad , <nl> + RunContext ctx ) { <nl> + using namespace mshadow : : expr ; <nl> + mshadow : : Stream < xpu > * s = ctx . get_stream < xpu > ( ) ; <nl> + MSHADOW_TYPE_SWITCH ( lhs_grad - > type_flag_ , DType , { <nl> + mshadow : : Tensor < xpu , 2 , DType > mout_grad = out_grad . data . FlatTo2D < xpu , DType > ( s ) ; <nl> + mshadow : : Tensor < xpu , 2 , DType > mlhs_grad = lhs_grad - > FlatTo2D < xpu , DType > ( s ) ; <nl> + mshadow : : Tensor < xpu , 2 , DType > mrhs_grad = rhs_grad - > FlatTo2D < xpu , DType > ( s ) ; <nl> + ASSIGN_DISPATCH ( mlhs_grad , req_lhs_grad , F < mshadow_op : : identity > ( mout_grad ) ) ; <nl> + ASSIGN_DISPATCH ( mrhs_grad , req_rhs_grad , F < mshadow_op : : identity > ( mout_grad ) ) ; <nl> + } ) ; <nl> } <nl> <nl> - template < > <nl> - inline const char * GetOpTypeString < mshadow : : op : : div > ( ) { <nl> - return " _Div " ; <nl> + template < typename xpu > <nl> + void MinusBackward_ ( const OutputGrad & out_grad , <nl> + const EnvArguments & env , <nl> + TBlob * lhs_grad , <nl> + TBlob * rhs_grad , <nl> + OpReqType req_lhs_grad , <nl> + OpReqType req_rhs_grad , <nl> + RunContext ctx ) { <nl> + using namespace mshadow : : expr ; <nl> + mshadow : : Stream < xpu > * s = ctx . get_stream < xpu > ( ) ; <nl> + MSHADOW_TYPE_SWITCH ( lhs_grad - > type_flag_ , DType , { <nl> + mshadow : : Tensor < xpu , 2 , DType > mout_grad = out_grad . data . FlatTo2D < xpu , DType > ( s ) ; <nl> + mshadow : : Tensor < xpu , 2 , DType > mlhs_grad = lhs_grad - > FlatTo2D < xpu , DType > ( s ) ; <nl> + mshadow : : Tensor < xpu , 2 , DType > mrhs_grad = rhs_grad - > FlatTo2D < xpu , DType > ( s ) ; <nl> + ASSIGN_DISPATCH ( mlhs_grad , req_lhs_grad , F < mshadow_op : : identity > ( mout_grad ) ) ; <nl> + ASSIGN_DISPATCH ( mrhs_grad , req_rhs_grad , F < mshadow_op : : negation > ( mout_grad ) ) ; <nl> + } ) ; <nl> } <nl> <nl> - template < > <nl> - inline const char * GetOpTypeString < mshadow_op : : power > ( ) { <nl> - return " _Power " ; <nl> + template < typename xpu > <nl> + void MulBackward_ ( const OutputGrad & out_grad , <nl> + const Input0 & lhs , <nl> + const Input1 & rhs , <nl> + const EnvArguments & env , <nl> + TBlob * lhs_grad , <nl> + TBlob * rhs_grad , <nl> + OpReqType req_lhs_grad , <nl> + OpReqType req_rhs_grad , <nl> + RunContext ctx ) { <nl> + using namespace mshadow : : expr ; <nl> + mshadow : : Stream < xpu > * s = ctx . get_stream < xpu > ( ) ; <nl> + MSHADOW_TYPE_SWITCH ( lhs_grad - > type_flag_ , DType , { <nl> + mshadow : : Tensor < xpu , 2 , DType > mout_grad = out_grad . data . FlatTo2D < xpu , DType > ( s ) ; <nl> + mshadow : : Tensor < xpu , 2 , DType > mlhs_data = lhs . data . FlatTo2D < xpu , DType > ( s ) ; <nl> + mshadow : : Tensor < xpu , 2 , DType > mrhs_data = rhs . data . FlatTo2D < xpu , DType > ( s ) ; <nl> + mshadow : : Tensor < xpu , 2 , DType > mlhs_grad = lhs_grad - > FlatTo2D < xpu , DType > ( s ) ; <nl> + mshadow : : Tensor < xpu , 2 , DType > mrhs_grad = rhs_grad - > FlatTo2D < xpu , DType > ( s ) ; <nl> + CHECK_NE ( req_rhs_grad , kWriteInplace ) ; <nl> + ASSIGN_DISPATCH ( mrhs_grad , req_rhs_grad , mlhs_data * mout_grad ) ; <nl> + ASSIGN_DISPATCH ( mlhs_grad , req_lhs_grad , mrhs_data * mout_grad ) ; <nl> + } ) ; <nl> } <nl> <nl> - template < > <nl> - inline const char * GetOpTypeString < mshadow_op : : maximum > ( ) { <nl> - return " _Maximum " ; <nl> + template < typename xpu > <nl> + void DivBackward_ ( const OutputGrad & out_grad , <nl> + const Input0 & lhs , <nl> + const Input1 & rhs , <nl> + const EnvArguments & env , <nl> + TBlob * lhs_grad , <nl> + TBlob * rhs_grad , <nl> + OpReqType req_lhs_grad , <nl> + OpReqType req_rhs_grad , <nl> + RunContext ctx ) { <nl> + using namespace mshadow : : expr ; <nl> + mshadow : : Stream < xpu > * s = ctx . get_stream < xpu > ( ) ; <nl> + MSHADOW_TYPE_SWITCH ( lhs_grad - > type_flag_ , DType , { <nl> + mshadow : : Tensor < xpu , 2 , DType > mout_grad = out_grad . data . FlatTo2D < xpu , DType > ( s ) ; <nl> + mshadow : : Tensor < xpu , 2 , DType > mlhs_data = lhs . data . FlatTo2D < xpu , DType > ( s ) ; <nl> + mshadow : : Tensor < xpu , 2 , DType > mrhs_data = rhs . data . FlatTo2D < xpu , DType > ( s ) ; <nl> + mshadow : : Tensor < xpu , 2 , DType > mlhs_grad = lhs_grad - > FlatTo2D < xpu , DType > ( s ) ; <nl> + mshadow : : Tensor < xpu , 2 , DType > mrhs_grad = rhs_grad - > FlatTo2D < xpu , DType > ( s ) ; <nl> + CHECK_NE ( req_rhs_grad , kWriteInplace ) ; <nl> + ASSIGN_DISPATCH ( mrhs_grad , req_rhs_grad , <nl> + F < mshadow_op : : negation > ( mout_grad * mlhs_data ) / <nl> + F < mshadow_op : : square > ( mrhs_data ) ) ; <nl> + ASSIGN_DISPATCH ( mlhs_grad , req_lhs_grad , mout_grad / mrhs_data ) ; <nl> + } ) ; <nl> } <nl> <nl> - template < > <nl> - inline const char * GetOpTypeString < mshadow_op : : minimum > ( ) { <nl> - return " _Minimum " ; <nl> + template < typename xpu > <nl> + void PowerBackward_ ( const OutputGrad & out_grad , <nl> + const Input0 & lhs , <nl> + const Input1 & rhs , <nl> + const EnvArguments & env , <nl> + TBlob * lhs_grad , <nl> + TBlob * rhs_grad , <nl> + OpReqType req_lhs_grad , <nl> + OpReqType req_rhs_grad , <nl> + RunContext ctx ) { <nl> + using namespace mshadow : : expr ; <nl> + mshadow : : Stream < xpu > * s = ctx . get_stream < xpu > ( ) ; <nl> + MSHADOW_TYPE_SWITCH ( lhs_grad - > type_flag_ , DType , { <nl> + mshadow : : Tensor < xpu , 2 , DType > mout_grad = out_grad . data . FlatTo2D < xpu , DType > ( s ) ; <nl> + mshadow : : Tensor < xpu , 2 , DType > mlhs_data = lhs . data . FlatTo2D < xpu , DType > ( s ) ; <nl> + mshadow : : Tensor < xpu , 2 , DType > mrhs_data = rhs . data . FlatTo2D < xpu , DType > ( s ) ; <nl> + mshadow : : Tensor < xpu , 2 , DType > mlhs_grad = lhs_grad - > FlatTo2D < xpu , DType > ( s ) ; <nl> + mshadow : : Tensor < xpu , 2 , DType > mrhs_grad = rhs_grad - > FlatTo2D < xpu , DType > ( s ) ; <nl> + CHECK_NE ( req_rhs_grad , kWriteInplace ) ; <nl> + ASSIGN_DISPATCH ( mrhs_grad , req_rhs_grad , <nl> + F < mshadow_op : : log > ( mlhs_data ) * <nl> + F < mshadow_op : : power > ( mlhs_data , mrhs_data ) * mout_grad ) ; <nl> + ASSIGN_DISPATCH ( mlhs_grad , req_lhs_grad , <nl> + mrhs_data * <nl> + F < mshadow_op : : power > ( mlhs_data , mrhs_data - scalar < DType > ( 1 ) ) * <nl> + mout_grad ) ; <nl> + } ) ; <nl> } <nl> <nl> - template < typename xpu , typename ForwardOp > <nl> - class ElementWiseBinaryOp : public Operator { <nl> - public : <nl> - virtual void Forward ( const OpContext & ctx , <nl> - const std : : vector < TBlob > & in_data , <nl> - const std : : vector < OpReqType > & req , <nl> - const std : : vector < TBlob > & out_data , <nl> - const std : : vector < TBlob > & aux_args ) { <nl> - using namespace mshadow ; <nl> - using namespace mshadow : : expr ; <nl> - CHECK_EQ ( in_data . size ( ) , 2 ) ; <nl> - CHECK_EQ ( out_data . size ( ) , 1 ) ; <nl> - Stream < xpu > * s = ctx . get_stream < xpu > ( ) ; <nl> - Tensor < xpu , 2 > lhs = in_data [ elembinary : : kLhs ] . FlatTo2D < xpu , real_t > ( s ) ; <nl> - Tensor < xpu , 2 > rhs = in_data [ elembinary : : kRhs ] . FlatTo2D < xpu , real_t > ( s ) ; <nl> - Tensor < xpu , 2 > out = out_data [ elembinary : : kOut ] . FlatTo2D < xpu , real_t > ( s ) ; <nl> - Assign ( out , req [ elembinary : : kOut ] , F < ForwardOp > ( lhs , rhs ) ) ; <nl> - } <nl> - <nl> - virtual void Backward ( const OpContext & ctx , <nl> - const std : : vector < TBlob > & out_grad , <nl> - const std : : vector < TBlob > & in_data , <nl> - const std : : vector < TBlob > & out_data , <nl> - const std : : vector < OpReqType > & req , <nl> - const std : : vector < TBlob > & in_grad , <nl> - const std : : vector < TBlob > & aux_args ) { <nl> - using namespace mshadow ; <nl> - using namespace mshadow : : expr ; <nl> - CHECK_EQ ( out_grad . size ( ) , 1 ) ; <nl> - CHECK ( in_data . size ( ) = = 2 & & in_grad . size ( ) = = 2 ) ; <nl> - CHECK_EQ ( req . size ( ) , 2 ) ; <nl> - <nl> - Stream < xpu > * s = ctx . get_stream < xpu > ( ) ; <nl> - Tensor < xpu , 2 > m_out_grad = out_grad [ elembinary : : kOut ] . FlatTo2D < xpu , real_t > ( s ) ; <nl> - Tensor < xpu , 2 > lhs_grad = in_grad [ elembinary : : kLhs ] . FlatTo2D < xpu , real_t > ( s ) ; <nl> - Tensor < xpu , 2 > rhs_grad = in_grad [ elembinary : : kRhs ] . FlatTo2D < xpu , real_t > ( s ) ; <nl> - switch ( GetOpType < ForwardOp > ( ) ) { <nl> - case elembinary : : kPlus : { <nl> - Assign ( lhs_grad , req [ elembinary : : kLhs ] , F < mshadow_op : : identity > ( m_out_grad ) ) ; <nl> - Assign ( rhs_grad , req [ elembinary : : kRhs ] , F < mshadow_op : : identity > ( m_out_grad ) ) ; <nl> - break ; <nl> - } <nl> - case elembinary : : kMinus : { <nl> - Assign ( lhs_grad , req [ elembinary : : kLhs ] , F < mshadow_op : : identity > ( m_out_grad ) ) ; <nl> - Assign ( rhs_grad , req [ elembinary : : kRhs ] , F < mshadow_op : : negation > ( m_out_grad ) ) ; <nl> - break ; <nl> - } <nl> - case elembinary : : kMul : { <nl> - Tensor < xpu , 2 > lhs_data = in_data [ elembinary : : kLhs ] . FlatTo2D < xpu , real_t > ( s ) ; <nl> - Tensor < xpu , 2 > rhs_data = in_data [ elembinary : : kRhs ] . FlatTo2D < xpu , real_t > ( s ) ; <nl> - / / rhs cannot do inplace <nl> - CHECK_NE ( req [ elembinary : : kRhs ] , kWriteInplace ) ; <nl> - Assign ( rhs_grad , req [ elembinary : : kRhs ] , lhs_data * m_out_grad ) ; <nl> - Assign ( lhs_grad , req [ elembinary : : kLhs ] , rhs_data * m_out_grad ) ; <nl> - break ; <nl> - } <nl> - case elembinary : : kDiv : { <nl> - Tensor < xpu , 2 > lhs_data = in_data [ elembinary : : kLhs ] . FlatTo2D < xpu , real_t > ( s ) ; <nl> - Tensor < xpu , 2 > rhs_data = in_data [ elembinary : : kRhs ] . FlatTo2D < xpu , real_t > ( s ) ; <nl> - / / rhs cannot do inplace <nl> - CHECK_NE ( req [ elembinary : : kRhs ] , kWriteInplace ) ; <nl> - Assign ( rhs_grad , req [ elembinary : : kRhs ] , <nl> - F < mshadow_op : : negation > ( m_out_grad * lhs_data ) / F < mshadow_op : : square > ( rhs_data ) ) ; <nl> - Assign ( lhs_grad , req [ elembinary : : kLhs ] , m_out_grad / rhs_data ) ; <nl> - break ; <nl> - } <nl> - case elembinary : : kPower : { <nl> - Tensor < xpu , 2 > base_data = in_data [ elembinary : : kLhs ] . FlatTo2D < xpu , real_t > ( s ) ; <nl> - Tensor < xpu , 2 > exponent_data = in_data [ elembinary : : kRhs ] . FlatTo2D < xpu , real_t > ( s ) ; <nl> - Tensor < xpu , 2 > m_out_data = out_data [ elembinary : : kOut ] . FlatTo2D < xpu , real_t > ( s ) ; <nl> - / / rhs cannot do inplace <nl> - CHECK_NE ( req [ elembinary : : kRhs ] , kWriteInplace ) ; <nl> - Assign ( rhs_grad , req [ elembinary : : kRhs ] , <nl> - F < mshadow_op : : log > ( base_data ) * m_out_data * m_out_grad ) ; <nl> - Assign ( lhs_grad , req [ elembinary : : kLhs ] , <nl> - exponent_data * F < mshadow_op : : power > ( base_data , exponent_data - 1 ) * m_out_grad ) ; <nl> - break ; <nl> - } <nl> - case elembinary : : kMaximum : { <nl> - Tensor < xpu , 2 > lhs_data = in_data [ elembinary : : kLhs ] . FlatTo2D < xpu , real_t > ( s ) ; <nl> - Tensor < xpu , 2 > rhs_data = in_data [ elembinary : : kRhs ] . FlatTo2D < xpu , real_t > ( s ) ; <nl> - Assign ( lhs_grad , req [ elembinary : : kLhs ] , <nl> - m_out_grad * F < mshadow_op : : maximum_grad > ( lhs_data , rhs_data ) ) ; <nl> - Assign ( rhs_grad , req [ elembinary : : kRhs ] , <nl> - m_out_grad * F < mshadow_op : : minimum_grad > ( lhs_data , rhs_data ) ) ; <nl> - break ; <nl> - } <nl> - case elembinary : : kMinimum : { <nl> - Tensor < xpu , 2 > lhs_data = in_data [ elembinary : : kLhs ] . FlatTo2D < xpu , real_t > ( s ) ; <nl> - Tensor < xpu , 2 > rhs_data = in_data [ elembinary : : kRhs ] . FlatTo2D < xpu , real_t > ( s ) ; <nl> - Assign ( lhs_grad , req [ elembinary : : kLhs ] , <nl> - m_out_grad * F < mshadow_op : : minimum_grad > ( lhs_data , rhs_data ) ) ; <nl> - Assign ( rhs_grad , req [ elembinary : : kRhs ] , <nl> - m_out_grad * F < mshadow_op : : maximum_grad > ( lhs_data , rhs_data ) ) ; <nl> - break ; <nl> - } <nl> - } <nl> - } <nl> - } ; / / class ElementWiseBinaryOp <nl> - <nl> - <nl> template < typename xpu > <nl> - inline Operator * CreateElementWiseBinaryOp_ ( elembinary : : ElementWiseBinaryOpType type ) { <nl> - switch ( type ) { <nl> - case elembinary : : kPlus : <nl> - return new ElementWiseBinaryOp < xpu , mshadow : : op : : plus > ( ) ; <nl> - case elembinary : : kMinus : <nl> - return new ElementWiseBinaryOp < xpu , mshadow : : op : : minus > ( ) ; <nl> - case elembinary : : kMul : <nl> - return new ElementWiseBinaryOp < xpu , mshadow : : op : : mul > ( ) ; <nl> - case elembinary : : kDiv : <nl> - return new ElementWiseBinaryOp < xpu , mshadow : : op : : div > ( ) ; <nl> - case elembinary : : kPower : <nl> - return new ElementWiseBinaryOp < xpu , mshadow_op : : power > ( ) ; <nl> - case elembinary : : kMaximum : <nl> - return new ElementWiseBinaryOp < xpu , mshadow_op : : maximum > ( ) ; <nl> - case elembinary : : kMinimum : <nl> - return new ElementWiseBinaryOp < xpu , mshadow_op : : minimum > ( ) ; <nl> - } <nl> - LOG ( FATAL ) < < " uknown op type " ; <nl> - return NULL ; <nl> + void MaximumBackward_ ( const OutputGrad & out_grad , <nl> + const Input0 & lhs , <nl> + const Input1 & rhs , <nl> + const EnvArguments & env , <nl> + TBlob * lhs_grad , <nl> + TBlob * rhs_grad , <nl> + OpReqType req_lhs_grad , <nl> + OpReqType req_rhs_grad , <nl> + RunContext ctx ) { <nl> + using namespace mshadow : : expr ; <nl> + mshadow : : Stream < xpu > * s = ctx . get_stream < xpu > ( ) ; <nl> + MSHADOW_TYPE_SWITCH ( lhs_grad - > type_flag_ , DType , { <nl> + mshadow : : Tensor < xpu , 2 , DType > mout_grad = out_grad . data . FlatTo2D < xpu , DType > ( s ) ; <nl> + mshadow : : Tensor < xpu , 2 , DType > mlhs_data = lhs . data . FlatTo2D < xpu , DType > ( s ) ; <nl> + mshadow : : Tensor < xpu , 2 , DType > mrhs_data = rhs . data . FlatTo2D < xpu , DType > ( s ) ; <nl> + mshadow : : Tensor < xpu , 2 , DType > mlhs_grad = lhs_grad - > FlatTo2D < xpu , DType > ( s ) ; <nl> + mshadow : : Tensor < xpu , 2 , DType > mrhs_grad = rhs_grad - > FlatTo2D < xpu , DType > ( s ) ; <nl> + CHECK_NE ( req_rhs_grad , kWriteInplace ) ; <nl> + ASSIGN_DISPATCH ( mrhs_grad , req_rhs_grad , <nl> + mout_grad * F < mshadow_op : : maximum_grad > ( mrhs_data , mlhs_data ) ) ; <nl> + ASSIGN_DISPATCH ( mlhs_grad , req_lhs_grad , <nl> + mout_grad * F < mshadow_op : : maximum_grad > ( mlhs_data , mrhs_data ) ) ; <nl> + } ) ; <nl> } <nl> <nl> - / / Decalre Factory function , used for dispatch specialization <nl> template < typename xpu > <nl> - Operator * CreateElementWiseBinaryOp ( elembinary : : ElementWiseBinaryOpType type ) ; <nl> + void MinimumBackward_ ( const OutputGrad & out_grad , <nl> + const Input0 & lhs , <nl> + const Input1 & rhs , <nl> + const EnvArguments & env , <nl> + TBlob * lhs_grad , <nl> + TBlob * rhs_grad , <nl> + OpReqType req_lhs_grad , <nl> + OpReqType req_rhs_grad , <nl> + RunContext ctx ) { <nl> + using namespace mshadow : : expr ; <nl> + mshadow : : Stream < xpu > * s = ctx . get_stream < xpu > ( ) ; <nl> + MSHADOW_TYPE_SWITCH ( lhs_grad - > type_flag_ , DType , { <nl> + mshadow : : Tensor < xpu , 2 , DType > mout_grad = out_grad . data . FlatTo2D < xpu , DType > ( s ) ; <nl> + mshadow : : Tensor < xpu , 2 , DType > mlhs_data = lhs . data . FlatTo2D < xpu , DType > ( s ) ; <nl> + mshadow : : Tensor < xpu , 2 , DType > mrhs_data = rhs . data . FlatTo2D < xpu , DType > ( s ) ; <nl> + mshadow : : Tensor < xpu , 2 , DType > mlhs_grad = lhs_grad - > FlatTo2D < xpu , DType > ( s ) ; <nl> + mshadow : : Tensor < xpu , 2 , DType > mrhs_grad = rhs_grad - > FlatTo2D < xpu , DType > ( s ) ; <nl> + CHECK_NE ( req_rhs_grad , kWriteInplace ) ; <nl> + ASSIGN_DISPATCH ( mrhs_grad , req_rhs_grad , <nl> + mout_grad * F < mshadow_op : : minimum_grad > ( mrhs_data , mlhs_data ) ) ; <nl> + ASSIGN_DISPATCH ( mlhs_grad , req_lhs_grad , <nl> + mout_grad * F < mshadow_op : : minimum_grad > ( mlhs_data , mrhs_data ) ) ; <nl> + } ) ; <nl> + } <nl> <nl> - # if DMLC_USE_CXX11 <nl> - template < typename ForwardOp > <nl> - class ElementWiseBinaryOpProp : public OperatorProperty { <nl> - public : <nl> - void Init ( const std : : vector < std : : pair < std : : string , std : : string > > & kwargs ) override { <nl> - CHECK_EQ ( kwargs . size ( ) , 0 ) <nl> - < < TypeString ( ) < < " do not take any additional keyword arguments besides lhs and rhs " ; <nl> - } <nl> - std : : map < std : : string , std : : string > GetParams ( ) const override { <nl> - return std : : map < std : : string , std : : string > ( ) ; <nl> - } <nl> <nl> - bool InferShape ( std : : vector < TShape > * in_shape , <nl> - std : : vector < TShape > * out_shape , <nl> - std : : vector < TShape > * aux_shape ) const override { <nl> - using namespace mshadow ; <nl> - CHECK_EQ ( in_shape - > size ( ) , 2 ) < < " Input : [ lhs , rhs ] " ; <nl> - if ( in_shape - > at ( elembinary : : kLhs ) . ndim ( ) ! = 0 ) { <nl> - SHAPE_ASSIGN_CHECK ( * in_shape , elembinary : : kRhs , in_shape - > at ( elembinary : : kLhs ) ) ; <nl> - } else if ( in_shape - > at ( elembinary : : kRhs ) . ndim ( ) ! = 0 ) { <nl> - in_shape - > at ( elembinary : : kLhs ) = in_shape - > at ( elembinary : : kRhs ) ; <nl> - } else { <nl> - return false ; <nl> - } <nl> - const TShape & dshape = in_shape - > at ( elembinary : : kLhs ) ; <nl> - out_shape - > clear ( ) ; <nl> - out_shape - > push_back ( dshape ) ; <nl> - return true ; <nl> - } <nl> + MXNET_REGISTER_SIMPLE_OP ( _plus , XPU ) <nl> + . set_symbol_op_name ( " _Plus " ) <nl> + . set_function ( XPU : : kDevMask , BinaryForward_ < XPU , mshadow : : op : : plus > , kInplaceLhsOut ) <nl> + . set_gradient ( XPU : : kDevMask , PlusBackward_ < XPU > , kInplaceOutLhs ) <nl> + . describe ( " Add lhs and rhs " ) ; <nl> <nl> - std : : vector < std : : string > ListArguments ( ) const override { <nl> - return { " lhs " , " rhs " } ; <nl> - } <nl> + MXNET_REGISTER_SIMPLE_OP ( _minus , XPU ) <nl> + . set_symbol_op_name ( " _Minus " ) <nl> + . set_function ( XPU : : kDevMask , BinaryForward_ < XPU , mshadow : : op : : minus > , kInplaceLhsOut ) <nl> + . set_gradient ( XPU : : kDevMask , MinusBackward_ < XPU > , kInplaceOutLhs ) <nl> + . describe ( " Minus lhs and rhs " ) ; <nl> <nl> - OperatorProperty * Copy ( ) const override { <nl> - return new ElementWiseBinaryOpProp < ForwardOp > ( ) ; <nl> - } <nl> + MXNET_REGISTER_SIMPLE_OP ( _mul , XPU ) <nl> + . set_symbol_op_name ( " _Mul " ) <nl> + . set_function ( XPU : : kDevMask , BinaryForward_ < XPU , mshadow : : op : : mul > , kInplaceLhsOut ) <nl> + . set_gradient ( XPU : : kDevMask , MulBackward_ < XPU > , kInplaceOutLhs ) <nl> + . describe ( " Multiply lhs and rhs " ) ; <nl> <nl> - std : : string TypeString ( ) const override { <nl> - return GetOpTypeString < ForwardOp > ( ) ; <nl> - } <nl> + MXNET_REGISTER_SIMPLE_OP ( _div , XPU ) <nl> + . set_symbol_op_name ( " _Div " ) <nl> + . set_function ( XPU : : kDevMask , BinaryForward_ < XPU , mshadow : : op : : div > , kInplaceLhsOut ) <nl> + . set_gradient ( XPU : : kDevMask , DivBackward_ < XPU > , kInplaceOutLhs ) <nl> + . describe ( " Multiply lhs by rhs " ) ; <nl> <nl> - / / decalre dependency and inplace optimization options <nl> - std : : vector < int > DeclareBackwardDependency ( <nl> - const std : : vector < int > & out_grad , <nl> - const std : : vector < int > & in_data , <nl> - const std : : vector < int > & out_data ) const override { <nl> - switch ( GetOpType < ForwardOp > ( ) ) { <nl> - case elembinary : : kPlus : <nl> - case elembinary : : kMinus : <nl> - return { out_grad [ elembinary : : kOut ] } ; <nl> - case elembinary : : kMul : <nl> - case elembinary : : kDiv : <nl> - case elembinary : : kMaximum : <nl> - case elembinary : : kMinimum : <nl> - return { out_grad [ elembinary : : kOut ] , in_data [ elembinary : : kLhs ] , in_data [ elembinary : : kRhs ] } ; <nl> - case elembinary : : kPower : <nl> - return { out_grad [ elembinary : : kOut ] , in_data [ elembinary : : kLhs ] , in_data [ elembinary : : kRhs ] , <nl> - out_data [ elembinary : : kOut ] } ; <nl> - } <nl> - LOG ( FATAL ) < < " not reached " ; <nl> - return { } ; <nl> - } <nl> + MXNET_REGISTER_SIMPLE_OP ( _power , XPU ) <nl> + . set_symbol_op_name ( " _Power " ) <nl> + . set_function ( XPU : : kDevMask , BinaryForward_ < XPU , mshadow_op : : power > , kInplaceLhsOut ) <nl> + . set_gradient ( XPU : : kDevMask , PowerBackward_ < XPU > , kInplaceOutLhs ) <nl> + . describe ( " Elementwise power ( lhs , rhs ) " ) ; <nl> <nl> - std : : vector < std : : pair < int , void * > > BackwardInplaceOption ( <nl> - const std : : vector < int > & out_grad , <nl> - const std : : vector < int > & in_data , <nl> - const std : : vector < int > & out_data , <nl> - const std : : vector < void * > & in_grad ) const override { <nl> - switch ( GetOpType < ForwardOp > ( ) ) { <nl> - case elembinary : : kPlus : <nl> - case elembinary : : kMinus : <nl> - case elembinary : : kMaximum : <nl> - case elembinary : : kMinimum : <nl> - return { } ; <nl> - case elembinary : : kMul : <nl> - case elembinary : : kDiv : <nl> - case elembinary : : kPower : <nl> - return { { out_grad [ elembinary : : kOut ] , in_grad [ elembinary : : kLhs ] } } ; <nl> - } <nl> - LOG ( FATAL ) < < " not reached " ; <nl> - return { } ; <nl> - } <nl> + MXNET_REGISTER_SIMPLE_OP ( _maximum , XPU ) <nl> + . set_symbol_op_name ( " _Maximum " ) <nl> + . set_function ( XPU : : kDevMask , BinaryForward_ < XPU , mshadow_op : : maximum > , kInplaceLhsOut ) <nl> + . set_gradient ( XPU : : kDevMask , MaximumBackward_ < XPU > , kInplaceOutLhs ) <nl> + . describe ( " Elementwise max of lhs by rhs " ) ; <nl> <nl> - std : : vector < std : : pair < int , void * > > ForwardInplaceOption ( <nl> - const std : : vector < int > & in_data , <nl> - const std : : vector < void * > & out_data ) const override { <nl> - return { { in_data [ elembinary : : kLhs ] , out_data [ elembinary : : kOut ] } } ; <nl> - } <nl> + MXNET_REGISTER_SIMPLE_OP ( _minimum , XPU ) <nl> + . set_symbol_op_name ( " _Minimum " ) <nl> + . set_function ( XPU : : kDevMask , BinaryForward_ < XPU , mshadow_op : : minimum > , kInplaceLhsOut ) <nl> + . set_gradient ( XPU : : kDevMask , MinimumBackward_ < XPU > , kInplaceOutLhs ) <nl> + . describe ( " Elementwise min of lhs by rhs " ) ; <nl> <nl> - Operator * CreateOperator ( Context ctx ) const override ; <nl> - } ; <nl> - # endif / / DMLC_USE_CXX11 <nl> } / / namespace op <nl> } / / namespace mxnet <nl> # endif / / MXNET_OPERATOR_ELEMENTWISE_BINARY_OP_INL_H_ <nl> mmm a / src / operator / elementwise_binary_op . cc <nl> ppp b / src / operator / elementwise_binary_op . cc <nl> <nl> * / <nl> # include " . / elementwise_binary_op - inl . h " <nl> <nl> - namespace mxnet { <nl> - namespace op { <nl> - template < > <nl> - Operator * CreateElementWiseBinaryOp < cpu > ( elembinary : : ElementWiseBinaryOpType type ) { <nl> - return CreateElementWiseBinaryOp_ < cpu > ( type ) ; <nl> - } <nl> - <nl> - / / DO_BIND_DISPATCH comes from static_operator_common . h <nl> - template < typename ForwardOp > <nl> - Operator * ElementWiseBinaryOpProp < ForwardOp > : : CreateOperator ( Context ctx ) const { <nl> - DO_BIND_DISPATCH ( CreateElementWiseBinaryOp , GetOpType < ForwardOp > ( ) ) ; <nl> - } <nl> - <nl> - MXNET_REGISTER_OP_PROPERTY ( _Plus , ElementWiseBinaryOpProp < mshadow : : op : : plus > ) <nl> - . describe ( " Perform an elementwise plus . " ) ; <nl> - MXNET_REGISTER_OP_PROPERTY ( _Minus , ElementWiseBinaryOpProp < mshadow : : op : : minus > ) <nl> - . describe ( " Perform an elementwise minus . " ) ; <nl> - MXNET_REGISTER_OP_PROPERTY ( _Mul , ElementWiseBinaryOpProp < mshadow : : op : : mul > ) <nl> - . describe ( " Perform an elementwise mul . " ) ; <nl> - MXNET_REGISTER_OP_PROPERTY ( _Div , ElementWiseBinaryOpProp < mshadow : : op : : div > ) <nl> - . describe ( " Perform an elementwise div . " ) ; <nl> - MXNET_REGISTER_OP_PROPERTY ( _Power , ElementWiseBinaryOpProp < mshadow_op : : power > ) <nl> - . describe ( " Perform an elementwise power . " ) ; <nl> - MXNET_REGISTER_OP_PROPERTY ( _Maximum , ElementWiseBinaryOpProp < mshadow_op : : maximum > ) <nl> - . describe ( " Perform an elementwise power . " ) ; <nl> - MXNET_REGISTER_OP_PROPERTY ( _Minimum , ElementWiseBinaryOpProp < mshadow_op : : minimum > ) <nl> - . describe ( " Perform an elementwise power . " ) ; <nl> - <nl> - } / / namespace op <nl> - } / / namespace mxnet <nl> mmm a / src / operator / elementwise_binary_op . cu <nl> ppp b / src / operator / elementwise_binary_op . cu <nl> <nl> * \ brief elementwise binary operator <nl> * / <nl> # include " . / elementwise_binary_op - inl . h " <nl> - <nl> - namespace mxnet { <nl> - namespace op { <nl> - template < > <nl> - Operator * CreateElementWiseBinaryOp < gpu > ( elembinary : : ElementWiseBinaryOpType type ) { <nl> - return CreateElementWiseBinaryOp_ < gpu > ( type ) ; <nl> - } <nl> - } / / namespace op <nl> - } / / namespace mxnet <nl> new file mode 100644 <nl> index 00000000000 . . d3c7c48af24 <nl> mmm / dev / null <nl> ppp b / src / operator / elementwise_unary_op - inl . h <nl> <nl> + / * ! <nl> + * Copyright ( c ) 2015 by Contributors <nl> + * \ file elementwise_unary_op - inl . h <nl> + * \ brief Function defintion of elementwise unary operators <nl> + * / <nl> + # ifndef MXNET_OPERATOR_ELEMENTWISE_UNARY_OP_INL_H_ <nl> + # define MXNET_OPERATOR_ELEMENTWISE_UNARY_OP_INL_H_ <nl> + <nl> + # include < mxnet / operator_util . h > <nl> + # include " . / mshadow_op . h " <nl> + <nl> + # if defined ( __CUDACC__ ) <nl> + # define XPU gpu <nl> + # else <nl> + # define XPU cpu <nl> + # endif <nl> + <nl> + namespace mxnet { <nl> + namespace op { <nl> + <nl> + template < typename xpu , typename OP > <nl> + void UnaryForward_ ( const TBlob & src , <nl> + const EnvArguments & env , <nl> + TBlob * ret , <nl> + OpReqType req , <nl> + RunContext ctx ) { <nl> + using namespace mxnet : : op ; <nl> + using namespace mshadow : : expr ; <nl> + mshadow : : Stream < xpu > * s = ctx . get_stream < xpu > ( ) ; <nl> + CHECK_EQ ( ret - > type_flag_ , src . type_flag_ ) <nl> + < < " Unary function only support input / output with the same type " ; <nl> + MSHADOW_TYPE_SWITCH ( ret - > type_flag_ , DType , { <nl> + mshadow : : Tensor < xpu , 2 , DType > out = ret - > FlatTo2D < xpu , DType > ( s ) ; <nl> + ASSIGN_DISPATCH ( out , req , F < OP > ( src . FlatTo2D < xpu , DType > ( s ) ) ) ; <nl> + } ) ; <nl> + } <nl> + <nl> + / / backward function that takes input value of the op <nl> + template < typename xpu , typename OP > <nl> + void UnaryBackwardUseIn_ ( const OutputGrad & out_grad , <nl> + const Input0 & in_data0 , <nl> + const EnvArguments & env , <nl> + TBlob * in_grad , <nl> + OpReqType req , <nl> + RunContext ctx ) { <nl> + using namespace mxnet : : op ; <nl> + using namespace mshadow : : expr ; <nl> + mshadow : : Stream < xpu > * s = ctx . get_stream < xpu > ( ) ; <nl> + CHECK_EQ ( in_grad - > type_flag_ , out_grad . data . type_flag_ ) <nl> + < < " Unary function only support input / output with the same type " ; <nl> + CHECK_EQ ( in_grad - > type_flag_ , in_data0 . data . type_flag_ ) <nl> + < < " Unary function only support input / output with the same type " ; <nl> + MSHADOW_TYPE_SWITCH ( in_grad - > type_flag_ , DType , { <nl> + mshadow : : Tensor < xpu , 2 , DType > igrad = in_grad - > FlatTo2D < xpu , DType > ( s ) ; <nl> + ASSIGN_DISPATCH ( igrad , req , <nl> + ( F < OP > ( in_data0 . data . FlatTo2D < xpu , DType > ( s ) ) * <nl> + out_grad . data . FlatTo2D < xpu , DType > ( ) ) ) ; <nl> + } ) ; <nl> + } <nl> + <nl> + / / backward function that takes output value of the op <nl> + template < typename xpu , typename OP > <nl> + void UnaryBackwardUseOut_ ( const OutputGrad & out_grad , <nl> + const OutputValue & out_value , <nl> + const EnvArguments & env , <nl> + TBlob * in_grad , <nl> + OpReqType req , <nl> + RunContext ctx ) { <nl> + using namespace mxnet : : op ; <nl> + using namespace mshadow : : expr ; <nl> + mshadow : : Stream < xpu > * s = ctx . get_stream < xpu > ( ) ; <nl> + CHECK_EQ ( in_grad - > type_flag_ , out_grad . data . type_flag_ ) <nl> + < < " Unary function only support input / output with the same type " ; <nl> + CHECK_EQ ( in_grad - > type_flag_ , out_value . data . type_flag_ ) <nl> + < < " Unary function only support input / output with the same type " ; <nl> + MSHADOW_TYPE_SWITCH ( in_grad - > type_flag_ , DType , { <nl> + mshadow : : Tensor < xpu , 2 , DType > igrad = in_grad - > FlatTo2D < xpu , DType > ( s ) ; <nl> + ASSIGN_DISPATCH ( igrad , req , <nl> + ( F < OP > ( out_value . data . FlatTo2D < xpu , DType > ( s ) ) * <nl> + out_grad . data . FlatTo2D < xpu , DType > ( ) ) ) ; <nl> + } ) ; <nl> + } <nl> + <nl> + MXNET_REGISTER_SIMPLE_OP ( abs , XPU ) <nl> + . set_function ( XPU : : kDevMask , UnaryForward_ < XPU , mshadow_op : : abs > , kInplaceInOut ) <nl> + . set_gradient ( XPU : : kDevMask , UnaryBackwardUseIn_ < XPU , mshadow_op : : sign > , kInplaceOutIn ) <nl> + . describe ( " Take absolute value of the src " ) ; <nl> + / / sign <nl> + MXNET_REGISTER_SIMPLE_OP ( sign , XPU ) <nl> + . set_function ( XPU : : kDevMask , UnaryForward_ < XPU , mshadow_op : : sign > , kInplaceInOut ) <nl> + . set_gradient ( XPU : : kDevMask , UnaryBackwardUseIn_ < XPU , mshadow_op : : sign_grad > , kInplaceOutIn ) <nl> + . describe ( " Take sign value of the src " ) ; <nl> + / / round <nl> + MXNET_REGISTER_SIMPLE_OP ( round , XPU ) <nl> + . set_function ( XPU : : kDevMask , UnaryForward_ < XPU , mshadow_op : : round > , kInplaceInOut ) <nl> + . describe ( " Take round value of the src " ) ; <nl> + / / ceil <nl> + MXNET_REGISTER_SIMPLE_OP ( ceil , XPU ) <nl> + . set_function ( XPU : : kDevMask , UnaryForward_ < XPU , mshadow_op : : ceil > , kInplaceInOut ) <nl> + . describe ( " Take ceil value of the src " ) ; <nl> + / / floor <nl> + MXNET_REGISTER_SIMPLE_OP ( floor , XPU ) <nl> + . set_function ( XPU : : kDevMask , UnaryForward_ < XPU , mshadow_op : : floor > , kInplaceInOut ) <nl> + . describe ( " Take floor value of the src " ) ; <nl> + / / square <nl> + MXNET_REGISTER_SIMPLE_OP ( square , XPU ) <nl> + . set_function ( XPU : : kDevMask , UnaryForward_ < XPU , mshadow_op : : square > , kInplaceInOut ) <nl> + . set_gradient ( XPU : : kDevMask , UnaryBackwardUseIn_ < XPU , mshadow_op : : square_grad > , kInplaceOutIn ) <nl> + . describe ( " Take square of the src " ) ; <nl> + / / sqrt <nl> + MXNET_REGISTER_SIMPLE_OP ( sqrt , XPU ) <nl> + . set_function ( XPU : : kDevMask , UnaryForward_ < XPU , mshadow_op : : square_root > , kInplaceInOut ) <nl> + . set_gradient ( XPU : : kDevMask , UnaryBackwardUseOut_ < XPU , mshadow_op : : square_root_grad > , kInplaceOutIn ) <nl> + . describe ( " Take sqrt of the src " ) ; <nl> + / / rsqrt <nl> + MXNET_REGISTER_SIMPLE_OP ( rsqrt , XPU ) <nl> + . set_function ( XPU : : kDevMask , UnaryForward_ < XPU , mshadow_op : : reciprocal_square_root > , kInplaceInOut ) <nl> + . set_gradient ( XPU : : kDevMask , <nl> + UnaryBackwardUseIn_ < XPU , mshadow_op : : reciprocal_square_root_grad > , kInplaceOutIn ) <nl> + . describe ( " Take rsqrt of the src " ) ; <nl> + / / exp <nl> + MXNET_REGISTER_SIMPLE_OP ( exp , XPU ) <nl> + . set_function ( XPU : : kDevMask , UnaryForward_ < XPU , mshadow_op : : exp > , kInplaceInOut ) <nl> + . set_gradient ( XPU : : kDevMask , UnaryBackwardUseOut_ < XPU , mshadow_op : : identity > , kInplaceOutIn ) <nl> + . describe ( " Take exp of the src " ) ; <nl> + / / log <nl> + MXNET_REGISTER_SIMPLE_OP ( log , XPU ) <nl> + . set_function ( XPU : : kDevMask , UnaryForward_ < XPU , mshadow_op : : log > , kInplaceInOut ) <nl> + . set_gradient ( XPU : : kDevMask , UnaryBackwardUseIn_ < XPU , mshadow_op : : log_grad > , kInplaceOutIn ) <nl> + . describe ( " Take log of the src " ) ; <nl> + / / cos <nl> + MXNET_REGISTER_SIMPLE_OP ( cos , XPU ) <nl> + . set_function ( XPU : : kDevMask , UnaryForward_ < XPU , mshadow_op : : cos > , kInplaceInOut ) <nl> + . set_gradient ( XPU : : kDevMask , UnaryBackwardUseIn_ < XPU , mshadow_op : : cos_grad > , kInplaceOutIn ) <nl> + . describe ( " Take cos of the src " ) ; <nl> + / / sin <nl> + MXNET_REGISTER_SIMPLE_OP ( sin , XPU ) <nl> + . set_function ( XPU : : kDevMask , UnaryForward_ < XPU , mshadow_op : : sin > , kInplaceInOut ) <nl> + . set_gradient ( XPU : : kDevMask , UnaryBackwardUseIn_ < XPU , mshadow_op : : sin_grad > , kInplaceOutIn ) <nl> + . describe ( " Take sin of the src " ) ; <nl> + <nl> + } / / namespace op <nl> + } / / namespace mxnet <nl> + # endif / / MXNET_OPERATOR_ELEMENTWISE_UNARY_OP_INL_H_ <nl> similarity index 67 % <nl> rename from src / ndarray / unary_function . cc <nl> rename to src / operator / elementwise_unary_op . cc <nl> mmm a / src / ndarray / unary_function . cc <nl> ppp b / src / operator / elementwise_unary_op . cc <nl> <nl> / * ! <nl> * Copyright ( c ) 2015 by Contributors <nl> - * \ file unary_function . cc <nl> + * \ file elementwise_unary_op . cc <nl> * \ brief CPU Implementation of unary function . <nl> * / <nl> / / this will be invoked by gcc and compile CPU version <nl> - # include " . / unary_function - inl . h " <nl> + # include " . / elementwise_unary_op - inl . h " <nl> new file mode 100644 <nl> index 00000000000 . . ce3e48936e1 <nl> mmm / dev / null <nl> ppp b / src / operator / elementwise_unary_op . cu <nl> <nl> + / * ! <nl> + * Copyright ( c ) 2015 by Contributors <nl> + * \ file elementwise_unary_op . cc <nl> + * \ brief GPU Implementation of unary function . <nl> + * / <nl> + / / this will be invoked by gcc and compile CPU version <nl> + # include " . / elementwise_unary_op - inl . h " <nl> mmm a / src / operator / embedding - inl . h <nl> ppp b / src / operator / embedding - inl . h <nl> class EmbeddingOp : public Operator { <nl> CHECK_EQ ( req [ embedding : : kOut ] , kWriteTo ) ; <nl> CHECK_EQ ( in_data . size ( ) , 2 ) ; <nl> CHECK_EQ ( out_data . size ( ) , 1 ) ; <nl> - CHECK_EQ ( in_data [ embedding : : kData ] . ndim ( ) , 1 ) <nl> - < < " Embedding layer expects its input to be one - dimensional . " <nl> - < < in_data [ embedding : : kData ] . ndim ( ) <nl> - < < " dimensional input is given instead " ; <nl> CHECK_EQ ( in_data [ embedding : : kWeight ] . ndim ( ) , 2 ) <nl> < < " Embedding layer expects its weight to be two - dimensional . " <nl> < < in_data [ embedding : : kWeight ] . ndim ( ) <nl> < < " dimensional input is given instead " ; <nl> + <nl> + const TShape & ishape = in_data [ embedding : : kData ] . shape_ ; <nl> + const TShape & oshape = out_data [ embedding : : kOut ] . shape_ ; <nl> + <nl> Stream < xpu > * s = ctx . get_stream < xpu > ( ) ; <nl> - Tensor < xpu , 1 > data = in_data [ embedding : : kData ] . get < xpu , 1 , real_t > ( s ) ; <nl> + Tensor < xpu , 1 > data = in_data [ embedding : : kData ] . get_with_shape < xpu , 1 , real_t > ( <nl> + Shape1 ( ishape . ProdShape ( 0 , ishape . ndim ( ) ) ) , s ) ; <nl> Tensor < xpu , 2 > wmat = in_data [ embedding : : kWeight ] . get < xpu , 2 , real_t > ( s ) ; <nl> - Tensor < xpu , 2 > out = out_data [ embedding : : kOut ] . get < xpu , 2 , real_t > ( s ) ; <nl> + Tensor < xpu , 2 > out = out_data [ embedding : : kOut ] . get_with_shape < xpu , 2 , real_t > ( <nl> + Shape2 ( oshape . ProdShape ( 0 , oshape . ndim ( ) - 1 ) , oshape [ oshape . ndim ( ) - 1 ] ) , s ) ; <nl> out = take ( data , wmat ) ; <nl> } <nl> <nl> class EmbeddingOp : public Operator { <nl> CHECK_EQ ( in_grad . size ( ) , 2 ) ; <nl> CHECK_EQ ( req [ embedding : : kData ] , kNullOp ) <nl> < < " Embedding layer doesn ' t support calculate data gradient " ; <nl> + <nl> + const TShape & ishape = in_data [ embedding : : kData ] . shape_ ; <nl> + const TShape & oshape = out_grad [ embedding : : kOut ] . shape_ ; <nl> + <nl> Stream < xpu > * s = ctx . get_stream < xpu > ( ) ; <nl> - Tensor < xpu , 1 > data = in_data [ embedding : : kData ] . get < xpu , 1 , real_t > ( s ) ; <nl> - Tensor < xpu , 2 > grad_out = out_grad [ embedding : : kOut ] . get < xpu , 2 , real_t > ( s ) ; <nl> + Tensor < xpu , 1 > data = in_data [ embedding : : kData ] . get_with_shape < xpu , 1 , real_t > ( <nl> + Shape1 ( ishape . ProdShape ( 0 , ishape . ndim ( ) ) ) , s ) ; <nl> + Tensor < xpu , 2 > grad_out = out_grad [ embedding : : kOut ] . get_with_shape < xpu , 2 , real_t > ( <nl> + Shape2 ( oshape . ProdShape ( 0 , oshape . ndim ( ) - 1 ) , oshape [ oshape . ndim ( ) - 1 ] ) , s ) ; <nl> Tensor < xpu , 2 > grad_in = in_grad [ embedding : : kWeight ] . get < xpu , 2 , real_t > ( s ) ; <nl> - Assign ( grad_in , req [ embedding : : kWeight ] , take_grad ( data , grad_out , param_ . input_dim ) ) ; <nl> + if ( req [ embedding : : kWeight ] = = kWriteTo ) { <nl> + grad_in = 0 . 0f ; <nl> + AddTakeGrad ( grad_in , data , grad_out ) ; <nl> + } else if ( req [ embedding : : kWeight ] = = kAddTo ) { <nl> + AddTakeGrad ( grad_in , data , grad_out ) ; <nl> + } else { <nl> + LOG ( FATAL ) < < " wrong req " ; <nl> + } <nl> } <nl> <nl> private : <nl> class EmbeddingProp : public OperatorProperty { <nl> SHAPE_ASSIGN_CHECK ( * in_shape , embedding : : kWeight , Shape2 ( param_ . input_dim , <nl> param_ . output_dim ) ) ; <nl> out_shape - > clear ( ) ; <nl> - out_shape - > push_back ( Shape2 ( dshape [ 0 ] , param_ . output_dim ) ) ; <nl> + <nl> + TShape oshape ( dshape . ndim ( ) + 1 ) ; <nl> + for ( size_t i = 0 ; i < dshape . ndim ( ) ; + + i ) { <nl> + oshape [ i ] = dshape [ i ] ; <nl> + } <nl> + oshape [ dshape . ndim ( ) ] = param_ . output_dim ; <nl> + <nl> + out_shape - > push_back ( oshape ) ; <nl> return true ; <nl> } <nl> <nl> mmm a / src / operator / embedding . cc <nl> ppp b / src / operator / embedding . cc <nl> Operator * EmbeddingProp : : CreateOperator ( Context ctx ) const { <nl> DMLC_REGISTER_PARAMETER ( EmbeddingParam ) ; <nl> <nl> MXNET_REGISTER_OP_PROPERTY ( Embedding , EmbeddingProp ) <nl> - . describe ( " Get embedding for one - hot input " ) <nl> + . describe ( " Get embedding for one - hot input . A n - dimensional input tensor will " <nl> + " be trainsformed into a ( n + 1 ) - dimensional tensor , where a new dimension is " <nl> + " added for the embedding results . " ) <nl> . add_argument ( " data " , " Symbol " , " Input data to the EmbeddingOp . " ) <nl> . add_argument ( " weight " , " Symbol " , " Enbedding weight matrix . " ) <nl> . add_arguments ( EmbeddingParam : : __FIELDS__ ( ) ) ; <nl> mmm a / src / operator / fully_connected - inl . h <nl> ppp b / src / operator / fully_connected - inl . h <nl> class FullyConnectedOp : public Operator { <nl> CHECK_EQ ( s - > blas_handle_ownership_ , Stream < xpu > : : OwnHandle ) <nl> < < " Must init CuBLAS handle in stream " ; <nl> # endif / / __CUDACC__ <nl> - Tensor < xpu , 2 , DType > data = in_data [ fullc : : kData ] . FlatTo2D < xpu , DType > ( s ) ; <nl> + const TShape & ishape = in_data [ fullc : : kData ] . shape_ ; <nl> + const TShape & oshape = out_data [ fullc : : kOut ] . shape_ ; <nl> + <nl> + Tensor < xpu , 2 , DType > data = in_data [ fullc : : kData ] . get_with_shape < xpu , 2 , DType > ( <nl> + Shape2 ( ishape [ 0 ] , ishape . ProdShape ( 1 , ishape . ndim ( ) ) ) , s ) ; <nl> Tensor < xpu , 2 , DType > wmat = in_data [ fullc : : kWeight ] . get < xpu , 2 , DType > ( s ) ; <nl> - Tensor < xpu , 2 , DType > out = out_data [ fullc : : kOut ] . FlatTo2D < xpu , DType > ( s ) ; <nl> + Tensor < xpu , 2 , DType > out = out_data [ fullc : : kOut ] . get_with_shape < xpu , 2 , DType > ( <nl> + Shape2 ( oshape [ 0 ] , oshape . ProdShape ( 1 , oshape . ndim ( ) ) ) , s ) ; <nl> out = dot ( data , wmat . T ( ) ) ; <nl> if ( ! param_ . no_bias ) { <nl> Tensor < xpu , 1 , DType > bias = in_data [ fullc : : kBias ] . get < xpu , 1 , DType > ( s ) ; <nl> class FullyConnectedOp : public Operator { <nl> / / TODO ( bing ) : check the BLAS Handle , be careful <nl> / / maybe need blas handle from context <nl> Stream < xpu > * s = ctx . get_stream < xpu > ( ) ; <nl> - Tensor < xpu , 2 , DType > data = in_data [ fullc : : kData ] . FlatTo2D < xpu , DType > ( s ) ; <nl> + const TShape & ishape = in_data [ fullc : : kData ] . shape_ ; <nl> + const TShape & oshape = out_grad [ fullc : : kOut ] . shape_ ; <nl> + <nl> + Tensor < xpu , 2 , DType > data = in_data [ fullc : : kData ] . get_with_shape < xpu , 2 , DType > ( <nl> + Shape2 ( ishape [ 0 ] , ishape . ProdShape ( 1 , ishape . ndim ( ) ) ) , s ) ; <nl> Tensor < xpu , 2 , DType > wmat = in_data [ fullc : : kWeight ] . get < xpu , 2 , DType > ( s ) ; <nl> - Tensor < xpu , 2 , DType > grad = out_grad [ fullc : : kOut ] . FlatTo2D < xpu , DType > ( s ) ; <nl> + Tensor < xpu , 2 , DType > grad = out_grad [ fullc : : kOut ] . get_with_shape < xpu , 2 , DType > ( <nl> + Shape2 ( oshape [ 0 ] , oshape . ProdShape ( 1 , oshape . ndim ( ) ) ) , s ) ; <nl> + <nl> # if defined ( __CUDACC__ ) <nl> CHECK_EQ ( s - > blas_handle_ownership_ , Stream < xpu > : : OwnHandle ) <nl> < < " Must init CuBLAS handle in stream " ; <nl> class FullyConnectedOp : public Operator { <nl> Assign ( gbias , req [ fullc : : kBias ] , sum_rows ( grad ) ) ; <nl> } <nl> / / gradient of data <nl> - Tensor < xpu , 2 , DType > gdata = in_grad [ fullc : : kData ] . FlatTo2D < xpu , DType > ( s ) ; <nl> + Tensor < xpu , 2 , DType > gdata = in_grad [ fullc : : kData ] . get_with_shape < xpu , 2 , DType > ( <nl> + Shape2 ( ishape [ 0 ] , ishape . ProdShape ( 1 , ishape . ndim ( ) ) ) , s ) ; <nl> Assign ( gdata , req [ fullc : : kData ] , dot ( grad , wmat ) ) ; <nl> } <nl> <nl> class FullyConnectedProp : public OperatorProperty { <nl> / / require data to be known <nl> if ( dshape . ndim ( ) = = 0 ) return false ; <nl> <nl> - index_t num_input = 0 ; <nl> - mshadow : : Shape < 2 > ishape = dshape . FlatTo2D ( ) ; <nl> - num_input = ishape [ 1 ] ; <nl> + index_t num_input = dshape . ProdShape ( 1 , dshape . ndim ( ) ) ; <nl> SHAPE_ASSIGN_CHECK ( * in_shape , fullc : : kWeight , Shape2 ( param_ . num_hidden , num_input ) ) ; <nl> if ( ! param_ . no_bias ) { <nl> SHAPE_ASSIGN_CHECK ( * in_shape , fullc : : kBias , Shape1 ( param_ . num_hidden ) ) ; <nl> mmm a / src / operator / mshadow_op . h <nl> ppp b / src / operator / mshadow_op . h <nl> struct threshold { <nl> struct abs { <nl> template < typename DType > <nl> MSHADOW_XINLINE static DType Map ( DType a ) { <nl> - return DType ( fabsf ( a ) ) ; <nl> + return DType ( fabsf ( float ( a ) ) ) ; / / NOLINT ( * ) <nl> } <nl> } ; <nl> <nl> new file mode 100644 <nl> index 00000000000 . . bde35d57cad <nl> mmm / dev / null <nl> ppp b / src / operator / operator_util . cc <nl> <nl> + / * ! <nl> + * Copyright ( c ) 2015 by Contributors <nl> + * \ file operator_util . cc <nl> + * Implementation of operator util . <nl> + * / <nl> + # include < mxnet / operator_util . h > <nl> + # include < mxnet / operator . h > <nl> + # include < mxnet / ndarray . h > <nl> + # include < mxnet / engine . h > <nl> + # include < vector > <nl> + # include < mutex > <nl> + # include " . / operator_common . h " <nl> + <nl> + namespace mxnet { <nl> + namespace op { <nl> + <nl> + class SimpleOpPropBase ; <nl> + class SimpleUnaryOpProp ; <nl> + class SimpleBinaryOpProp ; <nl> + <nl> + class SimpleOpRegEntryImpl : public SimpleOpRegEntry { <nl> + public : <nl> + TSelf & set_symbol_op_name ( const std : : string & symbol_name ) override { <nl> + CHECK ( op_reg_ = = nullptr | | symbol_name = = symbol_name_ ) <nl> + < < " need to call set_symbol_op_name before all other calls " ; <nl> + symbol_name_ = symbol_name ; <nl> + return * this ; <nl> + } <nl> + <nl> + TSelf & set_enable_scalar ( <nl> + bool enable_scalar , <nl> + SimpleOpScalarOption type_mask ) override { <nl> + std : : lock_guard < std : : mutex > lock ( mutex_ ) ; <nl> + enable_scalar_ = enable_scalar ; <nl> + scalar_type_mask_ = type_mask ; <nl> + CHECK ( ! enable_kwargs_ | | ! enable_scalar_ ) <nl> + < < " Cannot have both kwargs and scalar arguments " ; <nl> + return * this ; <nl> + } <nl> + <nl> + TSelf & set_enable_kwargs ( bool enable_kwargs ) override { <nl> + std : : lock_guard < std : : mutex > lock ( mutex_ ) ; <nl> + enable_kwargs_ = enable_kwargs ; <nl> + CHECK ( ! enable_kwargs_ | | ! enable_scalar_ ) <nl> + < < " Cannot have both kwargs and scalar arguments " ; <nl> + return * this ; <nl> + } <nl> + <nl> + TSelf & set_shape_function ( UnaryShapeFunction fshapeinfer ) override { <nl> + std : : lock_guard < std : : mutex > lock ( mutex_ ) ; <nl> + unary_shape_ = fshapeinfer ; <nl> + return * this ; <nl> + } <nl> + <nl> + TSelf & set_shape_function ( BinaryShapeFunction fshapeinfer ) override { <nl> + std : : lock_guard < std : : mutex > lock ( mutex_ ) ; <nl> + binary_shape_ = fshapeinfer ; <nl> + return * this ; <nl> + } <nl> + <nl> + TSelf & set_function ( int dev_mask , <nl> + UnaryFunction funary , <nl> + SimpleOpInplaceOption inplace_in_out , <nl> + SimpleOpRegOption register_symbolic ) override { <nl> + std : : lock_guard < std : : mutex > lock ( mutex_ ) ; <nl> + SetFunction ( & funary_ , dev_mask , funary , " UnaryFunction " ) ; <nl> + unary_forward_inplace_in_out_ = ( inplace_in_out = = kInplaceInOut ) ; <nl> + if ( + + reg_counter_ = = 1 ) { <nl> + this - > RegisterUnaryImperative ( ) ; <nl> + register_symbolic_ = ( register_symbolic = = kRegisterSymbolic ) ; <nl> + if ( register_symbolic_ ) { <nl> + this - > RegisterUnarySymbolic ( ) ; <nl> + } <nl> + } <nl> + return * this ; <nl> + } <nl> + <nl> + TSelf & set_function ( int dev_mask , <nl> + BinaryFunction fbinary , <nl> + SimpleOpInplaceOption inplace_lhs_out , <nl> + SimpleOpRegOption register_symbolic ) override { <nl> + std : : lock_guard < std : : mutex > lock ( mutex_ ) ; <nl> + SetFunction ( & fbinary_ , dev_mask , fbinary , " BinaryFunction " ) ; <nl> + binary_forward_inplace_lhs_out_ = ( inplace_lhs_out = = kInplaceLhsOut ) ; <nl> + if ( + + reg_counter_ = = 1 ) { <nl> + this - > RegisterBinaryImperative ( ) ; <nl> + register_symbolic_ = ( register_symbolic = = kRegisterSymbolic ) ; <nl> + if ( register_symbolic_ ) { <nl> + this - > RegisterBinarySymbolic ( ) ; <nl> + } <nl> + } <nl> + return * this ; <nl> + } <nl> + <nl> + TSelf & set_gradient ( int dev_mask , <nl> + UnaryGradFunctionT0 fgrad , <nl> + SimpleOpInplaceOption inplace_out_in_grad ) override { <nl> + std : : lock_guard < std : : mutex > lock ( mutex_ ) ; <nl> + SetFunction ( & funary_grad_t0_ , dev_mask , fgrad , " UnaryGradFunctionT0 " ) ; <nl> + unary_backward_inplace_out_in_ = ( inplace_out_in_grad = = kInplaceOutIn ) ; <nl> + return * this ; <nl> + } <nl> + <nl> + TSelf & set_gradient ( int dev_mask , <nl> + UnaryGradFunctionT1 fgrad , <nl> + SimpleOpInplaceOption inplace_out_in_grad ) override { <nl> + std : : lock_guard < std : : mutex > lock ( mutex_ ) ; <nl> + SetFunction ( & funary_grad_t1_ , dev_mask , fgrad , " UnaryGradFunctionT1 " ) ; <nl> + unary_backward_inplace_out_in_ = ( inplace_out_in_grad = = kInplaceOutIn ) ; <nl> + return * this ; <nl> + } <nl> + <nl> + TSelf & set_gradient ( int dev_mask , <nl> + UnaryGradFunctionT2 fgrad , <nl> + SimpleOpInplaceOption inplace_out_in_grad ) override { <nl> + std : : lock_guard < std : : mutex > lock ( mutex_ ) ; <nl> + SetFunction ( & funary_grad_t2_ , dev_mask , fgrad , " UnaryGradFunctionT2 " ) ; <nl> + unary_backward_inplace_out_in_ = ( inplace_out_in_grad = = kInplaceOutIn ) ; <nl> + return * this ; <nl> + } <nl> + <nl> + TSelf & set_gradient ( int dev_mask , <nl> + BinaryGradFunctionT0 fgrad , <nl> + SimpleOpInplaceOption inplace_out_lhs_grad ) override { <nl> + std : : lock_guard < std : : mutex > lock ( mutex_ ) ; <nl> + SetFunction ( & fbinary_grad_t0_ , dev_mask , fgrad , " BinaryGradFunctionT0 " ) ; <nl> + binary_backward_inplace_out_lhs_ = ( inplace_out_lhs_grad = = kInplaceLhsOut ) ; <nl> + return * this ; <nl> + } <nl> + <nl> + TSelf & set_gradient ( int dev_mask , <nl> + BinaryGradFunctionT1 fgrad , <nl> + SimpleOpInplaceOption inplace_out_lhs_grad ) override { <nl> + std : : lock_guard < std : : mutex > lock ( mutex_ ) ; <nl> + SetFunction ( & fbinary_grad_t1_ , dev_mask , fgrad , " BinaryGradFunctionT1 " ) ; <nl> + binary_backward_inplace_out_lhs_ = ( inplace_out_lhs_grad = = kInplaceLhsOut ) ; <nl> + return * this ; <nl> + } <nl> + <nl> + TSelf & describe ( const std : : string & description ) override { <nl> + std : : lock_guard < std : : mutex > lock ( mutex_ ) ; <nl> + if ( reg_counter_ ! = 1 ) return * this ; <nl> + NDArrayReg ( ) . describe ( description ) ; <nl> + if ( register_symbolic_ ) { <nl> + OpReg ( ) . describe ( description ) ; <nl> + } <nl> + return * this ; <nl> + } <nl> + <nl> + TSelf & add_arguments ( const std : : vector < dmlc : : ParamFieldInfo > & args ) override { <nl> + std : : lock_guard < std : : mutex > lock ( mutex_ ) ; <nl> + if ( reg_counter_ ! = 1 ) return * this ; <nl> + NDArrayReg ( ) . add_arguments ( args ) ; <nl> + if ( register_symbolic_ ) { <nl> + OpReg ( ) . add_arguments ( args ) ; <nl> + } <nl> + return * this ; <nl> + } <nl> + <nl> + protected : <nl> + / / make friend with unary op <nl> + friend class SimpleOpPropBase ; <nl> + friend class SimpleUnaryOpProp ; <nl> + friend class SimpleBinaryOpProp ; <nl> + / / internal mutex <nl> + std : : mutex mutex_ ; <nl> + / / registration counter <nl> + int reg_counter_ { 0 } ; <nl> + / / whether register symbolic function . <nl> + bool register_symbolic_ { true } ; <nl> + / / name of symbolic operator . <nl> + std : : string symbol_name_ ; <nl> + / / number of scalar arguments <nl> + bool enable_scalar_ { false } ; <nl> + / / type mask of scalar arguments in imperative API . <nl> + SimpleOpScalarOption scalar_type_mask_ { kArrayBeforeScalar } ; <nl> + / / whether kwargs is enabled in the function . <nl> + bool enable_kwargs_ { false } ; <nl> + / / mmmmmm unary functions mmm - - <nl> + / / unary shape inference information . <nl> + UnaryShapeFunction unary_shape_ { nullptr } ; <nl> + / / unary functions on each device mask <nl> + std : : vector < UnaryFunction > funary_ ; <nl> + / / type 1 gradient function <nl> + std : : vector < UnaryGradFunctionT0 > funary_grad_t0_ ; <nl> + / / type 2 gradient function <nl> + std : : vector < UnaryGradFunctionT1 > funary_grad_t1_ ; <nl> + / / type 2 gradient function <nl> + std : : vector < UnaryGradFunctionT2 > funary_grad_t2_ ; <nl> + / / whether do inplace optimization of in 0 and output <nl> + bool unary_forward_inplace_in_out_ { false } ; <nl> + / / whether do inplace optimization of out_grad and in_grad0 <nl> + bool unary_backward_inplace_out_in_ { false } ; <nl> + / / mmmmmm binary functions mmm - - <nl> + / / binary shape inference information . <nl> + BinaryShapeFunction binary_shape_ { nullptr } ; <nl> + / / unary functions on each device mask <nl> + std : : vector < BinaryFunction > fbinary_ ; <nl> + / / type 1 gradient function <nl> + std : : vector < BinaryGradFunctionT0 > fbinary_grad_t0_ ; <nl> + / / type 2 gradient function <nl> + std : : vector < BinaryGradFunctionT1 > fbinary_grad_t1_ ; <nl> + / / whether do inplace optimization of in 0 and output <nl> + bool binary_forward_inplace_lhs_out_ { false } ; <nl> + / / whether do inplace optimization of out_grad and in_grad0 <nl> + bool binary_backward_inplace_out_lhs_ { false } ; <nl> + <nl> + template < typename TFunction > <nl> + inline void SetFunction ( std : : vector < TFunction > * vfunc , <nl> + int dev_mask , <nl> + TFunction func , <nl> + const char * type ) { <nl> + if ( vfunc - > size ( ) < = static_cast < size_t > ( dev_mask ) ) { <nl> + vfunc - > resize ( dev_mask + 1 , nullptr ) ; <nl> + } <nl> + if ( vfunc - > at ( dev_mask ) ! = nullptr ) { <nl> + LOG ( FATAL ) < < " Device " < < type < < " function " < < this - > name <nl> + < < " already registerd for device " < < dev_mask ; <nl> + } <nl> + vfunc - > at ( dev_mask ) = func ; <nl> + } <nl> + <nl> + private : <nl> + / / internal reference to NDArray registry <nl> + NDArrayFunctionReg * ndarray_reg_ { nullptr } ; <nl> + / / internal reference to operator registry <nl> + OperatorPropertyReg * op_reg_ { nullptr } ; <nl> + / / internal function to register NDArray function . <nl> + inline NDArrayFunctionReg & NDArrayReg ( ) { <nl> + if ( ndarray_reg_ = = nullptr ) { <nl> + NDArrayFunctionReg & reg = <nl> + : : dmlc : : Registry < NDArrayFunctionReg > : : Get ( ) - > __REGISTER__ ( this - > name ) ; <nl> + ndarray_reg_ = & reg ; <nl> + } <nl> + return * ndarray_reg_ ; <nl> + } <nl> + / / internal function to register NDArray function . <nl> + inline OperatorPropertyReg & OpReg ( ) { <nl> + if ( op_reg_ = = nullptr ) { <nl> + if ( symbol_name_ . length ( ) = = 0 ) { <nl> + symbol_name_ = this - > name ; <nl> + } <nl> + OperatorPropertyReg & reg = <nl> + : : dmlc : : Registry < OperatorPropertyReg > : : Get ( ) - > __REGISTER__ ( symbol_name_ ) ; <nl> + op_reg_ = & reg ; <nl> + } <nl> + return * op_reg_ ; <nl> + } <nl> + / / register unary function . <nl> + void RegisterUnaryImperative ( ) ; <nl> + / / register unary symbolic function . <nl> + void RegisterUnarySymbolic ( ) ; <nl> + / / register unary function . <nl> + void RegisterBinaryImperative ( ) ; <nl> + / / register unary symbolic function . <nl> + void RegisterBinarySymbolic ( ) ; <nl> + } ; <nl> + <nl> + SimpleOpRegEntry & SimpleOpRegistry : : __REGISTER_OR_FIND__ ( const std : : string & name ) { <nl> + if ( fmap_ . count ( name ) ! = 0 ) return * fmap_ . at ( name ) ; <nl> + SimpleOpRegEntry * e = new SimpleOpRegEntryImpl ( ) ; <nl> + e - > name = name ; <nl> + fmap_ [ name ] = e ; <nl> + return * e ; <nl> + } <nl> + <nl> + SimpleOpRegistry * SimpleOpRegistry : : Get ( ) { <nl> + static SimpleOpRegistry inst ; <nl> + return & inst ; <nl> + } <nl> + <nl> + SimpleOpRegistry : : ~ SimpleOpRegistry ( ) { <nl> + for ( auto kv : fmap_ ) { <nl> + delete kv . second ; <nl> + } <nl> + } <nl> + / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - <nl> + / / unary function Implementation <nl> + / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - <nl> + void SimpleOpRegEntryImpl : : RegisterUnaryImperative ( ) { <nl> + CHECK_EQ ( reg_counter_ , 1 ) ; <nl> + / / The body to be registered <nl> + auto body = [ this ] ( NDArray * * used_vars , <nl> + real_t * s , <nl> + NDArray * * mutate_vars , <nl> + int num_params , <nl> + char * * param_keys , <nl> + char * * param_vals ) { <nl> + NDArray & src = * used_vars [ 0 ] ; <nl> + NDArray * out = mutate_vars [ 0 ] ; <nl> + / / setup env . <nl> + EnvArguments env ; <nl> + if ( enable_scalar_ ) env . scalar = s [ 0 ] ; <nl> + if ( enable_kwargs_ ) { <nl> + for ( int i = 0 ; i < num_params ; + + i ) { <nl> + env . kwargs . emplace_back ( std : : make_pair ( <nl> + std : : string ( param_keys [ i ] ) , std : : string ( param_vals [ i ] ) ) ) ; <nl> + } <nl> + } else { <nl> + CHECK_EQ ( num_params , 0 ) <nl> + < < " operator " < < this - > name < < " do not take keyword arguments " ; <nl> + } <nl> + / / shape inference . <nl> + TShape dshape ; <nl> + if ( unary_shape_ ! = nullptr ) { <nl> + dshape = unary_shape_ ( src . shape ( ) , env ) ; <nl> + } else { <nl> + dshape = src . shape ( ) ; <nl> + } <nl> + / / check output shape . <nl> + if ( out - > is_none ( ) ) { <nl> + * out = NDArray ( dshape , src . ctx ( ) , true , src . dtype ( ) ) ; <nl> + } else { <nl> + CHECK ( out - > ctx ( ) = = src . ctx ( ) ) < < " target context mismatch " ; <nl> + CHECK ( out - > dtype ( ) = = src . dtype ( ) ) < < " target data type mismatch " ; <nl> + CHECK ( out - > shape ( ) = = dshape ) < < " target shape mismatch " <nl> + < < out - > shape ( ) < < " vs . " < < dshape ; <nl> + } <nl> + / / important : callback must always capture by value <nl> + NDArray ret = * out ; <nl> + / / get the const variables <nl> + std : : vector < Engine : : VarHandle > const_vars ; <nl> + if ( src . var ( ) ! = ret . var ( ) ) { <nl> + const_vars . push_back ( src . var ( ) ) ; <nl> + } <nl> + / / check if the function exist <nl> + int dev_mask = src . ctx ( ) . dev_mask ( ) ; <nl> + / / error message <nl> + if ( static_cast < size_t > ( dev_mask ) > = funary_ . size ( ) | | <nl> + funary_ [ dev_mask ] = = nullptr ) { <nl> + if ( dev_mask = = gpu : : kDevMask ) { <nl> + LOG ( FATAL ) < < MXNET_GPU_NOT_ENABLED_ERROR ; <nl> + } <nl> + LOG ( FATAL ) < < " Function " < < this - > name <nl> + < < " not registered for device " < < dev_mask ; <nl> + } <nl> + / / invoke the function <nl> + UnaryFunction fun = funary_ [ dev_mask ] ; <nl> + OpReqType req = kWriteTo ; <nl> + if ( src . var ( ) = = ret . var ( ) ) { <nl> + req = kWriteInplace ; <nl> + CHECK ( unary_forward_inplace_in_out_ ) <nl> + < < " inplace operation is not enabled for operator " < < name ; <nl> + } <nl> + <nl> + Engine : : Get ( ) - > PushSync ( [ src , ret , fun , dev_mask , req , env ] ( RunContext ctx ) { <nl> + ret . CheckAndAlloc ( ) ; <nl> + TBlob tmp = ret . data ( ) ; <nl> + ( * fun ) ( src . data ( ) , env , & tmp , req , ctx ) ; <nl> + # if MXNET_USE_CUDA <nl> + if ( dev_mask = = gpu : : kDevMask ) { <nl> + ctx . get_stream < gpu > ( ) - > Wait ( ) ; <nl> + } <nl> + # endif <nl> + } , src . ctx ( ) , const_vars , { ret . var ( ) } ) ; <nl> + } ; <nl> + / / register the function . <nl> + NDArrayReg ( ) <nl> + . set_body ( body ) <nl> + . set_num_use_vars ( 1 ) <nl> + . set_num_mutate_vars ( 1 ) ; <nl> + if ( enable_scalar_ ) { <nl> + if ( scalar_type_mask_ = = kArrayBeforeScalar ) { <nl> + NDArrayReg ( ) <nl> + . set_num_scalars ( 1 ) <nl> + . set_type_mask ( kNDArrayArgBeforeScalar | kAcceptEmptyMutateTarget ) <nl> + . add_argument ( " src " , " NDArray " , " Source input to the function " ) <nl> + . add_argument ( " scalar " , " float " , " scalar input to the function " ) ; <nl> + } else { <nl> + NDArrayReg ( ) <nl> + . set_num_scalars ( 1 ) <nl> + . set_type_mask ( kScalarArgBeforeNDArray | kAcceptEmptyMutateTarget ) <nl> + . add_argument ( " scalar " , " float " , " scalar input to the function " ) <nl> + . add_argument ( " src " , " NDArray " , " Source input to the function " ) ; <nl> + } <nl> + } else { <nl> + NDArrayReg ( ) <nl> + . set_type_mask ( kNDArrayArgBeforeScalar | kAcceptEmptyMutateTarget ) <nl> + . add_argument ( " src " , " NDArray " , " Source input to the function " ) ; <nl> + } <nl> + } <nl> + <nl> + / / operator to invoke unary function . <nl> + struct SimpleUnaryOperator : public Operator { <nl> + EnvArguments env ; <nl> + UnaryFunction forward ; <nl> + UnaryGradFunctionT0 backward0 { nullptr } ; <nl> + UnaryGradFunctionT1 backward1 { nullptr } ; <nl> + UnaryGradFunctionT2 backward2 { nullptr } ; <nl> + <nl> + void Forward ( const OpContext & ctx , <nl> + const std : : vector < TBlob > & in_data , <nl> + const std : : vector < OpReqType > & req , <nl> + const std : : vector < TBlob > & out_data , <nl> + const std : : vector < TBlob > & aux_args ) override { <nl> + CHECK_EQ ( in_data . size ( ) , 1 ) ; <nl> + CHECK_EQ ( out_data . size ( ) , 1 ) ; <nl> + TBlob out = out_data [ 0 ] ; <nl> + ( * forward ) ( in_data [ 0 ] , env , & out , req [ 0 ] , ctx . run_ctx ) ; <nl> + } <nl> + <nl> + void Backward ( const OpContext & ctx , <nl> + const std : : vector < TBlob > & out_grad , <nl> + const std : : vector < TBlob > & in_data , <nl> + const std : : vector < TBlob > & out_data , <nl> + const std : : vector < OpReqType > & req , <nl> + const std : : vector < TBlob > & in_grad , <nl> + const std : : vector < TBlob > & aux_args ) override { <nl> + CHECK_EQ ( out_grad . size ( ) , 1 ) ; <nl> + CHECK ( in_data . size ( ) = = 1 & & in_grad . size ( ) = = 1 ) ; <nl> + CHECK_EQ ( req . size ( ) , 1 ) ; <nl> + OutputGrad ograd ; ograd . data = out_grad [ 0 ] ; <nl> + TBlob igrad = in_grad [ 0 ] ; <nl> + <nl> + if ( backward0 ! = nullptr ) { <nl> + ( * backward0 ) ( ograd , env , & igrad , req [ 0 ] , ctx . run_ctx ) ; <nl> + } else if ( backward1 ! = nullptr ) { <nl> + OutputValue out_value ; out_value . data = out_data [ 0 ] ; <nl> + ( * backward1 ) ( ograd , out_value , env , & igrad , req [ 0 ] , ctx . run_ctx ) ; <nl> + } else if ( backward2 ! = nullptr ) { <nl> + Input0 in0 ; in0 . data = in_data [ 0 ] ; <nl> + ( * backward2 ) ( ograd , in0 , env , & igrad , req [ 0 ] , ctx . run_ctx ) ; <nl> + } else { <nl> + LOG ( FATAL ) < < " Backward is not supported " ; <nl> + } <nl> + } <nl> + } ; / / class SimpleUnaryOperator <nl> + <nl> + struct SimpleOpScalarParam : <nl> + public dmlc : : Parameter < SimpleOpScalarParam > { <nl> + float scalar ; <nl> + DMLC_DECLARE_PARAMETER ( SimpleOpScalarParam ) { <nl> + DMLC_DECLARE_FIELD ( scalar ) <nl> + . describe ( " scalar value . " ) ; <nl> + } <nl> + } ; <nl> + <nl> + DMLC_REGISTER_PARAMETER ( SimpleOpScalarParam ) ; <nl> + <nl> + class SimpleOpPropBase : public OperatorProperty { <nl> + public : <nl> + std : : string name ; <nl> + EnvArguments env ; <nl> + SimpleOpRegEntryImpl * source ; <nl> + <nl> + void Init ( const std : : vector < std : : pair < std : : string , std : : string > > & kwargs ) override { <nl> + if ( source - > enable_kwargs_ ) { <nl> + env . kwargs = kwargs ; <nl> + } else if ( source - > enable_scalar_ ) { <nl> + SimpleOpScalarParam param ; <nl> + param . Init ( kwargs ) ; <nl> + env . scalar = param . scalar ; <nl> + } else { <nl> + CHECK_EQ ( kwargs . size ( ) , 0 ) <nl> + < < " Operator " < < source - > symbol_name_ < < " donot accept any keyword arguments " ; <nl> + } <nl> + } <nl> + <nl> + std : : map < std : : string , std : : string > GetParams ( ) const override { <nl> + if ( source - > enable_kwargs_ ) { <nl> + return std : : map < std : : string , std : : string > ( <nl> + env . kwargs . begin ( ) , env . kwargs . end ( ) ) ; <nl> + } else if ( source - > enable_scalar_ ) { <nl> + SimpleOpScalarParam param ; <nl> + param . scalar = env . scalar ; <nl> + return param . __DICT__ ( ) ; <nl> + } else { <nl> + return std : : map < std : : string , std : : string > ( ) ; <nl> + } <nl> + } <nl> + <nl> + std : : string TypeString ( ) const override { <nl> + return name ; <nl> + } <nl> + } ; <nl> + <nl> + class SimpleUnaryOpProp : public SimpleOpPropBase { <nl> + public : <nl> + bool InferShape ( std : : vector < TShape > * in_shape , <nl> + std : : vector < TShape > * out_shape , <nl> + std : : vector < TShape > * aux_shape ) const override { <nl> + using namespace mshadow ; <nl> + CHECK_EQ ( in_shape - > size ( ) , 1 ) < < " Input : [ data ] " ; <nl> + const TShape & dshape = in_shape - > at ( 0 ) ; <nl> + if ( dshape . ndim ( ) = = 0 ) return false ; <nl> + out_shape - > clear ( ) ; <nl> + if ( source - > unary_shape_ = = nullptr ) { <nl> + out_shape - > push_back ( dshape ) ; <nl> + } else { <nl> + out_shape - > push_back ( ( * ( source - > unary_shape_ ) ) ( dshape , env ) ) ; <nl> + } <nl> + return true ; <nl> + } <nl> + <nl> + OperatorProperty * Copy ( ) const override { <nl> + auto ptr = new SimpleUnaryOpProp ( ) ; <nl> + ptr - > source = source ; <nl> + ptr - > name = name ; <nl> + ptr - > env = env ; <nl> + return ptr ; <nl> + } <nl> + <nl> + / / decalre dependency and inplace optimization options <nl> + std : : vector < int > DeclareBackwardDependency ( <nl> + const std : : vector < int > & out_grad , <nl> + const std : : vector < int > & in_data , <nl> + const std : : vector < int > & out_data ) const override { <nl> + if ( source - > funary_grad_t0_ . size ( ) ! = 0 ) { <nl> + return { out_grad [ 0 ] } ; <nl> + } else if ( source - > funary_grad_t1_ . size ( ) ! = 0 ) { <nl> + return { out_grad [ 0 ] , out_data [ 0 ] } ; <nl> + } else if ( source - > funary_grad_t2_ . size ( ) ! = 0 ) { <nl> + return { out_grad [ 0 ] , in_data [ 0 ] } ; <nl> + } else { <nl> + LOG ( FATAL ) < < " Backward of " < < name < < " is not decalred " ; <nl> + return { } ; <nl> + } <nl> + } <nl> + <nl> + std : : vector < std : : pair < int , void * > > BackwardInplaceOption ( <nl> + const std : : vector < int > & out_grad , <nl> + const std : : vector < int > & in_data , <nl> + const std : : vector < int > & out_data , <nl> + const std : : vector < void * > & in_grad ) const override { <nl> + if ( source - > unary_backward_inplace_out_in_ ) { <nl> + return { { out_grad [ 0 ] , in_grad [ 0 ] } } ; <nl> + } else { <nl> + return { } ; <nl> + } <nl> + } <nl> + <nl> + std : : vector < std : : pair < int , void * > > ForwardInplaceOption ( <nl> + const std : : vector < int > & in_data , <nl> + const std : : vector < void * > & out_data ) const override { <nl> + if ( source - > unary_forward_inplace_in_out_ ) { <nl> + return { { in_data [ 0 ] , out_data [ 0 ] } } ; <nl> + } else { <nl> + return { } ; <nl> + } <nl> + } <nl> + <nl> + Operator * CreateOperator ( Context ctx ) const override { <nl> + size_t dev_mask = ctx . dev_mask ( ) ; <nl> + SimpleUnaryOperator * op = new SimpleUnaryOperator ( ) ; <nl> + CHECK ( dev_mask < source - > funary_ . size ( ) & & source - > funary_ [ dev_mask ] ! = nullptr ) ; <nl> + op - > forward = source - > funary_ [ dev_mask ] ; <nl> + op - > env = this - > env ; <nl> + if ( dev_mask < source - > funary_grad_t0_ . size ( ) ) { <nl> + op - > backward0 = source - > funary_grad_t0_ [ dev_mask ] ; <nl> + } <nl> + if ( dev_mask < source - > funary_grad_t1_ . size ( ) ) { <nl> + op - > backward1 = source - > funary_grad_t1_ [ dev_mask ] ; <nl> + } <nl> + if ( dev_mask < source - > funary_grad_t2_ . size ( ) ) { <nl> + op - > backward2 = source - > funary_grad_t2_ [ dev_mask ] ; <nl> + } <nl> + return op ; <nl> + } <nl> + } ; <nl> + <nl> + void SimpleOpRegEntryImpl : : RegisterUnarySymbolic ( ) { <nl> + / / register the operator <nl> + auto op_factory = [ this ] ( ) { <nl> + SimpleUnaryOpProp * prop = new SimpleUnaryOpProp ( ) ; <nl> + prop - > name = this - > symbol_name_ ; <nl> + prop - > source = this ; <nl> + return prop ; <nl> + } ; <nl> + OpReg ( ) <nl> + . set_body ( op_factory ) <nl> + . add_argument ( " lhs " , " Symbol " , " Left symbolic input to the function " ) <nl> + . add_argument ( " rhs " , " Symbol " , " Left symbolic input to the function " ) ; <nl> + } <nl> + <nl> + <nl> + / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - <nl> + / / binary function Implementation <nl> + / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - <nl> + void SimpleOpRegEntryImpl : : RegisterBinaryImperative ( ) { <nl> + CHECK_EQ ( reg_counter_ , 1 ) ; <nl> + / / The body to be registered <nl> + auto body = [ this ] ( NDArray * * used_vars , <nl> + real_t * s , <nl> + NDArray * * mutate_vars , <nl> + int num_params , <nl> + char * * param_keys , <nl> + char * * param_vals ) { <nl> + NDArray & lhs = * used_vars [ 0 ] ; <nl> + NDArray & rhs = * used_vars [ 1 ] ; <nl> + NDArray * out = mutate_vars [ 0 ] ; <nl> + / / setup env . <nl> + EnvArguments env ; <nl> + if ( enable_scalar_ ) env . scalar = s [ 0 ] ; <nl> + if ( enable_kwargs_ ) { <nl> + for ( int i = 0 ; i < num_params ; + + i ) { <nl> + env . kwargs . emplace_back ( std : : make_pair ( <nl> + std : : string ( param_keys [ i ] ) , std : : string ( param_vals [ i ] ) ) ) ; <nl> + } <nl> + } else { <nl> + CHECK_EQ ( num_params , 0 ) <nl> + < < " operator " < < this - > name < < " do not take keyword arguments " ; <nl> + } <nl> + / / shape inference . <nl> + TShape dshape ; <nl> + if ( binary_shape_ ! = nullptr ) { <nl> + dshape = binary_shape_ ( lhs . shape ( ) , rhs . shape ( ) , env ) ; <nl> + } else { <nl> + CHECK_EQ ( lhs . shape ( ) , rhs . shape ( ) ) < < " operands shape mismatch " ; <nl> + dshape = lhs . shape ( ) ; <nl> + } <nl> + CHECK_EQ ( lhs . ctx ( ) , lhs . ctx ( ) ) <nl> + < < " operands context mismatch " < < lhs . shape ( ) < < " vs . " < < rhs . shape ( ) ; <nl> + CHECK_EQ ( lhs . dtype ( ) , lhs . dtype ( ) ) < < " operands type mismatch " ; <nl> + <nl> + / / check output shape . <nl> + if ( out - > is_none ( ) ) { <nl> + * out = NDArray ( dshape , lhs . ctx ( ) , true , lhs . dtype ( ) ) ; <nl> + } else { <nl> + CHECK ( out - > ctx ( ) = = lhs . ctx ( ) ) < < " target context mismatch " ; <nl> + CHECK ( out - > dtype ( ) = = lhs . dtype ( ) ) < < " target data type mismatch " ; <nl> + CHECK ( out - > shape ( ) = = dshape ) < < " target shape mismatch " <nl> + < < out - > shape ( ) < < " vs . " < < dshape ; <nl> + } <nl> + / / important : callback must always capture by value <nl> + NDArray ret = * out ; <nl> + / / get the const variables <nl> + std : : vector < Engine : : VarHandle > const_vars ; <nl> + if ( lhs . var ( ) ! = ret . var ( ) ) const_vars . push_back ( lhs . var ( ) ) ; <nl> + if ( rhs . var ( ) ! = ret . var ( ) ) const_vars . push_back ( rhs . var ( ) ) ; <nl> + <nl> + / / check if the function exist <nl> + int dev_mask = lhs . ctx ( ) . dev_mask ( ) ; <nl> + / / error message <nl> + if ( static_cast < size_t > ( dev_mask ) > = fbinary_ . size ( ) | | <nl> + fbinary_ [ dev_mask ] = = nullptr ) { <nl> + if ( dev_mask = = gpu : : kDevMask ) { <nl> + LOG ( FATAL ) < < MXNET_GPU_NOT_ENABLED_ERROR ; <nl> + } <nl> + LOG ( FATAL ) < < " Function " < < this - > name <nl> + < < " not registered for device " < < dev_mask ; <nl> + } <nl> + / / invoke the function <nl> + BinaryFunction fun = fbinary_ [ dev_mask ] ; <nl> + OpReqType req = kWriteTo ; <nl> + if ( lhs . var ( ) = = ret . var ( ) ) { <nl> + req = kWriteInplace ; <nl> + CHECK ( binary_forward_inplace_lhs_out_ ) <nl> + < < " inplace operation is not enabled for operator " < < name ; <nl> + } <nl> + if ( rhs . var ( ) = = ret . var ( ) ) { <nl> + LOG ( ERROR ) < < " operation " < < this - > name <nl> + < < " warning , perform inplace operation with right operand , may not be supported " ; <nl> + } <nl> + <nl> + Engine : : Get ( ) - > PushSync ( [ lhs , rhs , ret , fun , dev_mask , req , env ] ( RunContext ctx ) { <nl> + ret . CheckAndAlloc ( ) ; <nl> + TBlob tmp = ret . data ( ) ; <nl> + ( * fun ) ( lhs . data ( ) , rhs . data ( ) , env , & tmp , req , ctx ) ; <nl> + # if MXNET_USE_CUDA <nl> + if ( dev_mask = = gpu : : kDevMask ) { <nl> + ctx . get_stream < gpu > ( ) - > Wait ( ) ; <nl> + } <nl> + # endif <nl> + } , lhs . ctx ( ) , const_vars , { ret . var ( ) } ) ; <nl> + } ; <nl> + / / register the function . <nl> + NDArrayReg ( ) <nl> + . set_body ( body ) <nl> + . set_num_use_vars ( 2 ) <nl> + . set_num_mutate_vars ( 1 ) ; <nl> + if ( enable_scalar_ ) { <nl> + if ( scalar_type_mask_ = = kArrayBeforeScalar ) { <nl> + NDArrayReg ( ) <nl> + . set_num_scalars ( 1 ) <nl> + . set_type_mask ( kNDArrayArgBeforeScalar | kAcceptEmptyMutateTarget ) <nl> + . add_argument ( " lhs " , " NDArray " , " Left operand to the function " ) <nl> + . add_argument ( " rhs " , " NDArray " , " Right operand to the function " ) <nl> + . add_argument ( " scalar " , " float " , " scalar input to the function " ) ; <nl> + } else { <nl> + NDArrayReg ( ) <nl> + . set_num_scalars ( 1 ) <nl> + . set_type_mask ( kScalarArgBeforeNDArray | kAcceptEmptyMutateTarget ) <nl> + . add_argument ( " scalar " , " float " , " scalar input to the function " ) <nl> + . add_argument ( " src " , " NDArray " , " Source input to the function " ) <nl> + . add_argument ( " lhs " , " NDArray " , " Left operand to the function " ) <nl> + . add_argument ( " rhs " , " NDArray " , " Right operand to the function " ) ; <nl> + } <nl> + } else { <nl> + NDArrayReg ( ) <nl> + . set_type_mask ( kNDArrayArgBeforeScalar | kAcceptEmptyMutateTarget ) <nl> + . add_argument ( " lhs " , " NDArray " , " Left operand to the function " ) <nl> + . add_argument ( " rhs " , " NDArray " , " Right operand to the function " ) ; <nl> + } <nl> + } <nl> + <nl> + <nl> + struct SimpleBinaryOperator : public Operator { <nl> + EnvArguments env ; <nl> + BinaryFunction forward ; <nl> + BinaryGradFunctionT0 backward0 { nullptr } ; <nl> + BinaryGradFunctionT1 backward1 { nullptr } ; <nl> + <nl> + void Forward ( const OpContext & ctx , <nl> + const std : : vector < TBlob > & in_data , <nl> + const std : : vector < OpReqType > & req , <nl> + const std : : vector < TBlob > & out_data , <nl> + const std : : vector < TBlob > & aux_args ) override { <nl> + CHECK_EQ ( in_data . size ( ) , 2 ) ; <nl> + CHECK_EQ ( out_data . size ( ) , 1 ) ; <nl> + TBlob out = out_data [ 0 ] ; <nl> + ( * forward ) ( in_data [ 0 ] , in_data [ 1 ] , env , & out , req [ 0 ] , ctx . run_ctx ) ; <nl> + } <nl> + <nl> + void Backward ( const OpContext & ctx , <nl> + const std : : vector < TBlob > & out_grad , <nl> + const std : : vector < TBlob > & in_data , <nl> + const std : : vector < TBlob > & out_data , <nl> + const std : : vector < OpReqType > & req , <nl> + const std : : vector < TBlob > & in_grad , <nl> + const std : : vector < TBlob > & aux_args ) override { <nl> + CHECK_EQ ( out_grad . size ( ) , 1 ) ; <nl> + CHECK ( in_data . size ( ) = = 2 & & in_grad . size ( ) = = 2 ) ; <nl> + CHECK_EQ ( req . size ( ) , 2 ) ; <nl> + OutputGrad ograd ; ograd . data = out_grad [ 0 ] ; <nl> + TBlob lgrad = in_grad [ 0 ] ; <nl> + TBlob rgrad = in_grad [ 1 ] ; <nl> + <nl> + if ( backward0 ! = nullptr ) { <nl> + ( * backward0 ) ( ograd , env , <nl> + & lgrad , & rgrad , req [ 0 ] , req [ 1 ] , ctx . run_ctx ) ; <nl> + } else if ( backward1 ! = nullptr ) { <nl> + Input0 in0 ; in0 . data = in_data [ 0 ] ; <nl> + Input1 in1 ; in1 . data = in_data [ 1 ] ; <nl> + ( * backward1 ) ( ograd , in0 , in1 , env , <nl> + & lgrad , & rgrad , req [ 0 ] , req [ 1 ] , ctx . run_ctx ) ; <nl> + } else { <nl> + LOG ( FATAL ) < < " Backward is not supported " ; <nl> + } <nl> + } <nl> + } ; / / class SimpleBinaryOperator <nl> + <nl> + class SimpleBinaryOpProp : public SimpleOpPropBase { <nl> + public : <nl> + bool InferShape ( std : : vector < TShape > * in_shape , <nl> + std : : vector < TShape > * out_shape , <nl> + std : : vector < TShape > * aux_shape ) const override { <nl> + using namespace mshadow ; <nl> + CHECK_EQ ( in_shape - > size ( ) , 2 ) < < " Input : [ lhs , rhs ] " ; <nl> + const TShape & lshape = in_shape - > at ( 0 ) ; <nl> + const TShape & rshape = in_shape - > at ( 1 ) ; <nl> + out_shape - > clear ( ) ; <nl> + if ( source - > binary_shape_ = = nullptr ) { <nl> + if ( in_shape - > at ( 0 ) . ndim ( ) ! = 0 ) { <nl> + SHAPE_ASSIGN_CHECK ( * in_shape , 1 , in_shape - > at ( 0 ) ) ; <nl> + } else if ( in_shape - > at ( 1 ) . ndim ( ) ! = 0 ) { <nl> + in_shape - > at ( 0 ) = in_shape - > at ( 1 ) ; <nl> + } else { <nl> + return false ; <nl> + } <nl> + out_shape - > push_back ( lshape ) ; <nl> + } else { <nl> + if ( lshape . ndim ( ) = = 0 ) return false ; <nl> + if ( rshape . ndim ( ) = = 0 ) return false ; <nl> + out_shape - > push_back ( ( * ( source - > binary_shape_ ) ) ( lshape , rshape , env ) ) ; <nl> + } <nl> + return true ; <nl> + } <nl> + <nl> + std : : vector < std : : string > ListArguments ( ) const override { <nl> + return { " lhs " , " rhs " } ; <nl> + } <nl> + <nl> + OperatorProperty * Copy ( ) const override { <nl> + auto ptr = new SimpleBinaryOpProp ( ) ; <nl> + ptr - > source = source ; <nl> + ptr - > name = name ; <nl> + ptr - > env = env ; <nl> + return ptr ; <nl> + } <nl> + <nl> + / / decalre dependency and inplace optimization options <nl> + std : : vector < int > DeclareBackwardDependency ( <nl> + const std : : vector < int > & out_grad , <nl> + const std : : vector < int > & in_data , <nl> + const std : : vector < int > & out_data ) const override { <nl> + if ( source - > fbinary_grad_t0_ . size ( ) ! = 0 ) { <nl> + return { out_grad [ 0 ] } ; <nl> + } else if ( source - > fbinary_grad_t1_ . size ( ) ! = 0 ) { <nl> + return { out_grad [ 0 ] , in_data [ 0 ] , in_data [ 1 ] } ; <nl> + } else { <nl> + LOG ( FATAL ) < < " Backward of " < < name < < " is not decalred " ; <nl> + return { } ; <nl> + } <nl> + } <nl> + <nl> + std : : vector < std : : pair < int , void * > > BackwardInplaceOption ( <nl> + const std : : vector < int > & out_grad , <nl> + const std : : vector < int > & in_data , <nl> + const std : : vector < int > & out_data , <nl> + const std : : vector < void * > & in_grad ) const override { <nl> + if ( source - > binary_backward_inplace_out_lhs_ ) { <nl> + return { { out_grad [ 0 ] , in_grad [ 0 ] } } ; <nl> + } else { <nl> + return { } ; <nl> + } <nl> + } <nl> + <nl> + std : : vector < std : : pair < int , void * > > ForwardInplaceOption ( <nl> + const std : : vector < int > & in_data , <nl> + const std : : vector < void * > & out_data ) const override { <nl> + if ( source - > binary_forward_inplace_lhs_out_ ) { <nl> + return { { in_data [ 0 ] , out_data [ 0 ] } } ; <nl> + } else { <nl> + return { } ; <nl> + } <nl> + } <nl> + <nl> + Operator * CreateOperator ( Context ctx ) const override { <nl> + size_t dev_mask = ctx . dev_mask ( ) ; <nl> + SimpleBinaryOperator * op = new SimpleBinaryOperator ( ) ; <nl> + CHECK ( dev_mask < source - > fbinary_ . size ( ) & & source - > fbinary_ [ dev_mask ] ! = nullptr ) ; <nl> + op - > forward = source - > fbinary_ [ dev_mask ] ; <nl> + op - > env = this - > env ; <nl> + if ( dev_mask < source - > fbinary_grad_t0_ . size ( ) ) { <nl> + op - > backward0 = source - > fbinary_grad_t0_ [ dev_mask ] ; <nl> + } <nl> + if ( dev_mask < source - > fbinary_grad_t1_ . size ( ) ) { <nl> + op - > backward1 = source - > fbinary_grad_t1_ [ dev_mask ] ; <nl> + } <nl> + return op ; <nl> + } <nl> + } ; <nl> + <nl> + void SimpleOpRegEntryImpl : : RegisterBinarySymbolic ( ) { <nl> + / / register the operator <nl> + auto op_factory = [ this ] ( ) { <nl> + SimpleBinaryOpProp * prop = new SimpleBinaryOpProp ( ) ; <nl> + prop - > name = symbol_name_ ; <nl> + prop - > source = this ; <nl> + return prop ; <nl> + } ; <nl> + OpReg ( ) <nl> + . set_body ( op_factory ) <nl> + . add_argument ( " lhs " , " Symbol " , " Left symbolic input to the function " ) <nl> + . add_argument ( " rhs " , " Symbol " , " Left symbolic input to the function " ) ; <nl> + } <nl> + <nl> + } / / namespace op <nl> + } / / namespace mxnet <nl> mmm a / src / operator / slice_channel - inl . h <nl> ppp b / src / operator / slice_channel - inl . h <nl> enum SliceChannelOpOutputs { kOut0 , kOut1 , kOut2 , kOut3 , kOut4 } ; <nl> struct SliceChannelParam : public dmlc : : Parameter < SliceChannelParam > { <nl> int num_outputs ; <nl> int axis ; <nl> + bool squeeze_axis ; <nl> DMLC_DECLARE_PARAMETER ( SliceChannelParam ) { <nl> DMLC_DECLARE_FIELD ( num_outputs ) . set_lower_bound ( 1 ) <nl> . describe ( " Number of outputs to be sliced . " ) ; <nl> DMLC_DECLARE_FIELD ( axis ) . set_default ( 1 ) <nl> . describe ( " Dimension along which to slice . " ) ; <nl> + DMLC_DECLARE_FIELD ( squeeze_axis ) . set_default ( 0 ) <nl> + . describe ( " If true AND the sliced dimension becomes 1 , squeeze that dimension . " ) ; <nl> } <nl> } ; / / struct SliceChannelParam <nl> <nl> class SliceChannelProp : public OperatorProperty { <nl> < < " ) does not divide input dimension " <nl> < < param_ . axis < < " ( " < < dshape [ param_ . axis ] < < " ) . " ; <nl> dshape [ param_ . axis ] / = param_ . num_outputs ; <nl> + if ( param_ . squeeze_axis & & dshape [ param_ . axis ] = = 1 ) { <nl> + for ( int d = param_ . axis ; d < dshape . ndim ( ) - 1 ; + + d ) { <nl> + dshape [ d ] = dshape [ d + 1 ] ; <nl> + } <nl> + dshape = TShape ( & dshape [ 0 ] , & dshape [ dshape . ndim ( ) - 1 ] ) ; <nl> + } <nl> out_shape - > clear ( ) ; <nl> for ( int i = 0 ; i < param_ . num_outputs ; + + i ) { <nl> out_shape - > push_back ( dshape ) ; <nl> mmm a / src / optimizer / sgd - inl . h <nl> ppp b / src / optimizer / sgd - inl . h <nl> void sgd_mom_update ( RunContext ctx , TBlob weight , const TBlob grad , TBlob mom , <nl> Tensor < xpu , 2 > weight2d = weight . FlatTo2D < xpu , real_t > ( s ) ; <nl> Tensor < xpu , 2 > mom2d = mom . FlatTo2D < xpu , real_t > ( s ) ; <nl> Tensor < xpu , 2 > grad2d = grad . FlatTo2D < xpu , real_t > ( s ) ; <nl> - if ( param . clip_gradient > = 0 . 0f ) { <nl> + if ( param . clip_gradient > 0 . 0f ) { <nl> mom2d = param . momentum * mom2d - <nl> lr * ( param . rescale_grad * F < sgd_clip > ( grad2d , param . clip_gradient ) + wd * weight2d ) ; <nl> } else { <nl> mmm a / src / symbol / static_graph . cc <nl> ppp b / src / symbol / static_graph . cc <nl> StaticGraph : : Node StaticGraph : : CreateGradSumNode ( <nl> if ( grad_source . size ( ) < inplace_sum_cap ) { <nl> gsource = grad_source ; <nl> } else { <nl> - LOG ( INFO ) < < " Memory efficient gradient aggregation on . . . " <nl> - < < " to disable , set MXNET_EXEC_INPLACE_GRAD_SUM_CAP to big number " ; <nl> for ( size_t i = 1 ; i < grad_source . size ( ) ; + + i ) { <nl> nodes [ grad_source [ i ] . source_id ] <nl> . addto_index . push_back ( grad_source [ i ] . index ) ; <nl> mmm a / tests / nightly / dist_lenet . py <nl> ppp b / tests / nightly / dist_lenet . py <nl> <nl> + # ! / usr / bin / env python <nl> + # distributed lenet <nl> import os , sys <nl> curr_path = os . path . abspath ( os . path . dirname ( __file__ ) ) <nl> sys . path . append ( os . path . join ( curr_path , " . . / . . / example / image - classification " ) ) <nl> new file mode 100644 <nl> index 00000000000 . . 1fb2dfa6377 <nl> mmm / dev / null <nl> ppp b / tests / nightly / multi_lenet . py <nl> <nl> + # ! / usr / bin / env python <nl> + # lenet with multiple gpus <nl> + # <nl> + # using different kvstore will get almost identical results <nl> + # <nl> + # must disable CUDNN , which results randomness <nl> + # <nl> + # where the gradients are aggregated and the weights are updated results <nl> + # different results , it might be gpu ' s precision is much lower than <nl> + # cpu . however , the results should be still identical if not too many iterations <nl> + # are performed , which can be controlled by either increasing the batch size or <nl> + # decreasing the number of epochs <nl> + <nl> + import os , sys <nl> + curr_path = os . path . abspath ( os . path . dirname ( __file__ ) ) <nl> + sys . path . append ( os . path . join ( curr_path , " . . / . . / example / image - classification " ) ) <nl> + sys . path . append ( os . path . join ( curr_path , " . . / . . / python " ) ) <nl> + import mxnet as mx <nl> + import numpy as np <nl> + import logging <nl> + import logging <nl> + import train_mnist <nl> + <nl> + # number of gpus <nl> + ngpus = 4 <nl> + # the batch size <nl> + batch_size = 200 <nl> + <nl> + def mnist ( batch_size , input_shape ) : <nl> + " " " return mnist iters without randomness " " " <nl> + flat = len ( input_shape ) = = 1 <nl> + train = mx . io . MNISTIter ( <nl> + image = " data / mnist / train - images - idx3 - ubyte " , <nl> + label = " data / mnist / train - labels - idx1 - ubyte " , <nl> + data_shape = input_shape , <nl> + batch_size = batch_size , <nl> + shuffle = False , <nl> + flat = flat , <nl> + silent = True ) <nl> + val = mx . io . MNISTIter ( <nl> + image = " data / mnist / t10k - images - idx3 - ubyte " , <nl> + label = " data / mnist / t10k - labels - idx1 - ubyte " , <nl> + data_shape = input_shape , <nl> + batch_size = batch_size , <nl> + shuffle = False , <nl> + flat = flat , <nl> + silent = True ) <nl> + return ( train , val ) <nl> + <nl> + def accuracy ( model , data ) : <nl> + " " " evaluate acc " " " <nl> + data . reset ( ) <nl> + prob = model . predict ( data ) <nl> + py = np . argmax ( prob , axis = 1 ) <nl> + # get label <nl> + data . reset ( ) <nl> + y = np . concatenate ( [ d . label [ 0 ] . asnumpy ( ) for d in data ] ) . astype ( ' int ' ) <nl> + y = y [ 0 : len ( py ) ] <nl> + acc = float ( np . sum ( py = = y ) ) / len ( y ) <nl> + logging . info ( ' Accuracy = % f ' , acc ) <nl> + return acc <nl> + <nl> + def get_XY ( data_iter ) : <nl> + data_iter . reset ( ) <nl> + Y = np . concatenate ( [ d . label [ 0 ] . asnumpy ( ) for d in data_iter ] ) <nl> + data_iter . reset ( ) <nl> + X = np . concatenate ( [ d . data [ 0 ] . asnumpy ( ) for d in data_iter ] ) <nl> + assert X . shape [ 0 ] = = Y . shape [ 0 ] <nl> + return ( X , Y ) <nl> + <nl> + def test_data ( data_iter ) : <nl> + # test whether we will get the identical data each time <nl> + X , Y = get_XY ( data_iter ) <nl> + print X . shape , Y . shape <nl> + for i in range ( 4 ) : <nl> + A , B = get_XY ( data_iter ) <nl> + assert ( A . shape = = X . shape ) <nl> + assert ( B . shape = = Y . shape ) <nl> + assert ( np . sum ( A ! = X ) = = 0 ) <nl> + assert ( np . sum ( B ! = Y ) = = 0 ) <nl> + <nl> + # must use the same net , since the system will automatically assign namees to <nl> + # layers , which affects the order of the weight initialization <nl> + net = train_mnist . get_lenet ( ) <nl> + <nl> + def test_lenet ( devs , kv_type ) : <nl> + logging . basicConfig ( level = logging . DEBUG ) <nl> + ( train , val ) = mnist ( batch_size = batch_size , input_shape = ( 1 , 28 , 28 ) ) <nl> + # guarantee the same weight init for each run <nl> + mx . random . seed ( 0 ) <nl> + model = mx . model . FeedForward ( <nl> + ctx = devs , <nl> + symbol = net , <nl> + num_epoch = 2 , <nl> + learning_rate = 0 . 1 , <nl> + momentum = 0 . 9 , <nl> + wd = 0 . 00001 ) <nl> + model . fit ( <nl> + kvstore = kv_type , <nl> + X = train ) <nl> + return accuracy ( model , val ) <nl> + <nl> + <nl> + if __name__ = = " __main__ " : <nl> + # test data <nl> + ( train , val ) = mnist ( batch_size = 100 , input_shape = ( 1 , 28 , 28 ) ) <nl> + test_data ( train ) <nl> + test_data ( val ) <nl> + <nl> + ( train , val ) = mnist ( batch_size = 110 , input_shape = ( 784 , ) ) <nl> + test_data ( train ) <nl> + test_data ( val ) <nl> + <nl> + # test model <nl> + gpus = [ mx . gpu ( i ) for i in range ( ngpus ) ] <nl> + <nl> + base = test_lenet ( mx . gpu ( ) , ' none ' ) <nl> + acc1 = test_lenet ( mx . gpu ( ) , ' none ' ) <nl> + acc2 = test_lenet ( gpus , ' local_update_cpu ' ) <nl> + acc3 = test_lenet ( gpus , ' local_allreduce_cpu ' ) <nl> + acc4 = test_lenet ( gpus , ' local_allreduce_device ' ) <nl> + <nl> + assert base > 0 . 95 <nl> + assert abs ( base - acc1 ) < 1e - 4 <nl> + assert abs ( base - acc2 ) < 1e - 3 <nl> + assert abs ( base - acc3 ) < 1e - 3 <nl> + assert abs ( acc3 - acc4 ) < 1e - 4 <nl> mmm a / tests / nightly / test_all . sh <nl> ppp b / tests / nightly / test_all . sh <nl> gpus = ` seq 0 $ ( ( num_gpus - 1 ) ) | paste - sd " , " ` <nl> <nl> # build <nl> build ( ) { <nl> + make - C . . / . . clean <nl> + make - C . . / . . - j8 <nl> + return $ ? <nl> + } <nl> + <nl> cp . . / . . / make / config . mk . . / . . <nl> cat > > . . / . . / config . mk < < EOF <nl> USE_CUDA = 1 <nl> USE_CUDA_PATH = / usr / local / cuda <nl> USE_CUDNN = 1 <nl> USE_DIST_KVSTORE = 1 <nl> EOF <nl> - make - C . . / . . clean <nl> - make - C . . / . . - j8 <nl> - return $ ? <nl> - } <nl> + <nl> juLog - name = Build - error = Error build <nl> <nl> + # python : local kvstore <nl> + juLog - name = Python . Local . KVStore - error = Error python test_kvstore . py <nl> + <nl> + # python : distributed kvstore <nl> + juLog - name = Python . Distributed . KVStore - error = Error . . / . . / tools / launch . py - n 4 python dist_sync_kvstore . py <nl> + <nl> # download data <nl> juLog - name = DownloadData bash . / download . sh <nl> <nl> check_val ( ) { <nl> rm - f log <nl> } <nl> <nl> - # python : distributed lenet + mnist <nl> - juLog - name = Python . Distributed . KVStore - error = Error . . / . . / tools / launch . py - n 4 python dist_sync_kvstore . py <nl> <nl> example_dir = . . / . . / example / image - classification <nl> # python : lenet + mnist <nl> test_inception_cifar10 ( ) { <nl> } <nl> juLog - name = Python . Inception . Cifar10 - error = Fail test_inception_cifar10 <nl> <nl> + # build without CUDNN <nl> + cat > > . . / . . / config . mk < < EOF <nl> + USE_CUDNN = 0 <nl> + EOF <nl> + juLog - name = BuildWithoutCUDNN - error = Error build <nl> + <nl> + # python : multi gpus lenet + mnist <nl> + juLog - name = Python . Multi . Lenet . Mnist - error = Error python multi_lenet . py <nl> + <nl> exit $ errors <nl> new file mode 100644 <nl> index 00000000000 . . 2a670616037 <nl> mmm / dev / null <nl> ppp b / tests / nightly / test_kvstore . py <nl> <nl> + # ! / usr / bin / env python <nl> + import sys <nl> + sys . path . insert ( 0 , " . . / . . / python / " ) <nl> + import mxnet as mx <nl> + import numpy as np <nl> + <nl> + keys = [ 3 , 5 , 7 ] <nl> + # let the last shape exceed MXNET_KVSTORE_BIGARRAY_BOUND <nl> + shapes = [ ( 4 , 4 ) , ( 100 , 100 ) , ( 2000 , 2000 ) ] ; <nl> + <nl> + lr = . 1 <nl> + nworker = 4 <nl> + nrepeat = 10 <nl> + <nl> + # # generate data <nl> + data = [ [ [ np . random . random ( s ) * 2 - 1 for i in range ( nworker ) ] for s in shapes ] for j in range ( nrepeat ) ] <nl> + <nl> + # # individual key interface <nl> + def test_kvstore ( kv_type ) : <nl> + print kv_type <nl> + kv = mx . kv . create ( kv_type ) <nl> + kv . set_optimizer ( mx . optimizer . create ( ' test ' , lr ) ) <nl> + for k , s in zip ( keys , shapes ) : <nl> + kv . init ( k , mx . nd . zeros ( s ) ) <nl> + <nl> + res = [ np . zeros ( s ) for s in shapes ] <nl> + for i in range ( nrepeat ) : <nl> + for j in range ( len ( keys ) ) : <nl> + kv . push ( keys [ j ] , [ mx . nd . array ( <nl> + data [ i ] [ j ] [ g ] , mx . gpu ( g ) ) for g in range ( nworker ) ] ) <nl> + <nl> + res = [ a + b * lr for a , b in zip ( res , [ sum ( d ) for d in data [ i ] ] ) ] <nl> + for j in range ( len ( keys ) ) : <nl> + out = [ mx . nd . zeros ( shapes [ j ] , mx . gpu ( g ) ) for g in range ( nworker ) ] <nl> + kv . pull ( keys [ j ] , out = out ) <nl> + err = [ np . sum ( np . abs ( o . asnumpy ( ) - res [ j ] ) ) for o in out ] <nl> + err = sum ( err ) / np . sum ( np . abs ( res [ j ] ) ) <nl> + assert ( err < 1e - 6 ) , ( err , shapes [ j ] ) <nl> + <nl> + test_kvstore ( ' local_update_cpu ' ) <nl> + test_kvstore ( ' local_allreduce_cpu ' ) <nl> + test_kvstore ( ' local_allreduce_device ' ) <nl> + <nl> + # # group keys interface <nl> + def test_group_kvstore ( kv_type ) : <nl> + print kv_type <nl> + kv = mx . kv . create ( kv_type ) <nl> + kv . set_optimizer ( mx . optimizer . create ( ' test ' , lr ) ) <nl> + kv . init ( keys , [ mx . nd . zeros ( s ) for s in shapes ] ) <nl> + res = [ np . zeros ( s ) for s in shapes ] <nl> + out = [ [ mx . nd . zeros ( s , mx . gpu ( g ) ) for g in range ( nworker ) ] for s in shapes ] <nl> + for i in range ( nrepeat ) : <nl> + kv . push ( keys , [ [ <nl> + mx . nd . array ( data [ i ] [ j ] [ g ] , mx . gpu ( g ) ) for g in range ( nworker ) ] <nl> + for j in range ( len ( keys ) ) ] ) <nl> + <nl> + kv . pull ( keys , out = out ) <nl> + res = [ a + b * lr for a , b in zip ( res , [ sum ( d ) for d in data [ i ] ] ) ] <nl> + for a , b in zip ( res , out ) : <nl> + err = [ np . sum ( np . abs ( o . asnumpy ( ) - a ) ) for o in b ] <nl> + err = sum ( err ) / np . sum ( np . abs ( a ) ) <nl> + assert ( err < 1e - 6 ) , ( err , a . shape ) <nl> + <nl> + test_group_kvstore ( ' local_update_cpu ' ) <nl> + test_group_kvstore ( ' local_allreduce_cpu ' ) <nl> + test_group_kvstore ( ' local_allreduce_device ' ) <nl> mmm a / tests / python / unittest / test_executor . py <nl> ppp b / tests / python / unittest / test_executor . py <nl> def reldiff ( a , b ) : <nl> return reldiff <nl> <nl> <nl> - def check_bind_with_uniform ( uf , gf , dim ) : <nl> + def check_bind_with_uniform ( uf , gf , dim , sf = None ) : <nl> " " " check function consistency with uniform random numbers " " " <nl> shape = tuple ( np . random . randint ( 1 , int ( 1000 * * ( 1 . 0 / dim ) ) , size = dim ) ) <nl> lhs = mx . symbol . Variable ( ' lhs ' ) <nl> rhs = mx . symbol . Variable ( ' rhs ' ) <nl> - ret = uf ( lhs , rhs ) <nl> + if sf is not None : <nl> + ret = sf ( lhs , rhs ) <nl> + else : <nl> + ret = uf ( lhs , rhs ) <nl> + <nl> assert ret . list_arguments ( ) = = [ ' lhs ' , ' rhs ' ] <nl> - lhs_arr = mx . nd . array ( np . random . uniform ( - 10 , 10 , shape ) ) <nl> - rhs_arr = mx . nd . array ( np . random . uniform ( - 10 , 10 , shape ) ) <nl> + lhs_arr = mx . nd . array ( np . random . uniform ( - 1 , 1 , shape ) ) <nl> + rhs_arr = mx . nd . array ( np . random . uniform ( - 1 , 1 , shape ) ) <nl> lhs_grad = mx . nd . empty ( shape ) <nl> rhs_grad = mx . nd . empty ( shape ) <nl> - <nl> - <nl> executor = ret . bind ( mx . Context ( ' cpu ' ) , <nl> args = [ lhs_arr , rhs_arr ] , <nl> args_grad = [ lhs_grad , rhs_grad ] ) <nl> def check_bind_with_uniform ( uf , gf , dim ) : <nl> lhs_arr . asnumpy ( ) , <nl> rhs_arr . asnumpy ( ) ) <nl> executor . backward ( [ out_grad ] ) <nl> + <nl> assert reldiff ( lhs_grad . asnumpy ( ) , lhs_grad2 ) < 1e - 6 <nl> assert reldiff ( rhs_grad . asnumpy ( ) , rhs_grad2 ) < 1e - 6 <nl> <nl> def test_bind ( ) : <nl> lambda g , x , y : ( g / y , - x * g / ( y * * 2 ) ) , <nl> dim ) <nl> <nl> + check_bind_with_uniform ( lambda x , y : np . maximum ( x , y ) , <nl> + lambda g , x , y : ( g * ( x > y ) , g * ( y > x ) ) , <nl> + dim , <nl> + sf = mx . symbol . maximum ) <nl> + check_bind_with_uniform ( lambda x , y : np . minimum ( x , y ) , <nl> + lambda g , x , y : ( g * ( x < y ) , g * ( y < x ) ) , <nl> + dim , <nl> + sf = mx . symbol . minimum ) <nl> + <nl> def test_reshape ( ) : <nl> x = mx . sym . Variable ( ' x ' ) <nl> y = mx . sym . FullyConnected ( x , num_hidden = 4 ) <nl> mmm a / tests / python / unittest / test_operator . py <nl> ppp b / tests / python / unittest / test_operator . py <nl> def test_elementwise_sum ( ) : <nl> def check_slice_channel ( dim , num ) : <nl> ins = [ ] <nl> if dim = = 2 : <nl> - shape = ( 2 , 2 ) <nl> + shape = ( 2 , 2 ) <nl> else : <nl> shape = ( 2 , 2 , 2 , 3 ) <nl> ins = [ np . ones ( shape ) * i for i in range ( num ) ] <nl> def check_slice_channel ( dim , num ) : <nl> exe . backward ( o_nd ) <nl> assert reldiff ( grad_nd [ 0 ] . asnumpy ( ) , np . hstack ( [ ins [ i ] + i for i in range ( num ) ] ) ) < 1e - 5 <nl> <nl> + # test slice channel with squeeze_axis <nl> + op = mx . sym . SliceChannel ( data = data , num_outputs = shape [ 1 ] , squeeze_axis = 1 ) <nl> + arg_shape , output_shape , aux_shape = op . infer_shape ( data = shape ) <nl> + assert len ( output_shape ) = = shape [ 1 ] <nl> + for o_shape in output_shape : <nl> + assert len ( o_shape ) = = len ( shape ) - 1 <nl> + assert o_shape = = tuple ( [ shape [ 0 ] ] + list ( shape [ 2 : ] ) ) <nl> + <nl> def check_concat_with_shape ( shapes , dimension , skip_second ) : <nl> # if skip_second is True , second argument will not have gradient . <nl> # it is to test # 1130 <nl> def check_concat_with_shape ( shapes , dimension , skip_second ) : <nl> for name , g in zip ( arg_names , arr_grad ) : <nl> if not skip_second or name ! = ' arg1 ' : <nl> dict_grad [ name ] = g <nl> - <nl> + <nl> args = out . list_arguments ( ) <nl> arg_shapes , out_shapes , aux_shapes = out . infer_shape ( * * dict ( zip ( args , shapes ) ) ) <nl> out_grad = mx . nd . empty ( out_shapes [ 0 ] ) <nl> def test_maximum_minimum ( ) : <nl> data_tmp2 = np . random . rand ( 3 , 4 ) <nl> data_tmp1 [ : ] = 2 <nl> data_tmp2 [ : ] = 3 <nl> - <nl> + <nl> arr_data1 = mx . nd . array ( data_tmp1 ) <nl> arr_data2 = mx . nd . array ( data_tmp2 ) <nl> <nl> - <nl> + <nl> arr_grad1 = mx . nd . empty ( shape ) <nl> arr_grad2 = mx . nd . empty ( shape ) <nl> <nl> def test_maximum_minimum ( ) : <nl> out_grad = mx . nd . empty ( shape ) <nl> out_grad [ : ] = 2 <nl> exe_test . backward ( out_grad ) <nl> - <nl> + <nl> npout_grad = np . ones ( shape ) <nl> npout_grad [ : ] = 2 <nl> mask1 = ( data_tmp1 > data_tmp2 ) . astype ( ' float ' ) <nl> mask2 = ( data_tmp1 < data_tmp2 ) . astype ( ' float ' ) <nl> npout_grad1 = npout_grad * mask1 + npout_grad * mask2 <nl> npout_grad2 = ( npout_grad - npout_grad * mask1 ) + ( npout_grad - npout_grad * mask2 ) <nl> - <nl> + <nl> assert reldiff ( arr_grad1 . asnumpy ( ) , npout_grad1 ) < 1e - 6 <nl> assert reldiff ( arr_grad2 . asnumpy ( ) , npout_grad2 ) < 1e - 6 <nl> <nl> def test_maximum_minimum_scalar ( ) : <nl> shape = ( 3 , 4 ) <nl> data_tmp1 = np . random . rand ( 3 , 4 ) <nl> data_tmp1 [ : ] = 2 <nl> - <nl> + <nl> arr_data1 = mx . nd . array ( data_tmp1 ) <nl> arr_grad1 = mx . nd . empty ( shape ) <nl> <nl> def test_maximum_minimum_scalar ( ) : <nl> out_grad = mx . nd . empty ( shape ) <nl> out_grad [ : ] = 2 <nl> exe_test . backward ( out_grad ) <nl> - <nl> + <nl> npout_grad = np . ones ( shape ) <nl> npout_grad [ : ] = 2 <nl> mask1 = ( data_tmp1 > 3 ) . astype ( ' float ' ) <nl> def test_maximum_minimum_scalar ( ) : <nl> mask3 = ( 5 < data_tmp1 ) . astype ( ' float ' ) <nl> mask4 = ( data_tmp1 < 4 ) . astype ( ' float ' ) <nl> npout_grad1 = npout_grad * mask1 + ( npout_grad - npout_grad * mask2 ) + ( npout_grad - npout_grad * mask3 ) + npout_grad * mask4 <nl> - <nl> + <nl> assert reldiff ( arr_grad1 . asnumpy ( ) , npout_grad1 ) < 1e - 6 <nl> <nl> def test_abs ( ) : <nl> mmm a / tools / launch . py <nl> ppp b / tools / launch . py <nl> def dmlc_opts ( opts ) : <nl> ' - - host - file ' , opts . hostfile , <nl> ' - - sync - dst - dir ' , opts . sync_dst_dir ] <nl> args + = opts . command ; <nl> - <nl> - print args <nl> from dmlc_tracker import opts <nl> dmlc_opts = opts . get_opts ( args ) <nl> return dmlc_opts <nl> def main ( ) : <nl> <nl> args = dmlc_opts ( args ) <nl> <nl> - if args . cluster = = ' local ' or args . host_file is None : <nl> + if args . cluster = = ' local ' or args . host_file is None or args . host_file = = ' None ' : <nl> from dmlc_tracker import local <nl> local . submit ( args ) <nl> elif args . cluster = = ' sge ' : <nl>
Merge remote - tracking branch ' upstream / master '
apache/incubator-mxnet
3cc7cdff3750ef705e5a5ad578c00145ccd418b1
2016-04-18T21:51:34Z
mmm a / bindings / python / cntk / debugging / debug . py <nl> ppp b / bindings / python / cntk / debugging / debug . py <nl> <nl> <nl> Forward after Parameter node with uid = ' Parameter28 ' shape = [ ] ( 2 , ) <nl> [ CNTK forward ] > > > help <nl> - Your input was not understood . Please use <nl> + Commands : <nl> n - execute the next node <nl> n < number > - execute the next < number > nodes <nl> n < lambda > - execute until the lambda expression is True . Examples : <nl> <nl> lambda arg , node : len ( node . shape ) = = 3 <nl> Until the variance of the input exceeds 1 ( np = numpy ) : <nl> lambda arg , node : np . var ( arg ) > 1 <nl> + f - run until forward pass ( like ' n ' when already in forward pass ) <nl> + b - run until backward pass ( like ' n ' when already in backward pass ) <nl> c - run until end <nl> - p - print input <nl> + p - print input ( forward ) or root gradients ( backward ) <nl> d - drop into a pdb shell <nl> q - quit <nl> - <nl> + <nl> + [ CNTK backward ] > > > n <nl> + <nl> + = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = forward = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> + Forward after Parameter node with uid = ' Parameter28 ' shape = [ ] ( 2 , ) <nl> [ CNTK forward ] > > > n <nl> - <nl> Forward after Times node with uid = ' Times29 ' shape = [ * , * ] ( 2 , ) <nl> - [ CNTK forward ] > > > p <nl> - Input : <nl> - [ [ [ 0 . 0 . ] ] <nl> - <nl> - [ [ 0 . 0 . ] ] <nl> + [ CNTK forward ] > > > n <nl> + = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = backward = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> + Backward before Times node with uid = ' Times29 ' shape = [ * , * ] ( 2 , ) <nl> + [ CNTK backward ] > > > p <nl> + State : None <nl> + Root gradients : <nl> + [ [ [ - 0 . 79412955 0 . 79412955 ] ] <nl> <nl> - [ [ 0 . 0 . ] ] <nl> + [ [ - 0 . 79412955 0 . 79412955 ] ] <nl> <nl> - [ [ 0 . 0 . ] ] <nl> + [ [ 0 . 20587046 - 0 . 20587045 ] ] <nl> <nl> - [ [ 0 . 0 . ] ] <nl> + [ [ 0 . 20587046 - 0 . 20587045 ] ] <nl> <nl> - [ [ 0 . 0 . ] ] <nl> + [ [ 0 . 20587046 - 0 . 20587045 ] ] <nl> <nl> - [ [ 0 . 0 . ] ] <nl> + [ [ 0 . 20587046 - 0 . 20587045 ] ] <nl> <nl> - [ [ 0 . 0 . ] ] <nl> + [ [ - 0 . 79412955 0 . 79412955 ] ] <nl> <nl> - [ [ 0 . 0 . ] ] <nl> + [ [ 0 . 20587046 - 0 . 20587045 ] ] <nl> <nl> - [ [ 0 . 0 . ] ] ] <nl> - [ CNTK forward ] > > > n <nl> + [ [ 0 . 20587039 - 0 . 20587039 ] ] <nl> <nl> - Backward before Times node with uid = ' Times29 ' shape = [ * , * ] ( 2 , ) <nl> - [ CNTK backward ] > > > n <nl> - <nl> - Backward before Parameter node with uid = ' Parameter28 ' shape = [ ] ( 2 , ) <nl> + [ [ - 0 . 79412961 0 . 79412961 ] ] ] <nl> <nl> At every stop the following information is given : <nl> * Forward or backward pass <nl> * Node type ( e . g . ' Times ' ) <nl> * Name if given , otherwise it is omitted <nl> * uid , which is a unique reference within the graph <nl> - * shape having the format [ dynamic axis ] ( static axes ) . E . g . ` ` [ * , * ] ( 2 , ) ` ` <nl> - means that the node ' s output has two dynamic axes ( batch and sequence ) and <nl> + * shape having the format [ dynamic axis ] ( static axes ) . E . g . ` ` [ * , * ] ( 2 , ) ` ` <nl> + means that the node ' s output has two dynamic axes ( batch and sequence ) and <nl> one static axis ( 2 dimensions ) <nl> - <nl> ' ' ' <nl> <nl> + <nl> def save_as_legacy_model ( root_op , filename ) : <nl> ' ' ' <nl> Save the network of ` ` root_op ` ` in ` ` filename ` ` . <nl> class DebugNode ( UserFunction ) : <nl> step through the graph and investigate data , shapes , etc . <nl> ' ' ' <nl> _commands = [ ] <nl> + _last_pass = ' f ' <nl> <nl> def __init__ ( self , arg , name = ' DebugNode ' ) : <nl> super ( DebugNode , self ) . __init__ ( [ arg ] , as_numpy = True , name = name ) <nl> def __wait_for_input ( self , prompt ) : <nl> if not new_input : <nl> continue <nl> <nl> - if len ( new_input ) = = 1 and new_input in ( ' p ' , ' d ' , ' c ' ) : <nl> + if len ( new_input ) = = 1 and new_input in ' bcdfp ' : <nl> understood = [ new_input ] <nl> elif new_input [ 0 ] = = ' n ' : <nl> try : <nl> def __wait_for_input ( self , prompt ) : <nl> <nl> if not understood : <nl> print ( ' ' ' \ <nl> - Your input was not understood . Please use <nl> + Commands : <nl> n - execute the next node <nl> n < number > - execute the next < number > nodes <nl> n < lambda > - execute until the lambda expression is True . Examples : <nl> def __wait_for_input ( self , prompt ) : <nl> lambda arg , node : len ( node . shape ) = = 3 <nl> Until the variance of the input exceeds 1 ( np = numpy ) : <nl> lambda arg , node : np . var ( arg ) > 1 <nl> + f - run until forward pass ( like ' n ' when already in forward pass ) <nl> + b - run until backward pass ( like ' n ' when already in backward pass ) <nl> c - run until end <nl> - p - print input <nl> + p - print input ( forward ) or root gradients ( backward ) <nl> d - drop into a pdb shell <nl> q - quit <nl> ' ' ' ) <nl> + <nl> return understood <nl> <nl> - def __format_after ( self ) : <nl> + def _format_status ( self ) : <nl> if isinstance ( self . after , Constant ) : <nl> node_type = ' Constant ' <nl> elif isinstance ( self . after , Parameter ) : <nl> def __format_after ( self ) : <nl> return " % s node with % suid = ' % s ' shape = % s % s " % \ <nl> ( node_type , name , self . after . uid , dyn_axes , self . after . shape ) <nl> <nl> + def _print_status ( self , current_pass ) : <nl> + if current_pass ! = DebugNode . _last_pass : <nl> + if current_pass = = ' f ' : <nl> + print ( ) <nl> + print ( ' = ' * 40 + ' forward ' + ' = ' * 40 ) <nl> + else : <nl> + print ( ' = ' * 40 + ' backward ' + ' = ' * 40 ) <nl> + <nl> + if current_pass = = ' f ' : <nl> + print ( " Forward after % s " % self . _format_status ( ) ) <nl> + else : <nl> + print ( " Backward before % s " % self . _format_status ( ) ) <nl> + <nl> def forward ( self , argument , device = None , outputs_to_retain = None ) : <nl> - print ( " \ nForward after % s " % self . __format_after ( ) ) <nl> + self . _print_status ( ' f ' ) <nl> <nl> commands = DebugNode . _commands <nl> <nl> def forward ( self , argument , device = None , outputs_to_retain = None ) : <nl> commands . pop ( ) <nl> done = True <nl> <nl> + elif commands [ - 1 ] = = ' b ' : <nl> + done = True <nl> + <nl> + elif commands [ - 1 ] = = ' f ' : <nl> + commands . pop ( ) <nl> + done = True <nl> + <nl> elif commands [ - 1 ] = = ' p ' : <nl> print ( ' Input : ' ) <nl> print ( argument ) <nl> def forward ( self , argument , device = None , outputs_to_retain = None ) : <nl> else : <nl> done = True <nl> <nl> + DebugNode . _last_pass = ' f ' <nl> + <nl> return None , argument <nl> <nl> def backward ( self , state , root_gradients ) : <nl> - print ( " \ nBackward before % s " % self . __format_after ( ) ) <nl> + self . _print_status ( ' b ' ) <nl> <nl> done = False <nl> commands = DebugNode . _commands <nl> def backward ( self , state , root_gradients ) : <nl> done = True <nl> <nl> elif commands [ - 1 ] = = ' n ' : <nl> - commands <nl> + commands . pop ( ) <nl> + done = True <nl> + <nl> + elif commands [ - 1 ] = = ' b ' : <nl> + commands . pop ( ) <nl> + done = True <nl> + <nl> + elif commands [ - 1 ] = = ' f ' : <nl> done = True <nl> <nl> elif commands [ - 1 ] = = ' p ' : <nl> def backward ( self , state , root_gradients ) : <nl> else : <nl> done = True <nl> <nl> + DebugNode . _last_pass = ' b ' <nl> + <nl> return root_gradients <nl> <nl> def infer_outputs ( self ) : <nl>
Add commands ' f ' and ' b '
microsoft/CNTK
e03f8536fc93c5e7cff62f4058562f34df63e093
2017-03-13T10:07:35Z
mmm a / Source / CNTKv2LibraryDll / proto / onnx / ONNXToCNTK . cpp <nl> ppp b / Source / CNTKv2LibraryDll / proto / onnx / ONNXToCNTK . cpp <nl> FunctionPtr ONNXToCNTKHelper : : CreateFunction ( const Node * node , const std : : vector <nl> const Variable & runningInvStd = inputs [ 4 ] ; <nl> const Variable & runningCount = Constant : : Scalar ( 0 . 0F ) ; <nl> <nl> - bool spatial = onnxOpName = = " SpatialBN " | | GetNamedAttributeAsInt64 ( node , " spatial " ) ! = 0 ; <nl> + bool spatial = onnxOpName = = " SpatialBN " | | GetNamedAttributeAsInt64 ( node , " spatial " , 0 ) ! = 0 ; <nl> <nl> double normalizationTimeConstant = 0 . 0 ; <nl> if ( HasNamedAttribute ( node , " momentum " ) ) <nl>
ONNX BatchNormalization - making spatial attribute optional .
microsoft/CNTK
1a0ff5ada1f34a7915fce602f2115b776769009a
2017-11-11T00:52:06Z
mmm a / lib / SILPasses / Utils / Local . cpp <nl> ppp b / lib / SILPasses / Utils / Local . cpp <nl> optimizeCheckedCastAddrBranchInst ( CheckedCastAddrBranchInst * Inst ) { <nl> auto * SuccessBB = Inst - > getSuccessBB ( ) ; <nl> auto * FailureBB = Inst - > getFailureBB ( ) ; <nl> <nl> + / / If there is an unbound generic type involved in the cast , bail . <nl> + if ( Src . getType ( ) . hasArchetype ( ) | | Dest . getType ( ) . hasArchetype ( ) ) <nl> + return nullptr ; <nl> + <nl> / / % 1 = metatype $ A . Type <nl> / / [ % 2 = init_existential_metatype % 1 . . . ] <nl> / / % 3 = alloc_stack <nl>
Bail early on casts involving unbound generic types . It is too early to optimize them .
apple/swift
7fe82963f0801acd25b8810ff5d9b45c6df16237
2015-04-16T20:28:11Z
mmm a / lib / Sema / CSSimplify . cpp <nl> ppp b / lib / Sema / CSSimplify . cpp <nl> ConstraintSystem : : simplifyKeyPathConstraint ( <nl> } capability = Writable ; <nl> <nl> bool anyComponentsUnresolved = false ; <nl> + bool didOptionalChain = false ; <nl> <nl> for ( unsigned i : indices ( keyPath - > getComponents ( ) ) ) { <nl> auto & component = keyPath - > getComponents ( ) [ i ] ; <nl> ConstraintSystem : : simplifyKeyPathConstraint ( <nl> } <nl> <nl> case KeyPathExpr : : Component : : Kind : : OptionalChain : <nl> - / / Optional chains force the entire key path to be read - only . <nl> - capability = ReadOnly ; <nl> - goto done ; <nl> + didOptionalChain = true ; <nl> + break ; <nl> <nl> case KeyPathExpr : : Component : : Kind : : OptionalForce : <nl> / / Forcing an optional preserves its lvalue - ness . <nl> break ; <nl> <nl> case KeyPathExpr : : Component : : Kind : : OptionalWrap : <nl> - / / An optional chain should already have forced the entire key path to <nl> - / / be read - only . <nl> - assert ( capability = = ReadOnly ) ; <nl> + / / An optional chain should already have been recorded . <nl> + assert ( didOptionalChain ) ; <nl> break ; <nl> <nl> case KeyPathExpr : : Component : : Kind : : TupleElement : <nl> ConstraintSystem : : simplifyKeyPathConstraint ( <nl> break ; <nl> } <nl> } <nl> - done : <nl> + <nl> + / / Optional chains force the entire key path to be read - only . <nl> + if ( didOptionalChain ) <nl> + capability = ReadOnly ; <nl> <nl> / / Resolve the type . <nl> NominalTypeDecl * kpDecl ; <nl> mmm a / test / expr / unary / keypath / keypath . swift <nl> ppp b / test / expr / unary / keypath / keypath . swift <nl> func test_keypath_with_method_refs ( ) { <nl> let _ = \ A . Type . faz . bar / / expected - error { { key path cannot refer to static method ' faz ( ) ' } } <nl> } <nl> <nl> + / / SR - 12519 : Compiler crash on invalid method reference in key path . <nl> + protocol Zonk { <nl> + func wargle ( ) <nl> + } <nl> + typealias Blatz = ( gloop : String , zoop : Zonk ? ) <nl> + <nl> + func sr12519 ( fleep : [ Blatz ] ) { <nl> + fleep . compactMap ( \ . zoop ? . wargle ) / / expected - error { { key path cannot refer to instance method ' wargle ( ) ' } } <nl> + } <nl> + <nl> / / SR - 10467 - Argument type ' KeyPath < String , Int > ' does not conform to expected type ' Any ' <nl> func test_keypath_in_any_context ( ) { <nl> func foo ( _ : Any ) { } <nl>
[ CS ] Fix invalid key path crasher
apple/swift
3339ea4f91cd5c9161045a485977907aa28e50a1
2020-04-06T17:14:19Z
mmm a / src / parser . cc <nl> ppp b / src / parser . cc <nl> FunctionLiteral * Parser : : ParseProgram ( Isolate * isolate , ParseInfo * info ) { <nl> source = String : : Flatten ( source ) ; <nl> FunctionLiteral * result ; <nl> <nl> - Scope * top_scope = NULL ; <nl> - Scope * eval_scope = NULL ; <nl> if ( source - > IsExternalTwoByteString ( ) ) { <nl> / / Notice that the stream is destroyed at the end of the branch block . <nl> / / The last line of the blocks can ' t be moved outside , even though they ' re <nl> FunctionLiteral * Parser : : ParseProgram ( Isolate * isolate , ParseInfo * info ) { <nl> ExternalTwoByteStringUtf16CharacterStream stream ( <nl> Handle < ExternalTwoByteString > : : cast ( source ) , 0 , source - > length ( ) ) ; <nl> scanner_ . Initialize ( & stream ) ; <nl> - result = DoParseProgram ( info , & top_scope , & eval_scope ) ; <nl> + result = DoParseProgram ( info ) ; <nl> } else { <nl> GenericStringUtf16CharacterStream stream ( source , 0 , source - > length ( ) ) ; <nl> scanner_ . Initialize ( & stream ) ; <nl> - result = DoParseProgram ( info , & top_scope , & eval_scope ) ; <nl> + result = DoParseProgram ( info ) ; <nl> } <nl> - top_scope - > set_end_position ( source - > length ( ) ) ; <nl> - if ( eval_scope ! = NULL ) { <nl> - eval_scope - > set_end_position ( source - > length ( ) ) ; <nl> + if ( result ! = NULL ) { <nl> + DCHECK_EQ ( scanner_ . peek_location ( ) . beg_pos , source - > length ( ) ) ; <nl> } <nl> HandleSourceURLComments ( isolate , info - > script ( ) ) ; <nl> <nl> FunctionLiteral * Parser : : ParseProgram ( Isolate * isolate , ParseInfo * info ) { <nl> } <nl> <nl> <nl> - FunctionLiteral * Parser : : DoParseProgram ( ParseInfo * info , Scope * * scope , <nl> - Scope * * eval_scope ) { <nl> + FunctionLiteral * Parser : : DoParseProgram ( ParseInfo * info ) { <nl> / / Note that this function can be called from the main thread or from a <nl> / / background thread . We should not access anything Isolate / heap dependent <nl> / / via ParseInfo , and also not pass it forward . <nl> FunctionLiteral * Parser : : DoParseProgram ( ParseInfo * info , Scope * * scope , <nl> <nl> FunctionLiteral * result = NULL ; <nl> { <nl> - * scope = NewScope ( scope_ , SCRIPT_SCOPE ) ; <nl> - info - > set_script_scope ( * scope ) ; <nl> + Scope * scope = NewScope ( scope_ , SCRIPT_SCOPE ) ; <nl> + info - > set_script_scope ( scope ) ; <nl> if ( ! info - > context ( ) . is_null ( ) & & ! info - > context ( ) - > IsNativeContext ( ) ) { <nl> - * scope = Scope : : DeserializeScopeChain ( info - > isolate ( ) , zone ( ) , <nl> - * info - > context ( ) , * scope ) ; <nl> + scope = Scope : : DeserializeScopeChain ( info - > isolate ( ) , zone ( ) , <nl> + * info - > context ( ) , scope ) ; <nl> / / The Scope is backed up by ScopeInfo ( which is in the V8 heap ) ; this <nl> / / means the Parser cannot operate independent of the V8 heap . Tell the <nl> / / string table to internalize strings and values right after they ' re <nl> FunctionLiteral * Parser : : DoParseProgram ( ParseInfo * info , Scope * * scope , <nl> DCHECK ( parsing_on_main_thread_ ) ; <nl> ast_value_factory ( ) - > Internalize ( info - > isolate ( ) ) ; <nl> } <nl> - original_scope_ = * scope ; <nl> + original_scope_ = scope ; <nl> if ( info - > is_eval ( ) ) { <nl> - if ( ! ( * scope ) - > is_script_scope ( ) | | is_strict ( info - > language_mode ( ) ) ) { <nl> - * scope = NewScope ( * scope , EVAL_SCOPE ) ; <nl> + if ( ! scope - > is_script_scope ( ) | | is_strict ( info - > language_mode ( ) ) ) { <nl> + scope = NewScope ( scope , EVAL_SCOPE ) ; <nl> } <nl> } else if ( info - > is_module ( ) ) { <nl> - * scope = NewScope ( * scope , MODULE_SCOPE ) ; <nl> + scope = NewScope ( scope , MODULE_SCOPE ) ; <nl> } <nl> - ( * scope ) - > set_start_position ( 0 ) ; <nl> - / / End position will be set by the caller . <nl> + <nl> + scope - > set_start_position ( 0 ) ; <nl> <nl> / / Compute the parsing mode . <nl> Mode mode = ( FLAG_lazy & & allow_lazy ( ) ) ? PARSE_LAZILY : PARSE_EAGERLY ; <nl> - if ( allow_natives ( ) | | extension_ ! = NULL | | <nl> - ( * scope ) - > is_eval_scope ( ) ) { <nl> + if ( allow_natives ( ) | | extension_ ! = NULL | | scope - > is_eval_scope ( ) ) { <nl> mode = PARSE_EAGERLY ; <nl> } <nl> ParsingModeScope parsing_mode ( this , mode ) ; <nl> <nl> / / Enters ' scope ' . <nl> AstNodeFactory function_factory ( ast_value_factory ( ) ) ; <nl> - FunctionState function_state ( & function_state_ , & scope_ , * scope , <nl> + FunctionState function_state ( & function_state_ , & scope_ , scope , <nl> kNormalFunction , & function_factory ) ; <nl> <nl> scope_ - > SetLanguageMode ( info - > language_mode ( ) ) ; <nl> FunctionLiteral * Parser : : DoParseProgram ( ParseInfo * info , Scope * * scope , <nl> DCHECK ( allow_harmony_modules ( ) ) ; <nl> ParseModuleItemList ( body , & ok ) ; <nl> } else { <nl> - ParseStatementList ( body , Token : : EOS , info - > is_eval ( ) , eval_scope , & ok ) ; <nl> + Scope * eval_scope = nullptr ; <nl> + ParseStatementList ( body , Token : : EOS , info - > is_eval ( ) , & eval_scope , & ok ) ; <nl> + if ( eval_scope ! = nullptr ) <nl> + eval_scope - > set_end_position ( scanner ( ) - > peek_location ( ) . beg_pos ) ; <nl> } <nl> <nl> + / / The parser will peek but not consume EOS . Our scope logically goes all <nl> + / / the way to the EOS , though . <nl> + scope - > set_end_position ( scanner ( ) - > peek_location ( ) . beg_pos ) ; <nl> + <nl> if ( ok & & is_strict ( language_mode ( ) ) ) { <nl> CheckStrictOctalLiteral ( beg_pos , scanner ( ) - > location ( ) . end_pos , & ok ) ; <nl> CheckConflictingVarDeclarations ( scope_ , & ok ) ; <nl> void Parser : : ParseOnBackground ( ParseInfo * info ) { <nl> / / don ' t ) . We work around this by storing all the scopes which need their end <nl> / / position set at the end of the script ( the top scope and possible eval <nl> / / scopes ) and set their end position after we know the script length . <nl> - Scope * top_scope = NULL ; <nl> - Scope * eval_scope = NULL ; <nl> - result = DoParseProgram ( info , & top_scope , & eval_scope ) ; <nl> - <nl> - top_scope - > set_end_position ( scanner ( ) - > location ( ) . end_pos ) ; <nl> - if ( eval_scope ! = NULL ) { <nl> - eval_scope - > set_end_position ( scanner ( ) - > location ( ) . end_pos ) ; <nl> - } <nl> + result = DoParseProgram ( info ) ; <nl> <nl> info - > set_literal ( result ) ; <nl> <nl> mmm a / src / parser . h <nl> ppp b / src / parser . h <nl> class Parser : public ParserBase < ParserTraits > { <nl> Utf16CharacterStream * source ) ; <nl> <nl> / / Called by ParseProgram after setting up the scanner . <nl> - FunctionLiteral * DoParseProgram ( ParseInfo * info , Scope * * scope , <nl> - Scope * * ad_hoc_eval_scope ) ; <nl> + FunctionLiteral * DoParseProgram ( ParseInfo * info ) ; <nl> <nl> void SetCachedData ( ParseInfo * info ) ; <nl> <nl>
Simplify DoParseProgram
v8/v8
e0913eccfbe6809a7a00af43d90aad28a430f80b
2015-04-16T12:42:37Z
mmm a / src / GUI . cpp <nl> ppp b / src / GUI . cpp <nl> GUI : : GUI ( QWidget * parent , QStringList torrentCmdLine ) : QMainWindow ( parent ) , dis <nl> connect ( BTSession , SIGNAL ( newDownloadedTorrent ( QString , QString ) ) , this , SLOT ( processDownloadedFiles ( QString , QString ) ) ) ; <nl> connect ( BTSession , SIGNAL ( downloadFromUrlFailure ( QString , QString ) ) , this , SLOT ( handleDownloadFromUrlFailure ( QString , QString ) ) ) ; <nl> connect ( BTSession , SIGNAL ( deletedTorrent ( QString ) ) , this , SLOT ( deleteTorrent ( QString ) ) ) ; <nl> + connect ( BTSession , SIGNAL ( torrentPaused ( QTorrentHandle & ) ) , this , SLOT ( setPaused ( QTorrentHandle & ) ) ) ; <nl> qDebug ( " create tabWidget " ) ; <nl> tabs = new QTabWidget ( ) ; <nl> / / Download torrents tab <nl> GUI : : GUI ( QWidget * parent , QStringList torrentCmdLine ) : QMainWindow ( parent ) , dis <nl> scrapeTimer - > start ( 20000 ) ; <nl> qDebug ( " GUI Built " ) ; <nl> } <nl> - <nl> + <nl> / / Destructor <nl> GUI : : ~ GUI ( ) { <nl> qDebug ( " GUI destruction " ) ; <nl> GUI : : GUI ( QWidget * parent , QStringList torrentCmdLine ) : QMainWindow ( parent ) , dis <nl> delete BTSession ; <nl> qDebug ( " 5 " ) ; <nl> } <nl> - <nl> + <nl> void GUI : : displayRSSTab ( bool enable ) { <nl> if ( enable ) { <nl> / / RSS tab <nl> GUI : : GUI ( QWidget * parent , QStringList torrentCmdLine ) : QMainWindow ( parent ) , dis <nl> } <nl> } <nl> } <nl> - <nl> + <nl> void GUI : : scrapeTrackers ( ) { <nl> std : : vector < torrent_handle > torrents = BTSession - > getTorrents ( ) ; <nl> std : : vector < torrent_handle > : : iterator torrentIT ; <nl> GUI : : GUI ( QWidget * parent , QStringList torrentCmdLine ) : QMainWindow ( parent ) , dis <nl> h . scrape_tracker ( ) ; <nl> } <nl> } <nl> - <nl> + <nl> void GUI : : updateRatio ( ) { <nl> / / Update ratio info <nl> float ratio = 1 . ; <nl> GUI : : GUI ( QWidget * parent , QStringList torrentCmdLine ) : QMainWindow ( parent ) , dis <nl> / / Update DHT nodes <nl> DHTLbl - > setText ( tr ( " DHT : % 1 nodes " ) . arg ( QString : : number ( sessionStatus . dht_nodes ) ) ) ; <nl> } <nl> - <nl> + <nl> void GUI : : on_actionWebsite_triggered ( ) const { <nl> QDesktopServices : : openUrl ( QUrl ( QString : : fromUtf8 ( " http : / / www . qbittorrent . org " ) ) ) ; <nl> } <nl> - <nl> + <nl> void GUI : : on_actionDocumentation_triggered ( ) const { <nl> QDesktopServices : : openUrl ( QUrl ( QString : : fromUtf8 ( " http : / / wiki . qbittorrent . org " ) ) ) ; <nl> } <nl> - <nl> + <nl> void GUI : : on_actionBugReport_triggered ( ) const { <nl> QDesktopServices : : openUrl ( QUrl ( QString : : fromUtf8 ( " http : / / bugs . qbittorrent . org " ) ) ) ; <nl> } <nl> - <nl> + <nl> void GUI : : writeSettings ( ) { <nl> QSettings settings ( QString : : fromUtf8 ( " qBittorrent " ) , QString : : fromUtf8 ( " qBittorrent " ) ) ; <nl> settings . beginGroup ( QString : : fromUtf8 ( " MainWindow " ) ) ; <nl> GUI : : GUI ( QWidget * parent , QStringList torrentCmdLine ) : QMainWindow ( parent ) , dis <nl> settings . setValue ( QString : : fromUtf8 ( " pos " ) , pos ( ) ) ; <nl> settings . endGroup ( ) ; <nl> } <nl> - <nl> + <nl> / / called when a torrent has finished <nl> void GUI : : finishedTorrent ( QTorrentHandle & h ) const { <nl> qDebug ( " In GUI , a torrent has finished " ) ; <nl> GUI : : GUI ( QWidget * parent , QStringList torrentCmdLine ) : QMainWindow ( parent ) , dis <nl> myTrayIcon - > showMessage ( tr ( " Download finished " ) , tr ( " % 1 has finished downloading . " , " e . g : xxx . avi has finished downloading . " ) . arg ( fileName ) , QSystemTrayIcon : : Information , TIME_TRAY_BALLOON ) ; <nl> } <nl> } <nl> - <nl> + <nl> void GUI : : addedTorrent ( QTorrentHandle & h ) const { <nl> if ( h . is_seed ( ) ) { <nl> finishedTorrentTab - > addTorrent ( h . hash ( ) ) ; <nl> GUI : : GUI ( QWidget * parent , QStringList torrentCmdLine ) : QMainWindow ( parent ) , dis <nl> downloadingTorrentTab - > addTorrent ( h . hash ( ) ) ; <nl> } <nl> } <nl> - <nl> + <nl> void GUI : : pausedTorrent ( QTorrentHandle & h ) const { <nl> if ( h . is_seed ( ) ) { <nl> finishedTorrentTab - > pauseTorrent ( h . hash ( ) ) ; <nl> GUI : : GUI ( QWidget * parent , QStringList torrentCmdLine ) : QMainWindow ( parent ) , dis <nl> downloadingTorrentTab - > pauseTorrent ( h . hash ( ) ) ; <nl> } <nl> } <nl> - <nl> + <nl> void GUI : : resumedTorrent ( QTorrentHandle & h ) const { <nl> if ( h . is_seed ( ) ) { <nl> finishedTorrentTab - > updateTorrent ( h ) ; <nl> GUI : : GUI ( QWidget * parent , QStringList torrentCmdLine ) : QMainWindow ( parent ) , dis <nl> downloadingTorrentTab - > updateTorrent ( h ) ; <nl> } <nl> } <nl> - <nl> + <nl> void GUI : : checkedTorrent ( QTorrentHandle & h ) const { <nl> if ( h . is_seed ( ) ) { <nl> / / Move torrent to finished tab <nl> GUI : : GUI ( QWidget * parent , QStringList torrentCmdLine ) : QMainWindow ( parent ) , dis <nl> } <nl> } <nl> } <nl> - <nl> + <nl> / / Notification when disk is full <nl> void GUI : : fullDiskError ( QTorrentHandle & h , QString msg ) const { <nl> QSettings settings ( QString : : fromUtf8 ( " qBittorrent " ) , QString : : fromUtf8 ( " qBittorrent " ) ) ; <nl> GUI : : GUI ( QWidget * parent , QStringList torrentCmdLine ) : QMainWindow ( parent ) , dis <nl> / / Download will be paused by libtorrent . Updating GUI information accordingly <nl> QString hash = h . hash ( ) ; <nl> qDebug ( " Full disk error , pausing torrent % s " , hash . toLocal8Bit ( ) . data ( ) ) ; <nl> + setPaused ( h ) ; <nl> + BTSession - > addConsoleMessage ( tr ( " An error occured ( full disk ? ) , ' % 1 ' paused . " , " e . g : An error occured ( full disk ? ) , ' xxx . avi ' paused . " ) . arg ( h . name ( ) ) ) ; <nl> + } <nl> + <nl> + void GUI : : setPaused ( QTorrentHandle & h ) const { <nl> + Q_ASSERT ( h . is_paused ( ) ) ; <nl> + qDebug ( " Marking torrent % s as paused " , h . hash ( ) . toUtf8 ( ) . data ( ) ) ; <nl> if ( h . is_seed ( ) ) { <nl> / / In finished list <nl> qDebug ( " Automatically paused torrent was in finished list " ) ; <nl> - finishedTorrentTab - > pauseTorrent ( hash ) ; <nl> + finishedTorrentTab - > pauseTorrent ( h . hash ( ) ) ; <nl> } else { <nl> - downloadingTorrentTab - > pauseTorrent ( hash ) ; <nl> + downloadingTorrentTab - > pauseTorrent ( h . hash ( ) ) ; <nl> } <nl> - BTSession - > addConsoleMessage ( tr ( " An error occured ( full disk ? ) , ' % 1 ' paused . " , " e . g : An error occured ( full disk ? ) , ' xxx . avi ' paused . " ) . arg ( h . name ( ) ) ) ; <nl> } <nl> - <nl> + <nl> void GUI : : createKeyboardShortcuts ( ) { <nl> actionCreate_torrent - > setShortcut ( QKeySequence ( QString : : fromUtf8 ( " Ctrl + N " ) ) ) ; <nl> actionOpen - > setShortcut ( QKeySequence ( QString : : fromUtf8 ( " Ctrl + O " ) ) ) ; <nl> GUI : : GUI ( QWidget * parent , QStringList torrentCmdLine ) : QMainWindow ( parent ) , dis <nl> actionDecreasePriority - > setShortcut ( QKeySequence ( QString : : fromUtf8 ( " Ctrl + - " ) ) ) ; <nl> actionIncreasePriority - > setShortcut ( QKeySequence ( QString : : fromUtf8 ( " Ctrl + + " ) ) ) ; <nl> } <nl> - <nl> + <nl> / / Keyboard shortcuts slots <nl> void GUI : : displayDownTab ( ) const { <nl> tabs - > setCurrentIndex ( 0 ) ; <nl> } <nl> - <nl> + <nl> void GUI : : displayUpTab ( ) const { <nl> tabs - > setCurrentIndex ( 1 ) ; <nl> } <nl> - <nl> + <nl> void GUI : : displaySearchTab ( ) const { <nl> tabs - > setCurrentIndex ( 2 ) ; <nl> } <nl> - <nl> + <nl> void GUI : : displayRSSTab ( ) const { <nl> tabs - > setCurrentIndex ( 3 ) ; <nl> } <nl> - <nl> + <nl> / / End of keyboard shortcuts slots <nl> - <nl> + <nl> void GUI : : readSettings ( ) { <nl> QSettings settings ( QString : : fromUtf8 ( " qBittorrent " ) , QString : : fromUtf8 ( " qBittorrent " ) ) ; <nl> settings . beginGroup ( QString : : fromUtf8 ( " MainWindow " ) ) ; <nl> GUI : : GUI ( QWidget * parent , QStringList torrentCmdLine ) : QMainWindow ( parent ) , dis <nl> move ( settings . value ( QString : : fromUtf8 ( " pos " ) , screenCenter ( ) ) . toPoint ( ) ) ; <nl> settings . endGroup ( ) ; <nl> } <nl> - <nl> + <nl> void GUI : : balloonClicked ( ) { <nl> if ( isHidden ( ) ) { <nl> show ( ) ; <nl> GUI : : GUI ( QWidget * parent , QStringList torrentCmdLine ) : QMainWindow ( parent ) , dis <nl> activateWindow ( ) ; <nl> } <nl> } <nl> - <nl> + <nl> void GUI : : acceptConnection ( ) { <nl> clientConnection = localServer - > nextPendingConnection ( ) ; <nl> connect ( clientConnection , SIGNAL ( disconnected ( ) ) , this , SLOT ( readParamsOnSocket ( ) ) ) ; <nl> qDebug ( " accepted connection from another instance " ) ; <nl> } <nl> - <nl> + <nl> void GUI : : readParamsOnSocket ( ) { <nl> if ( clientConnection ) { <nl> QByteArray params = clientConnection - > readAll ( ) ; <nl> GUI : : GUI ( QWidget * parent , QStringList torrentCmdLine ) : QMainWindow ( parent ) , dis <nl> } <nl> } <nl> } <nl> - <nl> + <nl> void GUI : : handleDownloadFromUrlFailure ( QString url , QString reason ) const { <nl> / / Display a message box <nl> QMessageBox : : critical ( 0 , tr ( " Url download error " ) , tr ( " Couldn ' t download file at url : % 1 , reason : % 2 . " ) . arg ( url ) . arg ( reason ) ) ; <nl> } <nl> - <nl> + <nl> void GUI : : on_actionSet_global_upload_limit_triggered ( ) { <nl> qDebug ( " actionSet_global_upload_limit_triggered " ) ; <nl> new BandwidthAllocationDialog ( this , true , BTSession , QStringList ( ) ) ; <nl> } <nl> - <nl> + <nl> void GUI : : on_actionShow_console_triggered ( ) { <nl> new consoleDlg ( this , BTSession ) ; <nl> } <nl> - <nl> + <nl> void GUI : : on_actionSet_global_download_limit_triggered ( ) { <nl> qDebug ( " actionSet_global_download_limit_triggered " ) ; <nl> new BandwidthAllocationDialog ( this , false , BTSession , QStringList ( ) ) ; <nl> } <nl> - <nl> + <nl> void GUI : : on_actionPreview_file_triggered ( ) { <nl> QString hash ; <nl> switch ( tabs - > currentIndex ( ) ) { <nl> GUI : : GUI ( QWidget * parent , QStringList torrentCmdLine ) : QMainWindow ( parent ) , dis <nl> QTorrentHandle h = BTSession - > getTorrentHandle ( hash ) ; <nl> new previewSelect ( this , h ) ; <nl> } <nl> - <nl> + <nl> void GUI : : openDestinationFolder ( ) const { <nl> QStringList hashes ; <nl> switch ( tabs - > currentIndex ( ) ) { <nl> GUI : : GUI ( QWidget * parent , QStringList torrentCmdLine ) : QMainWindow ( parent ) , dis <nl> } <nl> } <nl> } <nl> - <nl> + <nl> void GUI : : goBuyPage ( ) const { <nl> QStringList hashes ; <nl> switch ( tabs - > currentIndex ( ) ) { <nl> GUI : : GUI ( QWidget * parent , QStringList torrentCmdLine ) : QMainWindow ( parent ) , dis <nl> QDesktopServices : : openUrl ( " http : / / match . sharemonkey . com / ? info_hash = " + hash + " & n = " + h . name ( ) + " & cid = 33 " ) ; <nl> } <nl> } <nl> - <nl> + <nl> / / Necessary if we want to close the window <nl> / / in one time if " close to systray " is enabled <nl> void GUI : : on_actionExit_triggered ( ) { <nl> force_exit = true ; <nl> close ( ) ; <nl> } <nl> - <nl> + <nl> void GUI : : previewFile ( QString filePath ) { <nl> QDesktopServices : : openUrl ( QString ( " file : / / " ) + filePath ) ; <nl> } <nl> - <nl> + <nl> int GUI : : getCurrentTabIndex ( ) const { <nl> if ( isMinimized ( ) | | isHidden ( ) ) <nl> return - 1 ; <nl> return tabs - > currentIndex ( ) ; <nl> } <nl> - <nl> + <nl> void GUI : : setTabText ( int index , QString text ) const { <nl> tabs - > setTabText ( index , text ) ; <nl> } <nl> - <nl> + <nl> / / Toggle Main window visibility <nl> void GUI : : toggleVisibility ( QSystemTrayIcon : : ActivationReason e ) { <nl> if ( e = = QSystemTrayIcon : : Trigger | | e = = QSystemTrayIcon : : DoubleClick ) { <nl> GUI : : GUI ( QWidget * parent , QStringList torrentCmdLine ) : QMainWindow ( parent ) , dis <nl> } <nl> } <nl> } <nl> - <nl> + <nl> / / Center window <nl> QPoint GUI : : screenCenter ( ) const { <nl> int scrn = 0 ; <nl> QWidget * w = this - > topLevelWidget ( ) ; <nl> - <nl> + <nl> if ( w ) <nl> scrn = QApplication : : desktop ( ) - > screenNumber ( w ) ; <nl> else if ( QApplication : : desktop ( ) - > isVirtualDesktop ( ) ) <nl> scrn = QApplication : : desktop ( ) - > screenNumber ( QCursor : : pos ( ) ) ; <nl> else <nl> scrn = QApplication : : desktop ( ) - > screenNumber ( this ) ; <nl> - <nl> + <nl> QRect desk ( QApplication : : desktop ( ) - > availableGeometry ( scrn ) ) ; <nl> return QPoint ( ( desk . width ( ) - this - > frameGeometry ( ) . width ( ) ) / 2 , ( desk . height ( ) - this - > frameGeometry ( ) . height ( ) ) / 2 ) ; <nl> } <nl> - <nl> + <nl> / / Display About Dialog <nl> void GUI : : on_actionAbout_triggered ( ) { <nl> / / About dialog <nl> new about ( this ) ; <nl> } <nl> - <nl> + <nl> void GUI : : showEvent ( QShowEvent * e ) { <nl> qDebug ( " * * Show Event * * " ) ; <nl> updateLists ( true ) ; <nl> e - > accept ( ) ; <nl> } <nl> - <nl> + <nl> / / Called when we close the program <nl> void GUI : : closeEvent ( QCloseEvent * e ) { <nl> - <nl> + <nl> QSettings settings ( QString : : fromUtf8 ( " qBittorrent " ) , QString : : fromUtf8 ( " qBittorrent " ) ) ; <nl> bool goToSystrayOnExit = settings . value ( QString : : fromUtf8 ( " Preferences / General / CloseToTray " ) , false ) . toBool ( ) ; <nl> if ( ! force_exit & & systrayIntegration & & goToSystrayOnExit & & ! this - > isHidden ( ) ) { <nl> GUI : : GUI ( QWidget * parent , QStringList torrentCmdLine ) : QMainWindow ( parent ) , dis <nl> e - > accept ( ) ; <nl> qApp - > exit ( ) ; <nl> } <nl> - <nl> - <nl> + <nl> + <nl> / / Display window to create a torrent <nl> void GUI : : on_actionCreate_torrent_triggered ( ) { <nl> createtorrent * ct = new createtorrent ( this ) ; <nl> connect ( ct , SIGNAL ( torrent_to_seed ( QString ) ) , this , SLOT ( addTorrent ( QString ) ) ) ; <nl> } <nl> - <nl> + <nl> bool GUI : : event ( QEvent * e ) { <nl> if ( e - > type ( ) = = QEvent : : WindowStateChange ) { <nl> / / Now check to see if the window is minimised <nl> GUI : : GUI ( QWidget * parent , QStringList torrentCmdLine ) : QMainWindow ( parent ) , dis <nl> } <nl> return QMainWindow : : event ( e ) ; <nl> } <nl> - <nl> + <nl> / / Action executed when a file is dropped <nl> void GUI : : dropEvent ( QDropEvent * event ) { <nl> event - > acceptProposedAction ( ) ; <nl> GUI : : GUI ( QWidget * parent , QStringList torrentCmdLine ) : QMainWindow ( parent ) , dis <nl> } <nl> } <nl> } <nl> - <nl> + <nl> / / Decode if we accept drag ' n drop or not <nl> void GUI : : dragEnterEvent ( QDragEnterEvent * event ) { <nl> foreach ( const QString & mime , event - > mimeData ( ) - > formats ( ) ) { <nl> GUI : : GUI ( QWidget * parent , QStringList torrentCmdLine ) : QMainWindow ( parent ) , dis <nl> event - > acceptProposedAction ( ) ; <nl> } <nl> } <nl> - <nl> + <nl> / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * <nl> * * <nl> * Torrent * <nl> * * <nl> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * / <nl> - <nl> + <nl> / / Display a dialog to allow user to add <nl> / / torrents to download list <nl> void GUI : : on_actionOpen_triggered ( ) { <nl> GUI : : GUI ( QWidget * parent , QStringList torrentCmdLine ) : QMainWindow ( parent ) , dis <nl> settings . setValue ( QString : : fromUtf8 ( " MainWindowLastDir " ) , top_dir . join ( QDir : : separator ( ) ) ) ; <nl> } <nl> } <nl> - <nl> + <nl> / / delete from download list AND from hard drive <nl> void GUI : : on_actionDelete_Permanently_triggered ( ) { <nl> QStringList hashes ; <nl> GUI : : GUI ( QWidget * parent , QStringList torrentCmdLine ) : QMainWindow ( parent ) , dis <nl> BTSession - > deleteTorrent ( hash , true ) ; <nl> } <nl> } <nl> - <nl> + <nl> void GUI : : deleteTorrent ( QString hash ) { <nl> / / Delete item from list <nl> downloadingTorrentTab - > deleteTorrent ( hash ) ; <nl> finishedTorrentTab - > deleteTorrent ( hash ) ; <nl> } <nl> - <nl> + <nl> / / delete selected items in the list <nl> void GUI : : on_actionDelete_triggered ( ) { <nl> QStringList hashes ; <nl> GUI : : GUI ( QWidget * parent , QStringList torrentCmdLine ) : QMainWindow ( parent ) , dis <nl> BTSession - > deleteTorrent ( hash , false ) ; <nl> } <nl> } <nl> - <nl> + <nl> / / As program parameters , we can get paths or urls . <nl> / / This function parse the parameters and call <nl> / / the right addTorrent function , considering <nl> GUI : : GUI ( QWidget * parent , QStringList torrentCmdLine ) : QMainWindow ( parent ) , dis <nl> } <nl> } <nl> } <nl> - <nl> + <nl> void GUI : : addTorrent ( QString path ) { <nl> BTSession - > addTorrent ( path ) ; <nl> } <nl> - <nl> + <nl> void GUI : : processDownloadedFiles ( QString path , QString url ) { <nl> QSettings settings ( QString : : fromUtf8 ( " qBittorrent " ) , QString : : fromUtf8 ( " qBittorrent " ) ) ; <nl> bool useTorrentAdditionDialog = settings . value ( QString : : fromUtf8 ( " Preferences / Downloads / AdditionDialog " ) , true ) . toBool ( ) ; <nl> GUI : : GUI ( QWidget * parent , QStringList torrentCmdLine ) : QMainWindow ( parent ) , dis <nl> BTSession - > addTorrent ( path , false , url ) ; <nl> } <nl> } <nl> - <nl> + <nl> / / Set BT session configuration <nl> void GUI : : configureSession ( bool deleteOptions ) { <nl> qDebug ( " Configuring session " ) ; <nl> GUI : : GUI ( QWidget * parent , QStringList torrentCmdLine ) : QMainWindow ( parent ) , dis <nl> proxySettings . port = options - > getProxyPort ( ) ; <nl> qDebug ( " port is % d " , proxySettings . port ) ; <nl> if ( options - > isProxyAuthEnabled ( ) ) { <nl> - <nl> + <nl> proxySettings . username = options - > getProxyUsername ( ) . toStdString ( ) ; <nl> proxySettings . password = options - > getProxyPassword ( ) . toStdString ( ) ; <nl> qDebug ( " username is % s " , proxySettings . username . c_str ( ) ) ; <nl> GUI : : GUI ( QWidget * parent , QStringList torrentCmdLine ) : QMainWindow ( parent ) , dis <nl> } <nl> qDebug ( " Session configured " ) ; <nl> } <nl> - <nl> + <nl> void GUI : : updateUnfinishedTorrentNumber ( unsigned int nb ) { <nl> unsigned int paused = BTSession - > getUnfinishedPausedTorrentsNb ( ) ; <nl> tabs - > setTabText ( 0 , tr ( " Downloads " ) + QString : : fromUtf8 ( " ( " ) + misc : : toQString ( nb - paused ) + " / " + misc : : toQString ( nb ) + QString : : fromUtf8 ( " ) " ) ) ; <nl> } <nl> - <nl> + <nl> void GUI : : updateFinishedTorrentNumber ( unsigned int nb ) { <nl> unsigned int paused = BTSession - > getFinishedPausedTorrentsNb ( ) ; <nl> tabs - > setTabText ( 1 , tr ( " Finished " ) + QString : : fromUtf8 ( " ( " ) + misc : : toQString ( nb - paused ) + " / " + misc : : toQString ( nb ) + QString : : fromUtf8 ( " ) " ) ) ; <nl> } <nl> - <nl> + <nl> / / Allow to change action on double - click <nl> void GUI : : torrentDoubleClicked ( QString hash , bool finished ) { <nl> int action ; <nl> QSettings settings ( QString : : fromUtf8 ( " qBittorrent " ) , QString : : fromUtf8 ( " qBittorrent " ) ) ; <nl> QTorrentHandle h = BTSession - > getTorrentHandle ( hash ) ; <nl> - <nl> + <nl> if ( finished ) { <nl> action = settings . value ( QString : : fromUtf8 ( " Preferences / Downloads / DblClOnTorFN " ) , 0 ) . toInt ( ) ; <nl> } else { <nl> action = settings . value ( QString : : fromUtf8 ( " Preferences / Downloads / DblClOnTorDl " ) , 0 ) . toInt ( ) ; <nl> } <nl> - <nl> + <nl> switch ( action ) { <nl> case TOGGLE_PAUSE : <nl> this - > togglePausedState ( hash ) ; <nl> GUI : : GUI ( QWidget * parent , QStringList torrentCmdLine ) : QMainWindow ( parent ) , dis <nl> break ; <nl> } <nl> } <nl> - <nl> + <nl> / / Toggle paused state of selected torrent <nl> void GUI : : togglePausedState ( QString hash ) { <nl> if ( tabs - > currentIndex ( ) > 1 ) return ; <nl> GUI : : GUI ( QWidget * parent , QStringList torrentCmdLine ) : QMainWindow ( parent ) , dis <nl> } <nl> } <nl> } <nl> - <nl> + <nl> / / Pause All Downloads in DL list <nl> void GUI : : on_actionPause_All_triggered ( ) { <nl> bool change = false ; <nl> GUI : : GUI ( QWidget * parent , QStringList torrentCmdLine ) : QMainWindow ( parent ) , dis <nl> updateFinishedTorrentNumber ( finishedTorrentTab - > getNbTorrentsInList ( ) ) ; <nl> } <nl> } <nl> - <nl> + <nl> void GUI : : on_actionIncreasePriority_triggered ( ) { <nl> if ( tabs - > currentIndex ( ) ! = 0 ) <nl> return ; <nl> GUI : : GUI ( QWidget * parent , QStringList torrentCmdLine ) : QMainWindow ( parent ) , dis <nl> } <nl> updateLists ( ) ; <nl> } <nl> - <nl> + <nl> void GUI : : on_actionDecreasePriority_triggered ( ) { <nl> Q_ASSERT ( tabs - > currentIndex ( ) = = 0 ) ; <nl> QStringList hashes = downloadingTorrentTab - > getSelectedTorrents ( ) ; <nl> GUI : : GUI ( QWidget * parent , QStringList torrentCmdLine ) : QMainWindow ( parent ) , dis <nl> } <nl> updateLists ( ) ; <nl> } <nl> - <nl> + <nl> / / pause selected items in the list <nl> void GUI : : on_actionPause_triggered ( ) { <nl> bool inDownloadList = true ; <nl> GUI : : GUI ( QWidget * parent , QStringList torrentCmdLine ) : QMainWindow ( parent ) , dis <nl> } <nl> } <nl> } <nl> - <nl> + <nl> / / Resume All Downloads in DL list <nl> void GUI : : on_actionStart_All_triggered ( ) { <nl> bool change = false ; <nl> GUI : : GUI ( QWidget * parent , QStringList torrentCmdLine ) : QMainWindow ( parent ) , dis <nl> updateFinishedTorrentNumber ( finishedTorrentTab - > getNbTorrentsInList ( ) ) ; <nl> } <nl> } <nl> - <nl> + <nl> / / start selected items in the list <nl> void GUI : : on_actionStart_triggered ( ) { <nl> bool inDownloadList = true ; <nl> GUI : : GUI ( QWidget * parent , QStringList torrentCmdLine ) : QMainWindow ( parent ) , dis <nl> } <nl> } <nl> } <nl> - <nl> + <nl> void GUI : : addUnauthenticatedTracker ( QPair < QTorrentHandle , QString > tracker ) { <nl> / / Trackers whose authentication was cancelled <nl> if ( unauthenticated_trackers . indexOf ( tracker ) < 0 ) { <nl> unauthenticated_trackers < < tracker ; <nl> } <nl> } <nl> - <nl> + <nl> / / display properties of selected items <nl> void GUI : : on_actionTorrent_Properties_triggered ( ) { <nl> if ( tabs - > currentIndex ( ) > 1 ) return ; <nl> GUI : : GUI ( QWidget * parent , QStringList torrentCmdLine ) : QMainWindow ( parent ) , dis <nl> downloadingTorrentTab - > propertiesSelection ( ) ; <nl> } <nl> } <nl> - <nl> + <nl> void GUI : : updateLists ( bool force ) { <nl> if ( isVisible ( ) | | force ) { <nl> / / update global informations <nl> GUI : : GUI ( QWidget * parent , QStringList torrentCmdLine ) : QMainWindow ( parent ) , dis <nl> setWindowTitle ( tr ( " qBittorrent % 1 ( DL : % 2KiB / s , UP : % 3KiB / s ) " , " % 1 is qBittorrent version " ) . arg ( QString : : fromUtf8 ( VERSION ) ) . arg ( dl_rate ) . arg ( up_rate ) ) ; <nl> } <nl> } <nl> - <nl> + <nl> / / Called when a tracker requires authentication <nl> void GUI : : trackerAuthenticationRequired ( QTorrentHandle & h ) { <nl> if ( unauthenticated_trackers . indexOf ( QPair < QTorrentHandle , QString > ( h , h . current_tracker ( ) ) ) < 0 ) { <nl> GUI : : GUI ( QWidget * parent , QStringList torrentCmdLine ) : QMainWindow ( parent ) , dis <nl> new trackerLogin ( this , h ) ; <nl> } <nl> } <nl> - <nl> + <nl> / / Check connection status and display right icon <nl> void GUI : : checkConnectionStatus ( ) { <nl> / / qDebug ( " Checking connection status " ) ; <nl> GUI : : GUI ( QWidget * parent , QStringList torrentCmdLine ) : QMainWindow ( parent ) , dis <nl> connecStatusLblIcon - > setToolTip ( QString : : fromUtf8 ( " < b > " ) + tr ( " Connection status : " ) + QString : : fromUtf8 ( " < / b > < br > " ) + QString : : fromUtf8 ( " < i > " ) + tr ( " No direct connections . This may indicate network configuration problems . " ) + QString : : fromUtf8 ( " < / i > " ) ) ; <nl> } <nl> } <nl> - <nl> + <nl> / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * <nl> * * <nl> * Utils * <nl> * * <nl> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * / <nl> - <nl> + <nl> void GUI : : downloadFromURLList ( const QStringList & url_list ) { <nl> foreach ( const QString url , url_list ) { <nl> if ( url . startsWith ( " magnet : " , Qt : : CaseInsensitive ) ) { <nl> GUI : : GUI ( QWidget * parent , QStringList torrentCmdLine ) : QMainWindow ( parent ) , dis <nl> } <nl> } <nl> } <nl> - <nl> + <nl> / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * <nl> * * <nl> * Options * <nl> * * <nl> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * / <nl> - <nl> + <nl> void GUI : : createSystrayDelayed ( ) { <nl> static int timeout = 10 ; <nl> if ( QSystemTrayIcon : : isSystemTrayAvailable ( ) ) { <nl> GUI : : GUI ( QWidget * parent , QStringList torrentCmdLine ) : QMainWindow ( parent ) , dis <nl> } <nl> } <nl> } <nl> - <nl> + <nl> void GUI : : createTrayIcon ( ) { <nl> / / Tray icon <nl> # ifdef Q_WS_WIN <nl> GUI : : GUI ( QWidget * parent , QStringList torrentCmdLine ) : QMainWindow ( parent ) , dis <nl> connect ( myTrayIcon , SIGNAL ( activated ( QSystemTrayIcon : : ActivationReason ) ) , this , SLOT ( toggleVisibility ( QSystemTrayIcon : : ActivationReason ) ) ) ; <nl> myTrayIcon - > show ( ) ; <nl> } <nl> - <nl> + <nl> / / Display Program Options <nl> void GUI : : on_actionOptions_triggered ( ) { <nl> options = new options_imp ( this ) ; <nl> connect ( options , SIGNAL ( status_changed ( bool ) ) , this , SLOT ( OptionsSaved ( bool ) ) ) ; <nl> options - > show ( ) ; <nl> } <nl> - <nl> + <nl> / / Is executed each time options are saved <nl> void GUI : : OptionsSaved ( bool deleteOptions ) { <nl> BTSession - > addConsoleMessage ( tr ( " Options were saved successfully . " ) ) ; <nl> GUI : : GUI ( QWidget * parent , QStringList torrentCmdLine ) : QMainWindow ( parent ) , dis <nl> / / Update session <nl> configureSession ( deleteOptions ) ; <nl> } <nl> - <nl> + <nl> bool GUI : : initWebUi ( QString username , QString password , int port ) { <nl> if ( httpServer ) <nl> httpServer - > close ( ) ; <nl> GUI : : GUI ( QWidget * parent , QStringList torrentCmdLine ) : QMainWindow ( parent ) , dis <nl> QMessageBox : : critical ( this , " Web User Interface Error " , " Unable to initialize HTTP Server on port " + misc : : toQString ( port ) ) ; <nl> return success ; <nl> } <nl> - <nl> + <nl> / * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * <nl> * * <nl> * HTTP Downloader * <nl> * * <nl> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * / <nl> - <nl> + <nl> / / Display an input dialog to prompt user for <nl> / / an url <nl> void GUI : : on_actionDownload_from_URL_triggered ( ) { <nl> downloadFromURL * downloadFromURLDialog = new downloadFromURL ( this ) ; <nl> connect ( downloadFromURLDialog , SIGNAL ( urlsReadyToBeDownloaded ( const QStringList & ) ) , BTSession , SLOT ( downloadFromURLList ( const QStringList & ) ) ) ; <nl> } <nl> + <nl> mmm a / src / GUI . h <nl> ppp b / src / GUI . h <nl> class GUI : public QMainWindow , private Ui : : MainWindow { <nl> void fullDiskError ( QTorrentHandle & h , QString msg ) const ; <nl> void handleDownloadFromUrlFailure ( QString , QString ) const ; <nl> void createSystrayDelayed ( ) ; <nl> + void setPaused ( QTorrentHandle & h ) const ; <nl> / / Keyboard shortcuts <nl> void createKeyboardShortcuts ( ) ; <nl> void displayDownTab ( ) const ; <nl> mmm a / src / bittorrent . cpp <nl> ppp b / src / bittorrent . cpp <nl> void bittorrent : : readAlerts ( ) { <nl> } <nl> else if ( metadata_received_alert * p = dynamic_cast < metadata_received_alert * > ( a . get ( ) ) ) { <nl> QTorrentHandle h ( p - > handle ) ; <nl> - emit metadataReceived ( h ) ; <nl> + if ( h . is_valid ( ) ) { <nl> + qDebug ( " Received metadata for % s " , h . hash ( ) . toUtf8 ( ) . data ( ) ) ; <nl> + emit metadataReceived ( h ) ; <nl> + if ( h . is_paused ( ) ) { <nl> + / / XXX : Unfortunately libtorrent - rasterbar does not send a torrent_paused_alert <nl> + / / and the torrent can be paused when metadata is received <nl> + emit torrentPaused ( h ) ; <nl> + } <nl> + } <nl> } <nl> else if ( file_error_alert * p = dynamic_cast < file_error_alert * > ( a . get ( ) ) ) { <nl> QTorrentHandle h ( p - > handle ) ; <nl> void bittorrent : : readAlerts ( ) { <nl> addConsoleMessage ( tr ( " Couldn ' t listen on any of the given ports . " ) , QString : : fromUtf8 ( " red " ) ) ; <nl> / / emit portListeningFailure ( ) ; <nl> } <nl> + else if ( torrent_paused_alert * p = dynamic_cast < torrent_paused_alert * > ( a . get ( ) ) ) { <nl> + QTorrentHandle h ( p - > handle ) ; <nl> + qDebug ( " Received a torrent_paused_alert for % s " , h . hash ( ) . toUtf8 ( ) . data ( ) ) ; <nl> + if ( h . is_valid ( ) ) { <nl> + emit torrentPaused ( h ) ; <nl> + } <nl> + } <nl> else if ( tracker_error_alert * p = dynamic_cast < tracker_error_alert * > ( a . get ( ) ) ) { <nl> / / Level : fatal <nl> QTorrentHandle h ( p - > handle ) ; <nl> mmm a / src / bittorrent . h <nl> ppp b / src / bittorrent . h <nl> class bittorrent : public QObject { <nl> void downloadFromUrlFailure ( QString url , QString reason ) ; <nl> void torrentFinishedChecking ( QTorrentHandle & h ) ; <nl> void metadataReceived ( QTorrentHandle & h ) ; <nl> + void torrentPaused ( QTorrentHandle & h ) ; <nl> } ; <nl> <nl> # endif <nl>
- Ok . torrentless downloads paused state is now restored properly ( once metadata is received )
qbittorrent/qBittorrent
e42912693448bd8e4a105c98c940436c53333c81
2009-08-17T08:08:51Z
mmm a / src / searchengine / nova / engines / torrentreactor . py <nl> ppp b / src / searchengine / nova / engines / torrentreactor . py <nl> <nl> - # VERSION : 1 . 36 <nl> + # VERSION : 1 . 40 <nl> # AUTHORS : Gekko Dam Beer ( gekko04 @ users . sourceforge . net ) <nl> # CONTRIBUTORS : Christophe Dumez ( chris @ qbittorrent . org ) <nl> # Bruno Barbieri ( brunorex @ gmail . com ) <nl> <nl> from re import compile as re_compile <nl> <nl> class torrentreactor ( object ) : <nl> - url = ' http : / / www . torrentreactor . net ' <nl> + url = ' http : / / torrentreactor . com ' <nl> name = ' TorrentReactor ' <nl> supported_categories = { ' all ' : ' ' , ' movies ' : ' 5 ' , ' tv ' : ' 8 ' , ' music ' : ' 6 ' , ' games ' : ' 3 ' , ' anime ' : ' 1 ' , ' software ' : ' 2 ' } <nl> <nl> def download_torrent ( self , info ) : <nl> print ( download_file ( info ) ) <nl> <nl> class SimpleHTMLParser ( HTMLParser ) : <nl> - def __init__ ( self , results , url , * args ) : <nl> + def __init__ ( self , results , url , what ) : <nl> HTMLParser . __init__ ( self ) <nl> self . td_counter = None <nl> self . current_item = None <nl> self . results = results <nl> self . id = None <nl> self . url = url <nl> + self . what_list = urllib . unquote ( what ) . decode ( ' utf8 ' ) . split ( ) <nl> self . torrents_matcher = re_compile ( " / torrents / \ d + . * " ) <nl> self . dispatcher = { ' a ' : self . start_a , ' td ' : self . start_td } <nl> <nl> def start_td ( self , attr ) : <nl> self . td_counter = None <nl> # add item to results <nl> if self . current_item : <nl> + self . current_item [ ' name ' ] = self . current_item [ ' name ' ] . decode ( ' utf8 ' ) <nl> + # TorrentReactor returns unrelated results , we need to filter <nl> + if not all ( word in self . current_item [ ' name ' ] . lower ( ) for word in self . what_list ) : <nl> + return <nl> self . current_item [ ' engine_url ' ] = self . url <nl> if not self . current_item [ ' seeds ' ] . isdigit ( ) : <nl> self . current_item [ ' seeds ' ] = 0 <nl> def start_td ( self , attr ) : <nl> def search ( self , what , cat = ' all ' ) : <nl> i = 0 <nl> dat = ' ' <nl> - <nl> - while i < 11 : <nl> - results = [ ] <nl> - parser = self . SimpleHTMLParser ( results , self . url ) <nl> - dat = retrieve_url ( ' % s / torrent - search / % s / % s ? sort = seeders . desc & type = all & period = none & categories = % s ' % ( self . url , what , ( i * 35 ) , self . supported_categories [ cat ] ) ) <nl> + results = [ ] <nl> + parser = self . SimpleHTMLParser ( results , self . url , what ) <nl> + while i < 9 : <nl> + dat = retrieve_url ( ' % s / torrents - search / % s / % s ? sort = seeders . desc & type = all & period = none & categories = % s ' % ( self . url , what , ( i * 35 ) , self . supported_categories [ cat ] ) ) <nl> parser . feed ( dat ) <nl> - parser . close ( ) <nl> if len ( results ) < = 0 : <nl> break <nl> + del results [ : ] <nl> i + = 1 <nl> + parser . close ( ) <nl> mmm a / src / searchengine / nova / engines / versions . txt <nl> ppp b / src / searchengine / nova / engines / versions . txt <nl> kickasstorrents : 1 . 28 <nl> legittorrents : 2 . 00 <nl> mininova : 2 . 00 <nl> piratebay : 2 . 11 <nl> - torrentreactor : 1 . 36 <nl> + torrentreactor : 1 . 40 <nl> torrentz : 2 . 15 <nl> mmm a / src / searchengine / nova3 / engines / torrentreactor . py <nl> ppp b / src / searchengine / nova3 / engines / torrentreactor . py <nl> <nl> - # VERSION : 1 . 36 <nl> + # VERSION : 1 . 40 <nl> # AUTHORS : Gekko Dam Beer ( gekko04 @ users . sourceforge . net ) <nl> # CONTRIBUTORS : Christophe Dumez ( chris @ qbittorrent . org ) <nl> # Bruno Barbieri ( brunorex @ gmail . com ) <nl> <nl> from re import compile as re_compile <nl> <nl> class torrentreactor ( object ) : <nl> - url = ' http : / / www . torrentreactor . net ' <nl> + url = ' http : / / torrentreactor . com ' <nl> name = ' TorrentReactor ' <nl> supported_categories = { ' all ' : ' ' , ' movies ' : ' 5 ' , ' tv ' : ' 8 ' , ' music ' : ' 6 ' , ' games ' : ' 3 ' , ' anime ' : ' 1 ' , ' software ' : ' 2 ' } <nl> <nl> def download_torrent ( self , info ) : <nl> print ( download_file ( info ) ) <nl> <nl> class SimpleHTMLParser ( HTMLParser ) : <nl> - def __init__ ( self , results , url , * args ) : <nl> + def __init__ ( self , results , url , what ) : <nl> HTMLParser . __init__ ( self ) <nl> self . td_counter = None <nl> self . current_item = None <nl> self . results = results <nl> self . id = None <nl> self . url = url <nl> + self . what_list = parse . unquote ( what ) . split ( ) <nl> self . torrents_matcher = re_compile ( " / torrents / \ d + . * " ) <nl> self . dispatcher = { ' a ' : self . start_a , ' td ' : self . start_td } <nl> <nl> def start_td ( self , attr ) : <nl> self . td_counter = None <nl> # add item to results <nl> if self . current_item : <nl> + # TorrentReactor returns unrelated results , we need to filter <nl> + if not all ( word in self . current_item [ ' name ' ] . lower ( ) for word in self . what_list ) : <nl> + return <nl> self . current_item [ ' engine_url ' ] = self . url <nl> if not self . current_item [ ' seeds ' ] . isdigit ( ) : <nl> self . current_item [ ' seeds ' ] = 0 <nl> def start_td ( self , attr ) : <nl> def search ( self , what , cat = ' all ' ) : <nl> i = 0 <nl> dat = ' ' <nl> - <nl> - while i < 11 : <nl> - results = [ ] <nl> - parser = self . SimpleHTMLParser ( results , self . url ) <nl> - dat = retrieve_url ( ' % s / torrent - search / % s / % s ? sort = seeders . desc & type = all & period = none & categories = % s ' % ( self . url , what , ( i * 35 ) , self . supported_categories [ cat ] ) ) <nl> + results = [ ] <nl> + parser = self . SimpleHTMLParser ( results , self . url , what ) <nl> + while i < 9 : <nl> + dat = retrieve_url ( ' % s / torrents - search / % s / % s ? sort = seeders . desc & type = all & period = none & categories = % s ' % ( self . url , what , ( i * 35 ) , self . supported_categories [ cat ] ) ) <nl> parser . feed ( dat ) <nl> - parser . close ( ) <nl> if len ( results ) < = 0 : <nl> break <nl> + del results [ : ] <nl> i + = 1 <nl> + parser . close ( ) <nl> mmm a / src / searchengine / nova3 / engines / versions . txt <nl> ppp b / src / searchengine / nova3 / engines / versions . txt <nl> kickasstorrents : 1 . 28 <nl> legittorrents : 2 . 00 <nl> mininova : 2 . 00 <nl> piratebay : 2 . 11 <nl> - torrentreactor : 1 . 36 <nl> + torrentreactor : 1 . 40 <nl> torrentz : 2 . 15 <nl>
[ search engine ] Update TorrentReactor
qbittorrent/qBittorrent
b249b461d70ee37f5186ea780bb0db08a14e2b6d
2015-06-28T10:54:34Z
mmm a / benchmarks / operator_benchmark / benchmark_test_generator . py <nl> ppp b / benchmarks / operator_benchmark / benchmark_test_generator . py <nl> <nl> from operator_benchmark . benchmark_pytorch import PyTorchOperatorTestCase <nl> from operator_benchmark . benchmark_utils import * # noqa <nl> <nl> + import torch <nl> + <nl> <nl> def generate_test ( configs , map_config , ops , OperatorTestCase ) : <nl> " " " <nl>
Fix in benchmark_test_generator ( )
pytorch/pytorch
eecf52b444bac5e64dd0093d9fa0f0dc3aeff84c
2019-05-08T00:03:25Z
mmm a / CHANGELOG <nl> ppp b / CHANGELOG <nl> <nl> v2 . 4 . 0 ( XXXX - XX - XX ) <nl> mmmmmmmmmmmmmmmmmm - <nl> <nl> - * added AQL list functions ` PUSH ` , ` POP ` , ` UNSHIFT ` , ` SHIFT ` , ` REMOVE_ALL ` , <nl> + * added AQL list functions ` PUSH ` , ` POP ` , ` UNSHIFT ` , ` SHIFT ` , ` REMOVE_VALUES ` , <nl> ` REMOVE_VALUE ` , ` REMOVE_NTH ` and ` APPEND ` <nl> <nl> * added AQL functions ` CALL ` and ` APPLY ` to dynamically call other functions <nl> mmm a / Documentation / Books / Users / Aql / ListFunctions . mdpp <nl> ppp b / Documentation / Books / Users / Aql / ListFunctions . mdpp <nl> AQL supports the following functions to operate on list values : <nl> APPEND ( [ 1 , 2 , 3 ] , [ 3 , 4 , 5 , 2 , 9 ] , true ) <nl> <nl> - * PUSH ( list , value , unique ) * : Adds * value * to the list specified by * list * . If <nl> - * unique * is set to true , then * value * is not added if already present in the list . <nl> + * unique * is set to true , then * value * is not added if already present in the list . <nl> The modified list is returned . The value is added at the end of the list ( right side ) . <nl> <nl> + Note : non - unique elements will not be removed from the list if they were already present <nl> + before the call to ` PUSH ` . The * unique * flag will only control if the value will <nl> + be added again to the list if already present . To make a list unique , use the ` UNIQUE ` <nl> + function . <nl> + <nl> / * [ 1 , 2 , 3 , 4 ] * / <nl> PUSH ( [ 1 , 2 , 3 ] , 4 ) <nl> <nl> AQL supports the following functions to operate on list values : <nl> - * UNSHIFT ( list , value , unique ) * : Adds * value * to the list specified by * list * . If <nl> * unique * is set to true , then * value * is not added if already present in the list . <nl> The modified list is returned . The value is added at the start of the list ( left side ) . <nl> + <nl> + Note : non - unique elements will not be removed from the list if they were already present <nl> + before the call to ` UNSHIFT ` . The * unique * flag will only control if the value will <nl> + be added again to the list if already present . To make a list unique , use the ` UNIQUE ` <nl> + function . <nl> <nl> / * [ 4 , 1 , 2 , 3 ] * / <nl> UNSHIFT ( [ 1 , 2 , 3 ] , 4 ) <nl> AQL supports the following functions to operate on list values : <nl> / * [ " b " , " b " , " a " , " c " ] * / <nl> REMOVE_VALUE ( [ " a " , " b " , " b " , " a " , " c " ] , " a " , 1 ) <nl> <nl> - - * REMOVE_ALL ( list , values ) * : Removes all occurrences of any of the values specified <nl> + - * REMOVE_VALUES ( list , values ) * : Removes all occurrences of any of the values specified <nl> in list * values * from the list specified by * list * . <nl> <nl> / * [ " b " , " c " , " e " , " g " ] * / <nl> - REMOVE_ALL ( [ " a " , " b " , " c " , " d " , " e " , " f " , " g " ] , [ " a " , " f " , " d " ] ) <nl> + REMOVE_VALUES ( [ " a " , " b " , " c " , " d " , " e " , " f " , " g " ] , [ " a " , " f " , " d " ] ) <nl> <nl> - * REMOVE_NTH ( list , position ) * : Removes the element at position * position * from the <nl> list specified by * list * . Positions start at 0 . Negative positions are supported , <nl> mmm a / arangod / Aql / Executor . cpp <nl> ppp b / arangod / Aql / Executor . cpp <nl> std : : unordered_map < std : : string , Function const > const Executor : : FunctionNames { <nl> { " LAST " , Function ( " LAST " , " AQL_LAST " , " l " , true , false , true ) } , <nl> { " NTH " , Function ( " NTH " , " AQL_NTH " , " l , n " , true , false , true ) } , <nl> { " POSITION " , Function ( " POSITION " , " AQL_POSITION " , " l , . | b " , true , false , true ) } , <nl> - / / { " CALL " , Function ( " CALL " , " AQL_CALL " , " l , s | . + " , false , true , false ) } , <nl> - / / { " APPLY " , Function ( " APPLY " , " AQL_APPLY " , " l , s | . " , false , true , false ) } , <nl> { " CALL " , Function ( " CALL " , " AQL_CALL " , " s | . + " , false , true , false ) } , <nl> { " APPLY " , Function ( " APPLY " , " AQL_APPLY " , " s | l " , false , true , false ) } , <nl> { " PUSH " , Function ( " PUSH " , " AQL_PUSH " , " l , . | b " , true , false , false ) } , <nl> std : : unordered_map < std : : string , Function const > const Executor : : FunctionNames { <nl> { " SHIFT " , Function ( " SHIFT " , " AQL_SHIFT " , " l " , true , false , false ) } , <nl> { " UNSHIFT " , Function ( " UNSHIFT " , " AQL_UNSHIFT " , " l , . | b " , true , false , false ) } , <nl> { " REMOVE_VALUE " , Function ( " REMOVE_VALUE " , " AQL_REMOVE_VALUE " , " l , . | n " , true , false , false ) } , <nl> - { " REMOVE_ALL " , Function ( " REMOVE_ALL " , " AQL_REMOVE_ALL " , " l , lz " , true , false , false ) } , <nl> + { " REMOVE_VALUES " , Function ( " REMOVE_VALUES " , " AQL_REMOVE_VALUES " , " l , lz " , true , false , false ) } , <nl> { " REMOVE_NTH " , Function ( " REMOVE_NTH " , " AQL_REMOVE_NTH " , " l , n " , true , false , false ) } , <nl> <nl> / / document functions <nl> mmm a / js / server / modules / org / arangodb / aql . js <nl> ppp b / js / server / modules / org / arangodb / aql . js <nl> function AQL_APPLY ( name , parameters ) { <nl> / / / @ brief removes elements from a list <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> <nl> - function AQL_REMOVE_ALL ( list , values ) { <nl> + function AQL_REMOVE_VALUES ( list , values ) { <nl> " use strict " ; <nl> <nl> var type = TYPEWEIGHT ( values ) ; <nl> function AQL_REMOVE_ALL ( list , values ) { <nl> return list ; <nl> } <nl> else if ( type ! = = TYPEWEIGHT_LIST ) { <nl> - WARN ( " REMOVE_ALL " , INTERNAL . errors . ERROR_QUERY_FUNCTION_ARGUMENT_TYPE_MISMATCH ) ; <nl> + WARN ( " REMOVE_VALUES " , INTERNAL . errors . ERROR_QUERY_FUNCTION_ARGUMENT_TYPE_MISMATCH ) ; <nl> return null ; <nl> } <nl> <nl> function AQL_REMOVE_ALL ( list , values ) { <nl> return copy ; <nl> } <nl> <nl> - WARN ( " REMOVE_ALL " , INTERNAL . errors . ERROR_QUERY_FUNCTION_ARGUMENT_TYPE_MISMATCH ) ; <nl> + WARN ( " REMOVE_VALUES " , INTERNAL . errors . ERROR_QUERY_FUNCTION_ARGUMENT_TYPE_MISMATCH ) ; <nl> return null ; <nl> } <nl> <nl> exports . AQL_UNION_DISTINCT = AQL_UNION_DISTINCT ; <nl> exports . AQL_CALL = AQL_CALL ; <nl> exports . AQL_APPLY = AQL_APPLY ; <nl> exports . AQL_REMOVE_VALUE = AQL_REMOVE_VALUE ; <nl> - exports . AQL_REMOVE_ALL = AQL_REMOVE_ALL ; <nl> + exports . AQL_REMOVE_VALUES = AQL_REMOVE_VALUES ; <nl> exports . AQL_REMOVE_NTH = AQL_REMOVE_NTH ; <nl> exports . AQL_PUSH = AQL_PUSH ; <nl> exports . AQL_APPEND = AQL_APPEND ; <nl> mmm a / js / server / tests / aql - functions - list . js <nl> ppp b / js / server / tests / aql - functions - list . js <nl> function ahuacatlListTestSuite ( ) { <nl> } , <nl> <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - / / / @ brief test remove_all function <nl> + / / / @ brief test removeValues function <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> <nl> - testRemoveAll : function ( ) { <nl> + testRemoveValues : function ( ) { <nl> var data = [ <nl> [ [ ] , [ [ ] , [ ] ] ] , <nl> [ [ ] , [ [ ] , [ " 1 " , " 2 " ] ] ] , <nl> function ahuacatlListTestSuite ( ) { <nl> ] ; <nl> <nl> data . forEach ( function ( d ) { <nl> - var actual = getQueryResults ( " RETURN REMOVE_ALL ( " + d [ 1 ] . map ( function ( v ) { return JSON . stringify ( v ) ; } ) . join ( " , " ) + " ) " ) ; <nl> + var actual = getQueryResults ( " RETURN REMOVE_VALUES ( " + d [ 1 ] . map ( function ( v ) { return JSON . stringify ( v ) ; } ) . join ( " , " ) + " ) " ) ; <nl> assertEqual ( d [ 0 ] , actual [ 0 ] , d ) ; <nl> } ) ; <nl> } , <nl> <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - / / / @ brief test remove_all function <nl> + / / / @ brief test removeValues function <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> <nl> - testRemoveAllInvalid : function ( ) { <nl> - assertQueryError ( errors . ERROR_QUERY_FUNCTION_ARGUMENT_NUMBER_MISMATCH . code , " RETURN REMOVE_ALL ( ) " ) ; <nl> - assertQueryError ( errors . ERROR_QUERY_FUNCTION_ARGUMENT_NUMBER_MISMATCH . code , " RETURN REMOVE_ALL ( [ ] ) " ) ; <nl> - assertQueryError ( errors . ERROR_QUERY_FUNCTION_ARGUMENT_NUMBER_MISMATCH . code , " RETURN REMOVE_ALL ( [ ] , [ ] , true ) " ) ; <nl> + testRemoveValuesInvalid : function ( ) { <nl> + assertQueryError ( errors . ERROR_QUERY_FUNCTION_ARGUMENT_NUMBER_MISMATCH . code , " RETURN REMOVE_VALUES ( ) " ) ; <nl> + assertQueryError ( errors . ERROR_QUERY_FUNCTION_ARGUMENT_NUMBER_MISMATCH . code , " RETURN REMOVE_VALUES ( [ ] ) " ) ; <nl> + assertQueryError ( errors . ERROR_QUERY_FUNCTION_ARGUMENT_NUMBER_MISMATCH . code , " RETURN REMOVE_VALUES ( [ ] , [ ] , true ) " ) ; <nl> } , <nl> <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - / / / @ brief test remove_value function <nl> + / / / @ brief test removeValue function <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> <nl> testRemoveValue : function ( ) { <nl> function ahuacatlListTestSuite ( ) { <nl> } , <nl> <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - / / / @ brief test remove_value function <nl> + / / / @ brief test removeValue function <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> <nl> testRemoveValueInvalid : function ( ) { <nl> function ahuacatlListTestSuite ( ) { <nl> } , <nl> <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - / / / @ brief test remove_nth function <nl> + / / / @ brief test removeNth function <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> <nl> testRemoveNth : function ( ) { <nl> function ahuacatlListTestSuite ( ) { <nl> } , <nl> <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> - / / / @ brief test remove_nth function <nl> + / / / @ brief test removeNth function <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> <nl> testRemoveNthInvalid : function ( ) { <nl>
renamed function , updated documentation
arangodb/arangodb
ed919090ea64b184672698864d74253b9343ab70
2014-11-20T13:46:32Z
mmm a / ci / test / 00_setup_env_native_qt5 . sh <nl> ppp b / ci / test / 00_setup_env_native_qt5 . sh <nl> export RUN_UNIT_TESTS_SEQUENTIAL = " true " <nl> export RUN_UNIT_TESTS = " false " <nl> export GOAL = " install " <nl> export TEST_PREVIOUS_RELEASES = true <nl> + export PREVIOUS_RELEASES_TO_DOWNLOAD = " v0 . 15 . 2 v0 . 16 . 3 v0 . 17 . 1 v0 . 18 . 1 v0 . 19 . 1 " <nl> export BITCOIN_CONFIG = " - - enable - zmq - - with - gui = qt5 - - enable - glibc - back - compat - - enable - reduce - exports - - enable - c + + 17 - - enable - debug CFLAGS = \ " - g0 - O2 - funsigned - char \ " CXXFLAGS = \ " - g0 - O2 - funsigned - char \ " " <nl> mmm a / ci / test / 05_before_script . sh <nl> ppp b / ci / test / 05_before_script . sh <nl> if [ - z " $ NO_DEPENDS " ] ; then <nl> fi <nl> DOCKER_EXEC $ SHELL_OPTS make $ MAKEJOBS - C depends HOST = $ HOST $ DEP_OPTS <nl> fi <nl> - if [ " $ TEST_PREVIOUS_RELEASES " = " true " ] ; then <nl> + if [ - n " $ PREVIOUS_RELEASES_TO_DOWNLOAD " ] ; then <nl> BEGIN_FOLD previous - versions <nl> - DOCKER_EXEC contrib / devtools / previous_release . sh - b - t " $ PREVIOUS_RELEASES_DIR " v0 . 15 . 2 v0 . 16 . 3 v0 . 17 . 1 v0 . 18 . 1 v0 . 19 . 1 <nl> + DOCKER_EXEC contrib / devtools / previous_release . sh - b - t " $ PREVIOUS_RELEASES_DIR " " $ { PREVIOUS_RELEASES_TO_DOWNLOAD } " <nl> END_FOLD <nl> fi <nl>
[ ci ] make list of previous releases to download a setting
bitcoin/bitcoin
d135c294764add81683ba47575f9a5dde7d7c07f
2020-05-08T14:13:29Z
mmm a / test / intl / testcfg . py <nl> ppp b / test / intl / testcfg . py <nl> def ListTests ( self , context ) : <nl> for filename in files : <nl> if ( filename . endswith ( " . js " ) and filename ! = " assert . js " and <nl> filename ! = " utils . js " ) : <nl> - fullpath = os . path . join ( dirname , filename ) <nl> - relpath = fullpath [ len ( self . root ) + 1 : - 3 ] <nl> - testname = relpath . replace ( os . path . sep , " / " ) <nl> + testname = os . path . join ( dirname [ len ( self . root ) + 1 : ] , filename [ : - 3 ] ) <nl> test = testcase . TestCase ( self , testname ) <nl> tests . append ( test ) <nl> return tests <nl> mmm a / test / message / testcfg . py <nl> ppp b / test / message / testcfg . py <nl> def ListTests ( self , context ) : <nl> files . sort ( ) <nl> for filename in files : <nl> if filename . endswith ( " . js " ) : <nl> - fullpath = os . path . join ( dirname , filename ) <nl> - relpath = fullpath [ len ( self . root ) + 1 : - 3 ] <nl> - testname = relpath . replace ( os . path . sep , " / " ) <nl> + testname = os . path . join ( dirname [ len ( self . root ) + 1 : ] , filename [ : - 3 ] ) <nl> test = testcase . TestCase ( self , testname ) <nl> tests . append ( test ) <nl> return tests <nl> mmm a / test / mjsunit / testcfg . py <nl> ppp b / test / mjsunit / testcfg . py <nl> def ListTests ( self , context ) : <nl> files . sort ( ) <nl> for filename in files : <nl> if filename . endswith ( " . js " ) and filename ! = " mjsunit . js " : <nl> - fullpath = os . path . join ( dirname , filename ) <nl> - relpath = fullpath [ len ( self . root ) + 1 : - 3 ] <nl> - testname = relpath . replace ( os . path . sep , " / " ) <nl> + testname = os . path . join ( dirname [ len ( self . root ) + 1 : ] , filename [ : - 3 ] ) <nl> test = testcase . TestCase ( self , testname ) <nl> tests . append ( test ) <nl> return tests <nl> mmm a / test / mozilla / testcfg . py <nl> ppp b / test / mozilla / testcfg . py <nl> def ListTests ( self , context ) : <nl> files . sort ( ) <nl> for filename in files : <nl> if filename . endswith ( " . js " ) and not filename in FRAMEWORK : <nl> - fullpath = os . path . join ( dirname , filename ) <nl> - relpath = fullpath [ len ( self . testroot ) + 1 : - 3 ] <nl> - testname = relpath . replace ( os . path . sep , " / " ) <nl> + testname = os . path . join ( dirname [ len ( self . testroot ) + 1 : ] , <nl> + filename [ : - 3 ] ) <nl> case = testcase . TestCase ( self , testname ) <nl> tests . append ( case ) <nl> return tests <nl> mmm a / test / test262 - es6 / testcfg . py <nl> ppp b / test / test262 - es6 / testcfg . py <nl> def ListTests ( self , context ) : <nl> files . sort ( ) <nl> for filename in files : <nl> if filename . endswith ( " . js " ) : <nl> - fullpath = os . path . join ( dirname , filename ) <nl> - relpath = fullpath [ len ( self . testroot ) + 1 : - 3 ] <nl> - testname = relpath . replace ( os . path . sep , " / " ) <nl> + testname = os . path . join ( dirname [ len ( self . testroot ) + 1 : ] , <nl> + filename [ : - 3 ] ) <nl> case = testcase . TestCase ( self , testname ) <nl> tests . append ( case ) <nl> return tests <nl> mmm a / test / test262 / testcfg . py <nl> ppp b / test / test262 / testcfg . py <nl> def ListTests ( self , context ) : <nl> files . sort ( ) <nl> for filename in files : <nl> if filename . endswith ( " . js " ) : <nl> - fullpath = os . path . join ( dirname , filename ) <nl> - relpath = fullpath [ len ( self . testroot ) + 1 : - 3 ] <nl> - testname = relpath . replace ( os . path . sep , " / " ) <nl> + testname = os . path . join ( dirname [ len ( self . testroot ) + 1 : ] , <nl> + filename [ : - 3 ] ) <nl> case = testcase . TestCase ( self , testname ) <nl> tests . append ( case ) <nl> return tests <nl> mmm a / test / webkit / testcfg . py <nl> ppp b / test / webkit / testcfg . py <nl> def ListTests ( self , context ) : <nl> files . sort ( ) <nl> for filename in files : <nl> if filename . endswith ( " . js " ) : <nl> - fullpath = os . path . join ( dirname , filename ) <nl> - relpath = fullpath [ len ( self . root ) + 1 : - 3 ] <nl> - testname = relpath . replace ( os . path . sep , " / " ) <nl> + testname = os . path . join ( dirname [ len ( self . root ) + 1 : ] , filename [ : - 3 ] ) <nl> test = testcase . TestCase ( self , testname ) <nl> tests . append ( test ) <nl> return tests <nl> mmm a / tools / testrunner / local / testsuite . py <nl> ppp b / tools / testrunner / local / testsuite . py <nl> def FilterTestCasesByArgs ( self , args ) : <nl> continue <nl> if len ( argpath ) = = 1 or ( len ( argpath ) = = 2 and argpath [ 1 ] = = ' * ' ) : <nl> return # Don ' t filter , run all tests in this suite . <nl> - path = ' / ' . join ( argpath [ 1 : ] ) <nl> + path = os . path . sep . join ( argpath [ 1 : ] ) <nl> if path [ - 1 ] = = ' * ' : <nl> path = path [ : - 1 ] <nl> globs . append ( path ) <nl>
Revert of [ test ] Fix cctest path separators on Windows ( patchset id : 20001 of https : / / codereview . chromium . org / 1348653003 / )
v8/v8
5f44a9105980e7ca3a444c9c4293ee9442a8139f
2015-09-17T12:00:23Z
mmm a / template / xcode3 / cocos2d - x_app / ios / AppController . mm <nl> ppp b / template / xcode3 / cocos2d - x_app / ios / AppController . mm <nl> - ( void ) applicationDidReceiveMemoryWarning : ( UIApplication * ) application { <nl> / * <nl> Free up as much memory as possible by purging cached data objects that can be recreated ( or reloaded from disk ) later . <nl> * / <nl> + cocos2d : : CCDirector : : sharedDirector ( ) - > purgeCachedData ( ) ; <nl> } <nl> <nl> <nl> mmm a / template / xcode3 / cocos2d - x_box2d_app / ios / AppController . mm <nl> ppp b / template / xcode3 / cocos2d - x_box2d_app / ios / AppController . mm <nl> - ( void ) applicationDidReceiveMemoryWarning : ( UIApplication * ) application { <nl> / * <nl> Free up as much memory as possible by purging cached data objects that can be recreated ( or reloaded from disk ) later . <nl> * / <nl> + cocos2d : : CCDirector : : sharedDirector ( ) - > purgeCachedData ( ) ; <nl> } <nl> <nl> <nl> mmm a / template / xcode3 / cocos2d - x_chipmunk_app / ios / AppController . mm <nl> ppp b / template / xcode3 / cocos2d - x_chipmunk_app / ios / AppController . mm <nl> - ( void ) applicationDidReceiveMemoryWarning : ( UIApplication * ) application { <nl> / * <nl> Free up as much memory as possible by purging cached data objects that can be recreated ( or reloaded from disk ) later . <nl> * / <nl> + cocos2d : : CCDirector : : sharedDirector ( ) - > purgeCachedData ( ) ; <nl> } <nl> <nl> <nl> mmm a / template / xcode3 / cocos2d - x_lua_app / ios / AppController . mm <nl> ppp b / template / xcode3 / cocos2d - x_lua_app / ios / AppController . mm <nl> - ( void ) applicationDidReceiveMemoryWarning : ( UIApplication * ) application { <nl> / * <nl> Free up as much memory as possible by purging cached data objects that can be recreated ( or reloaded from disk ) later . <nl> * / <nl> + cocos2d : : CCDirector : : sharedDirector ( ) - > purgeCachedData ( ) ; <nl> } <nl> <nl> <nl> mmm a / template / xcode4 / cocos2dx . xctemplate / ios / AppController . mm <nl> ppp b / template / xcode4 / cocos2dx . xctemplate / ios / AppController . mm <nl> - ( void ) applicationDidReceiveMemoryWarning : ( UIApplication * ) application { <nl> / * <nl> Free up as much memory as possible by purging cached data objects that can be recreated ( or reloaded from disk ) later . <nl> * / <nl> + cocos2d : : CCDirector : : sharedDirector ( ) - > purgeCachedData ( ) ; <nl> } <nl> <nl> <nl> mmm a / template / xcode4 / cocos2dx_box2d . xctemplate / ios / AppController . mm <nl> ppp b / template / xcode4 / cocos2dx_box2d . xctemplate / ios / AppController . mm <nl> - ( void ) applicationDidReceiveMemoryWarning : ( UIApplication * ) application { <nl> / * <nl> Free up as much memory as possible by purging cached data objects that can be recreated ( or reloaded from disk ) later . <nl> * / <nl> + cocos2d : : CCDirector : : sharedDirector ( ) - > purgeCachedData ( ) ; <nl> } <nl> <nl> <nl> mmm a / template / xcode4 / cocos2dx_chipmunk . xctemplate / ios / AppController . mm <nl> ppp b / template / xcode4 / cocos2dx_chipmunk . xctemplate / ios / AppController . mm <nl> - ( void ) applicationDidReceiveMemoryWarning : ( UIApplication * ) application { <nl> / * <nl> Free up as much memory as possible by purging cached data objects that can be recreated ( or reloaded from disk ) later . <nl> * / <nl> + cocos2d : : CCDirector : : sharedDirector ( ) - > purgeCachedData ( ) ; <nl> } <nl> <nl> <nl> mmm a / template / xcode4 / cocos2dx_lua . xctemplate / ios / AppController . mm <nl> ppp b / template / xcode4 / cocos2dx_lua . xctemplate / ios / AppController . mm <nl> - ( void ) applicationDidReceiveMemoryWarning : ( UIApplication * ) application { <nl> / * <nl> Free up as much memory as possible by purging cached data objects that can be recreated ( or reloaded from disk ) later . <nl> * / <nl> + cocos2d : : CCDirector : : sharedDirector ( ) - > purgeCachedData ( ) ; <nl> } <nl> <nl> <nl>
fixed : free cached data when receivint memory warning on iOS
cocos2d/cocos2d-x
80e6c16913fbcb898b61bb33ae1c77e567e0cf6c
2011-12-20T03:35:50Z
mmm a / jstests / noPassthrough / wt_operation_stats . js <nl> ppp b / jstests / noPassthrough / wt_operation_stats . js <nl> <nl> cur . next ( ) ; <nl> } <nl> <nl> - checkLogStats ( ) ; <nl> / / Look for the storage statistics in the profiled output of the find command . <nl> let profileObj = getLatestProfilerEntry ( testDB , { op : " query " , ns : " wt_op_stat . foo " } ) ; <nl> checkSystemProfileStats ( profileObj , " bytesRead " ) ; <nl> <nl> + / / Stopping the mongod waits until all of its logs have been read by the mongo shell . <nl> MongoRunner . stopMongod ( conn ) ; <nl> + checkLogStats ( ) ; <nl> <nl> jsTestLog ( " Success ! " ) ; <nl> } <nl>
SERVER - 39061 Fix the wt_operation_stats test to wait for the operation log to appear .
mongodb/mongo
371197e4bab715a83272a4472e118ee5c5cbbf7c
2019-03-11T23:10:56Z
mmm a / configure . ac <nl> ppp b / configure . ac <nl> AC_ARG_WITH ( [ utils ] , <nl> [ build_bitcoin_utils = $ withval ] , <nl> [ build_bitcoin_utils = yes ] ) <nl> <nl> + AC_ARG_WITH ( [ libs ] , <nl> + [ AS_HELP_STRING ( [ - - with - libs ] , <nl> + [ build libraries ( default = yes ) ] ) ] , <nl> + [ build_bitcoin_libs = $ withval ] , <nl> + [ build_bitcoin_libs = yes ] ) <nl> + <nl> AC_ARG_WITH ( [ daemon ] , <nl> [ AS_HELP_STRING ( [ - - with - daemon ] , <nl> [ build bitcoind daemon ( default = yes ) ] ) ] , <nl> AC_MSG_CHECKING ( [ whether to build utils ( bitcoin - cli bitcoin - tx ) ] ) <nl> AM_CONDITIONAL ( [ BUILD_BITCOIN_UTILS ] , [ test x $ build_bitcoin_utils = xyes ] ) <nl> AC_MSG_RESULT ( $ build_bitcoin_utils ) <nl> <nl> + AC_MSG_CHECKING ( [ whether to build libraries ] ) <nl> + AM_CONDITIONAL ( [ BUILD_BITCOIN_LIBS ] , [ test x $ build_bitcoin_libs = xyes ] ) <nl> + if test x $ build_bitcoin_libs = xyes ; then <nl> + AC_DEFINE ( HAVE_CONSENSUS_LIB , 1 , [ Define this symbol if the consensus lib has been built ] ) <nl> + fi <nl> + AC_MSG_RESULT ( $ build_bitcoin_libs ) <nl> + <nl> dnl sets $ bitcoin_enable_qt , $ bitcoin_enable_qt_test , $ bitcoin_enable_qt_dbus <nl> BITCOIN_QT_CONFIGURE ( [ $ use_pkgconfig ] , [ qt4 ] ) <nl> <nl> else <nl> AC_MSG_RESULT ( [ no ] ) <nl> fi <nl> <nl> - if test x $ build_bitcoin_utils $ build_bitcoind $ bitcoin_enable_qt $ use_tests = xnononono ; then <nl> - AC_MSG_ERROR ( [ No targets ! Please specify at least one of : - - with - utils - - with - daemon - - with - gui or - - enable - tests ] ) <nl> + if test x $ build_bitcoin_utils $ build_bitcoin_libs $ build_bitcoind $ bitcoin_enable_qt $ use_tests = xnononono ; then <nl> + AC_MSG_ERROR ( [ No targets ! Please specify at least one of : - - with - utils - - with - libs - - with - daemon - - with - gui or - - enable - tests ] ) <nl> fi <nl> <nl> AM_CONDITIONAL ( [ TARGET_DARWIN ] , [ test x $ TARGET_OS = xdarwin ] ) <nl> mmm a / src / Makefile . am <nl> ppp b / src / Makefile . am <nl> BITCOIN_INCLUDES + = $ ( BDB_CPPFLAGS ) <nl> noinst_LIBRARIES + = libbitcoin_wallet . a <nl> endif <nl> <nl> + if BUILD_BITCOIN_LIBS <nl> lib_LTLIBRARIES = libbitcoinconsensus . la <nl> + LIBBITCOIN_CONSENSUS = libbitcoinconsensus . la <nl> + else <nl> + LIBBITCOIN_CONSENSUS = <nl> + endif <nl> <nl> bin_PROGRAMS = <nl> TESTS = <nl> libbitcoinconsensus_la_CPPFLAGS = $ ( CRYPTO_CFLAGS ) - I $ ( builddir ) / obj - DBUILD_BIT <nl> if USE_LIBSECP256K1 <nl> libbitcoinconsensus_la_LIBADD + = secp256k1 / libsecp256k1 . la <nl> endif <nl> + endif <nl> <nl> CLEANFILES = leveldb / libleveldb . a leveldb / libmemenv . a * . gcda * . gcno <nl> <nl> mmm a / src / Makefile . test . include <nl> ppp b / src / Makefile . test . include <nl> if ENABLE_WALLET <nl> test_test_bitcoin_LDADD + = $ ( LIBBITCOIN_WALLET ) <nl> endif <nl> <nl> - test_test_bitcoin_LDADD + = $ ( BDB_LIBS ) $ ( SSL_LIBS ) $ ( CRYPTO_LIBS ) $ ( MINIUPNPC_LIBS ) <nl> + test_test_bitcoin_LDADD + = $ ( LIBBITCOIN_CONSENSUS ) $ ( BDB_LIBS ) $ ( SSL_LIBS ) $ ( CRYPTO_LIBS ) $ ( MINIUPNPC_LIBS ) <nl> test_test_bitcoin_LDFLAGS = $ ( RELDFLAGS ) $ ( AM_LDFLAGS ) $ ( LIBTOOL_APP_LDFLAGS ) - static - libtool - libs <nl> <nl> nodist_test_test_bitcoin_SOURCES = $ ( GENERATED_TEST_FILES ) <nl>
build : add - - with - libs so that libs are optional
bitcoin/bitcoin
cdd36c6c5cc309d98f941a4c78d9642c92c1e46f
2014-11-20T03:31:10Z
mmm a / lib / SILPasses / GlobalARCOpts . cpp <nl> ppp b / lib / SILPasses / GlobalARCOpts . cpp <nl> optimizeReferenceCountMatchingSet ( ARCMatchingSet & MatchSet , <nl> SILInstruction * NewIncrement = createIncrement ( MatchSet . Ptr , InsertPt ) ; <nl> ( void ) NewIncrement ; <nl> DEBUG ( llvm : : dbgs ( ) < < " Inserting new increment : " < < * NewIncrement <nl> - < < " \ n " <nl> - " At insertion point : " < < * InsertPt < < " \ n " ) ; <nl> + < < " At insertion point : " < < * InsertPt ) ; <nl> + + NumRefCountOpsMoved ; <nl> } <nl> <nl> optimizeReferenceCountMatchingSet ( ARCMatchingSet & MatchSet , <nl> SILInstruction * NewDecrement = createDecrement ( MatchSet . Ptr , InsertPt ) ; <nl> ( void ) NewDecrement ; <nl> DEBUG ( llvm : : dbgs ( ) < < " Inserting new NewDecrement : " < < * NewDecrement <nl> - < < " \ nAt insertion point : " < < * InsertPt < < " \ n " ) ; <nl> + < < " At insertion point : " < < * InsertPt ) ; <nl> + + NumRefCountOpsMoved ; <nl> } <nl> <nl>
[ g - arc - opts ] Remove excessive indentation from DEBUG messages .
apple/swift
1b907dce9aeeb95ba99b4334bf6d1a33149ba245
2014-06-01T22:22:23Z
mmm a / addons / skin . estuary / xml / DialogSeekBar . xml <nl> ppp b / addons / skin . estuary / xml / DialogSeekBar . xml <nl> <nl> < visible > player . chaptercount < / visible > <nl> < / control > <nl> < control type = " group " > <nl> - < visible > Player . Recording + ! PVR . ChannelPreviewActive < / visible > <nl> + < visible > Player . Recording + ! Player . ChannelPreviewActive < / visible > <nl> < control type = " image " > <nl> < top > 100 < / top > <nl> < left > 20 < / left > <nl>
[ estuary ] Fix channel osd recording indicator visibility .
xbmc/xbmc
a1d5d3c172df55fe523605a622d4a122b39c3e0a
2017-05-03T16:58:59Z
mmm a / cmake / treedata / android / subdirs . txt <nl> ppp b / cmake / treedata / android / subdirs . txt <nl> xbmc / network / android network / android <nl> xbmc / peripherals / bus / linux peripherals / bus / linux <nl> xbmc / peripherals / bus / android peripherals / bus / android <nl> xbmc / powermanagement / android powermanagement / android <nl> - xbmc / storage / android storage / android <nl> xbmc / filesystem / posix filesystem / posix <nl> xbmc / utils / posix utils_posix <nl> xbmc / windowing / android windowing / android <nl> xbmc / platform / posix posix <nl> xbmc / platform / android / activity android_activity <nl> xbmc / platform / android / bionic_supplement android_bionicsupplement <nl> + xbmc / platform / android / storage platform / android / storage <nl> similarity index 100 % <nl> rename from xbmc / storage / android / AndroidStorageProvider . cpp <nl> rename to xbmc / platform / android / storage / AndroidStorageProvider . cpp <nl> similarity index 100 % <nl> rename from xbmc / storage / android / AndroidStorageProvider . h <nl> rename to xbmc / platform / android / storage / AndroidStorageProvider . h <nl> similarity index 65 % <nl> rename from xbmc / storage / android / CMakeLists . txt <nl> rename to xbmc / platform / android / storage / CMakeLists . txt <nl> mmm a / xbmc / storage / android / CMakeLists . txt <nl> ppp b / xbmc / platform / android / storage / CMakeLists . txt <nl> set ( SOURCES AndroidStorageProvider . cpp ) <nl> <nl> set ( HEADERS AndroidStorageProvider . h ) <nl> <nl> - core_add_library ( storage_android ) <nl> + core_add_library ( platform_android_storage ) <nl>
[ android ] storage : move implementation to platform folder .
xbmc/xbmc
1ecb944d42b261897f4f1e4f7eca8af1277c90d9
2018-04-04T08:32:57Z
mmm a / Marlin / ultralcd . cpp <nl> ppp b / Marlin / ultralcd . cpp <nl> void lcd_set_home_offsets ( ) { <nl> <nl> int babysteps_done = 0 ; <nl> <nl> - static void _lcd_babystep ( const int axis , const char * msg ) { <nl> + static void _lcd_babystep ( const AxisEnum axis , const char * msg ) { <nl> ENCODER_DIRECTION_NORMAL ( ) ; <nl> if ( encoderPosition ) { <nl> int distance = ( int32_t ) encoderPosition * BABYSTEP_MULTIPLICATOR ; <nl>
Merge pull request from thinkyhead / rc_localize_babystepping
MarlinFirmware/Marlin
d7819298ca53b8336b09aa147c77da32a6589112
2016-05-06T04:15:52Z
mmm a / cocos2dx / proj . emscripten / cocos2dx . mk <nl> ppp b / cocos2dx / proj . emscripten / cocos2dx . mk <nl> OBJ_DIR : = $ ( OBJ_DIR ) / debug <nl> LIB_DIR : = $ ( LIB_DIR ) / debug <nl> BIN_DIR : = $ ( BIN_DIR ) / debug <nl> else <nl> - CCFLAGS + = - O0 <nl> - CXXFLAGS + = - O0 <nl> + CCFLAGS + = - O2 <nl> + CXXFLAGS + = - O2 <nl> DEFINES + = - DNDEBUG <nl> OBJ_DIR : = $ ( OBJ_DIR ) / release <nl> LIB_DIR : = $ ( LIB_DIR ) / release <nl>
Enable - O2 optimization now that Emscripten seems to succeed .
cocos2d/cocos2d-x
239513075539e8c75163572430600f8e115d39af
2013-05-06T20:26:35Z
mmm a / stdlib / public / core / Dictionary . swift <nl> ppp b / stdlib / public / core / Dictionary . swift <nl> extension Dictionary : Collection { <nl> / / / ` position ` . <nl> @ inlinable / / FIXME ( sil - serialize - all ) <nl> public subscript ( position : Index ) - > Element { <nl> - return _variantBuffer . assertingGet ( position ) <nl> + return _variantBuffer . assertingGet ( at : position ) <nl> } <nl> <nl> / / / The number of key - value pairs in the dictionary . <nl> extension Dictionary { <nl> <nl> @ inlinable / / FIXME ( sil - serialize - all ) <nl> public subscript ( position : Index ) - > Element { <nl> - return _variantBuffer . assertingGet ( position ) . key <nl> + return _variantBuffer . assertingGet ( at : position ) . key <nl> } <nl> <nl> / / Customization <nl> extension Dictionary { <nl> @ inlinable / / FIXME ( sil - serialize - all ) <nl> public subscript ( position : Index ) - > Element { <nl> get { <nl> - return _variantBuffer . assertingGet ( position ) . value <nl> + return _variantBuffer . assertingGet ( at : position ) . value <nl> } <nl> mutableAddressWithNativeOwner { <nl> let address = _variantBuffer . pointerToValue ( at : position ) <nl> extension Dictionary : Equatable where Value : Equatable { <nl> let endIndex = lhsNative . endIndex <nl> var index = lhsNative . startIndex <nl> while index ! = endIndex { <nl> - let ( key , value ) = lhsNative . assertingGet ( index ) <nl> + let ( key , value ) = lhsNative . assertingGet ( at : index ) <nl> let optRhsValue : AnyObject ? = <nl> rhsCocoa . maybeGet ( _bridgeAnythingToObjectiveC ( key ) ) <nl> <nl> public func _dictionaryBridgeFromObjectiveCConditional < <nl> <nl> / / = = = mmm APIs templated for Dictionary and Set mmmmmmmmmmmmmmmmmmmmmmmmmmm - = = = / / <nl> <nl> + / / / This protocol is only used for compile - time checks that <nl> + / / / every buffer type implements all required operations . <nl> + internal protocol _DictionaryBuffer { <nl> + associatedtype Key <nl> + associatedtype Value <nl> + associatedtype Index <nl> + associatedtype SequenceElement <nl> + associatedtype SequenceElementWithoutLabels <nl> + <nl> + var startIndex : Index { get } <nl> + var endIndex : Index { get } <nl> + func index ( after i : Index ) - > Index <nl> + func formIndex ( after i : inout Index ) <nl> + func index ( forKey key : Key ) - > Index ? <nl> + var count : Int { get } <nl> + <nl> + func assertingGet ( at i : Index ) - > SequenceElement <nl> + func maybeGet ( _ key : Key ) - > Value ? <nl> + } <nl> + <nl> + internal protocol _MutableDictionaryBuffer : _DictionaryBuffer { <nl> + @ discardableResult <nl> + mutating func updateValue ( _ value : Value , forKey key : Key ) - > Value ? <nl> + <nl> + @ discardableResult <nl> + mutating func insert ( <nl> + _ value : Value , forKey key : Key <nl> + ) - > ( inserted : Bool , memberAfterInsert : Value ) <nl> + <nl> + @ discardableResult <nl> + mutating func remove ( at index : Index ) - > SequenceElement <nl> + <nl> + @ discardableResult <nl> + mutating func removeValue ( forKey key : Key ) - > Value ? <nl> + <nl> + mutating func removeAll ( keepingCapacity keepCapacity : Bool ) <nl> + } <nl> + <nl> / / / An instance of this class has all ` Dictionary ` data tail - allocated . <nl> / / / Enough bytes are allocated to hold the bitmap for marking valid entries , <nl> / / / keys , and values . The data layout starts with the bitmap , followed by the <nl> internal struct _NativeDictionaryBuffer < Key , Value > { <nl> self . _storage = _RawNativeDictionaryStorage . empty <nl> } <nl> <nl> - / / Most of the implementation of the _HashBuffer protocol , <nl> + / / Most of the implementation of the _DictionaryBuffer protocol , <nl> / / but only the parts that don ' t actually rely on hashing . <nl> <nl> @ inlinable / / FIXME ( sil - serialize - all ) <nl> internal struct _NativeDictionaryBuffer < Key , Value > { <nl> } <nl> <nl> @ inlinable / / FIXME ( sil - serialize - all ) <nl> - internal func assertingGet ( _ i : Index ) - > SequenceElement { <nl> + internal func assertingGet ( at i : Index ) - > SequenceElement { <nl> _precondition ( i . offset > = 0 & & i . offset < bucketCount ) <nl> _precondition ( <nl> isInitializedEntry ( at : i . offset ) , <nl> internal struct _NativeDictionaryBuffer < Key , Value > { <nl> } <nl> } <nl> <nl> - extension _NativeDictionaryBuffer where Key : Hashable <nl> - { <nl> + extension _NativeDictionaryBuffer where Key : Hashable { <nl> @ usableFromInline <nl> internal typealias HashTypedStorage = <nl> _HashableTypedNativeDictionaryStorage < Key , Value > <nl> extension _NativeDictionaryBuffer where Key : Hashable <nl> initializeKey ( newKey , value : value , at : i . offset ) <nl> } <nl> <nl> + @ inlinable / / FIXME ( sil - serialize - all ) <nl> + internal static func fromArray ( _ elements : [ SequenceElementWithoutLabels ] ) <nl> + - > Buffer <nl> + { <nl> + if elements . isEmpty { <nl> + return Buffer ( ) <nl> + } <nl> + <nl> + var nativeBuffer = Buffer ( minimumCapacity : elements . count ) <nl> + <nl> + for ( key , value ) in elements { <nl> + let ( i , found ) = <nl> + nativeBuffer . _find ( key , startBucket : nativeBuffer . _bucket ( key ) ) <nl> + _precondition ( ! found , " Dictionary literal contains duplicate keys " ) <nl> + nativeBuffer . initializeKey ( key , value : value , at : i . offset ) <nl> + } <nl> + nativeBuffer . count = elements . count <nl> + <nl> + return nativeBuffer <nl> + } <nl> + } <nl> + <nl> + extension _NativeDictionaryBuffer / * : _DictionaryBuffer * / where Key : Hashable { <nl> / / <nl> - / / _HashBuffer conformance <nl> + / / _DictionaryBuffer conformance <nl> / / <nl> <nl> @ inlinable / / FIXME ( sil - serialize - all ) <nl> extension _NativeDictionaryBuffer where Key : Hashable <nl> return found ? i : nil <nl> } <nl> <nl> - @ inlinable / / FIXME ( sil - serialize - all ) <nl> - internal func assertingGet ( _ key : Key ) - > Value { <nl> - let ( i , found ) = _find ( key , startBucket : _bucket ( key ) ) <nl> - _precondition ( found , " Key not found " ) <nl> - return self . value ( at : i . offset ) <nl> - } <nl> - <nl> @ inlinable / / FIXME ( sil - serialize - all ) <nl> @ inline ( __always ) <nl> internal func maybeGet ( _ key : Key ) - > Value ? { <nl> extension _NativeDictionaryBuffer where Key : Hashable <nl> } <nl> return nil <nl> } <nl> - <nl> - @ inlinable / / FIXME ( sil - serialize - all ) <nl> - @ discardableResult <nl> - internal func updateValue ( _ value : Value , forKey key : Key ) - > Value ? { <nl> - _sanityCheckFailure ( <nl> - " don ' t call mutating methods on _NativeDictionaryBuffer " ) <nl> - } <nl> - <nl> - @ inlinable / / FIXME ( sil - serialize - all ) <nl> - @ discardableResult <nl> - internal func insert ( <nl> - _ value : Value , forKey key : Key <nl> - ) - > ( inserted : Bool , memberAfterInsert : Value ) { <nl> - _sanityCheckFailure ( <nl> - " don ' t call mutating methods on _NativeDictionaryBuffer " ) <nl> - } <nl> - <nl> - @ inlinable / / FIXME ( sil - serialize - all ) <nl> - @ discardableResult <nl> - internal func remove ( at index : Index ) - > SequenceElement { <nl> - _sanityCheckFailure ( <nl> - " don ' t call mutating methods on _NativeDictionaryBuffer " ) <nl> - } <nl> - <nl> - @ inlinable / / FIXME ( sil - serialize - all ) <nl> - @ discardableResult <nl> - internal func removeValue ( forKey key : Key ) - > Value ? { <nl> - _sanityCheckFailure ( <nl> - " don ' t call mutating methods on _NativeDictionaryBuffer " ) <nl> - } <nl> - <nl> - @ inlinable / / FIXME ( sil - serialize - all ) <nl> - internal func removeAll ( keepingCapacity keepCapacity : Bool ) { <nl> - _sanityCheckFailure ( <nl> - " don ' t call mutating methods on _NativeDictionaryBuffer " ) <nl> - } <nl> - <nl> - @ inlinable / / FIXME ( sil - serialize - all ) <nl> - internal static func fromArray ( _ elements : [ SequenceElementWithoutLabels ] ) <nl> - - > Buffer <nl> - { <nl> - if elements . isEmpty { <nl> - return Buffer ( ) <nl> - } <nl> - <nl> - var nativeBuffer = Buffer ( minimumCapacity : elements . count ) <nl> - <nl> - for ( key , value ) in elements { <nl> - let ( i , found ) = <nl> - nativeBuffer . _find ( key , startBucket : nativeBuffer . _bucket ( key ) ) <nl> - _precondition ( ! found , " Dictionary literal contains duplicate keys " ) <nl> - nativeBuffer . initializeKey ( key , value : value , at : i . offset ) <nl> - } <nl> - nativeBuffer . count = elements . count <nl> - <nl> - return nativeBuffer <nl> - } <nl> } <nl> <nl> # if _runtime ( _ObjC ) <nl> final internal class _SwiftDeferredNSDictionary < Key : Hashable , Value > { } <nl> # if _runtime ( _ObjC ) <nl> @ usableFromInline <nl> @ _fixed_layout <nl> - internal struct _CocoaDictionaryBuffer : _HashBuffer { <nl> + internal struct _CocoaDictionaryBuffer : _DictionaryBuffer { <nl> @ usableFromInline <nl> internal var cocoaDictionary : _NSDictionary <nl> <nl> internal struct _CocoaDictionaryBuffer : _HashBuffer { <nl> } <nl> <nl> @ inlinable / / FIXME ( sil - serialize - all ) <nl> - internal func assertingGet ( _ i : Index ) - > SequenceElement { <nl> + internal var count : Int { <nl> + return cocoaDictionary . count <nl> + } <nl> + <nl> + @ inlinable / / FIXME ( sil - serialize - all ) <nl> + internal func assertingGet ( at i : Index ) - > SequenceElement { <nl> let key : Key = i . allKeys [ i . currentKeyIndex ] <nl> let value : Value = i . cocoaDictionary . objectFor ( key ) ! <nl> return ( key , value ) <nl> <nl> } <nl> <nl> - @ inlinable / / FIXME ( sil - serialize - all ) <nl> - internal func assertingGet ( _ key : Key ) - > Value { <nl> - let value : Value ? = cocoaDictionary . objectFor ( key ) <nl> - _precondition ( value ! = nil , " Key not found in underlying NSDictionary " ) <nl> - return value ! <nl> - } <nl> - <nl> @ inlinable / / FIXME ( sil - serialize - all ) <nl> @ inline ( __always ) <nl> internal func maybeGet ( _ key : Key ) - > Value ? { <nl> internal struct _CocoaDictionaryBuffer : _HashBuffer { <nl> _sanityCheckFailure ( " cannot mutate NSDictionary " ) <nl> } <nl> <nl> - @ inlinable / / FIXME ( sil - serialize - all ) <nl> - @ discardableResult <nl> - internal mutating func insert ( <nl> - _ value : Value , forKey key : Key <nl> - ) - > ( inserted : Bool , memberAfterInsert : Value ) { <nl> - _sanityCheckFailure ( " cannot mutate NSDictionary " ) <nl> - } <nl> - <nl> - @ inlinable / / FIXME ( sil - serialize - all ) <nl> - @ discardableResult <nl> - internal mutating func remove ( at index : Index ) - > SequenceElement { <nl> - _sanityCheckFailure ( " cannot mutate NSDictionary " ) <nl> - } <nl> - <nl> - @ inlinable / / FIXME ( sil - serialize - all ) <nl> - @ discardableResult <nl> - internal mutating func removeValue ( forKey key : Key ) - > Value ? { <nl> - _sanityCheckFailure ( " cannot mutate NSDictionary " ) <nl> - } <nl> - <nl> - @ inlinable / / FIXME ( sil - serialize - all ) <nl> - internal mutating func removeAll ( keepingCapacity keepCapacity : Bool ) { <nl> - _sanityCheckFailure ( " cannot mutate NSDictionary " ) <nl> - } <nl> - <nl> - @ inlinable / / FIXME ( sil - serialize - all ) <nl> - internal var count : Int { <nl> - return cocoaDictionary . count <nl> - } <nl> - <nl> - @ inlinable / / FIXME ( sil - serialize - all ) <nl> - internal static func fromArray ( _ elements : [ SequenceElementWithoutLabels ] ) <nl> - - > _CocoaDictionaryBuffer { <nl> - _sanityCheckFailure ( " this function should never be called " ) <nl> - } <nl> - <nl> @ usableFromInline <nl> internal func _toNative < K : Hashable , V > ( <nl> bucketCount : Int <nl> internal struct _CocoaDictionaryBuffer : _HashBuffer { <nl> <nl> @ usableFromInline <nl> @ _frozen <nl> - internal enum _VariantDictionaryBuffer < Key : Hashable , Value > : _HashBuffer { <nl> + internal enum _VariantDictionaryBuffer < Key : Hashable , Value > <nl> + : _MutableDictionaryBuffer { <nl> <nl> @ usableFromInline <nl> internal typealias NativeBuffer = _NativeDictionaryBuffer < Key , Value > <nl> internal enum _VariantDictionaryBuffer < Key : Hashable , Value > : _HashBuffer { <nl> } <nl> <nl> / / <nl> - / / _HashBuffer conformance <nl> + / / _DictionaryBuffer conformance <nl> / / <nl> <nl> @ usableFromInline <nl> internal enum _VariantDictionaryBuffer < Key : Hashable , Value > : _HashBuffer { <nl> } <nl> <nl> @ inlinable / / FIXME ( sil - serialize - all ) <nl> - internal func assertingGet ( _ i : Index ) - > SequenceElement { <nl> + internal func assertingGet ( at i : Index ) - > SequenceElement { <nl> if _fastPath ( guaranteedNative ) { <nl> - return asNative . assertingGet ( i . _nativeIndex ) <nl> + return asNative . assertingGet ( at : i . _nativeIndex ) <nl> } <nl> <nl> switch self { <nl> case . native : <nl> - return asNative . assertingGet ( i . _nativeIndex ) <nl> + return asNative . assertingGet ( at : i . _nativeIndex ) <nl> # if _runtime ( _ObjC ) <nl> case . cocoa ( let cocoaBuffer ) : <nl> let ( anyObjectKey , anyObjectValue ) = <nl> - cocoaBuffer . assertingGet ( i . _cocoaIndex ) <nl> + cocoaBuffer . assertingGet ( at : i . _cocoaIndex ) <nl> let nativeKey = _forceBridgeFromObjectiveC ( anyObjectKey , Key . self ) <nl> let nativeValue = _forceBridgeFromObjectiveC ( anyObjectValue , Value . self ) <nl> return ( nativeKey , nativeValue ) <nl> internal enum _VariantDictionaryBuffer < Key : Hashable , Value > : _HashBuffer { <nl> } <nl> } <nl> <nl> - @ inlinable / / FIXME ( sil - serialize - all ) <nl> - internal func assertingGet ( _ key : Key ) - > Value { <nl> - if _fastPath ( guaranteedNative ) { <nl> - return asNative . assertingGet ( key ) <nl> - } <nl> - <nl> - switch self { <nl> - case . native : <nl> - return asNative . assertingGet ( key ) <nl> - # if _runtime ( _ObjC ) <nl> - case . cocoa ( let cocoaBuffer ) : <nl> - / / FIXME : This assumes that Key and Value are bridged verbatim . <nl> - let anyObjectKey : AnyObject = _bridgeAnythingToObjectiveC ( key ) <nl> - let anyObjectValue : AnyObject = cocoaBuffer . assertingGet ( anyObjectKey ) <nl> - return _forceBridgeFromObjectiveC ( anyObjectValue , Value . self ) <nl> - # endif <nl> - } <nl> - } <nl> - <nl> # if _runtime ( _ObjC ) <nl> @ inline ( never ) <nl> @ usableFromInline <nl> internal enum _VariantDictionaryBuffer < Key : Hashable , Value > : _HashBuffer { <nl> / / recalculations . <nl> var i = asNative . startIndex <nl> while i ! = asNative . endIndex { <nl> - let ( k , v ) = asNative . assertingGet ( i ) <nl> + let ( k , v ) = asNative . assertingGet ( at : i ) <nl> try buffer . initializeKey ( k , value : transform ( v ) , at : i . offset ) <nl> asNative . formIndex ( after : & i ) <nl> } <nl> internal enum _VariantDictionaryBuffer < Key : Hashable , Value > : _HashBuffer { <nl> <nl> var i = cocoaStorage . startIndex <nl> while i ! = cocoaStorage . endIndex { <nl> - let ( anyObjectKey , anyObjectValue ) = cocoaStorage . assertingGet ( i ) <nl> + let ( anyObjectKey , anyObjectValue ) = cocoaStorage . assertingGet ( at : i ) <nl> let nativeKey = _forceBridgeFromObjectiveC ( anyObjectKey , Key . self ) <nl> let nativeValue = _forceBridgeFromObjectiveC ( anyObjectValue , Value . self ) <nl> _ = try storage . nativeInsert ( transform ( nativeValue ) , forKey : nativeKey ) <nl> internal enum _VariantDictionaryBuffer < Key : Hashable , Value > : _HashBuffer { <nl> _ = ensureUniqueNativeBuffer ( withBucketCount : bucketCount ) <nl> let nativeBuffer = asNative <nl> <nl> - let result = nativeBuffer . assertingGet ( nativeIndex ) <nl> + let result = nativeBuffer . assertingGet ( at : nativeIndex ) <nl> let key = result . 0 <nl> <nl> nativeDelete ( nativeBuffer , idealBucket : nativeBuffer . _bucket ( key ) , <nl> internal enum _VariantDictionaryBuffer < Key : Hashable , Value > : _HashBuffer { <nl> # endif <nl> } <nl> } <nl> - <nl> - @ inlinable / / FIXME ( sil - serialize - all ) <nl> - internal static func fromArray ( _ elements : [ SequenceElement ] ) <nl> - - > _VariantDictionaryBuffer < Key , Value > { <nl> - <nl> - _sanityCheckFailure ( " this function should never be called " ) <nl> - } <nl> } <nl> <nl> @ _fixed_layout / / FIXME ( sil - serialize - all ) <nl> public struct DictionaryIterator < Key : Hashable , Value > : IteratorProtocol { <nl> if startIndex = = endIndex { <nl> return nil <nl> } <nl> - let result = buffer . assertingGet ( startIndex ) <nl> + let result = buffer . assertingGet ( at : startIndex ) <nl> _state = <nl> . _native ( start : buffer . index ( after : startIndex ) , end : endIndex , buffer : buffer ) <nl> return result <nl> mmm a / stdlib / public / core / Hashing . swift <nl> ppp b / stdlib / public / core / Hashing . swift <nl> <nl> / / This file implements helpers for hashing collections . <nl> / / <nl> <nl> - / / / This protocol is only used for compile - time checks that <nl> - / / / every buffer type implements all required operations . <nl> - internal protocol _HashBuffer { <nl> - associatedtype Key <nl> - associatedtype Value <nl> - associatedtype Index <nl> - associatedtype SequenceElement <nl> - associatedtype SequenceElementWithoutLabels <nl> - var startIndex : Index { get } <nl> - var endIndex : Index { get } <nl> - <nl> - func index ( after i : Index ) - > Index <nl> - <nl> - func formIndex ( after i : inout Index ) <nl> - <nl> - func index ( forKey key : Key ) - > Index ? <nl> - <nl> - func assertingGet ( _ i : Index ) - > SequenceElement <nl> - <nl> - func assertingGet ( _ key : Key ) - > Value <nl> - <nl> - func maybeGet ( _ key : Key ) - > Value ? <nl> - <nl> - @ discardableResult <nl> - mutating func updateValue ( _ value : Value , forKey key : Key ) - > Value ? <nl> - <nl> - @ discardableResult <nl> - mutating func insert ( <nl> - _ value : Value , forKey key : Key <nl> - ) - > ( inserted : Bool , memberAfterInsert : Value ) <nl> - <nl> - @ discardableResult <nl> - mutating func remove ( at index : Index ) - > SequenceElement <nl> - <nl> - @ discardableResult <nl> - mutating func removeValue ( forKey key : Key ) - > Value ? <nl> - <nl> - mutating func removeAll ( keepingCapacity keepCapacity : Bool ) <nl> - <nl> - var count : Int { get } <nl> - <nl> - static func fromArray ( _ elements : [ SequenceElementWithoutLabels ] ) - > Self <nl> - } <nl> - <nl> / / / The inverse of the default hash table load factor . Factored out so that it <nl> / / / can be used in multiple places in the implementation and stay consistent . <nl> / / / Should not be used outside ` Dictionary ` implementation . <nl> mmm a / stdlib / public / core / Set . swift <nl> ppp b / stdlib / public / core / Set . swift <nl> extension Set : Collection { <nl> / / / Accesses the member at the given position . <nl> @ inlinable / / FIXME ( sil - serialize - all ) <nl> public subscript ( position : Index ) - > Element { <nl> - return _variantBuffer . assertingGet ( position ) <nl> + return _variantBuffer . assertingGet ( at : position ) <nl> } <nl> <nl> @ inlinable / / FIXME ( sil - serialize - all ) <nl> extension Set : Equatable { <nl> let endIndex = lhsNative . endIndex <nl> var i = lhsNative . startIndex <nl> while i ! = endIndex { <nl> - let key = lhsNative . assertingGet ( i ) <nl> + let key = lhsNative . assertingGet ( at : i ) <nl> let bridgedKey : AnyObject = _bridgeAnythingToObjectiveC ( key ) <nl> let optRhsValue : AnyObject ? = rhsCocoa . maybeGet ( bridgedKey ) <nl> if let rhsValue = optRhsValue { <nl> extension Set { <nl> <nl> / / = = = mmm APIs templated for Dictionary and Set mmmmmmmmmmmmmmmmmmmmmmmmmmm - = = = / / <nl> <nl> + / / / This protocol is only used for compile - time checks that <nl> + / / / every buffer type implements all required operations . <nl> + internal protocol _SetBuffer { / / FIXME : Remove or refactor for Set . <nl> + associatedtype Element <nl> + associatedtype Index <nl> + <nl> + var startIndex : Index { get } <nl> + var endIndex : Index { get } <nl> + func index ( after i : Index ) - > Index <nl> + func formIndex ( after i : inout Index ) <nl> + func index ( forKey key : Element ) - > Index ? <nl> + var count : Int { get } <nl> + <nl> + func assertingGet ( at i : Index ) - > Element <nl> + func maybeGet ( _ key : Element ) - > Element ? <nl> + } <nl> + <nl> + internal protocol _MutableSetBuffer : _SetBuffer { <nl> + @ discardableResult <nl> + mutating func updateValue ( _ value : Element , forKey key : Element ) - > Element ? <nl> + <nl> + @ discardableResult <nl> + mutating func insert ( <nl> + _ value : Element , forKey key : Element <nl> + ) - > ( inserted : Bool , memberAfterInsert : Element ) <nl> + <nl> + @ discardableResult <nl> + mutating func remove ( at index : Index ) - > Element <nl> + <nl> + @ discardableResult <nl> + mutating func removeValue ( forKey key : Element ) - > Element ? <nl> + <nl> + mutating func removeAll ( keepingCapacity keepCapacity : Bool ) <nl> + } <nl> + <nl> + <nl> / / / An instance of this class has all ` Set ` data tail - allocated . <nl> / / / Enough bytes are allocated to hold the bitmap for marking valid entries , <nl> / / / keys , and values . The data layout starts with the bitmap , followed by the <nl> internal class _RawNativeSetStorage : _SwiftNativeNSSet , _NSSetCore { <nl> @ usableFromInline <nl> internal class _TypedNativeSetStorage < Element > : _RawNativeSetStorage { <nl> <nl> - @ usableFromInline <nl> - internal typealias Key = Element <nl> - @ usableFromInline <nl> - internal typealias Value = Element <nl> - <nl> deinit { <nl> - let keys = self . keys . assumingMemoryBound ( to : Key . self ) <nl> + let keys = self . keys . assumingMemoryBound ( to : Element . self ) <nl> <nl> - if ! _isPOD ( Key . self ) { <nl> + if ! _isPOD ( Element . self ) { <nl> for i in 0 . . < bucketCount { <nl> if initializedEntries [ i ] { <nl> ( keys + i ) . deinitialize ( count : 1 ) <nl> final internal class _HashableTypedNativeSetStorage < Element : Hashable > <nl> @ inlinable / / FIXME ( sil - serialize - all ) <nl> @ nonobjc <nl> internal func getObjectFor ( _ aKey : AnyObject ) - > AnyObject ? { <nl> - guard let nativeKey = _conditionallyBridgeFromObjectiveC ( aKey , Key . self ) <nl> + guard let nativeKey = _conditionallyBridgeFromObjectiveC ( aKey , Element . self ) <nl> else { return nil } <nl> <nl> let ( i , found ) = buffer . _find ( nativeKey , <nl> final internal class _HashableTypedNativeSetStorage < Element : Hashable > <nl> @ usableFromInline <nl> @ _fixed_layout <nl> internal struct _NativeSetBuffer < Element > { <nl> - <nl> @ usableFromInline <nl> internal typealias TypedStorage = _TypedNativeSetStorage < Element > <nl> @ usableFromInline <nl> internal struct _NativeSetBuffer < Element > { <nl> @ usableFromInline <nl> internal typealias Index = _NativeSetIndex < Element > <nl> <nl> - @ usableFromInline <nl> - internal typealias Key = Element <nl> - @ usableFromInline <nl> - internal typealias Value = Element <nl> - @ usableFromInline <nl> - internal typealias SequenceElementWithoutLabels = Element <nl> - <nl> / / / See this comments on _RawNativeSetStorage and its subclasses to <nl> / / / understand why we store an untyped storage here . <nl> @ usableFromInline / / FIXME ( sil - serialize - all ) <nl> internal struct _NativeSetBuffer < Element > { <nl> let bitmapWordCount = _UnsafeBitMap . sizeInWords ( forSizeInBits : bucketCount ) <nl> let storage = Builtin . allocWithTailElems_2 ( TypedStorage . self , <nl> bitmapWordCount . _builtinWordValue , UInt . self , <nl> - bucketCount . _builtinWordValue , Key . self ) <nl> + bucketCount . _builtinWordValue , Element . self ) <nl> self . init ( _exactBucketCount : bucketCount , storage : storage ) <nl> } <nl> <nl> internal struct _NativeSetBuffer < Element > { <nl> let bitmapAddr = Builtin . projectTailElems ( _storage , UInt . self ) <nl> let bitmapWordCount = _UnsafeBitMap . sizeInWords ( forSizeInBits : bucketCount ) <nl> let keysAddr = Builtin . getTailAddr_Word ( bitmapAddr , <nl> - bitmapWordCount . _builtinWordValue , UInt . self , Key . self ) <nl> + bitmapWordCount . _builtinWordValue , UInt . self , Element . self ) <nl> <nl> / / Initialize header <nl> _storage . initializedEntries = initializedEntries <nl> internal struct _NativeSetBuffer < Element > { <nl> <nl> / / This API is unsafe and needs a ` _fixLifetime ` in the caller . <nl> @ inlinable / / FIXME ( sil - serialize - all ) <nl> - internal var keys : UnsafeMutablePointer < Key > { <nl> - return _storage . keys . assumingMemoryBound ( to : Key . self ) <nl> + internal var keys : UnsafeMutablePointer < Element > { <nl> + return _storage . keys . assumingMemoryBound ( to : Element . self ) <nl> } <nl> <nl> / / / Constructs a buffer adopting the given storage . <nl> internal struct _NativeSetBuffer < Element > { <nl> self . _storage = _RawNativeSetStorage . empty <nl> } <nl> <nl> - / / Most of the implementation of the _HashBuffer protocol , <nl> + / / Most of the implementation of the _SetBuffer protocol , <nl> / / but only the parts that don ' t actually rely on hashing . <nl> <nl> @ inlinable / / FIXME ( sil - serialize - all ) <nl> @ inline ( __always ) <nl> - internal func key ( at i : Int ) - > Key { <nl> + internal func key ( at i : Int ) - > Element { <nl> _sanityCheck ( i > = 0 & & i < bucketCount ) <nl> _sanityCheck ( isInitializedEntry ( at : i ) ) <nl> defer { _fixLifetime ( self ) } <nl> internal struct _NativeSetBuffer < Element > { <nl> } <nl> <nl> @ usableFromInline @ _transparent <nl> - internal func initializeKey ( _ k : Key , at i : Int ) { <nl> + internal func initializeKey ( _ k : Element , at i : Int ) { <nl> _sanityCheck ( ! isInitializedEntry ( at : i ) ) <nl> defer { _fixLifetime ( self ) } <nl> <nl> internal struct _NativeSetBuffer < Element > { <nl> <nl> / / / Alias for key ( at : ) in Sets for better code reuse <nl> @ usableFromInline @ _transparent <nl> - internal func value ( at i : Int ) - > Value { <nl> + internal func value ( at i : Int ) - > Element { <nl> return key ( at : i ) <nl> } <nl> <nl> @ inlinable / / FIXME ( sil - serialize - all ) <nl> - internal func setKey ( _ key : Key , at i : Int ) { <nl> + internal func setKey ( _ key : Element , at i : Int ) { <nl> _sanityCheck ( i > = 0 & & i < bucketCount ) <nl> _sanityCheck ( isInitializedEntry ( at : i ) ) <nl> defer { _fixLifetime ( self ) } <nl> internal struct _NativeSetBuffer < Element > { <nl> } <nl> <nl> @ inlinable / / FIXME ( sil - serialize - all ) <nl> - internal func assertingGet ( _ i : Index ) - > SequenceElement { <nl> + internal func assertingGet ( at i : Index ) - > Element { <nl> _precondition ( i . offset > = 0 & & i . offset < bucketCount ) <nl> _precondition ( <nl> isInitializedEntry ( at : i . offset ) , <nl> " Attempting to access Set elements using an invalid Index " ) <nl> let key = self . key ( at : i . offset ) <nl> return key <nl> - <nl> } <nl> } <nl> <nl> - extension _NativeSetBuffer where Element : Hashable <nl> - { <nl> + extension _NativeSetBuffer / * : _SetBuffer * / where Element : Hashable { <nl> @ usableFromInline <nl> internal typealias HashTypedStorage = <nl> _HashableTypedNativeSetStorage < Element > <nl> - @ usableFromInline <nl> - internal typealias SequenceElement = Element <nl> <nl> @ inlinable / / FIXME ( sil - serialize - all ) <nl> @ inline ( __always ) <nl> extension _NativeSetBuffer where Element : Hashable <nl> let bitmapWordCount = _UnsafeBitMap . sizeInWords ( forSizeInBits : bucketCount ) <nl> let storage = Builtin . allocWithTailElems_2 ( HashTypedStorage . self , <nl> bitmapWordCount . _builtinWordValue , UInt . self , <nl> - bucketCount . _builtinWordValue , Key . self ) <nl> + bucketCount . _builtinWordValue , Element . self ) <nl> self . init ( _exactBucketCount : bucketCount , storage : storage ) <nl> } <nl> <nl> extension _NativeSetBuffer where Element : Hashable <nl> / / Temporary var for SOME type safety before a cast . <nl> let nsSet : _NSSetCore <nl> <nl> - if ( _isBridgedVerbatimToObjectiveC ( Key . self ) & & <nl> - _isBridgedVerbatimToObjectiveC ( Value . self ) ) | | <nl> - self . _storage = = = _RawNativeSetStorage . empty { <nl> + if _isBridgedVerbatimToObjectiveC ( Element . self ) | | <nl> + self . _storage = = = _RawNativeSetStorage . empty { <nl> nsSet = self . _storage <nl> } else { <nl> nsSet = _SwiftDeferredNSSet ( nativeBuffer : self ) <nl> extension _NativeSetBuffer where Element : Hashable <nl> <nl> @ inlinable / / FIXME ( sil - serialize - all ) <nl> @ inline ( __always ) / / For performance reasons . <nl> - internal func _bucket ( _ k : Key ) - > Int { <nl> + internal func _bucket ( _ k : Element ) - > Int { <nl> return k . _rawHashValue ( seed : _storage . seed ) & _bucketMask <nl> } <nl> <nl> extension _NativeSetBuffer where Element : Hashable <nl> / / / inserted . <nl> @ inlinable / / FIXME ( sil - serialize - all ) <nl> @ inline ( __always ) <nl> - internal func _find ( _ key : Key , startBucket : Int ) <nl> + internal func _find ( _ key : Element , startBucket : Int ) <nl> - > ( pos : Index , found : Bool ) { <nl> <nl> var bucket = startBucket <nl> extension _NativeSetBuffer where Element : Hashable <nl> initializeKey ( newKey , at : i . offset ) <nl> } <nl> <nl> + <nl> + @ inlinable / / FIXME ( sil - serialize - all ) <nl> + internal static func fromArray ( _ elements : [ Element ] ) <nl> + - > Buffer <nl> + { <nl> + if elements . isEmpty { <nl> + return Buffer ( ) <nl> + } <nl> + <nl> + var nativeBuffer = Buffer ( minimumCapacity : elements . count ) <nl> + <nl> + var count = 0 <nl> + for key in elements { <nl> + let ( i , found ) = <nl> + nativeBuffer . _find ( key , startBucket : nativeBuffer . _bucket ( key ) ) <nl> + if found { <nl> + continue <nl> + } <nl> + nativeBuffer . initializeKey ( key , at : i . offset ) <nl> + count + = 1 <nl> + } <nl> + nativeBuffer . count = count <nl> + <nl> + return nativeBuffer <nl> + } <nl> + } <nl> + <nl> + extension _NativeSetBuffer / * : _SetBuffer * / where Element : Hashable { <nl> / / <nl> - / / _HashBuffer conformance <nl> + / / _SetBuffer conformance <nl> / / <nl> <nl> @ inlinable / / FIXME ( sil - serialize - all ) <nl> @ inline ( __always ) <nl> - internal func index ( forKey key : Key ) - > Index ? { <nl> + internal func index ( forKey key : Element ) - > Index ? { <nl> if count = = 0 { <nl> / / Fast path that avoids computing the hash of the key . <nl> return nil <nl> extension _NativeSetBuffer where Element : Hashable <nl> return found ? i : nil <nl> } <nl> <nl> - @ inlinable / / FIXME ( sil - serialize - all ) <nl> - internal func assertingGet ( _ key : Key ) - > Value { <nl> - let ( i , found ) = _find ( key , startBucket : _bucket ( key ) ) <nl> - _precondition ( found , " Key not found " ) <nl> - return self . key ( at : i . offset ) <nl> - } <nl> - <nl> @ inlinable / / FIXME ( sil - serialize - all ) <nl> @ inline ( __always ) <nl> - internal func maybeGet ( _ key : Key ) - > Value ? { <nl> + internal func maybeGet ( _ key : Element ) - > Element ? { <nl> if count = = 0 { <nl> / / Fast path that avoids computing the hash of the key . <nl> return nil <nl> extension _NativeSetBuffer where Element : Hashable <nl> } <nl> return nil <nl> } <nl> - <nl> - @ inlinable / / FIXME ( sil - serialize - all ) <nl> - @ discardableResult <nl> - internal func updateValue ( _ value : Value , forKey key : Key ) - > Value ? { <nl> - _sanityCheckFailure ( <nl> - " don ' t call mutating methods on _NativeSetBuffer " ) <nl> - } <nl> - <nl> - @ inlinable / / FIXME ( sil - serialize - all ) <nl> - @ discardableResult <nl> - internal func insert ( <nl> - _ value : Value , forKey key : Key <nl> - ) - > ( inserted : Bool , memberAfterInsert : Value ) { <nl> - _sanityCheckFailure ( <nl> - " don ' t call mutating methods on _NativeSetBuffer " ) <nl> - } <nl> - <nl> - @ inlinable / / FIXME ( sil - serialize - all ) <nl> - @ discardableResult <nl> - internal func remove ( at index : Index ) - > SequenceElement { <nl> - _sanityCheckFailure ( <nl> - " don ' t call mutating methods on _NativeSetBuffer " ) <nl> - } <nl> - <nl> - @ inlinable / / FIXME ( sil - serialize - all ) <nl> - @ discardableResult <nl> - internal func removeValue ( forKey key : Key ) - > Value ? { <nl> - _sanityCheckFailure ( <nl> - " don ' t call mutating methods on _NativeSetBuffer " ) <nl> - } <nl> - <nl> - @ inlinable / / FIXME ( sil - serialize - all ) <nl> - internal func removeAll ( keepingCapacity keepCapacity : Bool ) { <nl> - _sanityCheckFailure ( <nl> - " don ' t call mutating methods on _NativeSetBuffer " ) <nl> - } <nl> - <nl> - @ inlinable / / FIXME ( sil - serialize - all ) <nl> - internal static func fromArray ( _ elements : [ SequenceElementWithoutLabels ] ) <nl> - - > Buffer <nl> - { <nl> - if elements . isEmpty { <nl> - return Buffer ( ) <nl> - } <nl> - <nl> - var nativeBuffer = Buffer ( minimumCapacity : elements . count ) <nl> - <nl> - var count = 0 <nl> - for key in elements { <nl> - let ( i , found ) = <nl> - nativeBuffer . _find ( key , startBucket : nativeBuffer . _bucket ( key ) ) <nl> - if found { <nl> - continue <nl> - } <nl> - nativeBuffer . initializeKey ( key , at : i . offset ) <nl> - count + = 1 <nl> - } <nl> - nativeBuffer . count = count <nl> - <nl> - return nativeBuffer <nl> - } <nl> } <nl> <nl> # if _runtime ( _ObjC ) <nl> final internal class _SwiftDeferredNSSet < Element : Hashable > { } <nl> # if _runtime ( _ObjC ) <nl> @ usableFromInline <nl> @ _fixed_layout <nl> - internal struct _CocoaSetBuffer : _HashBuffer { <nl> + internal struct _CocoaSetBuffer : _SetBuffer { <nl> @ usableFromInline <nl> internal var cocoaSet : _NSSet <nl> <nl> internal struct _CocoaSetBuffer : _HashBuffer { <nl> <nl> @ usableFromInline <nl> internal typealias Index = _CocoaSetIndex <nl> - @ usableFromInline <nl> - internal typealias SequenceElement = AnyObject <nl> - @ usableFromInline <nl> - internal typealias SequenceElementWithoutLabels = AnyObject <nl> - <nl> - @ usableFromInline <nl> - internal typealias Key = AnyObject <nl> - @ usableFromInline <nl> - internal typealias Value = AnyObject <nl> <nl> @ inlinable / / FIXME ( sil - serialize - all ) <nl> internal var startIndex : Index { <nl> internal struct _CocoaSetBuffer : _HashBuffer { <nl> } <nl> <nl> @ inlinable / / FIXME ( sil - serialize - all ) <nl> - internal func index ( forKey key : Key ) - > Index ? { <nl> + internal func index ( forKey key : AnyObject ) - > Index ? { <nl> / / Fast path that does not involve creating an array of all keys . In case <nl> / / the key is present , this lookup is a penalty for the slow path , but the <nl> / / potential savings are significant : we could skip a memory allocation and <nl> internal struct _CocoaSetBuffer : _HashBuffer { <nl> } <nl> <nl> @ inlinable / / FIXME ( sil - serialize - all ) <nl> - internal func assertingGet ( _ i : Index ) - > SequenceElement { <nl> - let value : Value ? = i . allKeys [ i . currentKeyIndex ] <nl> - _sanityCheck ( value ! = nil , " Item not found in underlying NSSet " ) <nl> - return value ! <nl> - <nl> + internal var count : Int { <nl> + return cocoaSet . count <nl> } <nl> <nl> @ inlinable / / FIXME ( sil - serialize - all ) <nl> - internal func assertingGet ( _ key : Key ) - > Value { <nl> - let value : Value ? = cocoaSet . member ( key ) <nl> - _precondition ( value ! = nil , " Member not found in underlying NSSet " ) <nl> + internal func assertingGet ( at i : Index ) - > AnyObject { <nl> + let value : AnyObject ? = i . allKeys [ i . currentKeyIndex ] <nl> + _sanityCheck ( value ! = nil , " Item not found in underlying NSSet " ) <nl> return value ! <nl> } <nl> <nl> @ inlinable / / FIXME ( sil - serialize - all ) <nl> @ inline ( __always ) <nl> - internal func maybeGet ( _ key : Key ) - > Value ? { <nl> + internal func maybeGet ( _ key : AnyObject ) - > AnyObject ? { <nl> return cocoaSet . member ( key ) <nl> } <nl> <nl> - @ inlinable / / FIXME ( sil - serialize - all ) <nl> - @ discardableResult <nl> - internal mutating func updateValue ( _ value : Value , forKey key : Key ) - > Value ? { <nl> - _sanityCheckFailure ( " cannot mutate NSSet " ) <nl> - } <nl> - <nl> - @ inlinable / / FIXME ( sil - serialize - all ) <nl> - @ discardableResult <nl> - internal mutating func insert ( <nl> - _ value : Value , forKey key : Key <nl> - ) - > ( inserted : Bool , memberAfterInsert : Value ) { <nl> - _sanityCheckFailure ( " cannot mutate NSSet " ) <nl> - } <nl> - <nl> - @ inlinable / / FIXME ( sil - serialize - all ) <nl> - @ discardableResult <nl> - internal mutating func remove ( at index : Index ) - > SequenceElement { <nl> - _sanityCheckFailure ( " cannot mutate NSSet " ) <nl> - } <nl> - <nl> - @ inlinable / / FIXME ( sil - serialize - all ) <nl> - @ discardableResult <nl> - internal mutating func removeValue ( forKey key : Key ) - > Value ? { <nl> - _sanityCheckFailure ( " cannot mutate NSSet " ) <nl> - } <nl> - <nl> - @ inlinable / / FIXME ( sil - serialize - all ) <nl> - internal mutating func removeAll ( keepingCapacity keepCapacity : Bool ) { <nl> - _sanityCheckFailure ( " cannot mutate NSSet " ) <nl> - } <nl> - <nl> - @ inlinable / / FIXME ( sil - serialize - all ) <nl> - internal var count : Int { <nl> - return cocoaSet . count <nl> - } <nl> - <nl> - @ inlinable / / FIXME ( sil - serialize - all ) <nl> - internal static func fromArray ( _ elements : [ SequenceElementWithoutLabels ] ) <nl> - - > _CocoaSetBuffer { <nl> - _sanityCheckFailure ( " this function should never be called " ) <nl> - } <nl> - <nl> @ usableFromInline <nl> - internal func _toNative < E : Hashable > ( <nl> + internal func _toNative < Element : Hashable > ( <nl> bucketCount : Int <nl> - ) - > _NativeSetBuffer < E > { <nl> + ) - > _NativeSetBuffer < Element > { <nl> let cocoaSet = self . cocoaSet <nl> - var newNativeBuffer = _NativeSetBuffer < E > ( bucketCount : bucketCount ) <nl> + var newNativeBuffer = _NativeSetBuffer < Element > ( bucketCount : bucketCount ) <nl> let oldCocoaIterator = _CocoaSetIterator ( cocoaSet ) <nl> while let element = oldCocoaIterator . next ( ) { <nl> newNativeBuffer . unsafeAddNew ( <nl> - key : _forceBridgeFromObjectiveC ( element , E . self ) ) <nl> + key : _forceBridgeFromObjectiveC ( element , Element . self ) ) <nl> } <nl> newNativeBuffer . count = cocoaSet . count <nl> return newNativeBuffer <nl> internal struct _CocoaSetBuffer : _HashBuffer { <nl> <nl> @ usableFromInline <nl> @ _frozen <nl> - internal enum _VariantSetBuffer < Element : Hashable > : _HashBuffer { <nl> + internal enum _VariantSetBuffer < Element : Hashable > : _MutableSetBuffer { <nl> <nl> @ usableFromInline <nl> internal typealias NativeBuffer = _NativeSetBuffer < Element > <nl> internal enum _VariantSetBuffer < Element : Hashable > : _HashBuffer { <nl> @ usableFromInline <nl> internal typealias CocoaBuffer = _CocoaSetBuffer <nl> # endif <nl> - @ usableFromInline <nl> - internal typealias SequenceElement = Element <nl> - @ usableFromInline <nl> - internal typealias SequenceElementWithoutLabels = Element <nl> @ usableFromInline <nl> internal typealias SelfType = _VariantSetBuffer <nl> <nl> - @ usableFromInline <nl> - internal typealias Key = Element <nl> - @ usableFromInline <nl> - internal typealias Value = Element <nl> - <nl> case native ( NativeBuffer ) <nl> # if _runtime ( _ObjC ) <nl> case cocoa ( CocoaBuffer ) <nl> internal enum _VariantSetBuffer < Element : Hashable > : _HashBuffer { <nl> <nl> @ usableFromInline @ _transparent <nl> internal var guaranteedNative : Bool { <nl> - return _canBeClass ( Key . self ) = = 0 | | _canBeClass ( Value . self ) = = 0 <nl> + return _canBeClass ( Element . self ) = = 0 <nl> } <nl> <nl> @ inlinable / / FIXME ( sil - serialize - all ) <nl> internal enum _VariantSetBuffer < Element : Hashable > : _HashBuffer { <nl> } <nl> <nl> / / <nl> - / / _HashBuffer conformance <nl> + / / _SetBuffer conformance <nl> / / <nl> <nl> @ usableFromInline <nl> internal enum _VariantSetBuffer < Element : Hashable > : _HashBuffer { <nl> <nl> @ inlinable / / FIXME ( sil - serialize - all ) <nl> @ inline ( __always ) <nl> - internal func index ( forKey key : Key ) - > Index ? { <nl> + internal func index ( forKey key : Element ) - > Index ? { <nl> if _fastPath ( guaranteedNative ) { <nl> if let nativeIndex = asNative . index ( forKey : key ) { <nl> return . _native ( nativeIndex ) <nl> internal enum _VariantSetBuffer < Element : Hashable > : _HashBuffer { <nl> } <nl> <nl> @ inlinable / / FIXME ( sil - serialize - all ) <nl> - internal func assertingGet ( _ i : Index ) - > SequenceElement { <nl> + internal func assertingGet ( at i : Index ) - > Element { <nl> if _fastPath ( guaranteedNative ) { <nl> - return asNative . assertingGet ( i . _nativeIndex ) <nl> + return asNative . assertingGet ( at : i . _nativeIndex ) <nl> } <nl> <nl> switch self { <nl> case . native : <nl> - return asNative . assertingGet ( i . _nativeIndex ) <nl> + return asNative . assertingGet ( at : i . _nativeIndex ) <nl> # if _runtime ( _ObjC ) <nl> case . cocoa ( let cocoaBuffer ) : <nl> - let anyObjectValue : AnyObject = cocoaBuffer . assertingGet ( i . _cocoaIndex ) <nl> - let nativeValue = _forceBridgeFromObjectiveC ( anyObjectValue , Value . self ) <nl> + let anyObjectValue = cocoaBuffer . assertingGet ( at : i . _cocoaIndex ) <nl> + let nativeValue = _forceBridgeFromObjectiveC ( anyObjectValue , Element . self ) <nl> return nativeValue <nl> # endif <nl> } <nl> } <nl> <nl> - @ inlinable / / FIXME ( sil - serialize - all ) <nl> - internal func assertingGet ( _ key : Key ) - > Value { <nl> - if _fastPath ( guaranteedNative ) { <nl> - return asNative . assertingGet ( key ) <nl> - } <nl> - <nl> - switch self { <nl> - case . native : <nl> - return asNative . assertingGet ( key ) <nl> - # if _runtime ( _ObjC ) <nl> - case . cocoa ( let cocoaBuffer ) : <nl> - / / FIXME : This assumes that Key and Value are bridged verbatim . <nl> - let anyObjectKey : AnyObject = _bridgeAnythingToObjectiveC ( key ) <nl> - let anyObjectValue : AnyObject = cocoaBuffer . assertingGet ( anyObjectKey ) <nl> - return _forceBridgeFromObjectiveC ( anyObjectValue , Value . self ) <nl> - # endif <nl> - } <nl> - } <nl> - <nl> # if _runtime ( _ObjC ) <nl> @ inline ( never ) <nl> @ usableFromInline <nl> internal static func maybeGetFromCocoaBuffer ( <nl> - _ cocoaBuffer : CocoaBuffer , forKey key : Key <nl> - ) - > Value ? { <nl> + _ cocoaBuffer : CocoaBuffer , forKey key : Element <nl> + ) - > Element ? { <nl> let anyObjectKey : AnyObject = _bridgeAnythingToObjectiveC ( key ) <nl> if let anyObjectValue = cocoaBuffer . maybeGet ( anyObjectKey ) { <nl> - return _forceBridgeFromObjectiveC ( anyObjectValue , Value . self ) <nl> + return _forceBridgeFromObjectiveC ( anyObjectValue , Element . self ) <nl> } <nl> return nil <nl> } <nl> internal enum _VariantSetBuffer < Element : Hashable > : _HashBuffer { <nl> <nl> @ inlinable / / FIXME ( sil - serialize - all ) <nl> @ inline ( __always ) <nl> - internal func maybeGet ( _ key : Key ) - > Value ? { <nl> + internal func maybeGet ( _ key : Element ) - > Element ? { <nl> if _fastPath ( guaranteedNative ) { <nl> return asNative . maybeGet ( key ) <nl> } <nl> internal enum _VariantSetBuffer < Element : Hashable > : _HashBuffer { <nl> <nl> @ inlinable / / FIXME ( sil - serialize - all ) <nl> internal mutating func nativeUpdateValue ( <nl> - _ value : Value , forKey key : Key <nl> - ) - > Value ? { <nl> + _ value : Element , forKey key : Element <nl> + ) - > Element ? { <nl> var ( i , found ) = asNative . _find ( key , startBucket : asNative . _bucket ( key ) ) <nl> <nl> let minBuckets = found <nl> internal enum _VariantSetBuffer < Element : Hashable > : _HashBuffer { <nl> i = asNative . _find ( key , startBucket : asNative . _bucket ( key ) ) . pos <nl> } <nl> <nl> - let oldValue : Value ? = found ? asNative . key ( at : i . offset ) : nil <nl> + let oldValue : Element ? = found ? asNative . key ( at : i . offset ) : nil <nl> if found { <nl> asNative . setKey ( key , at : i . offset ) <nl> } else { <nl> internal enum _VariantSetBuffer < Element : Hashable > : _HashBuffer { <nl> @ inlinable / / FIXME ( sil - serialize - all ) <nl> @ discardableResult <nl> internal mutating func updateValue ( <nl> - _ value : Value , forKey key : Key <nl> - ) - > Value ? { <nl> - <nl> + _ value : Element , <nl> + forKey key : Element <nl> + ) - > Element ? { <nl> if _fastPath ( guaranteedNative ) { <nl> return nativeUpdateValue ( value , forKey : key ) <nl> } <nl> internal enum _VariantSetBuffer < Element : Hashable > : _HashBuffer { <nl> <nl> @ inlinable / / FIXME ( sil - serialize - all ) <nl> internal mutating func nativeInsert ( <nl> - _ value : Value , forKey key : Key <nl> - ) - > ( inserted : Bool , memberAfterInsert : Value ) { <nl> - <nl> + _ value : Element , forKey key : Element <nl> + ) - > ( inserted : Bool , memberAfterInsert : Element ) { <nl> var ( i , found ) = asNative . _find ( key , startBucket : asNative . _bucket ( key ) ) <nl> if found { <nl> return ( inserted : false , memberAfterInsert : asNative . key ( at : i . offset ) ) <nl> internal enum _VariantSetBuffer < Element : Hashable > : _HashBuffer { <nl> @ inlinable / / FIXME ( sil - serialize - all ) <nl> @ discardableResult <nl> internal mutating func insert ( <nl> - _ value : Value , forKey key : Key <nl> - ) - > ( inserted : Bool , memberAfterInsert : Value ) { <nl> + _ value : Element , forKey key : Element <nl> + ) - > ( inserted : Bool , memberAfterInsert : Element ) { <nl> ensureNativeBuffer ( ) <nl> return nativeInsert ( value , forKey : key ) <nl> } <nl> internal enum _VariantSetBuffer < Element : Hashable > : _HashBuffer { <nl> } <nl> <nl> @ inlinable / / FIXME ( sil - serialize - all ) <nl> - internal mutating func nativeRemoveObject ( forKey key : Key ) - > Value ? { <nl> + internal mutating func nativeRemoveObject ( forKey key : Element ) - > Element ? { <nl> var idealBucket = asNative . _bucket ( key ) <nl> var ( index , found ) = asNative . _find ( key , startBucket : idealBucket ) <nl> <nl> internal enum _VariantSetBuffer < Element : Hashable > : _HashBuffer { <nl> } <nl> <nl> @ inlinable / / FIXME ( sil - serialize - all ) <nl> - internal mutating func nativeRemove ( <nl> - at nativeIndex : NativeIndex <nl> - ) - > SequenceElement { <nl> + internal mutating func nativeRemove ( at nativeIndex : NativeIndex ) - > Element { <nl> / / This is a performance optimization that was put in to ensure that we did <nl> / / not make a copy of self to call asNative . bucketCount over <nl> / / ensureUniqueNativeBefore causing at - Onone the uniqueness check to <nl> internal enum _VariantSetBuffer < Element : Hashable > : _HashBuffer { <nl> _ = ensureUniqueNativeBuffer ( withBucketCount : bucketCount ) <nl> let nativeBuffer = asNative <nl> <nl> - let result = nativeBuffer . assertingGet ( nativeIndex ) <nl> + let result = nativeBuffer . assertingGet ( at : nativeIndex ) <nl> let key = result <nl> <nl> nativeDelete ( nativeBuffer , idealBucket : nativeBuffer . _bucket ( key ) , <nl> internal enum _VariantSetBuffer < Element : Hashable > : _HashBuffer { <nl> <nl> @ inlinable / / FIXME ( sil - serialize - all ) <nl> @ discardableResult <nl> - internal mutating func remove ( at index : Index ) - > SequenceElement { <nl> + internal mutating func remove ( at index : Index ) - > Element { <nl> if _fastPath ( guaranteedNative ) { <nl> return nativeRemove ( at : index . _nativeIndex ) <nl> } <nl> internal enum _VariantSetBuffer < Element : Hashable > : _HashBuffer { <nl> let index = index . _cocoaIndex <nl> let anyObjectKey : AnyObject = index . allKeys [ index . currentKeyIndex ] <nl> migrateDataToNativeBuffer ( cocoaBuffer ) <nl> - let key = _forceBridgeFromObjectiveC ( anyObjectKey , Key . self ) <nl> + let key = _forceBridgeFromObjectiveC ( anyObjectKey , Element . self ) <nl> let value = nativeRemoveObject ( forKey : key ) <nl> <nl> _sanityCheck ( key = = value , " bridging did not preserve equality " ) <nl> internal enum _VariantSetBuffer < Element : Hashable > : _HashBuffer { <nl> <nl> @ inlinable / / FIXME ( sil - serialize - all ) <nl> @ discardableResult <nl> - internal mutating func removeValue ( forKey key : Key ) - > Value ? { <nl> + internal mutating func removeValue ( forKey key : Element ) - > Element ? { <nl> if _fastPath ( guaranteedNative ) { <nl> return nativeRemoveObject ( forKey : key ) <nl> } <nl> internal enum _VariantSetBuffer < Element : Hashable > : _HashBuffer { <nl> } <nl> } <nl> <nl> - / / / Returns an iterator over the ` ( Key , Value ) ` pairs . <nl> + / / / Returns an iterator over the elements . <nl> / / / <nl> / / / - Complexity : O ( 1 ) . <nl> @ inlinable / / FIXME ( sil - serialize - all ) <nl> internal enum _VariantSetBuffer < Element : Hashable > : _HashBuffer { <nl> # endif <nl> } <nl> } <nl> - <nl> - @ inlinable / / FIXME ( sil - serialize - all ) <nl> - internal static func fromArray ( _ elements : [ SequenceElement ] ) <nl> - - > _VariantSetBuffer < Element > { <nl> - <nl> - _sanityCheckFailure ( " this function should never be called " ) <nl> - } <nl> } <nl> <nl> @ _fixed_layout / / FIXME ( sil - serialize - all ) <nl> extension Set { <nl> internal typealias _CocoaIndex = _CocoaSetIndex <nl> # endif <nl> <nl> - @ usableFromInline <nl> - internal typealias Key = Element <nl> - @ usableFromInline <nl> - internal typealias Value = Element <nl> - <nl> @ inlinable / / FIXME ( sil - serialize - all ) <nl> internal init ( _value : SetIndexRepresentation < Element > ) { <nl> self . _value = _value <nl> extension Set { <nl> <nl> @ usableFromInline @ _transparent <nl> internal var _guaranteedNative : Bool { <nl> - return _canBeClass ( Key . self ) = = 0 & & _canBeClass ( Value . self ) = = 0 <nl> + return _canBeClass ( Element . self ) = = 0 <nl> } <nl> <nl> @ usableFromInline @ _transparent <nl> public struct SetIterator < Element : Hashable > : IteratorProtocol { <nl> if startIndex = = endIndex { <nl> return nil <nl> } <nl> - let result = buffer . assertingGet ( startIndex ) <nl> + let result = buffer . assertingGet ( at : startIndex ) <nl> _state = <nl> . _native ( start : buffer . index ( after : startIndex ) , end : endIndex , buffer : buffer ) <nl> return result <nl> extension Set : CustomReflectable { <nl> / / / ` Set ` . <nl> @ _fixed_layout / / FIXME ( sil - serialize - all ) <nl> public struct _SetBuilder < Element : Hashable > { <nl> - public typealias Key = Element <nl> - public typealias Value = Element <nl> - <nl> @ usableFromInline / / FIXME ( sil - serialize - all ) <nl> internal var _result : Set < Element > <nl> @ usableFromInline / / FIXME ( sil - serialize - all ) <nl> public struct _SetBuilder < Element : Hashable > { <nl> } <nl> <nl> @ inlinable / / FIXME ( sil - serialize - all ) <nl> - public mutating func add ( member newKey : Key ) { <nl> - _nativeBuffer . unsafeAddNew ( key : newKey ) <nl> + public mutating func add ( member : Element ) { <nl> + _nativeBuffer . unsafeAddNew ( key : member ) <nl> _actualCount + = 1 <nl> } <nl> <nl>
[ stdlib ] Split _HashBuffer into four different protocols
apple/swift
5a22b9016a0f569970916954cb1d3c0651daeb09
2018-07-17T14:59:51Z
mmm a / src / compiler / BUILD <nl> ppp b / src / compiler / BUILD <nl> <nl> # See the License for the specific language governing permissions and <nl> # limitations under the License . <nl> <nl> - licenses ( [ " notice " ] ) # Apache v2 <nl> + licenses ( [ " notice " ] ) <nl> <nl> exports_files ( [ " LICENSE " ] ) <nl> <nl> mmm a / src / objective - c / BUILD <nl> ppp b / src / objective - c / BUILD <nl> <nl> load ( " / / bazel : grpc_build_system . bzl " , " grpc_generate_objc_one_off_targets " , " grpc_objc_library " ) <nl> load ( " @ build_bazel_rules_apple / / apple : resources . bzl " , " apple_resource_bundle " ) <nl> <nl> - licenses ( [ " notice " ] ) # Apache v2 <nl> + licenses ( [ " notice " ] ) <nl> <nl> package ( default_visibility = [ " / / visibility : public " ] ) <nl> <nl> mmm a / test / core / client_channel / BUILD <nl> ppp b / test / core / client_channel / BUILD <nl> load ( " / / bazel : grpc_build_system . bzl " , " grpc_cc_test " , " grpc_package " ) <nl> <nl> grpc_package ( name = " test / core / client_channel " ) <nl> <nl> - licenses ( [ " notice " ] ) # Apache v2 <nl> + licenses ( [ " notice " ] ) <nl> <nl> grpc_cc_test ( <nl> name = " parse_address_test " , <nl> mmm a / test / core / uri / BUILD <nl> ppp b / test / core / uri / BUILD <nl> load ( " / / bazel : grpc_build_system . bzl " , " grpc_cc_test " , " grpc_package " ) <nl> <nl> grpc_package ( name = " test / core / client_channel " ) <nl> <nl> - licenses ( [ " notice " ] ) # Apache v2 <nl> + licenses ( [ " notice " ] ) <nl> <nl> load ( " / / test / core / util : grpc_fuzzer . bzl " , " grpc_fuzzer " ) <nl> <nl> mmm a / test / cpp / end2end / BUILD <nl> ppp b / test / cpp / end2end / BUILD <nl> <nl> # See the License for the specific language governing permissions and <nl> # limitations under the License . <nl> <nl> - licenses ( [ " notice " ] ) # Apache v2 <nl> + licenses ( [ " notice " ] ) <nl> <nl> load ( " / / bazel : grpc_build_system . bzl " , " grpc_cc_binary " , " grpc_cc_library " , " grpc_cc_test " , " grpc_package " ) <nl> <nl>
Merge pull request from yashykt / linter
grpc/grpc
3f2ba42d4c6e1fe6154758c14e764f7cef3fa464
2020-08-18T01:29:33Z
mmm a / tools / autograd / gen_autograd_functions . py <nl> ppp b / tools / autograd / gen_autograd_functions . py <nl> def save_var ( var : SavedAttribute , is_output : bool ) - > None : <nl> <nl> def emit_derivative ( <nl> derivative : Derivative , <nl> - args_with_derivatives : Sequence [ CppArgument ] , <nl> + args_with_derivatives : Sequence [ Binding ] , <nl> ) - > Tuple [ bool , str ] : <nl> formula = derivative . formula <nl> var_names = derivative . var_names <nl> mmm a / tools / autograd / gen_trace_type . py <nl> ppp b / tools / autograd / gen_trace_type . py <nl> def dispatch_trace_input ( arg : Union [ Argument , TensorOptionsArguments ] ) - > Sequen <nl> args = list ( f . func . schema_order_arguments ( ) ) <nl> else : <nl> sig_group = CppSignatureGroup . from_schema ( f . func , method = False ) <nl> - args = [ cpp_args . argument for cpp_args in sig_group . signature . arguments ( ) ] <nl> + args = [ cpp_args . argument for cpp_args in sig_group . signature . arguments ( ) <nl> + if not isinstance ( cpp_args . argument , SelfArgument ) ] <nl> <nl> if f . func . is_out_fn ( ) : <nl> # * _out functions take the result as a separate argument , but we don ' t want to <nl> def emit_trace_body ( f : NativeFunction ) - > List [ str ] : <nl> dispatcher_sig = DispatcherSignature . from_schema ( f . func ) <nl> dispatcher_exprs = dispatcher_sig . exprs ( ) <nl> <nl> - ret_and_arg_types = ' , ' . join ( [ dispatcher_sig . _returns_type ] + [ a . type for a in dispatcher_exprs ] ) <nl> + ret_and_arg_types = ' , ' . join ( [ dispatcher_sig . returns_type ( ) ] + [ a . type . cpp_type ( ) for a in dispatcher_exprs ] ) <nl> redispatch_args = ' , ' . join ( [ ' op ' , ' c10 : : DispatchKey : : Tracer ' ] + [ a . expr for a in dispatcher_exprs ] ) <nl> <nl> assign_return_values = f ' { tie_return_values ( f ) } = ' \ <nl> def method_definition ( f : NativeFunction ) - > Optional [ str ] : <nl> return None <nl> <nl> if f . use_c10_dispatcher . dispatcher_uses_new_style ( ) : <nl> - formals = ' , ' . join ( f ' { cpp . argument_type ( a ) } { a . name } ' for a in f . func . schema_order_arguments ( ) ) <nl> + formals = ' , ' . join ( <nl> + f ' { cpp . argument_type ( a , binds = " __placeholder__ " ) . cpp_type ( ) } { a . name } ' <nl> + for a in f . func . schema_order_arguments ( ) <nl> + ) <nl> else : <nl> sig_group = CppSignatureGroup . from_schema ( f . func , method = False ) <nl> formals = ' , ' . join ( f ' { a . type } { a . name } ' for a in sig_group . signature . arguments ( ) ) <nl> mmm a / tools / autograd / load_derivatives . py <nl> ppp b / tools / autograd / load_derivatives . py <nl> def load_derivatives ( derivatives_yaml_path : str , native_yaml_path : str ) - > Seque <nl> for info , op_name in zip ( infos , op_names ) ] <nl> <nl> @ with_native_function <nl> - def cpp_arguments ( f : NativeFunction ) - > Sequence [ CppArgument ] : <nl> + def cpp_arguments ( f : NativeFunction ) - > Sequence [ Binding ] : <nl> return CppSignatureGroup . from_schema ( f . func , method = False ) . signature . arguments ( ) <nl> <nl> def create_derivative ( f : NativeFunction , formula : str , var_names : Tuple [ str , . . . ] ) - > Derivative : <nl> def check_grad_usage ( defn_name : str , derivatives : Sequence [ Derivative ] ) - > None : <nl> @ with_native_function <nl> def set_up_derivatives ( f : NativeFunction ) - > Tuple [ <nl> Sequence [ Derivative ] , <nl> - Sequence [ CppArgument ] , <nl> + Sequence [ Binding ] , <nl> Sequence [ str ] , <nl> ] : <nl> # Set up the derivative information <nl> mmm a / tools / codegen / api / autograd . py <nl> ppp b / tools / codegen / api / autograd . py <nl> class DifferentiabilityInfo : <nl> # The function ' s input arguments for which it calculates derivatives . <nl> # It ' s the union of ' var_names ' of all ' derivatives ' , sorted by the <nl> # argument order in the function schema . <nl> - args_with_derivatives : Sequence [ CppArgument ] <nl> + args_with_derivatives : Sequence [ Binding ] <nl> <nl> # Names of arguments whose derivative formula is ' non_differentiable ' . <nl> non_differentiable_arg_names : Sequence [ str ] <nl> mmm a / tools / codegen / api / cpp . py <nl> ppp b / tools / codegen / api / cpp . py <nl> def name ( func : FunctionSchema , * , faithful_name_for_out_overloads : bool = False ) <nl> # Translation of " value types " in JIT schema to C + + API type . Value <nl> # types look the same no matter if they are argument types or return <nl> # types . Returns None if the type in question is not a value type . <nl> - def valuetype_type ( t : Type ) - > Optional [ str ] : <nl> + def valuetype_type ( t : Type , * , binds : ArgName ) - > Optional [ CType ] : <nl> if isinstance ( t , BaseType ) : <nl> if t . name = = BaseTy . Tensor : <nl> return None <nl> elif t . name = = BaseTy . int : <nl> - return ' int64_t ' <nl> + return BaseCType ( ' int64_t ' , binds ) <nl> elif t . name = = BaseTy . float : <nl> - return ' double ' <nl> + return BaseCType ( ' double ' , binds ) <nl> elif t . name = = BaseTy . str : <nl> - return ' std : : string ' <nl> + return BaseCType ( ' std : : string ' , binds ) <nl> elif t . name in [ BaseTy . bool , BaseTy . QScheme , BaseTy . Scalar , <nl> BaseTy . ScalarType , BaseTy . Generator , BaseTy . Storage , <nl> BaseTy . Layout , BaseTy . Device , BaseTy . MemoryFormat , <nl> BaseTy . Dimname , BaseTy . Stream , BaseTy . ConstQuantizerPtr ] : <nl> # These C + + names line up with their schema names <nl> - return t . name . name <nl> + return BaseCType ( t . name . name , binds ) <nl> else : <nl> raise AssertionError ( f " unsupported type : { t } " ) <nl> elif isinstance ( t , OptionalType ) : <nl> - elem = valuetype_type ( t . elem ) <nl> + elem = valuetype_type ( t . elem , binds = binds ) <nl> if elem is None : <nl> return None <nl> - return f " c10 : : optional < { elem } > " <nl> + return OptionalCType ( elem ) <nl> elif isinstance ( t , ListType ) : <nl> if str ( t . elem ) = = ' bool ' : <nl> assert t . size is not None <nl> - return f " std : : array < bool , { t . size } > " <nl> + return BaseCType ( f " std : : array < bool , { t . size } > " , binds ) <nl> else : <nl> return None <nl> else : <nl> raise AssertionError ( f " unrecognized type { repr ( t ) } " ) <nl> <nl> # Translation of types occuring in JIT arguments to a C + + argument type . <nl> - def argumenttype_type ( t : Type , * , mutable : bool ) - > str : <nl> + def argumenttype_type ( t : Type , * , mutable : bool , binds : ArgName ) - > CType : <nl> # If it ' s a value type , do the value type translation <nl> - r = valuetype_type ( t ) <nl> + r = valuetype_type ( t , binds = binds ) <nl> if r is not None : <nl> return r <nl> <nl> if isinstance ( t , BaseType ) : <nl> if t . name = = BaseTy . Tensor : <nl> if mutable : <nl> - return ' Tensor & ' <nl> + return MutRefCType ( BaseCType ( ' Tensor ' , binds ) ) <nl> else : <nl> - return ' const Tensor & ' <nl> + return ConstRefCType ( BaseCType ( ' Tensor ' , binds ) ) <nl> else : <nl> raise AssertionError ( f " base type should have been value type { t } " ) <nl> elif isinstance ( t , OptionalType ) : <nl> if str ( t . elem ) = = ' Tensor ' : <nl> if mutable : <nl> - return ' Tensor & ' # TODO : fix this discrepancy <nl> + return MutRefCType ( BaseCType ( ' Tensor ' , binds ) ) # TODO : fix this discrepancy <nl> else : <nl> if local . use_c10_dispatcher ( ) . dispatcher_uses_new_style ( ) : <nl> - return ' const c10 : : optional < Tensor > & ' <nl> + return ConstRefCType ( OptionalCType ( BaseCType ( ' Tensor ' , binds ) ) ) <nl> else : <nl> - return ' const Tensor & ' <nl> - elem = argumenttype_type ( t . elem , mutable = mutable ) <nl> - return f " c10 : : optional < { elem } > " <nl> + return ConstRefCType ( BaseCType ( ' Tensor ' , binds ) ) <nl> + elem = argumenttype_type ( t . elem , mutable = mutable , binds = binds ) <nl> + return OptionalCType ( elem ) <nl> elif isinstance ( t , ListType ) : <nl> # TODO : remove these special cases , ArrayRef fallthrough works fine <nl> + # NB : CType throws away ArrayRef structure because it is not currently <nl> + # relevant in translation . When it becomes relevant , need to add back <nl> if str ( t . elem ) = = ' int ' : <nl> - return " IntArrayRef " <nl> + return BaseCType ( " IntArrayRef " , binds ) <nl> elif str ( t . elem ) = = ' Tensor ' : <nl> - return " TensorList " <nl> + return BaseCType ( " TensorList " , binds ) <nl> elif str ( t . elem ) = = ' Dimname ' : <nl> - return " DimnameList " <nl> + return BaseCType ( " DimnameList " , binds ) <nl> # TODO : do something reasonable about lists of optional tensors <nl> elif ( not local . use_c10_dispatcher ( ) . dispatcher_uses_new_style ( ) ) and str ( t . elem ) = = ' Tensor ? ' : <nl> - return " TensorList " <nl> - elem = argumenttype_type ( t . elem , mutable = mutable ) <nl> + return BaseCType ( " TensorList " , binds ) <nl> + elem = argumenttype_type ( t . elem , mutable = mutable , binds = binds ) <nl> # TODO : explicitly qualify namespace here <nl> - return f " ArrayRef < { elem } > " <nl> + return BaseCType ( f " ArrayRef < { elem . cpp_type ( ) } > " , binds ) <nl> else : <nl> raise AssertionError ( f " unrecognized type { repr ( t ) } " ) <nl> <nl> # Translate a JIT argument into its C + + type <nl> - def argument_type ( a : Argument ) - > str : <nl> - return argumenttype_type ( a . type , mutable = a . is_write ) <nl> + def argument_type ( a : Argument , * , binds : ArgName ) - > CType : <nl> + return argumenttype_type ( a . type , mutable = a . is_write , binds = binds ) <nl> <nl> # Translation of a ( non - multi ) return type from JIT to C + + <nl> + # NB : if need translations on return types , make this return CType too . Need to <nl> + # take care ; ArgName is misnomer now , and inputs are permitted to conflict with outputs <nl> + # so need to make sure you don ' t have trouble <nl> def returntype_type ( t : Type , * , mutable : bool ) - > str : <nl> - r = valuetype_type ( t ) <nl> + # placeholder is ignored <nl> + r = valuetype_type ( t , binds = " __placeholder__ " ) <nl> if r is not None : <nl> - return r <nl> + return r . cpp_type ( ) <nl> <nl> if isinstance ( t , BaseType ) : <nl> if t . name = = BaseTy . Tensor : <nl> def default_expr ( d : str , t : Type ) - > str : <nl> <nl> # Convert an argument into its C + + API form <nl> <nl> - def argument_not_this ( <nl> - a : Union [ Argument , TensorOptionsArguments ] , <nl> - ) - > CppArgument : <nl> + def argument ( <nl> + a : Union [ Argument , TensorOptionsArguments , SelfArgument ] , <nl> + * , method : bool = False , faithful : bool = False , <nl> + has_tensor_options : bool = False <nl> + ) - > List [ Binding ] : <nl> if isinstance ( a , Argument ) : <nl> - return CppArgument ( <nl> - type = argument_type ( a ) , <nl> + binds : ArgName <nl> + if a . name = = " memory_format " and has_tensor_options : <nl> + binds = SpecialArgName . possibly_redundant_memory_format <nl> + else : <nl> + binds = a . name <nl> + return [ Binding ( <nl> + ctype = argument_type ( a , binds = binds ) , <nl> name = a . name , <nl> default = default_expr ( a . default , a . type ) if a . default is not None else None , <nl> argument = a , <nl> - ) <nl> + ) ] <nl> elif isinstance ( a , TensorOptionsArguments ) : <nl> - default = None <nl> - if all ( x . default = = " None " for x in a . all ( ) ) : <nl> - default = ' { } ' <nl> - elif a . dtype . default = = " long " : <nl> - default = ' at : : kLong ' # TODO : this is wrong <nl> - return CppArgument ( <nl> - type = ' const TensorOptions & ' , <nl> - name = ' options ' , <nl> - default = default , <nl> - argument = a , <nl> - ) <nl> - else : <nl> - assert_never ( a ) <nl> - <nl> - def argument ( <nl> - a : Union [ Argument , TensorOptionsArguments , SelfArgument ] , <nl> - * , <nl> - method : bool , <nl> - ) - > Union [ CppSingleArgumentPack , CppThisArgumentPack ] : <nl> - if isinstance ( a , SelfArgument ) : <nl> + if faithful : <nl> + return argument ( a . dtype ) + argument ( a . layout ) + argument ( a . device ) + argument ( a . pin_memory ) <nl> + else : <nl> + default = None <nl> + if all ( x . default = = " None " for x in a . all ( ) ) : <nl> + default = ' { } ' <nl> + elif a . dtype . default = = " long " : <nl> + default = ' at : : kLong ' # TODO : this is wrong <nl> + return [ Binding ( <nl> + ctype = ConstRefCType ( BaseCType ( ' TensorOptions ' , ' options ' ) ) , <nl> + name = ' options ' , <nl> + default = default , <nl> + argument = a , <nl> + ) ] <nl> + elif isinstance ( a , SelfArgument ) : <nl> if method : <nl> - return CppThisArgumentPack ( argument = a , type = argument_type ( a . argument ) ) <nl> + # Caller is responsible for installing implicit this in context ! <nl> + return [ ] <nl> else : <nl> - return CppSingleArgumentPack ( argument_not_this ( a . argument ) ) <nl> + return argument ( a . argument ) <nl> else : <nl> - return CppSingleArgumentPack ( argument_not_this ( a ) ) <nl> + assert_never ( a ) <nl> <nl> - def argument_faithful ( <nl> - a : Union [ Argument , TensorOptionsArguments , SelfArgument ] , <nl> - * , <nl> - method : bool , <nl> - ) - > CppArgumentPack : <nl> - if isinstance ( a , TensorOptionsArguments ) : <nl> - return CppTensorOptionsArgumentPack ( <nl> - argument = a , <nl> - dtype = argument_not_this ( a . dtype ) , <nl> - layout = argument_not_this ( a . layout ) , <nl> - device = argument_not_this ( a . device ) , <nl> - pin_memory = argument_not_this ( a . pin_memory ) , <nl> - ) <nl> + def arguments ( <nl> + arguments : Arguments , <nl> + * , faithful : bool , method : bool <nl> + ) - > List [ Binding ] : <nl> + args : List [ Union [ Argument , TensorOptionsArguments , SelfArgument ] ] = [ ] <nl> + if faithful : <nl> + args . extend ( arguments . non_out ) <nl> + args . extend ( arguments . out ) <nl> else : <nl> - return argument ( a , method = method ) <nl> + args . extend ( arguments . out ) <nl> + args . extend ( arguments . non_out ) <nl> + return [ <nl> + r . no_default ( ) if faithful else r for a in args <nl> + for r in argument ( a , faithful = faithful , method = method , has_tensor_options = arguments . tensor_options is not None ) <nl> + ] <nl> mmm a / tools / codegen / api / dispatcher . py <nl> ppp b / tools / codegen / api / dispatcher . py <nl> <nl> import tools . codegen . local as local <nl> <nl> import itertools <nl> - from typing import Sequence , Optional , Tuple , List , Union <nl> + from typing import Sequence , List , Union <nl> <nl> # This file describes the translation of JIT schema to the dispatcher <nl> # API , the * unboxed * calling convention by which invocations through <nl> <nl> # arguments . <nl> # <nl> <nl> - def argumenttype_type ( t : Type , * , mutable : bool ) - > str : <nl> + def name ( func : FunctionSchema ) - > str : <nl> + return cpp . name ( func ) <nl> + <nl> + def argumenttype_type ( t : Type , * , mutable : bool , binds : ArgName ) - > CType : <nl> if local . use_c10_dispatcher ( ) . dispatcher_uses_new_style ( ) : <nl> # This is a faux amis . If it makes sense in the future to add <nl> # more special cases here , or invert things so cpp . argument_type <nl> # calls this , or just completely inline the function , please do <nl> # it . <nl> - return cpp . argumenttype_type ( t , mutable = mutable ) <nl> + return cpp . argumenttype_type ( t , mutable = mutable , binds = binds ) <nl> else : <nl> # This is real sharing . If you ' re modifying this path , ask <nl> # yourself why you are changing the native functions protocol <nl> # here and not in native . <nl> - return native . argumenttype_type ( t , mutable = mutable ) <nl> + return native . argumenttype_type ( t , mutable = mutable , binds = binds ) <nl> <nl> - def argument_type ( a : Argument ) - > str : <nl> - return argumenttype_type ( a . type , mutable = a . is_write ) <nl> + def argument_type ( a : Argument , * , binds : ArgName ) - > CType : <nl> + return argumenttype_type ( a . type , mutable = a . is_write , binds = binds ) <nl> <nl> def returns_type ( rs : Sequence [ Return ] ) - > str : <nl> # At present , there is no difference . But there could be ! <nl> return cpp . returns_type ( rs ) <nl> <nl> - def argument ( a : Argument ) - > DispatcherArgument : <nl> - if local . use_c10_dispatcher ( ) . dispatcher_uses_new_style ( ) : <nl> - return DispatcherArgument ( <nl> - type = argument_type ( a ) , <nl> + def argument ( <nl> + a : Union [ Argument , TensorOptionsArguments , SelfArgument ] <nl> + ) - > List [ Binding ] : <nl> + # We could forward to native . argument but it is a bit suspect because <nl> + # the grouping may not be set correctly <nl> + assert local . use_c10_dispatcher ( ) . dispatcher_uses_new_style ( ) <nl> + <nl> + if isinstance ( a , Argument ) : <nl> + return [ Binding ( <nl> + ctype = argument_type ( a , binds = a . name ) , <nl> name = a . name , <nl> argument = a , <nl> - ) <nl> - else : <nl> - la = native . argument ( a ) <nl> - assert len ( la ) = = 1 , " Operators using the legacy signature in the dispatcher don ' t scatter TensorOptions . " <nl> - return DispatcherArgument ( <nl> - type = la [ 0 ] . type , <nl> - name = la [ 0 ] . name , <nl> - argument = la [ 0 ] . argument , <nl> - ) <nl> - <nl> - def name ( func : FunctionSchema ) - > str : <nl> - return cpp . name ( func ) <nl> - <nl> - def arguments ( func : FunctionSchema ) - > Tuple [ DispatcherArgument , . . . ] : <nl> - if local . use_c10_dispatcher ( ) . dispatcher_uses_new_style ( ) : <nl> - return tuple ( map ( argument , itertools . chain ( <nl> - func . arguments . flat_positional , <nl> - func . arguments . flat_kwarg_only , <nl> - func . arguments . out <nl> - ) ) ) <nl> - else : <nl> - return tuple ( <nl> - DispatcherArgument ( type = la . type , name = la . name , argument = la . argument ) <nl> - for la in native . arguments ( func ) <nl> - ) <nl> - <nl> - # Given a set of CppArguments in scope , return a sequence of dispatcher <nl> - # expressions that translate the cpp API into dispatcher API <nl> - # <nl> - # WARNING : This is unsound if you pass it CppArgument when you were <nl> - # supposed to pass it CppTensorOptionsArguments , it will directly <nl> - # translate device to device , which will give you the wrong signature <nl> - # for dispatcher . If Argument " knew " that it was part of a <nl> - # TensorOptions that would help us dynamically test for this case <nl> - def cppargument_exprs ( <nl> - a : CppArgumentPack , <nl> - * , tensor_options : Optional [ CppArgument ] <nl> - ) - > Sequence [ DispatcherExpr ] : <nl> - if isinstance ( a , CppSingleArgumentPack ) : <nl> - if isinstance ( a . this . argument , TensorOptionsArguments ) : <nl> - if local . use_c10_dispatcher ( ) . dispatcher_uses_new_style ( ) : <nl> - # Scatter <nl> - ta = a . this . argument <nl> - name = a . this . name <nl> - return [ <nl> - DispatcherExpr ( type = argument_type ( ta . dtype ) , expr = f ' optTypeMetaToScalarType ( { name } . dtype_opt ( ) ) ' ) , <nl> - DispatcherExpr ( type = argument_type ( ta . layout ) , expr = f ' { name } . layout_opt ( ) ' ) , <nl> - DispatcherExpr ( type = argument_type ( ta . device ) , expr = f ' { name } . device_opt ( ) ' ) , <nl> - DispatcherExpr ( type = argument_type ( ta . pin_memory ) , expr = f ' { name } . pinned_memory_opt ( ) ' ) , # weird discrep <nl> - ] <nl> - else : <nl> - # No - op <nl> - return [ DispatcherExpr ( type = ' const TensorOptions & ' , expr = a . this . name ) ] <nl> - elif isinstance ( a . this . argument , Argument ) : <nl> - if a . this . name = = ' memory_format ' and \ <nl> - tensor_options is not None and \ <nl> - local . use_c10_dispatcher ( ) . dispatcher_uses_new_style ( ) : <nl> - return [ DispatcherExpr ( <nl> - type = argument_type ( a . this . argument ) , <nl> - expr = f ' c10 : : impl : : check_tensor_options_and_extract_memory_format ( { tensor_options . name } , { a . this . name } ) ' ) <nl> - ] <nl> - else : <nl> - return [ DispatcherExpr ( type = argument_type ( a . this . argument ) , expr = a . this . name ) ] <nl> - else : <nl> - assert_never ( a . this . argument ) <nl> - elif isinstance ( a , CppTensorOptionsArgumentPack ) : <nl> - if local . use_c10_dispatcher ( ) . dispatcher_uses_new_style ( ) : <nl> - # No - op <nl> - return [ <nl> - expr <nl> - for sub_a in a . explicit_arguments ( ) # NB : don ' t really care about explicitness here <nl> - for expr in cppargument_exprs ( CppSingleArgumentPack ( sub_a ) , tensor_options = tensor_options ) <nl> - ] <nl> - else : <nl> - # Gather <nl> - return [ DispatcherExpr ( <nl> - type = ' const TensorOptions & ' , <nl> - expr = f ' TensorOptions ( ) . dtype ( { a . dtype . name } ) . layout ( { a . layout . name } ) ' <nl> - f ' . device ( { a . device . name } ) . pinned_memory ( { a . pin_memory . name } ) ' , <nl> - ) ] <nl> - elif isinstance ( a , CppThisArgumentPack ) : <nl> - return [ DispatcherExpr ( <nl> - type = a . type , <nl> - expr = ' const_cast < Tensor & > ( * this ) ' , <nl> ) ] <nl> + elif isinstance ( a , SelfArgument ) : <nl> + return argument ( a . argument ) <nl> + elif isinstance ( a , TensorOptionsArguments ) : <nl> + return argument ( a . dtype ) + argument ( a . layout ) + argument ( a . device ) + argument ( a . pin_memory ) <nl> else : <nl> assert_never ( a ) <nl> <nl> - def cpparguments_exprs ( func : FunctionSchema , * , method : bool , api_is_faithful : bool ) - > Sequence [ DispatcherExpr ] : <nl> - dispatcher_is_faithful = local . use_c10_dispatcher ( ) . dispatcher_uses_new_style ( ) <nl> - <nl> - arguments : List [ Union [ Argument , TensorOptionsArguments , SelfArgument ] ] = [ ] <nl> - if dispatcher_is_faithful : <nl> - arguments . extend ( func . arguments . non_out ) <nl> - arguments . extend ( func . arguments . out ) <nl> - else : <nl> - arguments . extend ( func . arguments . out ) <nl> - arguments . extend ( func . arguments . non_out ) <nl> - <nl> - if api_is_faithful : <nl> - argument_packs = tuple ( <nl> - cpp . argument_faithful ( a , method = method ) for a in arguments <nl> - ) <nl> + def arguments ( func : FunctionSchema ) - > List [ Binding ] : <nl> + if local . use_c10_dispatcher ( ) . dispatcher_uses_new_style ( ) : <nl> + return [ <nl> + r for a in itertools . chain ( <nl> + func . arguments . positional , <nl> + func . arguments . kwarg_only , <nl> + func . arguments . out <nl> + ) for r in argument ( a ) <nl> + ] <nl> else : <nl> - argument_packs = tuple ( <nl> - cpp . argument ( a , method = method ) for a in arguments <nl> - ) <nl> - <nl> - return _cpparguments_exprs ( argument_packs ) <nl> - <nl> - def _cpparguments_exprs ( args : Sequence [ CppArgumentPack ] ) - > Sequence [ DispatcherExpr ] : <nl> - tensor_options = next ( <nl> - ( a . this for a in args if isinstance ( a , CppSingleArgumentPack ) and <nl> - isinstance ( a . this . argument , TensorOptionsArguments ) ) , <nl> - None <nl> - ) <nl> - return [ r for a in args for r in cppargument_exprs ( a , tensor_options = tensor_options ) ] <nl> - <nl> - # I don ' t think this is entirely sound , but it should be reasonably <nl> - # close <nl> - def nativearguments_exprs ( args : Sequence [ NativeArgument ] ) - > Sequence [ DispatcherExpr ] : <nl> - return _cpparguments_exprs ( [ <nl> - CppSingleArgumentPack ( CppArgument ( type = a . type , name = a . name , default = None , argument = a . argument ) ) <nl> - for a in args <nl> - ] ) <nl> - <nl> - def exprs ( args : Sequence [ DispatcherArgument ] ) - > Sequence [ DispatcherExpr ] : <nl> - return _cpparguments_exprs ( [ <nl> - CppSingleArgumentPack ( CppArgument ( type = a . type , name = a . name , default = None , argument = a . argument ) ) <nl> - for a in args <nl> - ] ) <nl> + return native . arguments ( func ) <nl> mmm a / tools / codegen / api / meta . py <nl> ppp b / tools / codegen / api / meta . py <nl> <nl> from tools . codegen . model import * <nl> - from tools . codegen . api . types import MetaArgument <nl> - <nl> - import tools . codegen . api . dispatcher as dispatcher <nl> - <nl> - from typing import Sequence <nl> + from tools . codegen . api . types import * <nl> <nl> # Follows dispatcher calling convention , but : <nl> # - Mutable arguments not allowed . Meta functions are always <nl> <nl> def name ( g : StructuredNativeFunctions ) - > str : <nl> # use the overload name from the functional version <nl> return str ( g . functional . func . name ) . replace ( ' . ' , ' _ ' ) <nl> - <nl> - def argument_type ( a : Argument ) - > str : <nl> - assert not a . is_write <nl> - return dispatcher . argumenttype_type ( a . type , mutable = False ) <nl> - <nl> - def argument ( a : Argument ) - > MetaArgument : <nl> - return MetaArgument ( <nl> - type = argument_type ( a ) , <nl> - name = a . name , <nl> - argument = a , <nl> - ) <nl> - <nl> - def arguments ( func : FunctionSchema ) - > Sequence [ MetaArgument ] : <nl> - assert not func . arguments . out <nl> - return list ( map ( argument , func . arguments . flat_non_out ) ) <nl> mmm a / tools / codegen / api / native . py <nl> ppp b / tools / codegen / api / native . py <nl> <nl> from tools . codegen . model import * <nl> <nl> - from tools . codegen . api . types import NativeArgument <nl> + from tools . codegen . api . types import * <nl> import tools . codegen . api . cpp as cpp <nl> from tools . codegen import local <nl> <nl> - from typing import Union , Sequence , Tuple , List <nl> + from typing import Union , Sequence , List <nl> <nl> # This file describes the translation of JIT schema to the native functions API . <nl> # This looks a lot like the C + + API ( which makes historical sense , because the <nl> def name ( func : FunctionSchema ) - > str : <nl> name + = f ' _ { func . name . overload_name } ' <nl> return name <nl> <nl> - def argumenttype_type ( t : Type , * , mutable : bool ) - > str : <nl> + def argumenttype_type ( t : Type , * , mutable : bool , binds : ArgName ) - > CType : <nl> if str ( t ) = = ' Tensor ? ' : <nl> if mutable : <nl> - return ' Tensor & ' <nl> + return MutRefCType ( BaseCType ( ' Tensor ' , binds ) ) <nl> else : <nl> - return ' const Tensor & ' <nl> + return ConstRefCType ( BaseCType ( ' Tensor ' , binds ) ) <nl> elif str ( t ) = = ' Tensor ? [ ] ' : <nl> - return ' TensorList ' <nl> - return cpp . argumenttype_type ( t , mutable = mutable ) <nl> + return BaseCType ( ' TensorList ' , binds ) <nl> + return cpp . argumenttype_type ( t , mutable = mutable , binds = binds ) <nl> <nl> def returns_type ( rs : Sequence [ Return ] ) - > str : <nl> return cpp . returns_type ( rs ) <nl> <nl> - def argument_type ( a : Argument ) - > str : <nl> - return argumenttype_type ( a . type , mutable = a . is_write ) <nl> + def argument_type ( a : Argument , * , binds : ArgName ) - > CType : <nl> + return argumenttype_type ( a . type , mutable = a . is_write , binds = binds ) <nl> <nl> - def argument ( a : Union [ Argument , SelfArgument , TensorOptionsArguments ] ) - > Sequence [ NativeArgument ] : <nl> + def argument ( a : Union [ Argument , SelfArgument , TensorOptionsArguments ] ) - > List [ Binding ] : <nl> if isinstance ( a , Argument ) : <nl> - return [ NativeArgument ( <nl> - type = argument_type ( a ) , <nl> + return [ Binding ( <nl> + ctype = argument_type ( a , binds = a . name ) , <nl> name = a . name , <nl> default = cpp . default_expr ( a . default , a . type ) if a . default is not None else None , <nl> argument = a , <nl> ) ] <nl> elif isinstance ( a , SelfArgument ) : <nl> # Erase SelfArgument from the distinction <nl> - return [ NativeArgument ( <nl> - type = argument_type ( a . argument ) , <nl> - name = a . argument . name , <nl> - default = None , <nl> - argument = a . argument , <nl> - ) ] <nl> + return argument ( a . argument ) <nl> elif isinstance ( a , TensorOptionsArguments ) : <nl> if local . use_c10_dispatcher ( ) in [ UseC10Dispatcher . hacky_wrapper_for_legacy_signatures , <nl> UseC10Dispatcher . with_codegenerated_unboxing_wrapper ] : <nl> def argument ( a : Union [ Argument , SelfArgument , TensorOptionsArguments ] ) - > Sequen <nl> default = ' { } ' <nl> elif a . dtype . default = = " long " : <nl> default = ' at : : kLong ' # TODO : this is wrong <nl> - return [ NativeArgument ( <nl> - type = ' const TensorOptions & ' , <nl> + return [ Binding ( <nl> + ctype = ConstRefCType ( BaseCType ( ' TensorOptions ' , ' options ' ) ) , <nl> name = ' options ' , <nl> default = default , <nl> argument = a , <nl> def argument ( a : Union [ Argument , SelfArgument , TensorOptionsArguments ] ) - > Sequen <nl> else : <nl> assert local . use_c10_dispatcher ( ) = = UseC10Dispatcher . full <nl> return [ <nl> - NativeArgument ( <nl> - type = ' c10 : : optional < ScalarType > ' , <nl> + Binding ( <nl> + ctype = OptionalCType ( BaseCType ( ' ScalarType ' , ' dtype ' ) ) , <nl> name = ' dtype ' , <nl> default = ' { } ' , <nl> argument = a , <nl> ) , <nl> - NativeArgument ( <nl> - type = ' c10 : : optional < Layout > ' , <nl> + Binding ( <nl> + ctype = OptionalCType ( BaseCType ( ' Layout ' , ' layout ' ) ) , <nl> name = ' layout ' , <nl> default = ' { } ' , <nl> argument = a , <nl> ) , <nl> - NativeArgument ( <nl> - type = ' c10 : : optional < Device > ' , <nl> + Binding ( <nl> + ctype = OptionalCType ( BaseCType ( ' Device ' , ' device ' ) ) , <nl> name = ' device ' , <nl> default = ' { } ' , <nl> argument = a , <nl> ) , <nl> - NativeArgument ( <nl> - type = ' c10 : : optional < bool > ' , <nl> + Binding ( <nl> + ctype = OptionalCType ( BaseCType ( ' bool ' , ' pin_memory ' ) ) , <nl> name = ' pin_memory ' , <nl> default = ' { } ' , <nl> argument = a , <nl> def argument ( a : Union [ Argument , SelfArgument , TensorOptionsArguments ] ) - > Sequen <nl> else : <nl> assert_never ( a ) <nl> <nl> - def arguments ( func : FunctionSchema ) - > Tuple [ NativeArgument , . . . ] : <nl> + def arguments ( func : FunctionSchema ) - > List [ Binding ] : <nl> args : List [ Union [ Argument , TensorOptionsArguments , SelfArgument ] ] = [ ] <nl> if local . use_c10_dispatcher ( ) is UseC10Dispatcher . full : <nl> args . extend ( func . arguments . non_out ) <nl> def arguments ( func : FunctionSchema ) - > Tuple [ NativeArgument , . . . ] : <nl> else : <nl> args . extend ( func . arguments . out ) <nl> args . extend ( func . arguments . non_out ) <nl> - return tuple ( i for arg in args for i in argument ( arg ) ) <nl> + return [ r for arg in args for r in argument ( arg ) ] <nl> mmm a / tools / codegen / api / python . py <nl> ppp b / tools / codegen / api / python . py <nl> <nl> from dataclasses import dataclass <nl> - from typing import Optional , Union , Sequence , Set , List , Tuple , Dict <nl> + from typing import Optional , Union , Sequence , Set , List , Dict , Tuple <nl> <nl> from tools . codegen . api . types import * <nl> import tools . codegen . api . cpp as cpp <nl> def argument_type_str_pyi ( t : Type ) - > str : <nl> <nl> def dispatch_lambda_args ( ps : PythonSignature , f : NativeFunction ) - > Tuple [ DispatchLambdaArgument , . . . ] : <nl> # Start with cpp arguments - dispatch lambda signature always include ' self ' <nl> - cpp_args : Sequence [ CppArgument ] = _cpp_signature ( f , method = False ) . arguments ( ) <nl> + cpp_args : Sequence [ Binding ] = _cpp_signature ( f , method = False ) . arguments ( ) <nl> <nl> # Special reorder logic for deprecated python signature <nl> if isinstance ( ps , PythonSignatureDeprecated ) : <nl> - m : Dict [ str , CppArgument ] = dict ( ( a . name , a ) for a in cpp_args ) <nl> + m : Dict [ str , Binding ] = dict ( ( a . name , a ) for a in cpp_args ) <nl> # reorder according to the deprecated signature <nl> # ignore ' out ' argument when binding to non - output function . <nl> ordered_args = filter ( lambda n : n ! = ' out ' or f . func . is_out_fn ( ) , <nl> def dispatch_lambda_args ( ps : PythonSignature , f : NativeFunction ) - > Tuple [ Dispat <nl> out_args : Set [ str ] = set ( a . name for a in f . func . arguments . out ) <nl> <nl> # Convert from cpp argument to lambda argument <nl> - def dispatch_lambda_arg ( cpp_arg : CppArgument ) - > DispatchLambdaArgument : <nl> + def dispatch_lambda_arg ( cpp_arg : Binding ) - > DispatchLambdaArgument : <nl> type_str = cpp_arg . type <nl> is_out_arg = cpp_arg . name in out_args <nl> if ps . method and cpp_arg . name = = ' self ' : <nl> def cpp_dispatch_target ( f : NativeFunction ) - > str : <nl> def cpp_dispatch_exprs ( f : NativeFunction , * , <nl> python_signature : Optional [ PythonSignature ] = None , <nl> ) - > Tuple [ str , . . . ] : <nl> - cpp_args : Sequence [ CppArgument ] = _cpp_signature ( f , method = False ) . arguments ( ) <nl> + cpp_args : Sequence [ Binding ] = _cpp_signature ( f , method = False ) . arguments ( ) <nl> <nl> exprs : Tuple [ str , . . . ] = tuple ( ) <nl> if not isinstance ( python_signature , PythonSignatureDeprecated ) : <nl> new file mode 100644 <nl> index 000000000000 . . 1b612080d8b6 <nl> mmm / dev / null <nl> ppp b / tools / codegen / api / translate . py <nl> <nl> + from typing import Dict , Sequence , List , NoReturn <nl> + from tools . codegen . api . types import * <nl> + <nl> + # This file implements a small program synthesis engine that implements <nl> + # conversions between one API to another . <nl> + # <nl> + # The key data type in this file in CType , short for C + + semantic type . A CType <nl> + # represents a C + + type , plus semantic information about what it represents . <nl> + # For example , consider the argument " bool pin_memory " ; its normal C + + type is <nl> + # " bool " , but its C + + semantic type also keeps track that this represents a <nl> + # " pin_memory " ; you can ' t just use a random other boolean in a context where you <nl> + # need a " pin_memory " ! <nl> + # <nl> + # The translator takes a list of needed CTypes , and then figures out how <nl> + # to construct expressions with these CTypes from the given bindings . Many <nl> + # of these expressions are trivial ( I need a Tensor other ; there ' s a Tensor <nl> + # other scope ) ; others are more nontrivial and may require packing / unpacking . <nl> + # Some examples of non - trivial action : <nl> + # <nl> + # - Need the " dtype " binding ? Well , maybe " dtype " isn ' t available <nl> + # in the context , instead , " options " is , and you need to extract <nl> + # it from there . ( Gather ) <nl> + # <nl> + # - Need the " context " binding ? Well , maybe " context " isn ' t available <nl> + # in the context , and you need to construct it from " dtype " , " device " , <nl> + # etc . ( Scatter ) <nl> + # <nl> + # - Need the " memory_format " binding ? Well , actually , it ' s available <nl> + # from both " memory_format " and " options " , so you had better make sure <nl> + # they are consistent . ( Join ) <nl> + <nl> + options_ctype = ConstRefCType ( BaseCType ( " TensorOptions " , " options " ) ) <nl> + <nl> + class UnsatError ( RuntimeError ) : <nl> + pass <nl> + <nl> + # Given a set of in - scope bindings and a set of target bindings , synthesize <nl> + # a list of expressions that uses only the in - scope bindings ( bindings ) that <nl> + # have all of the types of goals . You may want to use this function if <nl> + # you ' re generating code for a function like : <nl> + # <nl> + # void f ( { args } ) { <nl> + # g ( { exprs } ) ; / / g is a different API <nl> + # } <nl> + # <nl> + # and you need to generate " exprs " . <nl> + # <nl> + # TODO : Don ' t need full Binding for goals , CType will do <nl> + # TODO : Don ' t need full Binding for bindings , list of Expr will do <nl> + def translate ( bindings : Sequence [ Binding ] , goals : Sequence [ Binding ] , * , method : bool = False ) - > List [ Expr ] : <nl> + # Add all the bindings to the context <nl> + ctx : Dict [ CType , str ] = { } <nl> + for b in bindings : <nl> + ctx [ b . ctype ] = b . name <nl> + <nl> + # Add implicit bindings if the generated code is inside a Tensor method <nl> + if method : <nl> + ctx [ MutRefCType ( BaseCType ( " Tensor " , " self " ) ) ] = " const_cast < Tensor & > ( * this ) " <nl> + ctx [ ConstRefCType ( BaseCType ( " Tensor " , " self " ) ) ] = " const_cast < Tensor & > ( * this ) " <nl> + # This is better ! Byte - for - byte compat <nl> + # ctx [ ConstRefCType ( BaseCType ( " Tensor " , " self " ) ) ] = " * this " <nl> + <nl> + def unsat ( goal : CType ) - > NoReturn : <nl> + ctx_desc = ' \ n ' . join ( f " { t . cpp_type ( ) } { e } ; " for t , e in ctx . items ( ) ) <nl> + raise UnsatError ( f ' ' ' <nl> + Failed to synthesize the expression " { goal . cpp_type ( ) } { goal . name } " <nl> + while trying to translate from : <nl> + <nl> + from_func ( { ' , ' . join ( b . defn ( ) for b in bindings ) } ) <nl> + <nl> + to : <nl> + <nl> + to_func ( { ' , ' . join ( g . defn ( ) for g in goals ) } ) <nl> + <nl> + When I failed , the following bindings were available in the context : <nl> + <nl> + { ctx_desc } <nl> + <nl> + This probably means there is a missing rule in the rules of tools . codegen . api . translate . <nl> + Check this module for more information . <nl> + ' ' ' ) <nl> + <nl> + # A shitty backtracking search implementation . It ' s shitty because it <nl> + # doesn ' t actually do backtracing or search . In particular , if <nl> + # direct = True , we won ' t try to do any fancy synthesis , just trivial <nl> + # conversions ( e . g . , " T a " is OK for " const T & a " ) . So all of the <nl> + # existing rules in this function simply try to solve immediately , <nl> + # and bail if things don ' t work out . <nl> + def solve ( goal : CType , * , direct : bool ) - > str : <nl> + def direct_solve ( goal : CType ) - > str : <nl> + return solve ( goal , direct = True ) <nl> + <nl> + if goal in ctx : <nl> + # Trivial <nl> + return ctx [ goal ] <nl> + <nl> + # If the goal is a const & , try solving for the value type first <nl> + if isinstance ( goal , ConstRefCType ) : <nl> + try : <nl> + return solve ( goal . elem , direct = direct ) <nl> + except UnsatError : <nl> + pass <nl> + <nl> + if direct : <nl> + unsat ( goal ) <nl> + <nl> + # For now , all of these rules are mutually exclusive . <nl> + if goal = = OptionalCType ( BaseCType ( " MemoryFormat " , " memory_format " ) ) : <nl> + memory_format = direct_solve ( <nl> + OptionalCType ( BaseCType ( " MemoryFormat " , SpecialArgName . possibly_redundant_memory_format ) ) <nl> + ) <nl> + try : <nl> + options = direct_solve ( options_ctype ) <nl> + return f " c10 : : impl : : check_tensor_options_and_extract_memory_format ( { options } , { memory_format } ) " <nl> + except UnsatError : <nl> + return memory_format <nl> + <nl> + elif goal = = BaseCType ( " TensorOptions " , " options " ) : <nl> + dtype = direct_solve ( OptionalCType ( BaseCType ( " ScalarType " , " dtype " ) ) ) <nl> + pin_memory = direct_solve ( OptionalCType ( BaseCType ( " bool " , " pin_memory " ) ) ) <nl> + device = direct_solve ( OptionalCType ( BaseCType ( " Device " , " device " ) ) ) <nl> + layout = direct_solve ( OptionalCType ( BaseCType ( " Layout " , " layout " ) ) ) <nl> + return f ' TensorOptions ( ) . dtype ( { dtype } ) . layout ( { layout } ) . device ( { device } ) . pinned_memory ( { pin_memory } ) ' <nl> + <nl> + elif goal = = OptionalCType ( BaseCType ( " ScalarType " , " dtype " ) ) : <nl> + options = direct_solve ( options_ctype ) <nl> + return f ' optTypeMetaToScalarType ( { options } . dtype_opt ( ) ) ' <nl> + <nl> + elif goal = = OptionalCType ( BaseCType ( " Layout " , " layout " ) ) : <nl> + options = direct_solve ( options_ctype ) <nl> + return f ' { options } . layout_opt ( ) ' <nl> + <nl> + elif goal = = OptionalCType ( BaseCType ( " Device " , " device " ) ) : <nl> + options = direct_solve ( options_ctype ) <nl> + return f ' { options } . device_opt ( ) ' <nl> + <nl> + elif goal = = OptionalCType ( BaseCType ( " bool " , " pin_memory " ) ) : <nl> + options = direct_solve ( options_ctype ) <nl> + return f ' { options } . pinned_memory_opt ( ) ' <nl> + <nl> + unsat ( goal ) <nl> + <nl> + return [ Expr ( solve ( g . ctype , direct = False ) , g . ctype ) for g in goals ] <nl> mmm a / tools / codegen / api / types . py <nl> ppp b / tools / codegen / api / types . py <nl> <nl> from tools . codegen . model import * <nl> from dataclasses import dataclass <nl> - from typing import Optional , Union , Sequence , Tuple , TypeVar , List <nl> + from typing import Optional , Union , Sequence , TypeVar , List <nl> + from enum import Enum <nl> <nl> _T = TypeVar ( ' _T ' ) <nl> <nl> - # mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - # <nl> + # An ArgName is just the str name of the argument in schema ; <nl> + # but in some special circumstances , we may add a little extra <nl> + # context . The Enum SpecialArgName covers all of these cases ; <nl> + # grep for their construction sites to see when they can occr . <nl> + <nl> + SpecialArgName = Enum ( ' SpecialArgName ' , ( <nl> + ' possibly_redundant_memory_format ' , <nl> + ) ) <nl> + ArgName = Union [ str , SpecialArgName ] <nl> + <nl> + # A CType is short for C + + semantic type . A CType represents a C + + type , plus <nl> + # semantic information about what it represents . For example , consider the <nl> + # argument " bool pin_memory " ; its normal C + + type is " bool " , but its C + + <nl> + # semantic type also keeps track that this represents a " pin_memory " ; you can ' t <nl> + # just use a random other boolean in a context where you need a " pin_memory " ! <nl> + # <nl> + # CTypes encode C + + type structure as needed for translation . Right now we <nl> + # track references and optional , but don ' t , for example , track ArrayRef . If <nl> + # you need trnsnlations that know about these types , beef up this data <nl> + # structure . <nl> <nl> - # cpp types <nl> + @ dataclass ( frozen = True ) <nl> + class BaseCType : <nl> + type : str <nl> + name : ArgName <nl> <nl> - # mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - # <nl> + def cpp_type ( self ) - > str : <nl> + return self . type <nl> <nl> - # Describe a single argument ( e . g . , the x in " f ( int x ) " ) in the C + + API . <nl> @ dataclass ( frozen = True ) <nl> - class CppArgument : <nl> - # C + + type , e . g . , int <nl> - type : str <nl> - # C + + name , e . g . , x <nl> - name : str <nl> - # Only used by the header , but we work it out in all cases anyway <nl> - default : Optional [ str ] <nl> - # The JIT argument ( s ) this formal was derived from . May <nl> - # correspond to multiple arguments if this is TensorOptions ! <nl> - argument : Union [ Argument , TensorOptionsArguments ] <nl> - <nl> - # Default string representation prints the most elaborated form <nl> - # of the formal <nl> - def __str__ ( self ) - > str : <nl> - mb_default = " " <nl> - if self . default is not None : <nl> - mb_default = f " = { self . default } " <nl> - return f " { self . type } { self . name } { mb_default } " <nl> + class ConstRefCType : <nl> + elem : ' CType ' <nl> <nl> - # Return a copy of CppArgument with defaults removed <nl> - def no_default ( self ) - > ' CppArgument ' : <nl> - return CppArgument ( <nl> - type = self . type , <nl> - name = self . name , <nl> - default = None , <nl> - argument = self . argument , <nl> - ) <nl> + def cpp_type ( self ) - > str : <nl> + return f ' const { self . elem . cpp_type ( ) } & ' <nl> <nl> - # However , you might also find the version with no default useful <nl> - def str_no_default ( self ) - > str : <nl> - return f " { self . type } { self . name } " <nl> + @ property <nl> + def name ( self ) - > ArgName : <nl> + return self . elem . name <nl> <nl> - # An argument pack groups several CppArguments together into <nl> - # a semantically meaningful unit . Don ' t let the packing <nl> - # deceive you : if you look at these arguments in C + + , they ' re <nl> - # always packing ( in analogy to how parameter packs in C + + <nl> - # templates actually turn into separate arguments when you <nl> - # unpack them ) . <nl> @ dataclass ( frozen = True ) <nl> - class CppArgumentPackIface : <nl> - # Return this argument pack , but with default stripped <nl> - def no_default ( self : _T ) - > _T : <nl> - raise NotImplementedError <nl> - <nl> - # Unpack the pack into a sequence of arguments , discarding <nl> - # semantic information , and also discarding the implicit this <nl> - # argument that doesn ' t actually show up in declarations <nl> - def explicit_arguments ( self ) - > Sequence [ CppArgument ] : <nl> - raise NotImplementedError <nl> - <nl> - # Lifts a single CppArgument into a pack . <nl> + class MutRefCType : <nl> + elem : ' CType ' <nl> + <nl> + def cpp_type ( self ) - > str : <nl> + return f ' { self . elem . cpp_type ( ) } & ' <nl> + <nl> + @ property <nl> + def name ( self ) - > ArgName : <nl> + return self . elem . name <nl> + <nl> @ dataclass ( frozen = True ) <nl> - class CppSingleArgumentPack ( CppArgumentPackIface ) : <nl> - this : CppArgument <nl> + class OptionalCType : <nl> + elem : ' CType ' <nl> <nl> - def no_default ( self ) - > ' CppSingleArgumentPack ' : <nl> - return CppSingleArgumentPack ( this = self . this . no_default ( ) ) <nl> + def cpp_type ( self ) - > str : <nl> + return f ' c10 : : optional < { self . elem . cpp_type ( ) } > ' <nl> <nl> @ property <nl> - def type ( self ) - > str : <nl> - return self . this . type <nl> + def name ( self ) - > ArgName : <nl> + return self . elem . name <nl> <nl> - def explicit_arguments ( self ) - > Sequence [ CppArgument ] : <nl> - return [ self . this ] <nl> + CType = Union [ BaseCType , OptionalCType , ConstRefCType , MutRefCType ] <nl> + <nl> + # A binding represents any C + + binding site for a formal parameter . <nl> + # We don ' t distinguish between binding sites for different APIs ; <nl> + # instead , all of the important distinctions are encoded in CType , <nl> + # which you can use to figure out if a given Binding is appropriate <nl> + # for use in another context . ( See tools . codegen . api . translate ) <nl> <nl> - # Describe an implicit this argument ( * this ) on methods in the C + + API . <nl> - # We don ' t use CppSingleArgumentPack because these never show up <nl> - # in the explicit arguments list <nl> @ dataclass ( frozen = True ) <nl> - class CppThisArgumentPack ( CppArgumentPackIface ) : <nl> - # The grouped JIT argument this formal was derived from <nl> - argument : SelfArgument <nl> + class Binding : <nl> + name : str <nl> + ctype : CType <nl> + argument : Union [ Argument , TensorOptionsArguments , SelfArgument ] <nl> + # TODO : maybe don ' t represent default here <nl> + default : Optional [ str ] = None <nl> <nl> - # C + + type , e . g . , Tensor & <nl> - type : str <nl> + @ property <nl> + def type ( self ) - > str : <nl> + return self . ctype . cpp_type ( ) <nl> <nl> - # this arguments are never defaulted <nl> - def no_default ( self ) - > ' CppThisArgumentPack ' : <nl> - return self <nl> - <nl> - # The this argument is implicit , so it ' s not included in the <nl> - # explicit arguments list . <nl> - def explicit_arguments ( self ) - > Sequence [ CppArgument ] : <nl> - return [ ] <nl> - <nl> - # Semantically represents a bundle of CppArguments that collectively <nl> - # represent a TensorOptions . If you don ' t care about TensorOptions <nl> - # processing , think of this as just a list of four CppArguments ; however <nl> - # if you need to bundle these arguments back into a single <nl> - # TensorOptions , it will be easiest to operate on this struct as a <nl> - # whole . <nl> - # <nl> - # NOTE : this does NOT represent a ' const TensorOptions & ' argument . <nl> - # If you have one of those , it will be CppSingleArgumentPack <nl> - @ dataclass ( frozen = True ) <nl> - class CppTensorOptionsArgumentPack ( CppArgumentPackIface ) : <nl> - argument : TensorOptionsArguments <nl> - dtype : CppArgument <nl> - layout : CppArgument <nl> - device : CppArgument <nl> - pin_memory : CppArgument <nl> - <nl> - # Remove the defaults from each of the constituent arguments <nl> - # representing the TensorOptions <nl> - def no_default ( self ) - > ' CppTensorOptionsArgumentPack ' : <nl> - return CppTensorOptionsArgumentPack ( <nl> + def no_default ( self ) - > ' Binding ' : <nl> + return Binding ( <nl> + name = self . name , <nl> + ctype = self . ctype , <nl> + default = None , <nl> argument = self . argument , <nl> - dtype = self . dtype . no_default ( ) , <nl> - layout = self . layout . no_default ( ) , <nl> - device = self . device . no_default ( ) , <nl> - pin_memory = self . pin_memory . no_default ( ) , <nl> ) <nl> <nl> - # Flatten the TensorOptions into individual CppArguments <nl> - def explicit_arguments ( self ) - > Sequence [ CppArgument ] : <nl> - return [ self . dtype , self . layout , self . device , self . pin_memory ] <nl> + def decl ( self ) - > str : <nl> + mb_default = " " <nl> + if self . default is not None : <nl> + mb_default = f " = { self . default } " <nl> + return f " { self . type } { self . name } { mb_default } " <nl> + <nl> + def defn ( self ) - > str : <nl> + return f " { self . type } { self . name } " <nl> <nl> - # Use this instead of CppArgumentPackIface , as this is a closed union <nl> - CppArgumentPack = Union [ <nl> - CppSingleArgumentPack , <nl> - CppThisArgumentPack , <nl> - CppTensorOptionsArgumentPack , <nl> - ] <nl> + # An Expr is a C + + expression . It has a C + + string representing its syntax , <nl> + # as well as a CType saying what it provides . <nl> <nl> @ dataclass ( frozen = True ) <nl> - class CppExpr : <nl> - type : str <nl> + class Expr : <nl> expr : str <nl> + type : CType <nl> <nl> # A CppSignature represents a single overload in the C + + API . For <nl> # any given function schema , there may be multiple CppSignatures <nl> class CppSignature : <nl> # Return the unpacked argument structure of this signature , <nl> # discarding information about which arguments are semantically <nl> # related to each other . <nl> - def arguments ( self ) - > Sequence [ CppArgument ] : <nl> - return [ sub_a for a in self . argument_packs ( ) for sub_a in a . explicit_arguments ( ) ] <nl> - <nl> - # Return the packed argument structure of this signature . This preserves <nl> - # high - level structure of the arguments so you may find it easier to do <nl> - # translations working with this representation . <nl> - def argument_packs ( self ) - > Sequence [ CppArgumentPack ] : <nl> - arguments : List [ Union [ Argument , TensorOptionsArguments , SelfArgument ] ] = [ ] <nl> - if self . faithful : <nl> - arguments . extend ( self . func . arguments . non_out ) <nl> - arguments . extend ( self . func . arguments . out ) <nl> - else : <nl> - arguments . extend ( self . func . arguments . out ) <nl> - arguments . extend ( self . func . arguments . non_out ) <nl> - <nl> - if self . faithful : <nl> - # After this , manually do overload disambiguation , by <nl> - # dropping defaults from the faithful signature . In <nl> - # principle , we should be able to do this at some later <nl> - # point in time with other overload disambiguation <nl> - argument_packs = tuple ( <nl> - cpp . argument_faithful ( a , method = self . method ) . no_default ( ) for a in arguments <nl> - ) <nl> - else : <nl> - argument_packs = tuple ( <nl> - cpp . argument ( a , method = self . method ) for a in arguments <nl> - ) <nl> - return argument_packs <nl> + def arguments ( self ) - > Sequence [ Binding ] : <nl> + return cpp . arguments ( self . func . arguments , faithful = self . faithful , method = self . method ) <nl> <nl> def name ( self ) - > str : <nl> n = cpp . name ( self . func , faithful_name_for_out_overloads = self . faithful ) <nl> def name ( self ) - > str : <nl> # Render the C + + declaration for this signature <nl> def decl ( self ) - > str : <nl> returns_type = cpp . returns_type ( self . func . returns ) <nl> - cpp_args_str = ' , ' . join ( map ( str , self . arguments ( ) ) ) <nl> + cpp_args_str = ' , ' . join ( a . decl ( ) for a in self . arguments ( ) ) <nl> return f " { returns_type } { self . name ( ) } ( { cpp_args_str } ) " <nl> <nl> # Render the C + + definition for this signature , not including <nl> # the body ( with curly braces ) <nl> def defn ( self , * , prefix : str = " " ) - > str : <nl> returns_type = cpp . returns_type ( self . func . returns ) <nl> - cpp_args_str = ' , ' . join ( a . str_no_default ( ) for a in self . arguments ( ) ) <nl> + cpp_args_str = ' , ' . join ( a . defn ( ) for a in self . arguments ( ) ) <nl> name = prefix + self . name ( ) <nl> return f " { returns_type } { name } ( { cpp_args_str } ) " <nl> <nl> def from_schema ( func : FunctionSchema , * , method : bool , fallback_binding : bool = <nl> faithful_signature = faithful_signature , <nl> ) <nl> <nl> - # mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - # <nl> - <nl> - # dispatcher types <nl> - <nl> - # mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - # <nl> - <nl> - @ dataclass ( frozen = True ) <nl> - class DispatcherExpr : <nl> - type : str <nl> - expr : str <nl> - <nl> - @ dataclass ( frozen = True ) <nl> - class DispatcherArgument : <nl> - type : str <nl> - name : str <nl> - # dispatcher NEVER has defaults <nl> - argument : Union [ Argument , TensorOptionsArguments ] <nl> - # TensorOptionsArguments can occur when not using full c10 dispatch <nl> - <nl> - def __str__ ( self ) - > str : <nl> - return f " { self . type } { self . name } " <nl> - <nl> @ dataclass ( frozen = True ) <nl> class DispatcherSignature : <nl> # The schema this signature is derived from <nl> func : FunctionSchema <nl> <nl> - # Note to self : if we ever need to reassemble tensor options , we may need to <nl> - # also preserve grouping with DispatcherTensorOptionsArguments . This should <nl> - # be an unlikely situation , however , since the general direction we are <nl> - # headed is to make native : : take everything in expanded form , so you <nl> - # shouldn ' t need to reassemble <nl> - _arguments : Tuple [ DispatcherArgument , . . . ] <nl> - _returns_type : str <nl> - <nl> - def arguments ( self ) - > Tuple [ DispatcherArgument , . . . ] : <nl> - return self . _arguments <nl> + def arguments ( self ) - > List [ Binding ] : <nl> + return dispatcher . arguments ( self . func ) <nl> <nl> def name ( self ) - > str : <nl> return dispatcher . name ( self . func ) <nl> <nl> def defn ( self , name : Optional [ str ] = None ) - > str : <nl> - args_str = ' , ' . join ( map ( str , self . arguments ( ) ) ) <nl> + args_str = ' , ' . join ( a . defn ( ) for a in self . arguments ( ) ) <nl> if name is None : <nl> name = self . name ( ) <nl> - return f " { self . _returns_type } { name } ( { args_str } ) " <nl> + return f " { self . returns_type ( ) } { name } ( { args_str } ) " <nl> <nl> - def exprs ( self ) - > Sequence [ DispatcherExpr ] : <nl> - return dispatcher . exprs ( self . arguments ( ) ) <nl> + def exprs ( self ) - > List [ Expr ] : <nl> + return [ Expr ( a . name , a . ctype ) for a in self . arguments ( ) ] <nl> + <nl> + def returns_type ( self ) - > str : <nl> + return dispatcher . returns_type ( self . func . returns ) <nl> <nl> # Return the C + + function type , e . g . , something like int ( bool ) <nl> def type ( self ) - > str : <nl> - dispatcher_args_types_str = ' , ' . join ( a . type for a in self . _arguments ) <nl> - return f ' { self . _returns_type } ( { dispatcher_args_types_str } ) ' <nl> + dispatcher_args_types_str = ' , ' . join ( a . type for a in self . arguments ( ) ) <nl> + return f ' { self . returns_type ( ) } ( { dispatcher_args_types_str } ) ' <nl> <nl> @ staticmethod <nl> def from_schema ( func : FunctionSchema ) - > ' DispatcherSignature ' : <nl> - arguments = dispatcher . arguments ( func ) <nl> - returns_type = dispatcher . returns_type ( func . returns ) <nl> - <nl> - return DispatcherSignature ( <nl> - func = func , <nl> - _arguments = arguments , <nl> - _returns_type = returns_type , <nl> - ) <nl> - <nl> - # mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - # <nl> - <nl> - # native types ( NativeFunctions . h ) <nl> - <nl> - # mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - # <nl> - <nl> - # NB : the " native " here is not to be confused with the native in <nl> - # native_functions . yaml <nl> - <nl> - @ dataclass ( frozen = True ) <nl> - class NativeExpr : <nl> - type : str <nl> - expr : str <nl> - <nl> - @ dataclass ( frozen = True ) <nl> - class NativeArgument : <nl> - type : str <nl> - name : str <nl> - # Native function arguments have defaults to make it a little <nl> - # easier to call them directly to bypass dispatch . <nl> - default : Optional [ str ] <nl> - argument : Union [ Argument , TensorOptionsArguments ] <nl> - <nl> - # Convention here is swapped because arguably NativeFunctions . h <nl> - # shouldn ' t have defaults ( they should be handled during dispatching ) . <nl> - # The defaults are a mild convenience , however , for people who directly <nl> - # call native : : functions <nl> - def __str__ ( self ) - > str : <nl> - return f " { self . type } { self . name } " <nl> - <nl> - def str_with_default ( self ) - > str : <nl> - mb_default = " " <nl> - if self . default is not None : <nl> - mb_default = f " = { self . default } " <nl> - return f " { self . type } { self . name } { mb_default } " <nl> + return DispatcherSignature ( func ) <nl> <nl> @ dataclass ( frozen = True ) <nl> class NativeSignature : <nl> # The schema this signature is derived from <nl> func : FunctionSchema <nl> <nl> - _arguments : Tuple [ NativeArgument , . . . ] <nl> - _returns_type : str <nl> - <nl> def name ( self ) - > str : <nl> return native . name ( self . func ) <nl> <nl> def defn ( self , name : Optional [ str ] = None ) - > str : <nl> - args_str = ' , ' . join ( map ( str , self . arguments ( ) ) ) <nl> + args_str = ' , ' . join ( a . defn ( ) for a in self . arguments ( ) ) <nl> if name is None : <nl> name = self . name ( ) <nl> - return f " { self . _returns_type } { name } ( { args_str } ) " <nl> + return f " { native . returns_type ( self . func . returns ) } { name } ( { args_str } ) " <nl> <nl> def ptr_type ( self ) - > str : <nl> - args_str = ' , ' . join ( map ( str , self . arguments ( ) ) ) <nl> - return f ' { self . _returns_type } ( * ) ( { args_str } ) ' <nl> + # don ' t include defaults in type signature ! <nl> + args_str = ' , ' . join ( a . defn ( ) for a in self . arguments ( ) ) <nl> + return f ' { native . returns_type ( self . func . returns ) } ( * ) ( { args_str } ) ' <nl> <nl> - def arguments ( self ) - > Tuple [ NativeArgument , . . . ] : <nl> - return self . _arguments <nl> + def arguments ( self ) - > List [ Binding ] : <nl> + return native . arguments ( self . func ) <nl> <nl> - def dispatcher_exprs ( self ) - > Sequence [ ' DispatcherExpr ' ] : <nl> - return dispatcher . nativearguments_exprs ( self . arguments ( ) ) <nl> + def dispatcher_exprs ( self ) - > List [ Expr ] : <nl> + return translate . translate ( self . arguments ( ) , dispatcher . arguments ( self . func ) , method = False ) <nl> <nl> @ staticmethod <nl> def from_schema ( func : FunctionSchema ) - > ' NativeSignature ' : <nl> - arguments = native . arguments ( func ) <nl> - returns_type = native . returns_type ( func . returns ) <nl> - <nl> - return NativeSignature ( <nl> - func = func , <nl> - _arguments = arguments , <nl> - _returns_type = returns_type , <nl> - ) <nl> - <nl> - # mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - # <nl> - <nl> - # meta api <nl> - <nl> - # mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - # <nl> - <nl> - @ dataclass ( frozen = True ) <nl> - class MetaArgument : <nl> - type : str <nl> - name : str <nl> - # structured kernels ( for which MetaArgument matters ) always will <nl> - # be use_c10_dispatcher full . That means JIT arguments and <nl> - # meta arguments are always in 1 : 1 correspondence . If this is ever not true <nl> - # we will have to do something more fancy here . <nl> - argument : Argument <nl> - <nl> - def __str__ ( self ) - > str : <nl> - return f " { self . type } { self . name } " <nl> + return NativeSignature ( func ) <nl> <nl> # Functions only , no types <nl> - from tools . codegen . api import cpp , dispatcher , native <nl> + from tools . codegen . api import cpp , dispatcher , native , translate <nl> mmm a / tools / codegen / gen . py <nl> ppp b / tools / codegen / gen . py <nl> <nl> import tools . codegen . api . dispatcher as dispatcher <nl> import tools . codegen . api . native as native <nl> import tools . codegen . api . meta as meta <nl> + from tools . codegen . api . translate import translate <nl> import tools . codegen . local as local <nl> from tools . codegen . selective_build . selector import SelectiveBuilder <nl> <nl> def gen_one ( f : NativeFunction ) - > Optional [ str ] : <nl> functional_func = g . out . func . signature ( ) <nl> functional_sig = DispatcherSignature . from_schema ( functional_func ) <nl> <nl> - # This is a little abusive ; this assumes that the functionalization <nl> - # transformation ALWAYS refers to valid arguments in the original <nl> - # signature <nl> - functional_exprs = ' , ' . join ( e . expr for e in functional_sig . exprs ( ) ) <nl> + # TODO : is it meta or wot ? Sort this out <nl> + functional_exprs = ' , ' . join ( <nl> + e . expr for e in translate ( functional_sig . arguments ( ) , dispatcher . arguments ( functional_func ) , method = False ) <nl> + ) <nl> <nl> op_name = f " aten : : { f . func . name } " <nl> if self . target is Target . REGISTRATION and not self . selector . is_operator_selected ( op_name ) : <nl> def gen_unstructured ( self , f : NativeFunction ) - > Optional [ str ] : <nl> name = native . name ( f . func ) <nl> returns_type = native . returns_type ( f . func . returns ) <nl> args = native . arguments ( f . func ) <nl> - args_str = ' , ' . join ( map ( str , args ) ) <nl> + args_str = ' , ' . join ( a . defn ( ) for a in args ) <nl> <nl> if self . target is Target . DEFINITION : <nl> impl_name = f " at : : native : : { f . dispatch [ self . dispatch_key ] } " <nl> def generate_defn ( faithful : bool ) - > str : <nl> else : <nl> sig = sig_group . signature <nl> <nl> - dispatcher_exprs = dispatcher . cpparguments_exprs ( f . func , method = False , api_is_faithful = faithful ) <nl> + dispatcher_exprs = translate ( sig . arguments ( ) , dispatcher_sig . arguments ( ) ) <nl> dispatcher_exprs_str = ' , ' . join ( a . expr for a in dispatcher_exprs ) <nl> <nl> return f " " " <nl> def generate_defn ( faithful : bool ) - > str : <nl> else : <nl> sig = sig_group . signature <nl> <nl> - dispatcher_exprs = dispatcher . cpparguments_exprs ( f . func , method = True , api_is_faithful = faithful ) <nl> + dispatcher_exprs = translate ( sig . arguments ( ) , dispatcher_sig . arguments ( ) , method = True ) <nl> dispatcher_exprs_str = ' , ' . join ( a . expr for a in dispatcher_exprs ) <nl> <nl> return f " " " <nl> def compute_native_function_declaration ( g : Union [ StructuredNativeFunctions , Nati <nl> seen . add ( n ) <nl> rs . append ( f " " " \ <nl> struct CAFFE2_API structured_ { n } : public at : : meta : : { meta_name } { { <nl> - void impl ( { ' , ' . join ( a . str_with_default ( ) for a in out_args ) } ) ; <nl> + void impl ( { ' , ' . join ( a . decl ( ) for a in out_args ) } ) ; <nl> } } ; <nl> " " " ) <nl> <nl> def compute_native_function_declaration ( g : Union [ StructuredNativeFunctions , Nati <nl> # default arguments from all at : : native functions <nl> # but that would be a larger change because we need <nl> # to change a lot of call sites <nl> - args_str = ' , ' . join ( str ( a ) for a in args ) <nl> + args_str = ' , ' . join ( a . defn ( ) for a in args ) <nl> else : <nl> - args_str = ' , ' . join ( a . str_with_default ( ) for a in args ) <nl> + args_str = ' , ' . join ( a . decl ( ) for a in args ) <nl> rs . append ( f " CAFFE2_API { returns_type } { n } ( { args_str } ) ; " ) <nl> <nl> return rs <nl> def compute_native_function_declaration ( g : Union [ StructuredNativeFunctions , Nati <nl> seen . add ( n ) <nl> returns_type = native . returns_type ( f . func . returns ) <nl> args = native . arguments ( f . func ) <nl> - rs . append ( f " CAFFE2_API { returns_type } { n } ( { ' , ' . join ( a . str_with_default ( ) for a in args ) } ) ; " ) <nl> + rs . append ( f " CAFFE2_API { returns_type } { n } ( { ' , ' . join ( a . decl ( ) for a in args ) } ) ; " ) <nl> <nl> return rs <nl> <nl> def compute_meta_function_declaration ( g : StructuredNativeFunctions ) - > str : <nl> with native_function_manager ( g . out ) : <nl> sig = g . signature ( ) <nl> name = meta . name ( g ) <nl> - args = meta . arguments ( sig ) <nl> - args_str = ' , ' . join ( map ( str , args ) ) <nl> + args = native . arguments ( sig ) <nl> + args_str = ' , ' . join ( a . defn ( ) for a in args ) <nl> parent_class = g . out . structured_inherits <nl> if parent_class is None : <nl> parent_class = " at : : impl : : MetaBase " <nl> def dynamic_type ( t : Type ) - > str : <nl> # also include Tensor [ ] <nl> if str ( t ) = = ' Tensor ' : <nl> return ' Tensor ' <nl> - return cpp . argumenttype_type ( t , mutable = False ) <nl> + return cpp . argumenttype_type ( t , mutable = False , binds = ' __placeholder__ ' ) . cpp_type ( ) <nl> <nl> def compute_method_of_yaml ( variants : Set [ Variant ] ) - > List [ str ] : <nl> # This is written out explicitly to ensure that Tensor and <nl> def compute_returns_yaml ( f : NativeFunction ) - > Tuple [ List [ Dict [ str , str ] ] , Dict [ <nl> return returns , name_to_field_name <nl> <nl> # arguments in yaml roughly corresponds to the public C + + API <nl> - def compute_cpp_argument_yaml ( cpp_a : CppArgument , * , schema_order : bool , kwarg_only_set : Set [ str ] , <nl> + def compute_cpp_argument_yaml ( cpp_a : Binding , * , schema_order : bool , kwarg_only_set : Set [ str ] , <nl> out_arg_set : Set [ str ] , name_to_field_name : Dict [ str , str ] ) - > object : <nl> if isinstance ( cpp_a . argument , TensorOptionsArguments ) : <nl> arg : Dict [ str , object ] = { <nl> def compute_argument_yaml ( a : Argument , * , schema_order : bool , kwarg_only_set : Se <nl> ' dynamic_type ' : dynamic_type ( a . type ) , <nl> ' is_nullable ' : a . type . is_nullable ( ) , <nl> ' name ' : a . name , <nl> - ' type ' : cpp . argument_type ( a ) , <nl> + ' type ' : cpp . argument_type ( a , binds = " __placeholder__ " ) . cpp_type ( ) , <nl> } <nl> if a . default is not None : <nl> arg [ ' default ' ] = pythonify_default ( cpp . default_expr ( a . default , a . type ) ) <nl> def compute_declaration_yaml ( f : NativeFunction ) - > object : <nl> <nl> cpp_schema_order_types = [ <nl> # NB : method here doesn ' t matter <nl> - cpp . argument ( a , method = False ) . type for a in schema_order_jit_arguments <nl> + r . type for a in schema_order_jit_arguments for r in cpp . argument ( a , method = False ) <nl> ] <nl> <nl> cpp_returns = cpp . returns_type ( f . func . returns ) <nl> def compute_registration_declarations ( f : NativeFunction ) - > str : <nl> name = dispatcher . name ( f . func ) <nl> returns_type = dispatcher . returns_type ( f . func . returns ) <nl> args = dispatcher . arguments ( f . func ) <nl> - args_str = ' , ' . join ( map ( str , args ) ) <nl> + args_str = ' , ' . join ( a . defn ( ) for a in args ) <nl> comment_data : Dict [ str , str ] = { <nl> ' schema ' : f ' aten : : { f . func } ' , <nl> # TODO : What exactly is the semantics of the ' dispatch ' field ? <nl>
Introduce tools . codegen . api . translate ( )
pytorch/pytorch
3efd5d8f0196ec9e4d413822a2f7c01c0d9c38a3
2020-12-17T00:18:40Z
mmm a / hphp / runtime / ext / ext_hotprofiler . cpp <nl> ppp b / hphp / runtime / ext / ext_hotprofiler . cpp <nl> static int64_t * get_cpu_frequency_from_file ( const char * file , int ncpus ) <nl> return freqs ; <nl> } <nl> <nl> - class esyscall { <nl> - public : <nl> - int num ; <nl> - <nl> - explicit esyscall ( const char * syscall_name ) { <nl> - num = - 1 ; <nl> - char format [ strlen ( syscall_name ) + sizeof ( " % d " ) ] ; <nl> - sprintf ( format , " % s % % d " , syscall_name ) ; <nl> - <nl> - std : : ifstream syscalls ( " / proc / esyscall " ) ; <nl> - if ( syscalls . fail ( ) ) { <nl> - return ; <nl> - } <nl> - char line [ MAX_LINELENGTH ] ; <nl> - if ( ! syscalls . getline ( line , sizeof ( line ) ) ) { <nl> - return ; <nl> - } <nl> - / / perhaps we should check the format , but we ' re just going to assume <nl> - / / Name Number <nl> - while ( syscalls . getline ( line , sizeof ( line ) ) ) { <nl> - int number ; <nl> - if ( sscanf ( line , format , & number ) = = 1 ) { <nl> - num = number ; <nl> - return ; <nl> - } <nl> - } <nl> - } <nl> - } ; <nl> - <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> / / Machine information that we collect just once . <nl> <nl> to_usec ( int64_t cycles , int64_t MHz , bool cpu_time = false ) <nl> return ( cycles + MHz / 2 ) / MHz ; <nl> } <nl> <nl> - static esyscall vtsc_syscall ( " vtsc " ) ; <nl> - <nl> - static inline uint64_t vtsc ( int64_t MHz ) { <nl> + static inline uint64_t cpuTime ( int64_t MHz ) { <nl> # ifdef CLOCK_THREAD_CPUTIME_ID <nl> int64_t rval = Vdso : : ClockGetTimeNS ( CLOCK_THREAD_CPUTIME_ID ) ; <nl> if ( rval > = 0 ) { <nl> return rval ; <nl> } <nl> - # endif <nl> - # ifdef syscall <nl> - if ( vtsc_syscall . num > 0 ) { <nl> - return syscall ( vtsc_syscall . num ) ; <nl> - } <nl> # endif <nl> struct rusage usage ; <nl> getrusage ( RUSAGE_SELF , & usage ) ; <nl> get_frees ( ) <nl> return 0 ; <nl> } <nl> <nl> - size_t Frame : : getName ( char * result_buf , size_t result_len ) { <nl> - if ( result_len < = 1 ) { <nl> - return 0 ; / / Insufficient result_bug . Bail ! <nl> - } <nl> - <nl> - / / Add ' @ recurse_level ' if required <nl> - / / NOTE : Dont use snprintf ' s return val as it is compiler dependent <nl> - if ( m_recursion ) { <nl> - snprintf ( result_buf , result_len , " % s @ % d " , m_name , m_recursion ) ; <nl> - } else { <nl> - snprintf ( result_buf , result_len , " % s " , m_name ) ; <nl> - } <nl> + size_t Frame : : getName ( char * result_buf , size_t result_len ) { <nl> + if ( result_len < = 1 ) { <nl> + return 0 ; / / Insufficient result_bug . Bail ! <nl> + } <nl> <nl> - / / Force null - termination at MAX <nl> - result_buf [ result_len - 1 ] = 0 ; <nl> - return strlen ( result_buf ) ; <nl> + / / Add ' @ recurse_level ' if required <nl> + / / NOTE : Dont use snprintf ' s return val as it is compiler dependent <nl> + if ( m_recursion ) { <nl> + snprintf ( result_buf , result_len , " % s @ % d " , m_name , m_recursion ) ; <nl> + } else { <nl> + snprintf ( result_buf , result_len , " % s " , m_name ) ; <nl> } <nl> <nl> - size_t Frame : : getStack ( int level , char * result_buf , size_t result_len ) { <nl> - / / End recursion if we dont need deeper levels or <nl> - / / we dont have any deeper levels <nl> - if ( ! m_parent | | level < = 1 ) { <nl> - return getName ( result_buf , result_len ) ; <nl> - } <nl> + / / Force null - termination at MAX <nl> + result_buf [ result_len - 1 ] = 0 ; <nl> + return strlen ( result_buf ) ; <nl> + } <nl> <nl> - / / Take care of all ancestors first <nl> - size_t len = m_parent - > getStack ( level - 1 , result_buf , result_len ) ; <nl> - if ( result_len < ( len + HP_STACK_DELIM_LEN ) ) { <nl> - return len ; / / Insufficient result_buf . Bail out ! <nl> - } <nl> + size_t Frame : : getStack ( int level , char * result_buf , size_t result_len ) { <nl> + / / End recursion if we dont need deeper levels or <nl> + / / we dont have any deeper levels <nl> + if ( ! m_parent | | level < = 1 ) { <nl> + return getName ( result_buf , result_len ) ; <nl> + } <nl> <nl> - / / Add delimiter only if entry had ancestors <nl> - if ( len ) { <nl> - strncat ( result_buf + len , HP_STACK_DELIM , result_len - len ) ; <nl> - len + = HP_STACK_DELIM_LEN ; <nl> - } <nl> + / / Take care of all ancestors first <nl> + size_t len = m_parent - > getStack ( level - 1 , result_buf , result_len ) ; <nl> + if ( result_len < ( len + HP_STACK_DELIM_LEN ) ) { <nl> + return len ; / / Insufficient result_buf . Bail out ! <nl> + } <nl> <nl> - / / Append the current function name <nl> - return len + getName ( result_buf + len , result_len - len ) ; <nl> + / / Add delimiter only if entry had ancestors <nl> + if ( len ) { <nl> + strncat ( result_buf + len , HP_STACK_DELIM , result_len - len ) ; <nl> + len + = HP_STACK_DELIM_LEN ; <nl> } <nl> <nl> + / / Append the current function name <nl> + return len + getName ( result_buf + len , result_len - len ) ; <nl> + } <nl> + <nl> const StaticString <nl> s_ct ( " ct " ) , <nl> s_wt ( " wt " ) , <nl> class HierarchicalProfiler : public Profiler { <nl> m_stack - > m_tsc_start = cpuCycles ( ) ; <nl> <nl> if ( m_flags & TrackCPU ) { <nl> - m_stack - > m_vtsc_start = vtsc ( m_MHz ) ; <nl> + m_stack - > m_vtsc_start = cpuTime ( m_MHz ) ; <nl> } <nl> <nl> if ( m_flags & TrackMemory ) { <nl> class HierarchicalProfiler : public Profiler { <nl> counts . wall_time + = cpuCycles ( ) - m_stack - > m_tsc_start ; <nl> <nl> if ( m_flags & TrackCPU ) { <nl> - counts . cpu + = vtsc ( m_MHz ) - m_stack - > m_vtsc_start ; <nl> + counts . cpu + = cpuTime ( m_MHz ) - m_stack - > m_vtsc_start ; <nl> } <nl> <nl> if ( m_flags & TrackMemory ) { <nl> class TraceProfiler : public Profiler { <nl> te . wall_time = cpuCycles ( ) ; <nl> te . cpu = 0 ; <nl> if ( m_flags & TrackCPU ) { <nl> - te . cpu = vtsc ( m_MHz ) ; <nl> + te . cpu = cpuTime ( m_MHz ) ; <nl> } <nl> if ( m_flags & TrackMemory ) { <nl> auto const & stats = MM ( ) . getStats ( ) ; <nl> void f_xhprof_frame_end ( ) { <nl> void f_xhprof_enable ( int flags / * = 0 * / , <nl> const Array & args / * = null_array * / ) { <nl> if ( ! RuntimeOption : : EnableHotProfiler ) { <nl> + raise_warning ( " The runtime option Stats . EnableHotProfiler must be on to " <nl> + " use xhprof . " ) ; <nl> return ; <nl> } <nl> # ifdef CLOCK_THREAD_CPUTIME_ID <nl> void f_xhprof_enable ( int flags / * = 0 * / , <nl> # else <nl> bool missingClockGetTimeNS = true ; <nl> # endif <nl> - if ( vtsc_syscall . num < = 0 & & missingClockGetTimeNS ) { <nl> + if ( missingClockGetTimeNS ) { <nl> + / / Both TrackVtsc and TrackCPU mean " do CPU time profiling " . <nl> + / / <nl> + / / TrackVtsc means : require clock_gettime , or else no data . <nl> + / / TrackCPU means : prefer clock_gettime , but fall back to getrusage . <nl> flags & = ~ TrackVtsc ; <nl> } <nl> if ( flags & TrackVtsc ) { <nl> flags | = TrackCPU ; <nl> } <nl> + <nl> if ( flags & XhpTrace ) { <nl> s_profiler_factory - > start ( ProfilerKind : : Trace , flags ) ; <nl> } else { <nl> void f_xhprof_sample_enable ( ) { <nl> if ( RuntimeOption : : EnableHotProfiler ) { <nl> s_profiler_factory - > start ( ProfilerKind : : Sample , 0 ) ; <nl> } else { <nl> - raise_warning ( " Cannot start the xhprof sampler when the hotprofiler is " <nl> - " disabled . " ) ; <nl> + raise_warning ( " The runtime option Stats . EnableHotProfiler must be on to " <nl> + " use xhprof . " ) ; <nl> } <nl> } <nl> <nl>
Delete vtsc_syscall code
facebook/hhvm
4e393491414a215cfeee0b992174d72d0522a349
2014-08-08T17:30:28Z
deleted file mode 100644 <nl> index 615163df03df . . 000000000000 <nl> mmm a / jstests / replsets / slaveDelay2 . js <nl> ppp / dev / null <nl> <nl> - / * * <nl> - * start a slave with a long delay ( 1 hour ) and do some writes while it is initializing . Make sure it <nl> - * syncs all of these writes before going into syncDelay . <nl> - * / <nl> - load ( " jstests / replsets / rslib . js " ) ; <nl> - <nl> - var name = " slaveDelay2 " ; <nl> - var host = getHostName ( ) ; <nl> - <nl> - <nl> - var initialize = function ( ) { <nl> - var replTest = new ReplSetTest ( { name : name , nodes : 1 } ) ; <nl> - <nl> - var nodes = replTest . startSet ( ) ; <nl> - <nl> - replTest . initiate ( ) ; <nl> - <nl> - var master = replTest . getMaster ( ) . getDB ( name ) ; <nl> - <nl> - waitForAllMembers ( master ) ; <nl> - <nl> - return replTest ; <nl> - } ; <nl> - <nl> - var populate = function ( master ) { <nl> - / / insert records <nl> - var bulk = master . foo . initializeUnorderedBulkOp ( ) ; <nl> - for ( var i = 0 ; i < 1000 ; i + + ) { <nl> - bulk . insert ( { _id : i } ) ; <nl> - } <nl> - <nl> - assert . writeOK ( bulk . execute ( ) ) ; <nl> - } <nl> - <nl> - doTest = function ( signal ) { <nl> - var replTest = initialize ( ) ; <nl> - var master = replTest . getMaster ( ) . getDB ( name ) ; <nl> - populate ( master ) ; <nl> - var admin = master . getSisterDB ( " admin " ) ; <nl> - <nl> - var conn = MongoRunner . runMongod ( { port : 31008 , dbpath : name + " - sd " , useHostname : true , <nl> - replSet : name , oplogSize : 128 } ) ; <nl> - conn . setSlaveOk ( ) ; <nl> - <nl> - config = master . getSisterDB ( " local " ) . system . replset . findOne ( ) ; <nl> - config . version + + ; <nl> - config . members . push ( { _id : 1 , host : host + " : 31008 " , priority : 0 , slaveDelay : 3600 } ) ; <nl> - var ok = admin . runCommand ( { replSetReconfig : config } ) ; <nl> - assert . eq ( ok . ok , 1 ) ; <nl> - <nl> - / / do inserts during initial sync <nl> - for ( var i = 0 ; i < 100 ; i + + ) { <nl> - master . foo . insert ( { x : i } ) ; <nl> - } <nl> - <nl> - / / check if initial sync is done <nl> - var state = master . getSisterDB ( " admin " ) . runCommand ( { replSetGetStatus : 1 } ) ; <nl> - printjson ( state ) ; <nl> - if ( state . members [ 1 ] . state = = 2 ) { <nl> - print ( " NOTHING TO CHECK " ) ; <nl> - replTest . stopSet ( ) ; <nl> - return ; <nl> - } <nl> - <nl> - / / if we ' re here , then 100 docs were inserted before initial sync completed <nl> - waitForAllMembers ( master , 3 * 60 * 1000 ) ; <nl> - <nl> - / / initial sync has completed . ensure slaveDelay did not delay the existence of the docs <nl> - for ( var i = 0 ; i < 100 ; i + + ) { <nl> - var obj = conn . getDB ( name ) . foo . findOne ( { x : i } ) ; <nl> - assert ( obj ) ; <nl> - } <nl> - <nl> - replTest . stopSet ( ) ; <nl> - } <nl> - <nl> - doTest ( 15 ) ; <nl>
SERVER - 15535 remove redundant test
mongodb/mongo
c9e26cf4786b1c31c2ef83e21371ae5b227e5cc1
2014-10-10T19:34:04Z
mmm a / include / grpc / grpc_security . h <nl> ppp b / include / grpc / grpc_security . h <nl> grpc_credentials * grpc_service_account_credentials_create ( <nl> grpc_credentials * grpc_jwt_credentials_create ( const char * json_key , <nl> gpr_timespec token_lifetime ) ; <nl> <nl> + / * Creates an Oauth2 Refresh Token crednetials object . May return NULL if the <nl> + input is invalid . <nl> + WARNING : Do NOT use this credentials to connect to a non - google service as <nl> + this could result in an oauth2 token leak . <nl> + - json_refresh_token is the JSON string containing the refresh token itself <nl> + along with a client_id and client_secret . * / <nl> + grpc_credentials * grpc_refresh_token_credentials_create ( <nl> + const char * json_refresh_token ) ; <nl> + <nl> / * Creates a fake transport security credentials object for testing . * / <nl> grpc_credentials * grpc_fake_transport_security_credentials_create ( void ) ; <nl> <nl> mmm a / src / core / security / credentials . c <nl> ppp b / src / core / security / credentials . c <nl> <nl> # include < grpc / support / sync . h > <nl> # include < grpc / support / time . h > <nl> <nl> - / * - - Constants . - - * / <nl> - <nl> - # define GRPC_SECURE_TOKEN_REFRESH_THRESHOLD_SECS 60 <nl> - <nl> - # define GRPC_COMPUTE_ENGINE_METADATA_HOST " metadata " <nl> - # define GRPC_COMPUTE_ENGINE_METADATA_TOKEN_PATH \ <nl> - " / computeMetadata / v1 / instance / service - accounts / default / token " <nl> - <nl> - # define GRPC_SERVICE_ACCOUNT_HOST " www . googleapis . com " <nl> - # define GRPC_SERVICE_ACCOUNT_TOKEN_PATH " / oauth2 / v3 / token " <nl> - # define GRPC_SERVICE_ACCOUNT_POST_BODY_PREFIX \ <nl> - " grant_type = urn % 3Aietf % 3Aparams % 3Aoauth % 3Agrant - type % 3Ajwt - bearer & " \ <nl> - " assertion = " <nl> - <nl> / * - - Common . - - * / <nl> <nl> typedef struct { <nl> static void service_account_fetch_oauth2 ( <nl> } <nl> gpr_asprintf ( & body , " % s % s " , GRPC_SERVICE_ACCOUNT_POST_BODY_PREFIX , jwt ) ; <nl> memset ( & request , 0 , sizeof ( grpc_httpcli_request ) ) ; <nl> - request . host = GRPC_SERVICE_ACCOUNT_HOST ; <nl> - request . path = GRPC_SERVICE_ACCOUNT_TOKEN_PATH ; <nl> + request . host = GRPC_GOOGLE_OAUTH2_SERVICE_HOST ; <nl> + request . path = GRPC_GOOGLE_OAUTH2_SERVICE_TOKEN_PATH ; <nl> request . hdr_count = 1 ; <nl> request . hdrs = & header ; <nl> request . use_ssl = 1 ; <nl> grpc_credentials * grpc_service_account_credentials_create ( <nl> return & c - > base . base ; <nl> } <nl> <nl> + / * - - RefreshToken credentials . - - * / <nl> + <nl> + typedef struct { <nl> + grpc_oauth2_token_fetcher_credentials base ; <nl> + grpc_auth_refresh_token refresh_token ; <nl> + } grpc_refresh_token_credentials ; <nl> + <nl> + static void refresh_token_destroy ( grpc_credentials * creds ) { <nl> + grpc_refresh_token_credentials * c = <nl> + ( grpc_refresh_token_credentials * ) creds ; <nl> + grpc_auth_refresh_token_destruct ( & c - > refresh_token ) ; <nl> + oauth2_token_fetcher_destroy ( & c - > base . base ) ; <nl> + } <nl> + <nl> + static grpc_credentials_vtable refresh_token_vtable = { <nl> + refresh_token_destroy , oauth2_token_fetcher_has_request_metadata , <nl> + oauth2_token_fetcher_has_request_metadata_only , <nl> + oauth2_token_fetcher_get_request_metadata } ; <nl> + <nl> + static void refresh_token_fetch_oauth2 ( <nl> + grpc_credentials_metadata_request * metadata_req , <nl> + grpc_httpcli_response_cb response_cb , gpr_timespec deadline ) { <nl> + grpc_refresh_token_credentials * c = <nl> + ( grpc_refresh_token_credentials * ) metadata_req - > creds ; <nl> + grpc_httpcli_header header = { " Content - Type " , <nl> + " application / x - www - form - urlencoded " } ; <nl> + grpc_httpcli_request request ; <nl> + char * body = NULL ; <nl> + gpr_asprintf ( & body , GRPC_REFRESH_TOKEN_POST_BODY_FORMAT_STRING , <nl> + c - > refresh_token . client_id , c - > refresh_token . client_secret , <nl> + c - > refresh_token . refresh_token ) ; <nl> + memset ( & request , 0 , sizeof ( grpc_httpcli_request ) ) ; <nl> + request . host = GRPC_GOOGLE_OAUTH2_SERVICE_HOST ; <nl> + request . path = GRPC_GOOGLE_OAUTH2_SERVICE_TOKEN_PATH ; <nl> + request . hdr_count = 1 ; <nl> + request . hdrs = & header ; <nl> + request . use_ssl = 1 ; <nl> + grpc_httpcli_post ( & request , body , strlen ( body ) , deadline , response_cb , <nl> + metadata_req ) ; <nl> + gpr_free ( body ) ; <nl> + } <nl> + <nl> + grpc_credentials * grpc_refresh_token_credentials_create ( <nl> + const char * json_refresh_token ) { <nl> + grpc_refresh_token_credentials * c ; <nl> + grpc_auth_refresh_token refresh_token = <nl> + grpc_auth_refresh_token_create_from_string ( json_refresh_token ) ; <nl> + <nl> + if ( ! grpc_auth_refresh_token_is_valid ( & refresh_token ) ) { <nl> + gpr_log ( GPR_ERROR , <nl> + " Invalid input for refresh token credentials creation " ) ; <nl> + return NULL ; <nl> + } <nl> + c = gpr_malloc ( sizeof ( grpc_refresh_token_credentials ) ) ; <nl> + memset ( c , 0 , sizeof ( grpc_refresh_token_credentials ) ) ; <nl> + init_oauth2_token_fetcher ( & c - > base , refresh_token_fetch_oauth2 ) ; <nl> + c - > base . base . vtable = & refresh_token_vtable ; <nl> + c - > refresh_token = refresh_token ; <nl> + return & c - > base . base ; <nl> + } <nl> + <nl> / * - - Fake Oauth2 credentials . - - * / <nl> <nl> typedef struct { <nl> mmm a / src / core / security / credentials . h <nl> ppp b / src / core / security / credentials . h <nl> typedef enum { <nl> # define GRPC_GOOGLE_WELL_KNOWN_CREDENTIALS_FILE \ <nl> " application_default_credentials . json " <nl> <nl> + # define GRPC_SECURE_TOKEN_REFRESH_THRESHOLD_SECS 60 <nl> + <nl> + # define GRPC_COMPUTE_ENGINE_METADATA_HOST " metadata " <nl> + # define GRPC_COMPUTE_ENGINE_METADATA_TOKEN_PATH \ <nl> + " / computeMetadata / v1 / instance / service - accounts / default / token " <nl> + <nl> + # define GRPC_GOOGLE_OAUTH2_SERVICE_HOST " www . googleapis . com " <nl> + # define GRPC_GOOGLE_OAUTH2_SERVICE_TOKEN_PATH " / oauth2 / v3 / token " <nl> + <nl> + # define GRPC_SERVICE_ACCOUNT_POST_BODY_PREFIX \ <nl> + " grant_type = urn % 3Aietf % 3Aparams % 3Aoauth % 3Agrant - type % 3Ajwt - bearer & " \ <nl> + " assertion = " <nl> + <nl> + # define GRPC_REFRESH_TOKEN_POST_BODY_FORMAT_STRING \ <nl> + " client_id = % s & client_secret = % s & refresh_token = % s & grant_type = refresh_token " <nl> + <nl> / * mmm grpc_credentials . mmm * / <nl> <nl> / * It is the caller ' s responsibility to gpr_free the result if not NULL . * / <nl> mmm a / src / core / security / google_default_credentials . c <nl> ppp b / src / core / security / google_default_credentials . c <nl> static grpc_credentials * create_jwt_creds_from_path ( char * creds_path ) { <nl> return result ; <nl> } <nl> <nl> + / * Takes ownership of creds_path if not NULL . * / <nl> + static grpc_credentials * create_refresh_token_creds_from_path ( <nl> + char * creds_path ) { <nl> + grpc_credentials * result = NULL ; <nl> + gpr_slice creds_data ; <nl> + int file_ok = 0 ; <nl> + if ( creds_path = = NULL ) return NULL ; <nl> + creds_data = gpr_load_file ( creds_path , & file_ok ) ; <nl> + gpr_free ( creds_path ) ; <nl> + if ( file_ok ) { <nl> + result = grpc_refresh_token_credentials_create ( <nl> + ( const char * ) GPR_SLICE_START_PTR ( creds_data ) ) ; <nl> + gpr_slice_unref ( creds_data ) ; <nl> + } <nl> + return result ; <nl> + } <nl> + <nl> grpc_credentials * grpc_google_default_credentials_create ( void ) { <nl> grpc_credentials * result = NULL ; <nl> int serving_cached_credentials = 0 ; <nl> grpc_credentials * grpc_google_default_credentials_create ( void ) { <nl> if ( result ! = NULL ) goto end ; <nl> <nl> / * Then the well - known file . * / <nl> - result = create_jwt_creds_from_path ( <nl> + result = create_refresh_token_creds_from_path ( <nl> grpc_get_well_known_google_credentials_file_path ( ) ) ; <nl> if ( result ! = NULL ) goto end ; <nl> <nl> mmm a / src / core / security / json_token . c <nl> ppp b / src / core / security / json_token . c <nl> <nl> / * 1 hour max . * / <nl> const gpr_timespec grpc_max_auth_token_lifetime = { 3600 , 0 } ; <nl> <nl> - # define GRPC_AUTH_JSON_KEY_TYPE_INVALID " invalid " <nl> - # define GRPC_AUTH_JSON_KEY_TYPE_SERVICE_ACCOUNT " service_account " <nl> + # define GRPC_AUTH_JSON_TYPE_INVALID " invalid " <nl> + # define GRPC_AUTH_JSON_TYPE_SERVICE_ACCOUNT " service_account " <nl> + # define GRPC_AUTH_JSON_TYPE_AUTHORIZED_USER " authorized_user " <nl> <nl> # define GRPC_JWT_RSA_SHA256_ALGORITHM " RS256 " <nl> # define GRPC_JWT_TYPE " JWT " <nl> static int set_json_key_string_property ( grpc_json * json , const char * prop_name , <nl> <nl> int grpc_auth_json_key_is_valid ( const grpc_auth_json_key * json_key ) { <nl> return ( json_key ! = NULL ) & & <nl> - strcmp ( json_key - > type , GRPC_AUTH_JSON_KEY_TYPE_INVALID ) ; <nl> + strcmp ( json_key - > type , GRPC_AUTH_JSON_TYPE_INVALID ) ; <nl> } <nl> <nl> grpc_auth_json_key grpc_auth_json_key_create_from_string ( <nl> grpc_auth_json_key grpc_auth_json_key_create_from_string ( <nl> int success = 0 ; <nl> <nl> memset ( & result , 0 , sizeof ( grpc_auth_json_key ) ) ; <nl> - result . type = GRPC_AUTH_JSON_KEY_TYPE_INVALID ; <nl> + result . type = GRPC_AUTH_JSON_TYPE_INVALID ; <nl> if ( json = = NULL ) { <nl> gpr_log ( GPR_ERROR , " Invalid json string % s " , json_string ) ; <nl> goto end ; <nl> grpc_auth_json_key grpc_auth_json_key_create_from_string ( <nl> <nl> prop_value = json_get_string_property ( json , " type " ) ; <nl> if ( prop_value = = NULL | | <nl> - strcmp ( prop_value , GRPC_AUTH_JSON_KEY_TYPE_SERVICE_ACCOUNT ) ) { <nl> + strcmp ( prop_value , GRPC_AUTH_JSON_TYPE_SERVICE_ACCOUNT ) ) { <nl> goto end ; <nl> } <nl> - result . type = GRPC_AUTH_JSON_KEY_TYPE_SERVICE_ACCOUNT ; <nl> + result . type = GRPC_AUTH_JSON_TYPE_SERVICE_ACCOUNT ; <nl> <nl> if ( ! set_json_key_string_property ( json , " private_key_id " , <nl> & result . private_key_id ) | | <nl> grpc_auth_json_key grpc_auth_json_key_create_from_string ( <nl> <nl> void grpc_auth_json_key_destruct ( grpc_auth_json_key * json_key ) { <nl> if ( json_key = = NULL ) return ; <nl> - json_key - > type = GRPC_AUTH_JSON_KEY_TYPE_INVALID ; <nl> + json_key - > type = GRPC_AUTH_JSON_TYPE_INVALID ; <nl> if ( json_key - > client_id ! = NULL ) { <nl> gpr_free ( json_key - > client_id ) ; <nl> json_key - > client_id = NULL ; <nl> void grpc_jwt_encode_and_sign_set_override ( <nl> grpc_jwt_encode_and_sign_override func ) { <nl> g_jwt_encode_and_sign_override = func ; <nl> } <nl> + <nl> + / * mmm grpc_auth_refresh_token mmm * / <nl> + <nl> + int grpc_auth_refresh_token_is_valid ( <nl> + const grpc_auth_refresh_token * refresh_token ) { <nl> + return ( refresh_token ! = NULL ) & & <nl> + strcmp ( refresh_token - > type , GRPC_AUTH_JSON_TYPE_INVALID ) ; <nl> + } <nl> + <nl> + grpc_auth_refresh_token grpc_auth_refresh_token_create_from_string ( <nl> + const char * json_string ) { <nl> + grpc_auth_refresh_token result ; <nl> + char * scratchpad = gpr_strdup ( json_string ) ; <nl> + grpc_json * json = grpc_json_parse_string ( scratchpad ) ; <nl> + const char * prop_value ; <nl> + int success = 0 ; <nl> + <nl> + memset ( & result , 0 , sizeof ( grpc_auth_refresh_token ) ) ; <nl> + result . type = GRPC_AUTH_JSON_TYPE_INVALID ; <nl> + if ( json = = NULL ) { <nl> + gpr_log ( GPR_ERROR , " Invalid json string % s " , json_string ) ; <nl> + goto end ; <nl> + } <nl> + <nl> + prop_value = json_get_string_property ( json , " type " ) ; <nl> + if ( prop_value = = NULL | | <nl> + strcmp ( prop_value , GRPC_AUTH_JSON_TYPE_AUTHORIZED_USER ) ) { <nl> + goto end ; <nl> + } <nl> + result . type = GRPC_AUTH_JSON_TYPE_AUTHORIZED_USER ; <nl> + <nl> + if ( ! set_json_key_string_property ( json , " client_secret " , <nl> + & result . client_secret ) | | <nl> + ! set_json_key_string_property ( json , " client_id " , & result . client_id ) | | <nl> + ! set_json_key_string_property ( json , " refresh_token " , <nl> + & result . refresh_token ) ) { <nl> + goto end ; <nl> + } <nl> + success = 1 ; <nl> + <nl> + end : <nl> + if ( json ! = NULL ) grpc_json_destroy ( json ) ; <nl> + if ( ! success ) grpc_auth_refresh_token_destruct ( & result ) ; <nl> + gpr_free ( scratchpad ) ; <nl> + return result ; <nl> + } <nl> + <nl> + void grpc_auth_refresh_token_destruct ( grpc_auth_refresh_token * refresh_token ) { <nl> + if ( refresh_token = = NULL ) return ; <nl> + refresh_token - > type = GRPC_AUTH_JSON_TYPE_INVALID ; <nl> + if ( refresh_token - > client_id ! = NULL ) { <nl> + gpr_free ( refresh_token - > client_id ) ; <nl> + refresh_token - > client_id = NULL ; <nl> + } <nl> + if ( refresh_token - > client_secret ! = NULL ) { <nl> + gpr_free ( refresh_token - > client_secret ) ; <nl> + refresh_token - > client_secret = NULL ; <nl> + } <nl> + if ( refresh_token - > refresh_token ! = NULL ) { <nl> + gpr_free ( refresh_token - > refresh_token ) ; <nl> + refresh_token - > refresh_token = NULL ; <nl> + } <nl> + } <nl> + <nl> mmm a / src / core / security / json_token . h <nl> ppp b / src / core / security / json_token . h <nl> <nl> / * mmm auth_json_key parsing . mmm * / <nl> <nl> typedef struct { <nl> - char * type ; <nl> + const char * type ; <nl> char * private_key_id ; <nl> char * client_id ; <nl> char * client_email ; <nl> typedef char * ( * grpc_jwt_encode_and_sign_override ) ( <nl> void grpc_jwt_encode_and_sign_set_override ( <nl> grpc_jwt_encode_and_sign_override func ) ; <nl> <nl> + / * mmm auth_refresh_token parsing . mmm * / <nl> + <nl> + typedef struct { <nl> + const char * type ; <nl> + char * client_id ; <nl> + char * client_secret ; <nl> + char * refresh_token ; <nl> + } grpc_auth_refresh_token ; <nl> + <nl> + / * Returns 1 if the object is valid , 0 otherwise . * / <nl> + int grpc_auth_refresh_token_is_valid ( <nl> + const grpc_auth_refresh_token * refresh_token ) ; <nl> + <nl> + / * Creates a refresh token object from string . Returns an invalid object if a <nl> + parsing error has been encountered . * / <nl> + grpc_auth_refresh_token grpc_auth_refresh_token_create_from_string ( <nl> + const char * json_string ) ; <nl> + <nl> + / * Destructs the object . * / <nl> + void grpc_auth_refresh_token_destruct ( grpc_auth_refresh_token * refresh_token ) ; <nl> + <nl> # endif / * GRPC_INTERNAL_CORE_SECURITY_JSON_TOKEN_H * / <nl> mmm a / test / core / security / credentials_test . c <nl> ppp b / test / core / security / credentials_test . c <nl> static const char test_json_key_str_part3 [ ] = <nl> " \ " 777 - abaslkan11hlb6nmim3bpspl31ud . apps . googleusercontent . " <nl> " com \ " , \ " type \ " : \ " service_account \ " } " ; <nl> <nl> + / * Test refresh token . * / <nl> + static const char test_refresh_token_str [ ] = <nl> + " { \ " client_id \ " : \ " 32555999999 . apps . googleusercontent . com \ " , " <nl> + " \ " client_secret \ " : \ " EmssLNjJy1332hD4KFsecret \ " , " <nl> + " \ " refresh_token \ " : \ " 1 / Blahblasj424jladJDSGNf - u4Sua3HDA2ngjd42 \ " , " <nl> + " \ " type \ " : \ " authorized_user \ " } " ; <nl> + <nl> static const char valid_oauth2_json_response [ ] = <nl> " { \ " access_token \ " : \ " ya29 . AHES6ZRN3 - HlhAPya30GnW_bHSb_ \ " , " <nl> " \ " expires_in \ " : 3599 , " <nl> static const char test_signed_jwt [ ] = <nl> " eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImY0OTRkN2M1YWU2MGRmOTcyNmM4YW " <nl> " U0MDcyZTViYTdmZDkwODg2YzcifQ " ; <nl> <nl> - static const char expected_service_account_http_body_prefix [ ] = <nl> - " grant_type = urn % 3Aietf % 3Aparams % 3Aoauth % 3Agrant - type % 3Ajwt - bearer & " <nl> - " assertion = " ; <nl> - <nl> static const char test_service_url [ ] = " https : / / foo . com / foo . v1 " ; <nl> static const char other_test_service_url [ ] = " https : / / bar . com / bar . v1 " ; <nl> <nl> static void test_compute_engine_creds_failure ( void ) { <nl> grpc_httpcli_set_override ( NULL , NULL ) ; <nl> } <nl> <nl> + static void validate_refresh_token_http_request ( <nl> + const grpc_httpcli_request * request , const char * body , size_t body_size ) { <nl> + / * The content of the assertion is tested extensively in json_token_test . * / <nl> + char * expected_body = NULL ; <nl> + GPR_ASSERT ( body ! = NULL ) ; <nl> + GPR_ASSERT ( body_size ! = 0 ) ; <nl> + gpr_asprintf ( & expected_body , GRPC_REFRESH_TOKEN_POST_BODY_FORMAT_STRING , <nl> + " 32555999999 . apps . googleusercontent . com " , <nl> + " EmssLNjJy1332hD4KFsecret " , <nl> + " 1 / Blahblasj424jladJDSGNf - u4Sua3HDA2ngjd42 " ) ; <nl> + GPR_ASSERT ( strlen ( expected_body ) = = body_size ) ; <nl> + GPR_ASSERT ( memcmp ( expected_body , body , body_size ) = = 0 ) ; <nl> + gpr_free ( expected_body ) ; <nl> + GPR_ASSERT ( request - > use_ssl ) ; <nl> + GPR_ASSERT ( strcmp ( request - > host , GRPC_GOOGLE_OAUTH2_SERVICE_HOST ) = = 0 ) ; <nl> + GPR_ASSERT ( strcmp ( request - > path , GRPC_GOOGLE_OAUTH2_SERVICE_TOKEN_PATH ) = = 0 ) ; <nl> + GPR_ASSERT ( request - > hdr_count = = 1 ) ; <nl> + GPR_ASSERT ( strcmp ( request - > hdrs [ 0 ] . key , " Content - Type " ) = = 0 ) ; <nl> + GPR_ASSERT ( strcmp ( request - > hdrs [ 0 ] . value , <nl> + " application / x - www - form - urlencoded " ) = = 0 ) ; <nl> + } <nl> + <nl> + static int refresh_token_httpcli_post_success ( <nl> + const grpc_httpcli_request * request , const char * body , size_t body_size , <nl> + gpr_timespec deadline , grpc_httpcli_response_cb on_response , <nl> + void * user_data ) { <nl> + grpc_httpcli_response response = <nl> + http_response ( 200 , valid_oauth2_json_response ) ; <nl> + validate_refresh_token_http_request ( request , body , body_size ) ; <nl> + on_response ( user_data , & response ) ; <nl> + return 1 ; <nl> + } <nl> + <nl> + static int refresh_token_httpcli_post_failure ( <nl> + const grpc_httpcli_request * request , const char * body , size_t body_size , <nl> + gpr_timespec deadline , grpc_httpcli_response_cb on_response , <nl> + void * user_data ) { <nl> + grpc_httpcli_response response = http_response ( 403 , " Not Authorized . " ) ; <nl> + validate_refresh_token_http_request ( request , body , body_size ) ; <nl> + on_response ( user_data , & response ) ; <nl> + return 1 ; <nl> + } <nl> + <nl> + static void test_refresh_token_creds_success ( void ) { <nl> + grpc_credentials * refresh_token_creds = <nl> + grpc_refresh_token_credentials_create ( test_refresh_token_str ) ; <nl> + GPR_ASSERT ( grpc_credentials_has_request_metadata ( refresh_token_creds ) ) ; <nl> + GPR_ASSERT ( grpc_credentials_has_request_metadata_only ( refresh_token_creds ) ) ; <nl> + <nl> + / * First request : http get should be called . * / <nl> + grpc_httpcli_set_override ( httpcli_get_should_not_be_called , <nl> + refresh_token_httpcli_post_success ) ; <nl> + grpc_credentials_get_request_metadata ( refresh_token_creds , test_service_url , <nl> + on_oauth2_creds_get_metadata_success , <nl> + ( void * ) test_user_data ) ; <nl> + <nl> + / * Second request : the cached token should be served directly . * / <nl> + grpc_httpcli_set_override ( httpcli_get_should_not_be_called , <nl> + httpcli_post_should_not_be_called ) ; <nl> + grpc_credentials_get_request_metadata ( refresh_token_creds , test_service_url , <nl> + on_oauth2_creds_get_metadata_success , <nl> + ( void * ) test_user_data ) ; <nl> + <nl> + grpc_credentials_unref ( refresh_token_creds ) ; <nl> + grpc_httpcli_set_override ( NULL , NULL ) ; <nl> + } <nl> + <nl> + static void test_refresh_token_creds_failure ( void ) { <nl> + grpc_credentials * refresh_token_creds = <nl> + grpc_refresh_token_credentials_create ( test_refresh_token_str ) ; <nl> + grpc_httpcli_set_override ( httpcli_get_should_not_be_called , <nl> + refresh_token_httpcli_post_failure ) ; <nl> + GPR_ASSERT ( grpc_credentials_has_request_metadata ( refresh_token_creds ) ) ; <nl> + GPR_ASSERT ( grpc_credentials_has_request_metadata_only ( refresh_token_creds ) ) ; <nl> + grpc_credentials_get_request_metadata ( refresh_token_creds , test_service_url , <nl> + on_oauth2_creds_get_metadata_failure , <nl> + ( void * ) test_user_data ) ; <nl> + grpc_credentials_unref ( refresh_token_creds ) ; <nl> + grpc_httpcli_set_override ( NULL , NULL ) ; <nl> + } <nl> + <nl> static void validate_jwt_encode_and_sign_params ( <nl> const grpc_auth_json_key * json_key , const char * scope , <nl> gpr_timespec token_lifetime ) { <nl> static void validate_service_account_http_request ( <nl> GPR_ASSERT ( body ! = NULL ) ; <nl> GPR_ASSERT ( body_size ! = 0 ) ; <nl> gpr_asprintf ( & expected_body , " % s % s " , <nl> - expected_service_account_http_body_prefix , test_signed_jwt ) ; <nl> + GRPC_SERVICE_ACCOUNT_POST_BODY_PREFIX , test_signed_jwt ) ; <nl> GPR_ASSERT ( strlen ( expected_body ) = = body_size ) ; <nl> - GPR_ASSERT ( ! memcmp ( expected_body , body , body_size ) ) ; <nl> + GPR_ASSERT ( memcmp ( expected_body , body , body_size ) = = 0 ) ; <nl> gpr_free ( expected_body ) ; <nl> GPR_ASSERT ( request - > use_ssl ) ; <nl> - GPR_ASSERT ( strcmp ( request - > host , " www . googleapis . com " ) = = 0 ) ; <nl> - GPR_ASSERT ( strcmp ( request - > path , " / oauth2 / v3 / token " ) = = 0 ) ; <nl> + GPR_ASSERT ( strcmp ( request - > host , GRPC_GOOGLE_OAUTH2_SERVICE_HOST ) = = 0 ) ; <nl> + GPR_ASSERT ( strcmp ( request - > path , GRPC_GOOGLE_OAUTH2_SERVICE_TOKEN_PATH ) = = 0 ) ; <nl> GPR_ASSERT ( request - > hdr_count = = 1 ) ; <nl> GPR_ASSERT ( strcmp ( request - > hdrs [ 0 ] . key , " Content - Type " ) = = 0 ) ; <nl> GPR_ASSERT ( strcmp ( request - > hdrs [ 0 ] . value , <nl> int main ( int argc , char * * argv ) { <nl> test_ssl_oauth2_iam_composite_creds ( ) ; <nl> test_compute_engine_creds_success ( ) ; <nl> test_compute_engine_creds_failure ( ) ; <nl> + test_refresh_token_creds_success ( ) ; <nl> + test_refresh_token_creds_failure ( ) ; <nl> test_service_account_creds_success ( ) ; <nl> test_service_account_creds_http_failure ( ) ; <nl> test_service_account_creds_signing_failure ( ) ; <nl> mmm a / test / core / security / fetch_oauth2 . c <nl> ppp b / test / core / security / fetch_oauth2 . c <nl> <nl> # include < stdio . h > <nl> # include < string . h > <nl> <nl> - # include " src / core / security / credentials . h " <nl> # include < grpc / grpc . h > <nl> # include < grpc / grpc_security . h > <nl> # include < grpc / support / alloc . h > <nl> <nl> # include < grpc / support / slice . h > <nl> # include < grpc / support / sync . h > <nl> <nl> + # include " src / core / security / credentials . h " <nl> + # include " src / core / support / file . h " <nl> + <nl> typedef struct { <nl> gpr_cv cv ; <nl> gpr_mu mu ; <nl> static void on_oauth2_response ( void * user_data , grpc_mdelem * * md_elems , <nl> <nl> static grpc_credentials * create_service_account_creds ( <nl> const char * json_key_file_path , const char * scope ) { <nl> - char json_key [ 8192 ] ; / * Should be plenty . * / <nl> - char * current = json_key ; <nl> - FILE * json_key_file = fopen ( json_key_file_path , " r " ) ; <nl> - if ( json_key_file = = NULL ) { <nl> - gpr_log ( GPR_ERROR , " Invalid path for json key file : % s . " , <nl> - json_key_file_path ) ; <nl> + int success ; <nl> + gpr_slice json_key = gpr_load_file ( json_key_file_path , & success ) ; <nl> + if ( ! success ) { <nl> + gpr_log ( GPR_ERROR , " Could not read file % s . " , json_key_file_path ) ; <nl> exit ( 1 ) ; <nl> } <nl> + return grpc_service_account_credentials_create ( <nl> + ( const char * ) GPR_SLICE_START_PTR ( json_key ) , scope , <nl> + grpc_max_auth_token_lifetime ) ; <nl> + } <nl> <nl> - do { <nl> - size_t bytes_read = fread ( <nl> - current , 1 , sizeof ( json_key ) - ( current - json_key ) , json_key_file ) ; <nl> - if ( bytes_read = = 0 ) { <nl> - if ( ! feof ( json_key_file ) ) { <nl> - gpr_log ( GPR_ERROR , " Error occured while reading % s . " , <nl> - json_key_file_path ) ; <nl> - exit ( 1 ) ; <nl> - } <nl> - break ; <nl> - } <nl> - current + = bytes_read ; <nl> - } while ( sizeof ( json_key ) > ( size_t ) ( current - json_key ) ) ; <nl> - <nl> - if ( ( current - json_key ) = = sizeof ( json_key ) ) { <nl> - gpr_log ( GPR_ERROR , " Json key file % s exceeds size limit ( % d bytes ) . " , <nl> - json_key_file_path , ( int ) sizeof ( json_key ) ) ; <nl> + static grpc_credentials * create_refresh_token_creds ( <nl> + const char * json_refresh_token_file_path ) { <nl> + int success ; <nl> + gpr_slice refresh_token = <nl> + gpr_load_file ( json_refresh_token_file_path , & success ) ; <nl> + if ( ! success ) { <nl> + gpr_log ( GPR_ERROR , " Could not read file % s . " , json_refresh_token_file_path ) ; <nl> exit ( 1 ) ; <nl> } <nl> - fclose ( json_key_file ) ; <nl> - <nl> - return grpc_service_account_credentials_create ( json_key , scope , <nl> - grpc_max_auth_token_lifetime ) ; <nl> + return grpc_refresh_token_credentials_create ( <nl> + ( const char * ) GPR_SLICE_START_PTR ( refresh_token ) ) ; <nl> } <nl> <nl> int main ( int argc , char * * argv ) { <nl> synchronizer sync ; <nl> grpc_credentials * creds = NULL ; <nl> char * json_key_file_path = NULL ; <nl> + char * json_refresh_token_file_path = NULL ; <nl> int use_gce = 0 ; <nl> char * scope = NULL ; <nl> gpr_cmdline * cl = gpr_cmdline_create ( " fetch_oauth2 " ) ; <nl> - gpr_cmdline_add_string ( cl , " json_key " , " File path of the json key . " , <nl> + gpr_cmdline_add_string ( cl , " json_key " , <nl> + " File path of the json key . Mutually exclusive with " <nl> + " - - json_refresh_token . " , <nl> & json_key_file_path ) ; <nl> - gpr_cmdline_add_string ( cl , " scope " , " Space delimited permissions . " , & scope ) ; <nl> + gpr_cmdline_add_string ( cl , " json_refresh_token " , <nl> + " File path of the json refresh token . Mutually " <nl> + " exclusive with - - json_key . " , <nl> + & json_refresh_token_file_path ) ; <nl> + gpr_cmdline_add_string ( cl , " scope " , <nl> + " Space delimited permissions . Only used for " <nl> + " - - json_key , ignored otherwise . " , <nl> + & scope ) ; <nl> gpr_cmdline_add_flag ( <nl> cl , " gce " , <nl> " Get a token from the GCE metadata server ( only works in GCE ) . " , <nl> int main ( int argc , char * * argv ) { <nl> <nl> grpc_init ( ) ; <nl> <nl> + if ( json_key_file_path ! = NULL & & json_refresh_token_file_path ! = NULL ) { <nl> + gpr_log ( GPR_ERROR , <nl> + " - - json_key and - - json_refresh_token are mutually exclusive . " ) ; <nl> + exit ( 1 ) ; <nl> + } <nl> + <nl> if ( use_gce ) { <nl> if ( json_key_file_path ! = NULL | | scope ! = NULL ) { <nl> gpr_log ( GPR_INFO , <nl> int main ( int argc , char * * argv ) { <nl> gpr_log ( GPR_ERROR , " Could not create gce credentials . " ) ; <nl> exit ( 1 ) ; <nl> } <nl> + } else if ( json_refresh_token_file_path ! = NULL ) { <nl> + creds = create_refresh_token_creds ( json_refresh_token_file_path ) ; <nl> + if ( creds = = NULL ) { <nl> + gpr_log ( GPR_ERROR , <nl> + " Could not create refresh token creds . % s does probably not " <nl> + " contain a valid json refresh token . " , <nl> + json_refresh_token_file_path ) ; <nl> + exit ( 1 ) ; <nl> + } <nl> } else { <nl> if ( json_key_file_path = = NULL ) { <nl> gpr_log ( GPR_ERROR , " Missing - - json_key option . " ) ; <nl> mmm a / test / core / security / json_token_test . c <nl> ppp b / test / core / security / json_token_test . c <nl> static const char test_json_key_str_part3 [ ] = <nl> " \ " 777 - abaslkan11hlb6nmim3bpspl31ud . apps . googleusercontent . " <nl> " com \ " , \ " type \ " : \ " service_account \ " } " ; <nl> <nl> + / * Test refresh token . * / <nl> + static const char test_refresh_token_str [ ] = <nl> + " { \ " client_id \ " : \ " 32555999999 . apps . googleusercontent . com \ " , " <nl> + " \ " client_secret \ " : \ " EmssLNjJy1332hD4KFsecret \ " , " <nl> + " \ " refresh_token \ " : \ " 1 / Blahblasj424jladJDSGNf - u4Sua3HDA2ngjd42 \ " , " <nl> + " \ " type \ " : \ " authorized_user \ " } " ; <nl> + <nl> static const char test_scope [ ] = " myperm1 myperm2 " ; <nl> <nl> static const char test_service_url [ ] = " https : / / foo . com / foo . v1 " ; <nl> static void test_jwt_creds_jwt_encode_and_sign ( void ) { <nl> jwt_creds_check_jwt_claim ) ; <nl> } <nl> <nl> + static void test_parse_refresh_token_success ( void ) { <nl> + grpc_auth_refresh_token refresh_token = <nl> + grpc_auth_refresh_token_create_from_string ( test_refresh_token_str ) ; <nl> + GPR_ASSERT ( grpc_auth_refresh_token_is_valid ( & refresh_token ) ) ; <nl> + GPR_ASSERT ( refresh_token . type ! = NULL & & <nl> + ( strcmp ( refresh_token . type , " authorized_user " ) = = 0 ) ) ; <nl> + GPR_ASSERT ( refresh_token . client_id ! = NULL & & <nl> + ( strcmp ( refresh_token . client_id , <nl> + " 32555999999 . apps . googleusercontent . com " ) = = 0 ) ) ; <nl> + GPR_ASSERT ( <nl> + refresh_token . client_secret ! = NULL & & <nl> + ( strcmp ( refresh_token . client_secret , " EmssLNjJy1332hD4KFsecret " ) = = 0 ) ) ; <nl> + GPR_ASSERT ( refresh_token . refresh_token ! = NULL & & <nl> + ( strcmp ( refresh_token . refresh_token , <nl> + " 1 / Blahblasj424jladJDSGNf - u4Sua3HDA2ngjd42 " ) = = 0 ) ) ; <nl> + grpc_auth_refresh_token_destruct ( & refresh_token ) ; <nl> + } <nl> + <nl> + static void test_parse_refresh_token_failure_no_type ( void ) { <nl> + const char refresh_token_str [ ] = <nl> + " { \ " client_id \ " : \ " 32555999999 . apps . googleusercontent . com \ " , " <nl> + " \ " client_secret \ " : \ " EmssLNjJy1332hD4KFsecret \ " , " <nl> + " \ " refresh_token \ " : \ " 1 / Blahblasj424jladJDSGNf - u4Sua3HDA2ngjd42 \ " } " ; <nl> + grpc_auth_refresh_token refresh_token = <nl> + grpc_auth_refresh_token_create_from_string ( refresh_token_str ) ; <nl> + GPR_ASSERT ( ! grpc_auth_refresh_token_is_valid ( & refresh_token ) ) ; <nl> + } <nl> + <nl> + static void test_parse_refresh_token_failure_no_client_id ( void ) { <nl> + const char refresh_token_str [ ] = <nl> + " { \ " client_secret \ " : \ " EmssLNjJy1332hD4KFsecret \ " , " <nl> + " \ " refresh_token \ " : \ " 1 / Blahblasj424jladJDSGNf - u4Sua3HDA2ngjd42 \ " , " <nl> + " \ " type \ " : \ " authorized_user \ " } " ; <nl> + grpc_auth_refresh_token refresh_token = <nl> + grpc_auth_refresh_token_create_from_string ( refresh_token_str ) ; <nl> + GPR_ASSERT ( ! grpc_auth_refresh_token_is_valid ( & refresh_token ) ) ; <nl> + } <nl> + <nl> + static void test_parse_refresh_token_failure_no_client_secret ( void ) { <nl> + const char refresh_token_str [ ] = <nl> + " { \ " client_id \ " : \ " 32555999999 . apps . googleusercontent . com \ " , " <nl> + " \ " refresh_token \ " : \ " 1 / Blahblasj424jladJDSGNf - u4Sua3HDA2ngjd42 \ " , " <nl> + " \ " type \ " : \ " authorized_user \ " } " ; <nl> + grpc_auth_refresh_token refresh_token = <nl> + grpc_auth_refresh_token_create_from_string ( refresh_token_str ) ; <nl> + GPR_ASSERT ( ! grpc_auth_refresh_token_is_valid ( & refresh_token ) ) ; <nl> + } <nl> + <nl> + static void test_parse_refresh_token_failure_no_refresh_token ( void ) { <nl> + const char refresh_token_str [ ] = <nl> + " { \ " client_id \ " : \ " 32555999999 . apps . googleusercontent . com \ " , " <nl> + " \ " client_secret \ " : \ " EmssLNjJy1332hD4KFsecret \ " , " <nl> + " \ " type \ " : \ " authorized_user \ " } " ; <nl> + grpc_auth_refresh_token refresh_token = <nl> + grpc_auth_refresh_token_create_from_string ( refresh_token_str ) ; <nl> + GPR_ASSERT ( ! grpc_auth_refresh_token_is_valid ( & refresh_token ) ) ; <nl> + } <nl> + <nl> int main ( int argc , char * * argv ) { <nl> grpc_test_init ( argc , argv ) ; <nl> test_parse_json_key_success ( ) ; <nl> int main ( int argc , char * * argv ) { <nl> test_parse_json_key_failure_no_private_key ( ) ; <nl> test_service_account_creds_jwt_encode_and_sign ( ) ; <nl> test_jwt_creds_jwt_encode_and_sign ( ) ; <nl> + test_parse_refresh_token_success ( ) ; <nl> + test_parse_refresh_token_failure_no_type ( ) ; <nl> + test_parse_refresh_token_failure_no_client_id ( ) ; <nl> + test_parse_refresh_token_failure_no_client_secret ( ) ; <nl> + test_parse_refresh_token_failure_no_refresh_token ( ) ; <nl> return 0 ; <nl> } <nl>
Merge pull request from jboeuf / refresh_token_parsing
grpc/grpc
c3be769409757bd643ddbd079ea2ac509a5ba8fe
2015-03-12T21:43:37Z
mmm a / code / sorting / bead_sort / beadsort . py <nl> ppp b / code / sorting / bead_sort / beadsort . py <nl> <nl> - # copied from https : / / en . wikipedia . org / wiki / Bead_sort <nl> + # Part of Cosmos by OpenGenus Foundation <nl> def bead_sort ( obj ) : <nl> if all ( [ type ( x ) = = int and x > = 0 for x in obj ] ) : <nl> ref = [ range ( x ) for x in obj ] # for reference <nl> def bead_sort ( obj ) : <nl> out = out [ : : - 1 ] <nl> return out <nl> <nl> - print ( bead_sort ( [ 4 , 1 , 6 , 2 , 40 , 5 , 3 , 8 , 7 ] ) ) <nl> \ No newline at end of file <nl> + print ( bead_sort ( [ 4 , 1 , 6 , 2 , 40 , 5 , 3 , 8 , 7 ] ) ) <nl>
header comment added
OpenGenus/cosmos
6ab644e1114affa8d855c3bc90befe560c27c586
2017-10-08T15:49:57Z
mmm a / tools / clusterfuzz / v8_mock . js <nl> ppp b / tools / clusterfuzz / v8_mock . js <nl> var prettyPrinted = function prettyPrinted ( msg ) { return msg ; } ; <nl> if ( property = = " now " ) { <nl> return mockDateNow ; <nl> } <nl> + if ( property = = " prototype " ) { <nl> + return origDate . prototype <nl> + } <nl> } , <nl> } <nl> <nl>
[ foozzie ] Fix Date proxy mocking
v8/v8
03f203bdf35aff0da84f702b27a6ebb702e29cc8
2018-02-24T02:10:02Z
mmm a / buildscripts / resmokeconfig / suites / replica_sets . yml <nl> ppp b / buildscripts / resmokeconfig / suites / replica_sets . yml <nl> selector : <nl> roots : <nl> - jstests / replsets / * . js <nl> exclude_files : <nl> - # TODO SERVER - 46534 will make this work with mirrored reads on <nl> - - jstests / replsets / read_operations_during_step_up . js <nl> <nl> executor : <nl> config : <nl> mmm a / buildscripts / resmokeconfig / suites / replica_sets_auth . yml <nl> ppp b / buildscripts / resmokeconfig / suites / replica_sets_auth . yml <nl> selector : <nl> - jstests / replsets / interrupted_batch_insert . js <nl> - jstests / replsets / transactions_reaped_with_tickets_exhausted . js <nl> - jstests / replsets / transactions_committed_with_tickets_exhausted . js <nl> - # TODO SERVER - 46534 will make this work with mirrored reads on <nl> - - jstests / replsets / read_operations_during_step_up . js <nl> <nl> executor : <nl> config : <nl> mmm a / buildscripts / resmokeconfig / suites / replica_sets_ese . yml <nl> ppp b / buildscripts / resmokeconfig / suites / replica_sets_ese . yml <nl> selector : <nl> roots : <nl> - jstests / replsets / * . js <nl> exclude_files : <nl> - # TODO SERVER - 46534 will make this work with mirrored reads on <nl> - - jstests / replsets / read_operations_during_step_up . js <nl> <nl> executor : <nl> config : <nl> mmm a / buildscripts / resmokeconfig / suites / replica_sets_ese_gcm . yml <nl> ppp b / buildscripts / resmokeconfig / suites / replica_sets_ese_gcm . yml <nl> selector : <nl> roots : <nl> - jstests / replsets / * . js <nl> exclude_files : <nl> - # TODO SERVER - 46534 will make this work with mirrored reads on <nl> - - jstests / replsets / read_operations_during_step_up . js <nl> <nl> executor : <nl> config : <nl> mmm a / buildscripts / resmokeconfig / suites / replica_sets_large_txns_format . yml <nl> ppp b / buildscripts / resmokeconfig / suites / replica_sets_large_txns_format . yml <nl> selector : <nl> # Transactions are not allowed to operate on capped collections . <nl> - requires_capped <nl> exclude_files : <nl> - # TODO SERVER - 46534 will make this work with mirrored reads on <nl> - - jstests / replsets / read_operations_during_step_up . js <nl> <nl> executor : <nl> config : <nl> mmm a / buildscripts / resmokeconfig / suites / replica_sets_max_mirroring . yml <nl> ppp b / buildscripts / resmokeconfig / suites / replica_sets_max_mirroring . yml <nl> selector : <nl> roots : <nl> - jstests / replsets / * . js <nl> exclude_files : <nl> - # TODO SERVER - 46534 will make this work with mirrored reads on <nl> - - jstests / replsets / read_operations_during_step_up . js <nl> <nl> executor : <nl> config : <nl> mmm a / buildscripts / resmokeconfig / suites / replica_sets_multiversion . yml <nl> ppp b / buildscripts / resmokeconfig / suites / replica_sets_multiversion . yml <nl> selector : <nl> - requires_fcv_44 <nl> exclude_files : <nl> - jstests / replsets / * . js <nl> - # TODO SERVER - 46534 will make this work with mirrored reads on <nl> - - jstests / replsets / read_operations_during_step_up . js <nl> # Enable when 4 . 4 becomes last stable <nl> - jstests / replsets / no_disconnect_on_stepdown . js <nl> executor : <nl> mmm a / jstests / replsets / not_master_unacknowledged_write . js <nl> ppp b / jstests / replsets / not_master_unacknowledged_write . js <nl> var secondaryDB = secondary . getDB ( " test " ) ; <nl> var primaryColl = primaryDB [ collName ] ; <nl> var secondaryColl = secondaryDB [ collName ] ; <nl> <nl> + / / Verify that reading from secondaries does not impact ` notMasterUnacknowledgedWrites ` . <nl> + const preReadingCounter = getNotMasterUnackWritesCounter ( ) ; <nl> + jsTestLog ( " Reading from secondary . . . " ) ; <nl> + [ { name : " findOne " , fn : ( ) = > secondaryColl . findOne ( ) } , <nl> + { name : " distinct " , fn : ( ) = > secondaryColl . distinct ( " item " ) } , <nl> + { name : " count " , fn : ( ) = > secondaryColl . find ( ) . count ( ) } , <nl> + ] . map ( ( { name , fn } ) = > { <nl> + assert . doesNotThrow ( fn ) ; <nl> + assert . eq ( assert . commandWorked ( secondary . getDB ( " admin " ) . isMaster ( ) ) . ismaster , false ) ; <nl> + } ) ; <nl> + const postReadingCounter = getNotMasterUnackWritesCounter ( ) ; <nl> + assert . eq ( preReadingCounter , postReadingCounter ) ; <nl> + <nl> jsTestLog ( " Primary on port " + primary . port + " hangs up on unacknowledged writes " ) ; <nl> / / Do each write method with unacknowledged write concern , " wc " . <nl> [ { name : " insertOne " , fn : ( wc ) = > secondaryColl . insertOne ( { } , wc ) } , <nl> mmm a / src / mongo / db / service_entry_point_common . cpp <nl> ppp b / src / mongo / db / service_entry_point_common . cpp <nl> DbResponse receivedCommands ( OperationContext * opCtx , <nl> const ServiceEntryPointCommon : : Hooks & behaviors ) { <nl> auto replyBuilder = rpc : : makeReplyBuilder ( rpc : : protocolForMessage ( message ) ) ; <nl> OpMsgRequest request ; <nl> + Command * c = nullptr ; <nl> [ & ] { <nl> try { / / Parse . <nl> request = rpc : : opMsgRequestFromAnyProtocol ( message ) ; <nl> DbResponse receivedCommands ( OperationContext * opCtx , <nl> try { / / Execute . <nl> curOpCommandSetup ( opCtx , request ) ; <nl> <nl> - Command * c = nullptr ; <nl> / / In the absence of a Command object , no redaction is possible . Therefore <nl> / / to avoid displaying potentially sensitive information in the logs , <nl> / / we restrict the log message to the name of the unrecognized command . <nl> DbResponse receivedCommands ( OperationContext * opCtx , <nl> if ( OpMsg : : isFlagSet ( message , OpMsg : : kMoreToCome ) ) { <nl> / / Close the connection to get client to go through server selection again . <nl> if ( LastError : : get ( opCtx - > getClient ( ) ) . hadNotMasterError ( ) ) { <nl> - notMasterUnackWrites . increment ( ) ; <nl> + if ( c & & c - > getReadWriteType ( ) = = Command : : ReadWriteType : : kWrite ) <nl> + notMasterUnackWrites . increment ( ) ; <nl> uasserted ( ErrorCodes : : NotMaster , <nl> str : : stream ( ) <nl> < < " Not - master error while processing ' " < < request . getCommandName ( ) <nl>
SERVER - 46534 Make notMasterUnacknowledgedWrites ignore reads
mongodb/mongo
519908a1925e17fcf9e24d90d3b5e67b4d4c7086
2020-04-03T01:04:42Z
mmm a / hphp / hack / src / decl / direct_decl_smart_constructors_generated . rs <nl> ppp b / hphp / hack / src / decl / direct_decl_smart_constructors_generated . rs <nl> impl < ' src > SmartConstructors < ' src , State < ' src > > for DirectDeclSmartConstructors < <nl> < Self as FlattenSmartConstructors < ' src , State < ' src > > > : : make_define_expression ( self , arg0 , arg1 , arg2 , arg3 ) <nl> } <nl> <nl> - fn make_halt_compiler_expression ( & mut self , arg0 : Self : : R , arg1 : Self : : R , arg2 : Self : : R , arg3 : Self : : R ) - > Self : : R { <nl> - < Self as FlattenSmartConstructors < ' src , State < ' src > > > : : make_halt_compiler_expression ( self , arg0 , arg1 , arg2 , arg3 ) <nl> - } <nl> - <nl> fn make_isset_expression ( & mut self , arg0 : Self : : R , arg1 : Self : : R , arg2 : Self : : R , arg3 : Self : : R ) - > Self : : R { <nl> < Self as FlattenSmartConstructors < ' src , State < ' src > > > : : make_isset_expression ( self , arg0 , arg1 , arg2 , arg3 ) <nl> } <nl> mmm a / hphp / hack / src / facts / facts_smart_constructors_generated . rs <nl> ppp b / hphp / hack / src / facts / facts_smart_constructors_generated . rs <nl> impl < ' src > SmartConstructors < ' src , HasScriptContent < ' src > > for FactsSmartConstru <nl> < Self as FlattenSmartConstructors < ' src , HasScriptContent < ' src > > > : : make_define_expression ( self , arg0 , arg1 , arg2 , arg3 ) <nl> } <nl> <nl> - fn make_halt_compiler_expression ( & mut self , arg0 : Self : : R , arg1 : Self : : R , arg2 : Self : : R , arg3 : Self : : R ) - > Self : : R { <nl> - < Self as FlattenSmartConstructors < ' src , HasScriptContent < ' src > > > : : make_halt_compiler_expression ( self , arg0 , arg1 , arg2 , arg3 ) <nl> - } <nl> - <nl> fn make_isset_expression ( & mut self , arg0 : Self : : R , arg1 : Self : : R , arg2 : Self : : R , arg3 : Self : : R ) - > Self : : R { <nl> < Self as FlattenSmartConstructors < ' src , HasScriptContent < ' src > > > : : make_isset_expression ( self , arg0 , arg1 , arg2 , arg3 ) <nl> } <nl> mmm a / hphp / hack / src / hackfmt / hack_format . ml <nl> ppp b / hphp / hack / src / hackfmt / hack_format . ml <nl> let rec t ( env : Env . t ) ( node : Syntax . t ) : Doc . t = <nl> define_right_paren = right_p ; <nl> } - > <nl> Concat [ t env kw ; transform_argish env left_p args right_p ] <nl> - | Syntax . HaltCompilerExpression <nl> - { <nl> - halt_compiler_keyword = kw ; <nl> - halt_compiler_left_paren = left_p ; <nl> - halt_compiler_argument_list = args ; <nl> - halt_compiler_right_paren = right_p ; <nl> - } - > <nl> - Concat [ t env kw ; transform_argish env left_p args right_p ] <nl> | Syntax . ParenthesizedExpression <nl> { <nl> parenthesized_expression_left_paren = left_p ; <nl> and transform_trivia ~ is_leading trivia = <nl> in <nl> List . iter trivia ~ f : ( fun triv - > <nl> match Trivia . kind triv with <nl> - | TriviaKind . AfterHaltCompiler - > <nl> - ( * ignore content that appears after __halt_compiler * ) <nl> - ( ) <nl> | TriviaKind . ExtraTokenError <nl> | TriviaKind . FixMe <nl> | TriviaKind . IgnoreError <nl> mmm a / hphp / hack / src / hh_parse . ml <nl> ppp b / hphp / hack / src / hh_parse . ml <nl> module FullFidelityParseArgs = struct <nl> const_default_func_args : bool ; <nl> const_static_props : bool ; <nl> abstract_static_props : bool ; <nl> - disable_halt_compiler : bool ; <nl> disallow_func_ptrs_in_constants : bool ; <nl> error_php_lambdas : bool ; <nl> disallow_discarded_nullable_awaitables : bool ; <nl> module FullFidelityParseArgs = struct <nl> const_default_func_args <nl> const_static_props <nl> abstract_static_props <nl> - disable_halt_compiler <nl> disallow_func_ptrs_in_constants <nl> error_php_lambdas <nl> disallow_discarded_nullable_awaitables <nl> module FullFidelityParseArgs = struct <nl> const_default_func_args ; <nl> const_static_props ; <nl> abstract_static_props ; <nl> - disable_halt_compiler ; <nl> disallow_func_ptrs_in_constants ; <nl> error_php_lambdas ; <nl> disallow_discarded_nullable_awaitables ; <nl> module FullFidelityParseArgs = struct <nl> let const_default_func_args = ref false in <nl> let const_static_props = ref false in <nl> let abstract_static_props = ref false in <nl> - let disable_halt_compiler = ref false in <nl> let disallow_func_ptrs_in_constants = ref false in <nl> let error_php_lambdas = ref false in <nl> let disallow_discarded_nullable_awaitables = ref false in <nl> No errors are filtered out . " <nl> ( " - - abstract - static - props " , <nl> Arg . Set abstract_static_props , <nl> " Enable abstract static properties " ) ; <nl> - ( " - - disable - halt - compiler " , <nl> - Arg . Set disable_halt_compiler , <nl> - " Disable using PHP __halt_compiler ( ) " ) ; <nl> ( " - - disallow - func - ptrs - in - constants " , <nl> Arg . Set disallow_func_ptrs_in_constants , <nl> " Disallow use of HH \ \ fun and HH \ \ class_meth in constants and constant initializers " <nl> No errors are filtered out . " <nl> ! const_default_func_args <nl> ! const_static_props <nl> ! abstract_static_props <nl> - ! disable_halt_compiler <nl> ! disallow_func_ptrs_in_constants <nl> ! error_php_lambdas <nl> ! disallow_discarded_nullable_awaitables <nl> mmm a / hphp / hack / src / hh_single_type_check . ml <nl> ppp b / hphp / hack / src / hh_single_type_check . ml <nl> let parse_options ( ) = <nl> let const_default_func_args = ref false in <nl> let disallow_silence = ref false in <nl> let abstract_static_props = ref false in <nl> - let disable_halt_compiler = ref false in <nl> let disable_unset_class_const = ref false in <nl> let glean_service = ref ( GleanOptions . service GlobalOptions . default ) in <nl> let glean_hostname = ref ( GleanOptions . hostname GlobalOptions . default ) in <nl> let parse_options ( ) = <nl> ( " - - disable - unset - class - const " , <nl> Arg . Set disable_unset_class_const , <nl> " Make unsetting a class const a parse error " ) ; <nl> - ( " - - disable - halt - compiler " , <nl> - Arg . Set disable_halt_compiler , <nl> - " Disable using PHP __halt_compiler ( ) " ) ; <nl> ( " - - glean - service " , <nl> Arg . String ( fun str - > glean_service : = str ) , <nl> " glean service name " ) ; <nl> mmm a / hphp / hack / src / hhbc / hhbc_options . ml <nl> ppp b / hphp / hack / src / hhbc / hhbc_options . ml <nl> type t = { <nl> option_phpism_disallow_execution_operator : bool ; <nl> option_phpism_disable_nontoplevel_declarations : bool ; <nl> option_phpism_disable_static_closures : bool ; <nl> - option_phpism_disable_halt_compiler : bool ; <nl> option_emit_func_pointers : bool ; <nl> option_emit_cls_meth_pointers : bool ; <nl> option_emit_inst_meth_pointers : bool ; <nl> let default = <nl> option_phpism_disallow_execution_operator = false ; <nl> option_phpism_disable_nontoplevel_declarations = false ; <nl> option_phpism_disable_static_closures = false ; <nl> - option_phpism_disable_halt_compiler = false ; <nl> option_emit_func_pointers = true ; <nl> option_emit_cls_meth_pointers = true ; <nl> option_emit_inst_meth_pointers = true ; <nl> let phpism_disable_nontoplevel_declarations o = <nl> <nl> let phpism_disable_static_closures o = o . option_phpism_disable_static_closures <nl> <nl> - let phpism_disable_halt_compiler o = o . option_phpism_disable_halt_compiler <nl> - <nl> let emit_func_pointers o = o . option_emit_func_pointers <nl> <nl> let emit_cls_meth_pointers o = o . option_emit_cls_meth_pointers <nl> let to_string o = <nl> @ @ phpism_disable_nontoplevel_declarations o ; <nl> Printf . sprintf " phpism_disable_static_closures : % B " <nl> @ @ phpism_disable_static_closures o ; <nl> - Printf . sprintf " phpism_disable_halt_compiler : % B " <nl> - @ @ phpism_disable_halt_compiler o ; <nl> Printf . sprintf " emit_func_pointers : % B " @ @ emit_func_pointers o ; <nl> Printf . sprintf " emit_cls_meth_pointers : % B " @ @ emit_cls_meth_pointers o ; <nl> Printf . sprintf " emit_inst_meth_pointers : % B " @ @ emit_inst_meth_pointers o ; <nl> let set_option options name value = <nl> } <nl> | " hack . lang . phpism . disablestaticclosures " - > <nl> { options with option_phpism_disable_static_closures = as_bool value } <nl> - | " hhvm . lang . phpism . disablehaltcompiler " - > <nl> - { options with option_phpism_disable_halt_compiler = as_bool value } <nl> | " hhvm . emit_func_pointers " - > <nl> { options with option_emit_func_pointers = int_of_string value > 0 } <nl> | " hhvm . emit_cls_meth_pointers " - > <nl> let value_setters = <nl> get_value_from_config_int <nl> @ @ fun opts v - > { opts with option_phpism_disable_static_closures = v = 1 } <nl> ) ; <nl> - ( set_value <nl> - " hhvm . hack . lang . phpism . disable_halt_compiler " <nl> - get_value_from_config_int <nl> - @ @ fun opts v - > { opts with option_phpism_disable_halt_compiler = v = 1 } <nl> - ) ; <nl> ( set_value " hhvm . emit_func_pointers " get_value_from_config_int <nl> @ @ fun opts v - > { opts with option_emit_func_pointers = v > 0 } ) ; <nl> ( set_value " hhvm . emit_cls_meth_pointers " get_value_from_config_int <nl> mmm a / hphp / hack / src / hhbc / options . rs <nl> ppp b / hphp / hack / src / hhbc / options . rs <nl> prefixed_flags ! ( <nl> DISALLOW_EXECUTION_OPERATOR , <nl> DISABLE_NONTOPLEVEL_DECLARATIONS , <nl> DISABLE_STATIC_CLOSURES , <nl> - DISABLE_HALT_COMPILER , <nl> ) ; <nl> impl Default for PhpismFlags { <nl> fn default ( ) - > PhpismFlags { <nl> bitflags ! { <nl> const DISALLOW_EXECUTION_OPERATOR = 1 < < 21 ; <nl> const DISABLE_NONTOPLEVEL_DECLARATIONS = 1 < < 22 ; <nl> const DISABLE_STATIC_CLOSURES = 1 < < 23 ; <nl> - const DISABLE_HALT_COMPILER = 1 < < 24 ; <nl> const EMIT_FUNC_POINTERS = 1 < < 25 ; <nl> const EMIT_CLS_METH_POINTERS = 1 < < 26 ; <nl> const EMIT_INST_METH_POINTERS = 1 < < 27 ; <nl> mmm a / hphp / hack / src / hhbc / options_cli . rs <nl> ppp b / hphp / hack / src / hhbc / options_cli . rs <nl> lazy_static ! { <nl> " hack . lang . phpism . disallowexecutionoperator " = > " hhvm . hack . lang . phpism . disallow_execution_operator " , <nl> " hack . lang . phpism . disablenontopleveldeclarations " = > " hhvm . hack . lang . phpism . disable_nontoplevel_declarations " , <nl> " hack . lang . phpism . disablestaticclosures " = > " hhvm . hack . lang . phpism . disable_static_closures " , <nl> - " hack . lang . phpism . disablehaltcompiler " = > " hhvm . hack . lang . phpism . disable_halt_compiler " , <nl> " hack . lang . enablecoroutines " = > " hhvm . hack . lang . enable_coroutines " , <nl> " hack . lang . enablepocketuniverses " = > " hhvm . hack . lang . enable_pocket_universes " , <nl> / / group 5 : we could assume " hack . " between " hhvm . " and " lang . " <nl> mmm a / hphp / hack / src / parser / core / expression_parser . rs <nl> ppp b / hphp / hack / src / parser / core / expression_parser . rs <nl> where <nl> | TokenKind : : Require_once = > self . parse_inclusion_expression ( ) , <nl> | TokenKind : : Isset = > self . parse_isset_expression ( ) , <nl> | TokenKind : : Define = > self . parse_define_expression ( ) , <nl> - | TokenKind : : HaltCompiler = > self . parse_halt_compiler_expression ( ) , <nl> | TokenKind : : Eval = > self . parse_eval_expression ( ) , <nl> | TokenKind : : ColonAt = > self . parse_pocket_atom ( ) , <nl> | TokenKind : : Empty = > { <nl> where <nl> } <nl> } <nl> <nl> - fn parse_halt_compiler_expression ( & mut self ) - > S : : R { <nl> - let mut parser1 = self . clone ( ) ; <nl> - let keyword = parser1 . assert_token ( TokenKind : : HaltCompiler ) ; <nl> - if parser1 . peek_token_kind ( ) = = TokenKind : : LeftParen { <nl> - self . continue_from ( parser1 ) ; <nl> - let ( left , args , right ) = self . parse_expression_list_opt ( ) ; <nl> - S ! ( <nl> - make_halt_compiler_expression , <nl> - self , <nl> - keyword , <nl> - left , <nl> - args , <nl> - right <nl> - ) <nl> - } else { <nl> - self . with_error ( Errors : : error1019 ) ; <nl> - self . parse_as_name_or_error ( ) <nl> - } <nl> - } <nl> - <nl> fn parse_double_quoted_like_string ( <nl> & mut self , <nl> head : S : : Token , <nl> mmm a / hphp / hack / src / parser / core / lexer . rs <nl> ppp b / hphp / hack / src / parser / core / lexer . rs <nl> impl < ' a , Token : LexableToken < ' a > > Lexer < ' a , Token > { <nl> fn as_case_insensitive_keyword ( & self , text : & str ) - > Option < String > { <nl> let lower = text . to_ascii_lowercase ( ) ; <nl> match lower . as_ref ( ) { <nl> - " __halt_compiler " | " abstract " | " and " | " array " | " as " | " bool " | " boolean " <nl> - | " break " | " callable " | " case " | " catch " | " class " | " clone " | " const " <nl> - | " continue " | " default " | " die " | " do " | " echo " | " else " | " elseif " | " empty " <nl> - | " endfor " | " endforeach " | " endif " | " endswitch " | " endwhile " | " eval " | " exit " <nl> - | " extends " | " false " | " final " | " finally " | " for " | " foreach " | " function " <nl> - | " global " | " goto " | " if " | " implements " | " include " | " include_once " | " inout " <nl> - | " instanceof " | " insteadof " | " int " | " integer " | " interface " | " isset " | " list " <nl> - | " namespace " | " new " | " null " | " or " | " parent " | " print " | " private " <nl> - | " protected " | " public " | " require " | " require_once " | " return " | " self " <nl> - | " static " | " string " | " switch " | " throw " | " trait " | " try " | " true " | " unset " <nl> - | " use " | " using " | " var " | " void " | " while " | " xor " | " yield " = > Some ( lower ) , <nl> + " abstract " | " and " | " array " | " as " | " bool " | " boolean " | " break " | " callable " <nl> + | " case " | " catch " | " class " | " clone " | " const " | " continue " | " default " | " die " <nl> + | " do " | " echo " | " else " | " elseif " | " empty " | " endfor " | " endforeach " | " endif " <nl> + | " endswitch " | " endwhile " | " eval " | " exit " | " extends " | " false " | " final " <nl> + | " finally " | " for " | " foreach " | " function " | " global " | " goto " | " if " <nl> + | " implements " | " include " | " include_once " | " inout " | " instanceof " | " insteadof " <nl> + | " int " | " integer " | " interface " | " isset " | " list " | " namespace " | " new " | " null " <nl> + | " or " | " parent " | " print " | " private " | " protected " | " public " | " require " <nl> + | " require_once " | " return " | " self " | " static " | " string " | " switch " | " throw " <nl> + | " trait " | " try " | " true " | " unset " | " use " | " using " | " var " | " void " | " while " <nl> + | " xor " | " yield " = > Some ( lower ) , <nl> _ = > None , <nl> } <nl> } <nl> impl < ' a , Token : LexableToken < ' a > > Lexer < ' a , Token > { <nl> pub fn next_xhp_category_name ( & mut self ) - > Token { <nl> self . scan_token_and_trivia ( & Self : : scan_xhp_category_name , KwSet : : NoKeywords ) <nl> } <nl> - <nl> - pub fn rescan_halt_compiler ( & mut self , last_token : Token ) - > Token { <nl> - / / __halt_compiler stops parsing of the file . <nl> - / / In order to preserve fill fidelity aspect of the parser <nl> - / / we pack everything that follows __halt_compiler as <nl> - / / separate opaque kind of trivia - it will be attached as a trailing trivia <nl> - / / to the last_token and existing trailing trivia will be merged in . <nl> - <nl> - / / This is incorrect for minimal token <nl> - let leading_start_offset = last_token . leading_start_offset ( ) . unwrap_or ( 0 ) ; <nl> - let start_offset = leading_start_offset + last_token . leading_width ( ) + last_token . width ( ) ; <nl> - <nl> - let length = self . source . length ( ) ; <nl> - let trailing = Token : : Trivia : : make_after_halt_compiler ( <nl> - self . source ( ) , <nl> - start_offset , <nl> - length - start_offset , <nl> - ) ; <nl> - self . with_offset ( length ) ; <nl> - last_token . with_trailing ( vec ! [ trailing ] ) <nl> - } <nl> } <nl> mmm a / hphp / hack / src / parser / core / parser_trait . rs <nl> ppp b / hphp / hack / src / parser / core / parser_trait . rs <nl> where <nl> self . lexer_mut ( ) . scan_header ( ) <nl> } <nl> <nl> - fn rescan_halt_compiler ( & mut self , right_brace : S : : Token ) - > S : : Token { <nl> - self . lexer_mut ( ) . rescan_halt_compiler ( right_brace ) <nl> - } <nl> - <nl> fn error_offsets ( & mut self , on_whole_token : bool / * = false * / ) - > ( usize , usize ) { <nl> if on_whole_token { <nl> let token = self . peek_token ( ) ; <nl> mmm a / hphp / hack / src / parser / core / statement_parser . rs <nl> ppp b / hphp / hack / src / parser / core / statement_parser . rs <nl> where <nl> let expression = self . parse_expression ( ) ; <nl> <nl> let token = match self . require_semicolon_token ( saw_type_name ) { <nl> - Some ( t ) = > { <nl> - if expression . is_halt_compiler_expression ( ) { <nl> - let token = self . rescan_halt_compiler ( t ) ; <nl> - S ! ( make_token , self , token ) <nl> - } else { <nl> - S ! ( make_token , self , t ) <nl> - } <nl> - } <nl> + Some ( t ) = > S ! ( make_token , self , t ) , <nl> None = > S ! ( make_missing , self , self . pos ( ) ) , <nl> } ; <nl> self . pop_scope ( ExpectedTokens : : Semicolon ) ; <nl> mmm a / hphp / hack / src / parser / coroutine_smart_constructors_generated . rs <nl> ppp b / hphp / hack / src / parser / coroutine_smart_constructors_generated . rs <nl> where <nl> < Self as SyntaxSmartConstructors < Self : : R , T > > : : make_define_expression ( self , arg0 , arg1 , arg2 , arg3 ) <nl> } <nl> <nl> - fn make_halt_compiler_expression ( & mut self , arg0 : Self : : R , arg1 : Self : : R , arg2 : Self : : R , arg3 : Self : : R ) - > Self : : R { <nl> - < Self as SyntaxSmartConstructors < Self : : R , T > > : : make_halt_compiler_expression ( self , arg0 , arg1 , arg2 , arg3 ) <nl> - } <nl> - <nl> fn make_isset_expression ( & mut self , arg0 : Self : : R , arg1 : Self : : R , arg2 : Self : : R , arg3 : Self : : R ) - > Self : : R { <nl> < Self as SyntaxSmartConstructors < Self : : R , T > > : : make_isset_expression ( self , arg0 , arg1 , arg2 , arg3 ) <nl> } <nl> mmm a / hphp / hack / src / parser / decl_mode_smart_constructors_generated . rs <nl> ppp b / hphp / hack / src / parser / decl_mode_smart_constructors_generated . rs <nl> where <nl> < Self as SyntaxSmartConstructors < ' src , Self : : R , State < Self : : R > > > : : make_define_expression ( self , arg0 , arg1 , arg2 , arg3 ) <nl> } <nl> <nl> - fn make_halt_compiler_expression ( & mut self , arg0 : Self : : R , arg1 : Self : : R , arg2 : Self : : R , arg3 : Self : : R ) - > Self : : R { <nl> - < Self as SyntaxSmartConstructors < ' src , Self : : R , State < Self : : R > > > : : make_halt_compiler_expression ( self , arg0 , arg1 , arg2 , arg3 ) <nl> - } <nl> - <nl> fn make_isset_expression ( & mut self , arg0 : Self : : R , arg1 : Self : : R , arg2 : Self : : R , arg3 : Self : : R ) - > Self : : R { <nl> < Self as SyntaxSmartConstructors < ' src , Self : : R , State < Self : : R > > > : : make_isset_expression ( self , arg0 , arg1 , arg2 , arg3 ) <nl> } <nl> mmm a / hphp / hack / src / parser / docblock_finder . ml <nl> ppp b / hphp / hack / src / parser / docblock_finder . ml <nl> let get_docblock node = <nl> helper tail acc 1 <nl> | TriviaKind . DelimitedComment <nl> | TriviaKind . FallThrough <nl> - | TriviaKind . ExtraTokenError <nl> - | TriviaKind . AfterHaltCompiler - > <nl> + | TriviaKind . ExtraTokenError - > <nl> ( * Short circuit immediately . * ) <nl> helper [ ] acc 0 <nl> end <nl> mmm a / hphp / hack / src / parser / flatten_smart_constructors . rs <nl> ppp b / hphp / hack / src / parser / flatten_smart_constructors . rs <nl> pub trait FlattenSmartConstructors < ' src , State > <nl> } <nl> } <nl> <nl> - fn make_halt_compiler_expression ( & mut self , arg0 : Self : : R , arg1 : Self : : R , arg2 : Self : : R , arg3 : Self : : R ) - > Self : : R { <nl> - if Self : : is_zero ( & arg0 ) & & Self : : is_zero ( & arg1 ) & & Self : : is_zero ( & arg2 ) & & Self : : is_zero ( & arg3 ) { <nl> - Self : : zero ( ) <nl> - } else { <nl> - Self : : flatten ( vec ! ( arg0 , arg1 , arg2 , arg3 ) ) <nl> - } <nl> - } <nl> - <nl> fn make_isset_expression ( & mut self , arg0 : Self : : R , arg1 : Self : : R , arg2 : Self : : R , arg3 : Self : : R ) - > Self : : R { <nl> if Self : : is_zero ( & arg0 ) & & Self : : is_zero ( & arg1 ) & & Self : : is_zero ( & arg2 ) & & Self : : is_zero ( & arg3 ) { <nl> Self : : zero ( ) <nl> mmm a / hphp / hack / src / parser / full_fidelity_editable_trivia . ml <nl> ppp b / hphp / hack / src / parser / full_fidelity_editable_trivia . ml <nl> let make_delimited_comment source_text offset width = <nl> text = SourceText . sub source_text offset width ; <nl> } <nl> <nl> - let make_after_halt_compiler source_text offset width = <nl> - { <nl> - kind = TriviaKind . AfterHaltCompiler ; <nl> - text = SourceText . sub source_text offset width ; <nl> - } <nl> - <nl> ( * HackFormat is using this to create trivia . It ' s deeply manipulating strings <nl> * so it was easier to create this helper function to avoid ad - hoc <nl> * SourceText construction . * ) <nl> mmm a / hphp / hack / src / parser / full_fidelity_minimal_trivia . ml <nl> ppp b / hphp / hack / src / parser / full_fidelity_minimal_trivia . ml <nl> let make_delimited_comment _text _offset width = <nl> let make_extra_token_error _text _offset width = <nl> { kind = ExtraTokenError ; width } <nl> <nl> - let make_after_halt_compiler _text _offset width = <nl> - { kind = AfterHaltCompiler ; width } <nl> - <nl> let width trivia = trivia . width <nl> <nl> let kind trivia = trivia . kind <nl> mmm a / hphp / hack / src / parser / full_fidelity_positioned_token . ml <nl> ppp b / hphp / hack / src / parser / full_fidelity_positioned_token . ml <nl> end = struct <nl> [ type SurroundingTrivia = Lexable of int | Unlexable of ( Trivia . t list * Trivia . t list ) ] . <nl> Unfortunately , the first case is at least nine orders of magnitude more <nl> common than the second case , since the second case is only needed for <nl> - [ AfterHaltCompiler ] and [ ExtraTokenError ] , which are either exceedingly <nl> - rare or only show up in incorrect files that wouldn ' t pass typecheck <nl> + [ ExtraTokenError ] , which only show up in incorrect files that wouldn ' t pass typecheck <nl> anyway . Therefore , in order to optimize for the general case , we use the <nl> [ Obj ] library to store the trivia kinds packed into an int as an immediate <nl> value , unless we detect that it ' s not an int , in which case we can pull it <nl> end = struct <nl> List . fold_left ( lor ) 0 trivia_kinds <nl> <nl> let is_special = function <nl> - | TriviaKind . AfterHaltCompiler <nl> - | TriviaKind . ExtraTokenError - > <nl> - true <nl> + | TriviaKind . ExtraTokenError - > true <nl> | _ - > false <nl> <nl> let has_special trivia_lists = <nl> mmm a / hphp / hack / src / parser / full_fidelity_positioned_trivia . ml <nl> ppp b / hphp / hack / src / parser / full_fidelity_positioned_trivia . ml <nl> let make_single_line_comment source_text offset width = <nl> let make_delimited_comment source_text offset width = <nl> { kind = TriviaKind . DelimitedComment ; source_text ; offset ; width } <nl> <nl> - let make_after_halt_compiler source_text offset width = <nl> - { kind = TriviaKind . AfterHaltCompiler ; source_text ; offset ; width } <nl> - <nl> let width trivia = trivia . width <nl> <nl> let kind trivia = trivia . kind <nl> mmm a / hphp / hack / src / parser / full_fidelity_syntax . ml <nl> ppp b / hphp / hack / src / parser / full_fidelity_syntax . ml <nl> module WithToken ( Token : TokenType ) = struct <nl> | ConditionalExpression _ - > SyntaxKind . ConditionalExpression <nl> | EvalExpression _ - > SyntaxKind . EvalExpression <nl> | DefineExpression _ - > SyntaxKind . DefineExpression <nl> - | HaltCompilerExpression _ - > SyntaxKind . HaltCompilerExpression <nl> | IssetExpression _ - > SyntaxKind . IssetExpression <nl> | FunctionCallExpression _ - > SyntaxKind . FunctionCallExpression <nl> | FunctionPointerExpression _ - > SyntaxKind . FunctionPointerExpression <nl> module WithToken ( Token : TokenType ) = struct <nl> let is_conditional_expression = has_kind SyntaxKind . ConditionalExpression <nl> let is_eval_expression = has_kind SyntaxKind . EvalExpression <nl> let is_define_expression = has_kind SyntaxKind . DefineExpression <nl> - let is_halt_compiler_expression = has_kind SyntaxKind . HaltCompilerExpression <nl> let is_isset_expression = has_kind SyntaxKind . IssetExpression <nl> let is_function_call_expression = has_kind SyntaxKind . FunctionCallExpression <nl> let is_function_pointer_expression = has_kind SyntaxKind . FunctionPointerExpression <nl> module WithToken ( Token : TokenType ) = struct <nl> let acc = f acc define_argument_list in <nl> let acc = f acc define_right_paren in <nl> acc <nl> - | HaltCompilerExpression { <nl> - halt_compiler_keyword ; <nl> - halt_compiler_left_paren ; <nl> - halt_compiler_argument_list ; <nl> - halt_compiler_right_paren ; <nl> - } - > <nl> - let acc = f acc halt_compiler_keyword in <nl> - let acc = f acc halt_compiler_left_paren in <nl> - let acc = f acc halt_compiler_argument_list in <nl> - let acc = f acc halt_compiler_right_paren in <nl> - acc <nl> | IssetExpression { <nl> isset_keyword ; <nl> isset_left_paren ; <nl> module WithToken ( Token : TokenType ) = struct <nl> define_argument_list ; <nl> define_right_paren ; <nl> ] <nl> - | HaltCompilerExpression { <nl> - halt_compiler_keyword ; <nl> - halt_compiler_left_paren ; <nl> - halt_compiler_argument_list ; <nl> - halt_compiler_right_paren ; <nl> - } - > [ <nl> - halt_compiler_keyword ; <nl> - halt_compiler_left_paren ; <nl> - halt_compiler_argument_list ; <nl> - halt_compiler_right_paren ; <nl> - ] <nl> | IssetExpression { <nl> isset_keyword ; <nl> isset_left_paren ; <nl> module WithToken ( Token : TokenType ) = struct <nl> " define_argument_list " ; <nl> " define_right_paren " ; <nl> ] <nl> - | HaltCompilerExpression { <nl> - halt_compiler_keyword ; <nl> - halt_compiler_left_paren ; <nl> - halt_compiler_argument_list ; <nl> - halt_compiler_right_paren ; <nl> - } - > [ <nl> - " halt_compiler_keyword " ; <nl> - " halt_compiler_left_paren " ; <nl> - " halt_compiler_argument_list " ; <nl> - " halt_compiler_right_paren " ; <nl> - ] <nl> | IssetExpression { <nl> isset_keyword ; <nl> isset_left_paren ; <nl> module WithToken ( Token : TokenType ) = struct <nl> define_argument_list ; <nl> define_right_paren ; <nl> } <nl> - | ( SyntaxKind . HaltCompilerExpression , [ <nl> - halt_compiler_keyword ; <nl> - halt_compiler_left_paren ; <nl> - halt_compiler_argument_list ; <nl> - halt_compiler_right_paren ; <nl> - ] ) - > <nl> - HaltCompilerExpression { <nl> - halt_compiler_keyword ; <nl> - halt_compiler_left_paren ; <nl> - halt_compiler_argument_list ; <nl> - halt_compiler_right_paren ; <nl> - } <nl> | ( SyntaxKind . IssetExpression , [ <nl> isset_keyword ; <nl> isset_left_paren ; <nl> module WithToken ( Token : TokenType ) = struct <nl> let value = ValueBuilder . value_from_syntax syntax in <nl> make syntax value <nl> <nl> - let make_halt_compiler_expression <nl> - halt_compiler_keyword <nl> - halt_compiler_left_paren <nl> - halt_compiler_argument_list <nl> - halt_compiler_right_paren <nl> - = <nl> - let syntax = HaltCompilerExpression { <nl> - halt_compiler_keyword ; <nl> - halt_compiler_left_paren ; <nl> - halt_compiler_argument_list ; <nl> - halt_compiler_right_paren ; <nl> - } in <nl> - let value = ValueBuilder . value_from_syntax syntax in <nl> - make syntax value <nl> - <nl> let make_isset_expression <nl> isset_keyword <nl> isset_left_paren <nl> mmm a / hphp / hack / src / parser / full_fidelity_syntax_kind . ml <nl> ppp b / hphp / hack / src / parser / full_fidelity_syntax_kind . ml <nl> type t = <nl> | ConditionalExpression <nl> | EvalExpression <nl> | DefineExpression <nl> - | HaltCompilerExpression <nl> | IssetExpression <nl> | FunctionCallExpression <nl> | FunctionPointerExpression <nl> let to_string kind = <nl> | ConditionalExpression - > " conditional_expression " <nl> | EvalExpression - > " eval_expression " <nl> | DefineExpression - > " define_expression " <nl> - | HaltCompilerExpression - > " halt_compiler_expression " <nl> | IssetExpression - > " isset_expression " <nl> | FunctionCallExpression - > " function_call_expression " <nl> | FunctionPointerExpression - > " function_pointer_expression " <nl> mmm a / hphp / hack / src / parser / full_fidelity_syntax_type . ml <nl> ppp b / hphp / hack / src / parser / full_fidelity_syntax_type . ml <nl> module MakeSyntaxType ( Token : TokenType ) ( SyntaxValue : SyntaxValueType ) = struct <nl> ; define_argument_list : t <nl> ; define_right_paren : t <nl> } <nl> - | HaltCompilerExpression of <nl> - { halt_compiler_keyword : t <nl> - ; halt_compiler_left_paren : t <nl> - ; halt_compiler_argument_list : t <nl> - ; halt_compiler_right_paren : t <nl> - } <nl> | IssetExpression of <nl> { isset_keyword : t <nl> ; isset_left_paren : t <nl> module MakeValidated ( Token : TokenType ) ( SyntaxValue : SyntaxValueType ) = struct <nl> | ExprConditional of conditional_expression <nl> | ExprEval of eval_expression <nl> | ExprDefine of define_expression <nl> - | ExprHaltCompiler of halt_compiler_expression <nl> | ExprIsset of isset_expression <nl> | ExprFunctionCall of function_call_expression <nl> | ExprFunctionPointer of function_pointer_expression <nl> module MakeValidated ( Token : TokenType ) ( SyntaxValue : SyntaxValueType ) = struct <nl> | LambdaConditional of conditional_expression <nl> | LambdaEval of eval_expression <nl> | LambdaDefine of define_expression <nl> - | LambdaHaltCompiler of halt_compiler_expression <nl> | LambdaIsset of isset_expression <nl> | LambdaFunctionCall of function_call_expression <nl> | LambdaFunctionPointer of function_pointer_expression <nl> module MakeValidated ( Token : TokenType ) ( SyntaxValue : SyntaxValueType ) = struct <nl> | CExprConditional of conditional_expression <nl> | CExprEval of eval_expression <nl> | CExprDefine of define_expression <nl> - | CExprHaltCompiler of halt_compiler_expression <nl> | CExprIsset of isset_expression <nl> | CExprFunctionCall of function_call_expression <nl> | CExprFunctionPointer of function_pointer_expression <nl> module MakeValidated ( Token : TokenType ) ( SyntaxValue : SyntaxValueType ) = struct <nl> ; define_argument_list : expression listesque value <nl> ; define_right_paren : Token . t value <nl> } <nl> - and halt_compiler_expression = <nl> - { halt_compiler_keyword : Token . t value <nl> - ; halt_compiler_left_paren : Token . t value <nl> - ; halt_compiler_argument_list : expression listesque value <nl> - ; halt_compiler_right_paren : Token . t value <nl> - } <nl> and isset_expression = <nl> { isset_keyword : Token . t value <nl> ; isset_left_paren : Token . t value <nl> mmm a / hphp / hack / src / parser / full_fidelity_token_kind . ml <nl> ppp b / hphp / hack / src / parser / full_fidelity_token_kind . ml <nl> type t = <nl> | Global <nl> | Concurrent <nl> | Goto <nl> - | HaltCompiler <nl> | If <nl> | Implements <nl> | Include <nl> let from_string keyword ~ only_reserved = <nl> match keyword with <nl> | " true " when not only_reserved - > Some BooleanLiteral <nl> | " false " when not only_reserved - > Some BooleanLiteral <nl> - | " abstract " - > Some Abstract <nl> - | " array " - > Some Array <nl> - | " arraykey " when not only_reserved - > Some Arraykey <nl> - | " as " - > Some As <nl> - | " async " - > Some Async <nl> - | " attribute " when not only_reserved - > Some Attribute <nl> - | " await " - > Some Await <nl> - | " \ \ " - > Some Backslash <nl> - | " binary " when not only_reserved - > Some Binary <nl> - | " bool " when not only_reserved - > Some Bool <nl> - | " boolean " when not only_reserved - > Some Boolean <nl> - | " break " - > Some Break <nl> - | " case " - > Some Case <nl> - | " catch " - > Some Catch <nl> - | " category " when not only_reserved - > Some Category <nl> - | " children " when not only_reserved - > Some Children <nl> - | " class " - > Some Class <nl> - | " classname " when not only_reserved - > Some Classname <nl> - | " clone " - > Some Clone <nl> - | " const " - > Some Const <nl> - | " __construct " - > Some Construct <nl> - | " continue " - > Some Continue <nl> - | " coroutine " when not only_reserved - > Some Coroutine <nl> - | " darray " when not only_reserved - > Some Darray <nl> - | " default " - > Some Default <nl> - | " define " when not only_reserved - > Some Define <nl> - | " dict " when not only_reserved - > Some Dict <nl> - | " do " - > Some Do <nl> - | " double " when not only_reserved - > Some Double <nl> - | " echo " - > Some Echo <nl> - | " else " - > Some Else <nl> - | " elseif " - > Some Elseif <nl> - | " empty " - > Some Empty <nl> - | " endfor " - > Some Endfor <nl> - | " endforeach " - > Some Endforeach <nl> - | " endif " - > Some Endif <nl> - | " endswitch " - > Some Endswitch <nl> - | " endwhile " - > Some Endwhile <nl> - | " enum " when not only_reserved - > Some Enum <nl> - | " eval " - > Some Eval <nl> - | " extends " - > Some Extends <nl> - | " fallthrough " when not only_reserved - > Some Fallthrough <nl> - | " float " when not only_reserved - > Some Float <nl> - | " file " when not only_reserved - > Some File <nl> - | " final " - > Some Final <nl> - | " finally " - > Some Finally <nl> - | " for " - > Some For <nl> - | " foreach " - > Some Foreach <nl> - | " from " when not only_reserved - > Some From <nl> - | " function " - > Some Function <nl> - | " global " - > Some Global <nl> - | " concurrent " - > Some Concurrent <nl> - | " goto " - > Some Goto <nl> - | " __halt_compiler " - > Some HaltCompiler <nl> - | " if " - > Some If <nl> - | " implements " - > Some Implements <nl> - | " include " - > Some Include <nl> - | " include_once " - > Some Include_once <nl> - | " inout " - > Some Inout <nl> - | " instanceof " - > Some Instanceof <nl> - | " insteadof " - > Some Insteadof <nl> - | " int " when not only_reserved - > Some Int <nl> - | " integer " when not only_reserved - > Some Integer <nl> - | " interface " - > Some Interface <nl> - | " is " when not only_reserved - > Some Is <nl> - | " isset " - > Some Isset <nl> - | " keyset " when not only_reserved - > Some Keyset <nl> - | " list " - > Some List <nl> - | " mixed " when not only_reserved - > Some Mixed <nl> - | " namespace " - > Some Namespace <nl> - | " new " - > Some New <nl> - | " newtype " when not only_reserved - > Some Newtype <nl> - | " noreturn " when not only_reserved - > Some Noreturn <nl> - | " num " when not only_reserved - > Some Num <nl> - | " object " when not only_reserved - > Some Object <nl> - | " parent " when not only_reserved - > Some Parent <nl> - | " print " - > Some Print <nl> - | " private " - > Some Private <nl> - | " protected " - > Some Protected <nl> - | " public " - > Some Public <nl> - | " real " when not only_reserved - > Some Real <nl> - | " reify " when not only_reserved - > Some Reify <nl> - | " recordname " - > Some Record <nl> - | " record " - > Some RecordDec <nl> - | " require " - > Some Require <nl> - | " require_once " - > Some Require_once <nl> - | " required " - > Some Required <nl> - | " lateinit " - > Some Lateinit <nl> - | " resource " when not only_reserved - > Some Resource <nl> - | " return " - > Some Return <nl> - | " self " when not only_reserved - > Some Self <nl> - | " shape " - > Some Shape <nl> - | " static " - > Some Static <nl> - | " string " when not only_reserved - > Some String <nl> - | " super " when not only_reserved - > Some Super <nl> - | " suspend " when not only_reserved - > Some Suspend <nl> - | " switch " - > Some Switch <nl> - | " this " when not only_reserved - > Some This <nl> - | " throw " - > Some Throw <nl> - | " trait " - > Some Trait <nl> - | " try " - > Some Try <nl> - | " tuple " - > Some Tuple <nl> - | " type " when not only_reserved - > Some Type <nl> - | " unset " - > Some Unset <nl> - | " use " - > Some Use <nl> - | " using " - > Some Using <nl> - | " var " - > Some Var <nl> - | " varray " when not only_reserved - > Some Varray <nl> - | " vec " when not only_reserved - > Some Vec <nl> - | " void " when not only_reserved - > Some Void <nl> - | " where " when not only_reserved - > Some Where <nl> - | " while " - > Some While <nl> - | " yield " - > Some Yield <nl> - | " null " when not only_reserved - > Some NullLiteral <nl> - | " [ " - > Some LeftBracket <nl> - | " ] " - > Some RightBracket <nl> - | " ( " - > Some LeftParen <nl> - | " ) " - > Some RightParen <nl> - | " { " - > Some LeftBrace <nl> - | " } " - > Some RightBrace <nl> - | " . " - > Some Dot <nl> - | " - > " - > Some MinusGreaterThan <nl> - | " + + " - > Some PlusPlus <nl> - | " - - " - > Some MinusMinus <nl> - | " * * " - > Some StarStar <nl> - | " * " - > Some Star <nl> - | " + " - > Some Plus <nl> - | " - " - > Some Minus <nl> - | " ~ " - > Some Tilde <nl> - | " ! " - > Some Exclamation <nl> - | " $ " - > Some Dollar <nl> - | " / " - > Some Slash <nl> - | " % " - > Some Percent <nl> - | " < = > " - > Some LessThanEqualGreaterThan <nl> - | " < < " - > Some LessThanLessThan <nl> - | " > > " - > Some GreaterThanGreaterThan <nl> - | " < " - > Some LessThan <nl> - | " > " - > Some GreaterThan <nl> - | " < = " - > Some LessThanEqual <nl> - | " > = " - > Some GreaterThanEqual <nl> - | " = = " - > Some EqualEqual <nl> - | " = = = " - > Some EqualEqualEqual <nl> - | " ! = " - > Some ExclamationEqual <nl> - | " ! = = " - > Some ExclamationEqualEqual <nl> - | " ^ " - > Some Carat <nl> - | " | " - > Some Bar <nl> - | " & " - > Some Ampersand <nl> - | " & & " - > Some AmpersandAmpersand <nl> - | " | | " - > Some BarBar <nl> - | " ? " - > Some Question <nl> - | " ? as " - > Some QuestionAs <nl> - | " ? : " - > Some QuestionColon <nl> - | " ? ? " - > Some QuestionQuestion <nl> - | " ? ? = " - > Some QuestionQuestionEqual <nl> - | " : " - > Some Colon <nl> - | " ; " - > Some Semicolon <nl> - | " = " - > Some Equal <nl> - | " * * = " - > Some StarStarEqual <nl> - | " * = " - > Some StarEqual <nl> - | " / = " - > Some SlashEqual <nl> - | " % = " - > Some PercentEqual <nl> - | " + = " - > Some PlusEqual <nl> - | " - = " - > Some MinusEqual <nl> - | " . = " - > Some DotEqual <nl> - | " < < = " - > Some LessThanLessThanEqual <nl> - | " > > = " - > Some GreaterThanGreaterThanEqual <nl> - | " & = " - > Some AmpersandEqual <nl> - | " ^ = " - > Some CaratEqual <nl> - | " | = " - > Some BarEqual <nl> - | " , " - > Some Comma <nl> - | " @ " - > Some At <nl> - | " : : " - > Some ColonColon <nl> - | " = > " - > Some EqualGreaterThan <nl> - | " = = > " - > Some EqualEqualGreaterThan <nl> - | " ? - > " - > Some QuestionMinusGreaterThan <nl> - | " . . . " - > Some DotDotDot <nl> - | " $ $ " - > Some DollarDollar <nl> - | " | > " - > Some BarGreaterThan <nl> - | " / > " - > Some SlashGreaterThan <nl> - | " < / " - > Some LessThanSlash <nl> - | " < ? " - > Some LessThanQuestion <nl> - | " ? > " - > Some QuestionGreaterThan <nl> - | " : @ " - > Some ColonAt <nl> - | " xhp " when not only_reserved - > Some XHP <nl> + | " abstract " - > Some Abstract <nl> + | " array " - > Some Array <nl> + | " arraykey " when not only_reserved - > Some Arraykey <nl> + | " as " - > Some As <nl> + | " async " - > Some Async <nl> + | " attribute " when not only_reserved - > Some Attribute <nl> + | " await " - > Some Await <nl> + | " \ \ " - > Some Backslash <nl> + | " binary " when not only_reserved - > Some Binary <nl> + | " bool " when not only_reserved - > Some Bool <nl> + | " boolean " when not only_reserved - > Some Boolean <nl> + | " break " - > Some Break <nl> + | " case " - > Some Case <nl> + | " catch " - > Some Catch <nl> + | " category " when not only_reserved - > Some Category <nl> + | " children " when not only_reserved - > Some Children <nl> + | " class " - > Some Class <nl> + | " classname " when not only_reserved - > Some Classname <nl> + | " clone " - > Some Clone <nl> + | " const " - > Some Const <nl> + | " __construct " - > Some Construct <nl> + | " continue " - > Some Continue <nl> + | " coroutine " when not only_reserved - > Some Coroutine <nl> + | " darray " when not only_reserved - > Some Darray <nl> + | " default " - > Some Default <nl> + | " define " when not only_reserved - > Some Define <nl> + | " dict " when not only_reserved - > Some Dict <nl> + | " do " - > Some Do <nl> + | " double " when not only_reserved - > Some Double <nl> + | " echo " - > Some Echo <nl> + | " else " - > Some Else <nl> + | " elseif " - > Some Elseif <nl> + | " empty " - > Some Empty <nl> + | " endfor " - > Some Endfor <nl> + | " endforeach " - > Some Endforeach <nl> + | " endif " - > Some Endif <nl> + | " endswitch " - > Some Endswitch <nl> + | " endwhile " - > Some Endwhile <nl> + | " enum " when not only_reserved - > Some Enum <nl> + | " eval " - > Some Eval <nl> + | " extends " - > Some Extends <nl> + | " fallthrough " when not only_reserved - > Some Fallthrough <nl> + | " float " when not only_reserved - > Some Float <nl> + | " file " when not only_reserved - > Some File <nl> + | " final " - > Some Final <nl> + | " finally " - > Some Finally <nl> + | " for " - > Some For <nl> + | " foreach " - > Some Foreach <nl> + | " from " when not only_reserved - > Some From <nl> + | " function " - > Some Function <nl> + | " global " - > Some Global <nl> + | " concurrent " - > Some Concurrent <nl> + | " goto " - > Some Goto <nl> + | " if " - > Some If <nl> + | " implements " - > Some Implements <nl> + | " include " - > Some Include <nl> + | " include_once " - > Some Include_once <nl> + | " inout " - > Some Inout <nl> + | " instanceof " - > Some Instanceof <nl> + | " insteadof " - > Some Insteadof <nl> + | " int " when not only_reserved - > Some Int <nl> + | " integer " when not only_reserved - > Some Integer <nl> + | " interface " - > Some Interface <nl> + | " is " when not only_reserved - > Some Is <nl> + | " isset " - > Some Isset <nl> + | " keyset " when not only_reserved - > Some Keyset <nl> + | " list " - > Some List <nl> + | " mixed " when not only_reserved - > Some Mixed <nl> + | " namespace " - > Some Namespace <nl> + | " new " - > Some New <nl> + | " newtype " when not only_reserved - > Some Newtype <nl> + | " noreturn " when not only_reserved - > Some Noreturn <nl> + | " num " when not only_reserved - > Some Num <nl> + | " object " when not only_reserved - > Some Object <nl> + | " parent " when not only_reserved - > Some Parent <nl> + | " print " - > Some Print <nl> + | " private " - > Some Private <nl> + | " protected " - > Some Protected <nl> + | " public " - > Some Public <nl> + | " real " when not only_reserved - > Some Real <nl> + | " reify " when not only_reserved - > Some Reify <nl> + | " recordname " - > Some Record <nl> + | " record " - > Some RecordDec <nl> + | " require " - > Some Require <nl> + | " require_once " - > Some Require_once <nl> + | " required " - > Some Required <nl> + | " lateinit " - > Some Lateinit <nl> + | " resource " when not only_reserved - > Some Resource <nl> + | " return " - > Some Return <nl> + | " self " when not only_reserved - > Some Self <nl> + | " shape " - > Some Shape <nl> + | " static " - > Some Static <nl> + | " string " when not only_reserved - > Some String <nl> + | " super " when not only_reserved - > Some Super <nl> + | " suspend " when not only_reserved - > Some Suspend <nl> + | " switch " - > Some Switch <nl> + | " this " when not only_reserved - > Some This <nl> + | " throw " - > Some Throw <nl> + | " trait " - > Some Trait <nl> + | " try " - > Some Try <nl> + | " tuple " - > Some Tuple <nl> + | " type " when not only_reserved - > Some Type <nl> + | " unset " - > Some Unset <nl> + | " use " - > Some Use <nl> + | " using " - > Some Using <nl> + | " var " - > Some Var <nl> + | " varray " when not only_reserved - > Some Varray <nl> + | " vec " when not only_reserved - > Some Vec <nl> + | " void " when not only_reserved - > Some Void <nl> + | " where " when not only_reserved - > Some Where <nl> + | " while " - > Some While <nl> + | " yield " - > Some Yield <nl> + | " null " when not only_reserved - > Some NullLiteral <nl> + | " [ " - > Some LeftBracket <nl> + | " ] " - > Some RightBracket <nl> + | " ( " - > Some LeftParen <nl> + | " ) " - > Some RightParen <nl> + | " { " - > Some LeftBrace <nl> + | " } " - > Some RightBrace <nl> + | " . " - > Some Dot <nl> + | " - > " - > Some MinusGreaterThan <nl> + | " + + " - > Some PlusPlus <nl> + | " - - " - > Some MinusMinus <nl> + | " * * " - > Some StarStar <nl> + | " * " - > Some Star <nl> + | " + " - > Some Plus <nl> + | " - " - > Some Minus <nl> + | " ~ " - > Some Tilde <nl> + | " ! " - > Some Exclamation <nl> + | " $ " - > Some Dollar <nl> + | " / " - > Some Slash <nl> + | " % " - > Some Percent <nl> + | " < = > " - > Some LessThanEqualGreaterThan <nl> + | " < < " - > Some LessThanLessThan <nl> + | " > > " - > Some GreaterThanGreaterThan <nl> + | " < " - > Some LessThan <nl> + | " > " - > Some GreaterThan <nl> + | " < = " - > Some LessThanEqual <nl> + | " > = " - > Some GreaterThanEqual <nl> + | " = = " - > Some EqualEqual <nl> + | " = = = " - > Some EqualEqualEqual <nl> + | " ! = " - > Some ExclamationEqual <nl> + | " ! = = " - > Some ExclamationEqualEqual <nl> + | " ^ " - > Some Carat <nl> + | " | " - > Some Bar <nl> + | " & " - > Some Ampersand <nl> + | " & & " - > Some AmpersandAmpersand <nl> + | " | | " - > Some BarBar <nl> + | " ? " - > Some Question <nl> + | " ? as " - > Some QuestionAs <nl> + | " ? : " - > Some QuestionColon <nl> + | " ? ? " - > Some QuestionQuestion <nl> + | " ? ? = " - > Some QuestionQuestionEqual <nl> + | " : " - > Some Colon <nl> + | " ; " - > Some Semicolon <nl> + | " = " - > Some Equal <nl> + | " * * = " - > Some StarStarEqual <nl> + | " * = " - > Some StarEqual <nl> + | " / = " - > Some SlashEqual <nl> + | " % = " - > Some PercentEqual <nl> + | " + = " - > Some PlusEqual <nl> + | " - = " - > Some MinusEqual <nl> + | " . = " - > Some DotEqual <nl> + | " < < = " - > Some LessThanLessThanEqual <nl> + | " > > = " - > Some GreaterThanGreaterThanEqual <nl> + | " & = " - > Some AmpersandEqual <nl> + | " ^ = " - > Some CaratEqual <nl> + | " | = " - > Some BarEqual <nl> + | " , " - > Some Comma <nl> + | " @ " - > Some At <nl> + | " : : " - > Some ColonColon <nl> + | " = > " - > Some EqualGreaterThan <nl> + | " = = > " - > Some EqualEqualGreaterThan <nl> + | " ? - > " - > Some QuestionMinusGreaterThan <nl> + | " . . . " - > Some DotDotDot <nl> + | " $ $ " - > Some DollarDollar <nl> + | " | > " - > Some BarGreaterThan <nl> + | " / > " - > Some SlashGreaterThan <nl> + | " < / " - > Some LessThanSlash <nl> + | " < ? " - > Some LessThanQuestion <nl> + | " ? > " - > Some QuestionGreaterThan <nl> + | " : @ " - > Some ColonAt <nl> + | " xhp " when not only_reserved - > Some XHP <nl> | _ - > None <nl> <nl> let to_string kind = <nl> let to_string kind = <nl> | Global - > " global " <nl> | Concurrent - > " concurrent " <nl> | Goto - > " goto " <nl> - | HaltCompiler - > " __halt_compiler " <nl> | If - > " if " <nl> | Implements - > " implements " <nl> | Include - > " include " <nl> mmm a / hphp / hack / src / parser / full_fidelity_trivia_kind . ml <nl> ppp b / hphp / hack / src / parser / full_fidelity_trivia_kind . ml <nl> type t = <nl> | IgnoreError <nl> | FallThrough <nl> | ExtraTokenError <nl> - | AfterHaltCompiler <nl> <nl> [ @ @ deriving show , enum ] <nl> <nl> let to_string kind = <nl> | IgnoreError - > " ignore_error " <nl> | FallThrough - > " fall_through " <nl> | ExtraTokenError - > " extra_token_error " <nl> - | AfterHaltCompiler - > " after_halt_compiler " <nl> mmm a / hphp / hack / src / parser / full_fidelity_validated_syntax . ml <nl> ppp b / hphp / hack / src / parser / full_fidelity_validated_syntax . ml <nl> module Make ( Token : TokenType ) ( SyntaxValue : SyntaxValueType ) = struct <nl> | Syntax . ConditionalExpression _ - > tag validate_conditional_expression ( fun x - > ExprConditional x ) x <nl> | Syntax . EvalExpression _ - > tag validate_eval_expression ( fun x - > ExprEval x ) x <nl> | Syntax . DefineExpression _ - > tag validate_define_expression ( fun x - > ExprDefine x ) x <nl> - | Syntax . HaltCompilerExpression _ - > tag validate_halt_compiler_expression ( fun x - > ExprHaltCompiler x ) x <nl> | Syntax . IssetExpression _ - > tag validate_isset_expression ( fun x - > ExprIsset x ) x <nl> | Syntax . FunctionCallExpression _ - > tag validate_function_call_expression ( fun x - > ExprFunctionCall x ) x <nl> | Syntax . FunctionPointerExpression _ - > tag validate_function_pointer_expression ( fun x - > ExprFunctionPointer x ) x <nl> module Make ( Token : TokenType ) ( SyntaxValue : SyntaxValueType ) = struct <nl> | ExprConditional thing - > invalidate_conditional_expression ( value , thing ) <nl> | ExprEval thing - > invalidate_eval_expression ( value , thing ) <nl> | ExprDefine thing - > invalidate_define_expression ( value , thing ) <nl> - | ExprHaltCompiler thing - > invalidate_halt_compiler_expression ( value , thing ) <nl> | ExprIsset thing - > invalidate_isset_expression ( value , thing ) <nl> | ExprFunctionCall thing - > invalidate_function_call_expression ( value , thing ) <nl> | ExprFunctionPointer thing - > invalidate_function_pointer_expression ( value , thing ) <nl> module Make ( Token : TokenType ) ( SyntaxValue : SyntaxValueType ) = struct <nl> | Syntax . ConditionalExpression _ - > tag validate_conditional_expression ( fun x - > LambdaConditional x ) x <nl> | Syntax . EvalExpression _ - > tag validate_eval_expression ( fun x - > LambdaEval x ) x <nl> | Syntax . DefineExpression _ - > tag validate_define_expression ( fun x - > LambdaDefine x ) x <nl> - | Syntax . HaltCompilerExpression _ - > tag validate_halt_compiler_expression ( fun x - > LambdaHaltCompiler x ) x <nl> | Syntax . IssetExpression _ - > tag validate_isset_expression ( fun x - > LambdaIsset x ) x <nl> | Syntax . FunctionCallExpression _ - > tag validate_function_call_expression ( fun x - > LambdaFunctionCall x ) x <nl> | Syntax . FunctionPointerExpression _ - > tag validate_function_pointer_expression ( fun x - > LambdaFunctionPointer x ) x <nl> module Make ( Token : TokenType ) ( SyntaxValue : SyntaxValueType ) = struct <nl> | LambdaConditional thing - > invalidate_conditional_expression ( value , thing ) <nl> | LambdaEval thing - > invalidate_eval_expression ( value , thing ) <nl> | LambdaDefine thing - > invalidate_define_expression ( value , thing ) <nl> - | LambdaHaltCompiler thing - > invalidate_halt_compiler_expression ( value , thing ) <nl> | LambdaIsset thing - > invalidate_isset_expression ( value , thing ) <nl> | LambdaFunctionCall thing - > invalidate_function_call_expression ( value , thing ) <nl> | LambdaFunctionPointer thing - > invalidate_function_pointer_expression ( value , thing ) <nl> module Make ( Token : TokenType ) ( SyntaxValue : SyntaxValueType ) = struct <nl> | Syntax . ConditionalExpression _ - > tag validate_conditional_expression ( fun x - > CExprConditional x ) x <nl> | Syntax . EvalExpression _ - > tag validate_eval_expression ( fun x - > CExprEval x ) x <nl> | Syntax . DefineExpression _ - > tag validate_define_expression ( fun x - > CExprDefine x ) x <nl> - | Syntax . HaltCompilerExpression _ - > tag validate_halt_compiler_expression ( fun x - > CExprHaltCompiler x ) x <nl> | Syntax . IssetExpression _ - > tag validate_isset_expression ( fun x - > CExprIsset x ) x <nl> | Syntax . FunctionCallExpression _ - > tag validate_function_call_expression ( fun x - > CExprFunctionCall x ) x <nl> | Syntax . FunctionPointerExpression _ - > tag validate_function_pointer_expression ( fun x - > CExprFunctionPointer x ) x <nl> module Make ( Token : TokenType ) ( SyntaxValue : SyntaxValueType ) = struct <nl> | CExprConditional thing - > invalidate_conditional_expression ( value , thing ) <nl> | CExprEval thing - > invalidate_eval_expression ( value , thing ) <nl> | CExprDefine thing - > invalidate_define_expression ( value , thing ) <nl> - | CExprHaltCompiler thing - > invalidate_halt_compiler_expression ( value , thing ) <nl> | CExprIsset thing - > invalidate_isset_expression ( value , thing ) <nl> | CExprFunctionCall thing - > invalidate_function_call_expression ( value , thing ) <nl> | CExprFunctionPointer thing - > invalidate_function_pointer_expression ( value , thing ) <nl> module Make ( Token : TokenType ) ( SyntaxValue : SyntaxValueType ) = struct <nl> } <nl> ; Syntax . value = v <nl> } <nl> - and validate_halt_compiler_expression : halt_compiler_expression validator = function <nl> - | { Syntax . syntax = Syntax . HaltCompilerExpression x ; value = v } - > v , <nl> - { halt_compiler_right_paren = validate_token x . halt_compiler_right_paren <nl> - ; halt_compiler_argument_list = validate_list_with ( validate_expression ) x . halt_compiler_argument_list <nl> - ; halt_compiler_left_paren = validate_token x . halt_compiler_left_paren <nl> - ; halt_compiler_keyword = validate_token x . halt_compiler_keyword <nl> - } <nl> - | s - > validation_fail ( Some SyntaxKind . HaltCompilerExpression ) s <nl> - and invalidate_halt_compiler_expression : halt_compiler_expression invalidator = fun ( v , x ) - > <nl> - { Syntax . syntax = <nl> - Syntax . HaltCompilerExpression <nl> - { halt_compiler_keyword = invalidate_token x . halt_compiler_keyword <nl> - ; halt_compiler_left_paren = invalidate_token x . halt_compiler_left_paren <nl> - ; halt_compiler_argument_list = invalidate_list_with ( invalidate_expression ) x . halt_compiler_argument_list <nl> - ; halt_compiler_right_paren = invalidate_token x . halt_compiler_right_paren <nl> - } <nl> - ; Syntax . value = v <nl> - } <nl> and validate_isset_expression : isset_expression validator = function <nl> | { Syntax . syntax = Syntax . IssetExpression x ; value = v } - > v , <nl> { isset_right_paren = validate_token x . isset_right_paren <nl> mmm a / hphp / hack / src / parser / js / full_fidelity_schema . json <nl> ppp b / hphp / hack / src / parser / js / full_fidelity_schema . json <nl> <nl> { " description " : <nl> " @ generated JSON schema of the Hack Full Fidelity Parser AST " , <nl> - " version " : " 2020 - 03 - 24 - 0001 " , <nl> + " version " : " 2020 - 03 - 31 - 0001 " , <nl> " trivia " : [ <nl> { " trivia_kind_name " : " WhiteSpace " , <nl> " trivia_type_name " : " whitespace " } , <nl> <nl> { " trivia_kind_name " : " FallThrough " , <nl> " trivia_type_name " : " fall_through " } , <nl> { " trivia_kind_name " : " ExtraTokenError " , <nl> - " trivia_type_name " : " extra_token_error " } , <nl> - { " trivia_kind_name " : " AfterHaltCompiler " , <nl> - " trivia_type_name " : " after_halt_compiler " } ] , <nl> + " trivia_type_name " : " extra_token_error " } ] , <nl> " tokens " : [ <nl> { " token_kind " : " Abstract " , <nl> " token_text " : " abstract " } , <nl> <nl> " token_text " : " concurrent " } , <nl> { " token_kind " : " Goto " , <nl> " token_text " : " goto " } , <nl> - { " token_kind " : " HaltCompiler " , <nl> - " token_text " : " __halt_compiler " } , <nl> { " token_kind " : " If " , <nl> " token_text " : " if " } , <nl> { " token_kind " : " Implements " , <nl> <nl> { " field_name " : " argument_list " } , <nl> { " field_name " : " right_paren " } <nl> ] } , <nl> - { " kind_name " : " HaltCompilerExpression " , <nl> - " type_name " : " halt_compiler_expression " , <nl> - " description " : " halt_compiler_expression " , <nl> - " prefix " : " halt_compiler " , <nl> - " fields " : [ <nl> - { " field_name " : " keyword " } , <nl> - { " field_name " : " left_paren " } , <nl> - { " field_name " : " argument_list " } , <nl> - { " field_name " : " right_paren " } <nl> - ] } , <nl> { " kind_name " : " IssetExpression " , <nl> " type_name " : " isset_expression " , <nl> " description " : " isset_expression " , <nl> mmm a / hphp / hack / src / parser / lexable_trivia . rs <nl> ppp b / hphp / hack / src / parser / lexable_trivia . rs <nl> pub trait LexableTrivia : Clone + PartialEq { <nl> fn make_ignore_error ( source : & SourceText , offset : usize , width : usize ) - > Self ; <nl> fn make_extra_token_error ( source : & SourceText , offset : usize , width : usize ) - > Self ; <nl> fn make_delimited_comment ( source : & SourceText , offset : usize , width : usize ) - > Self ; <nl> - fn make_after_halt_compiler ( source : & SourceText , offset : usize , width : usize ) - > Self ; <nl> <nl> fn kind ( & self ) - > TriviaKind ; <nl> fn width ( & self ) - > usize ; <nl> mmm a / hphp / hack / src / parser / lexable_trivia_sig . ml <nl> ppp b / hphp / hack / src / parser / lexable_trivia_sig . ml <nl> module type LexableTrivia_S = sig <nl> <nl> val make_delimited_comment : SourceText . t - > int - > int - > t <nl> <nl> - val make_after_halt_compiler : SourceText . t - > int - > int - > t <nl> - <nl> val kind : t - > TriviaKind . t <nl> <nl> val width : t - > int <nl> mmm a / hphp / hack / src / parser / lowerer . rs <nl> ppp b / hphp / hack / src / parser / lowerer . rs <nl> where <nl> } <nl> <nl> fn p_program ( node : & Syntax < T , V > , env : & mut Env ) - > Result < ast : : Program > { <nl> - let is_halt = | syntax : & SyntaxVariant < T , V > | - > bool { <nl> - match syntax { <nl> - ExpressionStatement ( c ) = > match & c . expression_statement_expression . syntax { <nl> - HaltCompilerExpression ( _ ) = > true , <nl> - _ = > false , <nl> - } , <nl> - _ = > false , <nl> - } <nl> - } ; <nl> let nodes = Self : : as_list ( node ) ; <nl> let mut acc = vec ! [ ] ; <nl> for i in 0 . . nodes . len ( ) { <nl> match & nodes [ i ] . syntax { <nl> EndOfFile ( _ ) = > break , <nl> - n if is_halt ( n ) = > { <nl> - Self : : raise_parsing_error ( <nl> - nodes [ i ] , <nl> - env , <nl> - & syntax_error : : halt_compiler_is_disabled , <nl> - ) ; <nl> - } <nl> _ = > match Self : : p_def ( nodes [ i ] , env ) { <nl> Err ( Error : : MissingSyntax { . . } ) if env . fail_open = > { } <nl> e @ Err ( _ ) = > return e , <nl> mmm a / hphp / hack / src / parser / minimal_smart_constructors . rs <nl> ppp b / hphp / hack / src / parser / minimal_smart_constructors . rs <nl> impl < ' src > SmartConstructors < ' src , NoState > for MinimalSmartConstructors { <nl> < Self as SyntaxSmartConstructors < ' src , MinimalSyntax , NoState > > : : make_define_expression ( self , arg0 , arg1 , arg2 , arg3 ) <nl> } <nl> <nl> - fn make_halt_compiler_expression ( & mut self , arg0 : Self : : R , arg1 : Self : : R , arg2 : Self : : R , arg3 : Self : : R ) - > Self : : R { <nl> - < Self as SyntaxSmartConstructors < ' src , MinimalSyntax , NoState > > : : make_halt_compiler_expression ( self , arg0 , arg1 , arg2 , arg3 ) <nl> - } <nl> - <nl> fn make_isset_expression ( & mut self , arg0 : Self : : R , arg1 : Self : : R , arg2 : Self : : R , arg3 : Self : : R ) - > Self : : R { <nl> < Self as SyntaxSmartConstructors < ' src , MinimalSyntax , NoState > > : : make_isset_expression ( self , arg0 , arg1 , arg2 , arg3 ) <nl> } <nl> mmm a / hphp / hack / src / parser / minimal_trivia . rs <nl> ppp b / hphp / hack / src / parser / minimal_trivia . rs <nl> impl LexableTrivia for MinimalTrivia { <nl> width , <nl> } <nl> } <nl> - <nl> - fn make_after_halt_compiler ( _source : & SourceText , _offset : usize , width : usize ) - > Self { <nl> - Self { <nl> - kind : TriviaKind : : AfterHaltCompiler , <nl> - width , <nl> - } <nl> - } <nl> } <nl> mmm a / hphp / hack / src / parser / ocaml_syntax_generated . rs <nl> ppp b / hphp / hack / src / parser / ocaml_syntax_generated . rs <nl> where <nl> Self { syntax , value } <nl> } <nl> <nl> - fn make_halt_compiler_expression ( ctx : & C , arg0 : Self , arg1 : Self , arg2 : Self , arg3 : Self ) - > Self { <nl> - let children = [ <nl> - & arg0 . value , <nl> - & arg1 . value , <nl> - & arg2 . value , <nl> - & arg3 . value <nl> - ] ; <nl> - let value = V : : from_values ( & children ) ; <nl> - let syntax = Self : : make ( <nl> - ctx , <nl> - SyntaxKind : : HaltCompilerExpression , <nl> - & value , <nl> - & [ <nl> - arg0 . syntax , <nl> - arg1 . syntax , <nl> - arg2 . syntax , <nl> - arg3 . syntax <nl> - ] , <nl> - ) ; <nl> - Self { syntax , value } <nl> - } <nl> - <nl> fn make_isset_expression ( ctx : & C , arg0 : Self , arg1 : Self , arg2 : Self , arg3 : Self ) - > Self { <nl> let children = [ <nl> & arg0 . value , <nl> mmm a / hphp / hack / src / parser / positioned_smart_constructors . rs <nl> ppp b / hphp / hack / src / parser / positioned_smart_constructors . rs <nl> impl < ' src , State : StateType < ' src , PositionedSyntax > > SmartConstructors < ' src , Sta <nl> < Self as SyntaxSmartConstructors < ' src , PositionedSyntax , State > > : : make_define_expression ( self , arg0 , arg1 , arg2 , arg3 ) <nl> } <nl> <nl> - fn make_halt_compiler_expression ( & mut self , arg0 : Self : : R , arg1 : Self : : R , arg2 : Self : : R , arg3 : Self : : R ) - > Self : : R { <nl> - < Self as SyntaxSmartConstructors < ' src , PositionedSyntax , State > > : : make_halt_compiler_expression ( self , arg0 , arg1 , arg2 , arg3 ) <nl> - } <nl> - <nl> fn make_isset_expression ( & mut self , arg0 : Self : : R , arg1 : Self : : R , arg2 : Self : : R , arg3 : Self : : R ) - > Self : : R { <nl> < Self as SyntaxSmartConstructors < ' src , PositionedSyntax , State > > : : make_isset_expression ( self , arg0 , arg1 , arg2 , arg3 ) <nl> } <nl> mmm a / hphp / hack / src / parser / positioned_trivia . rs <nl> ppp b / hphp / hack / src / parser / positioned_trivia . rs <nl> impl LexableTrivia for PositionedTrivia { <nl> width , <nl> } <nl> } <nl> - <nl> - fn make_after_halt_compiler ( _source : & SourceText , offset : usize , width : usize ) - > Self { <nl> - Self { <nl> - kind : TriviaKind : : AfterHaltCompiler , <nl> - offset , <nl> - width , <nl> - } <nl> - } <nl> } <nl> <nl> impl LexablePositionedTrivia for PositionedTrivia { <nl> mmm a / hphp / hack / src / parser / rust_parser_errors . rs <nl> ppp b / hphp / hack / src / parser / rust_parser_errors . rs <nl> where <nl> self . errors <nl> . push ( Self : : make_error_from_node ( node , errors : : error2020 ) ) <nl> } <nl> - HaltCompilerExpression ( x ) = > { <nl> - if Self : : syntax_to_list_no_separators ( & x . halt_compiler_argument_list ) <nl> - . next ( ) <nl> - . is_some ( ) <nl> - { <nl> - self . errors . push ( Self : : make_error_from_node ( <nl> - node , <nl> - errors : : no_args_in_halt_compiler , <nl> - ) ) <nl> - } <nl> - / / expression statement - > syntax list - > script <nl> - if self . parents . len ( ) ! = 3 { <nl> - self . errors . push ( Self : : make_error_from_node ( <nl> - node , <nl> - errors : : halt_compiler_top_level_only , <nl> - ) ) <nl> - } <nl> - } <nl> <nl> FunctionCallExpression ( x ) = > { <nl> let arg_list = & x . function_call_argument_list ; <nl> where <nl> | FileAttributeSpecification ( _ ) <nl> | EndOfFile ( _ ) <nl> | NamespaceUseDeclaration ( _ ) = > false , <nl> - ExpressionStatement ( x ) = > { <nl> - if let HaltCompilerExpression ( _ ) = <nl> - & x . expression_statement_expression . syntax <nl> - { <nl> - false <nl> - } else { <nl> - true <nl> - } <nl> - } <nl> _ = > true , <nl> } <nl> } ) <nl> where <nl> ArrayIntrinsicExpression ( _ ) = > self . expression_errors ( node ) , <nl> LiteralExpression ( _ ) <nl> | SafeMemberSelectionExpression ( _ ) <nl> - | HaltCompilerExpression ( _ ) <nl> | FunctionCallExpression ( _ ) <nl> | ListExpression ( _ ) <nl> | ShapeExpression ( _ ) <nl> mmm a / hphp / hack / src / parser / rust_to_ocaml . rs <nl> ppp b / hphp / hack / src / parser / rust_to_ocaml . rs <nl> fn build_lazy_trivia ( trivia_list : & [ PositionedTrivia ] , acc : Option < usize > ) - > Op <nl> trivia_list <nl> . iter ( ) <nl> . fold ( acc , | acc , trivia | match ( acc , trivia . kind ) { <nl> - ( None , _ ) | ( _ , TriviaKind : : AfterHaltCompiler ) | ( _ , TriviaKind : : ExtraTokenError ) = > { <nl> - None <nl> - } <nl> + ( None , _ ) | ( _ , TriviaKind : : ExtraTokenError ) = > None , <nl> ( Some ( mask ) , kind ) = > Some ( mask | trivia_kind_mask ( kind ) ) , <nl> } ) <nl> } <nl> mmm a / hphp / hack / src / parser / schema / full_fidelity_schema . ml <nl> ppp b / hphp / hack / src / parser / schema / full_fidelity_schema . ml <nl> <nl> <nl> ( * If you make changes to the schema that cause it to serialize / deserialize <nl> differently , please update this version number * ) <nl> - let full_fidelity_schema_version_number = " 2020 - 03 - 24 - 0001 " <nl> + let full_fidelity_schema_version_number = " 2020 - 03 - 31 - 0001 " <nl> <nl> ( * TODO : Consider basing the version number on an auto - generated <nl> hash of a file rather than relying on people remembering to update it . * ) <nl> let trivia_kinds = <nl> [ " IgnoreError " ; " ignore_error " ] ; <nl> [ " FallThrough " ; " fall_through " ] ; <nl> [ " ExtraTokenError " ; " extra_token_error " ] ; <nl> - [ " AfterHaltCompiler " ; " after_halt_compiler " ] ; <nl> ] <nl> <nl> let escape_token_text t = <nl> mmm a / hphp / hack / src / parser / schema / schema_definition . ml <nl> ppp b / hphp / hack / src / parser / schema / schema_definition . ml <nl> let schema : schema_node list = <nl> ( " right_paren " , Token ) ; <nl> ] ; <nl> } ; <nl> - { <nl> - kind_name = " HaltCompilerExpression " ; <nl> - type_name = " halt_compiler_expression " ; <nl> - func_name = " halt_compiler_expression " ; <nl> - description = " halt_compiler_expression " ; <nl> - prefix = " halt_compiler " ; <nl> - aggregates = [ Expression ; ConstructorExpression ; LambdaBody ] ; <nl> - fields = <nl> - [ <nl> - ( " keyword " , Token ) ; <nl> - ( " left_paren " , Token ) ; <nl> - ( " argument_list " , ZeroOrMore ( Aggregate Expression ) ) ; <nl> - ( " right_paren " , Token ) ; <nl> - ] ; <nl> - } ; <nl> { <nl> kind_name = " IssetExpression " ; <nl> type_name = " isset_expression " ; <nl> mmm a / hphp / hack / src / parser / schema / token_schema_definition . ml <nl> ppp b / hphp / hack / src / parser / schema / token_schema_definition . ml <nl> let given_text_tokens = <nl> make_token_node " Global " " global " ( ) ; <nl> make_token_node " Concurrent " " concurrent " ( ) ; <nl> make_token_node " Goto " " goto " ( ) ; <nl> - make_token_node " HaltCompiler " " __halt_compiler " ( ) ; <nl> make_token_node " If " " if " ( ) ; <nl> make_token_node " Implements " " implements " ( ) ; <nl> make_token_node " Include " " include " ( ) ; <nl> mmm a / hphp / hack / src / parser / scour_comment . rs <nl> ppp b / hphp / hack / src / parser / scour_comment . rs <nl> where <nl> ) - > ScouredComments { <nl> use TriviaKind : : * ; <nl> match t . kind ( ) { <nl> - WhiteSpace | EndOfLine | FallThrough | ExtraTokenError | AfterHaltCompiler = > acc , <nl> + WhiteSpace | EndOfLine | FallThrough | ExtraTokenError = > acc , <nl> DelimitedComment = > { <nl> let start = t . start_offset ( ) + 2 ; <nl> let end = t . end_offset ( ) ; <nl> mmm a / hphp / hack / src / parser / smart_constructors . rs <nl> ppp b / hphp / hack / src / parser / smart_constructors . rs <nl> pub trait NodeType { <nl> fn is_function_call_expression ( & self ) - > bool ; <nl> fn is_list_expression ( & self ) - > bool ; <nl> fn is_name ( & self ) - > bool ; <nl> - fn is_halt_compiler_expression ( & self ) - > bool ; <nl> fn is_prefix_unary_expression ( & self ) - > bool ; <nl> } <nl> <nl> impl < R > NodeType for ( SyntaxKind , R ) { <nl> } <nl> } <nl> <nl> - fn is_halt_compiler_expression ( & self ) - > bool { <nl> - match & self . 0 { <nl> - SyntaxKind : : HaltCompilerExpression { . . } = > true , <nl> - _ = > false , <nl> - } <nl> - } <nl> - <nl> fn is_prefix_unary_expression ( & self ) - > bool { <nl> match & self . 0 { <nl> SyntaxKind : : PrefixUnaryExpression { . . } = > true , <nl> mmm a / hphp / hack / src / parser / smart_constructors_generated . rs <nl> ppp b / hphp / hack / src / parser / smart_constructors_generated . rs <nl> pub trait SmartConstructors < ' src , State > : Clone { <nl> fn make_conditional_expression ( & mut self , arg0 : Self : : R , arg1 : Self : : R , arg2 : Self : : R , arg3 : Self : : R , arg4 : Self : : R ) - > Self : : R ; <nl> fn make_eval_expression ( & mut self , arg0 : Self : : R , arg1 : Self : : R , arg2 : Self : : R , arg3 : Self : : R ) - > Self : : R ; <nl> fn make_define_expression ( & mut self , arg0 : Self : : R , arg1 : Self : : R , arg2 : Self : : R , arg3 : Self : : R ) - > Self : : R ; <nl> - fn make_halt_compiler_expression ( & mut self , arg0 : Self : : R , arg1 : Self : : R , arg2 : Self : : R , arg3 : Self : : R ) - > Self : : R ; <nl> fn make_isset_expression ( & mut self , arg0 : Self : : R , arg1 : Self : : R , arg2 : Self : : R , arg3 : Self : : R ) - > Self : : R ; <nl> fn make_function_call_expression ( & mut self , arg0 : Self : : R , arg1 : Self : : R , arg2 : Self : : R , arg3 : Self : : R , arg4 : Self : : R ) - > Self : : R ; <nl> fn make_function_pointer_expression ( & mut self , arg0 : Self : : R , arg1 : Self : : R ) - > Self : : R ; <nl> mmm a / hphp / hack / src / parser / smart_constructors_wrappers . rs <nl> ppp b / hphp / hack / src / parser / smart_constructors_wrappers . rs <nl> where S : SmartConstructors < ' src , State > { <nl> fn make_define_expression ( & mut self , arg0 : Self : : R , arg1 : Self : : R , arg2 : Self : : R , arg3 : Self : : R ) - > Self : : R { <nl> compose ( SyntaxKind : : DefineExpression , self . s . make_define_expression ( arg0 . 1 , arg1 . 1 , arg2 . 1 , arg3 . 1 ) ) <nl> } <nl> - fn make_halt_compiler_expression ( & mut self , arg0 : Self : : R , arg1 : Self : : R , arg2 : Self : : R , arg3 : Self : : R ) - > Self : : R { <nl> - compose ( SyntaxKind : : HaltCompilerExpression , self . s . make_halt_compiler_expression ( arg0 . 1 , arg1 . 1 , arg2 . 1 , arg3 . 1 ) ) <nl> - } <nl> fn make_isset_expression ( & mut self , arg0 : Self : : R , arg1 : Self : : R , arg2 : Self : : R , arg3 : Self : : R ) - > Self : : R { <nl> compose ( SyntaxKind : : IssetExpression , self . s . make_isset_expression ( arg0 . 1 , arg1 . 1 , arg2 . 1 , arg3 . 1 ) ) <nl> } <nl> mmm a / hphp / hack / src / parser / syntax_error . rs <nl> ppp b / hphp / hack / src / parser / syntax_error . rs <nl> pub const parent_static_const_decl : Error = <nl> Cow : : Borrowed ( " Cannot use static or parent : : class in constant declaration " ) ; <nl> pub const no_async_before_lambda_body : Error = <nl> Cow : : Borrowed ( " Don ' t use ( ) = = > async { . . . } . Instead , use : async ( ) = = > { . . . } " ) ; <nl> - pub const halt_compiler_top_level_only : Error = <nl> - Cow : : Borrowed ( " __halt_compiler function should appear only at the top level " ) ; <nl> pub fn invalid_number_of_args ( name : & str , n : usize ) - > Error { <nl> Cow : : Owned ( format ! ( <nl> " Method { } must take exactly { } arguments " , <nl> pub const method_calls_on_xhp_attributes : Error = <nl> Cow : : Borrowed ( " Method calls are not allowed on XHP attributes " ) ; <nl> pub const method_calls_on_xhp_expression : Error = <nl> Cow : : Borrowed ( " Please add parentheses around the XHP component " ) ; <nl> - pub const no_args_in_halt_compiler : Error = <nl> - Cow : : Borrowed ( " __halt_compiler function does not accept any arguments " ) ; <nl> pub fn class_with_abstract_method ( name : & str ) - > Error { <nl> Cow : : Owned ( format ! ( <nl> concat ! ( <nl> pub fn invalid_typehint_alias ( alias : & str , hint : & str ) - > Error { <nl> hint . to_string ( ) , <nl> ) ) <nl> } <nl> - pub const halt_compiler_is_disabled : Error = <nl> - Cow : : Borrowed ( " __halt_compiler ( ) is not supported in Hack " ) ; <nl> <nl> pub const function_pointer_bad_recv : Error = <nl> Cow : : Borrowed ( " Function pointers must be explicitly specified " ) ; <nl> mmm a / hphp / hack / src / parser / syntax_generated . rs <nl> ppp b / hphp / hack / src / parser / syntax_generated . rs <nl> where <nl> Self : : make ( syntax , value ) <nl> } <nl> <nl> - fn make_halt_compiler_expression ( _ : & C , halt_compiler_keyword : Self , halt_compiler_left_paren : Self , halt_compiler_argument_list : Self , halt_compiler_right_paren : Self ) - > Self { <nl> - let syntax = SyntaxVariant : : HaltCompilerExpression ( Box : : new ( HaltCompilerExpressionChildren { <nl> - halt_compiler_keyword , <nl> - halt_compiler_left_paren , <nl> - halt_compiler_argument_list , <nl> - halt_compiler_right_paren , <nl> - } ) ) ; <nl> - let value = V : : from_syntax ( & syntax ) ; <nl> - Self : : make ( syntax , value ) <nl> - } <nl> - <nl> fn make_isset_expression ( _ : & C , isset_keyword : Self , isset_left_paren : Self , isset_argument_list : Self , isset_right_paren : Self ) - > Self { <nl> let syntax = SyntaxVariant : : IssetExpression ( Box : : new ( IssetExpressionChildren { <nl> isset_keyword , <nl> where <nl> let acc = f ( define_right_paren , acc ) ; <nl> acc <nl> } , <nl> - SyntaxVariant : : HaltCompilerExpression ( x ) = > { <nl> - let HaltCompilerExpressionChildren { halt_compiler_keyword , halt_compiler_left_paren , halt_compiler_argument_list , halt_compiler_right_paren } = * x ; <nl> - let acc = f ( halt_compiler_keyword , acc ) ; <nl> - let acc = f ( halt_compiler_left_paren , acc ) ; <nl> - let acc = f ( halt_compiler_argument_list , acc ) ; <nl> - let acc = f ( halt_compiler_right_paren , acc ) ; <nl> - acc <nl> - } , <nl> SyntaxVariant : : IssetExpression ( x ) = > { <nl> let IssetExpressionChildren { isset_keyword , isset_left_paren , isset_argument_list , isset_right_paren } = * x ; <nl> let acc = f ( isset_keyword , acc ) ; <nl> where <nl> SyntaxVariant : : ConditionalExpression { . . } = > SyntaxKind : : ConditionalExpression , <nl> SyntaxVariant : : EvalExpression { . . } = > SyntaxKind : : EvalExpression , <nl> SyntaxVariant : : DefineExpression { . . } = > SyntaxKind : : DefineExpression , <nl> - SyntaxVariant : : HaltCompilerExpression { . . } = > SyntaxKind : : HaltCompilerExpression , <nl> SyntaxVariant : : IssetExpression { . . } = > SyntaxKind : : IssetExpression , <nl> SyntaxVariant : : FunctionCallExpression { . . } = > SyntaxKind : : FunctionCallExpression , <nl> SyntaxVariant : : FunctionPointerExpression { . . } = > SyntaxKind : : FunctionPointerExpression , <nl> where <nl> define_left_paren : ts . pop ( ) . unwrap ( ) , <nl> define_keyword : ts . pop ( ) . unwrap ( ) , <nl> <nl> - } ) ) , <nl> - ( SyntaxKind : : HaltCompilerExpression , 4 ) = > SyntaxVariant : : HaltCompilerExpression ( Box : : new ( HaltCompilerExpressionChildren { <nl> - halt_compiler_right_paren : ts . pop ( ) . unwrap ( ) , <nl> - halt_compiler_argument_list : ts . pop ( ) . unwrap ( ) , <nl> - halt_compiler_left_paren : ts . pop ( ) . unwrap ( ) , <nl> - halt_compiler_keyword : ts . pop ( ) . unwrap ( ) , <nl> - <nl> } ) ) , <nl> ( SyntaxKind : : IssetExpression , 4 ) = > SyntaxVariant : : IssetExpression ( Box : : new ( IssetExpressionChildren { <nl> isset_right_paren : ts . pop ( ) . unwrap ( ) , <nl> pub struct DefineExpressionChildren < T , V > { <nl> pub define_right_paren : Syntax < T , V > , <nl> } <nl> <nl> - # [ derive ( Debug , Clone ) ] <nl> - pub struct HaltCompilerExpressionChildren < T , V > { <nl> - pub halt_compiler_keyword : Syntax < T , V > , <nl> - pub halt_compiler_left_paren : Syntax < T , V > , <nl> - pub halt_compiler_argument_list : Syntax < T , V > , <nl> - pub halt_compiler_right_paren : Syntax < T , V > , <nl> - } <nl> - <nl> # [ derive ( Debug , Clone ) ] <nl> pub struct IssetExpressionChildren < T , V > { <nl> pub isset_keyword : Syntax < T , V > , <nl> pub enum SyntaxVariant < T , V > { <nl> ConditionalExpression ( Box < ConditionalExpressionChildren < T , V > > ) , <nl> EvalExpression ( Box < EvalExpressionChildren < T , V > > ) , <nl> DefineExpression ( Box < DefineExpressionChildren < T , V > > ) , <nl> - HaltCompilerExpression ( Box < HaltCompilerExpressionChildren < T , V > > ) , <nl> IssetExpression ( Box < IssetExpressionChildren < T , V > > ) , <nl> FunctionCallExpression ( Box < FunctionCallExpressionChildren < T , V > > ) , <nl> FunctionPointerExpression ( Box < FunctionPointerExpressionChildren < T , V > > ) , <nl> impl < ' a , T , V > SyntaxChildrenIterator < ' a , T , V > { <nl> } <nl> } ) <nl> } , <nl> - HaltCompilerExpression ( x ) = > { <nl> - get_index ( 4 ) . and_then ( | index | { match index { <nl> - 0 = > Some ( & x . halt_compiler_keyword ) , <nl> - 1 = > Some ( & x . halt_compiler_left_paren ) , <nl> - 2 = > Some ( & x . halt_compiler_argument_list ) , <nl> - 3 = > Some ( & x . halt_compiler_right_paren ) , <nl> - _ = > None , <nl> - } <nl> - } ) <nl> - } , <nl> IssetExpression ( x ) = > { <nl> get_index ( 4 ) . and_then ( | index | { match index { <nl> 0 = > Some ( & x . isset_keyword ) , <nl> mmm a / hphp / hack / src / parser / syntax_kind . rs <nl> ppp b / hphp / hack / src / parser / syntax_kind . rs <nl> pub enum SyntaxKind { <nl> ConditionalExpression , <nl> EvalExpression , <nl> DefineExpression , <nl> - HaltCompilerExpression , <nl> IssetExpression , <nl> FunctionCallExpression , <nl> FunctionPointerExpression , <nl> impl SyntaxKind { <nl> SyntaxKind : : ConditionalExpression = > " conditional_expression " , <nl> SyntaxKind : : EvalExpression = > " eval_expression " , <nl> SyntaxKind : : DefineExpression = > " define_expression " , <nl> - SyntaxKind : : HaltCompilerExpression = > " halt_compiler_expression " , <nl> SyntaxKind : : IssetExpression = > " isset_expression " , <nl> SyntaxKind : : FunctionCallExpression = > " function_call_expression " , <nl> SyntaxKind : : FunctionPointerExpression = > " function_pointer_expression " , <nl> impl SyntaxKind { <nl> SyntaxKind : : ConditionalExpression = > 97 , <nl> SyntaxKind : : EvalExpression = > 98 , <nl> SyntaxKind : : DefineExpression = > 99 , <nl> - SyntaxKind : : HaltCompilerExpression = > 100 , <nl> - SyntaxKind : : IssetExpression = > 101 , <nl> - SyntaxKind : : FunctionCallExpression = > 102 , <nl> - SyntaxKind : : FunctionPointerExpression = > 103 , <nl> - SyntaxKind : : ParenthesizedExpression = > 104 , <nl> - SyntaxKind : : BracedExpression = > 105 , <nl> - SyntaxKind : : EmbeddedBracedExpression = > 106 , <nl> - SyntaxKind : : ListExpression = > 107 , <nl> - SyntaxKind : : CollectionLiteralExpression = > 108 , <nl> - SyntaxKind : : ObjectCreationExpression = > 109 , <nl> - SyntaxKind : : ConstructorCall = > 110 , <nl> - SyntaxKind : : RecordCreationExpression = > 111 , <nl> - SyntaxKind : : ArrayIntrinsicExpression = > 112 , <nl> - SyntaxKind : : DarrayIntrinsicExpression = > 113 , <nl> - SyntaxKind : : DictionaryIntrinsicExpression = > 114 , <nl> - SyntaxKind : : KeysetIntrinsicExpression = > 115 , <nl> - SyntaxKind : : VarrayIntrinsicExpression = > 116 , <nl> - SyntaxKind : : VectorIntrinsicExpression = > 117 , <nl> - SyntaxKind : : ElementInitializer = > 118 , <nl> - SyntaxKind : : SubscriptExpression = > 119 , <nl> - SyntaxKind : : EmbeddedSubscriptExpression = > 120 , <nl> - SyntaxKind : : AwaitableCreationExpression = > 121 , <nl> - SyntaxKind : : XHPChildrenDeclaration = > 122 , <nl> - SyntaxKind : : XHPChildrenParenthesizedList = > 123 , <nl> - SyntaxKind : : XHPCategoryDeclaration = > 124 , <nl> - SyntaxKind : : XHPEnumType = > 125 , <nl> - SyntaxKind : : XHPLateinit = > 126 , <nl> - SyntaxKind : : XHPRequired = > 127 , <nl> - SyntaxKind : : XHPClassAttributeDeclaration = > 128 , <nl> - SyntaxKind : : XHPClassAttribute = > 129 , <nl> - SyntaxKind : : XHPSimpleClassAttribute = > 130 , <nl> - SyntaxKind : : XHPSimpleAttribute = > 131 , <nl> - SyntaxKind : : XHPSpreadAttribute = > 132 , <nl> - SyntaxKind : : XHPOpen = > 133 , <nl> - SyntaxKind : : XHPExpression = > 134 , <nl> - SyntaxKind : : XHPClose = > 135 , <nl> - SyntaxKind : : TypeConstant = > 136 , <nl> - SyntaxKind : : PUAccess = > 137 , <nl> - SyntaxKind : : VectorTypeSpecifier = > 138 , <nl> - SyntaxKind : : KeysetTypeSpecifier = > 139 , <nl> - SyntaxKind : : TupleTypeExplicitSpecifier = > 140 , <nl> - SyntaxKind : : VarrayTypeSpecifier = > 141 , <nl> - SyntaxKind : : VectorArrayTypeSpecifier = > 142 , <nl> - SyntaxKind : : TypeParameter = > 143 , <nl> - SyntaxKind : : TypeConstraint = > 144 , <nl> - SyntaxKind : : DarrayTypeSpecifier = > 145 , <nl> - SyntaxKind : : MapArrayTypeSpecifier = > 146 , <nl> - SyntaxKind : : DictionaryTypeSpecifier = > 147 , <nl> - SyntaxKind : : ClosureTypeSpecifier = > 148 , <nl> - SyntaxKind : : ClosureParameterTypeSpecifier = > 149 , <nl> - SyntaxKind : : ClassnameTypeSpecifier = > 150 , <nl> - SyntaxKind : : FieldSpecifier = > 151 , <nl> - SyntaxKind : : FieldInitializer = > 152 , <nl> - SyntaxKind : : ShapeTypeSpecifier = > 153 , <nl> - SyntaxKind : : ShapeExpression = > 154 , <nl> - SyntaxKind : : TupleExpression = > 155 , <nl> - SyntaxKind : : GenericTypeSpecifier = > 156 , <nl> - SyntaxKind : : NullableTypeSpecifier = > 157 , <nl> - SyntaxKind : : LikeTypeSpecifier = > 158 , <nl> - SyntaxKind : : SoftTypeSpecifier = > 159 , <nl> - SyntaxKind : : AttributizedSpecifier = > 160 , <nl> - SyntaxKind : : ReifiedTypeArgument = > 161 , <nl> - SyntaxKind : : TypeArguments = > 162 , <nl> - SyntaxKind : : TypeParameters = > 163 , <nl> - SyntaxKind : : TupleTypeSpecifier = > 164 , <nl> - SyntaxKind : : UnionTypeSpecifier = > 165 , <nl> - SyntaxKind : : IntersectionTypeSpecifier = > 166 , <nl> - SyntaxKind : : ErrorSyntax = > 167 , <nl> - SyntaxKind : : ListItem = > 168 , <nl> - SyntaxKind : : PocketAtomExpression = > 169 , <nl> - SyntaxKind : : PocketIdentifierExpression = > 170 , <nl> - SyntaxKind : : PocketAtomMappingDeclaration = > 171 , <nl> - SyntaxKind : : PocketEnumDeclaration = > 172 , <nl> - SyntaxKind : : PocketFieldTypeExprDeclaration = > 173 , <nl> - SyntaxKind : : PocketFieldTypeDeclaration = > 174 , <nl> - SyntaxKind : : PocketMappingIdDeclaration = > 175 , <nl> - SyntaxKind : : PocketMappingTypeDeclaration = > 176 , <nl> + SyntaxKind : : IssetExpression = > 100 , <nl> + SyntaxKind : : FunctionCallExpression = > 101 , <nl> + SyntaxKind : : FunctionPointerExpression = > 102 , <nl> + SyntaxKind : : ParenthesizedExpression = > 103 , <nl> + SyntaxKind : : BracedExpression = > 104 , <nl> + SyntaxKind : : EmbeddedBracedExpression = > 105 , <nl> + SyntaxKind : : ListExpression = > 106 , <nl> + SyntaxKind : : CollectionLiteralExpression = > 107 , <nl> + SyntaxKind : : ObjectCreationExpression = > 108 , <nl> + SyntaxKind : : ConstructorCall = > 109 , <nl> + SyntaxKind : : RecordCreationExpression = > 110 , <nl> + SyntaxKind : : ArrayIntrinsicExpression = > 111 , <nl> + SyntaxKind : : DarrayIntrinsicExpression = > 112 , <nl> + SyntaxKind : : DictionaryIntrinsicExpression = > 113 , <nl> + SyntaxKind : : KeysetIntrinsicExpression = > 114 , <nl> + SyntaxKind : : VarrayIntrinsicExpression = > 115 , <nl> + SyntaxKind : : VectorIntrinsicExpression = > 116 , <nl> + SyntaxKind : : ElementInitializer = > 117 , <nl> + SyntaxKind : : SubscriptExpression = > 118 , <nl> + SyntaxKind : : EmbeddedSubscriptExpression = > 119 , <nl> + SyntaxKind : : AwaitableCreationExpression = > 120 , <nl> + SyntaxKind : : XHPChildrenDeclaration = > 121 , <nl> + SyntaxKind : : XHPChildrenParenthesizedList = > 122 , <nl> + SyntaxKind : : XHPCategoryDeclaration = > 123 , <nl> + SyntaxKind : : XHPEnumType = > 124 , <nl> + SyntaxKind : : XHPLateinit = > 125 , <nl> + SyntaxKind : : XHPRequired = > 126 , <nl> + SyntaxKind : : XHPClassAttributeDeclaration = > 127 , <nl> + SyntaxKind : : XHPClassAttribute = > 128 , <nl> + SyntaxKind : : XHPSimpleClassAttribute = > 129 , <nl> + SyntaxKind : : XHPSimpleAttribute = > 130 , <nl> + SyntaxKind : : XHPSpreadAttribute = > 131 , <nl> + SyntaxKind : : XHPOpen = > 132 , <nl> + SyntaxKind : : XHPExpression = > 133 , <nl> + SyntaxKind : : XHPClose = > 134 , <nl> + SyntaxKind : : TypeConstant = > 135 , <nl> + SyntaxKind : : PUAccess = > 136 , <nl> + SyntaxKind : : VectorTypeSpecifier = > 137 , <nl> + SyntaxKind : : KeysetTypeSpecifier = > 138 , <nl> + SyntaxKind : : TupleTypeExplicitSpecifier = > 139 , <nl> + SyntaxKind : : VarrayTypeSpecifier = > 140 , <nl> + SyntaxKind : : VectorArrayTypeSpecifier = > 141 , <nl> + SyntaxKind : : TypeParameter = > 142 , <nl> + SyntaxKind : : TypeConstraint = > 143 , <nl> + SyntaxKind : : DarrayTypeSpecifier = > 144 , <nl> + SyntaxKind : : MapArrayTypeSpecifier = > 145 , <nl> + SyntaxKind : : DictionaryTypeSpecifier = > 146 , <nl> + SyntaxKind : : ClosureTypeSpecifier = > 147 , <nl> + SyntaxKind : : ClosureParameterTypeSpecifier = > 148 , <nl> + SyntaxKind : : ClassnameTypeSpecifier = > 149 , <nl> + SyntaxKind : : FieldSpecifier = > 150 , <nl> + SyntaxKind : : FieldInitializer = > 151 , <nl> + SyntaxKind : : ShapeTypeSpecifier = > 152 , <nl> + SyntaxKind : : ShapeExpression = > 153 , <nl> + SyntaxKind : : TupleExpression = > 154 , <nl> + SyntaxKind : : GenericTypeSpecifier = > 155 , <nl> + SyntaxKind : : NullableTypeSpecifier = > 156 , <nl> + SyntaxKind : : LikeTypeSpecifier = > 157 , <nl> + SyntaxKind : : SoftTypeSpecifier = > 158 , <nl> + SyntaxKind : : AttributizedSpecifier = > 159 , <nl> + SyntaxKind : : ReifiedTypeArgument = > 160 , <nl> + SyntaxKind : : TypeArguments = > 161 , <nl> + SyntaxKind : : TypeParameters = > 162 , <nl> + SyntaxKind : : TupleTypeSpecifier = > 163 , <nl> + SyntaxKind : : UnionTypeSpecifier = > 164 , <nl> + SyntaxKind : : IntersectionTypeSpecifier = > 165 , <nl> + SyntaxKind : : ErrorSyntax = > 166 , <nl> + SyntaxKind : : ListItem = > 167 , <nl> + SyntaxKind : : PocketAtomExpression = > 168 , <nl> + SyntaxKind : : PocketIdentifierExpression = > 169 , <nl> + SyntaxKind : : PocketAtomMappingDeclaration = > 170 , <nl> + SyntaxKind : : PocketEnumDeclaration = > 171 , <nl> + SyntaxKind : : PocketFieldTypeExprDeclaration = > 172 , <nl> + SyntaxKind : : PocketFieldTypeDeclaration = > 173 , <nl> + SyntaxKind : : PocketMappingIdDeclaration = > 174 , <nl> + SyntaxKind : : PocketMappingTypeDeclaration = > 175 , <nl> } <nl> } <nl> } <nl> mmm a / hphp / hack / src / parser / syntax_sig . ml <nl> ppp b / hphp / hack / src / parser / syntax_sig . ml <nl> module type Syntax_S = sig <nl> ; define_argument_list : t <nl> ; define_right_paren : t <nl> } <nl> - | HaltCompilerExpression of <nl> - { halt_compiler_keyword : t <nl> - ; halt_compiler_left_paren : t <nl> - ; halt_compiler_argument_list : t <nl> - ; halt_compiler_right_paren : t <nl> - } <nl> | IssetExpression of <nl> { isset_keyword : t <nl> ; isset_left_paren : t <nl> module type Syntax_S = sig <nl> val make_conditional_expression : t - > t - > t - > t - > t - > t <nl> val make_eval_expression : t - > t - > t - > t - > t <nl> val make_define_expression : t - > t - > t - > t - > t <nl> - val make_halt_compiler_expression : t - > t - > t - > t - > t <nl> val make_isset_expression : t - > t - > t - > t - > t <nl> val make_function_call_expression : t - > t - > t - > t - > t - > t <nl> val make_function_pointer_expression : t - > t - > t <nl> module type Syntax_S = sig <nl> val is_conditional_expression : t - > bool <nl> val is_eval_expression : t - > bool <nl> val is_define_expression : t - > bool <nl> - val is_halt_compiler_expression : t - > bool <nl> val is_isset_expression : t - > bool <nl> val is_function_call_expression : t - > bool <nl> val is_function_pointer_expression : t - > bool <nl> mmm a / hphp / hack / src / parser / syntax_smart_constructors_generated . rs <nl> ppp b / hphp / hack / src / parser / syntax_smart_constructors_generated . rs <nl> where <nl> Self : : R : : make_define_expression ( self . state_mut ( ) , arg0 , arg1 , arg2 , arg3 ) <nl> } <nl> <nl> - fn make_halt_compiler_expression ( & mut self , arg0 : Self : : R , arg1 : Self : : R , arg2 : Self : : R , arg3 : Self : : R ) - > Self : : R { <nl> - self . state_mut ( ) . next ( & [ & arg0 , & arg1 , & arg2 , & arg3 ] ) ; <nl> - Self : : R : : make_halt_compiler_expression ( self . state_mut ( ) , arg0 , arg1 , arg2 , arg3 ) <nl> - } <nl> - <nl> fn make_isset_expression ( & mut self , arg0 : Self : : R , arg1 : Self : : R , arg2 : Self : : R , arg3 : Self : : R ) - > Self : : R { <nl> self . state_mut ( ) . next ( & [ & arg0 , & arg1 , & arg2 , & arg3 ] ) ; <nl> Self : : R : : make_isset_expression ( self . state_mut ( ) , arg0 , arg1 , arg2 , arg3 ) <nl> mmm a / hphp / hack / src / parser / syntax_type . rs <nl> ppp b / hphp / hack / src / parser / syntax_type . rs <nl> pub trait SyntaxType < ' a , C > : SyntaxTypeBase < ' a , C > <nl> fn make_conditional_expression ( ctx : & C , conditional_test : Self , conditional_question : Self , conditional_consequence : Self , conditional_colon : Self , conditional_alternative : Self ) - > Self ; <nl> fn make_eval_expression ( ctx : & C , eval_keyword : Self , eval_left_paren : Self , eval_argument : Self , eval_right_paren : Self ) - > Self ; <nl> fn make_define_expression ( ctx : & C , define_keyword : Self , define_left_paren : Self , define_argument_list : Self , define_right_paren : Self ) - > Self ; <nl> - fn make_halt_compiler_expression ( ctx : & C , halt_compiler_keyword : Self , halt_compiler_left_paren : Self , halt_compiler_argument_list : Self , halt_compiler_right_paren : Self ) - > Self ; <nl> fn make_isset_expression ( ctx : & C , isset_keyword : Self , isset_left_paren : Self , isset_argument_list : Self , isset_right_paren : Self ) - > Self ; <nl> fn make_function_call_expression ( ctx : & C , function_call_receiver : Self , function_call_type_args : Self , function_call_left_paren : Self , function_call_argument_list : Self , function_call_right_paren : Self ) - > Self ; <nl> fn make_function_pointer_expression ( ctx : & C , function_pointer_receiver : Self , function_pointer_type_args : Self ) - > Self ; <nl> mmm a / hphp / hack / src / parser / token_kind . rs <nl> ppp b / hphp / hack / src / parser / token_kind . rs <nl> pub enum TokenKind { <nl> Global , <nl> Concurrent , <nl> Goto , <nl> - HaltCompiler , <nl> If , <nl> Implements , <nl> Include , <nl> impl TokenKind { <nl> TokenKind : : Global = > " global " , <nl> TokenKind : : Concurrent = > " concurrent " , <nl> TokenKind : : Goto = > " goto " , <nl> - TokenKind : : HaltCompiler = > " __halt_compiler " , <nl> TokenKind : : If = > " if " , <nl> TokenKind : : Implements = > " implements " , <nl> TokenKind : : Include = > " include " , <nl> impl TokenKind { <nl> " global " = > Some ( TokenKind : : Global ) , <nl> " concurrent " = > Some ( TokenKind : : Concurrent ) , <nl> " goto " = > Some ( TokenKind : : Goto ) , <nl> - " __halt_compiler " = > Some ( TokenKind : : HaltCompiler ) , <nl> " if " = > Some ( TokenKind : : If ) , <nl> " implements " = > Some ( TokenKind : : Implements ) , <nl> " include " = > Some ( TokenKind : : Include ) , <nl> impl TokenKind { <nl> TokenKind : : Global = > 51 , <nl> TokenKind : : Concurrent = > 52 , <nl> TokenKind : : Goto = > 53 , <nl> - TokenKind : : HaltCompiler = > 54 , <nl> - TokenKind : : If = > 55 , <nl> - TokenKind : : Implements = > 56 , <nl> - TokenKind : : Include = > 57 , <nl> - TokenKind : : Include_once = > 58 , <nl> - TokenKind : : Inout = > 59 , <nl> - TokenKind : : Instanceof = > 60 , <nl> - TokenKind : : Insteadof = > 61 , <nl> - TokenKind : : Int = > 62 , <nl> - TokenKind : : Integer = > 63 , <nl> - TokenKind : : Interface = > 64 , <nl> - TokenKind : : Is = > 65 , <nl> - TokenKind : : Isset = > 66 , <nl> - TokenKind : : Keyset = > 67 , <nl> - TokenKind : : List = > 68 , <nl> - TokenKind : : Mixed = > 69 , <nl> - TokenKind : : Namespace = > 70 , <nl> - TokenKind : : New = > 71 , <nl> - TokenKind : : Newtype = > 72 , <nl> - TokenKind : : Noreturn = > 73 , <nl> - TokenKind : : Num = > 74 , <nl> - TokenKind : : Object = > 75 , <nl> - TokenKind : : Parent = > 76 , <nl> - TokenKind : : Print = > 77 , <nl> - TokenKind : : Private = > 78 , <nl> - TokenKind : : Protected = > 79 , <nl> - TokenKind : : Public = > 80 , <nl> - TokenKind : : Real = > 81 , <nl> - TokenKind : : Reify = > 82 , <nl> - TokenKind : : Record = > 83 , <nl> - TokenKind : : RecordDec = > 84 , <nl> - TokenKind : : Require = > 85 , <nl> - TokenKind : : Require_once = > 86 , <nl> - TokenKind : : Required = > 87 , <nl> - TokenKind : : Lateinit = > 88 , <nl> - TokenKind : : Resource = > 89 , <nl> - TokenKind : : Return = > 90 , <nl> - TokenKind : : SelfToken = > 91 , <nl> - TokenKind : : Shape = > 92 , <nl> - TokenKind : : Static = > 93 , <nl> - TokenKind : : String = > 94 , <nl> - TokenKind : : Super = > 95 , <nl> - TokenKind : : Suspend = > 96 , <nl> - TokenKind : : Switch = > 97 , <nl> - TokenKind : : This = > 98 , <nl> - TokenKind : : Throw = > 99 , <nl> - TokenKind : : Trait = > 100 , <nl> - TokenKind : : Try = > 101 , <nl> - TokenKind : : Tuple = > 102 , <nl> - TokenKind : : Type = > 103 , <nl> - TokenKind : : Unset = > 104 , <nl> - TokenKind : : Use = > 105 , <nl> - TokenKind : : Using = > 106 , <nl> - TokenKind : : Var = > 107 , <nl> - TokenKind : : Varray = > 108 , <nl> - TokenKind : : Vec = > 109 , <nl> - TokenKind : : Void = > 110 , <nl> - TokenKind : : Where = > 111 , <nl> - TokenKind : : While = > 112 , <nl> - TokenKind : : Yield = > 113 , <nl> - TokenKind : : NullLiteral = > 114 , <nl> - TokenKind : : LeftBracket = > 115 , <nl> - TokenKind : : RightBracket = > 116 , <nl> - TokenKind : : LeftParen = > 117 , <nl> - TokenKind : : RightParen = > 118 , <nl> - TokenKind : : LeftBrace = > 119 , <nl> - TokenKind : : RightBrace = > 120 , <nl> - TokenKind : : Dot = > 121 , <nl> - TokenKind : : MinusGreaterThan = > 122 , <nl> - TokenKind : : PlusPlus = > 123 , <nl> - TokenKind : : MinusMinus = > 124 , <nl> - TokenKind : : StarStar = > 125 , <nl> - TokenKind : : Star = > 126 , <nl> - TokenKind : : Plus = > 127 , <nl> - TokenKind : : Minus = > 128 , <nl> - TokenKind : : Tilde = > 129 , <nl> - TokenKind : : Exclamation = > 130 , <nl> - TokenKind : : Dollar = > 131 , <nl> - TokenKind : : Slash = > 132 , <nl> - TokenKind : : Percent = > 133 , <nl> - TokenKind : : LessThanEqualGreaterThan = > 134 , <nl> - TokenKind : : LessThanLessThan = > 135 , <nl> - TokenKind : : GreaterThanGreaterThan = > 136 , <nl> - TokenKind : : LessThan = > 137 , <nl> - TokenKind : : GreaterThan = > 138 , <nl> - TokenKind : : LessThanEqual = > 139 , <nl> - TokenKind : : GreaterThanEqual = > 140 , <nl> - TokenKind : : EqualEqual = > 141 , <nl> - TokenKind : : EqualEqualEqual = > 142 , <nl> - TokenKind : : ExclamationEqual = > 143 , <nl> - TokenKind : : ExclamationEqualEqual = > 144 , <nl> - TokenKind : : Carat = > 145 , <nl> - TokenKind : : Bar = > 146 , <nl> - TokenKind : : Ampersand = > 147 , <nl> - TokenKind : : AmpersandAmpersand = > 148 , <nl> - TokenKind : : BarBar = > 149 , <nl> - TokenKind : : Question = > 150 , <nl> - TokenKind : : QuestionAs = > 151 , <nl> - TokenKind : : QuestionColon = > 152 , <nl> - TokenKind : : QuestionQuestion = > 153 , <nl> - TokenKind : : QuestionQuestionEqual = > 154 , <nl> - TokenKind : : Colon = > 155 , <nl> - TokenKind : : Semicolon = > 156 , <nl> - TokenKind : : Equal = > 157 , <nl> - TokenKind : : StarStarEqual = > 158 , <nl> - TokenKind : : StarEqual = > 159 , <nl> - TokenKind : : SlashEqual = > 160 , <nl> - TokenKind : : PercentEqual = > 161 , <nl> - TokenKind : : PlusEqual = > 162 , <nl> - TokenKind : : MinusEqual = > 163 , <nl> - TokenKind : : DotEqual = > 164 , <nl> - TokenKind : : LessThanLessThanEqual = > 165 , <nl> - TokenKind : : GreaterThanGreaterThanEqual = > 166 , <nl> - TokenKind : : AmpersandEqual = > 167 , <nl> - TokenKind : : CaratEqual = > 168 , <nl> - TokenKind : : BarEqual = > 169 , <nl> - TokenKind : : Comma = > 170 , <nl> - TokenKind : : At = > 171 , <nl> - TokenKind : : ColonColon = > 172 , <nl> - TokenKind : : EqualGreaterThan = > 173 , <nl> - TokenKind : : EqualEqualGreaterThan = > 174 , <nl> - TokenKind : : QuestionMinusGreaterThan = > 175 , <nl> - TokenKind : : DotDotDot = > 176 , <nl> - TokenKind : : DollarDollar = > 177 , <nl> - TokenKind : : BarGreaterThan = > 178 , <nl> - TokenKind : : SlashGreaterThan = > 179 , <nl> - TokenKind : : LessThanSlash = > 180 , <nl> - TokenKind : : LessThanQuestion = > 181 , <nl> - TokenKind : : QuestionGreaterThan = > 182 , <nl> - TokenKind : : ColonAt = > 183 , <nl> - TokenKind : : XHP = > 184 , <nl> - TokenKind : : ErrorToken = > 185 , <nl> - TokenKind : : Name = > 186 , <nl> - TokenKind : : Variable = > 187 , <nl> - TokenKind : : DecimalLiteral = > 188 , <nl> - TokenKind : : OctalLiteral = > 189 , <nl> - TokenKind : : HexadecimalLiteral = > 190 , <nl> - TokenKind : : BinaryLiteral = > 191 , <nl> - TokenKind : : FloatingLiteral = > 192 , <nl> - TokenKind : : SingleQuotedStringLiteral = > 193 , <nl> - TokenKind : : DoubleQuotedStringLiteral = > 194 , <nl> - TokenKind : : DoubleQuotedStringLiteralHead = > 195 , <nl> - TokenKind : : StringLiteralBody = > 196 , <nl> - TokenKind : : DoubleQuotedStringLiteralTail = > 197 , <nl> - TokenKind : : HeredocStringLiteral = > 198 , <nl> - TokenKind : : HeredocStringLiteralHead = > 199 , <nl> - TokenKind : : HeredocStringLiteralTail = > 200 , <nl> - TokenKind : : NowdocStringLiteral = > 201 , <nl> - TokenKind : : BooleanLiteral = > 202 , <nl> - TokenKind : : XHPCategoryName = > 203 , <nl> - TokenKind : : XHPElementName = > 204 , <nl> - TokenKind : : XHPClassName = > 205 , <nl> - TokenKind : : XHPStringLiteral = > 206 , <nl> - TokenKind : : XHPBody = > 207 , <nl> - TokenKind : : XHPComment = > 208 , <nl> - TokenKind : : Markup = > 209 , <nl> + TokenKind : : If = > 54 , <nl> + TokenKind : : Implements = > 55 , <nl> + TokenKind : : Include = > 56 , <nl> + TokenKind : : Include_once = > 57 , <nl> + TokenKind : : Inout = > 58 , <nl> + TokenKind : : Instanceof = > 59 , <nl> + TokenKind : : Insteadof = > 60 , <nl> + TokenKind : : Int = > 61 , <nl> + TokenKind : : Integer = > 62 , <nl> + TokenKind : : Interface = > 63 , <nl> + TokenKind : : Is = > 64 , <nl> + TokenKind : : Isset = > 65 , <nl> + TokenKind : : Keyset = > 66 , <nl> + TokenKind : : List = > 67 , <nl> + TokenKind : : Mixed = > 68 , <nl> + TokenKind : : Namespace = > 69 , <nl> + TokenKind : : New = > 70 , <nl> + TokenKind : : Newtype = > 71 , <nl> + TokenKind : : Noreturn = > 72 , <nl> + TokenKind : : Num = > 73 , <nl> + TokenKind : : Object = > 74 , <nl> + TokenKind : : Parent = > 75 , <nl> + TokenKind : : Print = > 76 , <nl> + TokenKind : : Private = > 77 , <nl> + TokenKind : : Protected = > 78 , <nl> + TokenKind : : Public = > 79 , <nl> + TokenKind : : Real = > 80 , <nl> + TokenKind : : Reify = > 81 , <nl> + TokenKind : : Record = > 82 , <nl> + TokenKind : : RecordDec = > 83 , <nl> + TokenKind : : Require = > 84 , <nl> + TokenKind : : Require_once = > 85 , <nl> + TokenKind : : Required = > 86 , <nl> + TokenKind : : Lateinit = > 87 , <nl> + TokenKind : : Resource = > 88 , <nl> + TokenKind : : Return = > 89 , <nl> + TokenKind : : SelfToken = > 90 , <nl> + TokenKind : : Shape = > 91 , <nl> + TokenKind : : Static = > 92 , <nl> + TokenKind : : String = > 93 , <nl> + TokenKind : : Super = > 94 , <nl> + TokenKind : : Suspend = > 95 , <nl> + TokenKind : : Switch = > 96 , <nl> + TokenKind : : This = > 97 , <nl> + TokenKind : : Throw = > 98 , <nl> + TokenKind : : Trait = > 99 , <nl> + TokenKind : : Try = > 100 , <nl> + TokenKind : : Tuple = > 101 , <nl> + TokenKind : : Type = > 102 , <nl> + TokenKind : : Unset = > 103 , <nl> + TokenKind : : Use = > 104 , <nl> + TokenKind : : Using = > 105 , <nl> + TokenKind : : Var = > 106 , <nl> + TokenKind : : Varray = > 107 , <nl> + TokenKind : : Vec = > 108 , <nl> + TokenKind : : Void = > 109 , <nl> + TokenKind : : Where = > 110 , <nl> + TokenKind : : While = > 111 , <nl> + TokenKind : : Yield = > 112 , <nl> + TokenKind : : NullLiteral = > 113 , <nl> + TokenKind : : LeftBracket = > 114 , <nl> + TokenKind : : RightBracket = > 115 , <nl> + TokenKind : : LeftParen = > 116 , <nl> + TokenKind : : RightParen = > 117 , <nl> + TokenKind : : LeftBrace = > 118 , <nl> + TokenKind : : RightBrace = > 119 , <nl> + TokenKind : : Dot = > 120 , <nl> + TokenKind : : MinusGreaterThan = > 121 , <nl> + TokenKind : : PlusPlus = > 122 , <nl> + TokenKind : : MinusMinus = > 123 , <nl> + TokenKind : : StarStar = > 124 , <nl> + TokenKind : : Star = > 125 , <nl> + TokenKind : : Plus = > 126 , <nl> + TokenKind : : Minus = > 127 , <nl> + TokenKind : : Tilde = > 128 , <nl> + TokenKind : : Exclamation = > 129 , <nl> + TokenKind : : Dollar = > 130 , <nl> + TokenKind : : Slash = > 131 , <nl> + TokenKind : : Percent = > 132 , <nl> + TokenKind : : LessThanEqualGreaterThan = > 133 , <nl> + TokenKind : : LessThanLessThan = > 134 , <nl> + TokenKind : : GreaterThanGreaterThan = > 135 , <nl> + TokenKind : : LessThan = > 136 , <nl> + TokenKind : : GreaterThan = > 137 , <nl> + TokenKind : : LessThanEqual = > 138 , <nl> + TokenKind : : GreaterThanEqual = > 139 , <nl> + TokenKind : : EqualEqual = > 140 , <nl> + TokenKind : : EqualEqualEqual = > 141 , <nl> + TokenKind : : ExclamationEqual = > 142 , <nl> + TokenKind : : ExclamationEqualEqual = > 143 , <nl> + TokenKind : : Carat = > 144 , <nl> + TokenKind : : Bar = > 145 , <nl> + TokenKind : : Ampersand = > 146 , <nl> + TokenKind : : AmpersandAmpersand = > 147 , <nl> + TokenKind : : BarBar = > 148 , <nl> + TokenKind : : Question = > 149 , <nl> + TokenKind : : QuestionAs = > 150 , <nl> + TokenKind : : QuestionColon = > 151 , <nl> + TokenKind : : QuestionQuestion = > 152 , <nl> + TokenKind : : QuestionQuestionEqual = > 153 , <nl> + TokenKind : : Colon = > 154 , <nl> + TokenKind : : Semicolon = > 155 , <nl> + TokenKind : : Equal = > 156 , <nl> + TokenKind : : StarStarEqual = > 157 , <nl> + TokenKind : : StarEqual = > 158 , <nl> + TokenKind : : SlashEqual = > 159 , <nl> + TokenKind : : PercentEqual = > 160 , <nl> + TokenKind : : PlusEqual = > 161 , <nl> + TokenKind : : MinusEqual = > 162 , <nl> + TokenKind : : DotEqual = > 163 , <nl> + TokenKind : : LessThanLessThanEqual = > 164 , <nl> + TokenKind : : GreaterThanGreaterThanEqual = > 165 , <nl> + TokenKind : : AmpersandEqual = > 166 , <nl> + TokenKind : : CaratEqual = > 167 , <nl> + TokenKind : : BarEqual = > 168 , <nl> + TokenKind : : Comma = > 169 , <nl> + TokenKind : : At = > 170 , <nl> + TokenKind : : ColonColon = > 171 , <nl> + TokenKind : : EqualGreaterThan = > 172 , <nl> + TokenKind : : EqualEqualGreaterThan = > 173 , <nl> + TokenKind : : QuestionMinusGreaterThan = > 174 , <nl> + TokenKind : : DotDotDot = > 175 , <nl> + TokenKind : : DollarDollar = > 176 , <nl> + TokenKind : : BarGreaterThan = > 177 , <nl> + TokenKind : : SlashGreaterThan = > 178 , <nl> + TokenKind : : LessThanSlash = > 179 , <nl> + TokenKind : : LessThanQuestion = > 180 , <nl> + TokenKind : : QuestionGreaterThan = > 181 , <nl> + TokenKind : : ColonAt = > 182 , <nl> + TokenKind : : XHP = > 183 , <nl> + TokenKind : : ErrorToken = > 184 , <nl> + TokenKind : : Name = > 185 , <nl> + TokenKind : : Variable = > 186 , <nl> + TokenKind : : DecimalLiteral = > 187 , <nl> + TokenKind : : OctalLiteral = > 188 , <nl> + TokenKind : : HexadecimalLiteral = > 189 , <nl> + TokenKind : : BinaryLiteral = > 190 , <nl> + TokenKind : : FloatingLiteral = > 191 , <nl> + TokenKind : : SingleQuotedStringLiteral = > 192 , <nl> + TokenKind : : DoubleQuotedStringLiteral = > 193 , <nl> + TokenKind : : DoubleQuotedStringLiteralHead = > 194 , <nl> + TokenKind : : StringLiteralBody = > 195 , <nl> + TokenKind : : DoubleQuotedStringLiteralTail = > 196 , <nl> + TokenKind : : HeredocStringLiteral = > 197 , <nl> + TokenKind : : HeredocStringLiteralHead = > 198 , <nl> + TokenKind : : HeredocStringLiteralTail = > 199 , <nl> + TokenKind : : NowdocStringLiteral = > 200 , <nl> + TokenKind : : BooleanLiteral = > 201 , <nl> + TokenKind : : XHPCategoryName = > 202 , <nl> + TokenKind : : XHPElementName = > 203 , <nl> + TokenKind : : XHPClassName = > 204 , <nl> + TokenKind : : XHPStringLiteral = > 205 , <nl> + TokenKind : : XHPBody = > 206 , <nl> + TokenKind : : XHPComment = > 207 , <nl> + TokenKind : : Markup = > 208 , <nl> } <nl> } <nl> } <nl> mmm a / hphp / hack / src / parser / trivia_kind . rs <nl> ppp b / hphp / hack / src / parser / trivia_kind . rs <nl> pub enum TriviaKind { <nl> IgnoreError , <nl> FallThrough , <nl> ExtraTokenError , <nl> - AfterHaltCompiler , <nl> } <nl> <nl> impl TriviaKind { <nl> impl TriviaKind { <nl> TriviaKind : : IgnoreError = > " ignore_error " , <nl> TriviaKind : : FallThrough = > " fall_through " , <nl> TriviaKind : : ExtraTokenError = > " extra_token_error " , <nl> - TriviaKind : : AfterHaltCompiler = > " after_halt_compiler " , <nl> } <nl> } <nl> <nl> impl TriviaKind { <nl> TriviaKind : : IgnoreError = > 5 , <nl> TriviaKind : : FallThrough = > 6 , <nl> TriviaKind : : ExtraTokenError = > 7 , <nl> - TriviaKind : : AfterHaltCompiler = > 8 , <nl> } <nl> } <nl> } <nl> mmm a / hphp / hack / src / parser / verify_smart_constructors_generated . rs <nl> ppp b / hphp / hack / src / parser / verify_smart_constructors_generated . rs <nl> impl < ' src > SmartConstructors < ' src , State > for VerifySmartConstructors <nl> r <nl> } <nl> <nl> - fn make_halt_compiler_expression ( & mut self , arg0 : Self : : R , arg1 : Self : : R , arg2 : Self : : R , arg3 : Self : : R ) - > Self : : R { <nl> - let args = arg_kinds ! ( arg0 , arg1 , arg2 , arg3 ) ; <nl> - let r = < Self as SyntaxSmartConstructors < ' src , PositionedSyntax , State > > : : make_halt_compiler_expression ( self , arg0 , arg1 , arg2 , arg3 ) ; <nl> - self . state_mut ( ) . verify ( & args ) ; <nl> - self . state_mut ( ) . push ( r . kind ( ) ) ; <nl> - r <nl> - } <nl> - <nl> fn make_isset_expression ( & mut self , arg0 : Self : : R , arg1 : Self : : R , arg2 : Self : : R , arg3 : Self : : R ) - > Self : : R { <nl> let args = arg_kinds ! ( arg0 , arg1 , arg2 , arg3 ) ; <nl> let r = < Self as SyntaxSmartConstructors < ' src , PositionedSyntax , State > > : : make_isset_expression ( self , arg0 , arg1 , arg2 , arg3 ) ; <nl> mmm a / hphp / hack / test / full_fidelity / full_fidelity_test_utils . ml <nl> ppp b / hphp / hack / test / full_fidelity / full_fidelity_test_utils . ml <nl> let rewrite_tree_no_whitespace source_text node = <nl> | TriviaKind . IgnoreError <nl> | TriviaKind . FixMe <nl> | TriviaKind . SingleLineComment <nl> - | TriviaKind . AfterHaltCompiler <nl> | TriviaKind . DelimitedComment - > <nl> true <nl> | TriviaKind . EndOfLine <nl> mmm a / hphp / hack / test / rust / hhbc_options_migration_test . ml <nl> ppp b / hphp / hack / test / rust / hhbc_options_migration_test . ml <nl> let assert_opts_equal caml rust = <nl> assert_equal <nl> Hhbc_options . ( phpism_disable_static_closures caml ) <nl> Hhbc_options . ( phpism_disable_static_closures rust ) ; <nl> - assert_equal <nl> - Hhbc_options . ( phpism_disable_halt_compiler caml ) <nl> - Hhbc_options . ( phpism_disable_halt_compiler rust ) ; <nl> assert_equal <nl> Hhbc_options . ( emit_func_pointers caml ) <nl> Hhbc_options . ( emit_func_pointers rust ) ; <nl> let test_all_overrides_json_only _ = <nl> \ " hhvm . hack . lang . phpism . disable_static_closures \ " : { <nl> \ " global_value \ " : true <nl> } , <nl> - \ " hhvm . hack . lang . phpism . disable_halt_compiler \ " : { <nl> - \ " global_value \ " : true <nl> - } , <nl> \ " hhvm . hack_arr_compat_notices \ " : { <nl> \ " global_value \ " : true <nl> } , <nl> module CliArgOverrides = struct <nl> let hhvm ' hack ' lang ' phpism ' disable_static_closures = <nl> " - vhack . lang . phpism . disablestaticclosures = true " <nl> <nl> - let hhvm ' hack ' lang ' phpism ' disable_halt_compiler = <nl> - " - vhhvm . lang . phpism . disablehaltcompiler = true " <nl> - <nl> let hhvm ' hack_arr_compat_notices = " - veval . hackarrcompatnotices = true " <nl> <nl> let hhvm ' hack_arr_dv_arrs = " - veval . hackarrdvarrs = true " <nl> let test_all_overrides_cli_only _ = <nl> hhvm ' hack ' lang ' phpism ' disallow_execution_operator ; <nl> hhvm ' hack ' lang ' phpism ' disable_nontoplevel_declarations ; <nl> hhvm ' hack ' lang ' phpism ' disable_static_closures ; <nl> - hhvm ' hack ' lang ' phpism ' disable_halt_compiler ; <nl> hhvm ' hack_arr_compat_notices ; <nl> hhvm ' hack_arr_dv_arrs ; <nl> ( * hhvm ' include_roots ; * ) <nl> mmm a / hphp / runtime / base / runtime - option . cpp <nl> ppp b / hphp / runtime / base / runtime - option . cpp <nl> bool RuntimeOption : : DisableReservedVariables = true ; <nl> uint64_t RuntimeOption : : DisableConstant = 0 ; <nl> bool RuntimeOption : : DisableNontoplevelDeclarations = false ; <nl> bool RuntimeOption : : DisableStaticClosures = false ; <nl> - bool RuntimeOption : : DisableHaltCompiler = false ; <nl> bool RuntimeOption : : EnableClassLevelWhereClauses = false ; <nl> bool RuntimeOption : : EnableFirstClassFunctionPointers = false ; <nl> <nl> void RuntimeOption : : Load ( <nl> Config : : Bind ( DisableStaticClosures , ini , config , <nl> " Hack . Lang . Phpism . DisableStaticClosures " , <nl> DisableStaticClosures ) ; <nl> - Config : : Bind ( DisableHaltCompiler , ini , config , <nl> - " Hack . Lang . Phpism . DisableHaltCompiler " , <nl> - DisableHaltCompiler ) ; <nl> Config : : Bind ( DisableConstant , ini , config , <nl> " Hack . Lang . Phpism . DisableConstant " , <nl> DisableConstant ) ; <nl> mmm a / hphp / runtime / base / runtime - option . h <nl> ppp b / hphp / runtime / base / runtime - option . h <nl> struct RuntimeOption { <nl> / / Disables static closures <nl> / / true = > error , false = > default behaviour <nl> static bool DisableStaticClosures ; <nl> - / / Disables __halt_compiler ( ) <nl> - / / true = > error , false = > default behaviour <nl> - static bool DisableHaltCompiler ; <nl> / / Enables the class - level where constraints <nl> / / true = > allow the feature , false = > disable the feature <nl> static bool EnableClassLevelWhereClauses ; <nl> mmm a / hphp / runtime / base / unit - cache . cpp <nl> ppp b / hphp / runtime / base / unit - cache . cpp <nl> std : : string mangleUnitSha1 ( const std : : string & fileSha1 , <nl> + ( RuntimeOption : : DisallowExecutionOperator ? ' 1 ' : ' 0 ' ) <nl> + ( RuntimeOption : : DisableNontoplevelDeclarations ? ' 1 ' : ' 0 ' ) <nl> + ( RuntimeOption : : DisableStaticClosures ? ' 1 ' : ' 0 ' ) <nl> - + ( RuntimeOption : : DisableHaltCompiler ? ' 1 ' : ' 0 ' ) <nl> + ( RuntimeOption : : EvalRxIsEnabled ? ' 1 ' : ' 0 ' ) <nl> + ( RuntimeOption : : EvalEmitClsMethPointers ? ' 1 ' : ' 0 ' ) <nl> + ( RuntimeOption : : EvalIsVecNotices ? ' 1 ' : ' 0 ' ) <nl> mmm a / hphp / runtime / debugger / debugger_base . cpp <nl> ppp b / hphp / runtime / debugger / debugger_base . cpp <nl> const char * PHP_KEYWORDS [ ] = { <nl> " unset " , <nl> " isset " , <nl> " empty " , <nl> - " halt_compiler " , <nl> " class " , <nl> " interface " , <nl> " extends " , <nl> deleted file mode 100644 <nl> index 8c1ceed8ef0 . . 00000000000 <nl> mmm a / hphp / test / slow / phpism / halt_compiler . php <nl> ppp / dev / null <nl> <nl> - < ? hh <nl> - < < __EntryPoint > > <nl> - function main ( ) : void { <nl> - } <nl> - __halt_compiler ( ) ; <nl> deleted file mode 100644 <nl> index 1bfaebe8245 . . 00000000000 <nl> mmm a / hphp / test / slow / phpism / halt_compiler . php . expectf <nl> ppp / dev / null <nl> @ @ - 1 + 0 , 0 @ @ <nl> - Fatal error : __halt_compiler ( ) is not supported in Hack in % s on line 5 <nl> deleted file mode 100644 <nl> index df5ca72a8db . . 00000000000 <nl> mmm a / hphp / test / slow / phpism / halt_compiler . php . hphp_opts <nl> ppp / dev / null <nl> @ @ - 1 + 0 , 0 @ @ <nl> - - vRuntime . Hack . Lang . Phpism . DisableHaltCompiler = true <nl> deleted file mode 100644 <nl> index b737f94358b . . 00000000000 <nl> mmm a / hphp / test / slow / phpism / halt_compiler . php . opts <nl> ppp / dev / null <nl> @ @ - 1 + 0 , 0 @ @ <nl> - - vHack . Lang . Phpism . DisableHaltCompiler = true <nl> deleted file mode 100644 <nl> index fc358ecbeda . . 00000000000 <nl> mmm a / hphp / test / zend / good / Zend / tests / bug60099 . php <nl> ppp / dev / null <nl> <nl> - < ? hh <nl> - namespace foo { <nl> - __halt_compiler ( ) ; <nl> - <nl> deleted file mode 100644 <nl> index 09ad7c3923f . . 00000000000 <nl> mmm a / hphp / test / zend / good / Zend / tests / bug60099 . php . expectf <nl> ppp / dev / null <nl> <nl> - <nl> - Fatal error : __halt_compiler function should appear only at the top level in % s / bug60099 . php on line 3 <nl> deleted file mode 100644 <nl> index 4a3c36fd2bd . . 00000000000 <nl> mmm a / hphp / test / zend / good / Zend / tests / halt03 . php <nl> ppp / dev / null <nl> <nl> - < ? hh <nl> - < < __EntryPoint > > function main ( ) : void { <nl> - if ( true ) { <nl> - __HALT_COMPILER ( ) ; <nl> - } <nl> - } <nl> deleted file mode 100644 <nl> index 452d01e09f7 . . 00000000000 <nl> mmm a / hphp / test / zend / good / Zend / tests / halt03 . php . expectf <nl> ppp / dev / null <nl> <nl> - <nl> - Fatal error : Keyword __HALT_COMPILER must be written in lowercase in % s / halt03 . php on line 4 <nl>
Remove __halt_compiler
facebook/hhvm
30d86b508ba669fd221dbb8263f1ced74165e552
2020-04-01T02:04:44Z
deleted file mode 100644 <nl> index 3b21c43c737 . . 00000000000 <nl> mmm a / . mergify . yml <nl> ppp / dev / null <nl> <nl> - pull_request_rules : <nl> - - name : Automatic merge on approval <nl> - conditions : <nl> - - " # approved - reviews - by > = 1 " <nl> - - " status - success = Marker check " <nl> - - " # status - failure = 0 " <nl> - - " base = master " <nl> - actions : <nl> - merge : <nl> - method : merge <nl> - pull_request_rules : <nl> - - name : Automatic merge for Dependabot pull requests <nl> - conditions : <nl> - - " author ~ = ^ dependabot ( | - preview ) . * $ " <nl> - - " # status - failure = 1 " # Description check <nl> - - " base = master " <nl> - actions : <nl> - merge : <nl> - method : merge <nl> - pull_request_rules : <nl> - - name : Automatic close for Dependabot pull requests <nl> - conditions : <nl> - - " author ~ = ^ dependabot ( | - preview ) . * $ " <nl> - - " # status - failure > 1 " <nl> - - " base = master " <nl> - actions : <nl> - merge : <nl> - method : close <nl> - pull_request_rules : <nl> - - name : Automatic merge for ImgBot pull requests <nl> - conditions : <nl> - - " author = imgbot [ bot ] " <nl> - - " # status - failure = 1 " # Description check <nl> - - " base = master " <nl> - actions : <nl> - merge : <nl> - method : merge <nl> - pull_request_rules : <nl> - - name : Automatic add pr - documentation label via description <nl> - conditions : <nl> - - " body ~ = - Documentation " <nl> - actions : <nl> - label : <nl> - add : [ " pr - documentation " ] <nl> - pull_request_rules : <nl> - - name : Automatic add pr - feature label <nl> - conditions : <nl> - - " body ~ = - New Feature " <nl> - actions : <nl> - label : <nl> - add : [ " pr - feature " , " doc - alert " ] <nl> - pull_request_rules : <nl> - - name : Automatic add pr - bugfix label <nl> - conditions : <nl> - - " body ~ = - Bug Fix " <nl> - actions : <nl> - label : <nl> - add : [ " pr - bugfix " , " no - docs - needed " ] <nl> - pull_request_rules : <nl> - - name : Automatic add pr - improvement label <nl> - conditions : <nl> - - " body ~ = - Improvement " <nl> - actions : <nl> - label : <nl> - add : [ " pr - improvement " ] <nl> - pull_request_rules : <nl> - - name : Automatic add pr - performance label <nl> - conditions : <nl> - - " body ~ = Performance Improvement " <nl> - actions : <nl> - label : <nl> - add : [ " pr - performance " , " no - docs - needed " ] <nl> - pull_request_rules : <nl> - - name : Automatic add pr - build label <nl> - conditions : <nl> - - " body ~ = Build . * Improvement " <nl> - actions : <nl> - label : <nl> - add : [ " pr - build " , " no - docs - needed " ] <nl> - pull_request_rules : <nl> - - name : Automatic add pr - non - significant label <nl> - conditions : <nl> - - " body ~ = - Non - significant " <nl> - actions : <nl> - label : <nl> - add : [ " pr - non - significant " , " no - docs - needed " ] <nl>
Remove trash from Ivan Blinkov
ClickHouse/ClickHouse
69f1093b54e45f2ebff0fb43beea8963a892b936
2020-02-27T09:14:23Z
mmm a / . travis / build . sh <nl> ppp b / . travis / build . sh <nl> fi <nl> <nl> # Configure <nl> CMAKE_ARGS = ( ' - DCMAKE_VERBOSE_MAKEFILE = ON ' ) <nl> + CMAKE_ARGS + = ( ' - DCMAKE_INSTALL_PREFIX = . . / install ' ) <nl> if [ " $ BUILD_CUDA " = ' true ' ] ; then <nl> CMAKE_ARGS + = ( ' - DUSE_CUDA = ON ' ) <nl> CMAKE_ARGS + = ( ' - DCUDA_ARCH_NAME = Pascal ' ) <nl> cmake . . $ { CMAKE_ARGS [ * ] } <nl> <nl> # Build <nl> if [ " $ TRAVIS_OS_NAME " = ' linux ' ] ; then <nl> - cmake - - build . - - " - j $ ( nproc ) " <nl> + make " - j $ ( nproc ) " install <nl> elif [ " $ TRAVIS_OS_NAME " = ' osx ' ] ; then <nl> - cmake - - build . - - " - j $ ( sysctl - n hw . ncpu ) " <nl> + make " - j $ ( sysctl - n hw . ncpu ) " install <nl> fi <nl> mmm a / . travis / install . sh <nl> ppp b / . travis / install . sh <nl> <nl> set - e <nl> set - x <nl> <nl> + LOCAL_DIR = $ ( cd " $ ( dirname " $ { BASH_SOURCE [ 0 ] } " ) " & & pwd ) <nl> + ROOT_DIR = $ ( dirname " $ LOCAL_DIR " ) <nl> + cd " $ ROOT_DIR " <nl> + <nl> APT_INSTALL_CMD = ' sudo apt - get install - y - - no - install - recommends ' <nl> <nl> if [ " $ TRAVIS_OS_NAME " = ' linux ' ] ; then <nl> if [ " $ TRAVIS_OS_NAME " = ' linux ' ] ; then <nl> libpthread - stubs0 - dev \ <nl> libsnappy - dev \ <nl> protobuf - compiler \ <nl> + python \ <nl> python - dev \ <nl> python - pip \ <nl> + python - wheel \ <nl> software - properties - common \ <nl> xsltproc <nl> <nl> fi <nl> # # # # # # # # # # # # # # # # # # # # <nl> # pip dependencies # <nl> # # # # # # # # # # # # # # # # # # # # <nl> - pip install numpy <nl> + pip install \ <nl> + future \ <nl> + hypothesis \ <nl> + numpy \ <nl> + protobuf \ <nl> + pytest \ <nl> + scikit - image <nl> <nl> if [ " $ BUILD_ANDROID " = ' true ' ] ; then <nl> # # # # # # # # # # # # # # # # # # # # # # # <nl> mmm a / . travis / setup . sh <nl> ppp b / . travis / setup . sh <nl> elif [ " $ BUILD " = ' linux - cuda ' ] ; then <nl> export BUILD_TESTS = false <nl> elif [ " $ BUILD " = ' linux - mkl ' ] ; then <nl> export BUILD_MKL = true <nl> + export BUILD_TESTS = false <nl> elif [ " $ BUILD " = ' linux - android ' ] ; then <nl> export BUILD_ANDROID = true <nl> export BUILD_TESTS = false <nl> elif [ " $ BUILD " = ' osx ' ] ; then <nl> - # TODO ( lukeyeager ) : enable after caffe2 / caffe2 # 768 , caffe2 / caffe2 # 785 <nl> + # TODO ( lukeyeager ) : enable after caffe2 / caffe2 # 785 <nl> export BUILD_TESTS = false <nl> elif [ " $ BUILD " = ' osx - ios ' ] ; then <nl> export BUILD_IOS = true <nl> mmm a / . travis / test . sh <nl> ppp b / . travis / test . sh <nl> if [ " $ BUILD_TESTS " = ' false ' ] ; then <nl> exit 0 <nl> fi <nl> <nl> - cd build <nl> + # Ctests <nl> + pushd build <nl> CTEST_OUTPUT_ON_FAILURE = 1 make test <nl> + popd <nl> + <nl> + # Python tests <nl> + export PYTHONPATH = " $ { PYTHONPATH } : $ { ROOT_DIR } / install " <nl> + export LD_LIBRARY_PATH = " $ { LD_LIBRARY_PATH } : $ { ROOT_DIR } / install / lib " <nl> + python - m pytest - v install / caffe2 / python <nl>
TravisCI : run Python tests
pytorch/pytorch
e60bc2df85c9d171eb8a8306e039d6a2dbd38228
2017-07-05T17:10:04Z
mmm a / src / modules . js <nl> ppp b / src / modules . js <nl> function exportRuntime ( ) { <nl> runtimeElements . push ( ' intArrayFromBase64 ' ) ; <nl> runtimeElements . push ( ' tryParseAsDataURI ' ) ; <nl> } <nl> + / / dynCall_ * methods are not hardcoded here , as they <nl> + / / depend on the file being compiled . check for them <nl> + / / and add them . <nl> + for ( var name in EXPORTED_RUNTIME_METHODS_SET ) { <nl> + if ( / ^ dynCall_ / . test ( name ) ) { <nl> + / / a specific dynCall ; add to the list <nl> + runtimeElements . push ( name ) ; <nl> + } <nl> + } <nl> var runtimeNumbers = [ <nl> ' ALLOC_NORMAL ' , <nl> ' ALLOC_STACK ' , <nl> new file mode 100644 <nl> index 00000000000 . . fead16d4f1c <nl> mmm / dev / null <nl> ppp b / tests / core / dyncall_specific . c <nl> <nl> + # include < emscripten . h > <nl> + <nl> + void waka ( int x , int y , int z ) { <nl> + EM_ASM ( { <nl> + Module [ ' print ' ] ( ' received ' + [ $ 0 , $ 1 , $ 2 ] + ' . ' ) ; <nl> + } , x , y , z ) ; <nl> + } <nl> + <nl> + int main ( ) { <nl> + EM_ASM ( { <nl> + # if DIRECT <nl> + dynCall_viii ( $ 0 , 1 , 4 , 9 ) ; <nl> + return ; <nl> + # endif <nl> + # if EXPORTED <nl> + Module [ ' dynCall_viii ' ] ( $ 0 , 1 , 4 , 9 ) ; <nl> + return ; <nl> + # endif <nl> + # if FROM_OUTSIDE <nl> + eval ( " Module [ ' dynCall_viii ' ] ( " + $ 0 + " , 1 , 4 , 9 ) " ) ; <nl> + return ; <nl> + # endif <nl> + throw " no test mode " ; <nl> + } , & waka ) ; <nl> + } <nl> + <nl> new file mode 100644 <nl> index 00000000000 . . ed522650769 <nl> mmm / dev / null <nl> ppp b / tests / core / dyncall_specific . txt <nl> @ @ - 0 , 0 + 1 @ @ <nl> + received 1 , 4 , 9 . <nl> mmm a / tests / test_core . py <nl> ppp b / tests / test_core . py <nl> def test_dyncall ( self ) : <nl> Settings . EXTRA_EXPORTED_RUNTIME_METHODS = [ ' dynCall ' , ' addFunction ' ] <nl> self . do_run_in_out_file_test ( ' tests ' , ' core ' , ' dyncall ' ) <nl> <nl> + def test_dyncall_specific ( self ) : <nl> + emcc_args = self . emcc_args [ : ] <nl> + for which , exported_runtime_methods in [ <nl> + ( ' DIRECT ' , [ ] ) , <nl> + ( ' EXPORTED ' , [ ] ) , <nl> + ( ' FROM_OUTSIDE ' , [ ' dynCall_viii ' ] ) <nl> + ] : <nl> + print ( which ) <nl> + self . emcc_args = emcc_args + [ ' - D ' + which ] <nl> + Settings . EXTRA_EXPORTED_RUNTIME_METHODS = exported_runtime_methods <nl> + self . do_run_in_out_file_test ( ' tests ' , ' core ' , ' dyncall_specific ' ) <nl> + <nl> def test_getValue_setValue ( self ) : <nl> # these used to be exported , but no longer are by default <nl> def test ( output_prefix = ' ' , args = [ ] ) : <nl>
Fix exporting a specific dynCall_ * method ( )
emscripten-core/emscripten
003a28776006e40b0148cef5a73fded37bab066c
2018-01-12T19:52:51Z
mmm a / modules / visual_script / visual_script_nodes . cpp <nl> ppp b / modules / visual_script / visual_script_nodes . cpp <nl> PropertyInfo VisualScriptClassConstant : : get_input_value_port_info ( int p_idx ) con <nl> } <nl> <nl> PropertyInfo VisualScriptClassConstant : : get_output_value_port_info ( int p_idx ) const { <nl> - <nl> - return PropertyInfo ( Variant : : INT , String ( base_type ) + " . " + String ( name ) ) ; <nl> + if ( name = = " " ) { <nl> + return PropertyInfo ( Variant : : INT , String ( base_type ) ) ; <nl> + } else { <nl> + return PropertyInfo ( Variant : : INT , String ( base_type ) + " . " + String ( name ) ) ; <nl> + } <nl> } <nl> <nl> String VisualScriptClassConstant : : get_caption ( ) const { <nl> StringName VisualScriptClassConstant : : get_class_constant ( ) { <nl> void VisualScriptClassConstant : : set_base_type ( const StringName & p_which ) { <nl> <nl> base_type = p_which ; <nl> + List < String > constants ; <nl> + ClassDB : : get_integer_constant_list ( base_type , & constants , true ) ; <nl> + if ( constants . size ( ) > 0 ) { <nl> + bool found_name = false ; <nl> + for ( List < String > : : Element * E = constants . front ( ) ; E ; E = E - > next ( ) ) { <nl> + if ( E - > get ( ) = = name ) { <nl> + found_name = true ; <nl> + break ; <nl> + } <nl> + } <nl> + if ( ! found_name ) { <nl> + name = constants [ 0 ] ; <nl> + } <nl> + } else { <nl> + name = " " ; <nl> + } <nl> _change_notify ( ) ; <nl> ports_changed_notify ( ) ; <nl> } <nl>
Merge pull request from Chaosus / vst_fix_class_constant
godotengine/godot
cc6b49ec0d1d436996db17759ae57feba47443de
2020-02-10T08:22:25Z
mmm a / tools / caffe2ncnn . cpp <nl> ppp b / tools / caffe2ncnn . cpp <nl> int main ( int argc , char * * argv ) <nl> fprintf ( pp , " % f " , eltwise_param . coeff ( j ) ) ; <nl> } <nl> } <nl> + else if ( layer . type ( ) = = " ELU " ) <nl> + { <nl> + const caffe : : ELUParameter & elu_param = layer . elu_param ( ) ; <nl> + fprintf ( pp , " % f " , elu_param . alpha ( ) ) ; <nl> + } <nl> else if ( layer . type ( ) = = " InnerProduct " ) <nl> { <nl> const caffe : : LayerParameter & binlayer = net . layer ( netidx ) ; <nl>
convert ELU parameter , fix
Tencent/ncnn
a638cf632e7c6c8df08a89512e5806558571f6dc
2017-08-25T09:33:10Z
mmm a / src / python / grpcio / grpc / _channel . py <nl> ppp b / src / python / grpcio / grpc / _channel . py <nl> <nl> from grpc . framework . foundation import callable_util <nl> <nl> _LOGGER = logging . getLogger ( __name__ ) <nl> - _LOGGER . addHandler ( logging . NullHandler ( ) ) <nl> <nl> _USER_AGENT = ' grpc - python / { } ' . format ( _grpcio_metadata . __version__ ) <nl> <nl> mmm a / src / python / grpcio / grpc / _common . py <nl> ppp b / src / python / grpcio / grpc / _common . py <nl> <nl> from grpc . _cython import cygrpc <nl> <nl> _LOGGER = logging . getLogger ( __name__ ) <nl> - _LOGGER . addHandler ( logging . NullHandler ( ) ) <nl> <nl> CYGRPC_CONNECTIVITY_STATE_TO_CHANNEL_CONNECTIVITY = { <nl> cygrpc . ConnectivityState . idle : <nl> mmm a / src / python / grpcio / grpc / _cython / _cygrpc / grpc_string . pyx . pxi <nl> ppp b / src / python / grpcio / grpc / _cython / _cygrpc / grpc_string . pyx . pxi <nl> <nl> import logging <nl> <nl> _LOGGER = logging . getLogger ( __name__ ) <nl> - _LOGGER . addHandler ( logging . NullHandler ( ) ) <nl> <nl> # This function will ascii encode unicode string inputs if neccesary . <nl> # In Python3 , unicode strings are the default str type . <nl> mmm a / src / python / grpcio / grpc / _cython / _cygrpc / server . pyx . pxi <nl> ppp b / src / python / grpcio / grpc / _cython / _cygrpc / server . pyx . pxi <nl> import time <nl> import grpc <nl> <nl> _LOGGER = logging . getLogger ( __name__ ) <nl> - _LOGGER . addHandler ( logging . NullHandler ( ) ) <nl> <nl> cdef class Server : <nl> <nl> mmm a / src / python / grpcio / grpc / _plugin_wrapping . py <nl> ppp b / src / python / grpcio / grpc / _plugin_wrapping . py <nl> <nl> from grpc . _cython import cygrpc <nl> <nl> _LOGGER = logging . getLogger ( __name__ ) <nl> - _LOGGER . addHandler ( logging . NullHandler ( ) ) <nl> <nl> <nl> class _AuthMetadataContext ( <nl> mmm a / src / python / grpcio / grpc / framework / foundation / callable_util . py <nl> ppp b / src / python / grpcio / grpc / framework / foundation / callable_util . py <nl> <nl> import six <nl> <nl> _LOGGER = logging . getLogger ( __name__ ) <nl> - _LOGGER . addHandler ( logging . NullHandler ( ) ) <nl> <nl> <nl> class Outcome ( six . with_metaclass ( abc . ABCMeta ) ) : <nl> mmm a / src / python / grpcio / grpc / framework / foundation / logging_pool . py <nl> ppp b / src / python / grpcio / grpc / framework / foundation / logging_pool . py <nl> <nl> from concurrent import futures <nl> <nl> _LOGGER = logging . getLogger ( __name__ ) <nl> - _LOGGER . addHandler ( logging . NullHandler ( ) ) <nl> <nl> <nl> def _wrap ( behavior ) : <nl> mmm a / src / python / grpcio / grpc / framework / foundation / stream_util . py <nl> ppp b / src / python / grpcio / grpc / framework / foundation / stream_util . py <nl> <nl> <nl> _NO_VALUE = object ( ) <nl> _LOGGER = logging . getLogger ( __name__ ) <nl> - _LOGGER . addHandler ( logging . NullHandler ( ) ) <nl> <nl> <nl> class TransformingConsumer ( stream . Consumer ) : <nl>
Revert python changes
grpc/grpc
50d34c224ab624aad6c7142aa884fdfd674d60bb
2018-11-19T20:16:08Z
mmm a / Tests / EndToEndTests / PyTest / run - test <nl> ppp b / Tests / EndToEndTests / PyTest / run - test <nl> python - c " import numpy ; print ( ' NumPy : % s ' % numpy . version . full_version ) " <nl> python - c " import pytest ; print ( ' PyTest : % s ' % pytest . __version__ ) " <nl> <nl> export CNTK_EXECUTABLE_PATH = $ TEST_CNTK_BINARY <nl> - run py . test <nl> + run py . test - - deviceid $ TEST_DEVICE <nl> <nl> if [ " $ ? " - eq " 0 " ] ; then <nl> echo " __COMPLETED__ " <nl> mmm a / contrib / Python / cntk / conftest . py <nl> ppp b / contrib / Python / cntk / conftest . py <nl> def pytest_addoption ( parser ) : <nl> parser . addoption ( " - - deviceid " , action = " append " , default = [ _DEFAULT_DEVICE_ID ] , <nl> help = " list of device ids to pass to test functions " ) <nl> <nl> + DEVICE_MAP = { <nl> + ' auto ' : ' auto ' , <nl> + ' cpu ' : - 1 , <nl> + ' gpu ' : 0 <nl> + } <nl> + <nl> def pytest_generate_tests ( metafunc ) : <nl> if ' device_id ' in metafunc . fixturenames : <nl> if ( len ( metafunc . config . option . deviceid ) ) > 1 : <nl> del metafunc . config . option . deviceid [ 0 ] <nl> <nl> devices = set ( ) <nl> - for d_id in metafunc . config . option . deviceid : <nl> + for elem in metafunc . config . option . deviceid : <nl> try : <nl> - devices . add ( int ( d_id ) ) <nl> + if elem in DEVICE_MAP : <nl> + devices . add ( DEVICE_MAP [ elem ] ) <nl> + else : <nl> + devices . add ( int ( elem ) ) <nl> except ValueError : <nl> - raise RuntimeError ( " invalid deviceid value { 0 } , please use integer values " . format ( d_id ) ) <nl> + raise RuntimeError ( " invalid deviceid value ' { 0 } ' , please " + <nl> + " use integer values or ' auto ' " . format ( elem ) ) <nl> <nl> - metafunc . parametrize ( " device_id " , devices ) <nl> \ No newline at end of file <nl> + metafunc . parametrize ( " device_id " , devices ) <nl>
Using DeviceId in PyTests
microsoft/CNTK
142e8699a0132b7c55a28d0000a5ffe92f1fa2e5
2016-04-16T13:41:14Z
mmm a / src / app / ui / status_bar . cpp <nl> ppp b / src / app / ui / status_bar . cpp <nl> StatusBar : : StatusBar ( ) <nl> m_commandsBox = box1 ; <nl> } <nl> <nl> - / / Create the box to show notifications . <nl> - { <nl> - Box * box1 = new Box ( JI_HORIZONTAL ) ; <nl> - Box * box2 = new Box ( JI_VERTICAL ) ; <nl> - <nl> - box1 - > setBorder ( gfx : : Border ( 2 , 1 , 2 , 2 ) * guiscale ( ) ) ; <nl> - box2 - > noBorderNoChildSpacing ( ) ; <nl> - box2 - > setExpansive ( true ) ; <nl> - <nl> - m_linkLabel = new LinkLabel ( ( std : : string ( WEBSITE ) + " donate / " ) . c_str ( ) , " Support This Project " ) ; <nl> - <nl> - box1 - > addChild ( box2 ) ; <nl> - box1 - > addChild ( m_linkLabel ) ; <nl> - m_notificationsBox = box1 ; <nl> - } <nl> - <nl> - addChild ( m_notificationsBox ) ; <nl> - <nl> App : : instance ( ) - > CurrentToolChange . connect ( & StatusBar : : onCurrentToolChange , this ) ; <nl> } <nl> <nl> StatusBar : : ~ StatusBar ( ) <nl> <nl> delete m_tipwindow ; / / widget <nl> delete m_commandsBox ; <nl> - delete m_notificationsBox ; <nl> } <nl> <nl> void StatusBar : : onCurrentToolChange ( ) <nl> void StatusBar : : onResize ( ResizeEvent & ev ) <nl> setBoundsQuietly ( ev . getBounds ( ) ) ; <nl> <nl> Rect rc = ev . getBounds ( ) ; <nl> - rc . x = rc . x2 ( ) - m_notificationsBox - > getPreferredSize ( ) . w ; <nl> - rc . w = m_notificationsBox - > getPreferredSize ( ) . w ; <nl> - m_notificationsBox - > setBounds ( rc ) ; <nl> - <nl> - rc = ev . getBounds ( ) ; <nl> rc . w - = rc . w / 4 + 4 * guiscale ( ) ; <nl> m_commandsBox - > setBounds ( rc ) ; <nl> } <nl> void StatusBar : : updateSubwidgetsVisibility ( ) <nl> { <nl> const Document * document = UIContext : : instance ( ) - > activeDocument ( ) ; <nl> bool commandsVisible = ( document ! = NULL & & hasMouse ( ) ) ; <nl> - bool notificationsVisible = ( document = = NULL ) ; <nl> <nl> if ( commandsVisible ) { <nl> if ( ! hasChild ( m_commandsBox ) ) { <nl> void StatusBar : : updateSubwidgetsVisibility ( ) <nl> invalidate ( ) ; <nl> } <nl> } <nl> - <nl> - if ( notificationsVisible ) { <nl> - if ( ! hasChild ( m_notificationsBox ) ) { <nl> - addChild ( m_notificationsBox ) ; <nl> - invalidate ( ) ; <nl> - } <nl> - } <nl> - else { <nl> - if ( hasChild ( m_notificationsBox ) ) { <nl> - removeChild ( m_notificationsBox ) ; <nl> - invalidate ( ) ; <nl> - } <nl> - } <nl> } <nl> <nl> } / / namespace app <nl> mmm a / src / app / ui / status_bar . h <nl> ppp b / src / app / ui / status_bar . h <nl> namespace app { <nl> ui : : Button * m_b_next ; / / Go to next frame <nl> ui : : Button * m_b_last ; / / Go to last frame <nl> <nl> - / / Box of notifications . <nl> - ui : : Widget * m_notificationsBox ; <nl> - ui : : LinkLabel * m_linkLabel ; <nl> - <nl> / / Tip window <nl> class CustomizedTipWindow ; <nl> CustomizedTipWindow * m_tipwindow ; <nl>
Remove " notification area " from StatusBar ( the " donate " link )
aseprite/aseprite
660b23e471ee04a9bb60a152c956364d23020e98
2015-02-26T13:01:04Z
mmm a / R - package / NAMESPACE <nl> ppp b / R - package / NAMESPACE <nl> importFrom ( Matrix , sparse . model . matrix ) <nl> importFrom ( Matrix , sparseVector ) <nl> importFrom ( data . table , " : = " ) <nl> importFrom ( data . table , as . data . table ) <nl> - importFrom ( data . table , copy ) <nl> importFrom ( data . table , data . table ) <nl> importFrom ( data . table , fread ) <nl> importFrom ( data . table , rbindlist ) <nl> - importFrom ( data . table , set ) <nl> importFrom ( data . table , setnames ) <nl> importFrom ( magrittr , " % > % " ) <nl> - importFrom ( magrittr , add ) <nl> - importFrom ( magrittr , not ) <nl> importFrom ( stringr , str_detect ) <nl> importFrom ( stringr , str_extract ) <nl> importFrom ( stringr , str_extract_all ) <nl> importFrom ( stringr , str_match ) <nl> importFrom ( stringr , str_replace ) <nl> importFrom ( stringr , str_split ) <nl> - importFrom ( stringr , str_trim ) <nl> mmm a / R - package / R / xgb . model . dt . tree . R <nl> ppp b / R - package / R / xgb . model . dt . tree . R <nl> <nl> - # ' Parse boosted tree model text dump <nl> + # ' Parse a boosted tree model text dump <nl> # ' <nl> - # ' Parse a boosted tree model text dump and return a \ code { data . table } . <nl> + # ' Parse a boosted tree model text dump into a \ code { data . table } structure . <nl> # ' <nl> # ' @ importFrom data . table data . table <nl> - # ' @ importFrom data . table set <nl> - # ' @ importFrom data . table rbindlist <nl> - # ' @ importFrom data . table copy <nl> # ' @ importFrom data . table : = <nl> # ' @ importFrom magrittr % > % <nl> - # ' @ importFrom magrittr not <nl> - # ' @ importFrom magrittr add <nl> - # ' @ importFrom stringr str_extract <nl> - # ' @ importFrom stringr str_split <nl> - # ' @ importFrom stringr str_trim <nl> - # ' @ param feature_names names of each feature as a character vector . Can be extracted from a sparse matrix ( see example ) . If the model already contains feature names , this argument should be \ code { NULL } ( default value ) . <nl> - # ' @ param model object created by the \ code { xgb . train } function . <nl> - # ' @ param text \ code { character } vector generated by the \ code { xgb . dump } function . Model dump must include the gain per feature and per tree ( parameter \ code { with . stats = TRUE } in function \ code { xgb . dump } ) . <nl> - # ' @ param n_first_tree limit the plot to the \ code { n } first trees . If set to \ code { NULL } , all trees of the model are plotted . Performance can be low depending of the size of the model . <nl> + # ' @ importFrom stringr str_match <nl> + # ' <nl> + # ' @ param feature_names character vector of feature names . If the model already <nl> + # ' contains feature names , this argument should be \ code { NULL } ( default value ) <nl> + # ' @ param model object of class \ code { xgb . Booster } <nl> + # ' @ param text \ code { character } vector previously generated by the \ code { xgb . dump } <nl> + # ' function ( where parameter \ code { with . stats = TRUE } should have been set ) . <nl> + # ' @ param n_first_tree limit the parsing to the \ code { n } first trees . <nl> + # ' If set to \ code { NULL } , all trees of the model are parsed . <nl> # ' <nl> - # ' @ return A \ code { data . table } of the features used in the model with their gain , cover and few other information . <nl> + # ' @ return <nl> + # ' A \ code { data . table } with detailed information about model trees ' nodes . <nl> # ' <nl> - # ' @ details <nl> - # ' General function to convert a text dump of tree model to a \ code { data . table } . <nl> - # ' <nl> - # ' The purpose is to help user to explore the model and get a better understanding of it . <nl> - # ' <nl> # ' The columns of the \ code { data . table } are : <nl> # ' <nl> # ' \ itemize { <nl> - # ' \ item \ code { ID } : unique identifier of a node ; <nl> - # ' \ item \ code { Feature } : feature used in the tree to operate a split . When Leaf is indicated , it is the end of a branch ; <nl> - # ' \ item \ code { Split } : value of the chosen feature where is operated the split ; <nl> - # ' \ item \ code { Yes } : ID of the feature for the next node in the branch when the split condition is met ; <nl> - # ' \ item \ code { No } : ID of the feature for the next node in the branch when the split condition is not met ; <nl> - # ' \ item \ code { Missing } : ID of the feature for the next node in the branch for observation where the feature used for the split are not provided ; <nl> - # ' \ item \ code { Quality } : it ' s the gain related to the split in this specific node ; <nl> - # ' \ item \ code { Cover } : metric to measure the number of observation affected by the split ; <nl> - # ' \ item \ code { Tree } : ID of the tree . It is included in the main ID ; <nl> - # ' \ item \ code { Yes . Feature } , \ code { No . Feature } , \ code { Yes . Cover } , \ code { No . Cover } , \ code { Yes . Quality } and \ code { No . Quality } : data related to the pointer in \ code { Yes } or \ code { No } column ; <nl> + # ' \ item \ code { Tree } : ID of a tree in a model <nl> + # ' \ item \ code { Node } : ID of a node in a tree <nl> + # ' \ item \ code { ID } : unique identifier of a node in a model <nl> + # ' \ item \ code { Feature } : for a branch node , it ' s a feature id or name ( when available ) ; <nl> + # ' for a leaf note , it simply labels it as \ code { ' Leaf ' } <nl> + # ' \ item \ code { Split } : location of the split for a branch node ( split condition is always " less than " ) <nl> + # ' \ item \ code { Yes } : ID of the next node when the split condition is met <nl> + # ' \ item \ code { No } : ID of the next node when the split condition is not met <nl> + # ' \ item \ code { Missing } : ID of the next node when branch value is missing <nl> + # ' \ item \ code { Quality } : either the split gain ( change in loss ) or the leaf value <nl> + # ' \ item \ code { Cover } : metric related to the number of observation either seen by a split <nl> + # ' or collected by a leaf during training . <nl> # ' } <nl> - # ' <nl> + # ' <nl> # ' @ examples <nl> + # ' # Basic use : <nl> + # ' <nl> # ' data ( agaricus . train , package = ' xgboost ' ) <nl> # ' <nl> # ' bst < - xgboost ( data = agaricus . train $ data , label = agaricus . train $ label , max . depth = 2 , <nl> # ' eta = 1 , nthread = 2 , nround = 2 , objective = " binary : logistic " ) <nl> # ' <nl> - # ' # agaricus . train $ data @ @ Dimnames [ [ 2 ] ] represents the column names of the sparse matrix . <nl> - # ' xgb . model . dt . tree ( feature_names = agaricus . train $ data @ @ Dimnames [ [ 2 ] ] , model = bst ) <nl> + # ' ( dt < - xgb . model . dt . tree ( colnames ( agaricus . train $ data ) , bst ) ) <nl> + # ' <nl> # ' <nl> + # ' # How to match feature names of splits that are following a current ' Yes ' branch : <nl> + # ' <nl> + # ' merge ( dt , dt [ , . ( ID , Y . Feature = Feature ) ] , by . x = ' Yes ' , by . y = ' ID ' , all . x = TRUE ) [ order ( Tree , Node ) ] <nl> + # ' <nl> # ' @ export <nl> - xgb . model . dt . tree < - function ( feature_names = NULL , model = NULL , text = NULL , n_first_tree = NULL ) { <nl> - <nl> + xgb . model . dt . tree < - function ( feature_names = NULL , model = NULL , text = NULL , <nl> + n_first_tree = NULL ) { <nl> + <nl> if ( ! class ( feature_names ) % in % c ( " character " , " NULL " ) ) { <nl> - stop ( " feature_names : Has to be a vector of character or NULL if the model dump already contains feature name . Look at this function documentation to see where to get feature names . " ) <nl> + stop ( " feature_names : Has to be a vector of character \ n " , <nl> + " or NULL if the model dump already contains feature names . \ n " , <nl> + " Look at this function documentation to see where to get feature names . " ) <nl> } <nl> - <nl> + <nl> if ( class ( model ) ! = " xgb . Booster " & class ( text ) ! = " character " ) { <nl> - " model : Has to be an object of class xgb . Booster model generaged by the xgb . train function . \ n " % > % <nl> - paste0 ( " text : Has to be a vector of character or NULL if a path to the model dump has already been provided . " ) % > % <nl> - stop ( ) <nl> + stop ( " Either ' model ' has to be an object of class xgb . Booster \ n " , <nl> + " or ' text ' has to be a character vector with the result of xgb . dump \ n " , <nl> + " ( or NULL if the model was provided ) . " ) <nl> } <nl> - <nl> + <nl> if ( ! class ( n_first_tree ) % in % c ( " numeric " , " NULL " ) | length ( n_first_tree ) > 1 ) { <nl> stop ( " n_first_tree : Has to be a numeric vector of size 1 . " ) <nl> } <nl> - <nl> - if ( is . null ( text ) ) { <nl> + <nl> + if ( is . null ( text ) ) { <nl> text < - xgb . dump ( model = model , with . stats = T ) <nl> } <nl> <nl> - position < - str_match ( text , " booster " ) % > % is . na % > % not % > % which % > % c ( length ( text ) + 1 ) <nl> - <nl> - extract < - function ( x , pattern ) str_extract ( x , pattern ) % > % str_split ( " = " ) % > % lapply ( function ( x ) x [ 2 ] % > % as . numeric ) % > % unlist <nl> - <nl> - n_round < - min ( length ( position ) - 1 , n_first_tree ) <nl> - <nl> + position < - which ( ! is . na ( str_match ( text , " booster " ) ) ) <nl> + <nl> addTreeId < - function ( x , i ) paste ( i , x , sep = " - " ) <nl> - <nl> - allTrees < - data . table ( ) <nl> - <nl> + <nl> anynumber_regex < - " [ - + ] ? [ 0 - 9 ] * \ \ . ? [ 0 - 9 ] + ( [ eE ] [ - + ] ? [ 0 - 9 ] + ) ? " <nl> - for ( i in 1 : n_round ) { <nl> - <nl> - tree < - text [ ( position [ i ] + 1 ) : ( position [ i + 1 ] - 1 ) ] <nl> - <nl> - # avoid tree made of a leaf only ( no split ) <nl> - if ( length ( tree ) < 2 ) next <nl> - <nl> - treeID < - i - 1 <nl> - <nl> - notLeaf < - str_match ( tree , " leaf " ) % > % is . na <nl> - leaf < - notLeaf % > % not % > % tree [ . ] <nl> - branch < - notLeaf % > % tree [ . ] <nl> - idBranch < - str_extract ( branch , " \ \ d * : " ) % > % str_replace ( " : " , " " ) % > % addTreeId ( treeID ) <nl> - idLeaf < - str_extract ( leaf , " \ \ d * : " ) % > % str_replace ( " : " , " " ) % > % addTreeId ( treeID ) <nl> - featureBranch < - str_extract ( branch , " f \ \ d * < " ) % > % str_replace ( " < " , " " ) % > % str_replace ( " f " , " " ) % > % as . numeric <nl> - if ( ! is . null ( feature_names ) ) { <nl> - featureBranch < - feature_names [ featureBranch + 1 ] <nl> - } <nl> - featureLeaf < - rep ( " Leaf " , length ( leaf ) ) <nl> - splitBranch < - str_extract ( branch , paste0 ( " < " , anynumber_regex , " \ \ ] " ) ) % > % str_replace ( " < " , " " ) % > % str_replace ( " \ \ ] " , " " ) <nl> - splitLeaf < - rep ( NA , length ( leaf ) ) <nl> - yesBranch < - extract ( branch , " yes = \ \ d * " ) % > % addTreeId ( treeID ) <nl> - yesLeaf < - rep ( NA , length ( leaf ) ) <nl> - noBranch < - extract ( branch , " no = \ \ d * " ) % > % addTreeId ( treeID ) <nl> - noLeaf < - rep ( NA , length ( leaf ) ) <nl> - missingBranch < - extract ( branch , " missing = \ \ d + " ) % > % addTreeId ( treeID ) <nl> - missingLeaf < - rep ( NA , length ( leaf ) ) <nl> - qualityBranch < - extract ( branch , paste0 ( " gain = " , anynumber_regex ) ) <nl> - qualityLeaf < - extract ( leaf , paste0 ( " leaf = " , anynumber_regex ) ) <nl> - coverBranch < - extract ( branch , " cover = \ \ d * \ \ . * \ \ d * " ) <nl> - coverLeaf < - extract ( leaf , " cover = \ \ d * \ \ . * \ \ d * " ) <nl> - dt < - data . table ( ID = c ( idBranch , idLeaf ) , Feature = c ( featureBranch , featureLeaf ) , Split = c ( splitBranch , splitLeaf ) , Yes = c ( yesBranch , yesLeaf ) , No = c ( noBranch , noLeaf ) , Missing = c ( missingBranch , missingLeaf ) , Quality = c ( qualityBranch , qualityLeaf ) , Cover = c ( coverBranch , coverLeaf ) ) [ order ( ID ) ] [ , Tree : = treeID ] <nl> - <nl> - allTrees < - rbindlist ( list ( allTrees , dt ) , use . names = T , fill = F ) <nl> - } <nl> - <nl> - yes < - allTrees [ ! is . na ( Yes ) , Yes ] <nl> - <nl> - set ( allTrees , i = which ( allTrees [ , Feature ] ! = " Leaf " ) , <nl> - j = " Yes . Feature " , <nl> - value = allTrees [ ID % in % yes , Feature ] ) <nl> - <nl> - set ( allTrees , i = which ( allTrees [ , Feature ] ! = " Leaf " ) , <nl> - j = " Yes . Cover " , <nl> - value = allTrees [ ID % in % yes , Cover ] ) <nl> - <nl> - set ( allTrees , i = which ( allTrees [ , Feature ] ! = " Leaf " ) , <nl> - j = " Yes . Quality " , <nl> - value = allTrees [ ID % in % yes , Quality ] ) <nl> - no < - allTrees [ ! is . na ( No ) , No ] <nl> - <nl> - set ( allTrees , i = which ( allTrees [ , Feature ] ! = " Leaf " ) , <nl> - j = " No . Feature " , <nl> - value = allTrees [ ID % in % no , Feature ] ) <nl> - <nl> - set ( allTrees , i = which ( allTrees [ , Feature ] ! = " Leaf " ) , <nl> - j = " No . Cover " , <nl> - value = allTrees [ ID % in % no , Cover ] ) <nl> - <nl> - set ( allTrees , i = which ( allTrees [ , Feature ] ! = " Leaf " ) , <nl> - j = " No . Quality " , <nl> - value = allTrees [ ID % in % no , Quality ] ) <nl> - <nl> - allTrees <nl> + <nl> + td < - data . table ( t = text ) <nl> + td [ position , Tree : = 1L ] <nl> + td [ , Tree : = cumsum ( ifelse ( is . na ( Tree ) , 0L , Tree ) ) - 1L ] <nl> + <nl> + n_first_tree < - min ( max ( td $ Tree ) , n_first_tree ) <nl> + td < - td [ Tree < = n_first_tree & ! grepl ( ' ^ booster ' , t ) ] <nl> + <nl> + td [ , Node : = str_match ( t , " ( \ \ d + ) : " ) [ , 2 ] % > % as . numeric ] <nl> + td [ , ID : = addTreeId ( Node , Tree ) ] <nl> + td [ , isLeaf : = ! is . na ( str_match ( t , " leaf " ) ) ] <nl> + <nl> + # parse branch lines <nl> + td [ isLeaf = = FALSE , c ( " Feature " , " Split " , " Yes " , " No " , " Missing " , " Quality " , " Cover " ) : = { <nl> + rx < - paste0 ( " f ( \ \ d + ) < ( " , anynumber_regex , " ) \ \ ] yes = ( \ \ d + ) , no = ( \ \ d + ) , missing = ( \ \ d + ) , " , <nl> + " gain = ( " , anynumber_regex , " ) , cover = ( " , anynumber_regex , " ) " ) <nl> + # skip some indices with spurious capture groups from anynumber_regex <nl> + xtr < - str_match ( t , rx ) [ , c ( 2 , 3 , 5 , 6 , 7 , 8 , 10 ) ] <nl> + xtr [ , 3 : 5 ] < - addTreeId ( xtr [ , 3 : 5 ] , Tree ) <nl> + lapply ( 1 : ncol ( xtr ) , function ( i ) xtr [ , i ] ) <nl> + } ] <nl> + # assign feature_names when available <nl> + td [ isLeaf = = FALSE & ! is . null ( feature_names ) , <nl> + Feature : = feature_names [ as . numeric ( Feature ) + 1 ] ] <nl> + <nl> + # parse leaf lines <nl> + td [ isLeaf = = TRUE , c ( " Feature " , " Quality " , " Cover " ) : = { <nl> + rx < - paste0 ( " leaf = ( " , anynumber_regex , " ) , cover = ( " , anynumber_regex , " ) " ) <nl> + xtr < - str_match ( t , rx ) [ , c ( 2 , 4 ) ] <nl> + c ( " Leaf " , lapply ( 1 : ncol ( xtr ) , function ( i ) xtr [ , i ] ) ) <nl> + } ] <nl> + <nl> + # convert some columns to numeric <nl> + numeric_cols < - c ( " Quality " , " Cover " ) <nl> + td [ , ( numeric_cols ) : = lapply ( . SD , as . numeric ) , . SDcols = numeric_cols ] <nl> + <nl> + td [ , t : = NULL ] <nl> + td [ , isLeaf : = NULL ] <nl> + <nl> + td [ order ( Tree , Node ) ] <nl> } <nl> <nl> # Avoid error messages during CRAN check . <nl> # The reason is that these variables are never declared <nl> # They are mainly column names inferred by Data . table . . . <nl> - globalVariables ( c ( " ID " , " Tree " , " Yes " , " . " , " . N " , " Feature " , " Cover " , " Quality " , " No " , " Gain " , " Frequency " ) ) <nl> \ No newline at end of file <nl> + globalVariables ( c ( " Tree " , " Node " , " ID " , " Feature " , " t " , " isLeaf " , " . SD " , " . SDcols " ) ) <nl> \ No newline at end of file <nl> mmm a / R - package / man / xgb . model . dt . tree . Rd <nl> ppp b / R - package / man / xgb . model . dt . tree . Rd <nl> <nl> % Please edit documentation in R / xgb . model . dt . tree . R <nl> \ name { xgb . model . dt . tree } <nl> \ alias { xgb . model . dt . tree } <nl> - \ title { Parse boosted tree model text dump } <nl> + \ title { Parse a boosted tree model text dump } <nl> \ usage { <nl> xgb . model . dt . tree ( feature_names = NULL , model = NULL , text = NULL , <nl> n_first_tree = NULL ) <nl> } <nl> \ arguments { <nl> - \ item { feature_names } { names of each feature as a character vector . Can be extracted from a sparse matrix ( see example ) . If the model already contains feature names , this argument should be \ code { NULL } ( default value ) . } <nl> + \ item { feature_names } { character vector of feature names . If the model already <nl> + contains feature names , this argument should be \ code { NULL } ( default value ) } <nl> <nl> - \ item { model } { object created by the \ code { xgb . train } function . } <nl> + \ item { model } { object of class \ code { xgb . Booster } } <nl> <nl> - \ item { text } { \ code { character } vector generated by the \ code { xgb . dump } function . Model dump must include the gain per feature and per tree ( parameter \ code { with . stats = TRUE } in function \ code { xgb . dump } ) . } <nl> + \ item { text } { \ code { character } vector previously generated by the \ code { xgb . dump } <nl> + function ( where parameter \ code { with . stats = TRUE } should have been set ) . } <nl> <nl> - \ item { n_first_tree } { limit the plot to the \ code { n } first trees . If set to \ code { NULL } , all trees of the model are plotted . Performance can be low depending of the size of the model . } <nl> + \ item { n_first_tree } { limit the parsing to the \ code { n } first trees . <nl> + If set to \ code { NULL } , all trees of the model are parsed . } <nl> } <nl> \ value { <nl> - A \ code { data . table } of the features used in the model with their gain , cover and few other information . <nl> - } <nl> - \ description { <nl> - Parse a boosted tree model text dump and return a \ code { data . table } . <nl> - } <nl> - \ details { <nl> - General function to convert a text dump of tree model to a \ code { data . table } . <nl> - <nl> - The purpose is to help user to explore the model and get a better understanding of it . <nl> + A \ code { data . table } with detailed information about model trees ' nodes . <nl> <nl> The columns of the \ code { data . table } are : <nl> <nl> \ itemize { <nl> - \ item \ code { ID } : unique identifier of a node ; <nl> - \ item \ code { Feature } : feature used in the tree to operate a split . When Leaf is indicated , it is the end of a branch ; <nl> - \ item \ code { Split } : value of the chosen feature where is operated the split ; <nl> - \ item \ code { Yes } : ID of the feature for the next node in the branch when the split condition is met ; <nl> - \ item \ code { No } : ID of the feature for the next node in the branch when the split condition is not met ; <nl> - \ item \ code { Missing } : ID of the feature for the next node in the branch for observation where the feature used for the split are not provided ; <nl> - \ item \ code { Quality } : it ' s the gain related to the split in this specific node ; <nl> - \ item \ code { Cover } : metric to measure the number of observation affected by the split ; <nl> - \ item \ code { Tree } : ID of the tree . It is included in the main ID ; <nl> - \ item \ code { Yes . Feature } , \ code { No . Feature } , \ code { Yes . Cover } , \ code { No . Cover } , \ code { Yes . Quality } and \ code { No . Quality } : data related to the pointer in \ code { Yes } or \ code { No } column ; <nl> + \ item \ code { Tree } : ID of a tree in a model <nl> + \ item \ code { Node } : ID of a node in a tree <nl> + \ item \ code { ID } : unique identifier of a node in a model <nl> + \ item \ code { Feature } : for a branch node , it ' s a feature id or name ( when available ) ; <nl> + for a leaf note , it simply labels it as \ code { ' Leaf ' } <nl> + \ item \ code { Split } : location of the split for a branch node ( split condition is always " less than " ) <nl> + \ item \ code { Yes } : ID of the next node when the split condition is met <nl> + \ item \ code { No } : ID of the next node when the split condition is not met <nl> + \ item \ code { Missing } : ID of the next node when branch value is missing <nl> + \ item \ code { Quality } : either the split gain ( change in loss ) or the leaf value <nl> + \ item \ code { Cover } : metric related to the number of observation either seen by a split <nl> + or collected by a leaf during training . <nl> } <nl> } <nl> + \ description { <nl> + Parse a boosted tree model text dump into a \ code { data . table } structure . <nl> + } <nl> \ examples { <nl> + # Basic use : <nl> + <nl> data ( agaricus . train , package = ' xgboost ' ) <nl> <nl> bst < - xgboost ( data = agaricus . train $ data , label = agaricus . train $ label , max . depth = 2 , <nl> eta = 1 , nthread = 2 , nround = 2 , objective = " binary : logistic " ) <nl> <nl> - # agaricus . train $ data @ Dimnames [ [ 2 ] ] represents the column names of the sparse matrix . <nl> - xgb . model . dt . tree ( feature_names = agaricus . train $ data @ Dimnames [ [ 2 ] ] , model = bst ) <nl> + ( dt < - xgb . model . dt . tree ( colnames ( agaricus . train $ data ) , bst ) ) <nl> + <nl> + <nl> + # How to match feature names of splits that are following a current ' Yes ' branch : <nl> <nl> + merge ( dt , dt [ , . ( ID , Y . Feature = Feature ) ] , by . x = ' Yes ' , by . y = ' ID ' , all . x = TRUE ) [ order ( Tree , Node ) ] <nl> + <nl> } <nl> <nl> mmm a / R - package / tests / testthat / test_helpers . R <nl> ppp b / R - package / tests / testthat / test_helpers . R <nl> bst . Tree < - xgboost ( data = sparse_matrix , label = output_vector , max . depth = 9 , <nl> bst . GLM < - xgboost ( data = sparse_matrix , label = output_vector , <nl> eta = 1 , nthread = 2 , nround = 10 , objective = " binary : logistic " , booster = " gblinear " ) <nl> <nl> - feature . names < - agaricus . train $ data @ Dimnames [ [ 2 ] ] <nl> + feature . names < - colnames ( agaricus . train $ data ) <nl> <nl> test_that ( " xgb . dump works " , { <nl> capture . output ( print ( xgb . dump ( bst . Tree ) ) ) <nl> test_that ( " xgb - attribute functionality " , { <nl> } ) <nl> <nl> test_that ( " xgb . model . dt . tree works with and without feature names " , { <nl> - names . dt . trees < - c ( " ID " , " Feature " , " Split " , " Yes " , " No " , " Missing " , " Quality " , " Cover " , <nl> - " Tree " , " Yes . Feature " , " Yes . Cover " , " Yes . Quality " , " No . Feature " , " No . Cover " , " No . Quality " ) <nl> + names . dt . trees < - c ( " Tree " , " Node " , " ID " , " Feature " , " Split " , " Yes " , " No " , " Missing " , " Quality " , " Cover " ) <nl> dt . tree < - xgb . model . dt . tree ( feature_names = feature . names , model = bst . Tree ) <nl> expect_equal ( names . dt . trees , names ( dt . tree ) ) <nl> - expect_equal ( dim ( dt . tree ) , c ( 162 , 15 ) ) <nl> + expect_equal ( dim ( dt . tree ) , c ( 162 , 10 ) ) <nl> xgb . model . dt . tree ( model = bst . Tree ) <nl> } ) <nl> <nl>
Merge pull request from khotilov / parsing_speedup
dmlc/xgboost
51154f42fe0c09c9597b639d086f69cdaa5c6fa8
2016-05-17T15:48:11Z
mmm a / tensorflow / python / feature_column / feature_column_v2 . py <nl> ppp b / tensorflow / python / feature_column / feature_column_v2 . py <nl> <nl> import collections <nl> import math <nl> <nl> + import re <nl> import numpy as np <nl> import six <nl> <nl> def build ( self , _ ) : <nl> with variable_scope . _pure_variable_scope ( # pylint : disable = protected - access <nl> self . name , <nl> partitioner = self . _partitioner ) : <nl> - with variable_scope . _pure_variable_scope ( column . name ) : # pylint : disable = protected - access <nl> + with variable_scope . _pure_variable_scope ( # pylint : disable = protected - access <nl> + _sanitize_column_name_for_variable_scope ( column . name ) ) : <nl> column . create_state ( self . _state_manager ) <nl> super ( _BaseFeaturesLayer , self ) . build ( None ) <nl> <nl> def build ( self , _ ) : <nl> # the ops . <nl> with variable_scope . _pure_variable_scope ( self . name ) : # pylint : disable = protected - access <nl> for column in self . _feature_columns : <nl> - with variable_scope . _pure_variable_scope ( column . name ) : # pylint : disable = protected - access <nl> + with variable_scope . _pure_variable_scope ( # pylint : disable = protected - access <nl> + _sanitize_column_name_for_variable_scope ( column . name ) ) : <nl> # Create the state for each feature column <nl> column . create_state ( self . _state_manager ) <nl> <nl> def call ( self , features ) : <nl> transformation_cache = FeatureTransformationCache ( features ) <nl> weighted_sums = [ ] <nl> for column in self . _feature_columns : <nl> - with ops . name_scope ( column . name ) : <nl> + with ops . name_scope ( <nl> + _sanitize_column_name_for_variable_scope ( column . name ) ) : <nl> # All the weights used in the linear model are owned by the state <nl> # manager associated with this Linear Model . <nl> weight_var = self . _state_manager . get_variable ( column , ' weights ' ) <nl> def _transform_features_v2 ( features , feature_columns , state_manager ) : <nl> None , default_name = ' transform_features ' , values = features . values ( ) ) : <nl> transformation_cache = FeatureTransformationCache ( features ) <nl> for column in feature_columns : <nl> - with ops . name_scope ( None , default_name = column . name ) : <nl> + with ops . name_scope ( <nl> + None , <nl> + default_name = _sanitize_column_name_for_variable_scope ( column . name ) ) : <nl> outputs [ column ] = transformation_cache . get ( column , state_manager ) <nl> return outputs <nl> <nl> def _standardize_and_copy_config ( config ) : <nl> kwargs [ k ] = tuple ( v ) <nl> <nl> return kwargs <nl> + <nl> + <nl> + def _sanitize_column_name_for_variable_scope ( name ) : <nl> + " " " Sanitizes user - provided feature names for use as variable scopes . " " " <nl> + invalid_char = re . compile ( ' [ ^ A - Za - z0 - 9_ . \ \ - ] ' ) <nl> + return invalid_char . sub ( ' _ ' , name ) <nl> mmm a / tensorflow / python / feature_column / feature_column_v2_test . py <nl> ppp b / tensorflow / python / feature_column / feature_column_v2_test . py <nl> def test_linear_model ( self ) : <nl> sess . run ( price_var . assign ( [ [ 10 . ] ] ) ) <nl> self . assertAllClose ( [ [ 10 . ] , [ 50 . ] ] , self . evaluate ( predictions ) ) <nl> <nl> + @ test_util . run_deprecated_v1 <nl> + def test_linear_model_sanitizes_scope_names ( self ) : <nl> + price = fc . numeric_column ( ' price > 100 ' ) <nl> + with ops . Graph ( ) . as_default ( ) : <nl> + features = { ' price > 100 ' : [ [ 1 . ] , [ 5 . ] ] } <nl> + model = fc . LinearModel ( [ price ] ) <nl> + predictions = model ( features ) <nl> + price_var , bias = model . variables <nl> + with _initialized_session ( ) as sess : <nl> + self . assertAllClose ( [ 0 . ] , self . evaluate ( bias ) ) <nl> + self . assertAllClose ( [ [ 0 . ] ] , self . evaluate ( price_var ) ) <nl> + self . assertAllClose ( [ [ 0 . ] , [ 0 . ] ] , self . evaluate ( predictions ) ) <nl> + sess . run ( price_var . assign ( [ [ 10 . ] ] ) ) <nl> + self . assertAllClose ( [ [ 10 . ] , [ 50 . ] ] , self . evaluate ( predictions ) ) <nl> + <nl> def test_old_linear_model ( self ) : <nl> price = fc . numeric_column ( ' price ' ) <nl> with ops . Graph ( ) . as_default ( ) : <nl>
Sanitize feature names when using as variable scopes
tensorflow/tensorflow
9246e14648c1345a8c4d13eb98e2b781c62590c6
2020-01-07T22:30:59Z
mmm a / src / core / reporter . cpp <nl> ppp b / src / core / reporter . cpp <nl> json GetHLEBufferDescriptorData ( const std : : vector < DescriptorType > & buffer ) { <nl> if constexpr ( read_value ) { <nl> std : : vector < u8 > data ( desc . Size ( ) ) ; <nl> Memory : : ReadBlock ( desc . Address ( ) , data . data ( ) , desc . Size ( ) ) ; <nl> - entry [ " data " ] = Common : : HexVectorToString ( data ) ; <nl> + entry [ " data " ] = Common : : HexToString ( data ) ; <nl> } <nl> <nl> buffer_out . push_back ( std : : move ( entry ) ) ; <nl> void Reporter : : SaveSvcBreakReport ( u32 type , bool signal_debugger , u64 info1 , u64 <nl> } ; <nl> <nl> if ( resolved_buffer . has_value ( ) ) { <nl> - break_out [ " debug_buffer " ] = Common : : HexVectorToString ( * resolved_buffer ) ; <nl> + break_out [ " debug_buffer " ] = Common : : HexToString ( * resolved_buffer ) ; <nl> } <nl> <nl> out [ " svc_break " ] = std : : move ( break_out ) ; <nl> void Reporter : : SaveUnimplementedAppletReport ( <nl> <nl> auto normal_out = json : : array ( ) ; <nl> for ( const auto & data : normal_channel ) { <nl> - normal_out . push_back ( Common : : HexVectorToString ( data ) ) ; <nl> + normal_out . push_back ( Common : : HexToString ( data ) ) ; <nl> } <nl> <nl> auto interactive_out = json : : array ( ) ; <nl> for ( const auto & data : interactive_channel ) { <nl> - interactive_out . push_back ( Common : : HexVectorToString ( data ) ) ; <nl> + interactive_out . push_back ( Common : : HexToString ( data ) ) ; <nl> } <nl> <nl> out [ " applet_normal_data " ] = std : : move ( normal_out ) ; <nl> void Reporter : : SavePlayReport ( u64 title_id , u64 process_id , std : : vector < std : : vec <nl> <nl> auto data_out = json : : array ( ) ; <nl> for ( const auto & d : data ) { <nl> - data_out . push_back ( Common : : HexVectorToString ( d ) ) ; <nl> + data_out . push_back ( Common : : HexToString ( d ) ) ; <nl> } <nl> <nl> out [ " play_report_process_id " ] = fmt : : format ( " { : 016X } " , process_id ) ; <nl>
Update reporter . cpp
yuzu-emu/yuzu
334e6370f9f507bc87f88022bc2b72bcb1c7cdae
2019-06-22T13:39:52Z
mmm a / trunk / conf / full . conf <nl> ppp b / trunk / conf / full . conf <nl> http_api { <nl> http_stream { <nl> # whether http streaming service is enabled . <nl> # default : off <nl> - enabled on ; <nl> + enabled on ; <nl> # the http streaming port <nl> - # default : 80 <nl> - listen 80 ; <nl> + # @ remark , if use lower port , for instance 80 , user must start srs by root . <nl> + # default : 8080 <nl> + listen 8080 ; <nl> } <nl> <nl> # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # <nl> mmm a / trunk / configure <nl> ppp b / trunk / configure <nl> RTMP_OBJS = " $ { MODULE_OBJS [ @ ] } " <nl> MODULE_ID = " APP " <nl> MODULE_DEPENDS = ( " CORE " " KERNEL " " RTMP " ) <nl> ModuleLibIncs = ( $ { LibSTRoot } $ { LibHttpParserRoot } $ { SRS_OBJS } ) <nl> - MODULE_FILES = ( " srs_app_server " " srs_app_conn " " srs_app_client " " srs_app_socket " " srs_app_source " <nl> + MODULE_FILES = ( " srs_app_server " " srs_app_conn " " srs_app_rtmp_conn " " srs_app_socket " " srs_app_source " <nl> " srs_app_codec " " srs_app_refer " " srs_app_hls " " srs_app_forward " " srs_app_encoder " <nl> " srs_app_http " " srs_app_thread " " srs_app_bandwidth " " srs_app_st " " srs_app_log " <nl> - " srs_app_config " " srs_app_pithy_print " " srs_app_reload " ) <nl> + " srs_app_config " " srs_app_pithy_print " " srs_app_reload " " srs_app_http_api " <nl> + " srs_app_http_conn " ) <nl> APP_INCS = " src / app " ; MODULE_DIR = $ { APP_INCS } . auto / modules . sh <nl> APP_OBJS = " $ { MODULE_OBJS [ @ ] } " <nl> # <nl> mmm a / trunk / src / app / srs_app_config . cpp <nl> ppp b / trunk / src / app / srs_app_config . cpp <nl> double SrsConfig : : get_hls_window ( string vhost ) <nl> return : : atof ( conf - > arg0 ( ) . c_str ( ) ) ; <nl> } <nl> <nl> + SrsConfDirective * SrsConfig : : get_http_api ( ) <nl> + { <nl> + return root - > get ( " http_api " ) ; <nl> + } <nl> + <nl> + bool SrsConfig : : get_http_api_enabled ( ) <nl> + { <nl> + SrsConfDirective * conf = get_http_api ( ) ; <nl> + <nl> + if ( ! conf ) { <nl> + return false ; <nl> + } <nl> + <nl> + conf = conf - > get ( " enabled " ) ; <nl> + if ( conf & & conf - > arg0 ( ) = = " on " ) { <nl> + return true ; <nl> + } <nl> + <nl> + return false ; <nl> + } <nl> + <nl> + int SrsConfig : : get_http_api_listen ( ) <nl> + { <nl> + SrsConfDirective * conf = get_http_api ( ) ; <nl> + <nl> + if ( conf ) { <nl> + conf = conf - > get ( " listen " ) ; <nl> + <nl> + if ( conf & & ! conf - > arg0 ( ) . empty ( ) ) { <nl> + return : : atoi ( conf - > arg0 ( ) . c_str ( ) ) ; <nl> + } <nl> + } <nl> + <nl> + return 1985 ; <nl> + } <nl> + <nl> + SrsConfDirective * SrsConfig : : get_http_stream ( ) <nl> + { <nl> + return root - > get ( " http_stream " ) ; <nl> + } <nl> + <nl> + bool SrsConfig : : get_http_stream_enabled ( ) <nl> + { <nl> + SrsConfDirective * conf = get_http_stream ( ) ; <nl> + <nl> + if ( ! conf ) { <nl> + return false ; <nl> + } <nl> + <nl> + conf = conf - > get ( " enabled " ) ; <nl> + <nl> + if ( conf & & conf - > arg0 ( ) = = " on " ) { <nl> + return true ; <nl> + } <nl> + <nl> + return false ; <nl> + } <nl> + <nl> + int SrsConfig : : get_http_stream_listen ( ) <nl> + { <nl> + SrsConfDirective * conf = get_http_stream ( ) ; <nl> + <nl> + if ( conf ) { <nl> + conf = conf - > get ( " listen " ) ; <nl> + <nl> + if ( conf & & ! conf - > arg0 ( ) . empty ( ) ) { <nl> + return : : atoi ( conf - > arg0 ( ) . c_str ( ) ) ; <nl> + } <nl> + } <nl> + <nl> + return 8080 ; <nl> + } <nl> + <nl> SrsConfDirective * SrsConfig : : get_refer ( string vhost ) <nl> { <nl> SrsConfDirective * conf = get_vhost ( vhost ) ; <nl> mmm a / trunk / src / app / srs_app_config . hpp <nl> ppp b / trunk / src / app / srs_app_config . hpp <nl> class SrsConfig <nl> virtual bool get_atc ( std : : string vhost ) ; <nl> virtual double get_queue_length ( std : : string vhost ) ; <nl> virtual SrsConfDirective * get_forward ( std : : string vhost ) ; <nl> + / / hls section <nl> private : <nl> virtual SrsConfDirective * get_hls ( std : : string vhost ) ; <nl> public : <nl> class SrsConfig <nl> virtual std : : string get_hls_path ( std : : string vhost ) ; <nl> virtual double get_hls_fragment ( std : : string vhost ) ; <nl> virtual double get_hls_window ( std : : string vhost ) ; <nl> + / / http api section <nl> + private : <nl> + virtual SrsConfDirective * get_http_api ( ) ; <nl> + public : <nl> + virtual bool get_http_api_enabled ( ) ; <nl> + virtual int get_http_api_listen ( ) ; <nl> + / / http stream section <nl> + private : <nl> + virtual SrsConfDirective * get_http_stream ( ) ; <nl> + public : <nl> + virtual bool get_http_stream_enabled ( ) ; <nl> + virtual int get_http_stream_listen ( ) ; <nl> + / / others <nl> + public : <nl> virtual SrsConfDirective * get_refer ( std : : string vhost ) ; <nl> virtual SrsConfDirective * get_refer_play ( std : : string vhost ) ; <nl> virtual SrsConfDirective * get_refer_publish ( std : : string vhost ) ; <nl> new file mode 100644 <nl> index 000000000 . . 369ffa04c <nl> mmm / dev / null <nl> ppp b / trunk / src / app / srs_app_http_api . cpp <nl> <nl> + / * <nl> + The MIT License ( MIT ) <nl> + <nl> + Copyright ( c ) 2013 - 2014 winlin <nl> + <nl> + Permission is hereby granted , free of charge , to any person obtaining a copy of <nl> + this software and associated documentation files ( the " Software " ) , to deal in <nl> + the Software without restriction , including without limitation the rights to <nl> + use , copy , modify , merge , publish , distribute , sublicense , and / or sell copies of <nl> + the Software , and to permit persons to whom the Software is furnished to do so , <nl> + subject to the following conditions : <nl> + <nl> + The above copyright notice and this permission notice shall be included in all <nl> + copies or substantial portions of the Software . <nl> + <nl> + THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR <nl> + IMPLIED , INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY , FITNESS <nl> + FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT . IN NO EVENT SHALL THE AUTHORS OR <nl> + COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM , DAMAGES OR OTHER LIABILITY , WHETHER <nl> + IN AN ACTION OF CONTRACT , TORT OR OTHERWISE , ARISING FROM , OUT OF OR IN <nl> + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE . <nl> + * / <nl> + <nl> + # include < srs_app_http_api . hpp > <nl> + <nl> + SrsHttpApi : : SrsHttpApi ( ) { <nl> + } <nl> + <nl> + SrsHttpApi : : ~ SrsHttpApi ( ) { <nl> + } <nl> new file mode 100644 <nl> index 000000000 . . c77393458 <nl> mmm / dev / null <nl> ppp b / trunk / src / app / srs_app_http_api . hpp <nl> <nl> + / * <nl> + The MIT License ( MIT ) <nl> + <nl> + Copyright ( c ) 2013 - 2014 winlin <nl> + <nl> + Permission is hereby granted , free of charge , to any person obtaining a copy of <nl> + this software and associated documentation files ( the " Software " ) , to deal in <nl> + the Software without restriction , including without limitation the rights to <nl> + use , copy , modify , merge , publish , distribute , sublicense , and / or sell copies of <nl> + the Software , and to permit persons to whom the Software is furnished to do so , <nl> + subject to the following conditions : <nl> + <nl> + The above copyright notice and this permission notice shall be included in all <nl> + copies or substantial portions of the Software . <nl> + <nl> + THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR <nl> + IMPLIED , INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY , FITNESS <nl> + FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT . IN NO EVENT SHALL THE AUTHORS OR <nl> + COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM , DAMAGES OR OTHER LIABILITY , WHETHER <nl> + IN AN ACTION OF CONTRACT , TORT OR OTHERWISE , ARISING FROM , OUT OF OR IN <nl> + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE . <nl> + * / <nl> + <nl> + # ifndef SRS_APP_HTTP_API_HPP <nl> + # define SRS_APP_HTTP_API_HPP <nl> + <nl> + / * <nl> + # include < srs_app_http_api . hpp > <nl> + * / <nl> + <nl> + # include < srs_core . hpp > <nl> + <nl> + class SrsHttpApi <nl> + { <nl> + public : <nl> + SrsHttpApi ( ) ; <nl> + virtual ~ SrsHttpApi ( ) ; <nl> + } ; <nl> + <nl> + # endif <nl> new file mode 100644 <nl> index 000000000 . . 256a043c1 <nl> mmm / dev / null <nl> ppp b / trunk / src / app / srs_app_http_conn . cpp <nl> <nl> + / * <nl> + The MIT License ( MIT ) <nl> + <nl> + Copyright ( c ) 2013 - 2014 winlin <nl> + <nl> + Permission is hereby granted , free of charge , to any person obtaining a copy of <nl> + this software and associated documentation files ( the " Software " ) , to deal in <nl> + the Software without restriction , including without limitation the rights to <nl> + use , copy , modify , merge , publish , distribute , sublicense , and / or sell copies of <nl> + the Software , and to permit persons to whom the Software is furnished to do so , <nl> + subject to the following conditions : <nl> + <nl> + The above copyright notice and this permission notice shall be included in all <nl> + copies or substantial portions of the Software . <nl> + <nl> + THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR <nl> + IMPLIED , INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY , FITNESS <nl> + FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT . IN NO EVENT SHALL THE AUTHORS OR <nl> + COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM , DAMAGES OR OTHER LIABILITY , WHETHER <nl> + IN AN ACTION OF CONTRACT , TORT OR OTHERWISE , ARISING FROM , OUT OF OR IN <nl> + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE . <nl> + * / <nl> + <nl> + # include < srs_app_http_conn . hpp > <nl> new file mode 100644 <nl> index 000000000 . . db6a805d1 <nl> mmm / dev / null <nl> ppp b / trunk / src / app / srs_app_http_conn . hpp <nl> <nl> + / * <nl> + The MIT License ( MIT ) <nl> + <nl> + Copyright ( c ) 2013 - 2014 winlin <nl> + <nl> + Permission is hereby granted , free of charge , to any person obtaining a copy of <nl> + this software and associated documentation files ( the " Software " ) , to deal in <nl> + the Software without restriction , including without limitation the rights to <nl> + use , copy , modify , merge , publish , distribute , sublicense , and / or sell copies of <nl> + the Software , and to permit persons to whom the Software is furnished to do so , <nl> + subject to the following conditions : <nl> + <nl> + The above copyright notice and this permission notice shall be included in all <nl> + copies or substantial portions of the Software . <nl> + <nl> + THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR <nl> + IMPLIED , INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY , FITNESS <nl> + FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT . IN NO EVENT SHALL THE AUTHORS OR <nl> + COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM , DAMAGES OR OTHER LIABILITY , WHETHER <nl> + IN AN ACTION OF CONTRACT , TORT OR OTHERWISE , ARISING FROM , OUT OF OR IN <nl> + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE . <nl> + * / <nl> + <nl> + # ifndef SRS_APP_HTTP_CONN_HPP <nl> + # define SRS_APP_HTTP_CONN_HPP <nl> + <nl> + / * <nl> + # include < srs_app_http_conn . hpp > <nl> + * / <nl> + <nl> + # include < srs_core . hpp > <nl> + <nl> + class SrsHttpConn <nl> + { <nl> + public : <nl> + SrsHttpConn ( ) ; <nl> + virtual ~ SrsHttpConn ( ) ; <nl> + } ; <nl> + <nl> + # endif <nl> old mode 100755 <nl> new mode 100644 <nl> similarity index 96 % <nl> rename from trunk / src / app / srs_app_client . cpp <nl> rename to trunk / src / app / srs_app_rtmp_conn . cpp <nl> index f1fc5b4a6 . . 5e5110fb1 <nl> mmm a / trunk / src / app / srs_app_client . cpp <nl> ppp b / trunk / src / app / srs_app_rtmp_conn . cpp <nl> <nl> - / * <nl> - The MIT License ( MIT ) <nl> - <nl> - Copyright ( c ) 2013 - 2014 winlin <nl> - <nl> - Permission is hereby granted , free of charge , to any person obtaining a copy of <nl> - this software and associated documentation files ( the " Software " ) , to deal in <nl> - the Software without restriction , including without limitation the rights to <nl> - use , copy , modify , merge , publish , distribute , sublicense , and / or sell copies of <nl> - the Software , and to permit persons to whom the Software is furnished to do so , <nl> - subject to the following conditions : <nl> - <nl> - The above copyright notice and this permission notice shall be included in all <nl> - copies or substantial portions of the Software . <nl> - <nl> - THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR <nl> - IMPLIED , INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY , FITNESS <nl> - FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT . IN NO EVENT SHALL THE AUTHORS OR <nl> - COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM , DAMAGES OR OTHER LIABILITY , WHETHER <nl> - IN AN ACTION OF CONTRACT , TORT OR OTHERWISE , ARISING FROM , OUT OF OR IN <nl> - CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE . <nl> - * / <nl> - <nl> - # include < srs_app_client . hpp > <nl> - <nl> - # include < arpa / inet . h > <nl> - # include < stdlib . h > <nl> - <nl> - using namespace std ; <nl> - <nl> - # include < srs_kernel_error . hpp > <nl> - # include < srs_kernel_log . hpp > <nl> - # include < srs_protocol_rtmp . hpp > <nl> - # include < srs_protocol_rtmp_stack . hpp > <nl> - # include < srs_core_autofree . hpp > <nl> - # include < srs_app_source . hpp > <nl> - # include < srs_app_server . hpp > <nl> - # include < srs_app_pithy_print . hpp > <nl> - # include < srs_app_config . hpp > <nl> - # include < srs_app_refer . hpp > <nl> - # include < srs_app_hls . hpp > <nl> - # include < srs_app_http . hpp > <nl> - # include < srs_app_bandwidth . hpp > <nl> - # include < srs_app_socket . hpp > <nl> - <nl> - SrsClient : : SrsClient ( SrsServer * srs_server , st_netfd_t client_stfd ) <nl> - : SrsConnection ( srs_server , client_stfd ) <nl> - { <nl> - ip = NULL ; <nl> - req = new SrsRequest ( ) ; <nl> - res = new SrsResponse ( ) ; <nl> - skt = new SrsSocket ( client_stfd ) ; <nl> - rtmp = new SrsRtmpServer ( skt ) ; <nl> - refer = new SrsRefer ( ) ; <nl> - # ifdef SRS_HTTP_CALLBACK <nl> - http_hooks = new SrsHttpHooks ( ) ; <nl> - # endif <nl> - bandwidth = new SrsBandwidth ( ) ; <nl> - <nl> - _srs_config - > subscribe ( this ) ; <nl> - } <nl> - <nl> - SrsClient : : ~ SrsClient ( ) <nl> - { <nl> - _srs_config - > unsubscribe ( this ) ; <nl> - <nl> - srs_freepa ( ip ) ; <nl> - srs_freep ( req ) ; <nl> - srs_freep ( res ) ; <nl> - srs_freep ( rtmp ) ; <nl> - srs_freep ( skt ) ; <nl> - srs_freep ( refer ) ; <nl> - # ifdef SRS_HTTP_CALLBACK <nl> - srs_freep ( http_hooks ) ; <nl> - # endif <nl> - srs_freep ( bandwidth ) ; <nl> - } <nl> - <nl> - / / TODO : return detail message when error for client . <nl> - int SrsClient : : do_cycle ( ) <nl> - { <nl> - int ret = ERROR_SUCCESS ; <nl> - <nl> - if ( ( ret = get_peer_ip ( ) ) ! = ERROR_SUCCESS ) { <nl> - srs_error ( " get peer ip failed . ret = % d " , ret ) ; <nl> - return ret ; <nl> - } <nl> - srs_trace ( " get peer ip success . ip = % s , send_to = % " PRId64 " , recv_to = % " PRId64 " " , <nl> - ip , SRS_SEND_TIMEOUT_US , SRS_RECV_TIMEOUT_US ) ; <nl> - <nl> - rtmp - > set_recv_timeout ( SRS_RECV_TIMEOUT_US ) ; <nl> - rtmp - > set_send_timeout ( SRS_SEND_TIMEOUT_US ) ; <nl> - <nl> - if ( ( ret = rtmp - > handshake ( ) ) ! = ERROR_SUCCESS ) { <nl> - srs_error ( " rtmp handshake failed . ret = % d " , ret ) ; <nl> - return ret ; <nl> - } <nl> - srs_verbose ( " rtmp handshake success " ) ; <nl> - <nl> - if ( ( ret = rtmp - > connect_app ( req ) ) ! = ERROR_SUCCESS ) { <nl> - srs_error ( " rtmp connect vhost / app failed . ret = % d " , ret ) ; <nl> - return ret ; <nl> - } <nl> - srs_verbose ( " rtmp connect app success " ) ; <nl> - <nl> - / / discovery vhost , resolve the vhost from config <nl> - SrsConfDirective * parsed_vhost = _srs_config - > get_vhost ( req - > vhost ) ; <nl> - if ( parsed_vhost ) { <nl> - req - > vhost = parsed_vhost - > arg0 ( ) ; <nl> - } <nl> - <nl> - srs_info ( " discovery app success . schema = % s , vhost = % s , port = % s , app = % s " , <nl> - req - > schema . c_str ( ) , req - > vhost . c_str ( ) , req - > port . c_str ( ) , req - > app . c_str ( ) ) ; <nl> - <nl> - if ( req - > schema . empty ( ) | | req - > vhost . empty ( ) | | req - > port . empty ( ) | | req - > app . empty ( ) ) { <nl> - ret = ERROR_RTMP_REQ_TCURL ; <nl> - srs_error ( " discovery tcUrl failed . " <nl> - " tcUrl = % s , schema = % s , vhost = % s , port = % s , app = % s , ret = % d " , <nl> - req - > tcUrl . c_str ( ) , req - > schema . c_str ( ) , req - > vhost . c_str ( ) , req - > port . c_str ( ) , req - > app . c_str ( ) , ret ) ; <nl> - return ret ; <nl> - } <nl> - <nl> - / / check vhost <nl> - if ( ( ret = check_vhost ( ) ) ! = ERROR_SUCCESS ) { <nl> - srs_error ( " check vhost failed . ret = % d " , ret ) ; <nl> - return ret ; <nl> - } <nl> - srs_verbose ( " check vhost success . " ) ; <nl> - <nl> - srs_trace ( " rtmp connect app success . " <nl> - " tcUrl = % s , pageUrl = % s , swfUrl = % s , schema = % s , vhost = % s , port = % s , app = % s " , <nl> - req - > tcUrl . c_str ( ) , req - > pageUrl . c_str ( ) , req - > swfUrl . c_str ( ) , <nl> - req - > schema . c_str ( ) , req - > vhost . c_str ( ) , req - > port . c_str ( ) , <nl> - req - > app . c_str ( ) ) ; <nl> - <nl> - ret = service_cycle ( ) ; <nl> - on_close ( ) ; <nl> - <nl> - return ret ; <nl> - } <nl> - <nl> - int SrsClient : : on_reload_vhost_removed ( string vhost ) <nl> - { <nl> - int ret = ERROR_SUCCESS ; <nl> - <nl> - if ( req - > vhost ! = vhost ) { <nl> - return ret ; <nl> - } <nl> - <nl> - / / if the vhost connected is removed , disconnect the client . <nl> - srs_trace ( " vhost % s removed / disabled , close client url = % s " , <nl> - vhost . c_str ( ) , req - > get_stream_url ( ) . c_str ( ) ) ; <nl> - <nl> - srs_close_stfd ( stfd ) ; <nl> - <nl> - return ret ; <nl> - } <nl> - <nl> - int SrsClient : : service_cycle ( ) <nl> - { <nl> - int ret = ERROR_SUCCESS ; <nl> - <nl> - if ( ( ret = rtmp - > set_window_ack_size ( 2 . 5 * 1000 * 1000 ) ) ! = ERROR_SUCCESS ) { <nl> - srs_error ( " set window acknowledgement size failed . ret = % d " , ret ) ; <nl> - return ret ; <nl> - } <nl> - srs_verbose ( " set window acknowledgement size success " ) ; <nl> - <nl> - if ( ( ret = rtmp - > set_peer_bandwidth ( 2 . 5 * 1000 * 1000 , 2 ) ) ! = ERROR_SUCCESS ) { <nl> - srs_error ( " set peer bandwidth failed . ret = % d " , ret ) ; <nl> - return ret ; <nl> - } <nl> - srs_verbose ( " set peer bandwidth success " ) ; <nl> - <nl> - / / do bandwidth test if connect to the vhost which is for bandwidth check . <nl> - if ( _srs_config - > get_bw_check_enabled ( req - > vhost ) ) { <nl> - return bandwidth - > bandwidth_test ( req , stfd , rtmp ) ; <nl> - } <nl> - <nl> - if ( ( ret = rtmp - > response_connect_app ( req ) ) ! = ERROR_SUCCESS ) { <nl> - srs_error ( " response connect app failed . ret = % d " , ret ) ; <nl> - return ret ; <nl> - } <nl> - srs_verbose ( " response connect app success " ) ; <nl> - <nl> - if ( ( ret = rtmp - > on_bw_done ( ) ) ! = ERROR_SUCCESS ) { <nl> - srs_error ( " on_bw_done failed . ret = % d " , ret ) ; <nl> - return ret ; <nl> - } <nl> - srs_verbose ( " on_bw_done success " ) ; <nl> - <nl> - while ( true ) { <nl> - ret = stream_service_cycle ( ) ; <nl> - <nl> - / / stream service must terminated with error , never success . <nl> - srs_assert ( ret ! = ERROR_SUCCESS ) ; <nl> - <nl> - / / when not system control error , fatal error , return . <nl> - if ( ! srs_is_system_control_error ( ret ) ) { <nl> - if ( ret ! = ERROR_SOCKET_TIMEOUT & & ! srs_is_client_gracefully_close ( ret ) ) { <nl> - srs_error ( " stream service cycle failed . ret = % d " , ret ) ; <nl> - } <nl> - return ret ; <nl> - } <nl> - <nl> - / / for republish , continue service <nl> - if ( ret = = ERROR_CONTROL_REPUBLISH ) { <nl> - / / set timeout to a larger value , wait for encoder to republish . <nl> - rtmp - > set_send_timeout ( SRS_REPUBLISH_RECV_TIMEOUT_US ) ; <nl> - rtmp - > set_recv_timeout ( SRS_REPUBLISH_SEND_TIMEOUT_US ) ; <nl> - <nl> - srs_trace ( " control message ( unpublish ) accept , retry stream service . " ) ; <nl> - continue ; <nl> - } <nl> - <nl> - / / for " some " system control error , <nl> - / / logical accept and retry stream service . <nl> - if ( ret = = ERROR_CONTROL_RTMP_CLOSE ) { <nl> - / / set timeout to a larger value , for user paused . <nl> - rtmp - > set_recv_timeout ( SRS_PAUSED_RECV_TIMEOUT_US ) ; <nl> - rtmp - > set_send_timeout ( SRS_PAUSED_SEND_TIMEOUT_US ) ; <nl> - <nl> - srs_trace ( " control message ( close ) accept , retry stream service . " ) ; <nl> - continue ; <nl> - } <nl> - <nl> - / / for other system control message , fatal error . <nl> - srs_error ( " control message ( % d ) reject as error . ret = % d " , ret , ret ) ; <nl> - return ret ; <nl> - } <nl> - <nl> - return ret ; <nl> - } <nl> - <nl> - int SrsClient : : stream_service_cycle ( ) <nl> - { <nl> - int ret = ERROR_SUCCESS ; <nl> - <nl> - SrsClientType type ; <nl> - if ( ( ret = rtmp - > identify_client ( res - > stream_id , type , req - > stream ) ) ! = ERROR_SUCCESS ) { <nl> - srs_error ( " identify client failed . ret = % d " , ret ) ; <nl> - return ret ; <nl> - } <nl> - req - > strip ( ) ; <nl> - srs_trace ( " identify client success . type = % s , stream_name = % s " , <nl> - srs_client_type_string ( type ) . c_str ( ) , req - > stream . c_str ( ) ) ; <nl> - <nl> - / / client is identified , set the timeout to service timeout . <nl> - rtmp - > set_recv_timeout ( SRS_RECV_TIMEOUT_US ) ; <nl> - rtmp - > set_send_timeout ( SRS_SEND_TIMEOUT_US ) ; <nl> - <nl> - / / set chunk size to larger . <nl> - int chunk_size = _srs_config - > get_chunk_size ( req - > vhost ) ; <nl> - if ( ( ret = rtmp - > set_chunk_size ( chunk_size ) ) ! = ERROR_SUCCESS ) { <nl> - srs_error ( " set chunk_size = % d failed . ret = % d " , chunk_size , ret ) ; <nl> - return ret ; <nl> - } <nl> - srs_trace ( " set chunk_size = % d success " , chunk_size ) ; <nl> - <nl> - / / find a source to serve . <nl> - SrsSource * source = SrsSource : : find ( req ) ; <nl> - srs_assert ( source ! = NULL ) ; <nl> - <nl> - / / check publish available . <nl> - if ( type ! = SrsClientPlay & & ! source - > can_publish ( ) ) { <nl> - ret = ERROR_SYSTEM_STREAM_BUSY ; <nl> - srs_warn ( " stream % s is already publishing . ret = % d " , <nl> - req - > get_stream_url ( ) . c_str ( ) , ret ) ; <nl> - / / to delay request <nl> - st_usleep ( SRS_STREAM_BUSY_SLEEP_US ) ; <nl> - return ret ; <nl> - } <nl> - <nl> - bool enabled_cache = _srs_config - > get_gop_cache ( req - > vhost ) ; <nl> - srs_info ( " source found , url = % s , enabled_cache = % d " , req - > get_stream_url ( ) . c_str ( ) , enabled_cache ) ; <nl> - source - > set_cache ( enabled_cache ) ; <nl> - <nl> - switch ( type ) { <nl> - case SrsClientPlay : { <nl> - srs_verbose ( " start to play stream % s . " , req - > stream . c_str ( ) ) ; <nl> - <nl> - if ( ( ret = rtmp - > start_play ( res - > stream_id ) ) ! = ERROR_SUCCESS ) { <nl> - srs_error ( " start to play stream failed . ret = % d " , ret ) ; <nl> - return ret ; <nl> - } <nl> - if ( ( ret = on_play ( ) ) ! = ERROR_SUCCESS ) { <nl> - srs_error ( " http hook on_play failed . ret = % d " , ret ) ; <nl> - return ret ; <nl> - } <nl> - srs_info ( " start to play stream % s success " , req - > stream . c_str ( ) ) ; <nl> - ret = playing ( source ) ; <nl> - on_stop ( ) ; <nl> - return ret ; <nl> - } <nl> - case SrsClientFMLEPublish : { <nl> - srs_verbose ( " FMLE start to publish stream % s . " , req - > stream . c_str ( ) ) ; <nl> - <nl> - if ( ( ret = rtmp - > start_fmle_publish ( res - > stream_id ) ) ! = ERROR_SUCCESS ) { <nl> - srs_error ( " start to publish stream failed . ret = % d " , ret ) ; <nl> - return ret ; <nl> - } <nl> - if ( ( ret = on_publish ( ) ) ! = ERROR_SUCCESS ) { <nl> - srs_error ( " http hook on_publish failed . ret = % d " , ret ) ; <nl> - return ret ; <nl> - } <nl> - srs_info ( " start to publish stream % s success " , req - > stream . c_str ( ) ) ; <nl> - ret = fmle_publish ( source ) ; <nl> - source - > on_unpublish ( ) ; <nl> - on_unpublish ( ) ; <nl> - return ret ; <nl> - } <nl> - case SrsClientFlashPublish : { <nl> - srs_verbose ( " flash start to publish stream % s . " , req - > stream . c_str ( ) ) ; <nl> - <nl> - if ( ( ret = rtmp - > start_flash_publish ( res - > stream_id ) ) ! = ERROR_SUCCESS ) { <nl> - srs_error ( " flash start to publish stream failed . ret = % d " , ret ) ; <nl> - return ret ; <nl> - } <nl> - if ( ( ret = on_publish ( ) ) ! = ERROR_SUCCESS ) { <nl> - srs_error ( " http hook on_publish failed . ret = % d " , ret ) ; <nl> - return ret ; <nl> - } <nl> - srs_info ( " flash start to publish stream % s success " , req - > stream . c_str ( ) ) ; <nl> - ret = flash_publish ( source ) ; <nl> - source - > on_unpublish ( ) ; <nl> - on_unpublish ( ) ; <nl> - return ret ; <nl> - } <nl> - default : { <nl> - ret = ERROR_SYSTEM_CLIENT_INVALID ; <nl> - srs_info ( " invalid client type = % d . ret = % d " , type , ret ) ; <nl> - return ret ; <nl> - } <nl> - } <nl> - <nl> - return ret ; <nl> - } <nl> - <nl> - int SrsClient : : check_vhost ( ) <nl> - { <nl> - int ret = ERROR_SUCCESS ; <nl> - <nl> - srs_assert ( req ! = NULL ) ; <nl> - <nl> - SrsConfDirective * vhost = _srs_config - > get_vhost ( req - > vhost ) ; <nl> - if ( vhost = = NULL ) { <nl> - ret = ERROR_RTMP_VHOST_NOT_FOUND ; <nl> - srs_error ( " vhost % s not found . ret = % d " , req - > vhost . c_str ( ) , ret ) ; <nl> - return ret ; <nl> - } <nl> - <nl> - if ( ! _srs_config - > get_vhost_enabled ( req - > vhost ) ) { <nl> - ret = ERROR_RTMP_VHOST_NOT_FOUND ; <nl> - srs_error ( " vhost % s disabled . ret = % d " , req - > vhost . c_str ( ) , ret ) ; <nl> - return ret ; <nl> - } <nl> - <nl> - if ( req - > vhost ! = vhost - > arg0 ( ) ) { <nl> - srs_trace ( " vhost change from % s to % s " , req - > vhost . c_str ( ) , vhost - > arg0 ( ) . c_str ( ) ) ; <nl> - req - > vhost = vhost - > arg0 ( ) ; <nl> - } <nl> - <nl> - if ( ( ret = refer - > check ( req - > pageUrl , _srs_config - > get_refer ( req - > vhost ) ) ) ! = ERROR_SUCCESS ) { <nl> - srs_error ( " check refer failed . ret = % d " , ret ) ; <nl> - return ret ; <nl> - } <nl> - srs_verbose ( " check refer success . " ) ; <nl> - <nl> - if ( ( ret = on_connect ( ) ) ! = ERROR_SUCCESS ) { <nl> - return ret ; <nl> - } <nl> - <nl> - return ret ; <nl> - } <nl> - <nl> - int SrsClient : : playing ( SrsSource * source ) <nl> - { <nl> - int ret = ERROR_SUCCESS ; <nl> - <nl> - if ( ( ret = refer - > check ( req - > pageUrl , _srs_config - > get_refer_play ( req - > vhost ) ) ) ! = ERROR_SUCCESS ) { <nl> - srs_error ( " check play_refer failed . ret = % d " , ret ) ; <nl> - return ret ; <nl> - } <nl> - srs_verbose ( " check play_refer success . " ) ; <nl> - <nl> - SrsConsumer * consumer = NULL ; <nl> - if ( ( ret = source - > create_consumer ( consumer ) ) ! = ERROR_SUCCESS ) { <nl> - srs_error ( " create consumer failed . ret = % d " , ret ) ; <nl> - return ret ; <nl> - } <nl> - <nl> - srs_assert ( consumer ! = NULL ) ; <nl> - SrsAutoFree ( SrsConsumer , consumer , false ) ; <nl> - srs_verbose ( " consumer created success . " ) ; <nl> - <nl> - rtmp - > set_recv_timeout ( SRS_PULSE_TIMEOUT_US ) ; <nl> - <nl> - SrsPithyPrint pithy_print ( SRS_STAGE_PLAY_USER ) ; <nl> - <nl> - while ( true ) { <nl> - pithy_print . elapse ( SRS_PULSE_TIMEOUT_US / 1000 ) ; <nl> - <nl> - / / switch to other st - threads . <nl> - st_usleep ( 0 ) ; <nl> - <nl> - / / read from client . <nl> - int ctl_msg_ret = ERROR_SUCCESS ; <nl> - if ( true ) { <nl> - SrsCommonMessage * msg = NULL ; <nl> - ctl_msg_ret = ret = rtmp - > recv_message ( & msg ) ; <nl> - <nl> - srs_verbose ( " play loop recv message . ret = % d " , ret ) ; <nl> - if ( ret ! = ERROR_SUCCESS & & ret ! = ERROR_SOCKET_TIMEOUT ) { <nl> - if ( ret ! = ERROR_SOCKET_TIMEOUT & & ! srs_is_client_gracefully_close ( ret ) ) { <nl> - srs_error ( " recv client control message failed . ret = % d " , ret ) ; <nl> - } <nl> - return ret ; <nl> - } <nl> - if ( ( ret = process_play_control_msg ( consumer , msg ) ) ! = ERROR_SUCCESS ) { <nl> - if ( ! srs_is_system_control_error ( ret ) ) { <nl> - srs_error ( " process play control message failed . ret = % d " , ret ) ; <nl> - } <nl> - return ret ; <nl> - } <nl> - } <nl> - <nl> - / / get messages from consumer . <nl> - SrsSharedPtrMessage * * msgs = NULL ; <nl> - int count = 0 ; <nl> - if ( ( ret = consumer - > get_packets ( 0 , msgs , count ) ) ! = ERROR_SUCCESS ) { <nl> - srs_error ( " get messages from consumer failed . ret = % d " , ret ) ; <nl> - return ret ; <nl> - } <nl> - <nl> - / / reportable <nl> - if ( pithy_print . can_print ( ) ) { <nl> - srs_trace ( " - > time = % " PRId64 " , cmr = % d , msgs = % d , obytes = % " PRId64 " , ibytes = % " PRId64 " , okbps = % d , ikbps = % d " , <nl> - pithy_print . get_age ( ) , ctl_msg_ret , count , rtmp - > get_send_bytes ( ) , rtmp - > get_recv_bytes ( ) , rtmp - > get_send_kbps ( ) , rtmp - > get_recv_kbps ( ) ) ; <nl> - } <nl> - <nl> - if ( count < = 0 ) { <nl> - srs_verbose ( " no packets in queue . " ) ; <nl> - continue ; <nl> - } <nl> - SrsAutoFree ( SrsSharedPtrMessage * , msgs , true ) ; <nl> - <nl> - / / sendout messages <nl> - for ( int i = 0 ; i < count ; i + + ) { <nl> - SrsSharedPtrMessage * msg = msgs [ i ] ; <nl> - <nl> - / / the send_message will free the msg , <nl> - / / so set the msgs [ i ] to NULL . <nl> - msgs [ i ] = NULL ; <nl> - <nl> - if ( ( ret = rtmp - > send_message ( msg ) ) ! = ERROR_SUCCESS ) { <nl> - srs_error ( " send message to client failed . ret = % d " , ret ) ; <nl> - return ret ; <nl> - } <nl> - } <nl> - } <nl> - <nl> - return ret ; <nl> - } <nl> - <nl> - int SrsClient : : fmle_publish ( SrsSource * source ) <nl> - { <nl> - int ret = ERROR_SUCCESS ; <nl> - <nl> - if ( ( ret = refer - > check ( req - > pageUrl , _srs_config - > get_refer_publish ( req - > vhost ) ) ) ! = ERROR_SUCCESS ) { <nl> - srs_error ( " fmle check publish_refer failed . ret = % d " , ret ) ; <nl> - return ret ; <nl> - } <nl> - srs_verbose ( " fmle check publish_refer success . " ) ; <nl> - <nl> - SrsPithyPrint pithy_print ( SRS_STAGE_PUBLISH_USER ) ; <nl> - <nl> - / / notify the hls to prepare when publish start . <nl> - if ( ( ret = source - > on_publish ( req ) ) ! = ERROR_SUCCESS ) { <nl> - srs_error ( " fmle hls on_publish failed . ret = % d " , ret ) ; <nl> - return ret ; <nl> - } <nl> - srs_verbose ( " fmle hls on_publish success . " ) ; <nl> - <nl> - while ( true ) { <nl> - / / switch to other st - threads . <nl> - st_usleep ( 0 ) ; <nl> - <nl> - SrsCommonMessage * msg = NULL ; <nl> - if ( ( ret = rtmp - > recv_message ( & msg ) ) ! = ERROR_SUCCESS ) { <nl> - srs_error ( " fmle recv identify client message failed . ret = % d " , ret ) ; <nl> - return ret ; <nl> - } <nl> - <nl> - SrsAutoFree ( SrsCommonMessage , msg , false ) ; <nl> - <nl> - pithy_print . set_age ( msg - > header . timestamp ) ; <nl> - <nl> - / / reportable <nl> - if ( pithy_print . can_print ( ) ) { <nl> - srs_trace ( " < - time = % " PRId64 " , obytes = % " PRId64 " , ibytes = % " PRId64 " , okbps = % d , ikbps = % d " , <nl> - pithy_print . get_age ( ) , rtmp - > get_send_bytes ( ) , rtmp - > get_recv_bytes ( ) , rtmp - > get_send_kbps ( ) , rtmp - > get_recv_kbps ( ) ) ; <nl> - } <nl> - <nl> - / / process UnPublish event . <nl> - if ( msg - > header . is_amf0_command ( ) | | msg - > header . is_amf3_command ( ) ) { <nl> - if ( ( ret = msg - > decode_packet ( rtmp - > get_protocol ( ) ) ) ! = ERROR_SUCCESS ) { <nl> - srs_error ( " fmle decode unpublish message failed . ret = % d " , ret ) ; <nl> - return ret ; <nl> - } <nl> - <nl> - SrsPacket * pkt = msg - > get_packet ( ) ; <nl> - if ( dynamic_cast < SrsFMLEStartPacket * > ( pkt ) ) { <nl> - SrsFMLEStartPacket * unpublish = dynamic_cast < SrsFMLEStartPacket * > ( pkt ) ; <nl> - if ( ( ret = rtmp - > fmle_unpublish ( res - > stream_id , unpublish - > transaction_id ) ) ! = ERROR_SUCCESS ) { <nl> - return ret ; <nl> - } <nl> - return ERROR_CONTROL_REPUBLISH ; <nl> - } <nl> - <nl> - srs_trace ( " fmle ignore AMF0 / AMF3 command message . " ) ; <nl> - continue ; <nl> - } <nl> - <nl> - / / video , audio , data message <nl> - if ( ( ret = process_publish_message ( source , msg ) ) ! = ERROR_SUCCESS ) { <nl> - srs_error ( " fmle process publish message failed . ret = % d " , ret ) ; <nl> - return ret ; <nl> - } <nl> - } <nl> - <nl> - return ret ; <nl> - } <nl> - <nl> - int SrsClient : : flash_publish ( SrsSource * source ) <nl> - { <nl> - int ret = ERROR_SUCCESS ; <nl> - <nl> - if ( ( ret = refer - > check ( req - > pageUrl , _srs_config - > get_refer_publish ( req - > vhost ) ) ) ! = ERROR_SUCCESS ) { <nl> - srs_error ( " flash check publish_refer failed . ret = % d " , ret ) ; <nl> - return ret ; <nl> - } <nl> - srs_verbose ( " flash check publish_refer success . " ) ; <nl> - <nl> - SrsPithyPrint pithy_print ( SRS_STAGE_PUBLISH_USER ) ; <nl> - <nl> - / / notify the hls to prepare when publish start . <nl> - if ( ( ret = source - > on_publish ( req ) ) ! = ERROR_SUCCESS ) { <nl> - srs_error ( " flash hls on_publish failed . ret = % d " , ret ) ; <nl> - return ret ; <nl> - } <nl> - srs_verbose ( " flash hls on_publish success . " ) ; <nl> - <nl> - while ( true ) { <nl> - / / switch to other st - threads . <nl> - st_usleep ( 0 ) ; <nl> - <nl> - SrsCommonMessage * msg = NULL ; <nl> - if ( ( ret = rtmp - > recv_message ( & msg ) ) ! = ERROR_SUCCESS ) { <nl> - if ( ! srs_is_client_gracefully_close ( ret ) ) { <nl> - srs_error ( " flash recv identify client message failed . ret = % d " , ret ) ; <nl> - } <nl> - return ret ; <nl> - } <nl> - <nl> - SrsAutoFree ( SrsCommonMessage , msg , false ) ; <nl> - <nl> - pithy_print . set_age ( msg - > header . timestamp ) ; <nl> - <nl> - / / reportable <nl> - if ( pithy_print . can_print ( ) ) { <nl> - srs_trace ( " < - time = % " PRId64 " , obytes = % " PRId64 " , ibytes = % " PRId64 " , okbps = % d , ikbps = % d " , <nl> - pithy_print . get_age ( ) , rtmp - > get_send_bytes ( ) , rtmp - > get_recv_bytes ( ) , rtmp - > get_send_kbps ( ) , rtmp - > get_recv_kbps ( ) ) ; <nl> - } <nl> - <nl> - / / process UnPublish event . <nl> - if ( msg - > header . is_amf0_command ( ) | | msg - > header . is_amf3_command ( ) ) { <nl> - if ( ( ret = msg - > decode_packet ( rtmp - > get_protocol ( ) ) ) ! = ERROR_SUCCESS ) { <nl> - srs_error ( " flash decode unpublish message failed . ret = % d " , ret ) ; <nl> - return ret ; <nl> - } <nl> - <nl> - / / flash unpublish . <nl> - / / TODO : maybe need to support republish . <nl> - srs_trace ( " flash flash publish finished . " ) ; <nl> - return ERROR_CONTROL_REPUBLISH ; <nl> - } <nl> - <nl> - / / video , audio , data message <nl> - if ( ( ret = process_publish_message ( source , msg ) ) ! = ERROR_SUCCESS ) { <nl> - srs_error ( " flash process publish message failed . ret = % d " , ret ) ; <nl> - return ret ; <nl> - } <nl> - } <nl> - <nl> - return ret ; <nl> - } <nl> - <nl> - int SrsClient : : process_publish_message ( SrsSource * source , SrsCommonMessage * msg ) <nl> - { <nl> - int ret = ERROR_SUCCESS ; <nl> - <nl> - / / process audio packet <nl> - if ( msg - > header . is_audio ( ) ) { <nl> - if ( ( ret = source - > on_audio ( msg ) ) ! = ERROR_SUCCESS ) { <nl> - srs_error ( " source process audio message failed . ret = % d " , ret ) ; <nl> - return ret ; <nl> - } <nl> - } <nl> - / / process video packet <nl> - if ( msg - > header . is_video ( ) ) { <nl> - if ( ( ret = source - > on_video ( msg ) ) ! = ERROR_SUCCESS ) { <nl> - srs_error ( " source process video message failed . ret = % d " , ret ) ; <nl> - return ret ; <nl> - } <nl> - } <nl> - <nl> - / / process onMetaData <nl> - if ( msg - > header . is_amf0_data ( ) | | msg - > header . is_amf3_data ( ) ) { <nl> - if ( ( ret = msg - > decode_packet ( rtmp - > get_protocol ( ) ) ) ! = ERROR_SUCCESS ) { <nl> - srs_error ( " decode onMetaData message failed . ret = % d " , ret ) ; <nl> - return ret ; <nl> - } <nl> - <nl> - SrsPacket * pkt = msg - > get_packet ( ) ; <nl> - if ( dynamic_cast < SrsOnMetaDataPacket * > ( pkt ) ) { <nl> - SrsOnMetaDataPacket * metadata = dynamic_cast < SrsOnMetaDataPacket * > ( pkt ) ; <nl> - if ( ( ret = source - > on_meta_data ( msg , metadata ) ) ! = ERROR_SUCCESS ) { <nl> - srs_error ( " source process onMetaData message failed . ret = % d " , ret ) ; <nl> - return ret ; <nl> - } <nl> - srs_trace ( " process onMetaData message success . " ) ; <nl> - return ret ; <nl> - } <nl> - <nl> - srs_trace ( " ignore AMF0 / AMF3 data message . " ) ; <nl> - return ret ; <nl> - } <nl> - <nl> - return ret ; <nl> - } <nl> - <nl> - int SrsClient : : get_peer_ip ( ) <nl> - { <nl> - int ret = ERROR_SUCCESS ; <nl> - <nl> - int fd = st_netfd_fileno ( stfd ) ; <nl> - <nl> - / / discovery client information <nl> - sockaddr_in addr ; <nl> - socklen_t addrlen = sizeof ( addr ) ; <nl> - if ( getpeername ( fd , ( sockaddr * ) & addr , & addrlen ) = = - 1 ) { <nl> - ret = ERROR_SOCKET_GET_PEER_NAME ; <nl> - srs_error ( " discovery client information failed . ret = % d " , ret ) ; <nl> - return ret ; <nl> - } <nl> - srs_verbose ( " get peer name success . " ) ; <nl> - <nl> - / / ip v4 or v6 <nl> - char buf [ INET6_ADDRSTRLEN ] ; <nl> - memset ( buf , 0 , sizeof ( buf ) ) ; <nl> - <nl> - if ( ( inet_ntop ( addr . sin_family , & addr . sin_addr , buf , sizeof ( buf ) ) ) = = NULL ) { <nl> - ret = ERROR_SOCKET_GET_PEER_IP ; <nl> - srs_error ( " convert client information failed . ret = % d " , ret ) ; <nl> - return ret ; <nl> - } <nl> - srs_verbose ( " get peer ip of client ip = % s , fd = % d " , buf , fd ) ; <nl> - <nl> - ip = new char [ strlen ( buf ) + 1 ] ; <nl> - strcpy ( ip , buf ) ; <nl> - <nl> - srs_verbose ( " get peer ip success . ip = % s , fd = % d " , ip , fd ) ; <nl> - <nl> - return ret ; <nl> - } <nl> - <nl> - int SrsClient : : process_play_control_msg ( SrsConsumer * consumer , SrsCommonMessage * msg ) <nl> - { <nl> - int ret = ERROR_SUCCESS ; <nl> - <nl> - if ( ! msg ) { <nl> - srs_verbose ( " ignore all empty message . " ) ; <nl> - return ret ; <nl> - } <nl> - SrsAutoFree ( SrsCommonMessage , msg , false ) ; <nl> - <nl> - if ( ! msg - > header . is_amf0_command ( ) & & ! msg - > header . is_amf3_command ( ) ) { <nl> - srs_info ( " ignore all message except amf0 / amf3 command . " ) ; <nl> - return ret ; <nl> - } <nl> - <nl> - if ( ( ret = msg - > decode_packet ( rtmp - > get_protocol ( ) ) ) ! = ERROR_SUCCESS ) { <nl> - srs_error ( " decode the amf0 / amf3 command packet failed . ret = % d " , ret ) ; <nl> - return ret ; <nl> - } <nl> - srs_info ( " decode the amf0 / amf3 command packet success . " ) ; <nl> - <nl> - SrsCloseStreamPacket * close = dynamic_cast < SrsCloseStreamPacket * > ( msg - > get_packet ( ) ) ; <nl> - if ( close ) { <nl> - ret = ERROR_CONTROL_RTMP_CLOSE ; <nl> - srs_trace ( " system control message : rtmp close stream . ret = % d " , ret ) ; <nl> - return ret ; <nl> - } <nl> - <nl> - SrsPausePacket * pause = dynamic_cast < SrsPausePacket * > ( msg - > get_packet ( ) ) ; <nl> - if ( ! pause ) { <nl> - srs_info ( " ignore all amf0 / amf3 command except pause . " ) ; <nl> - return ret ; <nl> - } <nl> - <nl> - if ( ( ret = rtmp - > on_play_client_pause ( res - > stream_id , pause - > is_pause ) ) ! = ERROR_SUCCESS ) { <nl> - srs_error ( " rtmp process play client pause failed . ret = % d " , ret ) ; <nl> - return ret ; <nl> - } <nl> - <nl> - if ( ( ret = consumer - > on_play_client_pause ( pause - > is_pause ) ) ! = ERROR_SUCCESS ) { <nl> - srs_error ( " consumer process play client pause failed . ret = % d " , ret ) ; <nl> - return ret ; <nl> - } <nl> - srs_info ( " process pause success , is_pause = % d , time = % d . " , pause - > is_pause , pause - > time_ms ) ; <nl> - <nl> - return ret ; <nl> - } <nl> - <nl> - int SrsClient : : on_connect ( ) <nl> - { <nl> - int ret = ERROR_SUCCESS ; <nl> - <nl> - # ifdef SRS_HTTP_CALLBACK <nl> - / / HTTP : on_connect <nl> - SrsConfDirective * on_connect = _srs_config - > get_vhost_on_connect ( req - > vhost ) ; <nl> - if ( ! on_connect ) { <nl> - srs_info ( " ignore the empty http callback : on_connect " ) ; <nl> - return ret ; <nl> - } <nl> - <nl> - for ( int i = 0 ; i < ( int ) on_connect - > args . size ( ) ; i + + ) { <nl> - std : : string url = on_connect - > args . at ( i ) ; <nl> - if ( ( ret = http_hooks - > on_connect ( url , connection_id , ip , req ) ) ! = ERROR_SUCCESS ) { <nl> - srs_error ( " hook client on_connect failed . url = % s , ret = % d " , url . c_str ( ) , ret ) ; <nl> - return ret ; <nl> - } <nl> - } <nl> - # endif <nl> - <nl> - return ret ; <nl> - } <nl> - <nl> - void SrsClient : : on_close ( ) <nl> - { <nl> - # ifdef SRS_HTTP_CALLBACK <nl> - / / whatever the ret code , notify the api hooks . <nl> - / / HTTP : on_close <nl> - SrsConfDirective * on_close = _srs_config - > get_vhost_on_close ( req - > vhost ) ; <nl> - if ( ! on_close ) { <nl> - srs_info ( " ignore the empty http callback : on_close " ) ; <nl> - return ; <nl> - } <nl> - <nl> - for ( int i = 0 ; i < ( int ) on_close - > args . size ( ) ; i + + ) { <nl> - std : : string url = on_close - > args . at ( i ) ; <nl> - http_hooks - > on_close ( url , connection_id , ip , req ) ; <nl> - } <nl> - # endif <nl> - } <nl> - <nl> - int SrsClient : : on_publish ( ) <nl> - { <nl> - int ret = ERROR_SUCCESS ; <nl> - <nl> - # ifdef SRS_HTTP_CALLBACK <nl> - / / HTTP : on_publish <nl> - SrsConfDirective * on_publish = _srs_config - > get_vhost_on_publish ( req - > vhost ) ; <nl> - if ( ! on_publish ) { <nl> - srs_info ( " ignore the empty http callback : on_publish " ) ; <nl> - return ret ; <nl> - } <nl> - <nl> - for ( int i = 0 ; i < ( int ) on_publish - > args . size ( ) ; i + + ) { <nl> - std : : string url = on_publish - > args . at ( i ) ; <nl> - if ( ( ret = http_hooks - > on_publish ( url , connection_id , ip , req ) ) ! = ERROR_SUCCESS ) { <nl> - srs_error ( " hook client on_publish failed . url = % s , ret = % d " , url . c_str ( ) , ret ) ; <nl> - return ret ; <nl> - } <nl> - } <nl> - # endif <nl> - <nl> - return ret ; <nl> - } <nl> - <nl> - void SrsClient : : on_unpublish ( ) <nl> - { <nl> - # ifdef SRS_HTTP_CALLBACK <nl> - / / whatever the ret code , notify the api hooks . <nl> - / / HTTP : on_unpublish <nl> - SrsConfDirective * on_unpublish = _srs_config - > get_vhost_on_unpublish ( req - > vhost ) ; <nl> - if ( ! on_unpublish ) { <nl> - srs_info ( " ignore the empty http callback : on_unpublish " ) ; <nl> - return ; <nl> - } <nl> - <nl> - for ( int i = 0 ; i < ( int ) on_unpublish - > args . size ( ) ; i + + ) { <nl> - std : : string url = on_unpublish - > args . at ( i ) ; <nl> - http_hooks - > on_unpublish ( url , connection_id , ip , req ) ; <nl> - } <nl> - # endif <nl> - } <nl> - <nl> - int SrsClient : : on_play ( ) <nl> - { <nl> - int ret = ERROR_SUCCESS ; <nl> - <nl> - # ifdef SRS_HTTP_CALLBACK <nl> - / / HTTP : on_play <nl> - SrsConfDirective * on_play = _srs_config - > get_vhost_on_play ( req - > vhost ) ; <nl> - if ( ! on_play ) { <nl> - srs_info ( " ignore the empty http callback : on_play " ) ; <nl> - return ret ; <nl> - } <nl> - <nl> - for ( int i = 0 ; i < ( int ) on_play - > args . size ( ) ; i + + ) { <nl> - std : : string url = on_play - > args . at ( i ) ; <nl> - if ( ( ret = http_hooks - > on_play ( url , connection_id , ip , req ) ) ! = ERROR_SUCCESS ) { <nl> - srs_error ( " hook client on_play failed . url = % s , ret = % d " , url . c_str ( ) , ret ) ; <nl> - return ret ; <nl> - } <nl> - } <nl> - # endif <nl> - <nl> - return ret ; <nl> - } <nl> - <nl> - void SrsClient : : on_stop ( ) <nl> - { <nl> - # ifdef SRS_HTTP_CALLBACK <nl> - / / whatever the ret code , notify the api hooks . <nl> - / / HTTP : on_stop <nl> - SrsConfDirective * on_stop = _srs_config - > get_vhost_on_stop ( req - > vhost ) ; <nl> - if ( ! on_stop ) { <nl> - srs_info ( " ignore the empty http callback : on_stop " ) ; <nl> - return ; <nl> - } <nl> - <nl> - for ( int i = 0 ; i < ( int ) on_stop - > args . size ( ) ; i + + ) { <nl> - std : : string url = on_stop - > args . at ( i ) ; <nl> - http_hooks - > on_stop ( url , connection_id , ip , req ) ; <nl> - } <nl> - # endif <nl> - } <nl> + / * <nl> + The MIT License ( MIT ) <nl> + <nl> + Copyright ( c ) 2013 - 2014 winlin <nl> + <nl> + Permission is hereby granted , free of charge , to any person obtaining a copy of <nl> + this software and associated documentation files ( the " Software " ) , to deal in <nl> + the Software without restriction , including without limitation the rights to <nl> + use , copy , modify , merge , publish , distribute , sublicense , and / or sell copies of <nl> + the Software , and to permit persons to whom the Software is furnished to do so , <nl> + subject to the following conditions : <nl> + <nl> + The above copyright notice and this permission notice shall be included in all <nl> + copies or substantial portions of the Software . <nl> + <nl> + THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR <nl> + IMPLIED , INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY , FITNESS <nl> + FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT . IN NO EVENT SHALL THE AUTHORS OR <nl> + COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM , DAMAGES OR OTHER LIABILITY , WHETHER <nl> + IN AN ACTION OF CONTRACT , TORT OR OTHERWISE , ARISING FROM , OUT OF OR IN <nl> + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE . <nl> + * / <nl> + <nl> + # include < srs_app_rtmp_conn . hpp > <nl> + <nl> + # include < arpa / inet . h > <nl> + # include < stdlib . h > <nl> + <nl> + using namespace std ; <nl> + <nl> + # include < srs_kernel_error . hpp > <nl> + # include < srs_kernel_log . hpp > <nl> + # include < srs_protocol_rtmp . hpp > <nl> + # include < srs_protocol_rtmp_stack . hpp > <nl> + # include < srs_core_autofree . hpp > <nl> + # include < srs_app_source . hpp > <nl> + # include < srs_app_server . hpp > <nl> + # include < srs_app_pithy_print . hpp > <nl> + # include < srs_app_config . hpp > <nl> + # include < srs_app_refer . hpp > <nl> + # include < srs_app_hls . hpp > <nl> + # include < srs_app_http . hpp > <nl> + # include < srs_app_bandwidth . hpp > <nl> + # include < srs_app_socket . hpp > <nl> + <nl> + SrsClient : : SrsClient ( SrsServer * srs_server , st_netfd_t client_stfd ) <nl> + : SrsConnection ( srs_server , client_stfd ) <nl> + { <nl> + ip = NULL ; <nl> + req = new SrsRequest ( ) ; <nl> + res = new SrsResponse ( ) ; <nl> + skt = new SrsSocket ( client_stfd ) ; <nl> + rtmp = new SrsRtmpServer ( skt ) ; <nl> + refer = new SrsRefer ( ) ; <nl> + # ifdef SRS_HTTP_CALLBACK <nl> + http_hooks = new SrsHttpHooks ( ) ; <nl> + # endif <nl> + bandwidth = new SrsBandwidth ( ) ; <nl> + <nl> + _srs_config - > subscribe ( this ) ; <nl> + } <nl> + <nl> + SrsClient : : ~ SrsClient ( ) <nl> + { <nl> + _srs_config - > unsubscribe ( this ) ; <nl> + <nl> + srs_freepa ( ip ) ; <nl> + srs_freep ( req ) ; <nl> + srs_freep ( res ) ; <nl> + srs_freep ( rtmp ) ; <nl> + srs_freep ( skt ) ; <nl> + srs_freep ( refer ) ; <nl> + # ifdef SRS_HTTP_CALLBACK <nl> + srs_freep ( http_hooks ) ; <nl> + # endif <nl> + srs_freep ( bandwidth ) ; <nl> + } <nl> + <nl> + / / TODO : return detail message when error for client . <nl> + int SrsClient : : do_cycle ( ) <nl> + { <nl> + int ret = ERROR_SUCCESS ; <nl> + <nl> + if ( ( ret = get_peer_ip ( ) ) ! = ERROR_SUCCESS ) { <nl> + srs_error ( " get peer ip failed . ret = % d " , ret ) ; <nl> + return ret ; <nl> + } <nl> + srs_trace ( " get peer ip success . ip = % s , send_to = % " PRId64 " , recv_to = % " PRId64 " " , <nl> + ip , SRS_SEND_TIMEOUT_US , SRS_RECV_TIMEOUT_US ) ; <nl> + <nl> + rtmp - > set_recv_timeout ( SRS_RECV_TIMEOUT_US ) ; <nl> + rtmp - > set_send_timeout ( SRS_SEND_TIMEOUT_US ) ; <nl> + <nl> + if ( ( ret = rtmp - > handshake ( ) ) ! = ERROR_SUCCESS ) { <nl> + srs_error ( " rtmp handshake failed . ret = % d " , ret ) ; <nl> + return ret ; <nl> + } <nl> + srs_verbose ( " rtmp handshake success " ) ; <nl> + <nl> + if ( ( ret = rtmp - > connect_app ( req ) ) ! = ERROR_SUCCESS ) { <nl> + srs_error ( " rtmp connect vhost / app failed . ret = % d " , ret ) ; <nl> + return ret ; <nl> + } <nl> + srs_verbose ( " rtmp connect app success " ) ; <nl> + <nl> + / / discovery vhost , resolve the vhost from config <nl> + SrsConfDirective * parsed_vhost = _srs_config - > get_vhost ( req - > vhost ) ; <nl> + if ( parsed_vhost ) { <nl> + req - > vhost = parsed_vhost - > arg0 ( ) ; <nl> + } <nl> + <nl> + srs_info ( " discovery app success . schema = % s , vhost = % s , port = % s , app = % s " , <nl> + req - > schema . c_str ( ) , req - > vhost . c_str ( ) , req - > port . c_str ( ) , req - > app . c_str ( ) ) ; <nl> + <nl> + if ( req - > schema . empty ( ) | | req - > vhost . empty ( ) | | req - > port . empty ( ) | | req - > app . empty ( ) ) { <nl> + ret = ERROR_RTMP_REQ_TCURL ; <nl> + srs_error ( " discovery tcUrl failed . " <nl> + " tcUrl = % s , schema = % s , vhost = % s , port = % s , app = % s , ret = % d " , <nl> + req - > tcUrl . c_str ( ) , req - > schema . c_str ( ) , req - > vhost . c_str ( ) , req - > port . c_str ( ) , req - > app . c_str ( ) , ret ) ; <nl> + return ret ; <nl> + } <nl> + <nl> + / / check vhost <nl> + if ( ( ret = check_vhost ( ) ) ! = ERROR_SUCCESS ) { <nl> + srs_error ( " check vhost failed . ret = % d " , ret ) ; <nl> + return ret ; <nl> + } <nl> + srs_verbose ( " check vhost success . " ) ; <nl> + <nl> + srs_trace ( " rtmp connect app success . " <nl> + " tcUrl = % s , pageUrl = % s , swfUrl = % s , schema = % s , vhost = % s , port = % s , app = % s " , <nl> + req - > tcUrl . c_str ( ) , req - > pageUrl . c_str ( ) , req - > swfUrl . c_str ( ) , <nl> + req - > schema . c_str ( ) , req - > vhost . c_str ( ) , req - > port . c_str ( ) , <nl> + req - > app . c_str ( ) ) ; <nl> + <nl> + ret = service_cycle ( ) ; <nl> + on_close ( ) ; <nl> + <nl> + return ret ; <nl> + } <nl> + <nl> + int SrsClient : : on_reload_vhost_removed ( string vhost ) <nl> + { <nl> + int ret = ERROR_SUCCESS ; <nl> + <nl> + if ( req - > vhost ! = vhost ) { <nl> + return ret ; <nl> + } <nl> + <nl> + / / if the vhost connected is removed , disconnect the client . <nl> + srs_trace ( " vhost % s removed / disabled , close client url = % s " , <nl> + vhost . c_str ( ) , req - > get_stream_url ( ) . c_str ( ) ) ; <nl> + <nl> + srs_close_stfd ( stfd ) ; <nl> + <nl> + return ret ; <nl> + } <nl> + <nl> + int SrsClient : : service_cycle ( ) <nl> + { <nl> + int ret = ERROR_SUCCESS ; <nl> + <nl> + if ( ( ret = rtmp - > set_window_ack_size ( 2 . 5 * 1000 * 1000 ) ) ! = ERROR_SUCCESS ) { <nl> + srs_error ( " set window acknowledgement size failed . ret = % d " , ret ) ; <nl> + return ret ; <nl> + } <nl> + srs_verbose ( " set window acknowledgement size success " ) ; <nl> + <nl> + if ( ( ret = rtmp - > set_peer_bandwidth ( 2 . 5 * 1000 * 1000 , 2 ) ) ! = ERROR_SUCCESS ) { <nl> + srs_error ( " set peer bandwidth failed . ret = % d " , ret ) ; <nl> + return ret ; <nl> + } <nl> + srs_verbose ( " set peer bandwidth success " ) ; <nl> + <nl> + / / do bandwidth test if connect to the vhost which is for bandwidth check . <nl> + if ( _srs_config - > get_bw_check_enabled ( req - > vhost ) ) { <nl> + return bandwidth - > bandwidth_test ( req , stfd , rtmp ) ; <nl> + } <nl> + <nl> + if ( ( ret = rtmp - > response_connect_app ( req ) ) ! = ERROR_SUCCESS ) { <nl> + srs_error ( " response connect app failed . ret = % d " , ret ) ; <nl> + return ret ; <nl> + } <nl> + srs_verbose ( " response connect app success " ) ; <nl> + <nl> + if ( ( ret = rtmp - > on_bw_done ( ) ) ! = ERROR_SUCCESS ) { <nl> + srs_error ( " on_bw_done failed . ret = % d " , ret ) ; <nl> + return ret ; <nl> + } <nl> + srs_verbose ( " on_bw_done success " ) ; <nl> + <nl> + while ( true ) { <nl> + ret = stream_service_cycle ( ) ; <nl> + <nl> + / / stream service must terminated with error , never success . <nl> + srs_assert ( ret ! = ERROR_SUCCESS ) ; <nl> + <nl> + / / when not system control error , fatal error , return . <nl> + if ( ! srs_is_system_control_error ( ret ) ) { <nl> + if ( ret ! = ERROR_SOCKET_TIMEOUT & & ! srs_is_client_gracefully_close ( ret ) ) { <nl> + srs_error ( " stream service cycle failed . ret = % d " , ret ) ; <nl> + } <nl> + return ret ; <nl> + } <nl> + <nl> + / / for republish , continue service <nl> + if ( ret = = ERROR_CONTROL_REPUBLISH ) { <nl> + / / set timeout to a larger value , wait for encoder to republish . <nl> + rtmp - > set_send_timeout ( SRS_REPUBLISH_RECV_TIMEOUT_US ) ; <nl> + rtmp - > set_recv_timeout ( SRS_REPUBLISH_SEND_TIMEOUT_US ) ; <nl> + <nl> + srs_trace ( " control message ( unpublish ) accept , retry stream service . " ) ; <nl> + continue ; <nl> + } <nl> + <nl> + / / for " some " system control error , <nl> + / / logical accept and retry stream service . <nl> + if ( ret = = ERROR_CONTROL_RTMP_CLOSE ) { <nl> + / / set timeout to a larger value , for user paused . <nl> + rtmp - > set_recv_timeout ( SRS_PAUSED_RECV_TIMEOUT_US ) ; <nl> + rtmp - > set_send_timeout ( SRS_PAUSED_SEND_TIMEOUT_US ) ; <nl> + <nl> + srs_trace ( " control message ( close ) accept , retry stream service . " ) ; <nl> + continue ; <nl> + } <nl> + <nl> + / / for other system control message , fatal error . <nl> + srs_error ( " control message ( % d ) reject as error . ret = % d " , ret , ret ) ; <nl> + return ret ; <nl> + } <nl> + <nl> + return ret ; <nl> + } <nl> + <nl> + int SrsClient : : stream_service_cycle ( ) <nl> + { <nl> + int ret = ERROR_SUCCESS ; <nl> + <nl> + SrsClientType type ; <nl> + if ( ( ret = rtmp - > identify_client ( res - > stream_id , type , req - > stream ) ) ! = ERROR_SUCCESS ) { <nl> + srs_error ( " identify client failed . ret = % d " , ret ) ; <nl> + return ret ; <nl> + } <nl> + req - > strip ( ) ; <nl> + srs_trace ( " identify client success . type = % s , stream_name = % s " , <nl> + srs_client_type_string ( type ) . c_str ( ) , req - > stream . c_str ( ) ) ; <nl> + <nl> + / / client is identified , set the timeout to service timeout . <nl> + rtmp - > set_recv_timeout ( SRS_RECV_TIMEOUT_US ) ; <nl> + rtmp - > set_send_timeout ( SRS_SEND_TIMEOUT_US ) ; <nl> + <nl> + / / set chunk size to larger . <nl> + int chunk_size = _srs_config - > get_chunk_size ( req - > vhost ) ; <nl> + if ( ( ret = rtmp - > set_chunk_size ( chunk_size ) ) ! = ERROR_SUCCESS ) { <nl> + srs_error ( " set chunk_size = % d failed . ret = % d " , chunk_size , ret ) ; <nl> + return ret ; <nl> + } <nl> + srs_trace ( " set chunk_size = % d success " , chunk_size ) ; <nl> + <nl> + / / find a source to serve . <nl> + SrsSource * source = SrsSource : : find ( req ) ; <nl> + srs_assert ( source ! = NULL ) ; <nl> + <nl> + / / check publish available . <nl> + if ( type ! = SrsClientPlay & & ! source - > can_publish ( ) ) { <nl> + ret = ERROR_SYSTEM_STREAM_BUSY ; <nl> + srs_warn ( " stream % s is already publishing . ret = % d " , <nl> + req - > get_stream_url ( ) . c_str ( ) , ret ) ; <nl> + / / to delay request <nl> + st_usleep ( SRS_STREAM_BUSY_SLEEP_US ) ; <nl> + return ret ; <nl> + } <nl> + <nl> + bool enabled_cache = _srs_config - > get_gop_cache ( req - > vhost ) ; <nl> + srs_info ( " source found , url = % s , enabled_cache = % d " , req - > get_stream_url ( ) . c_str ( ) , enabled_cache ) ; <nl> + source - > set_cache ( enabled_cache ) ; <nl> + <nl> + switch ( type ) { <nl> + case SrsClientPlay : { <nl> + srs_verbose ( " start to play stream % s . " , req - > stream . c_str ( ) ) ; <nl> + <nl> + if ( ( ret = rtmp - > start_play ( res - > stream_id ) ) ! = ERROR_SUCCESS ) { <nl> + srs_error ( " start to play stream failed . ret = % d " , ret ) ; <nl> + return ret ; <nl> + } <nl> + if ( ( ret = on_play ( ) ) ! = ERROR_SUCCESS ) { <nl> + srs_error ( " http hook on_play failed . ret = % d " , ret ) ; <nl> + return ret ; <nl> + } <nl> + srs_info ( " start to play stream % s success " , req - > stream . c_str ( ) ) ; <nl> + ret = playing ( source ) ; <nl> + on_stop ( ) ; <nl> + return ret ; <nl> + } <nl> + case SrsClientFMLEPublish : { <nl> + srs_verbose ( " FMLE start to publish stream % s . " , req - > stream . c_str ( ) ) ; <nl> + <nl> + if ( ( ret = rtmp - > start_fmle_publish ( res - > stream_id ) ) ! = ERROR_SUCCESS ) { <nl> + srs_error ( " start to publish stream failed . ret = % d " , ret ) ; <nl> + return ret ; <nl> + } <nl> + if ( ( ret = on_publish ( ) ) ! = ERROR_SUCCESS ) { <nl> + srs_error ( " http hook on_publish failed . ret = % d " , ret ) ; <nl> + return ret ; <nl> + } <nl> + srs_info ( " start to publish stream % s success " , req - > stream . c_str ( ) ) ; <nl> + ret = fmle_publish ( source ) ; <nl> + source - > on_unpublish ( ) ; <nl> + on_unpublish ( ) ; <nl> + return ret ; <nl> + } <nl> + case SrsClientFlashPublish : { <nl> + srs_verbose ( " flash start to publish stream % s . " , req - > stream . c_str ( ) ) ; <nl> + <nl> + if ( ( ret = rtmp - > start_flash_publish ( res - > stream_id ) ) ! = ERROR_SUCCESS ) { <nl> + srs_error ( " flash start to publish stream failed . ret = % d " , ret ) ; <nl> + return ret ; <nl> + } <nl> + if ( ( ret = on_publish ( ) ) ! = ERROR_SUCCESS ) { <nl> + srs_error ( " http hook on_publish failed . ret = % d " , ret ) ; <nl> + return ret ; <nl> + } <nl> + srs_info ( " flash start to publish stream % s success " , req - > stream . c_str ( ) ) ; <nl> + ret = flash_publish ( source ) ; <nl> + source - > on_unpublish ( ) ; <nl> + on_unpublish ( ) ; <nl> + return ret ; <nl> + } <nl> + default : { <nl> + ret = ERROR_SYSTEM_CLIENT_INVALID ; <nl> + srs_info ( " invalid client type = % d . ret = % d " , type , ret ) ; <nl> + return ret ; <nl> + } <nl> + } <nl> + <nl> + return ret ; <nl> + } <nl> + <nl> + int SrsClient : : check_vhost ( ) <nl> + { <nl> + int ret = ERROR_SUCCESS ; <nl> + <nl> + srs_assert ( req ! = NULL ) ; <nl> + <nl> + SrsConfDirective * vhost = _srs_config - > get_vhost ( req - > vhost ) ; <nl> + if ( vhost = = NULL ) { <nl> + ret = ERROR_RTMP_VHOST_NOT_FOUND ; <nl> + srs_error ( " vhost % s not found . ret = % d " , req - > vhost . c_str ( ) , ret ) ; <nl> + return ret ; <nl> + } <nl> + <nl> + if ( ! _srs_config - > get_vhost_enabled ( req - > vhost ) ) { <nl> + ret = ERROR_RTMP_VHOST_NOT_FOUND ; <nl> + srs_error ( " vhost % s disabled . ret = % d " , req - > vhost . c_str ( ) , ret ) ; <nl> + return ret ; <nl> + } <nl> + <nl> + if ( req - > vhost ! = vhost - > arg0 ( ) ) { <nl> + srs_trace ( " vhost change from % s to % s " , req - > vhost . c_str ( ) , vhost - > arg0 ( ) . c_str ( ) ) ; <nl> + req - > vhost = vhost - > arg0 ( ) ; <nl> + } <nl> + <nl> + if ( ( ret = refer - > check ( req - > pageUrl , _srs_config - > get_refer ( req - > vhost ) ) ) ! = ERROR_SUCCESS ) { <nl> + srs_error ( " check refer failed . ret = % d " , ret ) ; <nl> + return ret ; <nl> + } <nl> + srs_verbose ( " check refer success . " ) ; <nl> + <nl> + if ( ( ret = on_connect ( ) ) ! = ERROR_SUCCESS ) { <nl> + return ret ; <nl> + } <nl> + <nl> + return ret ; <nl> + } <nl> + <nl> + int SrsClient : : playing ( SrsSource * source ) <nl> + { <nl> + int ret = ERROR_SUCCESS ; <nl> + <nl> + if ( ( ret = refer - > check ( req - > pageUrl , _srs_config - > get_refer_play ( req - > vhost ) ) ) ! = ERROR_SUCCESS ) { <nl> + srs_error ( " check play_refer failed . ret = % d " , ret ) ; <nl> + return ret ; <nl> + } <nl> + srs_verbose ( " check play_refer success . " ) ; <nl> + <nl> + SrsConsumer * consumer = NULL ; <nl> + if ( ( ret = source - > create_consumer ( consumer ) ) ! = ERROR_SUCCESS ) { <nl> + srs_error ( " create consumer failed . ret = % d " , ret ) ; <nl> + return ret ; <nl> + } <nl> + <nl> + srs_assert ( consumer ! = NULL ) ; <nl> + SrsAutoFree ( SrsConsumer , consumer , false ) ; <nl> + srs_verbose ( " consumer created success . " ) ; <nl> + <nl> + rtmp - > set_recv_timeout ( SRS_PULSE_TIMEOUT_US ) ; <nl> + <nl> + SrsPithyPrint pithy_print ( SRS_STAGE_PLAY_USER ) ; <nl> + <nl> + while ( true ) { <nl> + pithy_print . elapse ( SRS_PULSE_TIMEOUT_US / 1000 ) ; <nl> + <nl> + / / switch to other st - threads . <nl> + st_usleep ( 0 ) ; <nl> + <nl> + / / read from client . <nl> + int ctl_msg_ret = ERROR_SUCCESS ; <nl> + if ( true ) { <nl> + SrsCommonMessage * msg = NULL ; <nl> + ctl_msg_ret = ret = rtmp - > recv_message ( & msg ) ; <nl> + <nl> + srs_verbose ( " play loop recv message . ret = % d " , ret ) ; <nl> + if ( ret ! = ERROR_SUCCESS & & ret ! = ERROR_SOCKET_TIMEOUT ) { <nl> + if ( ret ! = ERROR_SOCKET_TIMEOUT & & ! srs_is_client_gracefully_close ( ret ) ) { <nl> + srs_error ( " recv client control message failed . ret = % d " , ret ) ; <nl> + } <nl> + return ret ; <nl> + } <nl> + if ( ( ret = process_play_control_msg ( consumer , msg ) ) ! = ERROR_SUCCESS ) { <nl> + if ( ! srs_is_system_control_error ( ret ) ) { <nl> + srs_error ( " process play control message failed . ret = % d " , ret ) ; <nl> + } <nl> + return ret ; <nl> + } <nl> + } <nl> + <nl> + / / get messages from consumer . <nl> + SrsSharedPtrMessage * * msgs = NULL ; <nl> + int count = 0 ; <nl> + if ( ( ret = consumer - > get_packets ( 0 , msgs , count ) ) ! = ERROR_SUCCESS ) { <nl> + srs_error ( " get messages from consumer failed . ret = % d " , ret ) ; <nl> + return ret ; <nl> + } <nl> + <nl> + / / reportable <nl> + if ( pithy_print . can_print ( ) ) { <nl> + srs_trace ( " - > time = % " PRId64 " , cmr = % d , msgs = % d , obytes = % " PRId64 " , ibytes = % " PRId64 " , okbps = % d , ikbps = % d " , <nl> + pithy_print . get_age ( ) , ctl_msg_ret , count , rtmp - > get_send_bytes ( ) , rtmp - > get_recv_bytes ( ) , rtmp - > get_send_kbps ( ) , rtmp - > get_recv_kbps ( ) ) ; <nl> + } <nl> + <nl> + if ( count < = 0 ) { <nl> + srs_verbose ( " no packets in queue . " ) ; <nl> + continue ; <nl> + } <nl> + SrsAutoFree ( SrsSharedPtrMessage * , msgs , true ) ; <nl> + <nl> + / / sendout messages <nl> + for ( int i = 0 ; i < count ; i + + ) { <nl> + SrsSharedPtrMessage * msg = msgs [ i ] ; <nl> + <nl> + / / the send_message will free the msg , <nl> + / / so set the msgs [ i ] to NULL . <nl> + msgs [ i ] = NULL ; <nl> + <nl> + if ( ( ret = rtmp - > send_message ( msg ) ) ! = ERROR_SUCCESS ) { <nl> + srs_error ( " send message to client failed . ret = % d " , ret ) ; <nl> + return ret ; <nl> + } <nl> + } <nl> + } <nl> + <nl> + return ret ; <nl> + } <nl> + <nl> + int SrsClient : : fmle_publish ( SrsSource * source ) <nl> + { <nl> + int ret = ERROR_SUCCESS ; <nl> + <nl> + if ( ( ret = refer - > check ( req - > pageUrl , _srs_config - > get_refer_publish ( req - > vhost ) ) ) ! = ERROR_SUCCESS ) { <nl> + srs_error ( " fmle check publish_refer failed . ret = % d " , ret ) ; <nl> + return ret ; <nl> + } <nl> + srs_verbose ( " fmle check publish_refer success . " ) ; <nl> + <nl> + SrsPithyPrint pithy_print ( SRS_STAGE_PUBLISH_USER ) ; <nl> + <nl> + / / notify the hls to prepare when publish start . <nl> + if ( ( ret = source - > on_publish ( req ) ) ! = ERROR_SUCCESS ) { <nl> + srs_error ( " fmle hls on_publish failed . ret = % d " , ret ) ; <nl> + return ret ; <nl> + } <nl> + srs_verbose ( " fmle hls on_publish success . " ) ; <nl> + <nl> + while ( true ) { <nl> + / / switch to other st - threads . <nl> + st_usleep ( 0 ) ; <nl> + <nl> + SrsCommonMessage * msg = NULL ; <nl> + if ( ( ret = rtmp - > recv_message ( & msg ) ) ! = ERROR_SUCCESS ) { <nl> + srs_error ( " fmle recv identify client message failed . ret = % d " , ret ) ; <nl> + return ret ; <nl> + } <nl> + <nl> + SrsAutoFree ( SrsCommonMessage , msg , false ) ; <nl> + <nl> + pithy_print . set_age ( msg - > header . timestamp ) ; <nl> + <nl> + / / reportable <nl> + if ( pithy_print . can_print ( ) ) { <nl> + srs_trace ( " < - time = % " PRId64 " , obytes = % " PRId64 " , ibytes = % " PRId64 " , okbps = % d , ikbps = % d " , <nl> + pithy_print . get_age ( ) , rtmp - > get_send_bytes ( ) , rtmp - > get_recv_bytes ( ) , rtmp - > get_send_kbps ( ) , rtmp - > get_recv_kbps ( ) ) ; <nl> + } <nl> + <nl> + / / process UnPublish event . <nl> + if ( msg - > header . is_amf0_command ( ) | | msg - > header . is_amf3_command ( ) ) { <nl> + if ( ( ret = msg - > decode_packet ( rtmp - > get_protocol ( ) ) ) ! = ERROR_SUCCESS ) { <nl> + srs_error ( " fmle decode unpublish message failed . ret = % d " , ret ) ; <nl> + return ret ; <nl> + } <nl> + <nl> + SrsPacket * pkt = msg - > get_packet ( ) ; <nl> + if ( dynamic_cast < SrsFMLEStartPacket * > ( pkt ) ) { <nl> + SrsFMLEStartPacket * unpublish = dynamic_cast < SrsFMLEStartPacket * > ( pkt ) ; <nl> + if ( ( ret = rtmp - > fmle_unpublish ( res - > stream_id , unpublish - > transaction_id ) ) ! = ERROR_SUCCESS ) { <nl> + return ret ; <nl> + } <nl> + return ERROR_CONTROL_REPUBLISH ; <nl> + } <nl> + <nl> + srs_trace ( " fmle ignore AMF0 / AMF3 command message . " ) ; <nl> + continue ; <nl> + } <nl> + <nl> + / / video , audio , data message <nl> + if ( ( ret = process_publish_message ( source , msg ) ) ! = ERROR_SUCCESS ) { <nl> + srs_error ( " fmle process publish message failed . ret = % d " , ret ) ; <nl> + return ret ; <nl> + } <nl> + } <nl> + <nl> + return ret ; <nl> + } <nl> + <nl> + int SrsClient : : flash_publish ( SrsSource * source ) <nl> + { <nl> + int ret = ERROR_SUCCESS ; <nl> + <nl> + if ( ( ret = refer - > check ( req - > pageUrl , _srs_config - > get_refer_publish ( req - > vhost ) ) ) ! = ERROR_SUCCESS ) { <nl> + srs_error ( " flash check publish_refer failed . ret = % d " , ret ) ; <nl> + return ret ; <nl> + } <nl> + srs_verbose ( " flash check publish_refer success . " ) ; <nl> + <nl> + SrsPithyPrint pithy_print ( SRS_STAGE_PUBLISH_USER ) ; <nl> + <nl> + / / notify the hls to prepare when publish start . <nl> + if ( ( ret = source - > on_publish ( req ) ) ! = ERROR_SUCCESS ) { <nl> + srs_error ( " flash hls on_publish failed . ret = % d " , ret ) ; <nl> + return ret ; <nl> + } <nl> + srs_verbose ( " flash hls on_publish success . " ) ; <nl> + <nl> + while ( true ) { <nl> + / / switch to other st - threads . <nl> + st_usleep ( 0 ) ; <nl> + <nl> + SrsCommonMessage * msg = NULL ; <nl> + if ( ( ret = rtmp - > recv_message ( & msg ) ) ! = ERROR_SUCCESS ) { <nl> + if ( ! srs_is_client_gracefully_close ( ret ) ) { <nl> + srs_error ( " flash recv identify client message failed . ret = % d " , ret ) ; <nl> + } <nl> + return ret ; <nl> + } <nl> + <nl> + SrsAutoFree ( SrsCommonMessage , msg , false ) ; <nl> + <nl> + pithy_print . set_age ( msg - > header . timestamp ) ; <nl> + <nl> + / / reportable <nl> + if ( pithy_print . can_print ( ) ) { <nl> + srs_trace ( " < - time = % " PRId64 " , obytes = % " PRId64 " , ibytes = % " PRId64 " , okbps = % d , ikbps = % d " , <nl> + pithy_print . get_age ( ) , rtmp - > get_send_bytes ( ) , rtmp - > get_recv_bytes ( ) , rtmp - > get_send_kbps ( ) , rtmp - > get_recv_kbps ( ) ) ; <nl> + } <nl> + <nl> + / / process UnPublish event . <nl> + if ( msg - > header . is_amf0_command ( ) | | msg - > header . is_amf3_command ( ) ) { <nl> + if ( ( ret = msg - > decode_packet ( rtmp - > get_protocol ( ) ) ) ! = ERROR_SUCCESS ) { <nl> + srs_error ( " flash decode unpublish message failed . ret = % d " , ret ) ; <nl> + return ret ; <nl> + } <nl> + <nl> + / / flash unpublish . <nl> + / / TODO : maybe need to support republish . <nl> + srs_trace ( " flash flash publish finished . " ) ; <nl> + return ERROR_CONTROL_REPUBLISH ; <nl> + } <nl> + <nl> + / / video , audio , data message <nl> + if ( ( ret = process_publish_message ( source , msg ) ) ! = ERROR_SUCCESS ) { <nl> + srs_error ( " flash process publish message failed . ret = % d " , ret ) ; <nl> + return ret ; <nl> + } <nl> + } <nl> + <nl> + return ret ; <nl> + } <nl> + <nl> + int SrsClient : : process_publish_message ( SrsSource * source , SrsCommonMessage * msg ) <nl> + { <nl> + int ret = ERROR_SUCCESS ; <nl> + <nl> + / / process audio packet <nl> + if ( msg - > header . is_audio ( ) ) { <nl> + if ( ( ret = source - > on_audio ( msg ) ) ! = ERROR_SUCCESS ) { <nl> + srs_error ( " source process audio message failed . ret = % d " , ret ) ; <nl> + return ret ; <nl> + } <nl> + } <nl> + / / process video packet <nl> + if ( msg - > header . is_video ( ) ) { <nl> + if ( ( ret = source - > on_video ( msg ) ) ! = ERROR_SUCCESS ) { <nl> + srs_error ( " source process video message failed . ret = % d " , ret ) ; <nl> + return ret ; <nl> + } <nl> + } <nl> + <nl> + / / process onMetaData <nl> + if ( msg - > header . is_amf0_data ( ) | | msg - > header . is_amf3_data ( ) ) { <nl> + if ( ( ret = msg - > decode_packet ( rtmp - > get_protocol ( ) ) ) ! = ERROR_SUCCESS ) { <nl> + srs_error ( " decode onMetaData message failed . ret = % d " , ret ) ; <nl> + return ret ; <nl> + } <nl> + <nl> + SrsPacket * pkt = msg - > get_packet ( ) ; <nl> + if ( dynamic_cast < SrsOnMetaDataPacket * > ( pkt ) ) { <nl> + SrsOnMetaDataPacket * metadata = dynamic_cast < SrsOnMetaDataPacket * > ( pkt ) ; <nl> + if ( ( ret = source - > on_meta_data ( msg , metadata ) ) ! = ERROR_SUCCESS ) { <nl> + srs_error ( " source process onMetaData message failed . ret = % d " , ret ) ; <nl> + return ret ; <nl> + } <nl> + srs_trace ( " process onMetaData message success . " ) ; <nl> + return ret ; <nl> + } <nl> + <nl> + srs_trace ( " ignore AMF0 / AMF3 data message . " ) ; <nl> + return ret ; <nl> + } <nl> + <nl> + return ret ; <nl> + } <nl> + <nl> + int SrsClient : : get_peer_ip ( ) <nl> + { <nl> + int ret = ERROR_SUCCESS ; <nl> + <nl> + int fd = st_netfd_fileno ( stfd ) ; <nl> + <nl> + / / discovery client information <nl> + sockaddr_in addr ; <nl> + socklen_t addrlen = sizeof ( addr ) ; <nl> + if ( getpeername ( fd , ( sockaddr * ) & addr , & addrlen ) = = - 1 ) { <nl> + ret = ERROR_SOCKET_GET_PEER_NAME ; <nl> + srs_error ( " discovery client information failed . ret = % d " , ret ) ; <nl> + return ret ; <nl> + } <nl> + srs_verbose ( " get peer name success . " ) ; <nl> + <nl> + / / ip v4 or v6 <nl> + char buf [ INET6_ADDRSTRLEN ] ; <nl> + memset ( buf , 0 , sizeof ( buf ) ) ; <nl> + <nl> + if ( ( inet_ntop ( addr . sin_family , & addr . sin_addr , buf , sizeof ( buf ) ) ) = = NULL ) { <nl> + ret = ERROR_SOCKET_GET_PEER_IP ; <nl> + srs_error ( " convert client information failed . ret = % d " , ret ) ; <nl> + return ret ; <nl> + } <nl> + srs_verbose ( " get peer ip of client ip = % s , fd = % d " , buf , fd ) ; <nl> + <nl> + ip = new char [ strlen ( buf ) + 1 ] ; <nl> + strcpy ( ip , buf ) ; <nl> + <nl> + srs_verbose ( " get peer ip success . ip = % s , fd = % d " , ip , fd ) ; <nl> + <nl> + return ret ; <nl> + } <nl> + <nl> + int SrsClient : : process_play_control_msg ( SrsConsumer * consumer , SrsCommonMessage * msg ) <nl> + { <nl> + int ret = ERROR_SUCCESS ; <nl> + <nl> + if ( ! msg ) { <nl> + srs_verbose ( " ignore all empty message . " ) ; <nl> + return ret ; <nl> + } <nl> + SrsAutoFree ( SrsCommonMessage , msg , false ) ; <nl> + <nl> + if ( ! msg - > header . is_amf0_command ( ) & & ! msg - > header . is_amf3_command ( ) ) { <nl> + srs_info ( " ignore all message except amf0 / amf3 command . " ) ; <nl> + return ret ; <nl> + } <nl> + <nl> + if ( ( ret = msg - > decode_packet ( rtmp - > get_protocol ( ) ) ) ! = ERROR_SUCCESS ) { <nl> + srs_error ( " decode the amf0 / amf3 command packet failed . ret = % d " , ret ) ; <nl> + return ret ; <nl> + } <nl> + srs_info ( " decode the amf0 / amf3 command packet success . " ) ; <nl> + <nl> + SrsCloseStreamPacket * close = dynamic_cast < SrsCloseStreamPacket * > ( msg - > get_packet ( ) ) ; <nl> + if ( close ) { <nl> + ret = ERROR_CONTROL_RTMP_CLOSE ; <nl> + srs_trace ( " system control message : rtmp close stream . ret = % d " , ret ) ; <nl> + return ret ; <nl> + } <nl> + <nl> + SrsPausePacket * pause = dynamic_cast < SrsPausePacket * > ( msg - > get_packet ( ) ) ; <nl> + if ( ! pause ) { <nl> + srs_info ( " ignore all amf0 / amf3 command except pause . " ) ; <nl> + return ret ; <nl> + } <nl> + <nl> + if ( ( ret = rtmp - > on_play_client_pause ( res - > stream_id , pause - > is_pause ) ) ! = ERROR_SUCCESS ) { <nl> + srs_error ( " rtmp process play client pause failed . ret = % d " , ret ) ; <nl> + return ret ; <nl> + } <nl> + <nl> + if ( ( ret = consumer - > on_play_client_pause ( pause - > is_pause ) ) ! = ERROR_SUCCESS ) { <nl> + srs_error ( " consumer process play client pause failed . ret = % d " , ret ) ; <nl> + return ret ; <nl> + } <nl> + srs_info ( " process pause success , is_pause = % d , time = % d . " , pause - > is_pause , pause - > time_ms ) ; <nl> + <nl> + return ret ; <nl> + } <nl> + <nl> + int SrsClient : : on_connect ( ) <nl> + { <nl> + int ret = ERROR_SUCCESS ; <nl> + <nl> + # ifdef SRS_HTTP_CALLBACK <nl> + / / HTTP : on_connect <nl> + SrsConfDirective * on_connect = _srs_config - > get_vhost_on_connect ( req - > vhost ) ; <nl> + if ( ! on_connect ) { <nl> + srs_info ( " ignore the empty http callback : on_connect " ) ; <nl> + return ret ; <nl> + } <nl> + <nl> + for ( int i = 0 ; i < ( int ) on_connect - > args . size ( ) ; i + + ) { <nl> + std : : string url = on_connect - > args . at ( i ) ; <nl> + if ( ( ret = http_hooks - > on_connect ( url , connection_id , ip , req ) ) ! = ERROR_SUCCESS ) { <nl> + srs_error ( " hook client on_connect failed . url = % s , ret = % d " , url . c_str ( ) , ret ) ; <nl> + return ret ; <nl> + } <nl> + } <nl> + # endif <nl> + <nl> + return ret ; <nl> + } <nl> + <nl> + void SrsClient : : on_close ( ) <nl> + { <nl> + # ifdef SRS_HTTP_CALLBACK <nl> + / / whatever the ret code , notify the api hooks . <nl> + / / HTTP : on_close <nl> + SrsConfDirective * on_close = _srs_config - > get_vhost_on_close ( req - > vhost ) ; <nl> + if ( ! on_close ) { <nl> + srs_info ( " ignore the empty http callback : on_close " ) ; <nl> + return ; <nl> + } <nl> + <nl> + for ( int i = 0 ; i < ( int ) on_close - > args . size ( ) ; i + + ) { <nl> + std : : string url = on_close - > args . at ( i ) ; <nl> + http_hooks - > on_close ( url , connection_id , ip , req ) ; <nl> + } <nl> + # endif <nl> + } <nl> + <nl> + int SrsClient : : on_publish ( ) <nl> + { <nl> + int ret = ERROR_SUCCESS ; <nl> + <nl> + # ifdef SRS_HTTP_CALLBACK <nl> + / / HTTP : on_publish <nl> + SrsConfDirective * on_publish = _srs_config - > get_vhost_on_publish ( req - > vhost ) ; <nl> + if ( ! on_publish ) { <nl> + srs_info ( " ignore the empty http callback : on_publish " ) ; <nl> + return ret ; <nl> + } <nl> + <nl> + for ( int i = 0 ; i < ( int ) on_publish - > args . size ( ) ; i + + ) { <nl> + std : : string url = on_publish - > args . at ( i ) ; <nl> + if ( ( ret = http_hooks - > on_publish ( url , connection_id , ip , req ) ) ! = ERROR_SUCCESS ) { <nl> + srs_error ( " hook client on_publish failed . url = % s , ret = % d " , url . c_str ( ) , ret ) ; <nl> + return ret ; <nl> + } <nl> + } <nl> + # endif <nl> + <nl> + return ret ; <nl> + } <nl> + <nl> + void SrsClient : : on_unpublish ( ) <nl> + { <nl> + # ifdef SRS_HTTP_CALLBACK <nl> + / / whatever the ret code , notify the api hooks . <nl> + / / HTTP : on_unpublish <nl> + SrsConfDirective * on_unpublish = _srs_config - > get_vhost_on_unpublish ( req - > vhost ) ; <nl> + if ( ! on_unpublish ) { <nl> + srs_info ( " ignore the empty http callback : on_unpublish " ) ; <nl> + return ; <nl> + } <nl> + <nl> + for ( int i = 0 ; i < ( int ) on_unpublish - > args . size ( ) ; i + + ) { <nl> + std : : string url = on_unpublish - > args . at ( i ) ; <nl> + http_hooks - > on_unpublish ( url , connection_id , ip , req ) ; <nl> + } <nl> + # endif <nl> + } <nl> + <nl> + int SrsClient : : on_play ( ) <nl> + { <nl> + int ret = ERROR_SUCCESS ; <nl> + <nl> + # ifdef SRS_HTTP_CALLBACK <nl> + / / HTTP : on_play <nl> + SrsConfDirective * on_play = _srs_config - > get_vhost_on_play ( req - > vhost ) ; <nl> + if ( ! on_play ) { <nl> + srs_info ( " ignore the empty http callback : on_play " ) ; <nl> + return ret ; <nl> + } <nl> + <nl> + for ( int i = 0 ; i < ( int ) on_play - > args . size ( ) ; i + + ) { <nl> + std : : string url = on_play - > args . at ( i ) ; <nl> + if ( ( ret = http_hooks - > on_play ( url , connection_id , ip , req ) ) ! = ERROR_SUCCESS ) { <nl> + srs_error ( " hook client on_play failed . url = % s , ret = % d " , url . c_str ( ) , ret ) ; <nl> + return ret ; <nl> + } <nl> + } <nl> + # endif <nl> + <nl> + return ret ; <nl> + } <nl> + <nl> + void SrsClient : : on_stop ( ) <nl> + { <nl> + # ifdef SRS_HTTP_CALLBACK <nl> + / / whatever the ret code , notify the api hooks . <nl> + / / HTTP : on_stop <nl> + SrsConfDirective * on_stop = _srs_config - > get_vhost_on_stop ( req - > vhost ) ; <nl> + if ( ! on_stop ) { <nl> + srs_info ( " ignore the empty http callback : on_stop " ) ; <nl> + return ; <nl> + } <nl> + <nl> + for ( int i = 0 ; i < ( int ) on_stop - > args . size ( ) ; i + + ) { <nl> + std : : string url = on_stop - > args . at ( i ) ; <nl> + http_hooks - > on_stop ( url , connection_id , ip , req ) ; <nl> + } <nl> + # endif <nl> + <nl> + return ; <nl> + } <nl> similarity index 96 % <nl> rename from trunk / src / app / srs_app_client . hpp <nl> rename to trunk / src / app / srs_app_rtmp_conn . hpp <nl> mmm a / trunk / src / app / srs_app_client . hpp <nl> ppp b / trunk / src / app / srs_app_rtmp_conn . hpp <nl> IN AN ACTION OF CONTRACT , TORT OR OTHERWISE , ARISING FROM , OUT OF OR IN <nl> CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE . <nl> * / <nl> <nl> - # ifndef SRS_APP_CLIENT_HPP <nl> - # define SRS_APP_CLIENT_HPP <nl> + # ifndef SRS_APP_RTMP_CONN_HPP <nl> + # define SRS_APP_RTMP_CONN_HPP <nl> <nl> / * <nl> - # include < srs_app_client . hpp > <nl> + # include < srs_app_rtmp_conn . hpp > <nl> * / <nl> <nl> # include < srs_core . hpp > <nl> mmm a / trunk / src / app / srs_app_server . cpp <nl> ppp b / trunk / src / app / srs_app_server . cpp <nl> CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE . <nl> <nl> # include < srs_kernel_log . hpp > <nl> # include < srs_kernel_error . hpp > <nl> - # include < srs_app_client . hpp > <nl> + # include < srs_app_rtmp_conn . hpp > <nl> # include < srs_app_config . hpp > <nl> # include < srs_kernel_utility . hpp > <nl> <nl> int SrsListener : : listen ( int _port ) <nl> } <nl> srs_verbose ( " create st listen thread success . " ) ; <nl> <nl> - srs_trace ( " server started , listen at port = % d , fd = % d " , port , fd ) ; <nl> + srs_trace ( " server started , listen at port = % d , type = % d , fd = % d " , port , type , fd ) ; <nl> <nl> return ret ; <nl> } <nl> int SrsServer : : listen ( ) <nl> <nl> int port = : : atoi ( conf - > args . at ( i ) . c_str ( ) ) ; <nl> if ( ( ret = listener - > listen ( port ) ) ! = ERROR_SUCCESS ) { <nl> - srs_error ( " listen at port % d failed . ret = % d " , port , ret ) ; <nl> + srs_error ( " RTMP stream listen at port % d failed . ret = % d " , port , ret ) ; <nl> + return ret ; <nl> + } <nl> + } <nl> + <nl> + if ( _srs_config - > get_http_api_enabled ( ) ) { <nl> + SrsListener * listener = new SrsListener ( this , SrsListenerHttpApi ) ; <nl> + listeners . push_back ( listener ) ; <nl> + <nl> + int port = _srs_config - > get_http_api_listen ( ) ; <nl> + if ( ( ret = listener - > listen ( port ) ) ! = ERROR_SUCCESS ) { <nl> + srs_error ( " HTTP api listen at port % d failed . ret = % d " , port , ret ) ; <nl> + return ret ; <nl> + } <nl> + } <nl> + <nl> + if ( _srs_config - > get_http_stream_enabled ( ) ) { <nl> + SrsListener * listener = new SrsListener ( this , SrsListenerHttpStream ) ; <nl> + listeners . push_back ( listener ) ; <nl> + <nl> + int port = _srs_config - > get_http_stream_listen ( ) ; <nl> + if ( ( ret = listener - > listen ( port ) ) ! = ERROR_SUCCESS ) { <nl> + srs_error ( " HTTP stream listen at port % d failed . ret = % d " , port , ret ) ; <nl> return ret ; <nl> } <nl> } <nl> int SrsServer : : accept_client ( SrsListenerType type , st_netfd_t client_stfd ) <nl> SrsConnection * conn = NULL ; <nl> if ( type = = SrsListenerStream ) { <nl> conn = new SrsClient ( this , client_stfd ) ; <nl> + } else if ( type = = SrsListenerHttpApi ) { <nl> + } else if ( type = = SrsListenerHttpStream ) { <nl> } else { <nl> / / TODO : FIXME : handler others <nl> } <nl> mmm a / trunk / src / app / srs_app_server . hpp <nl> ppp b / trunk / src / app / srs_app_server . hpp <nl> class SrsConnection ; <nl> enum SrsListenerType <nl> { <nl> SrsListenerStream = 0 , <nl> - SrsListenerApi <nl> + SrsListenerHttpApi , <nl> + SrsListenerHttpStream <nl> } ; <nl> <nl> class SrsListener : public ISrsThreadHandler <nl> mmm a / trunk / src / core / srs_core . hpp <nl> ppp b / trunk / src / core / srs_core . hpp <nl> CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE . <nl> / / current release version <nl> # define VERSION_MAJOR " 0 " <nl> # define VERSION_MINOR " 9 " <nl> - # define VERSION_REVISION " 36 " <nl> + # define VERSION_REVISION " 37 " <nl> # define RTMP_SIG_SRS_VERSION VERSION_MAJOR " . " VERSION_MINOR " . " VERSION_REVISION <nl> / / server info . <nl> # define RTMP_SIG_SRS_KEY " srs " <nl> mmm a / trunk / src / srs / srs . upp <nl> ppp b / trunk / src / srs / srs . upp <nl> <nl> file <nl> - main readonly separator , <nl> - . . \ main \ srs_main_server . cpp , <nl> - . . \ main \ srs_main_bandcheck . cpp , <nl> - auto readonly separator , <nl> - . . \ . . \ objs \ srs_auto_headers . hpp , <nl> - libs readonly separator , <nl> - . . \ libs \ srs_librtmp . hpp , <nl> - . . \ libs \ srs_librtmp . cpp , <nl> - . . \ libs \ srs_lib_simple_socket . hpp , <nl> - . . \ libs \ srs_lib_simple_socket . cpp , <nl> - core readonly separator , <nl> - . . \ core \ srs_core . hpp , <nl> - . . \ core \ srs_core . cpp , <nl> - . . \ core \ srs_core_autofree . hpp , <nl> - . . \ core \ srs_core_autofree . cpp , <nl> - kernel readonly separator , <nl> - . . \ kernel \ srs_kernel_buffer . hpp , <nl> - . . \ kernel \ srs_kernel_buffer . cpp , <nl> - . . \ kernel \ srs_kernel_error . hpp , <nl> - . . \ kernel \ srs_kernel_error . cpp , <nl> - . . \ kernel \ srs_kernel_log . hpp , <nl> - . . \ kernel \ srs_kernel_log . cpp , <nl> - . . \ kernel \ srs_kernel_stream . hpp , <nl> - . . \ kernel \ srs_kernel_stream . cpp , <nl> - . . \ kernel \ srs_kernel_utility . hpp , <nl> - . . \ kernel \ srs_kernel_utility . cpp , <nl> - rtmp - protocol readonly separator , <nl> - . . \ rtmp \ srs_protocol_amf0 . hpp , <nl> - . . \ rtmp \ srs_protocol_amf0 . cpp , <nl> - . . \ rtmp \ srs_protocol_handshake . hpp , <nl> - . . \ rtmp \ srs_protocol_handshake . cpp , <nl> - . . \ rtmp \ srs_protocol_io . hpp , <nl> - . . \ rtmp \ srs_protocol_io . cpp , <nl> - . . \ rtmp \ srs_protocol_rtmp . hpp , <nl> - . . \ rtmp \ srs_protocol_rtmp . cpp , <nl> - . . \ rtmp \ srs_protocol_rtmp_stack . hpp , <nl> - . . \ rtmp \ srs_protocol_rtmp_stack . cpp , <nl> - . . \ rtmp \ srs_protocol_utility . hpp , <nl> - . . \ rtmp \ srs_protocol_utility . cpp , <nl> - app readonly separator , <nl> - . . \ app \ srs_app_bandwidth . hpp , <nl> - . . \ app \ srs_app_bandwidth . cpp , <nl> - . . \ app \ srs_app_client . hpp , <nl> - . . \ app \ srs_app_client . cpp , <nl> - . . \ app \ srs_app_codec . hpp , <nl> - . . \ app \ srs_app_codec . cpp , <nl> - . . \ app \ srs_app_conn . hpp , <nl> - . . \ app \ srs_app_conn . cpp , <nl> - . . \ app \ srs_app_config . hpp , <nl> - . . \ app \ srs_app_config . cpp , <nl> - . . \ app \ srs_app_encoder . hpp , <nl> - . . \ app \ srs_app_encoder . cpp , <nl> - . . \ app \ srs_app_forward . hpp , <nl> - . . \ app \ srs_app_forward . cpp , <nl> - . . \ app \ srs_app_hls . hpp , <nl> - . . \ app \ srs_app_hls . cpp , <nl> - . . \ app \ srs_app_http . hpp , <nl> - . . \ app \ srs_app_http . cpp , <nl> - . . \ app \ srs_app_log . hpp , <nl> - . . \ app \ srs_app_log . cpp , <nl> - . . \ app \ srs_app_refer . hpp , <nl> - . . \ app \ srs_app_refer . cpp , <nl> - . . \ app \ srs_app_reload . hpp , <nl> - . . \ app \ srs_app_reload . cpp , <nl> - . . \ app \ srs_app_pithy_print . hpp , <nl> - . . \ app \ srs_app_pithy_print . cpp , <nl> - . . \ app \ srs_app_thread . hpp , <nl> - . . \ app \ srs_app_thread . cpp , <nl> - . . \ app \ srs_app_server . hpp , <nl> - . . \ app \ srs_app_server . cpp , <nl> - . . \ app \ srs_app_st . hpp , <nl> - . . \ app \ srs_app_st . cpp , <nl> - . . \ app \ srs_app_socket . hpp , <nl> - . . \ app \ srs_app_socket . cpp , <nl> - . . \ app \ srs_app_source . hpp , <nl> - . . \ app \ srs_app_source . cpp , <nl> - utest readonly separator , <nl> - . . \ utest \ srs_utest . hpp , <nl> - . . \ utest \ srs_utest . cpp , <nl> - . . \ utest \ srs_utest_amf0 . hpp , <nl> - . . \ utest \ srs_utest_amf0 . cpp , <nl> - . . \ utest \ srs_utest_handshake . hpp , <nl> - . . \ utest \ srs_utest_handshake . cpp , <nl> - research readonly separator , <nl> - . . \ . . \ research \ librtmp \ srs_play . c , <nl> - . . \ . . \ research \ librtmp \ srs_publish . c , <nl> - . . \ . . \ research \ hls \ ts_info . cc ; <nl> + main readonly separator , <nl> + . . \ main \ srs_main_server . cpp , <nl> + . . \ main \ srs_main_bandcheck . cpp , <nl> + auto readonly separator , <nl> + . . \ . . \ objs \ srs_auto_headers . hpp , <nl> + libs readonly separator , <nl> + . . \ libs \ srs_librtmp . hpp , <nl> + . . \ libs \ srs_librtmp . cpp , <nl> + . . \ libs \ srs_lib_simple_socket . hpp , <nl> + . . \ libs \ srs_lib_simple_socket . cpp , <nl> + core readonly separator , <nl> + . . \ core \ srs_core . hpp , <nl> + . . \ core \ srs_core . cpp , <nl> + . . \ core \ srs_core_autofree . hpp , <nl> + . . \ core \ srs_core_autofree . cpp , <nl> + kernel readonly separator , <nl> + . . \ kernel \ srs_kernel_buffer . hpp , <nl> + . . \ kernel \ srs_kernel_buffer . cpp , <nl> + . . \ kernel \ srs_kernel_error . hpp , <nl> + . . \ kernel \ srs_kernel_error . cpp , <nl> + . . \ kernel \ srs_kernel_log . hpp , <nl> + . . \ kernel \ srs_kernel_log . cpp , <nl> + . . \ kernel \ srs_kernel_stream . hpp , <nl> + . . \ kernel \ srs_kernel_stream . cpp , <nl> + . . \ kernel \ srs_kernel_utility . hpp , <nl> + . . \ kernel \ srs_kernel_utility . cpp , <nl> + rtmp - protocol readonly separator , <nl> + . . \ rtmp \ srs_protocol_amf0 . hpp , <nl> + . . \ rtmp \ srs_protocol_amf0 . cpp , <nl> + . . \ rtmp \ srs_protocol_handshake . hpp , <nl> + . . \ rtmp \ srs_protocol_handshake . cpp , <nl> + . . \ rtmp \ srs_protocol_io . hpp , <nl> + . . \ rtmp \ srs_protocol_io . cpp , <nl> + . . \ rtmp \ srs_protocol_rtmp . hpp , <nl> + . . \ rtmp \ srs_protocol_rtmp . cpp , <nl> + . . \ rtmp \ srs_protocol_rtmp_stack . hpp , <nl> + . . \ rtmp \ srs_protocol_rtmp_stack . cpp , <nl> + . . \ rtmp \ srs_protocol_utility . hpp , <nl> + . . \ rtmp \ srs_protocol_utility . cpp , <nl> + app readonly separator , <nl> + . . \ app \ srs_app_bandwidth . hpp , <nl> + . . \ app \ srs_app_bandwidth . cpp , <nl> + . . \ app \ srs_app_codec . hpp , <nl> + . . \ app \ srs_app_codec . cpp , <nl> + . . \ app \ srs_app_conn . hpp , <nl> + . . \ app \ srs_app_conn . cpp , <nl> + . . \ app \ srs_app_config . hpp , <nl> + . . \ app \ srs_app_config . cpp , <nl> + . . \ app \ srs_app_encoder . hpp , <nl> + . . \ app \ srs_app_encoder . cpp , <nl> + . . \ app \ srs_app_forward . hpp , <nl> + . . \ app \ srs_app_forward . cpp , <nl> + . . \ app \ srs_app_hls . hpp , <nl> + . . \ app \ srs_app_hls . cpp , <nl> + . . \ app \ srs_app_http . hpp , <nl> + . . \ app \ srs_app_http . cpp , <nl> + . . \ app \ srs_app_http_api . hpp , <nl> + . . \ app \ srs_app_http_api . cpp , <nl> + . . \ app \ srs_app_http_conn . hpp , <nl> + . . \ app \ srs_app_http_conn . cpp , <nl> + . . \ app \ srs_app_log . hpp , <nl> + . . \ app \ srs_app_log . cpp , <nl> + . . \ app \ srs_app_refer . hpp , <nl> + . . \ app \ srs_app_refer . cpp , <nl> + . . \ app \ srs_app_reload . hpp , <nl> + . . \ app \ srs_app_reload . cpp , <nl> + . . \ app \ srs_app_rtmp_conn . hpp , <nl> + . . \ app \ srs_app_rtmp_conn . cpp , <nl> + . . \ app \ srs_app_pithy_print . hpp , <nl> + . . \ app \ srs_app_pithy_print . cpp , <nl> + . . \ app \ srs_app_thread . hpp , <nl> + . . \ app \ srs_app_thread . cpp , <nl> + . . \ app \ srs_app_server . hpp , <nl> + . . \ app \ srs_app_server . cpp , <nl> + . . \ app \ srs_app_st . hpp , <nl> + . . \ app \ srs_app_st . cpp , <nl> + . . \ app \ srs_app_socket . hpp , <nl> + . . \ app \ srs_app_socket . cpp , <nl> + . . \ app \ srs_app_source . hpp , <nl> + . . \ app \ srs_app_source . cpp , <nl> + utest readonly separator , <nl> + . . \ utest \ srs_utest . hpp , <nl> + . . \ utest \ srs_utest . cpp , <nl> + . . \ utest \ srs_utest_amf0 . hpp , <nl> + . . \ utest \ srs_utest_amf0 . cpp , <nl> + . . \ utest \ srs_utest_handshake . hpp , <nl> + . . \ utest \ srs_utest_handshake . cpp , <nl> + research readonly separator , <nl> + . . \ . . \ research \ librtmp \ srs_play . c , <nl> + . . \ . . \ research \ librtmp \ srs_publish . c , <nl> + . . \ . . \ research \ hls \ ts_info . cc ; <nl> <nl> mainconfig <nl> - " " = " MAIN " ; <nl> + " " = " MAIN " ; <nl> <nl>
change to 0 . 9 . 37 , for http api / stream
ossrs/srs
aa89f9f51e549134a45c6b614a1b9b178db40738
2014-03-27T04:14:04Z
mmm a / googlemock / docs / gmock_faq . md <nl> ppp b / googlemock / docs / gmock_faq . md <nl> void Bar ( int * p ) ; / / Neither p nor * p is const . <nl> void Bar ( const int * p ) ; / / p is not const , but * p is . <nl> ` ` ` <nl> <nl> - < < ! - - GOOGLETEST_CM0030 DO NOT DELETE - - > <nl> + < ! - - GOOGLETEST_CM0030 DO NOT DELETE - - > <nl> <nl> # # # I can ' t figure out why gMock thinks my expectations are not satisfied . What should I do ? <nl> <nl> mmm a / googletest / samples / sample9_unittest . cc <nl> ppp b / googletest / samples / sample9_unittest . cc <nl> int main ( int argc , char * * argv ) { <nl> / / This is an example of using the UnitTest reflection API to inspect test <nl> / / results . Here we discount failures from the tests we expected to fail . <nl> int unexpectedly_failed_tests = 0 ; <nl> - for ( int i = 0 ; i < unit_test . total_test_case_count ( ) ; + + i ) { <nl> - const TestCase & test_case = * unit_test . GetTestCase ( i ) ; <nl> - for ( int j = 0 ; j < test_case . total_test_count ( ) ; + + j ) { <nl> - const TestInfo & test_info = * test_case . GetTestInfo ( j ) ; <nl> + for ( int i = 0 ; i < unit_test . total_test_suite_count ( ) ; + + i ) { <nl> + const testing : : TestSuite & test_suite = * unit_test . GetTestSuite ( i ) ; <nl> + for ( int j = 0 ; j < test_suite . total_test_count ( ) ; + + j ) { <nl> + const TestInfo & test_info = * test_suite . GetTestInfo ( j ) ; <nl> / / Counts failed tests that were not meant to fail ( those without <nl> / / ' Fails ' in the name ) . <nl> if ( test_info . result ( ) - > Failed ( ) & & <nl> mmm a / googletest / src / gtest . cc <nl> ppp b / googletest / src / gtest . cc <nl> class PrettyUnitTestResultPrinter : public TestEventListener { <nl> void OnTestIterationStart ( const UnitTest & unit_test , int iteration ) override ; <nl> void OnEnvironmentsSetUpStart ( const UnitTest & unit_test ) override ; <nl> void OnEnvironmentsSetUpEnd ( const UnitTest & / * unit_test * / ) override { } <nl> - void OnTestCaseStart ( const TestSuite & test_suite ) override ; <nl> + # ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_ <nl> + void OnTestCaseStart ( const TestCase & test_case ) override ; <nl> + # else <nl> + void OnTestSuiteStart ( const TestSuite & test_suite ) override ; <nl> + # endif / / OnTestCaseStart <nl> + <nl> void OnTestStart ( const TestInfo & test_info ) override ; <nl> + <nl> void OnTestPartResult ( const TestPartResult & result ) override ; <nl> void OnTestEnd ( const TestInfo & test_info ) override ; <nl> - void OnTestCaseEnd ( const TestSuite & test_suite ) override ; <nl> + # ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_ <nl> + void OnTestCaseEnd ( const TestCase & test_case ) override ; <nl> + # else <nl> + void OnTestSuiteEnd ( const TestSuite & test_suite ) override ; <nl> + # endif / / GTEST_REMOVE_LEGACY_TEST_CASEAPI_ <nl> + <nl> void OnEnvironmentsTearDownStart ( const UnitTest & unit_test ) override ; <nl> void OnEnvironmentsTearDownEnd ( const UnitTest & / * unit_test * / ) override { } <nl> void OnTestIterationEnd ( const UnitTest & unit_test , int iteration ) override ; <nl> void PrettyUnitTestResultPrinter : : OnEnvironmentsSetUpStart ( <nl> fflush ( stdout ) ; <nl> } <nl> <nl> - void PrettyUnitTestResultPrinter : : OnTestCaseStart ( const TestSuite & test_suite ) { <nl> + # ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_ <nl> + void PrettyUnitTestResultPrinter : : OnTestCaseStart ( const TestCase & test_case ) { <nl> + const std : : string counts = <nl> + FormatCountableNoun ( test_case . test_to_run_count ( ) , " test " , " tests " ) ; <nl> + ColoredPrintf ( COLOR_GREEN , " [ mmmmmmmmm - ] " ) ; <nl> + printf ( " % s from % s " , counts . c_str ( ) , test_case . name ( ) ) ; <nl> + if ( test_case . type_param ( ) = = nullptr ) { <nl> + printf ( " \ n " ) ; <nl> + } else { <nl> + printf ( " , where % s = % s \ n " , kTypeParamLabel , test_case . type_param ( ) ) ; <nl> + } <nl> + fflush ( stdout ) ; <nl> + } <nl> + # else <nl> + void PrettyUnitTestResultPrinter : : OnTestSuiteStart ( <nl> + const TestSuite & test_suite ) { <nl> const std : : string counts = <nl> FormatCountableNoun ( test_suite . test_to_run_count ( ) , " test " , " tests " ) ; <nl> ColoredPrintf ( COLOR_GREEN , " [ mmmmmmmmm - ] " ) ; <nl> void PrettyUnitTestResultPrinter : : OnTestCaseStart ( const TestSuite & test_suite ) { <nl> } <nl> fflush ( stdout ) ; <nl> } <nl> + # endif / / GTEST_REMOVE_LEGACY_TEST_CASEAPI_ <nl> <nl> void PrettyUnitTestResultPrinter : : OnTestStart ( const TestInfo & test_info ) { <nl> ColoredPrintf ( COLOR_GREEN , " [ RUN ] " ) ; <nl> void PrettyUnitTestResultPrinter : : OnTestEnd ( const TestInfo & test_info ) { <nl> fflush ( stdout ) ; <nl> } <nl> <nl> - void PrettyUnitTestResultPrinter : : OnTestCaseEnd ( const TestSuite & test_suite ) { <nl> + # ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_ <nl> + void PrettyUnitTestResultPrinter : : OnTestCaseEnd ( const TestCase & test_case ) { <nl> + if ( ! GTEST_FLAG ( print_time ) ) return ; <nl> + <nl> + const std : : string counts = <nl> + FormatCountableNoun ( test_case . test_to_run_count ( ) , " test " , " tests " ) ; <nl> + ColoredPrintf ( COLOR_GREEN , " [ mmmmmmmmm - ] " ) ; <nl> + printf ( " % s from % s ( % s ms total ) \ n \ n " , counts . c_str ( ) , test_case . name ( ) , <nl> + internal : : StreamableToString ( test_case . elapsed_time ( ) ) . c_str ( ) ) ; <nl> + fflush ( stdout ) ; <nl> + } <nl> + # else <nl> + void PrettyUnitTestResultPrinter : : OnTestSuiteEnd ( const TestSuite & test_suite ) { <nl> if ( ! GTEST_FLAG ( print_time ) ) return ; <nl> <nl> const std : : string counts = <nl> void PrettyUnitTestResultPrinter : : OnTestCaseEnd ( const TestSuite & test_suite ) { <nl> internal : : StreamableToString ( test_suite . elapsed_time ( ) ) . c_str ( ) ) ; <nl> fflush ( stdout ) ; <nl> } <nl> + # endif / / GTEST_REMOVE_LEGACY_TEST_CASEAPI_ <nl> <nl> void PrettyUnitTestResultPrinter : : OnEnvironmentsTearDownStart ( <nl> const UnitTest & / * unit_test * / ) { <nl> class TestEventRepeater : public TestEventListener { <nl> void OnEnvironmentsSetUpStart ( const UnitTest & unit_test ) override ; <nl> void OnEnvironmentsSetUpEnd ( const UnitTest & unit_test ) override ; <nl> / / Legacy API is deprecated but still available <nl> - # ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI <nl> + # ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_ <nl> void OnTestCaseStart ( const TestSuite & parameter ) override ; <nl> - # endif / / GTEST_REMOVE_LEGACY_TEST_CASEAPI <nl> + # endif / / GTEST_REMOVE_LEGACY_TEST_CASEAPI_ <nl> void OnTestSuiteStart ( const TestSuite & parameter ) override ; <nl> void OnTestStart ( const TestInfo & test_info ) override ; <nl> void OnTestPartResult ( const TestPartResult & result ) override ; <nl> void OnTestEnd ( const TestInfo & test_info ) override ; <nl> / / Legacy API is deprecated but still available <nl> - # ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI <nl> - void OnTestCaseEnd ( const TestSuite & parameter ) override ; <nl> - # endif / / GTEST_REMOVE_LEGACY_TEST_CASEAPI <nl> + # ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_ <nl> + void OnTestCaseEnd ( const TestCase & parameter ) override ; <nl> + # endif / / GTEST_REMOVE_LEGACY_TEST_CASEAPI_ <nl> void OnTestSuiteEnd ( const TestSuite & parameter ) override ; <nl> void OnEnvironmentsTearDownStart ( const UnitTest & unit_test ) override ; <nl> void OnEnvironmentsTearDownEnd ( const UnitTest & unit_test ) override ; <nl> mmm a / googletest / test / googletest - listener - test . cc <nl> ppp b / googletest / test / googletest - listener - test . cc <nl> <nl> # include < vector > <nl> <nl> # include " gtest / gtest . h " <nl> + # include " gtest / internal / custom / gtest . h " <nl> <nl> using : : testing : : AddGlobalTestEnvironment ; <nl> using : : testing : : Environment ; <nl> class EventRecordingListener : public TestEventListener { <nl> void OnEnvironmentsSetUpEnd ( const UnitTest & / * unit_test * / ) override { <nl> g_events - > push_back ( GetFullMethodName ( " OnEnvironmentsSetUpEnd " ) ) ; <nl> } <nl> - <nl> + # ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_ <nl> void OnTestCaseStart ( const TestCase & / * test_case * / ) override { <nl> g_events - > push_back ( GetFullMethodName ( " OnTestCaseStart " ) ) ; <nl> } <nl> + # endif / / GTEST_REMOVE_LEGACY_TEST_CASEAPI_ <nl> <nl> void OnTestStart ( const TestInfo & / * test_info * / ) override { <nl> g_events - > push_back ( GetFullMethodName ( " OnTestStart " ) ) ; <nl> class EventRecordingListener : public TestEventListener { <nl> g_events - > push_back ( GetFullMethodName ( " OnTestEnd " ) ) ; <nl> } <nl> <nl> + # ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_ <nl> void OnTestCaseEnd ( const TestCase & / * test_case * / ) override { <nl> g_events - > push_back ( GetFullMethodName ( " OnTestCaseEnd " ) ) ; <nl> } <nl> + # endif / / GTEST_REMOVE_LEGACY_TEST_CASEAPI_ <nl> <nl> void OnEnvironmentsTearDownStart ( const UnitTest & / * unit_test * / ) override { <nl> g_events - > push_back ( GetFullMethodName ( " OnEnvironmentsTearDownStart " ) ) ; <nl> int main ( int argc , char * * argv ) { <nl> : : testing : : GTEST_FLAG ( repeat ) = 2 ; <nl> int ret_val = RUN_ALL_TESTS ( ) ; <nl> <nl> + # ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_ <nl> + <nl> + / / The deprecated OnTestSuiteStart / OnTestCaseStart events are included <nl> const char * const expected_events [ ] = { " 1st . OnTestProgramStart " , <nl> " 2nd . OnTestProgramStart " , <nl> " 3rd . OnTestProgramStart " , <nl> int main ( int argc , char * * argv ) { <nl> " 3rd . OnTestProgramEnd " , <nl> " 2nd . OnTestProgramEnd " , <nl> " 1st . OnTestProgramEnd " } ; <nl> + # else <nl> + const char * const expected_events [ ] = { " 1st . OnTestProgramStart " , <nl> + " 2nd . OnTestProgramStart " , <nl> + " 3rd . OnTestProgramStart " , <nl> + " 1st . OnTestIterationStart ( 0 ) " , <nl> + " 2nd . OnTestIterationStart ( 0 ) " , <nl> + " 3rd . OnTestIterationStart ( 0 ) " , <nl> + " 1st . OnEnvironmentsSetUpStart " , <nl> + " 2nd . OnEnvironmentsSetUpStart " , <nl> + " 3rd . OnEnvironmentsSetUpStart " , <nl> + " Environment : : SetUp " , <nl> + " 3rd . OnEnvironmentsSetUpEnd " , <nl> + " 2nd . OnEnvironmentsSetUpEnd " , <nl> + " 1st . OnEnvironmentsSetUpEnd " , <nl> + " 3rd . OnTestSuiteStart " , <nl> + " ListenerTest : : SetUpTestSuite " , <nl> + " 1st . OnTestStart " , <nl> + " 2nd . OnTestStart " , <nl> + " 3rd . OnTestStart " , <nl> + " ListenerTest : : SetUp " , <nl> + " ListenerTest : : * Test Body " , <nl> + " 1st . OnTestPartResult " , <nl> + " 2nd . OnTestPartResult " , <nl> + " 3rd . OnTestPartResult " , <nl> + " ListenerTest : : TearDown " , <nl> + " 3rd . OnTestEnd " , <nl> + " 2nd . OnTestEnd " , <nl> + " 1st . OnTestEnd " , <nl> + " 1st . OnTestStart " , <nl> + " 2nd . OnTestStart " , <nl> + " 3rd . OnTestStart " , <nl> + " ListenerTest : : SetUp " , <nl> + " ListenerTest : : * Test Body " , <nl> + " 1st . OnTestPartResult " , <nl> + " 2nd . OnTestPartResult " , <nl> + " 3rd . OnTestPartResult " , <nl> + " ListenerTest : : TearDown " , <nl> + " 3rd . OnTestEnd " , <nl> + " 2nd . OnTestEnd " , <nl> + " 1st . OnTestEnd " , <nl> + " ListenerTest : : TearDownTestSuite " , <nl> + " 3rd . OnTestSuiteEnd " , <nl> + " 1st . OnEnvironmentsTearDownStart " , <nl> + " 2nd . OnEnvironmentsTearDownStart " , <nl> + " 3rd . OnEnvironmentsTearDownStart " , <nl> + " Environment : : TearDown " , <nl> + " 3rd . OnEnvironmentsTearDownEnd " , <nl> + " 2nd . OnEnvironmentsTearDownEnd " , <nl> + " 1st . OnEnvironmentsTearDownEnd " , <nl> + " 3rd . OnTestIterationEnd ( 0 ) " , <nl> + " 2nd . OnTestIterationEnd ( 0 ) " , <nl> + " 1st . OnTestIterationEnd ( 0 ) " , <nl> + " 1st . OnTestIterationStart ( 1 ) " , <nl> + " 2nd . OnTestIterationStart ( 1 ) " , <nl> + " 3rd . OnTestIterationStart ( 1 ) " , <nl> + " 1st . OnEnvironmentsSetUpStart " , <nl> + " 2nd . OnEnvironmentsSetUpStart " , <nl> + " 3rd . OnEnvironmentsSetUpStart " , <nl> + " Environment : : SetUp " , <nl> + " 3rd . OnEnvironmentsSetUpEnd " , <nl> + " 2nd . OnEnvironmentsSetUpEnd " , <nl> + " 1st . OnEnvironmentsSetUpEnd " , <nl> + " 3rd . OnTestSuiteStart " , <nl> + " ListenerTest : : SetUpTestSuite " , <nl> + " 1st . OnTestStart " , <nl> + " 2nd . OnTestStart " , <nl> + " 3rd . OnTestStart " , <nl> + " ListenerTest : : SetUp " , <nl> + " ListenerTest : : * Test Body " , <nl> + " 1st . OnTestPartResult " , <nl> + " 2nd . OnTestPartResult " , <nl> + " 3rd . OnTestPartResult " , <nl> + " ListenerTest : : TearDown " , <nl> + " 3rd . OnTestEnd " , <nl> + " 2nd . OnTestEnd " , <nl> + " 1st . OnTestEnd " , <nl> + " 1st . OnTestStart " , <nl> + " 2nd . OnTestStart " , <nl> + " 3rd . OnTestStart " , <nl> + " ListenerTest : : SetUp " , <nl> + " ListenerTest : : * Test Body " , <nl> + " 1st . OnTestPartResult " , <nl> + " 2nd . OnTestPartResult " , <nl> + " 3rd . OnTestPartResult " , <nl> + " ListenerTest : : TearDown " , <nl> + " 3rd . OnTestEnd " , <nl> + " 2nd . OnTestEnd " , <nl> + " 1st . OnTestEnd " , <nl> + " ListenerTest : : TearDownTestSuite " , <nl> + " 3rd . OnTestSuiteEnd " , <nl> + " 1st . OnEnvironmentsTearDownStart " , <nl> + " 2nd . OnEnvironmentsTearDownStart " , <nl> + " 3rd . OnEnvironmentsTearDownStart " , <nl> + " Environment : : TearDown " , <nl> + " 3rd . OnEnvironmentsTearDownEnd " , <nl> + " 2nd . OnEnvironmentsTearDownEnd " , <nl> + " 1st . OnEnvironmentsTearDownEnd " , <nl> + " 3rd . OnTestIterationEnd ( 1 ) " , <nl> + " 2nd . OnTestIterationEnd ( 1 ) " , <nl> + " 1st . OnTestIterationEnd ( 1 ) " , <nl> + " 3rd . OnTestProgramEnd " , <nl> + " 2nd . OnTestProgramEnd " , <nl> + " 1st . OnTestProgramEnd " } ; <nl> + # endif / / GTEST_REMOVE_LEGACY_TEST_CASEAPI_ <nl> <nl> VerifyResults ( events , <nl> expected_events , <nl> mmm a / googletest / test / gtest_unittest . cc <nl> ppp b / googletest / test / gtest_unittest . cc <nl> void ExpectNonFatalFailureRecordingPropertyWithReservedKeyForCurrentTest ( <nl> <nl> void ExpectNonFatalFailureRecordingPropertyWithReservedKeyForCurrentTestSuite ( <nl> const char * key ) { <nl> - const TestCase * test_case = UnitTest : : GetInstance ( ) - > current_test_case ( ) ; <nl> - ASSERT_TRUE ( test_case ! = nullptr ) ; <nl> + const testing : : TestSuite * test_suite = <nl> + UnitTest : : GetInstance ( ) - > current_test_suite ( ) ; <nl> + ASSERT_TRUE ( test_suite ! = nullptr ) ; <nl> ExpectNonFatalFailureRecordingPropertyWithReservedKey ( <nl> - test_case - > ad_hoc_test_result ( ) , key ) ; <nl> + test_suite - > ad_hoc_test_result ( ) , key ) ; <nl> } <nl> <nl> void ExpectNonFatalFailureRecordingPropertyWithReservedKeyOutsideOfTestSuite ( <nl> class UnitTestRecordPropertyTest : <nl> " time " ) ; <nl> <nl> Test : : RecordProperty ( " test_case_key_1 " , " 1 " ) ; <nl> + <nl> const testing : : TestSuite * test_suite = <nl> - UnitTest : : GetInstance ( ) - > current_test_case ( ) ; <nl> + UnitTest : : GetInstance ( ) - > current_test_suite ( ) ; <nl> + <nl> ASSERT_TRUE ( test_suite ! = nullptr ) ; <nl> <nl> ASSERT_EQ ( 1 , test_suite - > ad_hoc_test_result ( ) . test_property_count ( ) ) ; <nl>
Googletest export
google/googletest
2221875d0bc7b835e93d6c562f4879251037fa1f
2019-08-01T20:05:33Z
mmm a / scripts / eosio_build_centos . sh <nl> ppp b / scripts / eosio_build_centos . sh <nl> <nl> printf " \ \ n \ \ tExiting now . \ \ n \ \ n " <nl> exit 1 ; <nl> fi <nl> + if [ - d " $ BUILD_DIR " ] ; then <nl> + if ! rm - rf " $ BUILD_DIR " <nl> + then <nl> + printf " \ \ tUnable to remove directory % s . Please remove this directory and run this script % s again . 0 \ \ n " " $ BUILD_DIR " " $ { BASH_SOURCE [ 0 ] } " <nl> + printf " \ \ tExiting now . \ \ n \ \ n " <nl> + exit 1 ; <nl> + fi <nl> + fi <nl> printf " \ \ tBoost 1 . 67 . 0 successfully installed @ % s / opt / boost_1_67_0 . \ \ n \ \ n " " $ { HOME } " <nl> else <nl> printf " \ \ tBoost 1 . 67 . 0 found at % s / opt / boost_1_67_0 . \ \ n \ \ n " " $ { HOME } " <nl> mmm a / scripts / eosio_build_ubuntu . sh <nl> ppp b / scripts / eosio_build_ubuntu . sh <nl> <nl> printf " \ \ n \ \ tExiting now . \ \ n \ \ n " <nl> exit 1 <nl> fi <nl> + if [ - d " $ BUILD_DIR " ] ; then <nl> + if ! rm - rf " $ BUILD_DIR " <nl> + then <nl> + printf " \ \ tUnable to remove directory % s . Please remove this directory and run this script % s again . 0 \ \ n " " $ BUILD_DIR " " $ { BASH_SOURCE [ 0 ] } " <nl> + printf " \ \ tExiting now . \ \ n \ \ n " <nl> + exit 1 ; <nl> + fi <nl> + fi <nl> printf " \ \ tBoost 1 . 67 . 0 successfully installed @ % s / opt / boost_1_67_0 . \ \ n " " $ { HOME } " <nl> else <nl> printf " \ \ tBoost 1 . 67 . 0 found at % s / opt / boost_1_67_0 . \ \ n \ \ n " " $ { HOME } " <nl>
Merge pull request from pacificcode / eosio_build_centos
EOSIO/eos
9b42e8ecc8231c3f33190194a109913a7eb8ae44
2018-05-28T20:31:57Z
mmm a / include / rocksdb / iostats_context . h <nl> ppp b / include / rocksdb / iostats_context . h <nl> struct IOStatsContext { <nl> uint64_t allocate_nanos ; <nl> / / time spent in write ( ) and pwrite ( ) . <nl> uint64_t write_nanos ; <nl> + / / time spent in read ( ) and pread ( ) <nl> + uint64_t read_nanos ; <nl> / / time spent in sync_file_range ( ) . <nl> uint64_t range_sync_nanos ; <nl> <nl> mmm a / util / env_posix . cc <nl> ppp b / util / env_posix . cc <nl> class PosixRandomAccessFile : public RandomAccessFile { <nl> size_t left = n ; <nl> char * ptr = scratch ; <nl> while ( left > 0 ) { <nl> - r = pread ( fd_ , ptr , left , static_cast < off_t > ( offset ) ) ; <nl> + { <nl> + IOSTATS_TIMER_GUARD ( read_nanos ) ; <nl> + r = pread ( fd_ , ptr , left , static_cast < off_t > ( offset ) ) ; <nl> + } <nl> + <nl> if ( r < = 0 ) { <nl> if ( errno = = EINTR ) { <nl> continue ; <nl> class PosixRandomRWFile : public RandomRWFile { <nl> size_t left = n ; <nl> char * ptr = scratch ; <nl> while ( left > 0 ) { <nl> - r = pread ( fd_ , ptr , left , static_cast < off_t > ( offset ) ) ; <nl> + { <nl> + IOSTATS_TIMER_GUARD ( read_nanos ) ; <nl> + r = pread ( fd_ , ptr , left , static_cast < off_t > ( offset ) ) ; <nl> + } <nl> + <nl> if ( r < = 0 ) { <nl> if ( errno = = EINTR ) { <nl> continue ; <nl> mmm a / util / iostats_context . cc <nl> ppp b / util / iostats_context . cc <nl> void IOStatsContext : : Reset ( ) { <nl> open_nanos = 0 ; <nl> allocate_nanos = 0 ; <nl> write_nanos = 0 ; <nl> + read_nanos = 0 ; <nl> range_sync_nanos = 0 ; <nl> logger_nanos = 0 ; <nl> } <nl> std : : string IOStatsContext : : ToString ( ) const { <nl> < < OUTPUT ( open_nanos ) <nl> < < OUTPUT ( allocate_nanos ) <nl> < < OUTPUT ( write_nanos ) <nl> + < < OUTPUT ( read_nanos ) <nl> < < OUTPUT ( range_sync_nanos ) <nl> < < OUTPUT ( logger_nanos ) ; <nl> <nl>
Add read_nanos to IOStatsContext .
facebook/rocksdb
7015fd81c431da527d8038f264eb3a7168cfe592
2015-06-22T18:09:35Z
mmm a / Telegram / SourceFiles / apiwrap . cpp <nl> ppp b / Telegram / SourceFiles / apiwrap . cpp <nl> void ApiWrap : : requestMoreBlockedByDateDialogs ( ) { <nl> _dialogsLoadTill = _dialogsLoadState - > offsetDate <nl> ? ( _dialogsLoadState - > offsetDate - max ) <nl> : ( unixtime ( ) - max ) ; <nl> - requestDialogs ( FolderId ( 0 ) ) ; <nl> + requestDialogs ( ) ; <nl> } <nl> <nl> rpl : : producer < bool > ApiWrap : : dialogsLoadMayBlockByDate ( ) const { <nl> void ApiWrap : : applyPeerDialogs ( const MTPmessages_PeerDialogs & dialogs ) { <nl> for ( const auto & dialog : data . vdialogs . v ) { <nl> dialog . match ( [ & ] ( const MTPDdialog & data ) { <nl> if ( const auto peerId = peerFromMTP ( data . vpeer ) ) { <nl> - const auto requestFolderId = FolderId ( 0 ) ; <nl> - _session - > data ( ) . history ( peerId ) - > applyDialog ( <nl> - requestFolderId , <nl> - data ) ; <nl> + _session - > data ( ) . history ( peerId ) - > applyDialog ( nullptr , data ) ; <nl> } <nl> } , [ & ] ( const MTPDdialogFolder & data ) { <nl> const auto folder = _session - > data ( ) . processFolder ( data . vfolder ) ; <nl> mmm a / Telegram / SourceFiles / dialogs / dialogs_pinned_list . cpp <nl> ppp b / Telegram / SourceFiles / dialogs / dialogs_pinned_list . cpp <nl> void PinnedList : : setPinned ( const Key & key , bool pinned ) { <nl> } <nl> } <nl> } else if ( const auto it = ranges : : find ( _data , key ) ; it ! = end ( _data ) ) { <nl> - const auto index = ( it - begin ( _data ) ) ; <nl> + const auto index = int ( it - begin ( _data ) ) ; <nl> _data . erase ( it ) ; <nl> key . entry ( ) - > cachePinnedIndex ( 0 ) ; <nl> for ( auto i = index , count = int ( size ( _data ) ) ; i ! = count ; + + i ) { <nl> mmm a / Telegram / SourceFiles / mainwidget . cpp <nl> ppp b / Telegram / SourceFiles / mainwidget . cpp <nl> void MainWidget : : gotState ( const MTPupdates_State & state ) { <nl> _noUpdatesTimer . callOnce ( kNoUpdatesTimeout ) ; <nl> _ptsWaiter . setRequesting ( false ) ; <nl> <nl> - session ( ) . api ( ) . requestDialogs ( FolderId ( 0 ) ) ; <nl> + session ( ) . api ( ) . requestDialogs ( ) ; <nl> updateOnline ( ) ; <nl> } <nl> <nl> mmm a / Telegram / SourceFiles / window / window_peer_menu . cpp <nl> ppp b / Telegram / SourceFiles / window / window_peer_menu . cpp <nl> class FolderFiller { <nl> / / void addNotifications ( ) ; <nl> / / void addUngroup ( ) ; <nl> <nl> - not_null < Controller * > _controller ; <nl> - not_null < Data : : Folder * > _folder ; <nl> - const PeerMenuCallback & _addAction ; <nl> - PeerMenuSource _source ; <nl> + / / not_null < Controller * > _controller ; <nl> + / / not_null < Data : : Folder * > _folder ; <nl> + / / const PeerMenuCallback & _addAction ; <nl> + / / PeerMenuSource _source ; <nl> <nl> } ; <nl> <nl> FolderFiller : : FolderFiller ( <nl> not_null < Controller * > controller , <nl> not_null < Data : : Folder * > folder , <nl> const PeerMenuCallback & addAction , <nl> - PeerMenuSource source ) <nl> - : _controller ( controller ) <nl> - , _folder ( folder ) <nl> - , _addAction ( addAction ) <nl> - , _source ( source ) { <nl> + PeerMenuSource source ) { <nl> + / / : _controller ( controller ) <nl> + / / , _folder ( folder ) <nl> + / / , _addAction ( addAction ) <nl> + / / , _source ( source ) { <nl> } <nl> <nl> void FolderFiller : : fill ( ) { / / # TODO archive <nl>
Fix build on Xcode .
telegramdesktop/tdesktop
6dd8f32f669703d8449036f522b1c56db3609160
2019-05-01T12:11:39Z
mmm a / 3rdParty / linenoise - ng / src / linenoise . cpp <nl> ppp b / 3rdParty / linenoise - ng / src / linenoise . cpp <nl> static void copyString32to8 ( char * dst , size_t dstLen , const char32_t * src ) { <nl> } <nl> <nl> static void copyString32 ( char32_t * dst , const char32_t * src , size_t len ) { <nl> - while ( * src & & 1 < len ) { <nl> + while ( 0 < len & & * src ) { <nl> * dst + + = * src + + ; <nl> - - len ; <nl> } <nl> int InputBuffer : : completeLine ( PromptBase & pi ) { <nl> int tailIndex = startIndex + longestCommonPrefix ; <nl> memcpy ( & displayText [ tailIndex ] , & buf32 [ pos ] , <nl> sizeof ( char32_t ) * ( displayLength - tailIndex + 1 ) ) ; <nl> - copyString32 ( buf32 , displayText . get ( ) , buflen + 1 ) ; <nl> + copyString32 ( buf32 , displayText . get ( ) , displayLength ) ; <nl> pos = startIndex + longestCommonPrefix ; <nl> len = displayLength ; <nl> refreshLine ( pi ) ; <nl> int InputBuffer : : incrementalHistorySearch ( PromptBase & pi , int startChar ) { <nl> - - dp . searchTextLen ; <nl> dp . searchText [ dp . searchTextLen ] = 0 ; <nl> copyString32 ( tempUnicode . get ( ) , dp . searchText . get ( ) , <nl> - dp . searchTextLen + 1 ) ; <nl> + dp . searchTextLen ) ; <nl> dp . updateSearchText ( tempUnicode . get ( ) ) ; <nl> } else { <nl> beep ( ) ; <nl> int InputBuffer : : incrementalHistorySearch ( PromptBase & pi , int startChar ) { <nl> unique_ptr < char32_t [ ] > tempUnicode ( <nl> new char32_t [ dp . searchTextLen + 2 ] ) ; <nl> copyString32 ( tempUnicode . get ( ) , dp . searchText . get ( ) , <nl> - dp . searchTextLen + 2 ) ; <nl> + dp . searchTextLen ) ; <nl> tempUnicode [ dp . searchTextLen ] = c ; <nl> tempUnicode [ dp . searchTextLen + 1 ] = 0 ; <nl> dp . updateSearchText ( tempUnicode . get ( ) ) ; <nl> int InputBuffer : : incrementalHistorySearch ( PromptBase & pi , int startChar ) { <nl> Utf32String tempUnicode ( pb . promptBytes + 1 ) ; <nl> <nl> copyString32 ( tempUnicode . get ( ) , & pi . promptText [ pi . promptLastLinePosition ] , <nl> - pb . promptBytes + 1 ) ; <nl> + pb . promptBytes - pi . promptLastLinePosition ) ; <nl> tempUnicode . initFromBuffer ( ) ; <nl> pb . promptText = tempUnicode ; <nl> pb . promptExtraLines = 0 ; <nl> mmm a / CMakeLists . txt <nl> ppp b / CMakeLists . txt <nl> if ( WINDOWS ) <nl> set ( BASE_C_FLAGS " " CACHE STRING " base C flags " ) <nl> set ( BASE_CXX_FLAGS " / GR / EHsc " CACHE STRING " base C + + flags " ) <nl> else ( ) <nl> - set ( BASE_FLAGS " " CACHE STRING " base flags " ) <nl> - set ( BASE_C_FLAGS " $ { CMAKE_C_FLAGS } " CACHE STRING " base C flags " ) <nl> - set ( BASE_CXX_FLAGS " $ { CMAKE_CXX_FLAGS } " CACHE STRING " base C + + flags " ) <nl> - set ( BASE_LD_FLAGS " $ ENV { LDFLAGS } " CACHE STRING " base linker flags " ) <nl> - set ( BASE_LIBS " $ ENV { LIBS } " CACHE STRING " base libraries " ) <nl> + set ( BASE_FLAGS " " CACHE STRING " base flags " ) <nl> + set ( BASE_C_FLAGS " $ { CMAKE_C_FLAGS } $ ENV { CFLAGS } " CACHE STRING " base C flags " ) <nl> + set ( BASE_CXX_FLAGS " $ { CMAKE_CXX_FLAGS } $ ENV { CXXFLAGS } " CACHE STRING " base C + + flags " ) <nl> + set ( BASE_LD_FLAGS " $ ENV { LDFLAGS } " CACHE STRING " base linker flags " ) <nl> + set ( BASE_LIBS " $ ENV { LIBS } " CACHE STRING " base libraries " ) <nl> endif ( ) <nl> <nl> if ( SOLARIS ) <nl> if ( VERBOSE ) <nl> message ( STATUS ) <nl> endif ( ) <nl> <nl> - set ( CMAKE_C_FLAGS " $ { BASE_FLAGS } $ { BASE_C_FLAGS } " ) <nl> + set ( CMAKE_C_FLAGS " $ { BASE_FLAGS } $ { BASE_C_FLAGS } $ { CMAKE_C_FLAGS } " ) <nl> set ( CMAKE_C_FLAGS_DEBUG " $ { BASE_FLAGS } $ { BASE_C_FLAGS } $ { CMAKE_C_FLAGS_DEBUG } " ) <nl> set ( CMAKE_C_FLAGS_RELEASE " $ { BASE_FLAGS } $ { BASE_C_FLAGS } $ { CMAKE_C_FLAGS_RELEASE } " ) <nl> set ( CMAKE_C_FLAGS_RELWITHDEBINFO " $ { BASE_FLAGS } $ { BASE_C_FLAGS } $ { CMAKE_C_FLAGS_RELWITHDEBINFO } " ) <nl> set ( CMAKE_C_FLAGS_MINSIZEREL " $ { BASE_FLAGS } $ { BASE_C_FLAGS } $ { CMAKE_C_FLAGS_MINSIZEREL } " ) <nl> <nl> - set ( CMAKE_CXX_FLAGS " $ { BASE_FLAGS } $ { BASE_CXX_FLAGS } " ) <nl> + set ( CMAKE_CXX_FLAGS " $ { BASE_FLAGS } $ { BASE_CXX_FLAGS } $ { CMAKE_CXX_FLAGS } " ) <nl> set ( CMAKE_CXX_FLAGS_DEBUG " $ { BASE_FLAGS } $ { BASE_CXX_FLAGS } $ { CMAKE_CXX_FLAGS_DEBUG } " ) <nl> set ( CMAKE_CXX_FLAGS_RELEASE " $ { BASE_FLAGS } $ { BASE_CXX_FLAGS } $ { CMAKE_CXX_FLAGS_RELEASE } " ) <nl> set ( CMAKE_CXX_FLAGS_RELWITHDEBINFO " $ { BASE_FLAGS } $ { BASE_CXX_FLAGS } $ { CMAKE_CXX_FLAGS_RELWITHDEBINFO } " ) <nl> mmm a / GNUmakefile <nl> ppp b / GNUmakefile <nl> help : <nl> @ echo " - DOPENSSL_ROOT_DIR = / usr / local / opt / openssl " <nl> @ echo " sets the location of the openssl includes and libraries " <nl> @ echo " " <nl> - @ echo " BOOST supports : " <nl> - @ echo " " <nl> + @ echo " TCMALLOC supports : " <nl> @ echo " - DUSE_TCMALLOC = on " <nl> @ echo " if ON , link against TCMALLOC " <nl> @ echo " " <nl>
fixed buffer overflow
arangodb/arangodb
212a1e781363c643c9d958e1a25fb74cdf26398d
2016-03-23T15:41:22Z
old mode 100755 <nl> new mode 100644 <nl> mmm a / lib / BasicsC / json - utilities . c <nl> ppp b / lib / BasicsC / json - utilities . c <nl> static uint32_t SortJsonRandomGenerator ( void ) { <nl> / / / @ brief get type weight of a json value usable for comparison and sorting <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> <nl> - static inline int TypeWeight ( const TRI_json_t * const value ) { <nl> + static int TypeWeight ( const TRI_json_t * const value ) { <nl> if ( value = = NULL ) { <nl> return 0 ; <nl> } <nl> old mode 100755 <nl> new mode 100644 <nl> index 673a1eae95a . . 705956db418 <nl> mmm a / lib / BasicsC / json . c <nl> ppp b / lib / BasicsC / json . c <nl> TRI_json_t * TRI_CopyJson ( TRI_memory_zone_t * zone , TRI_json_t * src ) { <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> <nl> bool TRI_EqualJsonJson ( TRI_json_t * left , TRI_json_t * right ) { <nl> - <nl> if ( left = = NULL & & right = = NULL ) { <nl> return true ; <nl> } <nl> bool TRI_EqualJsonJson ( TRI_json_t * left , TRI_json_t * right ) { <nl> } <nl> <nl> switch ( left - > _type ) { <nl> - <nl> case TRI_JSON_UNUSED : { <nl> return true ; <nl> } <nl> bool TRI_EqualJsonJson ( TRI_json_t * left , TRI_json_t * right ) { <nl> } <nl> <nl> case TRI_JSON_ARRAY : { <nl> - int j ; <nl> + size_t j ; <nl> <nl> if ( left - > _value . _objects . _length ! = right - > _value . _objects . _length ) { <nl> return false ; <nl> } <nl> <nl> - for ( j = 0 ; j < ( left - > _value . _objects . _length / 2 ) ; + + j ) { <nl> + for ( j = 0 ; j < ( left - > _value . _objects . _length / 2 ) ; + + j ) { <nl> TRI_json_t * leftName ; <nl> TRI_json_t * leftValue ; <nl> TRI_json_t * rightValue ; <nl> bool TRI_EqualJsonJson ( TRI_json_t * left , TRI_json_t * right ) { <nl> } <nl> <nl> case TRI_JSON_LIST : { <nl> - int j ; <nl> + size_t j ; <nl> <nl> if ( left - > _value . _objects . _length ! = right - > _value . _objects . _length ) { <nl> return false ; <nl> old mode 100755 <nl> new mode 100644 <nl> mmm a / lib / BasicsC / strings . c <nl> ppp b / lib / BasicsC / strings . c <nl> static void DecodeSurrogatePair ( char * * dst , char const * src1 , char const * src2 ) <nl> / / / @ brief convert a string to lower case <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> <nl> - char * TRI_LowerAsciiString ( const char const * value ) { <nl> + char * TRI_LowerAsciiString ( char const * value ) { <nl> size_t length ; <nl> char * buffer ; <nl> char * p ; <nl> char * TRI_LowerAsciiString ( const char const * value ) { <nl> / / / @ brief convert a string to upper case <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> <nl> - char * TRI_UpperAsciiString ( const char const * value ) { <nl> + char * TRI_UpperAsciiString ( char const * value ) { <nl> size_t length ; <nl> char * buffer ; <nl> char * p ; <nl> mmm a / lib / BasicsC / voc - errors . c <nl> ppp b / lib / BasicsC / voc - errors . c <nl> <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> <nl> # include < BasicsC / common . h > <nl> - # include " lib / BasicsC / voc - errors . h " <nl> + # include " BasicsC / voc - errors . h " <nl> <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> / / / @ addtogroup VocError <nl>
fix path and removed duplicate const
arangodb/arangodb
5ffae320166d03384bd7238499fe87ef59e6057e
2012-09-13T19:19:09Z
mmm a / yarn . lock <nl> ppp b / yarn . lock <nl> env - variable @ 0 . 0 . x : <nl> integrity sha512 - zoB603vQReOFvTg5xMl9I1P2PnHsHQQKTEowsKKD7nseUfJq6UWzK + 4YtlWUO1nhiQUxe6XMkk + JleSZD1NZFA = = <nl> <nl> envinfo @ ^ 7 . 1 . 0 , envinfo @ ^ 7 . 3 . 1 , envinfo @ ^ 7 . 5 . 0 : <nl> - version " 7 . 5 . 0 " <nl> - resolved " https : / / registry . yarnpkg . com / envinfo / - / envinfo - 7 . 5 . 0 . tgz # 91410bb6db262fb4f1409bd506e9ff57e91023f4 " <nl> - integrity sha512 - jDgnJaF / Btomk + m3PZDTTCb5XIIIX3zYItnCRfF73zVgvinLoRomuhi75Y4su0PtQxWz4v66XnLLckyvyJTOIQ = = <nl> + version " 7 . 5 . 1 " <nl> + resolved " https : / / registry . yarnpkg . com / envinfo / - / envinfo - 7 . 5 . 1 . tgz # 93c26897225a00457c75e734d354ea9106a72236 " <nl> + integrity sha512 - hQBkDf2iO4Nv0CNHpCuSBeaSrveU6nThVxFGTrq / eDlV716UQk09zChaJae4mZRsos1x4YLY2TaH3LHUae3ZmQ = = <nl> <nl> err - code @ ^ 1 . 0 . 0 : <nl> version " 1 . 1 . 2 " <nl>
Bump envinfo from 7 . 5 . 0 to 7 . 5 . 1 ( )
microsoft/react-native-windows
a8ab5f4663454a13bd0b4fd58e7f9e50d473f9fa
2020-04-27T19:01:49Z
mmm a / QTCREATOR . md <nl> ppp b / QTCREATOR . md <nl> In Terminal go to * * / home / user / TBuild / Libraries * * and run <nl> <nl> sudo apt - get install xutils - dev bison python - xcbgen <nl> git clone https : / / github . com / xkbcommon / libxkbcommon . git <nl> + cd libxkbcommon <nl> . / autogen . sh - - disable - x11 <nl> make <nl> sudo make install <nl> mmm a / Telegram / Resources / lang . strings <nl> ppp b / Telegram / Resources / lang . strings <nl> Copyright ( c ) 2014 John Preston , https : / / desktop . telegram . org <nl> <nl> " lng_dlg_filter " = " Search " ; <nl> " lng_dlg_new_group_name " = " Group name " ; <nl> + " lng_dlg_new_channel_name " = " Channel name " ; <nl> " lng_dlg_create_group " = " Create " ; <nl> " lng_no_contacts " = " You have no contacts " ; <nl> " lng_no_chats " = " Your chats will be here " ; <nl> Copyright ( c ) 2014 John Preston , https : / / desktop . telegram . org <nl> " lng_profile_shared_links " = " { count : _not_used_ | # shared link | # shared links } » " ; <nl> " lng_profile_shared_links_header " = " Shared links overview " ; <nl> " lng_profile_audio_files_header " = " Playlist " ; <nl> - " lng_profile_show_all_types " = " Show all types " ; <nl> " lng_profile_copy_phone " = " Copy phone number " ; <nl> <nl> " lng_participant_filter " = " Search " ; <nl> " lng_participant_invite " = " Invite " ; <nl> " lng_create_new_group " = " New Group " ; <nl> + " lng_create_new_channel " = " New Channel " ; <nl> " lng_create_group_next " = " Next " ; <nl> " lng_create_group_title " = " New Group " ; <nl> + " lng_create_channel_title " = " New Channel " ; <nl> <nl> " lng_failed_add_participant " = " Could not add user . Try again later . " ; <nl> " lng_failed_add_not_mutual " = " Sorry , if a person left a group , only a \ nmutual contact can bring them back \ n ( they need to have your phone \ nnumber , and you need theirs ) . " ; <nl> Copyright ( c ) 2014 John Preston , https : / / desktop . telegram . org <nl> " lng_group_invite_link " = " Invite link " ; <nl> " lng_group_invite_create " = " Create an invite link " ; <nl> " lng_group_invite_about " = " Telegram users will be able to join \ nyour group by following this link . " ; <nl> + " lng_channel_invite_about " = " Telegram users will be able to join \ nyour channel by following this link . " ; <nl> " lng_group_invite_create_new " = " Revoke invite link " ; <nl> " lng_group_invite_about_new " = " Your previous link will be deactivated \ nand we ' ll generate a new invite link for you . " ; <nl> " lng_group_invite_copied " = " Invite link copied to clipboard . " ; <nl> Copyright ( c ) 2014 John Preston , https : / / desktop . telegram . org <nl> " lng_confirm_contact_data " = " New Contact " ; <nl> " lng_add_contact " = " Create " ; <nl> " lng_add_contact_button " = " Add Contact " ; <nl> + " lng_create_channel_button " = " Create Channel " ; <nl> + " lng_create_group_button " = " Create Group " ; <nl> " lng_contacts_header " = " Contacts " ; <nl> " lng_contact_not_joined " = " Unfortunately { name } did not join Telegram yet , but you can send your friend an invitation . \ n \ nWe will notify you about any of your contacts who is joining Telegram . " ; <nl> " lng_try_other_contact " = " Try other " ; <nl> mmm a / Telegram / Resources / style . txt <nl> ppp b / Telegram / Resources / style . txt <nl> dropdownMediaAudios : iconedButton ( dropdownMediaDocuments ) { <nl> } <nl> dropdownMediaLinks : iconedButton ( dropdownMediaDocuments ) { <nl> icon : sprite ( 372px , 414px , 24px , 24px ) ; <nl> - downIcon : sprite ( 62px , 348px , 24px , 24px ) ; <nl> + downIcon : sprite ( 372px , 414px , 24px , 24px ) ; <nl> } <nl> <nl> dragFont : font ( 28px semibold ) ; <nl> mmm a / Telegram / SourceFiles / apiwrap . cpp <nl> ppp b / Telegram / SourceFiles / apiwrap . cpp <nl> void ApiWrap : : gotChat ( PeerData * peer , const MTPmessages_Chats & result ) { <nl> if ( peer - > isChat ( ) ) { <nl> peer - > asChat ( ) - > version = v . at ( 0 ) . c_chat ( ) . vversion . v ; <nl> } else if ( peer - > isChannel ( ) ) { <nl> - peer - > asChannel ( ) - > version = v . at ( 0 ) . c_chat ( ) . vversion . v ; <nl> + peer - > asChannel ( ) - > version = v . at ( 0 ) . c_channel ( ) . vversion . v ; <nl> } <nl> requestPeer ( peer ) ; <nl> } <nl> mmm a / Telegram / SourceFiles / app . cpp <nl> ppp b / Telegram / SourceFiles / app . cpp <nl> namespace App { <nl> for ( QVector < MTPChat > : : const_iterator i = v . cbegin ( ) , e = v . cend ( ) ; i ! = e ; + + i ) { <nl> const MTPchat & chat ( * i ) ; <nl> data = 0 ; <nl> - QString title ; <nl> switch ( chat . type ( ) ) { <nl> case mtpc_chat : { <nl> const MTPDchat & d ( chat . c_chat ( ) ) ; <nl> - title = qs ( d . vtitle ) ; <nl> <nl> data = App : : chat ( peerFromChat ( d . vid . v ) ) ; <nl> data - > input = MTP_inputPeerChat ( d . vid ) ; <nl> <nl> + data - > updateName ( qs ( d . vtitle ) , QString ( ) , QString ( ) ) ; <nl> + <nl> ChatData * cdata = data - > asChat ( ) ; <nl> cdata - > setPhoto ( d . vphoto ) ; <nl> cdata - > date = d . vdate . v ; <nl> namespace App { <nl> } break ; <nl> case mtpc_chatForbidden : { <nl> const MTPDchatForbidden & d ( chat . c_chatForbidden ( ) ) ; <nl> - title = qs ( d . vtitle ) ; <nl> <nl> data = App : : chat ( peerFromChat ( d . vid . v ) ) ; <nl> data - > input = MTP_inputPeerChat ( d . vid ) ; <nl> <nl> + data - > updateName ( qs ( d . vtitle ) , QString ( ) , QString ( ) ) ; <nl> + <nl> ChatData * cdata = data - > asChat ( ) ; <nl> cdata - > setPhoto ( MTP_chatPhotoEmpty ( ) ) ; <nl> cdata - > date = 0 ; <nl> namespace App { <nl> } break ; <nl> case mtpc_channel : { <nl> const MTPDchannel & d ( chat . c_channel ( ) ) ; <nl> - title = qs ( d . vtitle ) ; <nl> <nl> PeerId peer ( peerFromChannel ( d . vid . v ) ) ; <nl> data = App : : channel ( peer ) ; <nl> namespace App { <nl> <nl> ChannelData * cdata = data - > asChannel ( ) ; <nl> cdata - > inputChat = MTP_inputChannel ( d . vid , d . vaccess_hash ) ; <nl> + <nl> + QString uname = d . has_username ( ) ? textOneLine ( qs ( d . vusername ) ) : QString ( ) ; <nl> + cdata - > setName ( qs ( d . vtitle ) , uname ) ; <nl> + <nl> cdata - > access = d . vaccess_hash . v ; <nl> cdata - > setPhoto ( d . vphoto ) ; <nl> cdata - > date = d . vdate . v ; <nl> namespace App { <nl> } <nl> if ( ! data ) continue ; <nl> <nl> - data - > loaded = true ; <nl> - data - > updateName ( title . trimmed ( ) , QString ( ) , QString ( ) ) ; <nl> - <nl> if ( App : : main ( ) ) { <nl> if ( emitPeerUpdated ) { <nl> App : : main ( ) - > peerUpdated ( data ) ; <nl> namespace App { <nl> return : : self ; <nl> } <nl> <nl> - UserData * userByName ( const QString & username ) { <nl> + PeerData * peerByName ( const QString & username ) { <nl> for ( PeersData : : const_iterator i = peersData . cbegin ( ) , e = peersData . cend ( ) ; i ! = e ; + + i ) { <nl> - if ( i . value ( ) - > isUser ( ) & & ! i . value ( ) - > asUser ( ) - > username . compare ( username . trimmed ( ) , Qt : : CaseInsensitive ) ) { <nl> + if ( ! i . value ( ) - > userName ( ) . compare ( username . trimmed ( ) , Qt : : CaseInsensitive ) ) { <nl> return i . value ( ) - > asUser ( ) ; <nl> } <nl> } <nl> namespace App { <nl> if ( maxInboxRead ) { <nl> i . value ( ) - > inboxReadTill = maxInboxRead ; <nl> } <nl> + } else if ( maxInboxRead ) { <nl> + i . value ( ) - > inboxReadTill = qMax ( i . value ( ) - > inboxReadTill , maxInboxRead ) ; <nl> } <nl> return i . value ( ) ; <nl> } <nl> namespace App { <nl> } <nl> } <nl> <nl> - void openUserByName ( const QString & username , bool toProfile , const QString & startToken ) { <nl> + void openPeerByName ( const QString & username , bool toProfile , const QString & startToken ) { <nl> if ( App : : main ( ) ) { <nl> - App : : main ( ) - > openUserByName ( username , toProfile , startToken ) ; <nl> + App : : main ( ) - > openPeerByName ( username , toProfile , startToken ) ; <nl> } <nl> } <nl> <nl> mmm a / Telegram / SourceFiles / app . h <nl> ppp b / Telegram / SourceFiles / app . h <nl> namespace App { <nl> ChatData * chat ( int32 chat_id ) ; <nl> ChannelData * channel ( int32 channel_id ) ; <nl> UserData * self ( ) ; <nl> - UserData * userByName ( const QString & username ) ; <nl> + PeerData * peerByName ( const QString & username ) ; <nl> QString peerName ( const PeerData * peer , bool forDialogs = false ) ; <nl> PhotoData * photo ( const PhotoId & photo ) ; <nl> PhotoData * photoSet ( const PhotoId & photo , PhotoData * convert , const uint64 & access , int32 date , const ImagePtr & thumb , const ImagePtr & medium , const ImagePtr & full ) ; <nl> namespace App { <nl> void sendBotCommand ( const QString & cmd , MsgId replyTo = 0 ) ; <nl> void insertBotCommand ( const QString & cmd ) ; <nl> void searchByHashtag ( const QString & tag ) ; <nl> - void openUserByName ( const QString & username , bool toProfile = false , const QString & startToken = QString ( ) ) ; <nl> + void openPeerByName ( const QString & username , bool toProfile = false , const QString & startToken = QString ( ) ) ; <nl> void joinGroupByHash ( const QString & hash ) ; <nl> void stickersBox ( const QString & name ) ; <nl> void openLocalUrl ( const QString & url ) ; <nl> mmm a / Telegram / SourceFiles / boxes / contactsbox . cpp <nl> ppp b / Telegram / SourceFiles / boxes / contactsbox . cpp <nl> void ContactsInner : : paintDialog ( QPainter & p , PeerData * peer , ContactData * data , <nl> p . drawPixmap ( QPoint ( width ( ) - st : : contactsImg . pxWidth ( ) - st : : profileCheckDeltaX , st : : profileListPadding . height ( ) + ( st : : profileListPhotoSize - st : : contactsImg . pxHeight ( ) ) / 2 - st : : profileCheckDeltaY ) , App : : sprite ( ) , st : : contactsImg ) ; <nl> } <nl> <nl> - bool uname = user & & ( data - > online . at ( 0 ) = = ' @ ' ) ; <nl> + bool uname = ( user | | peer - > isChannel ( ) ) & & ( data - > online . at ( 0 ) = = ' @ ' ) ; <nl> p . setFont ( st : : profileSubFont - > f ) ; <nl> - if ( uname & & ! data - > inchat & & ! data - > check & & ! _lastQuery . isEmpty ( ) & & user - > username . startsWith ( _lastQuery , Qt : : CaseInsensitive ) ) { <nl> + if ( uname & & ! data - > inchat & & ! data - > check & & ! _lastQuery . isEmpty ( ) & & peer - > userName ( ) . startsWith ( _lastQuery , Qt : : CaseInsensitive ) ) { <nl> int32 availw = width ( ) - ( left + st : : profileListPhotoSize + st : : profileListPadding . width ( ) * 2 ) ; <nl> - QString first = ' @ ' + user - > username . mid ( 0 , _lastQuery . size ( ) ) , second = user - > username . mid ( _lastQuery . size ( ) ) ; <nl> + QString first = ' @ ' + peer - > userName ( ) . mid ( 0 , _lastQuery . size ( ) ) , second = peer - > userName ( ) . mid ( _lastQuery . size ( ) ) ; <nl> int32 w = st : : profileSubFont - > m . width ( first ) ; <nl> if ( w > = availw | | second . isEmpty ( ) ) { <nl> p . setPen ( st : : profileOnlineColor - > p ) ; <nl> void ContactsInner : : paintDialog ( QPainter & p , PeerData * peer , ContactData * data , <nl> } else { <nl> if ( data - > inchat | | data - > check ) { <nl> p . setPen ( st : : white - > p ) ; <nl> - } else if ( user & & ( uname | | App : : onlineColorUse ( user , _time ) ) ) { <nl> + } else if ( ( user & & ( uname | | App : : onlineColorUse ( user , _time ) ) ) | | ( peer - > isChannel ( ) & & uname ) ) { <nl> p . setPen ( st : : profileOnlineColor - > p ) ; <nl> } else { <nl> p . setPen ( st : : profileOfflineColor - > p ) ; <nl> void ContactsInner : : onDialogRowReplaced ( DialogRow * oldRow , DialogRow * newRow ) { <nl> resize ( width ( ) , newh ) ; <nl> } <nl> <nl> - void ContactsInner : : peopleReceived ( const QString & query , const QVector < MTPContactFound > & people ) { <nl> + void ContactsInner : : peopleReceived ( const QString & query , const QVector < MTPPeer > & people ) { <nl> _lastQuery = query . toLower ( ) . trimmed ( ) ; <nl> if ( _lastQuery . at ( 0 ) = = ' @ ' ) _lastQuery = _lastQuery . mid ( 1 ) ; <nl> int32 already = _byUsernameFiltered . size ( ) ; <nl> _byUsernameFiltered . reserve ( already + people . size ( ) ) ; <nl> d_byUsernameFiltered . reserve ( already + people . size ( ) ) ; <nl> - for ( QVector < MTPContactFound > : : const_iterator i = people . cbegin ( ) , e = people . cend ( ) ; i ! = e ; + + i ) { <nl> - int32 uid = i - > c_contactFound ( ) . vuser_id . v , j = 0 ; <nl> + for ( QVector < MTPPeer > : : const_iterator i = people . cbegin ( ) , e = people . cend ( ) ; i ! = e ; + + i ) { <nl> + PeerId peerId = peerFromMTP ( * i ) ; <nl> + int32 j = 0 ; <nl> for ( ; j < already ; + + j ) { <nl> - if ( _byUsernameFiltered [ j ] - > id = = peerFromUser ( uid ) ) break ; <nl> + if ( _byUsernameFiltered [ j ] - > id = = peerId ) break ; <nl> } <nl> if ( j = = already ) { <nl> - UserData * u = App : : user ( uid ) ; <nl> - if ( u - > botInfo & & u - > botInfo - > cantJoinGroups & & ( _chat | | _creatingChat ) ) continue ; / / skip bot ' s that can ' t be invited to groups <nl> + PeerData * p = App : : peer ( peerId ) ; <nl> + if ( ! p ) continue ; <nl> + <nl> + if ( ( ! p - > isUser ( ) | | p - > asUser ( ) - > botInfo & & p - > asUser ( ) - > botInfo - > cantJoinGroups ) & & ( _chat | | _creatingChat ) ) continue ; / / skip bot ' s that can ' t be invited to groups <nl> <nl> ContactData * d = new ContactData ( ) ; <nl> _byUsernameDatas . push_back ( d ) ; <nl> - d - > inchat = _chat ? _chat - > participants . contains ( u ) : false ; <nl> - d - > check = _checkedContacts . contains ( u ) ; <nl> - d - > name . setText ( st : : profileListNameFont , u - > name , _textNameOptions ) ; <nl> - d - > online = ' @ ' + u - > username ; <nl> + d - > inchat = _chat ? _chat - > participants . contains ( p - > asUser ( ) ) : false ; <nl> + d - > check = _checkedContacts . contains ( p ) ; <nl> + d - > name . setText ( st : : profileListNameFont , p - > name , _textNameOptions ) ; <nl> + d - > online = ' @ ' + p - > userName ( ) ; <nl> <nl> - _byUsernameFiltered . push_back ( u ) ; <nl> + _byUsernameFiltered . push_back ( p ) ; <nl> d_byUsernameFiltered . push_back ( d ) ; <nl> } <nl> } <nl> QVector < UserData * > ContactsInner : : selected ( ) { <nl> } <nl> } <nl> for ( int32 i = 0 , l = _byUsername . size ( ) ; i < l ; + + i ) { <nl> - if ( d_byUsername [ i ] - > check ) { <nl> - result . push_back ( _byUsername [ i ] ) ; <nl> + if ( d_byUsername [ i ] - > check & & _byUsername [ i ] - > isUser ( ) ) { <nl> + result . push_back ( _byUsername [ i ] - > asUser ( ) ) ; <nl> } <nl> } <nl> return result ; <nl> QVector < MTPInputUser > ContactsInner : : selectedInputs ( ) { <nl> } <nl> } <nl> for ( int32 i = 0 , l = _byUsername . size ( ) ; i < l ; + + i ) { <nl> - if ( d_byUsername [ i ] - > check ) { <nl> - result . push_back ( _byUsername [ i ] - > inputUser ) ; <nl> + if ( d_byUsername [ i ] - > check & & _byUsername [ i ] - > isUser ( ) ) { <nl> + result . push_back ( _byUsername [ i ] - > asUser ( ) - > inputUser ) ; <nl> } <nl> } <nl> return result ; <nl> PeerData * ContactsInner : : selectedUser ( ) { <nl> <nl> ContactsBox : : ContactsBox ( bool creatingChat ) : ItemListBox ( st : : boxNoTopScroll ) , _inner ( creatingChat ) , <nl> _addContact ( this , lang ( lng_add_contact_button ) , st : : contactsAdd ) , <nl> + _createChannel ( this , lang ( lng_create_channel_button ) , st : : contactsAdd ) , <nl> _filter ( this , st : : contactsFilter , lang ( lng_participant_filter ) ) , <nl> _next ( this , lang ( lng_create_group_next ) , st : : btnSelectDone ) , <nl> - _cancel ( this , lang ( lng_contacts_done ) , creatingChat ? st : : btnSelectCancel : st : : contactsClose ) { <nl> + _cancel ( this , lang ( lng_contacts_done ) , creatingChat ? st : : btnSelectCancel : st : : contactsClose ) , _creatingChannel ( false ) { <nl> init ( ) ; <nl> } <nl> <nl> ContactsBox : : ContactsBox ( ChatData * chat ) : ItemListBox ( st : : boxNoTopScroll ) , _inner ( chat ) , <nl> _addContact ( this , lang ( lng_add_contact_button ) , st : : contactsAdd ) , <nl> + _createChannel ( this , lang ( lng_create_channel_button ) , st : : contactsAdd ) , <nl> _filter ( this , st : : contactsFilter , lang ( lng_participant_filter ) ) , <nl> _next ( this , lang ( lng_participant_invite ) , st : : btnSelectDone ) , <nl> - _cancel ( this , lang ( lng_cancel ) , st : : btnSelectCancel ) { <nl> + _cancel ( this , lang ( lng_cancel ) , st : : btnSelectCancel ) , _creatingChannel ( false ) { <nl> init ( ) ; <nl> } <nl> <nl> ContactsBox : : ContactsBox ( UserData * bot ) : ItemListBox ( st : : boxNoTopScroll ) , _inner ( bot ) , <nl> _addContact ( this , lang ( lng_add_contact_button ) , st : : contactsAdd ) , <nl> + _createChannel ( this , lang ( lng_create_channel_button ) , st : : contactsAdd ) , <nl> _filter ( this , st : : contactsFilter , lang ( lng_participant_filter ) ) , <nl> _next ( this , lang ( lng_create_group_next ) , st : : btnSelectDone ) , <nl> - _cancel ( this , lang ( lng_cancel ) , st : : contactsClose ) { <nl> + _cancel ( this , lang ( lng_cancel ) , st : : contactsClose ) , _creatingChannel ( false ) { <nl> init ( ) ; <nl> } <nl> <nl> void ContactsBox : : init ( ) { <nl> ItemListBox : : init ( & _inner , _cancel . height ( ) , st : : contactsAdd . height + st : : newGroupNamePadding . top ( ) + _filter . height ( ) + st : : newGroupNamePadding . bottom ( ) ) ; <nl> <nl> - if ( _inner . chat ( ) | | _inner . creatingChat ( ) ) { <nl> + if ( _inner . chat ( ) ) { <nl> + _addContact . hide ( ) ; <nl> + _createChannel . hide ( ) ; <nl> + } else if ( _inner . creatingChat ( ) ) { <nl> _addContact . hide ( ) ; <nl> + _createChannel . show ( ) ; <nl> + connect ( & _createChannel , SIGNAL ( clicked ( ) ) , this , SLOT ( onCreateChannel ( ) ) ) ; <nl> } else { <nl> connect ( & _addContact , SIGNAL ( clicked ( ) ) , App : : wnd ( ) , SLOT ( onShowAddContact ( ) ) ) ; <nl> + _createChannel . hide ( ) ; <nl> } <nl> if ( _inner . chat ( ) ) { <nl> connect ( & _next , SIGNAL ( clicked ( ) ) , this , SLOT ( onInvite ( ) ) ) ; <nl> bool ContactsBox : : peopleFailed ( const RPCError & error , mtpRequestId req ) { <nl> void ContactsBox : : hideAll ( ) { <nl> ItemListBox : : hideAll ( ) ; <nl> _addContact . hide ( ) ; <nl> + _createChannel . hide ( ) ; <nl> _filter . hide ( ) ; <nl> _next . hide ( ) ; <nl> _cancel . hide ( ) ; <nl> void ContactsBox : : hideAll ( ) { <nl> void ContactsBox : : showAll ( ) { <nl> ItemListBox : : showAll ( ) ; <nl> _filter . show ( ) ; <nl> - if ( _inner . chat ( ) | | _inner . creatingChat ( ) ) { <nl> + if ( _inner . chat ( ) ) { <nl> _next . show ( ) ; <nl> _addContact . hide ( ) ; <nl> + _createChannel . hide ( ) ; <nl> + } else if ( _inner . creatingChat ( ) ) { <nl> + _next . show ( ) ; <nl> + _addContact . hide ( ) ; <nl> + _createChannel . show ( ) ; <nl> } else { <nl> _next . hide ( ) ; <nl> if ( _inner . bot ( ) ) { <nl> void ContactsBox : : showAll ( ) { <nl> } else { <nl> _addContact . show ( ) ; <nl> } <nl> + _createChannel . hide ( ) ; <nl> } <nl> _cancel . show ( ) ; <nl> } <nl> void ContactsBox : : paintEvent ( QPaintEvent * e ) { <nl> if ( paint ( p ) ) return ; <nl> <nl> if ( _inner . chat ( ) | | _inner . creatingChat ( ) ) { <nl> - paintTitle ( p , lang ( _inner . chat ( ) ? lng_profile_add_participant : lng_create_new_group ) , true ) ; <nl> + paintTitle ( p , lang ( _inner . chat ( ) ? lng_profile_add_participant : ( _creatingChannel ? lng_create_new_channel : lng_create_new_group ) ) , true ) ; <nl> <nl> / / paint button sep <nl> p . fillRect ( st : : btnSelectCancel . width , size ( ) . height ( ) - st : : btnSelectCancel . height , st : : lineWidth , st : : btnSelectCancel . height , st : : btnSelectSep - > b ) ; <nl> void ContactsBox : : paintEvent ( QPaintEvent * e ) { <nl> void ContactsBox : : resizeEvent ( QResizeEvent * e ) { <nl> ItemListBox : : resizeEvent ( e ) ; <nl> _addContact . move ( width ( ) - _addContact . width ( ) , 0 ) ; <nl> + _createChannel . move ( width ( ) - _createChannel . width ( ) , 0 ) ; <nl> _filter . move ( st : : newGroupNamePadding . left ( ) , _addContact . height ( ) + st : : newGroupNamePadding . top ( ) ) ; <nl> _inner . resize ( width ( ) , _inner . height ( ) ) ; <nl> _next . move ( width ( ) - _next . width ( ) , height ( ) - _next . height ( ) ) ; <nl> void ContactsBox : : onAdd ( ) { <nl> App : : wnd ( ) - > replaceLayer ( new AddContactBox ( ) ) ; <nl> } <nl> <nl> + void ContactsBox : : onCreateChannel ( ) { <nl> + _creatingChannel = ! _creatingChannel ; <nl> + _createChannel . setText ( lang ( _creatingChannel ? lng_create_group_button : lng_create_channel_button ) ) ; <nl> + _createChannel . move ( width ( ) - _createChannel . width ( ) , 0 ) ; <nl> + update ( ) ; <nl> + } <nl> + <nl> void ContactsBox : : onInvite ( ) { <nl> QVector < UserData * > users ( _inner . selected ( ) ) ; <nl> if ( users . isEmpty ( ) ) { <nl> void ContactsBox : : onNext ( ) { <nl> } else if ( v . size ( ) = = 1 ) { <nl> App : : main ( ) - > showPeerHistory ( _inner . selectedUser ( ) - > id , ShowAtUnreadMsgId ) ; <nl> } else { <nl> - App : : wnd ( ) - > replaceLayer ( new CreateGroupBox ( users ) ) ; <nl> + App : : wnd ( ) - > replaceLayer ( new CreateGroupBox ( users , _creatingChannel ) ) ; <nl> } <nl> } <nl> <nl> void ContactsBox : : onScroll ( ) { <nl> _inner . loadProfilePhotos ( _scroll . scrollTop ( ) ) ; <nl> } <nl> <nl> - CreateGroupBox : : CreateGroupBox ( const MTPVector < MTPInputUser > & users ) : AbstractBox ( ) , _users ( users ) , <nl> + CreateGroupBox : : CreateGroupBox ( const MTPVector < MTPInputUser > & users , bool creatingChannel ) : AbstractBox ( ) , _users ( users ) , <nl> + _creatingChannel ( creatingChannel ) , <nl> _createRequestId ( 0 ) , <nl> - _name ( this , st : : newGroupName , lang ( lng_dlg_new_group_name ) ) , <nl> + _name ( this , st : : newGroupName , lang ( _creatingChannel ? lng_dlg_new_channel_name : lng_dlg_new_group_name ) ) , <nl> _create ( this , lang ( lng_dlg_create_group ) , st : : btnSelectDone ) , <nl> _cancel ( this , lang ( lng_cancel ) , st : : btnSelectCancel ) { <nl> <nl> void CreateGroupBox : : paintEvent ( QPaintEvent * e ) { <nl> Painter p ( this ) ; <nl> if ( paint ( p ) ) return ; <nl> <nl> - paintTitle ( p , lang ( lng_create_group_title ) , true ) ; <nl> + paintTitle ( p , lang ( _creatingChannel ? lng_create_channel_title : lng_create_group_title ) , true ) ; <nl> <nl> / / paint shadow <nl> p . fillRect ( 0 , height ( ) - st : : btnSelectCancel . height - st : : scrollDef . bottomsh , width ( ) , st : : scrollDef . bottomsh , st : : scrollDef . shColor - > b ) ; <nl> void CreateGroupBox : : onCreate ( ) { <nl> <nl> _create . setDisabled ( true ) ; <nl> _name . setDisabled ( true ) ; <nl> - _createRequestId = MTP : : send ( MTPmessages_CreateChat ( _users , MTP_string ( _name . text ( ) ) ) , rpcDone ( & CreateGroupBox : : created ) , rpcFail ( & CreateGroupBox : : failed ) ) ; <nl> + if ( _creatingChannel ) { <nl> + _createRequestId = MTP : : send ( MTPmessages_CreateChannel ( MTP_int ( MTPmessages_CreateChannel_flag_broadcast ) , MTP_string ( _name . text ( ) ) , _users ) , rpcDone ( & CreateGroupBox : : created ) , rpcFail ( & CreateGroupBox : : failed ) ) ; <nl> + } else { <nl> + _createRequestId = MTP : : send ( MTPmessages_CreateChat ( _users , MTP_string ( _name . text ( ) ) ) , rpcDone ( & CreateGroupBox : : created ) , rpcFail ( & CreateGroupBox : : failed ) ) ; <nl> + } <nl> } <nl> <nl> void CreateGroupBox : : created ( const MTPUpdates & updates ) { <nl> void CreateGroupBox : : created ( const MTPUpdates & updates ) { <nl> } break ; <nl> } <nl> if ( v & & ! v - > isEmpty ( ) & & v - > front ( ) . type ( ) = = mtpc_chat ) { <nl> - App : : main ( ) - > choosePeer ( peerFromChat ( v - > front ( ) . c_chat ( ) . vid . v ) , ShowAtUnreadMsgId ) ; <nl> + App : : main ( ) - > showPeerHistory ( peerFromChat ( v - > front ( ) . c_chat ( ) . vid . v ) , ShowAtUnreadMsgId ) ; <nl> + } else if ( v & & ! v - > isEmpty ( ) & & v - > front ( ) . type ( ) = = mtpc_channel ) { <nl> + App : : main ( ) - > showPeerHistory ( peerFromChannel ( v - > front ( ) . c_channel ( ) . vid . v ) , ShowAtUnreadMsgId ) ; <nl> } <nl> } <nl> <nl> mmm a / Telegram / SourceFiles / boxes / contactsbox . h <nl> ppp b / Telegram / SourceFiles / boxes / contactsbox . h <nl> class ContactsInner : public QWidget , public RPCSender { <nl> void changeCheckState ( DialogRow * row ) ; <nl> void changeCheckState ( ContactData * data , PeerData * peer ) ; <nl> <nl> - void peopleReceived ( const QString & query , const QVector < MTPContactFound > & people ) ; <nl> + void peopleReceived ( const QString & query , const QVector < MTPPeer > & people ) ; <nl> <nl> void refresh ( ) ; <nl> <nl> public slots : <nl> <nl> bool _searching ; <nl> QString _lastQuery ; <nl> - typedef QVector < UserData * > ByUsernameRows ; <nl> + typedef QVector < PeerData * > ByUsernameRows ; <nl> typedef QVector < ContactData * > ByUsernameDatas ; <nl> ByUsernameRows _byUsername , _byUsernameFiltered ; <nl> ByUsernameDatas d_byUsername , d_byUsernameFiltered ; / / filtered is partly subset of d_byUsername , partly subset of _byUsernameDatas <nl> public slots : <nl> void onScroll ( ) ; <nl> <nl> void onAdd ( ) ; <nl> + void onCreateChannel ( ) ; <nl> void onInvite ( ) ; <nl> void onNext ( ) ; <nl> <nl> public slots : <nl> void init ( ) ; <nl> <nl> ContactsInner _inner ; <nl> - FlatButton _addContact ; <nl> + FlatButton _addContact , _createChannel ; <nl> FlatInput _filter ; <nl> <nl> FlatButton _next , _cancel ; <nl> public slots : <nl> void peopleReceived ( const MTPcontacts_Found & result , mtpRequestId req ) ; <nl> bool peopleFailed ( const RPCError & error , mtpRequestId req ) ; <nl> <nl> + bool _creatingChannel ; <nl> + <nl> QTimer _searchTimer ; <nl> QString _peopleQuery ; <nl> bool _peopleFull ; <nl> class CreateGroupBox : public AbstractBox , public RPCSender { <nl> <nl> public : <nl> <nl> - CreateGroupBox ( const MTPVector < MTPInputUser > & users ) ; <nl> + CreateGroupBox ( const MTPVector < MTPInputUser > & users , bool creatingChannel ) ; <nl> void keyPressEvent ( QKeyEvent * e ) ; <nl> void paintEvent ( QPaintEvent * e ) ; <nl> void resizeEvent ( QResizeEvent * e ) ; <nl> public slots : <nl> bool failed ( const RPCError & e ) ; <nl> <nl> MTPVector < MTPInputUser > _users ; <nl> + bool _creatingChannel ; <nl> <nl> int32 _createRequestId ; <nl> <nl> mmm a / Telegram / SourceFiles / config . h <nl> ppp b / Telegram / SourceFiles / config . h <nl> enum { <nl> DefaultChatBackground = 21 , <nl> <nl> DialogsFirstLoad = 20 , / / first dialogs part size requested <nl> - DialogsPerPage = 200 , / / next dialogs part size <nl> + DialogsPerPage = 500 , / / next dialogs part size <nl> <nl> MessagesFirstLoad = 30 , / / first history part size requested <nl> MessagesPerPage = 50 , / / next history part size <nl> mmm a / Telegram / SourceFiles / dialogswidget . cpp <nl> ppp b / Telegram / SourceFiles / dialogswidget . cpp <nl> _addContactLnk ( this , lang ( lng_add_contact_button ) ) , <nl> _cancelSearchInPeer ( this , st : : btnCancelSearch ) , <nl> _overDelete ( false ) , <nl> _searchInPeer ( 0 ) { <nl> - connect ( main , SIGNAL ( dialogToTop ( const History : : DialogLinks & ) ) , this , SLOT ( onDialogToTop ( const History : : DialogLinks & ) ) ) ; <nl> connect ( main , SIGNAL ( peerNameChanged ( PeerData * , const PeerData : : Names & , const PeerData : : NameFirstChars & ) ) , this , SLOT ( onPeerNameChanged ( PeerData * , const PeerData : : Names & , const PeerData : : NameFirstChars & ) ) ) ; <nl> connect ( main , SIGNAL ( peerPhotoChanged ( PeerData * ) ) , this , SLOT ( onPeerPhotoChanged ( PeerData * ) ) ) ; <nl> connect ( main , SIGNAL ( dialogRowReplaced ( DialogRow * , DialogRow * ) ) , this , SLOT ( onDialogRowReplaced ( DialogRow * , DialogRow * ) ) ) ; <nl> void DialogsListWidget : : paintEvent ( QPaintEvent * e ) { <nl> } <nl> } <nl> <nl> - void DialogsListWidget : : peopleResultPaint ( UserData * user , QPainter & p , int32 w , bool act , bool sel ) const { <nl> + void DialogsListWidget : : peopleResultPaint ( PeerData * peer , QPainter & p , int32 w , bool act , bool sel ) const { <nl> QRect fullRect ( 0 , 0 , w , st : : dlgHeight ) ; <nl> p . fillRect ( fullRect , ( act ? st : : dlgActiveBG : ( sel ? st : : dlgHoverBG : st : : dlgBG ) ) - > b ) ; <nl> <nl> - History * history = App : : history ( user - > id ) ; <nl> + History * history = App : : history ( peer - > id ) ; <nl> <nl> p . drawPixmap ( st : : dlgPaddingHor , st : : dlgPaddingVer , history - > peer - > photo - > pix ( st : : dlgPhotoSize ) ) ; <nl> <nl> void DialogsListWidget : : peopleResultPaint ( UserData * user , QPainter & p , int32 w , <nl> <nl> QRect tr ( nameleft , st : : dlgPaddingVer + st : : dlgFont - > height + st : : dlgSep , namewidth , st : : dlgFont - > height ) ; <nl> p . setFont ( st : : dlgHistFont - > f ) ; <nl> - if ( ! act & & user - > username . toLower ( ) . startsWith ( peopleQuery ) ) { <nl> - QString first = ' @ ' + user - > username . mid ( 0 , peopleQuery . size ( ) ) , second = user - > username . mid ( peopleQuery . size ( ) ) ; <nl> + QString username = peer - > userName ( ) ; <nl> + if ( ! act & & username . toLower ( ) . startsWith ( peopleQuery ) ) { <nl> + QString first = ' @ ' + username . mid ( 0 , peopleQuery . size ( ) ) , second = username . mid ( peopleQuery . size ( ) ) ; <nl> int32 w = st : : dlgHistFont - > m . width ( first ) ; <nl> if ( w > = tr . width ( ) ) { <nl> p . setPen ( st : : dlgSystemColor - > p ) ; <nl> void DialogsListWidget : : peopleResultPaint ( UserData * user , QPainter & p , int32 w , <nl> } <nl> } else { <nl> p . setPen ( ( act ? st : : dlgActiveColor : st : : dlgSystemColor ) - > p ) ; <nl> - p . drawText ( tr . left ( ) , tr . top ( ) + st : : dlgHistFont - > ascent , st : : dlgHistFont - > m . elidedText ( ' @ ' + user - > username , Qt : : ElideRight , tr . width ( ) ) ) ; <nl> + p . drawText ( tr . left ( ) , tr . top ( ) + st : : dlgHistFont - > ascent , st : : dlgHistFont - > m . elidedText ( ' @ ' + username , Qt : : ElideRight , tr . width ( ) ) ) ; <nl> } <nl> <nl> p . setPen ( ( act ? st : : dlgActiveColor : st : : dlgNameColor ) - > p ) ; <nl> - user - > dialogName ( ) . drawElided ( p , rectForName . left ( ) , rectForName . top ( ) , rectForName . width ( ) ) ; <nl> + peer - > dialogName ( ) . drawElided ( p , rectForName . left ( ) , rectForName . top ( ) , rectForName . width ( ) ) ; <nl> } <nl> <nl> void DialogsListWidget : : searchInPeerPaint ( QPainter & p , int32 w ) const { <nl> void DialogsListWidget : : onDialogRowReplaced ( DialogRow * oldRow , DialogRow * newRow <nl> } <nl> <nl> void DialogsListWidget : : createDialogAtTop ( History * history , int32 unreadCount ) { <nl> - History : : DialogLinks links = dialogs . addToEnd ( history ) ; <nl> - int32 movedFrom = links [ 0 ] - > pos * st : : dlgHeight ; <nl> - dialogs . bringToTop ( links ) ; <nl> - history - > dialogs = links ; <nl> + if ( history - > dialogs . isEmpty ( ) ) { <nl> + History : : DialogLinks links = dialogs . addToEnd ( history ) ; <nl> + int32 movedFrom = links [ 0 ] - > pos * st : : dlgHeight ; <nl> + dialogs . adjustByPos ( links ) ; <nl> + history - > dialogs = links ; <nl> <nl> - contactsNoDialogs . del ( history - > peer , links [ 0 ] ) ; <nl> + contactsNoDialogs . del ( history - > peer , links [ 0 ] ) ; <nl> <nl> - emit dialogToTopFrom ( movedFrom ) ; <nl> - emit App : : main ( ) - > dialogsUpdated ( ) ; <nl> + emit dialogToTopFrom ( movedFrom ) ; <nl> + emit App : : main ( ) - > dialogsUpdated ( ) ; <nl> <nl> - refresh ( ) ; <nl> + refresh ( ) ; <nl> + } else { <nl> + int32 movedFrom = history - > dialogs [ 0 ] - > pos * st : : dlgHeight ; <nl> + dialogs . adjustByPos ( history - > dialogs ) ; <nl> + <nl> + emit dialogToTopFrom ( movedFrom ) ; <nl> + emit App : : main ( ) - > dialogsUpdated ( ) ; <nl> + <nl> + parentWidget ( ) - > update ( ) ; <nl> + } <nl> } <nl> <nl> void DialogsListWidget : : removePeer ( PeerData * peer ) { <nl> void DialogsListWidget : : onParentGeometryChanged ( ) { <nl> } <nl> } <nl> <nl> - void DialogsListWidget : : onDialogToTop ( const History : : DialogLinks & links ) { <nl> - int32 movedFrom = links [ 0 ] - > pos * st : : dlgHeight ; <nl> - dialogs . bringToTop ( links ) ; <nl> - emit dialogToTopFrom ( movedFrom ) ; <nl> - emit App : : main ( ) - > dialogsUpdated ( ) ; <nl> - parentWidget ( ) - > update ( ) ; <nl> - } <nl> - <nl> void DialogsListWidget : : onPeerNameChanged ( PeerData * peer , const PeerData : : Names & oldNames , const PeerData : : NameFirstChars & oldChars ) { <nl> dialogs . peerNameChanged ( peer , oldNames , oldChars ) ; <nl> contactsNoDialogs . peerNameChanged ( peer , oldNames , oldChars ) ; <nl> void DialogsListWidget : : dialogsReceived ( const QVector < MTPDialog > & added ) { <nl> refresh ( ) ; <nl> } <nl> <nl> - void DialogsListWidget : : addAllSavedPeers ( ) { <nl> + void DialogsListWidget : : addSavedPeersAfter ( const QDateTime & date ) { <nl> SavedPeersByTime & saved ( cRefSavedPeersByTime ( ) ) ; <nl> - while ( ! saved . isEmpty ( ) ) { <nl> + while ( ! saved . isEmpty ( ) & & ( date . isNull ( ) | | date < saved . lastKey ( ) ) ) { <nl> History * history = App : : history ( saved . last ( ) - > id ) ; <nl> + history - > setPosInDialogsDate ( saved . lastKey ( ) ) ; <nl> history - > dialogs = dialogs . addToEnd ( history ) ; <nl> contactsNoDialogs . del ( history - > peer ) ; <nl> saved . remove ( saved . lastKey ( ) , saved . last ( ) ) ; <nl> } <nl> } <nl> <nl> + void DialogsListWidget : : addAllSavedPeers ( ) { <nl> + addSavedPeersAfter ( QDateTime ( ) ) ; <nl> + } <nl> + <nl> void DialogsListWidget : : searchReceived ( const QVector < MTPMessage > & messages , bool fromStart , int32 fullCount ) { <nl> if ( fromStart ) { <nl> clearSearchResults ( false ) ; <nl> void DialogsListWidget : : searchReceived ( const QVector < MTPMessage > & messages , bool <nl> refresh ( ) ; <nl> } <nl> <nl> - void DialogsListWidget : : peopleReceived ( const QString & query , const QVector < MTPContactFound > & people ) { <nl> + void DialogsListWidget : : peopleReceived ( const QString & query , const QVector < MTPPeer > & people ) { <nl> peopleQuery = query . toLower ( ) . trimmed ( ) ; <nl> peopleResults . clear ( ) ; <nl> peopleResults . reserve ( people . size ( ) ) ; <nl> - for ( QVector < MTPContactFound > : : const_iterator i = people . cbegin ( ) , e = people . cend ( ) ; i ! = e ; + + i ) { <nl> - int32 uid = i - > c_contactFound ( ) . vuser_id . v ; <nl> - History * h = App : : historyLoaded ( uid ) ; <nl> + for ( QVector < MTPPeer > : : const_iterator i = people . cbegin ( ) , e = people . cend ( ) ; i ! = e ; + + i ) { <nl> + PeerId peerId = peerFromMTP ( * i ) ; <nl> + History * h = App : : historyLoaded ( peerId ) ; <nl> if ( h & & ! h - > isEmpty ( ) ) continue ; / / skip dialogs <nl> <nl> - peopleResults . push_back ( App : : user ( uid ) ) ; <nl> + peopleResults . push_back ( App : : peer ( peerId ) ) ; <nl> } <nl> refresh ( ) ; <nl> } <nl> void DialogsListWidget : : clearFilter ( ) { <nl> <nl> void DialogsListWidget : : addDialog ( const MTPDdialog & dialog ) { <nl> History * history = App : : history ( peerFromMTP ( dialog . vpeer ) , dialog . vunread_count . v , dialog . vread_inbox_max_id . v ) ; <nl> - if ( history - > lastMsg ) { <nl> - SavedPeersByTime & saved ( cRefSavedPeersByTime ( ) ) ; <nl> - while ( ! saved . isEmpty ( ) & & history - > lastMsg - > date < saved . lastKey ( ) ) { <nl> - History * history = App : : history ( saved . last ( ) - > id ) ; <nl> - history - > dialogs = dialogs . addToEnd ( history ) ; <nl> - contactsNoDialogs . del ( history - > peer ) ; <nl> - saved . remove ( saved . lastKey ( ) , saved . last ( ) ) ; <nl> - } <nl> - } <nl> + <nl> + if ( ! history - > lastMsgDate . isNull ( ) ) addSavedPeersAfter ( history - > lastMsgDate ) ; <nl> History : : DialogLinks links = dialogs . addToEnd ( history ) ; <nl> history - > dialogs = links ; <nl> contactsNoDialogs . del ( history - > peer ) ; <nl> void DialogsListWidget : : addDialog ( const MTPDdialog & dialog ) { <nl> <nl> void DialogsListWidget : : addDialogChannel ( const MTPDdialogChannel & dialogChannel ) { <nl> History * history = App : : history ( peerFromMTP ( dialogChannel . vpeer ) , dialogChannel . vunread_important_count . v , dialogChannel . vread_inbox_max_id . v ) ; <nl> - if ( history - > lastMsg ) { <nl> - SavedPeersByTime & saved ( cRefSavedPeersByTime ( ) ) ; <nl> - while ( ! saved . isEmpty ( ) & & history - > lastMsg - > date < saved . lastKey ( ) ) { <nl> - History * history = App : : history ( saved . last ( ) - > id ) ; <nl> - history - > dialogs = dialogs . addToEnd ( history ) ; <nl> - contactsNoDialogs . del ( history - > peer ) ; <nl> - saved . remove ( saved . lastKey ( ) , saved . last ( ) ) ; <nl> - } <nl> - } <nl> + <nl> + if ( ! history - > lastMsgDate . isNull ( ) ) addSavedPeersAfter ( history - > lastMsgDate ) ; <nl> History : : DialogLinks links = dialogs . addToEnd ( history ) ; <nl> history - > dialogs = links ; <nl> contactsNoDialogs . del ( history - > peer ) ; <nl> mmm a / Telegram / SourceFiles / dialogswidget . h <nl> ppp b / Telegram / SourceFiles / dialogswidget . h <nl> class DialogsListWidget : public QWidget { <nl> DialogsListWidget ( QWidget * parent , MainWidget * main ) ; <nl> <nl> void dialogsReceived ( const QVector < MTPDialog > & dialogs ) ; <nl> + void addSavedPeersAfter ( const QDateTime & date ) ; <nl> void addAllSavedPeers ( ) ; <nl> void searchReceived ( const QVector < MTPMessage > & messages , bool fromStart , int32 fullCount ) ; <nl> - void peopleReceived ( const QString & query , const QVector < MTPContactFound > & people ) ; <nl> + void peopleReceived ( const QString & query , const QVector < MTPPeer > & people ) ; <nl> void showMore ( int32 pixels ) ; <nl> <nl> void activate ( ) ; <nl> class DialogsListWidget : public QWidget { <nl> void enterEvent ( QEvent * e ) ; <nl> void leaveEvent ( QEvent * e ) ; <nl> <nl> - void peopleResultPaint ( UserData * user , QPainter & p , int32 w , bool act , bool sel ) const ; <nl> + void peopleResultPaint ( PeerData * peer , QPainter & p , int32 w , bool act , bool sel ) const ; <nl> void searchInPeerPaint ( QPainter & p , int32 w ) const ; <nl> <nl> void selectSkip ( int32 direction ) ; <nl> void selectSkipPage ( int32 pixels , int32 direction ) ; <nl> <nl> void createDialogAtTop ( History * history , int32 unreadCount ) ; <nl> + void moveDialogToTop ( const History : : DialogLinks & links ) ; <nl> void dlgUpdated ( DialogRow * row ) ; <nl> void dlgUpdated ( History * row ) ; <nl> void removePeer ( PeerData * peer ) ; <nl> class DialogsListWidget : public QWidget { <nl> void scrollToPeer ( const PeerId & peer , MsgId msgId ) ; <nl> <nl> typedef QVector < DialogRow * > FilteredDialogs ; <nl> - typedef QVector < UserData * > PeopleResults ; <nl> + typedef QVector < PeerData * > PeopleResults ; <nl> typedef QVector < FakeDialogRow * > SearchResults ; <nl> <nl> DialogsIndexed & contactsList ( ) ; <nl> public slots : <nl> <nl> void onUpdateSelected ( bool force = false ) ; <nl> void onParentGeometryChanged ( ) ; <nl> - void onDialogToTop ( const History : : DialogLinks & links ) ; <nl> void onPeerNameChanged ( PeerData * peer , const PeerData : : Names & oldNames , const PeerData : : NameFirstChars & oldChars ) ; <nl> void onPeerPhotoChanged ( PeerData * peer ) ; <nl> void onDialogRowReplaced ( DialogRow * oldRow , DialogRow * newRow ) ; <nl> mmm a / Telegram / SourceFiles / dropdown . cpp <nl> ppp b / Telegram / SourceFiles / dropdown . cpp <nl> void MentionsInner : : onParentGeometryChanged ( ) { <nl> } <nl> <nl> MentionsDropdown : : MentionsDropdown ( QWidget * parent ) : QWidget ( parent ) , <nl> - _scroll ( this , st : : mentionScroll ) , _inner ( this , & _rows , & _hrows , & _crows ) , _chat ( 0 ) , _hiding ( false ) , a_opacity ( 0 ) , _shadow ( st : : dropdownDef . shadow ) { <nl> + _scroll ( this , st : : mentionScroll ) , _inner ( this , & _rows , & _hrows , & _crows ) , _chat ( 0 ) , _user ( 0 ) , _channel ( 0 ) , _hiding ( false ) , a_opacity ( 0 ) , _shadow ( st : : dropdownDef . shadow ) { <nl> _hideTimer . setSingleShot ( true ) ; <nl> connect ( & _hideTimer , SIGNAL ( timeout ( ) ) , this , SLOT ( hideStart ( ) ) ) ; <nl> connect ( & _inner , SIGNAL ( chosen ( QString ) ) , this , SIGNAL ( chosen ( QString ) ) ) ; <nl> void MentionsDropdown : : paintEvent ( QPaintEvent * e ) { <nl> void MentionsDropdown : : showFiltered ( PeerData * peer , QString start ) { <nl> _chat = peer - > asChat ( ) ; <nl> _user = peer - > asUser ( ) ; <nl> + _channel = peer - > asChannel ( ) ; <nl> start = start . toLower ( ) ; <nl> bool toDown = ( _filter ! = start ) ; <nl> if ( toDown ) { <nl> void MentionsDropdown : : updateFiltered ( bool toDown ) { <nl> MentionRows rows ; <nl> HashtagRows hrows ; <nl> BotCommandRows crows ; <nl> - if ( _filter . at ( 0 ) = = ' @ ' ) { <nl> + if ( _filter . at ( 0 ) = = ' @ ' & & _chat ) { <nl> QMultiMap < int32 , UserData * > ordered ; <nl> rows . reserve ( _chat - > participants . isEmpty ( ) ? _chat - > lastAuthors . size ( ) : _chat - > participants . size ( ) ) ; <nl> if ( _chat - > participants . isEmpty ( ) ) { <nl> mmm a / Telegram / SourceFiles / dropdown . h <nl> ppp b / Telegram / SourceFiles / dropdown . h <nl> public slots : <nl> <nl> ChatData * _chat ; <nl> UserData * _user ; <nl> + ChannelData * _channel ; <nl> QString _filter ; <nl> QRect _boundings ; <nl> <nl> mmm a / Telegram / SourceFiles / gui / text . cpp <nl> ppp b / Telegram / SourceFiles / gui / text . cpp <nl> void TextLink : : onClick ( Qt : : MouseButton button ) const { <nl> startToken = startParams . captured ( 3 ) ; <nl> } <nl> } <nl> - App : : openUserByName ( telegramMeUser . captured ( 1 ) , start = = qsl ( " startgroup " ) , startToken ) ; <nl> + App : : openPeerByName ( telegramMeUser . captured ( 1 ) , start = = qsl ( " startgroup " ) , startToken ) ; <nl> } else if ( telegramMeGroup . hasMatch ( ) ) { <nl> App : : joinGroupByHash ( telegramMeGroup . captured ( 1 ) ) ; <nl> } else if ( telegramMeStickers . hasMatch ( ) ) { <nl> void EmailLink : : onClick ( Qt : : MouseButton button ) const { <nl> <nl> void MentionLink : : onClick ( Qt : : MouseButton button ) const { <nl> if ( button = = Qt : : LeftButton | | button = = Qt : : MiddleButton ) { <nl> - App : : openUserByName ( _tag . mid ( 1 ) , true ) ; <nl> + App : : openPeerByName ( _tag . mid ( 1 ) , true ) ; <nl> } <nl> } <nl> <nl> mmm a / Telegram / SourceFiles / history . cpp <nl> ppp b / Telegram / SourceFiles / history . cpp <nl> void DialogsIndexed : : peerNameChanged ( PeerData * peer , const PeerData : : Names & oldN <nl> j = index . insert ( * i , new DialogsList ( sortMode ) ) ; <nl> } <nl> if ( sortMode = = DialogsSortByDate ) { <nl> - history - > dialogs . insert ( * i , j . value ( ) - > addByPos ( history ) ) ; <nl> + history - > dialogs . insert ( * i , j . value ( ) - > addToEnd ( history ) ) ; <nl> } else { <nl> j . value ( ) - > addToEnd ( history ) ; <nl> } <nl> void History : : newItemAdded ( HistoryItem * item ) { <nl> notifies . push_back ( item ) ; <nl> App : : main ( ) - > newUnreadMsg ( this , item ) ; <nl> } <nl> - if ( dialogs . isEmpty ( ) ) { <nl> - App : : main ( ) - > createDialogAtTop ( this , unreadCount ) ; <nl> - } else { <nl> - emit App : : main ( ) - > dialogToTop ( dialogs ) ; <nl> - } <nl> } <nl> <nl> void History : : addToFront ( const QVector < MTPMessage > & slice ) { <nl> void History : : addToBack ( const QVector < MTPMessage > & slice ) { <nl> } <nl> } <nl> <nl> - void History : : inboxRead ( int32 upTo ) { <nl> + int32 History : : countUnread ( MsgId upTo ) { <nl> + int32 result = 0 ; <nl> + for ( const_iterator i = cend ( ) , e = cbegin ( ) ; i ! = e ; ) { <nl> + - - i ; <nl> + for ( HistoryBlock : : const_iterator j = ( * i ) - > cend ( ) , en = ( * i ) - > cbegin ( ) ; j ! = en ; ) { <nl> + - - j ; <nl> + if ( ( * j ) - > id > 0 & & ( * j ) - > id < = upTo ) { <nl> + break ; <nl> + } else if ( ! ( * j ) - > out ( ) & & ( * j ) - > unread ( ) & & ( * j ) - > id > upTo ) { <nl> + + + result ; <nl> + } <nl> + } <nl> + } <nl> + return result ; <nl> + } <nl> + <nl> + MsgId History : : inboxRead ( MsgId upTo ) { <nl> if ( unreadCount ) { <nl> if ( upTo & & loadedAtBottom ( ) ) App : : main ( ) - > historyToDown ( this ) ; <nl> - setUnreadCount ( 0 ) ; <nl> - } <nl> - if ( ! isEmpty ( ) ) { <nl> - int32 till = upTo ? upTo : back ( ) - > back ( ) - > id ; <nl> - if ( inboxReadTill < till ) inboxReadTill = till ; <nl> + setUnreadCount ( upTo ? countUnread ( upTo ) : 0 ) ; <nl> } <nl> + <nl> + if ( ! upTo ) upTo = msgIdForRead ( ) ; <nl> + if ( inboxReadTill < upTo ) inboxReadTill = upTo ; <nl> + <nl> if ( ! dialogs . isEmpty ( ) ) { <nl> if ( App : : main ( ) ) App : : main ( ) - > dlgUpdated ( dialogs [ 0 ] ) ; <nl> } <nl> showFrom = 0 ; <nl> App : : wnd ( ) - > notifyClear ( this ) ; <nl> clearNotifications ( ) ; <nl> + <nl> + return upTo ; <nl> } <nl> <nl> - void History : : inboxRead ( HistoryItem * wasRead ) { <nl> + MsgId History : : inboxRead ( HistoryItem * wasRead ) { <nl> return inboxRead ( wasRead ? wasRead - > id : 0 ) ; <nl> } <nl> <nl> - void History : : outboxRead ( int32 upTo ) { <nl> - if ( ! isEmpty ( ) ) { <nl> - int32 till = upTo ? upTo : back ( ) - > back ( ) - > id ; <nl> - if ( outboxReadTill < till ) outboxReadTill = till ; <nl> - } <nl> + MsgId History : : outboxRead ( int32 upTo ) { <nl> + if ( ! upTo ) upTo = msgIdForRead ( ) ; <nl> + if ( outboxReadTill < upTo ) outboxReadTill = upTo ; <nl> + <nl> + return upTo ; <nl> } <nl> <nl> - void History : : outboxRead ( HistoryItem * wasRead ) { <nl> + MsgId History : : outboxRead ( HistoryItem * wasRead ) { <nl> return outboxRead ( wasRead ? wasRead - > id : 0 ) ; <nl> } <nl> <nl> void History : : getReadyFor ( MsgId msgId ) { <nl> } <nl> } <nl> <nl> - void History : : setLastMessage ( HistoryItem * msg ) { <nl> + namespace { <nl> + uint32 _dialogsPosToTopShift = 0x80000000UL ; <nl> + } <nl> + <nl> + inline uint64 dialogPosFromDate ( const QDateTime & date ) { <nl> + return ( uint64 ( date . toTime_t ( ) ) < < 32 ) | ( + + _dialogsPosToTopShift ) ; <nl> + } <nl> + <nl> + void History : : setLastMessage ( HistoryItem * msg , bool updatePosInDialogs ) { <nl> if ( msg ) { <nl> if ( ! lastMsg ) Local : : removeSavedPeer ( peer ) ; <nl> lastMsg = msg ; <nl> - lastMsgDate = msg - > date ; <nl> + if ( updatePosInDialogs ) setPosInDialogsDate ( msg - > date ) ; <nl> } else { <nl> lastMsg = 0 ; <nl> } <nl> } <nl> <nl> + void History : : setPosInDialogsDate ( const QDateTime & date ) { <nl> + lastMsgDate = date ; <nl> + posInDialogs = dialogPosFromDate ( lastMsgDate ) ; <nl> + if ( App : : main ( ) ) { <nl> + App : : main ( ) - > createDialogAtTop ( this , unreadCount ) ; <nl> + } <nl> + } <nl> + <nl> void History : : fixLastMessage ( bool wasAtBottom ) { <nl> if ( wasAtBottom & & isEmpty ( ) ) { <nl> wasAtBottom = false ; <nl> } <nl> if ( wasAtBottom ) { <nl> - setLastMessage ( back ( ) - > back ( ) ) ; <nl> + setLastMessage ( back ( ) - > back ( ) , false ) ; <nl> } else { <nl> setLastMessage ( 0 ) ; <nl> if ( App : : main ( ) ) { <nl> MsgId History : : maxMsgId ( ) const { <nl> return 0 ; <nl> } <nl> <nl> + MsgId History : : msgIdForRead ( ) const { <nl> + MsgId result = ( lastMsg & & lastMsg - > id > 0 ) ? lastMsg - > id : 0 ; <nl> + if ( loadedAtBottom ( ) ) result = qMax ( result , maxMsgId ( ) ) ; <nl> + return result ; <nl> + } <nl> + <nl> int32 History : : geomResize ( int32 newWidth , int32 * ytransform , bool dontRecountText ) { <nl> if ( width ! = newWidth | | dontRecountText ) { <nl> int32 y = 0 ; <nl> HistoryForwarded : : HistoryForwarded ( History * history , HistoryBlock * block , const <nl> fwdNameUpdated ( ) ; <nl> } <nl> <nl> - HistoryForwarded : : HistoryForwarded ( History * history , HistoryBlock * block , MsgId id , HistoryMessage * msg ) : HistoryMessage ( history , block , id , ( ( history - > peer - > input . type ( ) ! = mtpc_inputPeerSelf ) ? ( MTPDmessage_flag_out | MTPDmessage_flag_unread ) : 0 ) | ( msg - > getMedia ( ) & & ( msg - > getMedia ( ) - > type ( ) = = MediaTypeAudio / * | | msg - > getMedia ( ) - > type ( ) = = MediaTypeVideo * / ) ? MTPDmessage_flag_media_unread : 0 ) , : : date ( unixtime ( ) ) , MTP : : authedId ( ) , msg - > justMedia ( ) ? QString ( ) : msg - > HistoryMessage : : selectedText ( FullItemSel ) , msg - > HistoryMessage : : textLinks ( ) , msg - > getMedia ( ) ) <nl> + HistoryForwarded : : HistoryForwarded ( History * history , HistoryBlock * block , MsgId id , HistoryMessage * msg ) : HistoryMessage ( history , block , id , newMessageFlags ( history - > peer ) | ( msg - > getMedia ( ) & & ( msg - > getMedia ( ) - > type ( ) = = MediaTypeAudio / * | | msg - > getMedia ( ) - > type ( ) = = MediaTypeVideo * / ) ? MTPDmessage_flag_media_unread : 0 ) , : : date ( unixtime ( ) ) , MTP : : authedId ( ) , msg - > justMedia ( ) ? QString ( ) : msg - > HistoryMessage : : selectedText ( FullItemSel ) , msg - > HistoryMessage : : textLinks ( ) , msg - > getMedia ( ) ) <nl> , fwdDate ( msg - > dateForwarded ( ) ) <nl> , fwdFrom ( msg - > fromForwarded ( ) ) <nl> , fwdFromVersion ( fwdFrom - > nameVersion ) <nl> mmm a / Telegram / SourceFiles / history . h <nl> ppp b / Telegram / SourceFiles / history . h <nl> struct History : public QList < HistoryBlock * > { <nl> void newItemAdded ( HistoryItem * item ) ; <nl> void unregTyping ( UserData * from ) ; <nl> <nl> - void inboxRead ( int32 upTo ) ; <nl> - void inboxRead ( HistoryItem * wasRead ) ; <nl> - void outboxRead ( int32 upTo ) ; <nl> - void outboxRead ( HistoryItem * wasRead ) ; <nl> + int32 countUnread ( MsgId upTo ) ; <nl> + MsgId inboxRead ( MsgId upTo ) ; <nl> + MsgId inboxRead ( HistoryItem * wasRead ) ; <nl> + MsgId outboxRead ( MsgId upTo ) ; <nl> + MsgId outboxRead ( HistoryItem * wasRead ) ; <nl> <nl> void setUnreadCount ( int32 newUnreadCount , bool psUpdate = true ) ; <nl> void setMsgCount ( int32 newMsgCount ) ; <nl> struct History : public QList < HistoryBlock * > { <nl> bool isReadyFor ( MsgId msgId , bool check = false ) const ; / / has messages for showing history at msgId <nl> void getReadyFor ( MsgId msgId ) ; <nl> <nl> - void setLastMessage ( HistoryItem * msg ) ; <nl> + void setLastMessage ( HistoryItem * msg , bool updatePosInDialogs = true ) ; <nl> + void setPosInDialogsDate ( const QDateTime & date ) ; <nl> void fixLastMessage ( bool wasAtBottom ) ; <nl> <nl> MsgId minMsgId ( ) const ; <nl> MsgId maxMsgId ( ) const ; <nl> + MsgId msgIdForRead ( ) const ; <nl> <nl> int32 geomResize ( int32 newWidth , int32 * ytransform = 0 , bool dontRecountText = false ) ; / / return new size <nl> int32 width , height , msgCount , unreadCount ; <nl> struct History : public QList < HistoryBlock * > { <nl> <nl> typedef QMap < QChar , DialogRow * > DialogLinks ; <nl> DialogLinks dialogs ; <nl> - int32 posInDialogs ; <nl> + uint64 posInDialogs ; / / like ( ( unixtime ) < < 32 ) | ( incremented counter ) <nl> <nl> typedef QMap < UserData * , uint64 > TypingUsers ; <nl> TypingUsers typing ; <nl> struct DialogsList { <nl> return ( pos = = current - > pos ) ? current : 0 ; <nl> } <nl> <nl> - DialogRow * addToEnd ( History * history , bool updatePos = true ) { <nl> + DialogRow * addToEnd ( History * history ) { <nl> DialogRow * result = new DialogRow ( history , end - > prev , end , end - > pos ) ; <nl> end - > pos + + ; <nl> if ( begin = = end ) { <nl> begin = current = result ; <nl> - if ( sortMode = = DialogsSortByDate & & updatePos ) history - > posInDialogs = 0 ; <nl> } else { <nl> end - > prev - > next = result ; <nl> - if ( sortMode = = DialogsSortByDate & & updatePos ) history - > posInDialogs = end - > prev - > history - > posInDialogs + 1 ; <nl> } <nl> rowByPeer . insert ( history - > peer - > id , result ) ; <nl> + + count ; <nl> - return ( end - > prev = result ) ; <nl> - } <nl> - <nl> - void bringToTop ( DialogRow * row , bool updatePos = true ) { <nl> - if ( sortMode = = DialogsSortByDate & & updatePos & & row ! = begin ) { <nl> - row - > history - > posInDialogs = begin - > history - > posInDialogs - 1 ; <nl> + end - > prev = result ; <nl> + if ( sortMode = = DialogsSortByDate ) { <nl> + adjustByPos ( result ) ; <nl> } <nl> - insertBefore ( row , begin ) ; <nl> + return result ; <nl> } <nl> <nl> bool insertBefore ( DialogRow * row , DialogRow * before ) { <nl> struct DialogsList { <nl> if ( sortMode ! = DialogsSortByDate ) return ; <nl> <nl> DialogRow * change = row ; <nl> - while ( change - > prev & & change - > prev - > history - > posInDialogs > row - > history - > posInDialogs ) { <nl> + if ( change ! = begin & & begin - > history - > posInDialogs < row - > history - > posInDialogs ) { <nl> + change = begin ; <nl> + } else while ( change - > prev & & change - > prev - > history - > posInDialogs < row - > history - > posInDialogs ) { <nl> change = change - > prev ; <nl> } <nl> if ( ! insertBefore ( row , change ) ) { <nl> - while ( change - > next ! = end & & change - > next - > history - > posInDialogs < row - > history - > posInDialogs ) { <nl> + if ( change - > next ! = end & & end - > prev - > history - > posInDialogs > row - > history - > posInDialogs ) { <nl> + change = end - > prev ; <nl> + } else while ( change - > next ! = end & & change - > next - > history - > posInDialogs > row - > history - > posInDialogs ) { <nl> change = change - > next ; <nl> } <nl> insertAfter ( row , change ) ; <nl> } <nl> } <nl> <nl> - DialogRow * addByPos ( History * history ) { <nl> - if ( sortMode ! = DialogsSortByDate ) return 0 ; <nl> - <nl> - DialogRow * row = addToEnd ( history , false ) ; <nl> - adjustByPos ( row ) ; <nl> - return row ; <nl> - } <nl> - <nl> bool del ( const PeerId & peerId , DialogRow * replacedBy = 0 ) ; <nl> <nl> void remove ( DialogRow * row ) { <nl> struct DialogsIndexed { <nl> return res ; <nl> } <nl> <nl> - void bringToTop ( const History : : DialogLinks & links ) { <nl> + void adjustByPos ( const History : : DialogLinks & links ) { <nl> for ( History : : DialogLinks : : const_iterator i = links . cbegin ( ) , e = links . cend ( ) ; i ! = e ; + + i ) { <nl> if ( i . key ( ) = = QChar ( 0 ) ) { <nl> - list . bringToTop ( i . value ( ) ) ; <nl> + list . adjustByPos ( i . value ( ) ) ; <nl> } else { <nl> DialogsIndex : : iterator j = index . find ( i . key ( ) ) ; <nl> if ( j ! = index . cend ( ) ) { <nl> - j . value ( ) - > bringToTop ( i . value ( ) ) ; <nl> + j . value ( ) - > adjustByPos ( i . value ( ) ) ; <nl> } <nl> } <nl> } <nl> class HistoryWebPage : public HistoryMedia { <nl> } <nl> ImagePtr replyPreview ( ) ; <nl> <nl> + virtual bool animating ( ) const { <nl> + if ( _asArticle | | ! data - > photo | | data - > photo - > full - > loaded ( ) ) return false ; <nl> + return data - > photo - > full - > loading ( ) ; <nl> + } <nl> + <nl> WebPageData * webpage ( ) { <nl> return data ; <nl> } <nl> mmm a / Telegram / SourceFiles / historywidget . cpp <nl> ppp b / Telegram / SourceFiles / historywidget . cpp <nl> void HistoryList : : onDragExec ( ) { <nl> <nl> mimeData - > setText ( sel ) ; <nl> if ( ! urls . isEmpty ( ) ) mimeData - > setUrls ( urls ) ; <nl> - if ( uponSelected & & ! _selected . isEmpty ( ) & & _selected . cbegin ( ) . value ( ) = = FullItemSel & & cWideMode ( ) ) { <nl> + if ( uponSelected & & ! _selected . isEmpty ( ) & & _selected . cbegin ( ) . value ( ) = = FullItemSel & & cWideMode ( ) & & ! hist - > peer - > isChannel ( ) ) { <nl> mimeData - > setData ( qsl ( " application / x - td - forward - selected " ) , " 1 " ) ; <nl> } <nl> drag - > setMimeData ( mimeData ) ; <nl> void HistoryList : : onDragExec ( ) { <nl> lnkAudio = ( lnkType = = qstr ( " AudioOpenLink " ) ) , <nl> lnkDocument = ( lnkType = = qstr ( " DocumentOpenLink " ) ) , <nl> lnkContact = ( lnkType = = qstr ( " PeerLink " ) & & dynamic_cast < HistoryContact * > ( pressedLnkItem - > getMedia ( ) ) ) , <nl> - dragSticker = dynamic_cast < HistorySticker * > ( pressedItem ? pressedItem - > getMedia ( ) : 0 ) , <nl> - dragByDate = ( _dragCursorState = = HistoryInDateCursorState ) ; <nl> + dragSticker = dynamic_cast < HistorySticker * > ( pressedItem ? pressedItem - > getMedia ( ) : 0 ) & & ! hist - > peer - > isChannel ( ) , <nl> + dragByDate = ( _dragCursorState = = HistoryInDateCursorState ) & & ! hist - > peer - > isChannel ( ) ; <nl> if ( lnkPhoto | | lnkVideo | | lnkAudio | | lnkDocument | | lnkContact | | dragSticker | | dragByDate ) { <nl> QDrag * drag = new QDrag ( App : : wnd ( ) ) ; <nl> QMimeData * mimeData = new QMimeData ; <nl> <nl> - if ( lnkPhoto | | lnkVideo | | lnkAudio | | lnkDocument | | lnkContact ) { <nl> - mimeData - > setData ( qsl ( " application / x - td - forward - pressed - link " ) , " 1 " ) ; <nl> - } else { <nl> - mimeData - > setData ( qsl ( " application / x - td - forward - pressed " ) , " 1 " ) ; <nl> + if ( ! hist - > peer - > isChannel ( ) ) { <nl> + if ( lnkPhoto | | lnkVideo | | lnkAudio | | lnkDocument | | lnkContact ) { <nl> + mimeData - > setData ( qsl ( " application / x - td - forward - pressed - link " ) , " 1 " ) ; <nl> + } else { <nl> + mimeData - > setData ( qsl ( " application / x - td - forward - pressed " ) , " 1 " ) ; <nl> + } <nl> } <nl> if ( lnkDocument ) { <nl> QString already = static_cast < DocumentOpenLink * > ( textlnkDown ( ) . data ( ) ) - > document ( ) - > already ( true ) ; <nl> void HistoryList : : showContextMenu ( QContextMenuEvent * e , bool showFromTouch ) { <nl> _menu - > addAction ( lang ( lng_context_delete_selected ) , historyWidget , SLOT ( onDeleteSelected ( ) ) ) ; <nl> _menu - > addAction ( lang ( lng_context_clear_selection ) , historyWidget , SLOT ( onClearSelected ( ) ) ) ; <nl> } else if ( App : : hoveredLinkItem ( ) ) { <nl> - if ( isUponSelected ! = - 2 ) { <nl> - if ( dynamic_cast < HistoryMessage * > ( App : : hoveredLinkItem ( ) ) & & App : : hoveredLinkItem ( ) - > id > 0 ) { <nl> + if ( isUponSelected ! = - 2 & & ( ! hist - > peer - > isChannel ( ) | | hist - > peer - > asChannel ( ) - > adminned ) ) { <nl> + if ( dynamic_cast < HistoryMessage * > ( App : : hoveredLinkItem ( ) ) & & App : : hoveredLinkItem ( ) - > id > 0 & & ! hist - > peer - > isChannel ( ) ) { <nl> _menu - > addAction ( lang ( lng_context_forward_msg ) , historyWidget , SLOT ( forwardMessage ( ) ) ) - > setEnabled ( true ) ; <nl> } <nl> _menu - > addAction ( lang ( lng_context_delete_msg ) , historyWidget , SLOT ( deleteMessage ( ) ) ) - > setEnabled ( true ) ; <nl> } <nl> - if ( App : : hoveredLinkItem ( ) - > id > 0 ) { <nl> + if ( App : : hoveredLinkItem ( ) - > id > 0 & & ( ! hist - > peer - > isChannel ( ) | | hist - > peer - > asChannel ( ) - > adminned ) ) { <nl> _menu - > addAction ( lang ( lng_context_select_msg ) , historyWidget , SLOT ( selectMessage ( ) ) ) - > setEnabled ( true ) ; <nl> } <nl> App : : contextItem ( App : : hoveredLinkItem ( ) ) ; <nl> } <nl> } else { / / maybe cursor on some text history item ? <nl> - bool canDelete = ( item & & item - > itemType ( ) = = HistoryItem : : MsgType ) ; <nl> - bool canForward = canDelete & & ( item - > id > 0 ) & & ! item - > serviceMsg ( ) ; <nl> + bool canDelete = ( item & & item - > itemType ( ) = = HistoryItem : : MsgType ) & & ( ! hist - > peer - > isChannel ( ) | | hist - > peer - > asChannel ( ) - > adminned ) ; <nl> + bool canForward = canDelete & & ( item - > id > 0 ) & & ! item - > serviceMsg ( ) & & ! hist - > peer - > isChannel ( ) ; <nl> <nl> HistoryMessage * msg = dynamic_cast < HistoryMessage * > ( item ) ; <nl> HistoryServiceMsg * srv = dynamic_cast < HistoryServiceMsg * > ( item ) ; <nl> void HistoryList : : showContextMenu ( QContextMenuEvent * e , bool showFromTouch ) { <nl> _menu - > addAction ( lang ( ( msg & & msg - > uploading ( ) ) ? lng_context_cancel_upload : lng_context_delete_msg ) , historyWidget , SLOT ( deleteMessage ( ) ) ) - > setEnabled ( true ) ; <nl> } <nl> } <nl> - if ( item - > id > 0 ) { <nl> + if ( item - > id > 0 & & ( ! hist - > peer - > isChannel ( ) | | hist - > peer - > asChannel ( ) - > adminned ) ) { <nl> _menu - > addAction ( lang ( lng_context_select_msg ) , historyWidget , SLOT ( selectMessage ( ) ) ) - > setEnabled ( true ) ; <nl> } <nl> } else { <nl> - if ( App : : mousedItem ( ) & & App : : mousedItem ( ) - > itemType ( ) = = HistoryItem : : MsgType & & App : : mousedItem ( ) - > id > 0 ) { <nl> + if ( App : : mousedItem ( ) & & App : : mousedItem ( ) - > itemType ( ) = = HistoryItem : : MsgType & & App : : mousedItem ( ) - > id > 0 & & ( ! hist - > peer - > isChannel ( ) | | hist - > peer - > asChannel ( ) - > adminned ) ) { <nl> if ( ! _menu ) _menu = new ContextMenu ( this ) ; <nl> _menu - > addAction ( lang ( lng_context_select_msg ) , historyWidget , SLOT ( selectMessage ( ) ) ) - > setEnabled ( true ) ; <nl> item = App : : mousedItem ( ) ; <nl> bool HistoryList : : canCopySelected ( ) const { <nl> } <nl> <nl> bool HistoryList : : canDeleteSelected ( ) const { <nl> - return ! _selected . isEmpty ( ) & & ( _selected . cbegin ( ) . value ( ) = = FullItemSel ) ; <nl> + return ! _selected . isEmpty ( ) & & ( _selected . cbegin ( ) . value ( ) = = FullItemSel ) & & ( ! hist - > peer - > isChannel ( ) | | hist - > peer - > asChannel ( ) - > adminned ) ; <nl> } <nl> <nl> void HistoryList : : getSelectionState ( int32 & selectedForForward , int32 & selectedForDelete ) const { <nl> void HistoryList : : onUpdateSelected ( ) { <nl> } <nl> cur = textlnkDown ( ) ? style : : cur_pointer : style : : cur_default ; <nl> if ( _dragAction = = Selecting ) { <nl> + bool canSelectMany = hist & & ( ! hist - > peer - > isChannel ( ) | | hist - > peer - > asChannel ( ) - > adminned ) ; <nl> if ( item = = _dragItem & & item = = App : : hoveredItem ( ) & & ! _selected . isEmpty ( ) & & _selected . cbegin ( ) . value ( ) ! = FullItemSel ) { <nl> bool afterSymbol , uponSymbol ; <nl> uint16 second ; <nl> void HistoryList : : onUpdateSelected ( ) { <nl> setFocus ( ) ; <nl> } <nl> updateDragSelection ( 0 , 0 , false ) ; <nl> - } else { <nl> + } else if ( canSelectMany ) { <nl> bool selectingDown = ( _dragItem - > block ( ) - > y < item - > block ( ) - > y ) | | ( ( _dragItem - > block ( ) = = item - > block ( ) ) & & ( _dragItem - > y < item - > y | | ( _dragItem = = item & & _dragStartPos . y ( ) < m . y ( ) ) ) ) ; <nl> HistoryItem * dragSelFrom = _dragItem , * dragSelTo = item ; <nl> if ( ! dragSelFrom - > hasPoint ( _dragStartPos . x ( ) , _dragStartPos . y ( ) ) ) { / / maybe exclude dragSelFrom <nl> void HistoryList : : applyDragSelection ( ) { <nl> } <nl> <nl> void HistoryList : : applyDragSelection ( SelectedItems * toItems ) const { <nl> + if ( hist & & hist - > peer - > isChannel ( ) & & ! hist - > peer - > asChannel ( ) - > adminned ) { <nl> + toItems - > clear ( ) ; <nl> + return ; <nl> + } <nl> if ( ! toItems - > isEmpty ( ) & & toItems - > cbegin ( ) . value ( ) ! = FullItemSel ) { <nl> toItems - > clear ( ) ; <nl> } <nl> void HistoryWidget : : updateControlsVisibility ( ) { <nl> } else if ( _peer - > isChat ( ) ) { <nl> avail = ! _peer - > asChat ( ) - > forbidden & & ! _peer - > asChat ( ) - > left ; <nl> } else if ( _peer - > isChannel ( ) ) { <nl> - avail = ! _peer - > asChannel ( ) - > forbidden & & ! _peer - > asChannel ( ) - > left ; <nl> + avail = ! _peer - > asChannel ( ) - > forbidden & & ! _peer - > asChannel ( ) - > left & & _peer - > asChannel ( ) - > adminned ; <nl> } <nl> if ( avail ) { <nl> checkMentionDropdown ( ) ; <nl> void HistoryWidget : : shareContact ( const PeerId & peer , const QString & phone , const <nl> flags | = MTPDmessage : : flag_reply_to_msg_id ; <nl> sendFlags | = MTPmessages_SendMedia : : flag_reply_to_msg_id ; <nl> } <nl> - h - > addToBack ( MTP_message ( MTP_int ( flags ) , MTP_int ( newId . msg ) , MTP_int ( MTP : : authedId ( ) ) , peerToMTP ( peer ) , MTPint ( ) , MTPint ( ) , MTP_int ( replyToId ( ) ) , MTP_int ( unixtime ( ) ) , MTP_string ( " " ) , MTP_messageMediaContact ( MTP_string ( phone ) , MTP_string ( fname ) , MTP_string ( lname ) , MTP_int ( userId ) ) , MTPnullMarkup , MTPnullEntities ) ) ; <nl> + bool fromChannelName = p - > isChannel ( ) ; <nl> + if ( fromChannelName ) { <nl> + sendFlags | = MTPmessages_SendMessage_flag_broadcast ; <nl> + } else { <nl> + flags | = MTPDmessage : : flag_from_id ; <nl> + } <nl> + h - > addToBack ( MTP_message ( MTP_int ( flags ) , MTP_int ( newId . msg ) , MTP_int ( fromChannelName ? 0 : MTP : : authedId ( ) ) , peerToMTP ( peer ) , MTPint ( ) , MTPint ( ) , MTP_int ( replyToId ( ) ) , MTP_int ( unixtime ( ) ) , MTP_string ( " " ) , MTP_messageMediaContact ( MTP_string ( phone ) , MTP_string ( fname ) , MTP_string ( lname ) , MTP_int ( userId ) ) , MTPnullMarkup , MTPnullEntities ) ) ; <nl> h - > sendRequestId = MTP : : send ( MTPmessages_SendMedia ( MTP_int ( sendFlags ) , p - > input , MTP_int ( replyTo ) , MTP_inputMediaContact ( MTP_string ( phone ) , MTP_string ( fname ) , MTP_string ( lname ) ) , MTP_long ( randomId ) , MTPnullMarkup ) , App : : main ( ) - > rpcDone ( & MainWidget : : sentUpdatesReceived ) , RPCFailHandlerPtr ( ) , 0 , 0 , h - > sendRequestId ) ; <nl> <nl> App : : historyRegRandom ( randomId , newId ) ; <nl> void HistoryWidget : : confirmSendImage ( const ReadyLocalMedia & img ) { <nl> <nl> int32 flags = newMessageFlags ( h - > peer ) | MTPDmessage : : flag_media ; / / unread , out <nl> if ( img . replyTo ) flags | = MTPDmessage : : flag_reply_to_msg_id ; <nl> + bool fromChannelName = h - > peer - > isChannel ( ) ; <nl> + if ( fromChannelName ) { <nl> + } else { <nl> + flags | = MTPDmessage : : flag_from_id ; <nl> + } <nl> if ( img . type = = ToPreparePhoto ) { <nl> - h - > addToBack ( MTP_message ( MTP_int ( flags ) , MTP_int ( newId . msg ) , MTP_int ( MTP : : authedId ( ) ) , peerToMTP ( img . peer ) , MTPint ( ) , MTPint ( ) , MTP_int ( img . replyTo ) , MTP_int ( unixtime ( ) ) , MTP_string ( " " ) , MTP_messageMediaPhoto ( img . photo , MTP_string ( " " ) ) , MTPnullMarkup , MTPnullEntities ) ) ; <nl> + h - > addToBack ( MTP_message ( MTP_int ( flags ) , MTP_int ( newId . msg ) , MTP_int ( fromChannelName ? 0 : MTP : : authedId ( ) ) , peerToMTP ( img . peer ) , MTPint ( ) , MTPint ( ) , MTP_int ( img . replyTo ) , MTP_int ( unixtime ( ) ) , MTP_string ( " " ) , MTP_messageMediaPhoto ( img . photo , MTP_string ( " " ) ) , MTPnullMarkup , MTPnullEntities ) ) ; <nl> } else if ( img . type = = ToPrepareDocument ) { <nl> - h - > addToBack ( MTP_message ( MTP_int ( flags ) , MTP_int ( newId . msg ) , MTP_int ( MTP : : authedId ( ) ) , peerToMTP ( img . peer ) , MTPint ( ) , MTPint ( ) , MTP_int ( img . replyTo ) , MTP_int ( unixtime ( ) ) , MTP_string ( " " ) , MTP_messageMediaDocument ( img . document ) , MTPnullMarkup , MTPnullEntities ) ) ; <nl> + h - > addToBack ( MTP_message ( MTP_int ( flags ) , MTP_int ( newId . msg ) , MTP_int ( fromChannelName ? 0 : MTP : : authedId ( ) ) , peerToMTP ( img . peer ) , MTPint ( ) , MTPint ( ) , MTP_int ( img . replyTo ) , MTP_int ( unixtime ( ) ) , MTP_string ( " " ) , MTP_messageMediaDocument ( img . document ) , MTPnullMarkup , MTPnullEntities ) ) ; <nl> } else if ( img . type = = ToPrepareAudio ) { <nl> flags | = MTPDmessage_flag_media_unread ; <nl> - h - > addToBack ( MTP_message ( MTP_int ( flags ) , MTP_int ( newId . msg ) , MTP_int ( MTP : : authedId ( ) ) , peerToMTP ( img . peer ) , MTPint ( ) , MTPint ( ) , MTP_int ( img . replyTo ) , MTP_int ( unixtime ( ) ) , MTP_string ( " " ) , MTP_messageMediaAudio ( img . audio ) , MTPnullMarkup , MTPnullEntities ) ) ; <nl> + h - > addToBack ( MTP_message ( MTP_int ( flags ) , MTP_int ( newId . msg ) , MTP_int ( fromChannelName ? 0 : MTP : : authedId ( ) ) , peerToMTP ( img . peer ) , MTPint ( ) , MTPint ( ) , MTP_int ( img . replyTo ) , MTP_int ( unixtime ( ) ) , MTP_string ( " " ) , MTP_messageMediaAudio ( img . audio ) , MTPnullMarkup , MTPnullEntities ) ) ; <nl> } <nl> <nl> if ( _peer & & img . peer = = _peer - > id ) { <nl> void HistoryWidget : : onPhotoUploaded ( const FullMsgId & newId , const MTPInputFile & <nl> if ( replyTo ) { <nl> sendFlags | = MTPmessages_SendMedia : : flag_reply_to_msg_id ; <nl> } <nl> + bool fromChannelName = hist - > peer - > isChannel ( ) ; <nl> + if ( fromChannelName ) { <nl> + sendFlags | = MTPmessages_SendMessage_flag_broadcast ; <nl> + } <nl> hist - > sendRequestId = MTP : : send ( MTPmessages_SendMedia ( MTP_int ( sendFlags ) , item - > history ( ) - > peer - > input , MTP_int ( replyTo ) , MTP_inputMediaUploadedPhoto ( file , MTP_string ( " " ) ) , MTP_long ( randomId ) , MTPnullMarkup ) , App : : main ( ) - > rpcDone ( & MainWidget : : sentUpdatesReceived ) , App : : main ( ) - > rpcFail ( & MainWidget : : sendPhotoFailed , randomId ) , 0 , 0 , hist - > sendRequestId ) ; <nl> } <nl> } <nl> void HistoryWidget : : onDocumentUploaded ( const FullMsgId & newId , const MTPInputFil <nl> if ( replyTo ) { <nl> sendFlags | = MTPmessages_SendMedia : : flag_reply_to_msg_id ; <nl> } <nl> + bool fromChannelName = hist - > peer - > isChannel ( ) ; <nl> + if ( fromChannelName ) { <nl> + sendFlags | = MTPmessages_SendMessage_flag_broadcast ; <nl> + } <nl> hist - > sendRequestId = MTP : : send ( MTPmessages_SendMedia ( MTP_int ( sendFlags ) , item - > history ( ) - > peer - > input , MTP_int ( replyTo ) , MTP_inputMediaUploadedDocument ( file , MTP_string ( document - > mime ) , _composeDocumentAttributes ( document ) ) , MTP_long ( randomId ) , MTPnullMarkup ) , App : : main ( ) - > rpcDone ( & MainWidget : : sentUpdatesReceived ) , RPCFailHandlerPtr ( ) , 0 , 0 , hist - > sendRequestId ) ; <nl> } <nl> } <nl> void HistoryWidget : : onThumbDocumentUploaded ( const FullMsgId & newId , const MTPInp <nl> if ( replyTo ) { <nl> sendFlags | = MTPmessages_SendMedia : : flag_reply_to_msg_id ; <nl> } <nl> + bool fromChannelName = hist - > peer - > isChannel ( ) ; <nl> + if ( fromChannelName ) { <nl> + sendFlags | = MTPmessages_SendMessage_flag_broadcast ; <nl> + } <nl> hist - > sendRequestId = MTP : : send ( MTPmessages_SendMedia ( MTP_int ( sendFlags ) , item - > history ( ) - > peer - > input , MTP_int ( replyTo ) , MTP_inputMediaUploadedThumbDocument ( file , thumb , MTP_string ( document - > mime ) , _composeDocumentAttributes ( document ) ) , MTP_long ( randomId ) , MTPnullMarkup ) , App : : main ( ) - > rpcDone ( & MainWidget : : sentUpdatesReceived ) , RPCFailHandlerPtr ( ) , 0 , 0 , hist - > sendRequestId ) ; <nl> } <nl> } <nl> void HistoryWidget : : onAudioUploaded ( const FullMsgId & newId , const MTPInputFile & <nl> if ( replyTo ) { <nl> sendFlags | = MTPmessages_SendMedia : : flag_reply_to_msg_id ; <nl> } <nl> + bool fromChannelName = hist - > peer - > isChannel ( ) ; <nl> + if ( fromChannelName ) { <nl> + sendFlags | = MTPmessages_SendMessage_flag_broadcast ; <nl> + } <nl> hist - > sendRequestId = MTP : : send ( MTPmessages_SendMedia ( MTP_int ( sendFlags ) , item - > history ( ) - > peer - > input , MTP_int ( replyTo ) , MTP_inputMediaUploadedAudio ( file , MTP_int ( audio - > duration ) , MTP_string ( audio - > mime ) ) , MTP_long ( randomId ) , MTPnullMarkup ) , App : : main ( ) - > rpcDone ( & MainWidget : : sentUpdatesReceived ) , RPCFailHandlerPtr ( ) , 0 , 0 , hist - > sendRequestId ) ; <nl> } <nl> } <nl> void HistoryWidget : : updateListSize ( int32 addToY , bool initial , bool loadedDown , <nl> } else if ( _peer - > isChat ( ) ) { <nl> avail = ( ! _peer - > asChat ( ) - > forbidden & & ! _peer - > asChat ( ) - > left ) ; <nl> } else if ( _peer - > isChannel ( ) ) { <nl> - avail = ( ! _peer - > asChannel ( ) - > forbidden & & ! _peer - > asChannel ( ) - > left ) ; <nl> + avail = ( ! _peer - > asChannel ( ) - > forbidden & & ! _peer - > asChannel ( ) - > left & & _peer - > asChannel ( ) - > adminned ) ; <nl> } <nl> if ( avail ) { <nl> newScrollHeight - = ( _field . height ( ) + 2 * st : : sendPadding ) ; <nl> void HistoryWidget : : onStickerSend ( DocumentData * sticker ) { <nl> flags | = MTPDmessage : : flag_reply_to_msg_id ; <nl> sendFlags | = MTPmessages_SendMedia : : flag_reply_to_msg_id ; <nl> } <nl> - _history - > addToBackDocument ( newId . msg , flags , replyToId ( ) , date ( MTP_int ( unixtime ( ) ) ) , MTP : : authedId ( ) , sticker ) ; <nl> + bool fromChannelName = _history - > peer - > isChannel ( ) ; <nl> + if ( fromChannelName ) { <nl> + sendFlags | = MTPmessages_SendMessage_flag_broadcast ; <nl> + } <nl> + _history - > addToBackDocument ( newId . msg , flags , replyToId ( ) , date ( MTP_int ( unixtime ( ) ) ) , fromChannelName ? 0 : MTP : : authedId ( ) , sticker ) ; <nl> <nl> _history - > sendRequestId = MTP : : send ( MTPmessages_SendMedia ( MTP_int ( sendFlags ) , _peer - > input , MTP_int ( replyToId ( ) ) , MTP_inputMediaDocument ( MTP_inputDocument ( MTP_long ( sticker - > id ) , MTP_long ( sticker - > access ) ) ) , MTP_long ( randomId ) , MTPnullMarkup ) , App : : main ( ) - > rpcDone ( & MainWidget : : sentUpdatesReceived ) , RPCFailHandlerPtr ( ) , 0 , 0 , _history - > sendRequestId ) ; <nl> App : : main ( ) - > finishForwarding ( _history ) ; <nl> mmm a / Telegram / SourceFiles / mainwidget . cpp <nl> ppp b / Telegram / SourceFiles / mainwidget . cpp <nl> Copyright ( c ) 2014 John Preston , https : / / desktop . telegram . org <nl> # include " audio . h " <nl> <nl> TopBarWidget : : TopBarWidget ( MainWidget * w ) : TWidget ( w ) , <nl> - a_over ( 0 ) , _drawShadow ( true ) , _selCount ( 0 ) , _selStrLeft ( - st : : topBarButton . width / 2 ) , _selStrWidth ( 0 ) , _animating ( false ) , <nl> + a_over ( 0 ) , _drawShadow ( true ) , _selPeer ( 0 ) , _selCount ( 0 ) , _selStrLeft ( - st : : topBarButton . width / 2 ) , _selStrWidth ( 0 ) , _animating ( false ) , <nl> _clearSelection ( this , lang ( lng_selected_clear ) , st : : topBarButton ) , <nl> _forward ( this , lang ( lng_selected_forward ) , st : : topBarActionButton ) , <nl> _delete ( this , lang ( lng_selected_delete ) , st : : topBarActionButton ) , <nl> void TopBarWidget : : mousePressEvent ( QMouseEvent * e ) { <nl> <nl> void TopBarWidget : : resizeEvent ( QResizeEvent * e ) { <nl> int32 r = width ( ) ; <nl> - if ( ! _forward . isHidden ( ) ) { <nl> + if ( ! _forward . isHidden ( ) | | ! _delete . isHidden ( ) ) { <nl> int32 fullW = r - ( _selectionButtonsWidth + ( _selStrWidth - st : : topBarButton . width ) + st : : topBarActionSkip ) ; <nl> int32 selectedClearWidth = st : : topBarButton . width , forwardDeleteWidth = st : : topBarActionButton . width - _forwardDeleteWidth , skip = st : : topBarActionSkip ; <nl> while ( fullW < 0 ) { <nl> void TopBarWidget : : resizeEvent ( QResizeEvent * e ) { <nl> _selStrLeft = - selectedClearWidth / 2 ; <nl> <nl> int32 availX = _selStrLeft + _selStrWidth , availW = r - ( _clearSelection . width ( ) + selectedClearWidth / 2 ) - availX ; <nl> - _forward . move ( availX + ( availW - _forward . width ( ) - _delete . width ( ) - skip ) / 2 , ( st : : topBarHeight - _forward . height ( ) ) / 2 ) ; <nl> - _delete . move ( availX + ( availW + _forward . width ( ) - _delete . width ( ) + skip ) / 2 , ( st : : topBarHeight - _forward . height ( ) ) / 2 ) ; <nl> + if ( _forward . isHidden ( ) ) { <nl> + _delete . move ( availX + ( availW - _delete . width ( ) ) / 2 , ( st : : topBarHeight - _forward . height ( ) ) / 2 ) ; <nl> + } else if ( _delete . isHidden ( ) ) { <nl> + _forward . move ( availX + ( availW - _forward . width ( ) ) / 2 , ( st : : topBarHeight - _forward . height ( ) ) / 2 ) ; <nl> + } else { <nl> + _forward . move ( availX + ( availW - _forward . width ( ) - _delete . width ( ) - skip ) / 2 , ( st : : topBarHeight - _forward . height ( ) ) / 2 ) ; <nl> + _delete . move ( availX + ( availW + _forward . width ( ) - _delete . width ( ) + skip ) / 2 , ( st : : topBarHeight - _forward . height ( ) ) / 2 ) ; <nl> + } <nl> _clearSelection . move ( r - = _clearSelection . width ( ) , 0 ) ; <nl> } <nl> if ( ! _info . isHidden ( ) ) _info . move ( r - = _info . width ( ) , 0 ) ; <nl> void TopBarWidget : : showAll ( ) { <nl> if ( ! p & & _selCount ) { <nl> _clearSelection . show ( ) ; <nl> _delete . show ( ) ; <nl> - _forward . show ( ) ; <nl> + if ( ! _selPeer | | _selPeer - > isChannel ( ) ) { <nl> + _forward . hide ( ) ; <nl> + } else { <nl> + _forward . show ( ) ; <nl> + } <nl> _mediaType . hide ( ) ; <nl> } else { <nl> _clearSelection . hide ( ) ; <nl> void TopBarWidget : : showAll ( ) { <nl> <nl> void TopBarWidget : : showSelected ( uint32 selCount ) { <nl> PeerData * p = App : : main ( ) ? App : : main ( ) - > profilePeer ( ) : 0 ; <nl> + _selPeer = App : : main ( ) - > overviewPeer ( ) ? App : : main ( ) - > overviewPeer ( ) : App : : main ( ) - > peer ( ) ; <nl> _selCount = selCount ; <nl> _selStr = ( _selCount > 0 ) ? lng_selected_count ( lt_count , _selCount ) : QString ( ) ; <nl> _selStrWidth = st : : btnDefLink . font - > m . width ( _selStr ) ; <nl> void MainWidget : : sendPreparedText ( History * hist , const QString & text , MsgId repl <nl> media = MTP_messageMediaWebPage ( MTP_webPagePending ( MTP_long ( page - > id ) , MTP_int ( page - > pendingTill ) ) ) ; <nl> flags | = MTPDmessage : : flag_media ; <nl> } <nl> + bool fromChannelName = hist - > peer - > isChannel ( ) ; <nl> + if ( fromChannelName ) { <nl> + sendFlags | = MTPmessages_SendMessage_flag_broadcast ; <nl> + } else { <nl> + flags | = MTPDmessage : : flag_from_id ; <nl> + } <nl> MTPVector < MTPMessageEntity > localEntities = linksToMTP ( textParseLinks ( sendingText , itemTextParseOptions ( hist , App : : self ( ) ) . flags ) ) ; <nl> - hist - > addToBack ( MTP_message ( MTP_int ( flags ) , MTP_int ( newId . msg ) , MTP_int ( MTP : : authedId ( ) ) , peerToMTP ( hist - > peer - > id ) , MTPint ( ) , MTPint ( ) , MTP_int ( replyTo ) , MTP_int ( unixtime ( ) ) , msgText , media , MTPnullMarkup , localEntities ) ) ; <nl> + hist - > addToBack ( MTP_message ( MTP_int ( flags ) , MTP_int ( newId . msg ) , MTP_int ( fromChannelName ? 0 : MTP : : authedId ( ) ) , peerToMTP ( hist - > peer - > id ) , MTPint ( ) , MTPint ( ) , MTP_int ( replyTo ) , MTP_int ( unixtime ( ) ) , msgText , media , MTPnullMarkup , localEntities ) ) ; <nl> hist - > sendRequestId = MTP : : send ( MTPmessages_SendMessage ( MTP_int ( sendFlags ) , hist - > peer - > input , MTP_int ( replyTo ) , msgText , MTP_long ( randomId ) , MTPnullMarkup , localEntities ) , App : : main ( ) - > rpcDone ( & MainWidget : : sentUpdatesReceived , randomId ) , RPCFailHandlerPtr ( ) , 0 , 0 , hist - > sendRequestId ) ; <nl> } <nl> <nl> void MainWidget : : readServerHistory ( History * hist , bool force ) { <nl> if ( ! hist | | ( ! force & & ! hist - > unreadCount ) ) return ; <nl> <nl> ReadRequests : : const_iterator i = _readRequests . constFind ( hist - > peer ) ; <nl> + MsgId upTo = hist - > inboxRead ( 0 ) ; <nl> if ( i = = _readRequests . cend ( ) ) { <nl> - hist - > inboxRead ( 0 ) ; <nl> - _readRequests . insert ( hist - > peer , MTP : : send ( MTPmessages_ReadHistory ( hist - > peer - > input , MTP_int ( 0 ) , MTP_int ( 0 ) ) , rpcDone ( & MainWidget : : partWasRead , hist - > peer ) ) ) ; <nl> - } <nl> + sendReadRequest ( hist - > peer , upTo ) ; <nl> + } else { <nl> + ReadRequestsPending : : iterator i = _readRequestsPending . find ( hist - > peer ) ; <nl> + if ( i = = _readRequestsPending . cend ( ) ) { <nl> + _readRequestsPending . insert ( hist - > peer , upTo ) ; <nl> + } else if ( i . value ( ) < upTo ) { <nl> + i . value ( ) = upTo ; <nl> + } <nl> + } <nl> } <nl> <nl> uint64 MainWidget : : animActiveTime ( MsgId id ) const { <nl> void MainWidget : : photosLoaded ( History * h , const MTPmessages_Messages & msgs , mtpR <nl> if ( App : : wnd ( ) ) App : : wnd ( ) - > mediaOverviewUpdated ( h - > peer , type ) ; <nl> } <nl> <nl> + void MainWidget : : sendReadRequest ( PeerData * peer , MsgId upTo ) { <nl> + if ( ! MTP : : authedId ( ) ) return ; <nl> + if ( peer - > isChannel ( ) ) { <nl> + _readRequests . insert ( peer , MTP : : send ( MTPmessages_ReadChannelHistory ( peer - > input , MTP_int ( upTo ) ) , rpcDone ( & MainWidget : : channelWasRead , peer ) , rpcFail ( & MainWidget : : readRequestFail , peer ) ) ) ; <nl> + } else { <nl> + / / _readRequests . insert ( peer , MTP : : send ( MTPmessages_ReadHistory ( peer - > input , MTP_int ( upTo ) , MTP_int ( 0 ) ) , rpcDone ( & MainWidget : : partWasRead , peer ) , rpcFail ( & MainWidget : : readRequestFail , peer ) ) ) ; <nl> + } <nl> + } <nl> + <nl> + void MainWidget : : channelWasRead ( PeerData * peer , const MTPBool & result ) { <nl> + readRequestDone ( peer ) ; <nl> + } <nl> + <nl> void MainWidget : : partWasRead ( PeerData * peer , const MTPmessages_AffectedHistory & result ) { <nl> const MTPDmessages_affectedHistory & d ( result . c_messages_affectedHistory ( ) ) ; <nl> updPtsUpdated ( d . vpts . v , d . vpts_count . v ) ; <nl> <nl> int32 offset = d . voffset . v ; <nl> - if ( ! MTP : : authedId ( ) | | offset < = 0 ) { <nl> - _readRequests . remove ( peer ) ; <nl> + if ( ! MTP : : authedId ( ) | | offset < = 0 | | true ) { <nl> + readRequestDone ( peer ) ; <nl> } else { <nl> - _readRequests [ peer ] = MTP : : send ( MTPmessages_ReadHistory ( peer - > input , MTP_int ( 0 ) , MTP_int ( offset ) ) , rpcDone ( & MainWidget : : partWasRead , peer ) ) ; <nl> + / / _readRequests [ peer ] = MTP : : send ( MTPmessages_ReadHistory ( peer - > input , MTP_int ( upTo ) , MTP_int ( offset ) ) , rpcDone ( & MainWidget : : partWasRead , peer ) ) ; <nl> } <nl> } <nl> <nl> + bool MainWidget : : readRequestFail ( PeerData * peer , const RPCError & error ) { <nl> + if ( error . type ( ) . startsWith ( qsl ( " FLOOD_WAIT_ " ) ) ) return false ; <nl> + <nl> + readRequestDone ( peer ) ; <nl> + return false ; <nl> + } <nl> + <nl> + void MainWidget : : readRequestDone ( PeerData * peer ) { <nl> + _readRequests . remove ( peer ) ; <nl> + ReadRequestsPending : : iterator i = _readRequestsPending . find ( peer ) ; <nl> + if ( i ! = _readRequestsPending . cend ( ) ) { <nl> + sendReadRequest ( peer , i . value ( ) ) ; <nl> + _readRequestsPending . erase ( i ) ; <nl> + } <nl> + } <nl> + <nl> void MainWidget : : messagesAffected ( const MTPmessages_AffectedMessages & result ) { <nl> const MTPDmessages_affectedMessages & d ( result . c_messages_affectedMessages ( ) ) ; <nl> updPtsUpdated ( d . vpts . v , d . vpts_count . v ) ; <nl> void MainWidget : : showMediaOverview ( PeerData * peer , MediaOverviewType type , bool <nl> if ( overview ) { <nl> _stack . push_back ( new StackItemOverview ( overview - > peer ( ) , overview - > type ( ) , overview - > lastWidth ( ) , overview - > lastScrollTop ( ) ) ) ; <nl> } else if ( profile ) { <nl> - _stack . push_back ( new StackItemProfile ( profile - > peer ( ) , profile - > lastScrollTop ( ) , profile - > allMediaShown ( ) ) ) ; <nl> + _stack . push_back ( new StackItemProfile ( profile - > peer ( ) , profile - > lastScrollTop ( ) ) ) ; <nl> } else if ( history . peer ( ) ) { <nl> _peerInStack = history . peer ( ) ; <nl> _msgIdInStack = history . msgId ( ) ; <nl> void MainWidget : : showMediaOverview ( PeerData * peer , MediaOverviewType type , bool <nl> App : : wnd ( ) - > getTitle ( ) - > updateBackButton ( ) ; <nl> } <nl> <nl> - void MainWidget : : showPeerProfile ( PeerData * peer , bool back , int32 lastScrollTop , bool allMediaShown ) { <nl> + void MainWidget : : showPeerProfile ( PeerData * peer , bool back , int32 lastScrollTop ) { <nl> App : : wnd ( ) - > hideSettings ( ) ; <nl> if ( profile & & profile - > peer ( ) = = peer ) return ; <nl> <nl> void MainWidget : : showPeerProfile ( PeerData * peer , bool back , int32 lastScrollTop , <nl> if ( overview ) { <nl> _stack . push_back ( new StackItemOverview ( overview - > peer ( ) , overview - > type ( ) , overview - > lastWidth ( ) , overview - > lastScrollTop ( ) ) ) ; <nl> } else if ( profile ) { <nl> - _stack . push_back ( new StackItemProfile ( profile - > peer ( ) , profile - > lastScrollTop ( ) , profile - > allMediaShown ( ) ) ) ; <nl> + _stack . push_back ( new StackItemProfile ( profile - > peer ( ) , profile - > lastScrollTop ( ) ) ) ; <nl> } else { <nl> _peerInStack = history . peer ( ) ; <nl> _msgIdInStack = history . msgId ( ) ; <nl> void MainWidget : : showPeerProfile ( PeerData * peer , bool back , int32 lastScrollTop , <nl> profile = new ProfileWidget ( this , peer ) ; <nl> _topBar . show ( ) ; <nl> resizeEvent ( 0 ) ; <nl> - profile - > animShow ( animCache , animTopBarCache , back , lastScrollTop , allMediaShown ) ; <nl> + profile - > animShow ( animCache , animTopBarCache , back , lastScrollTop ) ; <nl> history . animStop ( ) ; <nl> if ( back ) clearBotStartToken ( history . peer ( ) ) ; <nl> history . showPeerHistory ( 0 , 0 ) ; <nl> void MainWidget : : showBackFromStack ( ) { <nl> if ( histItem - > kbWasHidden ) history . setKbWasHidden ( ) ; <nl> } else if ( item - > type ( ) = = ProfileStackItem ) { <nl> StackItemProfile * profItem = static_cast < StackItemProfile * > ( item ) ; <nl> - showPeerProfile ( profItem - > peer , true , profItem - > lastScrollTop , profItem - > allMediaShown ) ; <nl> + showPeerProfile ( profItem - > peer , true , profItem - > lastScrollTop ) ; <nl> } else if ( item - > type ( ) = = OverviewStackItem ) { <nl> StackItemOverview * overItem = static_cast < StackItemOverview * > ( item ) ; <nl> showMediaOverview ( overItem - > peer , overItem - > mediaType , true , overItem - > lastScrollTop ) ; <nl> void MainWidget : : openLocalUrl ( const QString & url ) { <nl> QRegularExpressionMatch m = QRegularExpression ( qsl ( " ^ tg : / / resolve / ? \ \ ? domain = ( [ a - zA - Z0 - 9 \ \ . \ \ _ ] + ) ( & ( start | startgroup ) = ( [ a - zA - Z0 - 9 \ \ . \ \ _ \ \ - ] + ) ) ? ( & | $ ) " ) , QRegularExpression : : CaseInsensitiveOption ) . match ( u ) ; <nl> if ( m . hasMatch ( ) ) { <nl> QString start = m . captured ( 3 ) , startToken = m . captured ( 4 ) ; <nl> - openUserByName ( m . captured ( 1 ) , ( start = = qsl ( " startgroup " ) ) , startToken ) ; <nl> + openPeerByName ( m . captured ( 1 ) , ( start = = qsl ( " startgroup " ) ) , startToken ) ; <nl> } <nl> } else if ( u . startsWith ( qstr ( " tg : / / join " ) , Qt : : CaseInsensitive ) ) { <nl> QRegularExpressionMatch m = QRegularExpression ( qsl ( " ^ tg : / / join / ? \ \ ? invite = ( [ a - zA - Z0 - 9 \ \ . \ \ _ \ \ - ] + ) ( & | $ ) " ) , QRegularExpression : : CaseInsensitiveOption ) . match ( u ) ; <nl> void MainWidget : : openLocalUrl ( const QString & url ) { <nl> } <nl> } <nl> <nl> - void MainWidget : : openUserByName ( const QString & username , bool toProfile , const QString & startToken ) { <nl> + void MainWidget : : openPeerByName ( const QString & username , bool toProfile , const QString & startToken ) { <nl> App : : wnd ( ) - > hideMediaview ( ) ; <nl> <nl> - UserData * user = App : : userByName ( username ) ; <nl> - if ( user ) { <nl> + PeerData * peer = App : : peerByName ( username ) ; <nl> + if ( peer ) { <nl> if ( toProfile ) { <nl> - if ( user - > botInfo & & ! user - > botInfo - > cantJoinGroups & & ! startToken . isEmpty ( ) ) { <nl> - user - > botInfo - > startGroupToken = startToken ; <nl> - App : : wnd ( ) - > showLayer ( new ContactsBox ( user ) ) ; <nl> + if ( peer - > isUser ( ) & & peer - > asUser ( ) - > botInfo & & ! peer - > asUser ( ) - > botInfo - > cantJoinGroups & & ! startToken . isEmpty ( ) ) { <nl> + peer - > asUser ( ) - > botInfo - > startGroupToken = startToken ; <nl> + App : : wnd ( ) - > showLayer ( new ContactsBox ( peer - > asUser ( ) ) ) ; <nl> } else { <nl> - showPeerProfile ( user ) ; <nl> + showPeerProfile ( peer ) ; <nl> } <nl> } else { <nl> - if ( user - > botInfo ) { <nl> - user - > botInfo - > startToken = startToken ; <nl> - if ( user = = history . peer ( ) ) { <nl> + if ( peer - > isUser ( ) & & peer - > asUser ( ) - > botInfo ) { <nl> + peer - > asUser ( ) - > botInfo - > startToken = startToken ; <nl> + if ( peer = = history . peer ( ) ) { <nl> history . updateControlsVisibility ( ) ; <nl> history . resizeEvent ( 0 ) ; <nl> } <nl> } <nl> - emit showPeerAsync ( user - > id , 0 ) ; <nl> + emit showPeerAsync ( peer - > id , 0 ) ; <nl> } <nl> } else { <nl> MTP : : send ( MTPcontacts_ResolveUsername ( MTP_string ( username ) ) , rpcDone ( & MainWidget : : usernameResolveDone , qMakePair ( toProfile , startToken ) ) , rpcFail ( & MainWidget : : usernameResolveFail , username ) ) ; <nl> void MainWidget : : onStickersInstalled ( uint64 setId ) { <nl> history . stickersInstalled ( setId ) ; <nl> } <nl> <nl> - void MainWidget : : usernameResolveDone ( QPair < bool , QString > toProfileStartToken , const MTPUser & result ) { <nl> + void MainWidget : : usernameResolveDone ( QPair < bool , QString > toProfileStartToken , const MTPcontacts_ResolvedPeer & result ) { <nl> App : : wnd ( ) - > hideLayer ( ) ; <nl> - UserData * user = App : : feedUsers ( MTP_vector < MTPUser > ( 1 , result ) ) ; <nl> + if ( result . type ( ) ! = mtpc_contacts_resolvedPeer ) return ; <nl> + <nl> + const MTPDcontacts_resolvedPeer & d ( result . c_contacts_resolvedPeer ( ) ) ; <nl> + App : : feedUsers ( d . vusers ) ; <nl> + App : : feedChats ( d . vchats ) ; <nl> + PeerId peerId = peerFromMTP ( d . vpeer ) ; <nl> + if ( ! peerId ) return ; <nl> + <nl> + PeerData * peer = App : : peer ( peerId ) ; <nl> if ( toProfileStartToken . first ) { <nl> - if ( user - > botInfo & & ! user - > botInfo - > cantJoinGroups & & ! toProfileStartToken . second . isEmpty ( ) ) { <nl> - user - > botInfo - > startGroupToken = toProfileStartToken . second ; <nl> - App : : wnd ( ) - > showLayer ( new ContactsBox ( user ) ) ; <nl> + if ( peer - > isUser ( ) & & peer - > asUser ( ) - > botInfo & & ! peer - > asUser ( ) - > botInfo - > cantJoinGroups & & ! toProfileStartToken . second . isEmpty ( ) ) { <nl> + peer - > asUser ( ) - > botInfo - > startGroupToken = toProfileStartToken . second ; <nl> + App : : wnd ( ) - > showLayer ( new ContactsBox ( peer - > asUser ( ) ) ) ; <nl> } else { <nl> - showPeerProfile ( user ) ; <nl> + showPeerProfile ( peer ) ; <nl> } <nl> } else { <nl> - if ( user - > botInfo ) { <nl> - user - > botInfo - > startToken = toProfileStartToken . second ; <nl> - if ( user = = history . peer ( ) ) { <nl> + if ( peer - > isUser ( ) & & peer - > asUser ( ) - > botInfo ) { <nl> + peer - > asUser ( ) - > botInfo - > startToken = toProfileStartToken . second ; <nl> + if ( peer = = history . peer ( ) ) { <nl> history . updateControlsVisibility ( ) ; <nl> history . resizeEvent ( 0 ) ; <nl> } <nl> } <nl> - showPeerHistory ( user - > id , ShowAtUnreadMsgId ) ; <nl> + showPeerHistory ( peer - > id , ShowAtUnreadMsgId ) ; <nl> } <nl> } <nl> <nl> void MainWidget : : feedUpdate ( const MTPUpdate & update ) { <nl> } <nl> } break ; <nl> <nl> - case mtpc_updateNewChannelMessage : { <nl> - const MTPDupdateNewChannelMessage & d ( update . c_updateNewChannelMessage ( ) ) ; <nl> - / / if ( ! updPtsUpdated ( d . vpts . v , d . vpts_count . v ) ) { / / CHANNELS_TODO <nl> - / / _byPtsUpdate . insert ( ptsKey ( SkippedUpdate ) , update ) ; <nl> - / / return ; <nl> - / / } <nl> - if ( d . vmessage . type ( ) = = mtpc_message ) { / / index forwarded messages to links overview <nl> - App : : checkEntitiesUpdate ( d . vmessage . c_message ( ) ) ; <nl> - } <nl> - <nl> - HistoryItem * item = App : : histories ( ) . addToBack ( d . vmessage ) ; <nl> - if ( item ) { <nl> - history . peerMessagesUpdated ( item - > history ( ) - > peer - > id ) ; <nl> - } <nl> - } break ; <nl> - <nl> case mtpc_updateMessageID : { <nl> const MTPDupdateMessageID & d ( update . c_updateMessageID ( ) ) ; <nl> FullMsgId msg = App : : histItemByRandom ( d . vrandom_id . v ) ; <nl> void MainWidget : : feedUpdate ( const MTPUpdate & update ) { <nl> case mtpc_updatePrivacy : { <nl> const MTPDupdatePrivacy & d ( update . c_updatePrivacy ( ) ) ; <nl> } break ; <nl> + <nl> + case mtpc_updateNewChannelMessage : { <nl> + const MTPDupdateNewChannelMessage & d ( update . c_updateNewChannelMessage ( ) ) ; <nl> + / / if ( ! updPtsUpdated ( d . vpts . v , d . vpts_count . v ) ) { / / CHANNELS_TODO <nl> + / / _byPtsUpdate . insert ( ptsKey ( SkippedUpdate ) , update ) ; <nl> + / / return ; <nl> + / / } <nl> + if ( d . vmessage . type ( ) = = mtpc_message ) { / / index forwarded messages to links overview <nl> + App : : checkEntitiesUpdate ( d . vmessage . c_message ( ) ) ; <nl> + } <nl> + <nl> + HistoryItem * item = App : : histories ( ) . addToBack ( d . vmessage ) ; <nl> + if ( item ) { <nl> + history . peerMessagesUpdated ( item - > history ( ) - > peer - > id ) ; <nl> + } <nl> + } break ; <nl> + <nl> + case mtpc_updateReadChannelInbox : { <nl> + const MTPDupdateReadChannelInbox & d ( update . c_updateReadChannelInbox ( ) ) ; <nl> + / / if ( ! updPtsUpdated ( d . vpts . v , d . vpts_count . v ) ) { / / CHANNELS_TODO <nl> + / / _byPtsUpdate . insert ( ptsKey ( SkippedUpdate ) , update ) ; <nl> + / / return ; <nl> + / / } <nl> + App : : feedInboxRead ( peerFromMTP ( d . vpeer ) , d . vmax_id . v ) ; <nl> + } break ; <nl> + <nl> + case mtpc_updateDeleteChannelMessages : { <nl> + const MTPDupdateDeleteChannelMessages & d ( update . c_updateDeleteChannelMessages ( ) ) ; <nl> + / / if ( ! updPtsUpdated ( d . vpts . v , d . vpts_count . v ) ) { / / CHANNELS_TODO <nl> + / / _byPtsUpdate . insert ( ptsKey ( SkippedUpdate ) , update ) ; <nl> + / / return ; <nl> + / / } <nl> + App : : feedWereDeleted ( peerToChannel ( peerFromMTP ( d . vpeer ) ) , d . vmessages . c_vector ( ) . v ) ; <nl> + history . peerMessagesUpdated ( ) ; <nl> + } break ; <nl> + <nl> + case mtpc_updateChannelGroup : { <nl> + const MTPDupdateChannelGroup & d ( update . c_updateChannelGroup ( ) ) ; <nl> + } break ; <nl> + <nl> + case mtpc_updateChannelTooLong : { <nl> + const MTPDupdateChannelTooLong & d ( update . c_updateChannelTooLong ( ) ) ; <nl> + } break ; <nl> + <nl> } <nl> } <nl> mmm a / Telegram / SourceFiles / mainwidget . h <nl> ppp b / Telegram / SourceFiles / mainwidget . h <nl> public slots : <nl> anim : : fvalue a_over ; <nl> bool _drawShadow ; <nl> <nl> + PeerData * _selPeer ; <nl> uint32 _selCount ; <nl> QString _selStr ; <nl> int32 _selStrLeft , _selStrWidth ; <nl> msgId ( msgId ) , replyReturns ( replyReturns ) , kbWasHidden ( kbWasHidden ) { <nl> <nl> class StackItemProfile : public StackItem { <nl> public : <nl> - StackItemProfile ( PeerData * peer , int32 lastScrollTop , bool allMediaShown ) : StackItem ( peer ) , lastScrollTop ( lastScrollTop ) , allMediaShown ( allMediaShown ) { <nl> + StackItemProfile ( PeerData * peer , int32 lastScrollTop ) : StackItem ( peer ) , lastScrollTop ( lastScrollTop ) { <nl> } <nl> StackItemType type ( ) const { <nl> return ProfileStackItem ; <nl> } <nl> int32 lastScrollTop ; <nl> - bool allMediaShown ; <nl> } ; <nl> <nl> class StackItemOverview : public StackItem { <nl> class MainWidget : public QWidget , public Animated , public RPCSender { <nl> void start ( const MTPUser & user ) ; <nl> <nl> void openLocalUrl ( const QString & str ) ; <nl> - void openUserByName ( const QString & name , bool toProfile = false , const QString & startToken = QString ( ) ) ; <nl> + void openPeerByName ( const QString & name , bool toProfile = false , const QString & startToken = QString ( ) ) ; <nl> void joinGroupByHash ( const QString & hash ) ; <nl> void stickersBox ( const MTPInputStickerSet & set ) ; <nl> <nl> class MainWidget : public QWidget , public Animated , public RPCSender { <nl> PeerData * profilePeer ( ) ; <nl> PeerData * overviewPeer ( ) ; <nl> bool mediaTypeSwitch ( ) ; <nl> - void showPeerProfile ( PeerData * peer , bool back = false , int32 lastScrollTop = - 1 , bool allMediaShown = false ) ; <nl> + void showPeerProfile ( PeerData * peer , bool back = false , int32 lastScrollTop = - 1 ) ; <nl> void showMediaOverview ( PeerData * peer , MediaOverviewType type , bool back = false , int32 lastScrollTop = - 1 ) ; <nl> void showBackFromStack ( ) ; <nl> void orderWidgets ( ) ; <nl> class MainWidget : public QWidget , public Animated , public RPCSender { <nl> void peerNameChanged ( PeerData * peer , const PeerData : : Names & oldNames , const PeerData : : NameFirstChars & oldChars ) ; <nl> void peerPhotoChanged ( PeerData * peer ) ; <nl> void dialogRowReplaced ( DialogRow * oldRow , DialogRow * newRow ) ; <nl> - void dialogToTop ( const History : : DialogLinks & links ) ; <nl> void dialogsUpdated ( ) ; <nl> void showPeerAsync ( quint64 peerId , qint32 showAtMsgId ) ; <nl> void stickersUpdated ( ) ; <nl> public slots : <nl> <nl> private : <nl> <nl> + void sendReadRequest ( PeerData * peer , MsgId upTo ) ; <nl> + void channelWasRead ( PeerData * peer , const MTPBool & result ) ; <nl> void partWasRead ( PeerData * peer , const MTPmessages_AffectedHistory & result ) ; <nl> + bool readRequestFail ( PeerData * peer , const RPCError & error ) ; <nl> + void readRequestDone ( PeerData * peer ) ; <nl> + <nl> void messagesAffected ( const MTPmessages_AffectedMessages & result ) ; <nl> void photosLoaded ( History * h , const MTPmessages_Messages & msgs , mtpRequestId req ) ; <nl> <nl> public slots : <nl> void handleUpdates ( const MTPUpdates & updates , uint64 randomId = 0 ) ; <nl> bool updateFail ( const RPCError & e ) ; <nl> <nl> - void usernameResolveDone ( QPair < bool , QString > toProfileStartToken , const MTPUser & result ) ; <nl> + void usernameResolveDone ( QPair < bool , QString > toProfileStartToken , const MTPcontacts_ResolvedPeer & result ) ; <nl> bool usernameResolveFail ( QString name , const RPCError & error ) ; <nl> <nl> void inviteCheckDone ( QString hash , const MTPChatInvite & invite ) ; <nl> public slots : <nl> <nl> typedef QMap < PeerData * , mtpRequestId > ReadRequests ; <nl> ReadRequests _readRequests ; <nl> + typedef QMap < PeerData * , MsgId > ReadRequestsPending ; <nl> + ReadRequestsPending _readRequestsPending ; <nl> <nl> typedef QMap < PeerData * , mtpRequestId > OverviewsPreload ; <nl> OverviewsPreload _overviewPreload [ OverviewCount ] , _overviewLoad [ OverviewCount ] ; <nl> mmm a / Telegram / SourceFiles / mediaview . cpp <nl> ppp b / Telegram / SourceFiles / mediaview . cpp <nl> void MediaView : : updateDropdown ( ) { <nl> _btnShowInFolder - > setVisible ( _doc & & ! _doc - > already ( true ) . isEmpty ( ) ) ; <nl> _btnSaveAs - > setVisible ( true ) ; <nl> _btnCopy - > setVisible ( ( _doc & & ! _current . isNull ( ) ) | | ( _photo & & _photo - > full - > loaded ( ) ) ) ; <nl> - _btnForward - > setVisible ( _msgid > 0 ) ; <nl> + _btnForward - > setVisible ( _msgid > 0 & & ! _channel ) ; <nl> _btnDelete - > setVisible ( _msgid > 0 | | ( _photo & & App : : self ( ) & & App : : self ( ) - > photoId = = _photo - > id ) | | ( _photo & & _photo - > peer & & _photo - > peer - > photoId = = _photo - > id ) ) ; <nl> _btnViewAll - > setVisible ( ( _overview ! = OverviewCount ) & & _history ) ; <nl> _btnViewAll - > setText ( lang ( _doc ? lng_mediaview_files_all : lng_mediaview_photos_all ) ) ; <nl> mmm a / Telegram / SourceFiles / mtproto / mtpConnection . h <nl> ppp b / Telegram / SourceFiles / mtproto / mtpConnection . h <nl> enum { <nl> MTPDmessage_flag_HAS_TEXT_LINKS = ( 1 < < 31 ) , / / client side flag for having links <nl> <nl> MTPmessages_SendMessage_flag_skipWebPage = ( 1 < < 1 ) , <nl> + MTPmessages_SendMessage_flag_broadcast = ( 1 < < 4 ) , <nl> <nl> MTPDdcOption_flag_ipv6 = ( 1 < < 0 ) , <nl> MTPDdcOption_flag_files = ( 1 < < 1 ) , <nl> enum { <nl> MTPupdates_ChannelDifference_flag_final = ( 1 < < 0 ) , <nl> <nl> MTPDchannelMessagesFilter_flag_only_important = ( 1 < < 0 ) , <nl> + <nl> + MTPmessages_CreateChannel_flag_broadcast = ( 1 < < 0 ) , <nl> } ; <nl> <nl> static const MTPReplyMarkup MTPnullMarkup = MTP_replyKeyboardMarkup ( MTP_int ( 0 ) , MTP_vector < MTPKeyboardButtonRow > ( 0 ) ) ; <nl> mmm a / Telegram / SourceFiles / mtproto / mtpScheme . cpp <nl> ppp b / Telegram / SourceFiles / mtproto / mtpScheme . cpp <nl> void mtpTextSerializeType ( MTPStringLogger & to , const mtpPrime * & from , const mtpP <nl> case 1 : to . add ( " id : " ) ; + + stages . back ( ) ; types . push_back ( mtpc_int ) ; vtypes . push_back ( 0 ) ; stages . push_back ( 0 ) ; flags . push_back ( 0 ) ; break ; <nl> case 2 : to . add ( " access_hash : " ) ; + + stages . back ( ) ; types . push_back ( mtpc_long ) ; vtypes . push_back ( 0 ) ; stages . push_back ( 0 ) ; flags . push_back ( 0 ) ; break ; <nl> case 3 : to . add ( " title : " ) ; + + stages . back ( ) ; types . push_back ( mtpc_string ) ; vtypes . push_back ( 0 ) ; stages . push_back ( 0 ) ; flags . push_back ( 0 ) ; break ; <nl> - case 4 : to . add ( " photo : " ) ; + + stages . back ( ) ; types . push_back ( 0 ) ; vtypes . push_back ( 0 ) ; stages . push_back ( 0 ) ; flags . push_back ( 0 ) ; break ; <nl> - case 5 : to . add ( " date : " ) ; + + stages . back ( ) ; types . push_back ( mtpc_int ) ; vtypes . push_back ( 0 ) ; stages . push_back ( 0 ) ; flags . push_back ( 0 ) ; break ; <nl> - case 6 : to . add ( " version : " ) ; + + stages . back ( ) ; types . push_back ( mtpc_int ) ; vtypes . push_back ( 0 ) ; stages . push_back ( 0 ) ; flags . push_back ( 0 ) ; break ; <nl> + case 4 : to . add ( " username : " ) ; + + stages . back ( ) ; if ( flag & MTPDchannel : : flag_username ) { types . push_back ( mtpc_string ) ; vtypes . push_back ( 0 ) ; stages . push_back ( 0 ) ; flags . push_back ( 0 ) ; } else { to . add ( " [ SKIPPED BY BIT 2 IN FIELD flags ] " ) ; } break ; <nl> + case 5 : to . add ( " photo : " ) ; + + stages . back ( ) ; types . push_back ( 0 ) ; vtypes . push_back ( 0 ) ; stages . push_back ( 0 ) ; flags . push_back ( 0 ) ; break ; <nl> + case 6 : to . add ( " date : " ) ; + + stages . back ( ) ; types . push_back ( mtpc_int ) ; vtypes . push_back ( 0 ) ; stages . push_back ( 0 ) ; flags . push_back ( 0 ) ; break ; <nl> + case 7 : to . add ( " version : " ) ; + + stages . back ( ) ; types . push_back ( mtpc_int ) ; vtypes . push_back ( 0 ) ; stages . push_back ( 0 ) ; flags . push_back ( 0 ) ; break ; <nl> default : to . add ( " } " ) ; types . pop_back ( ) ; vtypes . pop_back ( ) ; stages . pop_back ( ) ; flags . pop_back ( ) ; break ; <nl> } <nl> break ; <nl> void mtpTextSerializeType ( MTPStringLogger & to , const mtpPrime * & from , const mtpP <nl> } <nl> switch ( stage ) { <nl> case 0 : to . add ( " id : " ) ; + + stages . back ( ) ; types . push_back ( mtpc_int ) ; vtypes . push_back ( 0 ) ; stages . push_back ( 0 ) ; flags . push_back ( 0 ) ; break ; <nl> - case 1 : to . add ( " read_inbox_max_id : " ) ; + + stages . back ( ) ; types . push_back ( mtpc_int ) ; vtypes . push_back ( 0 ) ; stages . push_back ( 0 ) ; flags . push_back ( 0 ) ; break ; <nl> - case 2 : to . add ( " unread_count : " ) ; + + stages . back ( ) ; types . push_back ( mtpc_int ) ; vtypes . push_back ( 0 ) ; stages . push_back ( 0 ) ; flags . push_back ( 0 ) ; break ; <nl> - case 3 : to . add ( " unread_important_count : " ) ; + + stages . back ( ) ; types . push_back ( mtpc_int ) ; vtypes . push_back ( 0 ) ; stages . push_back ( 0 ) ; flags . push_back ( 0 ) ; break ; <nl> - case 4 : to . add ( " inviter_id : " ) ; + + stages . back ( ) ; types . push_back ( mtpc_int ) ; vtypes . push_back ( 0 ) ; stages . push_back ( 0 ) ; flags . push_back ( 0 ) ; break ; <nl> - case 5 : to . add ( " invite_date : " ) ; + + stages . back ( ) ; types . push_back ( mtpc_int ) ; vtypes . push_back ( 0 ) ; stages . push_back ( 0 ) ; flags . push_back ( 0 ) ; break ; <nl> - case 6 : to . add ( " chat_photo : " ) ; + + stages . back ( ) ; types . push_back ( 0 ) ; vtypes . push_back ( 0 ) ; stages . push_back ( 0 ) ; flags . push_back ( 0 ) ; break ; <nl> - case 7 : to . add ( " notify_settings : " ) ; + + stages . back ( ) ; types . push_back ( 0 ) ; vtypes . push_back ( 0 ) ; stages . push_back ( 0 ) ; flags . push_back ( 0 ) ; break ; <nl> - case 8 : to . add ( " exported_invite : " ) ; + + stages . back ( ) ; types . push_back ( 0 ) ; vtypes . push_back ( 0 ) ; stages . push_back ( 0 ) ; flags . push_back ( 0 ) ; break ; <nl> + case 1 : to . add ( " about : " ) ; + + stages . back ( ) ; types . push_back ( mtpc_string ) ; vtypes . push_back ( 0 ) ; stages . push_back ( 0 ) ; flags . push_back ( 0 ) ; break ; <nl> + case 2 : to . add ( " read_inbox_max_id : " ) ; + + stages . back ( ) ; types . push_back ( mtpc_int ) ; vtypes . push_back ( 0 ) ; stages . push_back ( 0 ) ; flags . push_back ( 0 ) ; break ; <nl> + case 3 : to . add ( " unread_count : " ) ; + + stages . back ( ) ; types . push_back ( mtpc_int ) ; vtypes . push_back ( 0 ) ; stages . push_back ( 0 ) ; flags . push_back ( 0 ) ; break ; <nl> + case 4 : to . add ( " unread_important_count : " ) ; + + stages . back ( ) ; types . push_back ( mtpc_int ) ; vtypes . push_back ( 0 ) ; stages . push_back ( 0 ) ; flags . push_back ( 0 ) ; break ; <nl> + case 5 : to . add ( " inviter_id : " ) ; + + stages . back ( ) ; types . push_back ( mtpc_int ) ; vtypes . push_back ( 0 ) ; stages . push_back ( 0 ) ; flags . push_back ( 0 ) ; break ; <nl> + case 6 : to . add ( " invite_date : " ) ; + + stages . back ( ) ; types . push_back ( mtpc_int ) ; vtypes . push_back ( 0 ) ; stages . push_back ( 0 ) ; flags . push_back ( 0 ) ; break ; <nl> + case 7 : to . add ( " chat_photo : " ) ; + + stages . back ( ) ; types . push_back ( 0 ) ; vtypes . push_back ( 0 ) ; stages . push_back ( 0 ) ; flags . push_back ( 0 ) ; break ; <nl> + case 8 : to . add ( " notify_settings : " ) ; + + stages . back ( ) ; types . push_back ( 0 ) ; vtypes . push_back ( 0 ) ; stages . push_back ( 0 ) ; flags . push_back ( 0 ) ; break ; <nl> + case 9 : to . add ( " exported_invite : " ) ; + + stages . back ( ) ; types . push_back ( 0 ) ; vtypes . push_back ( 0 ) ; stages . push_back ( 0 ) ; flags . push_back ( 0 ) ; break ; <nl> default : to . add ( " } " ) ; types . pop_back ( ) ; vtypes . pop_back ( ) ; stages . pop_back ( ) ; flags . pop_back ( ) ; break ; <nl> } <nl> break ; <nl> void mtpTextSerializeType ( MTPStringLogger & to , const mtpPrime * & from , const mtpP <nl> to . add ( " { sendMessageChooseContactAction } " ) ; types . pop_back ( ) ; vtypes . pop_back ( ) ; stages . pop_back ( ) ; flags . pop_back ( ) ; <nl> break ; <nl> <nl> - case mtpc_contactFound : <nl> - if ( stage ) { <nl> - to . add ( " , \ n " ) . addSpaces ( lev ) ; <nl> - } else { <nl> - to . add ( " { contactFound " ) ; <nl> - to . add ( " \ n " ) . addSpaces ( lev ) ; <nl> - } <nl> - switch ( stage ) { <nl> - case 0 : to . add ( " user_id : " ) ; + + stages . back ( ) ; types . push_back ( mtpc_int ) ; vtypes . push_back ( 0 ) ; stages . push_back ( 0 ) ; flags . push_back ( 0 ) ; break ; <nl> - default : to . add ( " } " ) ; types . pop_back ( ) ; vtypes . pop_back ( ) ; stages . pop_back ( ) ; flags . pop_back ( ) ; break ; <nl> - } <nl> - break ; <nl> - <nl> case mtpc_contacts_found : <nl> if ( stage ) { <nl> to . add ( " , \ n " ) . addSpaces ( lev ) ; <nl> void mtpTextSerializeType ( MTPStringLogger & to , const mtpPrime * & from , const mtpP <nl> } <nl> switch ( stage ) { <nl> case 0 : to . add ( " results : " ) ; + + stages . back ( ) ; types . push_back ( 00 ) ; vtypes . push_back ( 0 ) ; stages . push_back ( 0 ) ; flags . push_back ( 0 ) ; break ; <nl> - case 1 : to . add ( " users : " ) ; + + stages . back ( ) ; types . push_back ( 00 ) ; vtypes . push_back ( 0 ) ; stages . push_back ( 0 ) ; flags . push_back ( 0 ) ; break ; <nl> + case 1 : to . add ( " chats : " ) ; + + stages . back ( ) ; types . push_back ( 00 ) ; vtypes . push_back ( 0 ) ; stages . push_back ( 0 ) ; flags . push_back ( 0 ) ; break ; <nl> + case 2 : to . add ( " users : " ) ; + + stages . back ( ) ; types . push_back ( 00 ) ; vtypes . push_back ( 0 ) ; stages . push_back ( 0 ) ; flags . push_back ( 0 ) ; break ; <nl> default : to . add ( " } " ) ; types . pop_back ( ) ; vtypes . pop_back ( ) ; stages . pop_back ( ) ; flags . pop_back ( ) ; break ; <nl> } <nl> break ; <nl> void mtpTextSerializeType ( MTPStringLogger & to , const mtpPrime * & from , const mtpP <nl> to . add ( " { channelMessagesFilterCollapsed } " ) ; types . pop_back ( ) ; vtypes . pop_back ( ) ; stages . pop_back ( ) ; flags . pop_back ( ) ; <nl> break ; <nl> <nl> + case mtpc_contacts_resolvedPeer : <nl> + if ( stage ) { <nl> + to . add ( " , \ n " ) . addSpaces ( lev ) ; <nl> + } else { <nl> + to . add ( " { contacts_resolvedPeer " ) ; <nl> + to . add ( " \ n " ) . addSpaces ( lev ) ; <nl> + } <nl> + switch ( stage ) { <nl> + case 0 : to . add ( " peer : " ) ; + + stages . back ( ) ; types . push_back ( 0 ) ; vtypes . push_back ( 0 ) ; stages . push_back ( 0 ) ; flags . push_back ( 0 ) ; break ; <nl> + case 1 : to . add ( " chats : " ) ; + + stages . back ( ) ; types . push_back ( 00 ) ; vtypes . push_back ( 0 ) ; stages . push_back ( 0 ) ; flags . push_back ( 0 ) ; break ; <nl> + case 2 : to . add ( " users : " ) ; + + stages . back ( ) ; types . push_back ( 00 ) ; vtypes . push_back ( 0 ) ; stages . push_back ( 0 ) ; flags . push_back ( 0 ) ; break ; <nl> + default : to . add ( " } " ) ; types . pop_back ( ) ; vtypes . pop_back ( ) ; stages . pop_back ( ) ; flags . pop_back ( ) ; break ; <nl> + } <nl> + break ; <nl> + <nl> case mtpc_req_pq : <nl> if ( stage ) { <nl> to . add ( " , \ n " ) . addSpaces ( lev ) ; <nl> void mtpTextSerializeType ( MTPStringLogger & to , const mtpPrime * & from , const mtpP <nl> } <nl> break ; <nl> <nl> + case mtpc_messages_editChatAbout : <nl> + if ( stage ) { <nl> + to . add ( " , \ n " ) . addSpaces ( lev ) ; <nl> + } else { <nl> + to . add ( " { messages_editChatAbout " ) ; <nl> + to . add ( " \ n " ) . addSpaces ( lev ) ; <nl> + } <nl> + switch ( stage ) { <nl> + case 0 : to . add ( " chat_id : " ) ; + + stages . back ( ) ; types . push_back ( 0 ) ; vtypes . push_back ( 0 ) ; stages . push_back ( 0 ) ; flags . push_back ( 0 ) ; break ; <nl> + case 1 : to . add ( " about : " ) ; + + stages . back ( ) ; types . push_back ( mtpc_string ) ; vtypes . push_back ( 0 ) ; stages . push_back ( 0 ) ; flags . push_back ( 0 ) ; break ; <nl> + default : to . add ( " } " ) ; types . pop_back ( ) ; vtypes . pop_back ( ) ; stages . pop_back ( ) ; flags . pop_back ( ) ; break ; <nl> + } <nl> + break ; <nl> + <nl> + case mtpc_messages_checkChannelUsername : <nl> + if ( stage ) { <nl> + to . add ( " , \ n " ) . addSpaces ( lev ) ; <nl> + } else { <nl> + to . add ( " { messages_checkChannelUsername " ) ; <nl> + to . add ( " \ n " ) . addSpaces ( lev ) ; <nl> + } <nl> + switch ( stage ) { <nl> + case 0 : to . add ( " chat_id : " ) ; + + stages . back ( ) ; types . push_back ( 0 ) ; vtypes . push_back ( 0 ) ; stages . push_back ( 0 ) ; flags . push_back ( 0 ) ; break ; <nl> + case 1 : to . add ( " username : " ) ; + + stages . back ( ) ; types . push_back ( mtpc_string ) ; vtypes . push_back ( 0 ) ; stages . push_back ( 0 ) ; flags . push_back ( 0 ) ; break ; <nl> + default : to . add ( " } " ) ; types . pop_back ( ) ; vtypes . pop_back ( ) ; stages . pop_back ( ) ; flags . pop_back ( ) ; break ; <nl> + } <nl> + break ; <nl> + <nl> + case mtpc_messages_updateChannelUsername : <nl> + if ( stage ) { <nl> + to . add ( " , \ n " ) . addSpaces ( lev ) ; <nl> + } else { <nl> + to . add ( " { messages_updateChannelUsername " ) ; <nl> + to . add ( " \ n " ) . addSpaces ( lev ) ; <nl> + } <nl> + switch ( stage ) { <nl> + case 0 : to . add ( " chat_id : " ) ; + + stages . back ( ) ; types . push_back ( 0 ) ; vtypes . push_back ( 0 ) ; stages . push_back ( 0 ) ; flags . push_back ( 0 ) ; break ; <nl> + case 1 : to . add ( " username : " ) ; + + stages . back ( ) ; types . push_back ( mtpc_string ) ; vtypes . push_back ( 0 ) ; stages . push_back ( 0 ) ; flags . push_back ( 0 ) ; break ; <nl> + default : to . add ( " } " ) ; types . pop_back ( ) ; vtypes . pop_back ( ) ; stages . pop_back ( ) ; flags . pop_back ( ) ; break ; <nl> + } <nl> + break ; <nl> + <nl> case mtpc_upload_saveFilePart : <nl> if ( stage ) { <nl> to . add ( " , \ n " ) . addSpaces ( lev ) ; <nl> void mtpTextSerializeType ( MTPStringLogger & to , const mtpPrime * & from , const mtpP <nl> } <nl> break ; <nl> <nl> - case mtpc_contacts_resolveUsername : <nl> - if ( stage ) { <nl> - to . add ( " , \ n " ) . addSpaces ( lev ) ; <nl> - } else { <nl> - to . add ( " { contacts_resolveUsername " ) ; <nl> - to . add ( " \ n " ) . addSpaces ( lev ) ; <nl> - } <nl> - switch ( stage ) { <nl> - case 0 : to . add ( " username : " ) ; + + stages . back ( ) ; types . push_back ( mtpc_string ) ; vtypes . push_back ( 0 ) ; stages . push_back ( 0 ) ; flags . push_back ( 0 ) ; break ; <nl> - default : to . add ( " } " ) ; types . pop_back ( ) ; vtypes . pop_back ( ) ; stages . pop_back ( ) ; flags . pop_back ( ) ; break ; <nl> - } <nl> - break ; <nl> - <nl> case mtpc_account_getWallPapers : <nl> to . add ( " { account_getWallPapers } " ) ; types . pop_back ( ) ; vtypes . pop_back ( ) ; stages . pop_back ( ) ; flags . pop_back ( ) ; <nl> break ; <nl> void mtpTextSerializeType ( MTPStringLogger & to , const mtpPrime * & from , const mtpP <nl> } <nl> break ; <nl> <nl> + case mtpc_contacts_resolveUsername : <nl> + if ( stage ) { <nl> + to . add ( " , \ n " ) . addSpaces ( lev ) ; <nl> + } else { <nl> + to . add ( " { contacts_resolveUsername " ) ; <nl> + to . add ( " \ n " ) . addSpaces ( lev ) ; <nl> + } <nl> + switch ( stage ) { <nl> + case 0 : to . add ( " username : " ) ; + + stages . back ( ) ; types . push_back ( mtpc_string ) ; vtypes . push_back ( 0 ) ; stages . push_back ( 0 ) ; flags . push_back ( 0 ) ; break ; <nl> + default : to . add ( " } " ) ; types . pop_back ( ) ; vtypes . pop_back ( ) ; stages . pop_back ( ) ; flags . pop_back ( ) ; break ; <nl> + } <nl> + break ; <nl> + <nl> case mtpc_messages_getMessages : <nl> if ( stage ) { <nl> to . add ( " , \ n " ) . addSpaces ( lev ) ; <nl> mmm a / Telegram / SourceFiles / mtproto / mtpScheme . h <nl> ppp b / Telegram / SourceFiles / mtproto / mtpScheme . h <nl> enum { <nl> mtpc_chatEmpty = 0x9ba2d800 , <nl> mtpc_chat = 0x6e9c9bc7 , <nl> mtpc_chatForbidden = 0xfb0ccc41 , <nl> - mtpc_channel = 0x8dbb1461 , <nl> + mtpc_channel = 0x1bcc63f2 , <nl> mtpc_chatFull = 0x2e02a614 , <nl> - mtpc_channelFull = 0xa09d2902 , <nl> + mtpc_channelFull = 0x5a090258 , <nl> mtpc_chatParticipant = 0xc8d7493e , <nl> mtpc_chatParticipantsForbidden = 0xfd2bb8a , <nl> mtpc_chatParticipants = 0x7841b415 , <nl> enum { <nl> mtpc_sendMessageUploadDocumentAction = 0xaa0cd9e4 , <nl> mtpc_sendMessageGeoLocationAction = 0x176f8ba1 , <nl> mtpc_sendMessageChooseContactAction = 0x628cbc6f , <nl> - mtpc_contactFound = 0xea879f95 , <nl> - mtpc_contacts_found = 0x566000e , <nl> + mtpc_contacts_found = 0x1aa1f784 , <nl> mtpc_inputPrivacyKeyStatusTimestamp = 0x4f96cb18 , <nl> mtpc_privacyKeyStatusTimestamp = 0xbc2eab30 , <nl> mtpc_inputPrivacyValueAllowContacts = 0xd09e07b , <nl> enum { <nl> mtpc_channelMessagesFilterEmpty = 0x94d42ee7 , <nl> mtpc_channelMessagesFilter = 0xcd77d957 , <nl> mtpc_channelMessagesFilterCollapsed = 0xfa01232e , <nl> + mtpc_contacts_resolvedPeer = 0x7f077ad9 , <nl> mtpc_invokeAfterMsg = 0xcb9f372d , <nl> mtpc_invokeAfterMsgs = 0x3dc4b4f0 , <nl> mtpc_initConnection = 0x69796de9 , <nl> enum { <nl> mtpc_contacts_exportCard = 0x84e53737 , <nl> mtpc_contacts_importCard = 0x4fe196fe , <nl> mtpc_contacts_search = 0x11f812d8 , <nl> - mtpc_contacts_resolveUsername = 0xbf0131c , <nl> + mtpc_contacts_resolveUsername = 0xf93ccba3 , <nl> mtpc_messages_getMessages = 0x4222fa74 , <nl> mtpc_messages_getDialogs = 0x859b3d3c , <nl> mtpc_messages_getHistory = 0x8a8ec2da , <nl> enum { <nl> mtpc_messages_readChannelHistory = 0x36a1210e , <nl> mtpc_messages_createChannel = 0xe830f8cb , <nl> mtpc_messages_deleteChannelMessages = 0x9995a84f , <nl> + mtpc_messages_editChatAbout = 0x8a969b93 , <nl> + mtpc_messages_checkChannelUsername = 0xe6d2d8f4 , <nl> + mtpc_messages_updateChannelUsername = 0xce2e9587 , <nl> mtpc_updates_getState = 0xedd4882a , <nl> mtpc_updates_getDifference = 0xa041495 , <nl> mtpc_updates_getChannelDifference = 0x248af4f5 , <nl> class MTPDsendMessageUploadAudioAction ; <nl> class MTPDsendMessageUploadPhotoAction ; <nl> class MTPDsendMessageUploadDocumentAction ; <nl> <nl> - class MTPcontactFound ; <nl> - class MTPDcontactFound ; <nl> - <nl> class MTPcontacts_found ; <nl> class MTPDcontacts_found ; <nl> <nl> class MTPDupdates_channelDifference ; <nl> class MTPchannelMessagesFilter ; <nl> class MTPDchannelMessagesFilter ; <nl> <nl> + class MTPcontacts_resolvedPeer ; <nl> + class MTPDcontacts_resolvedPeer ; <nl> + <nl> <nl> / / Boxed types definitions <nl> typedef MTPBoxed < MTPresPQ > MTPResPQ ; <nl> typedef MTPBoxed < MTPdocument > MTPDocument ; <nl> typedef MTPBoxed < MTPhelp_support > MTPhelp_Support ; <nl> typedef MTPBoxed < MTPnotifyPeer > MTPNotifyPeer ; <nl> typedef MTPBoxed < MTPsendMessageAction > MTPSendMessageAction ; <nl> - typedef MTPBoxed < MTPcontactFound > MTPContactFound ; <nl> typedef MTPBoxed < MTPcontacts_found > MTPcontacts_Found ; <nl> typedef MTPBoxed < MTPinputPrivacyKey > MTPInputPrivacyKey ; <nl> typedef MTPBoxed < MTPprivacyKey > MTPPrivacyKey ; <nl> typedef MTPBoxed < MTPmessageRange > MTPMessageRange ; <nl> typedef MTPBoxed < MTPmessageGroup > MTPMessageGroup ; <nl> typedef MTPBoxed < MTPupdates_channelDifference > MTPupdates_ChannelDifference ; <nl> typedef MTPBoxed < MTPchannelMessagesFilter > MTPChannelMessagesFilter ; <nl> + typedef MTPBoxed < MTPcontacts_resolvedPeer > MTPcontacts_ResolvedPeer ; <nl> <nl> / / Type classes definitions <nl> <nl> class MTPchat : private mtpDataOwner { <nl> friend MTPchat MTP_chatEmpty ( MTPint _id ) ; <nl> friend MTPchat MTP_chat ( MTPint _id , const MTPstring & _title , const MTPChatPhoto & _photo , MTPint _participants_count , MTPint _date , MTPBool _left , MTPint _version ) ; <nl> friend MTPchat MTP_chatForbidden ( MTPint _id , const MTPstring & _title , MTPint _date ) ; <nl> - friend MTPchat MTP_channel ( MTPint _flags , MTPint _id , const MTPlong & _access_hash , const MTPstring & _title , const MTPChatPhoto & _photo , MTPint _date , MTPint _version ) ; <nl> + friend MTPchat MTP_channel ( MTPint _flags , MTPint _id , const MTPlong & _access_hash , const MTPstring & _title , const MTPstring & _username , const MTPChatPhoto & _photo , MTPint _date , MTPint _version ) ; <nl> <nl> mtpTypeId _type ; <nl> } ; <nl> class MTPchatFull : private mtpDataOwner { <nl> explicit MTPchatFull ( MTPDchannelFull * _data ) ; <nl> <nl> friend MTPchatFull MTP_chatFull ( MTPint _id , const MTPChatParticipants & _participants , const MTPPhoto & _chat_photo , const MTPPeerNotifySettings & _notify_settings , const MTPExportedChatInvite & _exported_invite , const MTPVector < MTPBotInfo > & _bot_info ) ; <nl> - friend MTPchatFull MTP_channelFull ( MTPint _id , MTPint _read_inbox_max_id , MTPint _unread_count , MTPint _unread_important_count , MTPint _inviter_id , MTPint _invite_date , const MTPPhoto & _chat_photo , const MTPPeerNotifySettings & _notify_settings , const MTPExportedChatInvite & _exported_invite ) ; <nl> + friend MTPchatFull MTP_channelFull ( MTPint _id , const MTPstring & _about , MTPint _read_inbox_max_id , MTPint _unread_count , MTPint _unread_important_count , MTPint _inviter_id , MTPint _invite_date , const MTPPhoto & _chat_photo , const MTPPeerNotifySettings & _notify_settings , const MTPExportedChatInvite & _exported_invite ) ; <nl> <nl> mtpTypeId _type ; <nl> } ; <nl> class MTPsendMessageAction : private mtpDataOwner { <nl> } ; <nl> typedef MTPBoxed < MTPsendMessageAction > MTPSendMessageAction ; <nl> <nl> - class MTPcontactFound : private mtpDataOwner { <nl> - public : <nl> - MTPcontactFound ( ) ; <nl> - MTPcontactFound ( const mtpPrime * & from , const mtpPrime * end , mtpTypeId cons = mtpc_contactFound ) : mtpDataOwner ( 0 ) { <nl> - read ( from , end , cons ) ; <nl> - } <nl> - <nl> - MTPDcontactFound & _contactFound ( ) { <nl> - if ( ! data ) throw mtpErrorUninitialized ( ) ; <nl> - split ( ) ; <nl> - return * ( MTPDcontactFound * ) data ; <nl> - } <nl> - const MTPDcontactFound & c_contactFound ( ) const { <nl> - if ( ! data ) throw mtpErrorUninitialized ( ) ; <nl> - return * ( const MTPDcontactFound * ) data ; <nl> - } <nl> - <nl> - uint32 innerLength ( ) const ; <nl> - mtpTypeId type ( ) const ; <nl> - void read ( const mtpPrime * & from , const mtpPrime * end , mtpTypeId cons = mtpc_contactFound ) ; <nl> - void write ( mtpBuffer & to ) const ; <nl> - <nl> - typedef void ResponseType ; <nl> - <nl> - private : <nl> - explicit MTPcontactFound ( MTPDcontactFound * _data ) ; <nl> - <nl> - friend MTPcontactFound MTP_contactFound ( MTPint _user_id ) ; <nl> - } ; <nl> - typedef MTPBoxed < MTPcontactFound > MTPContactFound ; <nl> - <nl> class MTPcontacts_found : private mtpDataOwner { <nl> public : <nl> MTPcontacts_found ( ) ; <nl> class MTPcontacts_found : private mtpDataOwner { <nl> private : <nl> explicit MTPcontacts_found ( MTPDcontacts_found * _data ) ; <nl> <nl> - friend MTPcontacts_found MTP_contacts_found ( const MTPVector < MTPContactFound > & _results , const MTPVector < MTPUser > & _users ) ; <nl> + friend MTPcontacts_found MTP_contacts_found ( const MTPVector < MTPPeer > & _results , const MTPVector < MTPChat > & _chats , const MTPVector < MTPUser > & _users ) ; <nl> } ; <nl> typedef MTPBoxed < MTPcontacts_found > MTPcontacts_Found ; <nl> <nl> class MTPchannelMessagesFilter : private mtpDataOwner { <nl> } ; <nl> typedef MTPBoxed < MTPchannelMessagesFilter > MTPChannelMessagesFilter ; <nl> <nl> + class MTPcontacts_resolvedPeer : private mtpDataOwner { <nl> + public : <nl> + MTPcontacts_resolvedPeer ( ) ; <nl> + MTPcontacts_resolvedPeer ( const mtpPrime * & from , const mtpPrime * end , mtpTypeId cons = mtpc_contacts_resolvedPeer ) : mtpDataOwner ( 0 ) { <nl> + read ( from , end , cons ) ; <nl> + } <nl> + <nl> + MTPDcontacts_resolvedPeer & _contacts_resolvedPeer ( ) { <nl> + if ( ! data ) throw mtpErrorUninitialized ( ) ; <nl> + split ( ) ; <nl> + return * ( MTPDcontacts_resolvedPeer * ) data ; <nl> + } <nl> + const MTPDcontacts_resolvedPeer & c_contacts_resolvedPeer ( ) const { <nl> + if ( ! data ) throw mtpErrorUninitialized ( ) ; <nl> + return * ( const MTPDcontacts_resolvedPeer * ) data ; <nl> + } <nl> + <nl> + uint32 innerLength ( ) const ; <nl> + mtpTypeId type ( ) const ; <nl> + void read ( const mtpPrime * & from , const mtpPrime * end , mtpTypeId cons = mtpc_contacts_resolvedPeer ) ; <nl> + void write ( mtpBuffer & to ) const ; <nl> + <nl> + typedef void ResponseType ; <nl> + <nl> + private : <nl> + explicit MTPcontacts_resolvedPeer ( MTPDcontacts_resolvedPeer * _data ) ; <nl> + <nl> + friend MTPcontacts_resolvedPeer MTP_contacts_resolvedPeer ( const MTPPeer & _peer , const MTPVector < MTPChat > & _chats , const MTPVector < MTPUser > & _users ) ; <nl> + } ; <nl> + typedef MTPBoxed < MTPcontacts_resolvedPeer > MTPcontacts_ResolvedPeer ; <nl> + <nl> / / Type constructors with data <nl> <nl> class MTPDresPQ : public mtpDataImpl < MTPDresPQ > { <nl> class MTPDchannel : public mtpDataImpl < MTPDchannel > { <nl> public : <nl> MTPDchannel ( ) { <nl> } <nl> - MTPDchannel ( MTPint _flags , MTPint _id , const MTPlong & _access_hash , const MTPstring & _title , const MTPChatPhoto & _photo , MTPint _date , MTPint _version ) : vflags ( _flags ) , vid ( _id ) , vaccess_hash ( _access_hash ) , vtitle ( _title ) , vphoto ( _photo ) , vdate ( _date ) , vversion ( _version ) { <nl> + MTPDchannel ( MTPint _flags , MTPint _id , const MTPlong & _access_hash , const MTPstring & _title , const MTPstring & _username , const MTPChatPhoto & _photo , MTPint _date , MTPint _version ) : vflags ( _flags ) , vid ( _id ) , vaccess_hash ( _access_hash ) , vtitle ( _title ) , vusername ( _username ) , vphoto ( _photo ) , vdate ( _date ) , vversion ( _version ) { <nl> } <nl> <nl> MTPint vflags ; <nl> MTPint vid ; <nl> MTPlong vaccess_hash ; <nl> MTPstring vtitle ; <nl> + MTPstring vusername ; <nl> MTPChatPhoto vphoto ; <nl> MTPint vdate ; <nl> MTPint vversion ; <nl> + <nl> + enum { <nl> + flag_username = ( 1 < < 2 ) , <nl> + } ; <nl> + <nl> + bool has_username ( ) const { return vflags . v & flag_username ; } <nl> } ; <nl> <nl> class MTPDchatFull : public mtpDataImpl < MTPDchatFull > { <nl> class MTPDchannelFull : public mtpDataImpl < MTPDchannelFull > { <nl> public : <nl> MTPDchannelFull ( ) { <nl> } <nl> - MTPDchannelFull ( MTPint _id , MTPint _read_inbox_max_id , MTPint _unread_count , MTPint _unread_important_count , MTPint _inviter_id , MTPint _invite_date , const MTPPhoto & _chat_photo , const MTPPeerNotifySettings & _notify_settings , const MTPExportedChatInvite & _exported_invite ) : vid ( _id ) , vread_inbox_max_id ( _read_inbox_max_id ) , vunread_count ( _unread_count ) , vunread_important_count ( _unread_important_count ) , vinviter_id ( _inviter_id ) , vinvite_date ( _invite_date ) , vchat_photo ( _chat_photo ) , vnotify_settings ( _notify_settings ) , vexported_invite ( _exported_invite ) { <nl> + MTPDchannelFull ( MTPint _id , const MTPstring & _about , MTPint _read_inbox_max_id , MTPint _unread_count , MTPint _unread_important_count , MTPint _inviter_id , MTPint _invite_date , const MTPPhoto & _chat_photo , const MTPPeerNotifySettings & _notify_settings , const MTPExportedChatInvite & _exported_invite ) : vid ( _id ) , vabout ( _about ) , vread_inbox_max_id ( _read_inbox_max_id ) , vunread_count ( _unread_count ) , vunread_important_count ( _unread_important_count ) , vinviter_id ( _inviter_id ) , vinvite_date ( _invite_date ) , vchat_photo ( _chat_photo ) , vnotify_settings ( _notify_settings ) , vexported_invite ( _exported_invite ) { <nl> } <nl> <nl> MTPint vid ; <nl> + MTPstring vabout ; <nl> MTPint vread_inbox_max_id ; <nl> MTPint vunread_count ; <nl> MTPint vunread_important_count ; <nl> class MTPDsendMessageUploadDocumentAction : public mtpDataImpl < MTPDsendMessageUp <nl> MTPint vprogress ; <nl> } ; <nl> <nl> - class MTPDcontactFound : public mtpDataImpl < MTPDcontactFound > { <nl> - public : <nl> - MTPDcontactFound ( ) { <nl> - } <nl> - MTPDcontactFound ( MTPint _user_id ) : vuser_id ( _user_id ) { <nl> - } <nl> - <nl> - MTPint vuser_id ; <nl> - } ; <nl> - <nl> class MTPDcontacts_found : public mtpDataImpl < MTPDcontacts_found > { <nl> public : <nl> MTPDcontacts_found ( ) { <nl> } <nl> - MTPDcontacts_found ( const MTPVector < MTPContactFound > & _results , const MTPVector < MTPUser > & _users ) : vresults ( _results ) , vusers ( _users ) { <nl> + MTPDcontacts_found ( const MTPVector < MTPPeer > & _results , const MTPVector < MTPChat > & _chats , const MTPVector < MTPUser > & _users ) : vresults ( _results ) , vchats ( _chats ) , vusers ( _users ) { <nl> } <nl> <nl> - MTPVector < MTPContactFound > vresults ; <nl> + MTPVector < MTPPeer > vresults ; <nl> + MTPVector < MTPChat > vchats ; <nl> MTPVector < MTPUser > vusers ; <nl> } ; <nl> <nl> class MTPDchannelMessagesFilter : public mtpDataImpl < MTPDchannelMessagesFilter > <nl> MTPVector < MTPMessageRange > vranges ; <nl> } ; <nl> <nl> + class MTPDcontacts_resolvedPeer : public mtpDataImpl < MTPDcontacts_resolvedPeer > { <nl> + public : <nl> + MTPDcontacts_resolvedPeer ( ) { <nl> + } <nl> + MTPDcontacts_resolvedPeer ( const MTPPeer & _peer , const MTPVector < MTPChat > & _chats , const MTPVector < MTPUser > & _users ) : vpeer ( _peer ) , vchats ( _chats ) , vusers ( _users ) { <nl> + } <nl> + <nl> + MTPPeer vpeer ; <nl> + MTPVector < MTPChat > vchats ; <nl> + MTPVector < MTPUser > vusers ; <nl> + } ; <nl> + <nl> / / RPC methods <nl> <nl> class MTPreq_pq { / / RPC method ' req_pq ' <nl> class MTPcontacts_resolveUsername { / / RPC method ' contacts . resolveUsername ' <nl> vusername . write ( to ) ; <nl> } <nl> <nl> - typedef MTPUser ResponseType ; <nl> + typedef MTPcontacts_ResolvedPeer ResponseType ; <nl> } ; <nl> class MTPcontacts_ResolveUsername : public MTPBoxed < MTPcontacts_resolveUsername > { <nl> public : <nl> class MTPmessages_DeleteChannelMessages : public MTPBoxed < MTPmessages_deleteChan <nl> } <nl> } ; <nl> <nl> + class MTPmessages_editChatAbout { / / RPC method ' messages . editChatAbout ' <nl> + public : <nl> + MTPInputChat vchat_id ; <nl> + MTPstring vabout ; <nl> + <nl> + MTPmessages_editChatAbout ( ) { <nl> + } <nl> + MTPmessages_editChatAbout ( const mtpPrime * & from , const mtpPrime * end , mtpTypeId cons = mtpc_messages_editChatAbout ) { <nl> + read ( from , end , cons ) ; <nl> + } <nl> + MTPmessages_editChatAbout ( const MTPInputChat & _chat_id , const MTPstring & _about ) : vchat_id ( _chat_id ) , vabout ( _about ) { <nl> + } <nl> + <nl> + uint32 innerLength ( ) const { <nl> + return vchat_id . innerLength ( ) + vabout . innerLength ( ) ; <nl> + } <nl> + mtpTypeId type ( ) const { <nl> + return mtpc_messages_editChatAbout ; <nl> + } <nl> + void read ( const mtpPrime * & from , const mtpPrime * end , mtpTypeId cons = mtpc_messages_editChatAbout ) { <nl> + vchat_id . read ( from , end ) ; <nl> + vabout . read ( from , end ) ; <nl> + } <nl> + void write ( mtpBuffer & to ) const { <nl> + vchat_id . write ( to ) ; <nl> + vabout . write ( to ) ; <nl> + } <nl> + <nl> + typedef MTPBool ResponseType ; <nl> + } ; <nl> + class MTPmessages_EditChatAbout : public MTPBoxed < MTPmessages_editChatAbout > { <nl> + public : <nl> + MTPmessages_EditChatAbout ( ) { <nl> + } <nl> + MTPmessages_EditChatAbout ( const MTPmessages_editChatAbout & v ) : MTPBoxed < MTPmessages_editChatAbout > ( v ) { <nl> + } <nl> + MTPmessages_EditChatAbout ( const mtpPrime * & from , const mtpPrime * end , mtpTypeId cons = 0 ) : MTPBoxed < MTPmessages_editChatAbout > ( from , end , cons ) { <nl> + } <nl> + MTPmessages_EditChatAbout ( const MTPInputChat & _chat_id , const MTPstring & _about ) : MTPBoxed < MTPmessages_editChatAbout > ( MTPmessages_editChatAbout ( _chat_id , _about ) ) { <nl> + } <nl> + } ; <nl> + <nl> + class MTPmessages_checkChannelUsername { / / RPC method ' messages . checkChannelUsername ' <nl> + public : <nl> + MTPInputChat vchat_id ; <nl> + MTPstring vusername ; <nl> + <nl> + MTPmessages_checkChannelUsername ( ) { <nl> + } <nl> + MTPmessages_checkChannelUsername ( const mtpPrime * & from , const mtpPrime * end , mtpTypeId cons = mtpc_messages_checkChannelUsername ) { <nl> + read ( from , end , cons ) ; <nl> + } <nl> + MTPmessages_checkChannelUsername ( const MTPInputChat & _chat_id , const MTPstring & _username ) : vchat_id ( _chat_id ) , vusername ( _username ) { <nl> + } <nl> + <nl> + uint32 innerLength ( ) const { <nl> + return vchat_id . innerLength ( ) + vusername . innerLength ( ) ; <nl> + } <nl> + mtpTypeId type ( ) const { <nl> + return mtpc_messages_checkChannelUsername ; <nl> + } <nl> + void read ( const mtpPrime * & from , const mtpPrime * end , mtpTypeId cons = mtpc_messages_checkChannelUsername ) { <nl> + vchat_id . read ( from , end ) ; <nl> + vusername . read ( from , end ) ; <nl> + } <nl> + void write ( mtpBuffer & to ) const { <nl> + vchat_id . write ( to ) ; <nl> + vusername . write ( to ) ; <nl> + } <nl> + <nl> + typedef MTPBool ResponseType ; <nl> + } ; <nl> + class MTPmessages_CheckChannelUsername : public MTPBoxed < MTPmessages_checkChannelUsername > { <nl> + public : <nl> + MTPmessages_CheckChannelUsername ( ) { <nl> + } <nl> + MTPmessages_CheckChannelUsername ( const MTPmessages_checkChannelUsername & v ) : MTPBoxed < MTPmessages_checkChannelUsername > ( v ) { <nl> + } <nl> + MTPmessages_CheckChannelUsername ( const mtpPrime * & from , const mtpPrime * end , mtpTypeId cons = 0 ) : MTPBoxed < MTPmessages_checkChannelUsername > ( from , end , cons ) { <nl> + } <nl> + MTPmessages_CheckChannelUsername ( const MTPInputChat & _chat_id , const MTPstring & _username ) : MTPBoxed < MTPmessages_checkChannelUsername > ( MTPmessages_checkChannelUsername ( _chat_id , _username ) ) { <nl> + } <nl> + } ; <nl> + <nl> + class MTPmessages_updateChannelUsername { / / RPC method ' messages . updateChannelUsername ' <nl> + public : <nl> + MTPInputChat vchat_id ; <nl> + MTPstring vusername ; <nl> + <nl> + MTPmessages_updateChannelUsername ( ) { <nl> + } <nl> + MTPmessages_updateChannelUsername ( const mtpPrime * & from , const mtpPrime * end , mtpTypeId cons = mtpc_messages_updateChannelUsername ) { <nl> + read ( from , end , cons ) ; <nl> + } <nl> + MTPmessages_updateChannelUsername ( const MTPInputChat & _chat_id , const MTPstring & _username ) : vchat_id ( _chat_id ) , vusername ( _username ) { <nl> + } <nl> + <nl> + uint32 innerLength ( ) const { <nl> + return vchat_id . innerLength ( ) + vusername . innerLength ( ) ; <nl> + } <nl> + mtpTypeId type ( ) const { <nl> + return mtpc_messages_updateChannelUsername ; <nl> + } <nl> + void read ( const mtpPrime * & from , const mtpPrime * end , mtpTypeId cons = mtpc_messages_updateChannelUsername ) { <nl> + vchat_id . read ( from , end ) ; <nl> + vusername . read ( from , end ) ; <nl> + } <nl> + void write ( mtpBuffer & to ) const { <nl> + vchat_id . write ( to ) ; <nl> + vusername . write ( to ) ; <nl> + } <nl> + <nl> + typedef MTPBool ResponseType ; <nl> + } ; <nl> + class MTPmessages_UpdateChannelUsername : public MTPBoxed < MTPmessages_updateChannelUsername > { <nl> + public : <nl> + MTPmessages_UpdateChannelUsername ( ) { <nl> + } <nl> + MTPmessages_UpdateChannelUsername ( const MTPmessages_updateChannelUsername & v ) : MTPBoxed < MTPmessages_updateChannelUsername > ( v ) { <nl> + } <nl> + MTPmessages_UpdateChannelUsername ( const mtpPrime * & from , const mtpPrime * end , mtpTypeId cons = 0 ) : MTPBoxed < MTPmessages_updateChannelUsername > ( from , end , cons ) { <nl> + } <nl> + MTPmessages_UpdateChannelUsername ( const MTPInputChat & _chat_id , const MTPstring & _username ) : MTPBoxed < MTPmessages_updateChannelUsername > ( MTPmessages_updateChannelUsername ( _chat_id , _username ) ) { <nl> + } <nl> + } ; <nl> + <nl> class MTPupdates_getState { / / RPC method ' updates . getState ' <nl> public : <nl> MTPupdates_getState ( ) { <nl> inline uint32 MTPchat : : innerLength ( ) const { <nl> } <nl> case mtpc_channel : { <nl> const MTPDchannel & v ( c_channel ( ) ) ; <nl> - return v . vflags . innerLength ( ) + v . vid . innerLength ( ) + v . vaccess_hash . innerLength ( ) + v . vtitle . innerLength ( ) + v . vphoto . innerLength ( ) + v . vdate . innerLength ( ) + v . vversion . innerLength ( ) ; <nl> + return v . vflags . innerLength ( ) + v . vid . innerLength ( ) + v . vaccess_hash . innerLength ( ) + v . vtitle . innerLength ( ) + ( v . has_username ( ) ? v . vusername . innerLength ( ) : 0 ) + v . vphoto . innerLength ( ) + v . vdate . innerLength ( ) + v . vversion . innerLength ( ) ; <nl> } <nl> } <nl> return 0 ; <nl> inline void MTPchat : : read ( const mtpPrime * & from , const mtpPrime * end , mtpTypeId <nl> v . vid . read ( from , end ) ; <nl> v . vaccess_hash . read ( from , end ) ; <nl> v . vtitle . read ( from , end ) ; <nl> + if ( v . has_username ( ) ) { v . vusername . read ( from , end ) ; } else { v . vusername = MTPstring ( ) ; } <nl> v . vphoto . read ( from , end ) ; <nl> v . vdate . read ( from , end ) ; <nl> v . vversion . read ( from , end ) ; <nl> inline void MTPchat : : write ( mtpBuffer & to ) const { <nl> v . vid . write ( to ) ; <nl> v . vaccess_hash . write ( to ) ; <nl> v . vtitle . write ( to ) ; <nl> + if ( v . has_username ( ) ) v . vusername . write ( to ) ; <nl> v . vphoto . write ( to ) ; <nl> v . vdate . write ( to ) ; <nl> v . vversion . write ( to ) ; <nl> inline MTPchat MTP_chat ( MTPint _id , const MTPstring & _title , const MTPChatPhoto <nl> inline MTPchat MTP_chatForbidden ( MTPint _id , const MTPstring & _title , MTPint _date ) { <nl> return MTPchat ( new MTPDchatForbidden ( _id , _title , _date ) ) ; <nl> } <nl> - inline MTPchat MTP_channel ( MTPint _flags , MTPint _id , const MTPlong & _access_hash , const MTPstring & _title , const MTPChatPhoto & _photo , MTPint _date , MTPint _version ) { <nl> - return MTPchat ( new MTPDchannel ( _flags , _id , _access_hash , _title , _photo , _date , _version ) ) ; <nl> + inline MTPchat MTP_channel ( MTPint _flags , MTPint _id , const MTPlong & _access_hash , const MTPstring & _title , const MTPstring & _username , const MTPChatPhoto & _photo , MTPint _date , MTPint _version ) { <nl> + return MTPchat ( new MTPDchannel ( _flags , _id , _access_hash , _title , _username , _photo , _date , _version ) ) ; <nl> } <nl> <nl> inline uint32 MTPchatFull : : innerLength ( ) const { <nl> inline uint32 MTPchatFull : : innerLength ( ) const { <nl> } <nl> case mtpc_channelFull : { <nl> const MTPDchannelFull & v ( c_channelFull ( ) ) ; <nl> - return v . vid . innerLength ( ) + v . vread_inbox_max_id . innerLength ( ) + v . vunread_count . innerLength ( ) + v . vunread_important_count . innerLength ( ) + v . vinviter_id . innerLength ( ) + v . vinvite_date . innerLength ( ) + v . vchat_photo . innerLength ( ) + v . vnotify_settings . innerLength ( ) + v . vexported_invite . innerLength ( ) ; <nl> + return v . vid . innerLength ( ) + v . vabout . innerLength ( ) + v . vread_inbox_max_id . innerLength ( ) + v . vunread_count . innerLength ( ) + v . vunread_important_count . innerLength ( ) + v . vinviter_id . innerLength ( ) + v . vinvite_date . innerLength ( ) + v . vchat_photo . innerLength ( ) + v . vnotify_settings . innerLength ( ) + v . vexported_invite . innerLength ( ) ; <nl> } <nl> } <nl> return 0 ; <nl> inline void MTPchatFull : : read ( const mtpPrime * & from , const mtpPrime * end , mtpTyp <nl> if ( ! data ) setData ( new MTPDchannelFull ( ) ) ; <nl> MTPDchannelFull & v ( _channelFull ( ) ) ; <nl> v . vid . read ( from , end ) ; <nl> + v . vabout . read ( from , end ) ; <nl> v . vread_inbox_max_id . read ( from , end ) ; <nl> v . vunread_count . read ( from , end ) ; <nl> v . vunread_important_count . read ( from , end ) ; <nl> inline void MTPchatFull : : write ( mtpBuffer & to ) const { <nl> case mtpc_channelFull : { <nl> const MTPDchannelFull & v ( c_channelFull ( ) ) ; <nl> v . vid . write ( to ) ; <nl> + v . vabout . write ( to ) ; <nl> v . vread_inbox_max_id . write ( to ) ; <nl> v . vunread_count . write ( to ) ; <nl> v . vunread_important_count . write ( to ) ; <nl> inline MTPchatFull : : MTPchatFull ( MTPDchannelFull * _data ) : mtpDataOwner ( _data ) , _ <nl> inline MTPchatFull MTP_chatFull ( MTPint _id , const MTPChatParticipants & _participants , const MTPPhoto & _chat_photo , const MTPPeerNotifySettings & _notify_settings , const MTPExportedChatInvite & _exported_invite , const MTPVector < MTPBotInfo > & _bot_info ) { <nl> return MTPchatFull ( new MTPDchatFull ( _id , _participants , _chat_photo , _notify_settings , _exported_invite , _bot_info ) ) ; <nl> } <nl> - inline MTPchatFull MTP_channelFull ( MTPint _id , MTPint _read_inbox_max_id , MTPint _unread_count , MTPint _unread_important_count , MTPint _inviter_id , MTPint _invite_date , const MTPPhoto & _chat_photo , const MTPPeerNotifySettings & _notify_settings , const MTPExportedChatInvite & _exported_invite ) { <nl> - return MTPchatFull ( new MTPDchannelFull ( _id , _read_inbox_max_id , _unread_count , _unread_important_count , _inviter_id , _invite_date , _chat_photo , _notify_settings , _exported_invite ) ) ; <nl> + inline MTPchatFull MTP_channelFull ( MTPint _id , const MTPstring & _about , MTPint _read_inbox_max_id , MTPint _unread_count , MTPint _unread_important_count , MTPint _inviter_id , MTPint _invite_date , const MTPPhoto & _chat_photo , const MTPPeerNotifySettings & _notify_settings , const MTPExportedChatInvite & _exported_invite ) { <nl> + return MTPchatFull ( new MTPDchannelFull ( _id , _about , _read_inbox_max_id , _unread_count , _unread_important_count , _inviter_id , _invite_date , _chat_photo , _notify_settings , _exported_invite ) ) ; <nl> } <nl> <nl> inline MTPchatParticipant : : MTPchatParticipant ( ) : mtpDataOwner ( new MTPDchatParticipant ( ) ) { <nl> inline MTPsendMessageAction MTP_sendMessageChooseContactAction ( ) { <nl> return MTPsendMessageAction ( mtpc_sendMessageChooseContactAction ) ; <nl> } <nl> <nl> - inline MTPcontactFound : : MTPcontactFound ( ) : mtpDataOwner ( new MTPDcontactFound ( ) ) { <nl> - } <nl> - <nl> - inline uint32 MTPcontactFound : : innerLength ( ) const { <nl> - const MTPDcontactFound & v ( c_contactFound ( ) ) ; <nl> - return v . vuser_id . innerLength ( ) ; <nl> - } <nl> - inline mtpTypeId MTPcontactFound : : type ( ) const { <nl> - return mtpc_contactFound ; <nl> - } <nl> - inline void MTPcontactFound : : read ( const mtpPrime * & from , const mtpPrime * end , mtpTypeId cons ) { <nl> - if ( cons ! = mtpc_contactFound ) throw mtpErrorUnexpected ( cons , " MTPcontactFound " ) ; <nl> - <nl> - if ( ! data ) setData ( new MTPDcontactFound ( ) ) ; <nl> - MTPDcontactFound & v ( _contactFound ( ) ) ; <nl> - v . vuser_id . read ( from , end ) ; <nl> - } <nl> - inline void MTPcontactFound : : write ( mtpBuffer & to ) const { <nl> - const MTPDcontactFound & v ( c_contactFound ( ) ) ; <nl> - v . vuser_id . write ( to ) ; <nl> - } <nl> - inline MTPcontactFound : : MTPcontactFound ( MTPDcontactFound * _data ) : mtpDataOwner ( _data ) { <nl> - } <nl> - inline MTPcontactFound MTP_contactFound ( MTPint _user_id ) { <nl> - return MTPcontactFound ( new MTPDcontactFound ( _user_id ) ) ; <nl> - } <nl> - <nl> inline MTPcontacts_found : : MTPcontacts_found ( ) : mtpDataOwner ( new MTPDcontacts_found ( ) ) { <nl> } <nl> <nl> inline uint32 MTPcontacts_found : : innerLength ( ) const { <nl> const MTPDcontacts_found & v ( c_contacts_found ( ) ) ; <nl> - return v . vresults . innerLength ( ) + v . vusers . innerLength ( ) ; <nl> + return v . vresults . innerLength ( ) + v . vchats . innerLength ( ) + v . vusers . innerLength ( ) ; <nl> } <nl> inline mtpTypeId MTPcontacts_found : : type ( ) const { <nl> return mtpc_contacts_found ; <nl> inline void MTPcontacts_found : : read ( const mtpPrime * & from , const mtpPrime * end , <nl> if ( ! data ) setData ( new MTPDcontacts_found ( ) ) ; <nl> MTPDcontacts_found & v ( _contacts_found ( ) ) ; <nl> v . vresults . read ( from , end ) ; <nl> + v . vchats . read ( from , end ) ; <nl> v . vusers . read ( from , end ) ; <nl> } <nl> inline void MTPcontacts_found : : write ( mtpBuffer & to ) const { <nl> const MTPDcontacts_found & v ( c_contacts_found ( ) ) ; <nl> v . vresults . write ( to ) ; <nl> + v . vchats . write ( to ) ; <nl> v . vusers . write ( to ) ; <nl> } <nl> inline MTPcontacts_found : : MTPcontacts_found ( MTPDcontacts_found * _data ) : mtpDataOwner ( _data ) { <nl> } <nl> - inline MTPcontacts_found MTP_contacts_found ( const MTPVector < MTPContactFound > & _results , const MTPVector < MTPUser > & _users ) { <nl> - return MTPcontacts_found ( new MTPDcontacts_found ( _results , _users ) ) ; <nl> + inline MTPcontacts_found MTP_contacts_found ( const MTPVector < MTPPeer > & _results , const MTPVector < MTPChat > & _chats , const MTPVector < MTPUser > & _users ) { <nl> + return MTPcontacts_found ( new MTPDcontacts_found ( _results , _chats , _users ) ) ; <nl> } <nl> <nl> inline uint32 MTPinputPrivacyKey : : innerLength ( ) const { <nl> inline MTPchannelMessagesFilter MTP_channelMessagesFilterCollapsed ( ) { <nl> return MTPchannelMessagesFilter ( mtpc_channelMessagesFilterCollapsed ) ; <nl> } <nl> <nl> + inline MTPcontacts_resolvedPeer : : MTPcontacts_resolvedPeer ( ) : mtpDataOwner ( new MTPDcontacts_resolvedPeer ( ) ) { <nl> + } <nl> + <nl> + inline uint32 MTPcontacts_resolvedPeer : : innerLength ( ) const { <nl> + const MTPDcontacts_resolvedPeer & v ( c_contacts_resolvedPeer ( ) ) ; <nl> + return v . vpeer . innerLength ( ) + v . vchats . innerLength ( ) + v . vusers . innerLength ( ) ; <nl> + } <nl> + inline mtpTypeId MTPcontacts_resolvedPeer : : type ( ) const { <nl> + return mtpc_contacts_resolvedPeer ; <nl> + } <nl> + inline void MTPcontacts_resolvedPeer : : read ( const mtpPrime * & from , const mtpPrime * end , mtpTypeId cons ) { <nl> + if ( cons ! = mtpc_contacts_resolvedPeer ) throw mtpErrorUnexpected ( cons , " MTPcontacts_resolvedPeer " ) ; <nl> + <nl> + if ( ! data ) setData ( new MTPDcontacts_resolvedPeer ( ) ) ; <nl> + MTPDcontacts_resolvedPeer & v ( _contacts_resolvedPeer ( ) ) ; <nl> + v . vpeer . read ( from , end ) ; <nl> + v . vchats . read ( from , end ) ; <nl> + v . vusers . read ( from , end ) ; <nl> + } <nl> + inline void MTPcontacts_resolvedPeer : : write ( mtpBuffer & to ) const { <nl> + const MTPDcontacts_resolvedPeer & v ( c_contacts_resolvedPeer ( ) ) ; <nl> + v . vpeer . write ( to ) ; <nl> + v . vchats . write ( to ) ; <nl> + v . vusers . write ( to ) ; <nl> + } <nl> + inline MTPcontacts_resolvedPeer : : MTPcontacts_resolvedPeer ( MTPDcontacts_resolvedPeer * _data ) : mtpDataOwner ( _data ) { <nl> + } <nl> + inline MTPcontacts_resolvedPeer MTP_contacts_resolvedPeer ( const MTPPeer & _peer , const MTPVector < MTPChat > & _chats , const MTPVector < MTPUser > & _users ) { <nl> + return MTPcontacts_resolvedPeer ( new MTPDcontacts_resolvedPeer ( _peer , _chats , _users ) ) ; <nl> + } <nl> + <nl> / / Human - readable text serialization <nl> # if ( defined _DEBUG | | defined _WITH_DEBUG ) <nl> <nl> mmm a / Telegram / SourceFiles / mtproto / scheme . tl <nl> ppp b / Telegram / SourceFiles / mtproto / scheme . tl <nl> userStatusLastMonth # 77ebc742 = UserStatus ; <nl> chatEmpty # 9ba2d800 id : int = Chat ; <nl> chat # 6e9c9bc7 id : int title : string photo : ChatPhoto participants_count : int date : int left : Bool version : int = Chat ; <nl> chatForbidden # fb0ccc41 id : int title : string date : int = Chat ; <nl> - channel # 8dbb1461 flags : # id : int access_hash : long title : string photo : ChatPhoto date : int version : int = Chat ; <nl> + channel # 1bcc63f2 flags : # id : int access_hash : long title : string username : flags . 2 ? string photo : ChatPhoto date : int version : int = Chat ; <nl> <nl> chatFull # 2e02a614 id : int participants : ChatParticipants chat_photo : Photo notify_settings : PeerNotifySettings exported_invite : ExportedChatInvite bot_info : Vector < BotInfo > = ChatFull ; <nl> - channelFull # a09d2902 id : int read_inbox_max_id : int unread_count : int unread_important_count : int inviter_id : int invite_date : int chat_photo : Photo notify_settings : PeerNotifySettings exported_invite : ExportedChatInvite = ChatFull ; <nl> + channelFull # 5a090258 id : int about : string read_inbox_max_id : int unread_count : int unread_important_count : int inviter_id : int invite_date : int chat_photo : Photo notify_settings : PeerNotifySettings exported_invite : ExportedChatInvite = ChatFull ; <nl> <nl> chatParticipant # c8d7493e user_id : int inviter_id : int date : int = ChatParticipant ; <nl> <nl> sendMessageUploadDocumentAction # aa0cd9e4 progress : int = SendMessageAction ; <nl> sendMessageGeoLocationAction # 176f8ba1 = SendMessageAction ; <nl> sendMessageChooseContactAction # 628cbc6f = SendMessageAction ; <nl> <nl> - contactFound # ea879f95 user_id : int = ContactFound ; <nl> - <nl> - contacts . found # 566000e results : Vector < ContactFound > users : Vector < User > = contacts . Found ; <nl> + contacts . found # 1aa1f784 results : Vector < Peer > chats : Vector < Chat > users : Vector < User > = contacts . Found ; <nl> <nl> inputPrivacyKeyStatusTimestamp # 4f96cb18 = InputPrivacyKey ; <nl> <nl> channelMessagesFilterEmpty # 94d42ee7 = ChannelMessagesFilter ; <nl> channelMessagesFilter # cd77d957 flags : # ranges : Vector < MessageRange > = ChannelMessagesFilter ; <nl> channelMessagesFilterCollapsed # fa01232e = ChannelMessagesFilter ; <nl> <nl> + contacts . resolvedPeer # 7f077ad9 peer : Peer chats : Vector < Chat > users : Vector < User > = contacts . ResolvedPeer ; <nl> + <nl> mmmfunctionsmmm <nl> <nl> invokeAfterMsg # cb9f372d { X : Type } msg_id : long query : ! X = X ; <nl> contacts . getBlocked # f57c350f offset : int limit : int = contacts . Blocked ; <nl> contacts . exportCard # 84e53737 = Vector < int > ; <nl> contacts . importCard # 4fe196fe export_card : Vector < int > = User ; <nl> contacts . search # 11f812d8 q : string limit : int = contacts . Found ; <nl> - contacts . resolveUsername # bf0131c username : string = User ; <nl> + contacts . resolveUsername # f93ccba3 username : string = contacts . ResolvedPeer ; <nl> <nl> messages . getMessages # 4222fa74 id : Vector < int > = messages . Messages ; <nl> messages . getDialogs # 859b3d3c offset : int limit : int = messages . Dialogs ; <nl> messages . getImportantHistory # 24af43a5 peer : InputPeer offset_id : int add_offset : in <nl> messages . readChannelHistory # 36a1210e peer : InputPeer max_id : int = Bool ; <nl> messages . createChannel # e830f8cb flags : # title : string users : Vector < InputUser > = Updates ; <nl> messages . deleteChannelMessages # 9995a84f peer : InputPeer id : Vector < int > = messages . AffectedMessages ; <nl> + messages . editChatAbout # 8a969b93 chat_id : InputChat about : string = Bool ; <nl> + messages . checkChannelUsername # e6d2d8f4 chat_id : InputChat username : string = Bool ; <nl> + messages . updateChannelUsername # ce2e9587 chat_id : InputChat username : string = Bool ; <nl> <nl> updates . getState # edd4882a = updates . State ; <nl> updates . getDifference # a041495 pts : int date : int qts : int = updates . Difference ; <nl> mmm a / Telegram / SourceFiles / overviewwidget . cpp <nl> ppp b / Telegram / SourceFiles / overviewwidget . cpp <nl> void OverviewInner : : onDragExec ( ) { <nl> QList < QUrl > urls ; <nl> bool forwardSelected = false ; <nl> if ( uponSelected ) { <nl> - forwardSelected = ! _selected . isEmpty ( ) & & _selected . cbegin ( ) . value ( ) = = FullItemSel & & cWideMode ( ) ; <nl> + forwardSelected = ! _selected . isEmpty ( ) & & _selected . cbegin ( ) . value ( ) = = FullItemSel & & cWideMode ( ) & & ! _hist - > peer - > isChannel ( ) ; <nl> } else if ( textlnkDown ( ) ) { <nl> sel = textlnkDown ( ) - > encoded ( ) ; <nl> if ( ! sel . isEmpty ( ) & & sel . at ( 0 ) ! = ' / ' & & sel . at ( 0 ) ! = ' @ ' & & sel . at ( 0 ) ! = ' # ' ) { <nl> void OverviewInner : : onDragExec ( ) { <nl> QDrag * drag = new QDrag ( App : : wnd ( ) ) ; <nl> QMimeData * mimeData = new QMimeData ; <nl> <nl> - mimeData - > setData ( qsl ( " application / x - td - forward - pressed - link " ) , " 1 " ) ; <nl> + if ( ! _hist - > peer - > isChannel ( ) ) { <nl> + mimeData - > setData ( qsl ( " application / x - td - forward - pressed - link " ) , " 1 " ) ; <nl> + } <nl> if ( lnkDocument ) { <nl> QString already = static_cast < DocumentOpenLink * > ( textlnkDown ( ) . data ( ) ) - > document ( ) - > already ( true ) ; <nl> if ( ! already . isEmpty ( ) ) { <nl> void OverviewInner : : onUpdateSelected ( ) { <nl> } <nl> cur = ( textlnkDown ( ) | | _lnkDownIndex ) ? style : : cur_pointer : style : : cur_default ; <nl> if ( _dragAction = = Selecting ) { <nl> + bool canSelectMany = _peer & & ( ! _peer - > isChannel ( ) | | _peer - > asChannel ( ) - > adminned ) ; <nl> if ( _mousedItem = = _dragItem & & ( lnk | | lnkIndex ) & & ! _selected . isEmpty ( ) & & _selected . cbegin ( ) . value ( ) ! = FullItemSel ) { <nl> bool afterSymbol = false , uponSymbol = false ; <nl> uint16 second = 0 ; <nl> _selected [ _dragItem ] = 0 ; <nl> updateDragSelection ( 0 , - 1 , 0 , - 1 , false ) ; <nl> - } else { <nl> + } else if ( canSelectMany ) { <nl> bool selectingDown = ( ( _type = = OverviewPhotos | | _type = = OverviewAudioDocuments | | _type = = OverviewLinks ) ? ( _mousedItemIndex > _dragItemIndex ) : ( _mousedItemIndex < _dragItemIndex ) ) | | ( _mousedItemIndex = = _dragItemIndex & & ( _type = = OverviewPhotos ? ( _dragStartPos . x ( ) < m . x ( ) ) : ( _dragStartPos . y ( ) < m . y ( ) ) ) ) ; <nl> MsgId dragSelFrom = _dragItem , dragSelTo = _mousedItem ; <nl> int32 dragSelFromIndex = _dragItemIndex , dragSelToIndex = _mousedItemIndex ; <nl> void OverviewInner : : showContextMenu ( QContextMenuEvent * e , bool showFromTouch ) { <nl> _menu - > addAction ( lang ( lng_context_clear_selection ) , _overview , SLOT ( onClearSelected ( ) ) ) ; <nl> } else if ( App : : hoveredLinkItem ( ) ) { <nl> if ( isUponSelected ! = - 2 ) { <nl> - if ( dynamic_cast < HistoryMessage * > ( App : : hoveredLinkItem ( ) ) ) { <nl> + if ( dynamic_cast < HistoryMessage * > ( App : : hoveredLinkItem ( ) ) & & ! _hist - > peer - > isChannel ( ) ) { <nl> _menu - > addAction ( lang ( lng_context_forward_msg ) , this , SLOT ( forwardMessage ( ) ) ) - > setEnabled ( true ) ; <nl> } <nl> _menu - > addAction ( lang ( lng_context_delete_msg ) , this , SLOT ( deleteMessage ( ) ) ) - > setEnabled ( true ) ; <nl> void OverviewInner : : showContextMenu ( QContextMenuEvent * e , bool showFromTouch ) { <nl> _menu - > addAction ( lang ( lng_context_clear_selection ) , _overview , SLOT ( onClearSelected ( ) ) ) ; <nl> } else { <nl> if ( isUponSelected ! = - 2 ) { <nl> - if ( dynamic_cast < HistoryMessage * > ( App : : mousedItem ( ) ) ) { <nl> + if ( dynamic_cast < HistoryMessage * > ( App : : mousedItem ( ) ) & & ! _hist - > peer - > isChannel ( ) ) { <nl> _menu - > addAction ( lang ( lng_context_forward_msg ) , this , SLOT ( forwardMessage ( ) ) ) - > setEnabled ( true ) ; <nl> } <nl> _menu - > addAction ( lang ( lng_context_delete_msg ) , this , SLOT ( deleteMessage ( ) ) ) - > setEnabled ( true ) ; <nl> mmm a / Telegram / SourceFiles / profilewidget . cpp <nl> ppp b / Telegram / SourceFiles / profilewidget . cpp <nl> ProfileInner : : ProfileInner ( ProfileWidget * profile , ScrollArea * scroll , const Pee <nl> _peerUser ( _peer - > asUser ( ) ) , _peerChat ( _peer - > asChat ( ) ) , _peerChannel ( _peer - > asChannel ( ) ) , _hist ( App : : history ( peer - > id ) ) , <nl> _isAdmin ( _peerChat ? ( _peerChat - > admin = = MTP : : authedId ( ) ) : ( _peerChannel ? _peerChannel - > adminned : false ) ) , <nl> <nl> + _width ( 0 ) , _left ( 0 ) , _addToHeight ( 0 ) , <nl> + <nl> / / profile <nl> _nameCache ( peer - > name ) , <nl> _uploadPhoto ( this , lang ( lng_profile_set_group_photo ) , st : : btnShareContact ) , <nl> ProfileInner : : ProfileInner ( ProfileWidget * profile , ScrollArea * scroll , const Pee <nl> _enableNotifications ( this , lang ( lng_profile_enable_notifications ) ) , <nl> <nl> / / shared media <nl> - _allMediaTypes ( false ) , <nl> - _mediaShowAll ( this , lang ( lng_profile_show_all_types ) ) , <nl> + _notAllMediaLoaded ( false ) , <nl> <nl> / / actions <nl> _searchInPeer ( this , lang ( lng_profile_search_messages ) ) , <nl> ProfileInner : : ProfileInner ( ProfileWidget * profile , ScrollArea * scroll , const Pee <nl> if ( _peerChannel - > photoId = = UnknownPeerPhotoId ) { <nl> App : : api ( ) - > requestFullPeer ( _peer ) ; <nl> } <nl> + / / MTP : : send ( MTPmessages_UpdateChannelUsername ( _peerChannel - > inputChat , MTP_string ( " tdesktop_channel " ) ) ) ; <nl> } <nl> <nl> / / profile <nl> ProfileInner : : ProfileInner ( ProfileWidget * profile , ScrollArea * scroll , const Pee <nl> connect ( & _enableNotifications , SIGNAL ( clicked ( ) ) , this , SLOT ( onEnableNotifications ( ) ) ) ; <nl> <nl> / / shared media <nl> - connect ( & _mediaShowAll , SIGNAL ( clicked ( ) ) , this , SLOT ( onMediaShowAll ( ) ) ) ; <nl> connect ( ( _mediaButtons [ OverviewPhotos ] = new LinkButton ( this , QString ( ) ) ) , SIGNAL ( clicked ( ) ) , this , SLOT ( onMediaPhotos ( ) ) ) ; <nl> connect ( ( _mediaButtons [ OverviewVideos ] = new LinkButton ( this , QString ( ) ) ) , SIGNAL ( clicked ( ) ) , this , SLOT ( onMediaVideos ( ) ) ) ; <nl> connect ( ( _mediaButtons [ OverviewDocuments ] = new LinkButton ( this , QString ( ) ) ) , SIGNAL ( clicked ( ) ) , this , SLOT ( onMediaDocuments ( ) ) ) ; <nl> connect ( ( _mediaButtons [ OverviewAudios ] = new LinkButton ( this , QString ( ) ) ) , SIGNAL ( clicked ( ) ) , this , SLOT ( onMediaAudios ( ) ) ) ; <nl> connect ( ( _mediaButtons [ OverviewLinks ] = new LinkButton ( this , QString ( ) ) ) , SIGNAL ( clicked ( ) ) , this , SLOT ( onMediaLinks ( ) ) ) ; <nl> - App : : main ( ) - > preloadOverviews ( _peer ) ; <nl> + updateMediaLinks ( ) ; <nl> <nl> / / actions <nl> connect ( & _searchInPeer , SIGNAL ( clicked ( ) ) , this , SLOT ( onSearchInPeer ( ) ) ) ; <nl> void ProfileInner : : onPhotoUpdateDone ( PeerId peer ) { <nl> update ( ) ; <nl> } <nl> <nl> - void ProfileInner : : onMediaShowAll ( ) { <nl> - _allMediaTypes = true ; <nl> - resizeEvent ( 0 ) ; <nl> - showAll ( ) ; <nl> - } <nl> - <nl> void ProfileInner : : onMediaPhotos ( ) { <nl> App : : main ( ) - > showMediaOverview ( _peer , OverviewPhotos ) ; <nl> } <nl> void ProfileInner : : onMediaLinks ( ) { <nl> } <nl> <nl> void ProfileInner : : onInvitationLink ( ) { <nl> - if ( ! _peerChat ) return ; <nl> + if ( ! _peerChat & & ! _peerChannel ) return ; <nl> <nl> - QApplication : : clipboard ( ) - > setText ( _peerChat - > invitationUrl ) ; <nl> + QApplication : : clipboard ( ) - > setText ( _peerChat ? _peerChat - > invitationUrl : ( _peerChannel ? _peerChannel - > invitationUrl : QString ( ) ) ) ; <nl> App : : wnd ( ) - > showLayer ( new ConfirmBox ( lang ( lng_group_invite_copied ) , true ) ) ; <nl> } <nl> <nl> void ProfileInner : : onCreateInvitationLink ( ) { <nl> - if ( ! _peerChat ) return ; <nl> + if ( ! _peerChat & & ! _peerChannel ) return ; <nl> <nl> - ConfirmBox * box = new ConfirmBox ( lang ( _peerChat - > invitationUrl . isEmpty ( ) ? lng_group_invite_about : lng_group_invite_about_new ) ) ; <nl> + ConfirmBox * box = new ConfirmBox ( lang ( ( ( _peerChat & & _peerChat - > invitationUrl . isEmpty ( ) ) | | ( _peerChannel & & _peerChannel - > invitationUrl . isEmpty ( ) ) ) ? ( _peerChat ? lng_group_invite_about : lng_channel_invite_about ) : lng_group_invite_about_new ) ) ; <nl> connect ( box , SIGNAL ( confirmed ( ) ) , this , SLOT ( onCreateInvitationLinkSure ( ) ) ) ; <nl> App : : wnd ( ) - > showLayer ( box ) ; <nl> } <nl> <nl> void ProfileInner : : onCreateInvitationLinkSure ( ) { <nl> - if ( ! _peerChat ) return ; <nl> - MTP : : send ( MTPmessages_ExportChatInvite ( _peerChat - > inputChat ) , rpcDone ( & ProfileInner : : chatInviteDone ) ) ; <nl> + if ( ! _peerChat & & ! _peerChannel ) return ; <nl> + MTP : : send ( MTPmessages_ExportChatInvite ( _peerChat ? _peerChat - > inputChat : _peerChannel - > inputChat ) , rpcDone ( & ProfileInner : : chatInviteDone ) ) ; <nl> } <nl> <nl> void ProfileInner : : chatInviteDone ( const MTPExportedChatInvite & result ) { <nl> - if ( ! _peerChat ) return ; <nl> + if ( ! _peerChat & & ! _peerChannel ) return ; <nl> <nl> - _peerChat - > invitationUrl = ( result . type ( ) = = mtpc_chatInviteExported ) ? qs ( result . c_chatInviteExported ( ) . vlink ) : QString ( ) ; <nl> + if ( _peerChat ) { <nl> + _peerChat - > invitationUrl = ( result . type ( ) = = mtpc_chatInviteExported ) ? qs ( result . c_chatInviteExported ( ) . vlink ) : QString ( ) ; <nl> + } else { <nl> + _peerChannel - > invitationUrl = ( result . type ( ) = = mtpc_chatInviteExported ) ? qs ( result . c_chatInviteExported ( ) . vlink ) : QString ( ) ; <nl> + } <nl> updateInvitationLink ( ) ; <nl> showAll ( ) ; <nl> resizeEvent ( 0 ) ; <nl> void ProfileInner : : paintEvent ( QPaintEvent * e ) { <nl> <nl> p . setFont ( st : : linkFont - > f ) ; <nl> p . setPen ( st : : black - > p ) ; <nl> - int oneState = 0 ; / / < 0 - loading , 0 - no media , > 0 - link shown <nl> + bool mediaFound = false ; <nl> for ( int i = 0 ; i < OverviewCount ; + + i ) { <nl> if ( i = = OverviewAudioDocuments ) continue ; <nl> <nl> - int32 count = ( _hist - > _overviewCount [ i ] > 0 ) ? _hist - > _overviewCount [ i ] : ( _hist - > _overviewCount [ i ] = = 0 ? _hist - > _overview [ i ] . size ( ) : - 1 ) ; <nl> - if ( count < 0 ) { <nl> - if ( ! oneState ) oneState = count ; <nl> - if ( ! _allMediaTypes ) { <nl> - p . drawText ( _left , top + st : : linkFont - > ascent , lang ( lng_profile_loading ) ) ; <nl> - break ; <nl> - } <nl> - } else if ( count > 0 ) { <nl> - oneState = count ; <nl> - if ( ! _allMediaTypes ) { <nl> - break ; <nl> - } <nl> + if ( ! _mediaButtons [ i ] - > isHidden ( ) ) { <nl> + mediaFound = true ; <nl> top + = _mediaButtons [ i ] - > height ( ) + st : : setLittleSkip ; <nl> } <nl> } <nl> - if ( _allMediaTypes ) { <nl> - if ( oneState > 0 ) { <nl> - top - = st : : setLittleSkip ; <nl> - } else { <nl> - p . drawText ( _left , top + st : : linkFont - > ascent , lang ( oneState < 0 ? lng_profile_loading : lng_profile_no_media ) ) ; <nl> - top + = _mediaButtons [ OverviewPhotos ] - > height ( ) ; <nl> - } <nl> - } else { <nl> - if ( ! oneState ) { <nl> - p . drawText ( _left , top + st : : linkFont - > ascent , lang ( lng_profile_no_media ) ) ; <nl> - } <nl> + if ( _notAllMediaLoaded | | ! mediaFound ) { <nl> + p . drawText ( _left , top + st : : linkFont - > ascent , lang ( _notAllMediaLoaded ? lng_profile_loading : lng_profile_no_media ) ) ; <nl> top + = _mediaButtons [ OverviewPhotos ] - > height ( ) ; <nl> + } else { <nl> + top - = st : : setLittleSkip ; <nl> } <nl> <nl> / / actions <nl> p . setFont ( st : : profileHeaderFont - > f ) ; <nl> p . setPen ( st : : profileHeaderColor - > p ) ; <nl> - if ( ! _peerChannel ) p . drawText ( _left + st : : profileHeaderLeft , top + st : : profileHeaderTop + st : : profileHeaderFont - > ascent , lang ( lng_profile_actions_section ) ) ; <nl> + p . drawText ( _left + st : : profileHeaderLeft , top + st : : profileHeaderTop + st : : profileHeaderFont - > ascent , lang ( lng_profile_actions_section ) ) ; <nl> top + = st : : profileHeaderSkip ; <nl> <nl> top + = _searchInPeer . height ( ) + st : : setLittleSkip + _clearHistory . height ( ) + st : : setLittleSkip + _deleteConversation . height ( ) ; <nl> void ProfileInner : : leaveToChildEvent ( QEvent * e ) { <nl> return TWidget : : leaveToChildEvent ( e ) ; <nl> } <nl> <nl> + bool ProfileInner : : updateMediaLinks ( int32 * addToScroll ) { <nl> + QPoint p ( addToScroll ? mapFromGlobal ( QCursor : : pos ( ) ) : QPoint ( 0 , 0 ) ) ; <nl> + bool oneWasShown = false ; <nl> + for ( int i = 0 ; i < OverviewCount ; + + i ) { <nl> + if ( i = = OverviewAudioDocuments ) continue ; <nl> + if ( ! _mediaButtons [ i ] - > isHidden ( ) ) { <nl> + oneWasShown = true ; <nl> + break ; <nl> + } <nl> + } <nl> + <nl> + bool newNotAllMediaLoaded = false , changed = false , substracted = ! _notAllMediaLoaded & & oneWasShown ; <nl> + <nl> + bool oneIsShown = false ; <nl> + int32 y = _mediaButtons [ OverviewPhotos ] - > y ( ) ; <nl> + if ( addToScroll ) * addToScroll = 0 ; <nl> + for ( int i = 0 ; i < OverviewCount ; + + i ) { <nl> + if ( i = = OverviewAudioDocuments ) continue ; <nl> + <nl> + int32 addToY = _mediaButtons [ i ] - > height ( ) + st : : setLittleSkip ; <nl> + <nl> + int32 count = ( _hist - > _overviewCount [ i ] > 0 ) ? _hist - > _overviewCount [ i ] : ( _hist - > _overviewCount [ i ] = = 0 ? _hist - > _overview [ i ] . size ( ) : - 1 ) ; <nl> + if ( count > 0 ) { <nl> + _mediaButtons [ i ] - > setText ( overviewLinkText ( i , count ) ) ; <nl> + if ( _mediaButtons [ i ] - > isHidden ( ) ) { <nl> + _mediaButtons [ i ] - > show ( ) ; <nl> + changed = true ; <nl> + <nl> + if ( addToScroll & & p . y ( ) > = y ) { <nl> + p . setY ( p . y ( ) + addToY ) ; <nl> + * addToScroll + = addToY ; <nl> + } <nl> + } <nl> + y + = addToY ; <nl> + oneIsShown = true ; <nl> + } else { <nl> + if ( ! _mediaButtons [ i ] - > isHidden ( ) ) { <nl> + _mediaButtons [ i ] - > hide ( ) ; <nl> + changed = true ; <nl> + <nl> + if ( addToScroll & & p . y ( ) > = y + addToY ) { <nl> + p . setY ( p . y ( ) - addToY ) ; <nl> + * addToScroll - = addToY ; <nl> + } <nl> + } <nl> + if ( count < 0 ) { <nl> + newNotAllMediaLoaded = true ; <nl> + } <nl> + } <nl> + } <nl> + if ( newNotAllMediaLoaded ! = _notAllMediaLoaded ) { <nl> + _notAllMediaLoaded = newNotAllMediaLoaded ; <nl> + changed = true ; <nl> + <nl> + int32 addToY = _mediaButtons [ OverviewPhotos ] - > height ( ) ; <nl> + if ( _notAllMediaLoaded ) { <nl> + if ( addToScroll & & p . y ( ) > = y ) { <nl> + p . setY ( p . y ( ) + addToY ) ; <nl> + * addToScroll + = addToY ; <nl> + } <nl> + } else { <nl> + if ( addToScroll & & p . y ( ) > = y + addToY ) { <nl> + p . setY ( p . y ( ) - addToY ) ; <nl> + * addToScroll - = addToY ; <nl> + } <nl> + } <nl> + <nl> + if ( App : : main ( ) ) App : : main ( ) - > preloadOverviews ( _peer ) ; <nl> + } <nl> + bool newSubstracted = ! _notAllMediaLoaded & & oneIsShown ; <nl> + if ( newSubstracted & & newSubstracted ! = substracted ) { <nl> + int32 addToY = st : : setLittleSkip ; <nl> + if ( addToScroll & & p . y ( ) > = y + addToY ) { <nl> + p . setY ( p . y ( ) - addToY ) ; <nl> + * addToScroll - = addToY ; <nl> + } <nl> + } <nl> + return changed ; <nl> + <nl> + } <nl> + <nl> void ProfileInner : : resizeEvent ( QResizeEvent * e ) { <nl> _width = qMin ( width ( ) - st : : profilePadding . left ( ) - st : : profilePadding . right ( ) , int ( st : : profileMaxWidth ) ) ; <nl> _left = ( width ( ) - _width ) / 2 ; <nl> void ProfileInner : : resizeEvent ( QResizeEvent * e ) { <nl> / / shared media <nl> top + = st : : profileHeaderSkip ; <nl> <nl> - _mediaShowAll . move ( _left + _width - _mediaShowAll . width ( ) , top ) ; <nl> - int wasCount = 0 ; / / < 0 - loading , 0 - no media , > 0 - link shown <nl> + bool mediaFound = false ; <nl> for ( int i = 0 ; i < OverviewCount ; + + i ) { <nl> if ( i = = OverviewAudioDocuments ) continue ; <nl> <nl> - if ( _allMediaTypes ) { <nl> - int32 count = ( _hist - > _overviewCount [ i ] > 0 ) ? _hist - > _overviewCount [ i ] : ( _hist - > _overviewCount [ i ] = = 0 ? _hist - > _overview [ i ] . size ( ) : - 1 ) ; <nl> - if ( count > 0 ) { <nl> - if ( wasCount ) top + = _mediaButtons [ i ] - > height ( ) + st : : setLittleSkip ; <nl> - wasCount = count ; <nl> - } <nl> - } <nl> _mediaButtons [ i ] - > move ( _left , top ) ; <nl> + if ( ! _mediaButtons [ i ] - > isHidden ( ) ) { <nl> + mediaFound = true ; <nl> + top + = _mediaButtons [ i ] - > height ( ) + st : : setLittleSkip ; <nl> + } <nl> } <nl> - top + = _mediaButtons [ OverviewPhotos ] - > height ( ) ; <nl> - <nl> - / / actions <nl> - top + = st : : profileHeaderSkip ; <nl> - _searchInPeer . move ( _left , top ) ; top + = _searchInPeer . height ( ) + st : : setLittleSkip ; <nl> - _clearHistory . move ( _left , top ) ; top + = _clearHistory . height ( ) + st : : setLittleSkip ; <nl> - _deleteConversation . move ( _left , top ) ; top + = _deleteConversation . height ( ) ; <nl> - if ( _peerUser & & peerToUser ( _peerUser - > id ) ! = MTP : : authedId ( ) ) { <nl> - top + = st : : setSectionSkip ; <nl> - _blockUser . move ( _left , top ) ; top + = _blockUser . height ( ) ; <nl> + if ( _notAllMediaLoaded | | ! mediaFound ) { <nl> + top + = _mediaButtons [ OverviewPhotos ] - > height ( ) ; <nl> + } else { <nl> + top - = st : : setLittleSkip ; <nl> } <nl> <nl> / / actions <nl> PeerData * ProfileInner : : peer ( ) const { <nl> return _peer ; <nl> } <nl> <nl> - bool ProfileInner : : allMediaShown ( ) const { <nl> - return _allMediaTypes ; <nl> - } <nl> - <nl> ProfileInner : : ~ ProfileInner ( ) { <nl> for ( ParticipantsData : : iterator i = _participantsData . begin ( ) , e = _participantsData . end ( ) ; i ! = e ; + + i ) { <nl> delete * i ; <nl> void ProfileInner : : updateNotifySettings ( ) { <nl> _enableNotifications . setChecked ( _peer - > notify = = EmptyNotifySettings | | _peer - > notify = = UnknownNotifySettings | | _peer - > notify - > mute < unixtime ( ) ) ; <nl> } <nl> <nl> - void ProfileInner : : mediaOverviewUpdated ( PeerData * peer , MediaOverviewType type ) { <nl> + int32 ProfileInner : : mediaOverviewUpdated ( PeerData * peer , MediaOverviewType type ) { <nl> + int32 result = 0 ; <nl> if ( peer = = _peer ) { <nl> - resizeEvent ( 0 ) ; <nl> + if ( updateMediaLinks ( & result ) ) { <nl> + resizeEvent ( 0 ) ; <nl> + update ( ) ; <nl> + } <nl> + } <nl> + return result ; <nl> + } <nl> + <nl> + void ProfileInner : : requestHeight ( int32 newHeight ) { <nl> + if ( newHeight > height ( ) ) { <nl> + _addToHeight + = newHeight - height ( ) ; <nl> + showAll ( ) ; <nl> + } <nl> + } <nl> + <nl> + void ProfileInner : : allowDecreaseHeight ( int32 decreaseBy ) { <nl> + if ( decreaseBy > 0 & & _addToHeight > 0 ) { <nl> + _addToHeight - = qMin ( decreaseBy , _addToHeight ) ; <nl> showAll ( ) ; <nl> - update ( ) ; <nl> } <nl> } <nl> <nl> void ProfileInner : : showAll ( ) { <nl> _enableNotifications . show ( ) ; <nl> updateNotifySettings ( ) ; <nl> <nl> - / / shared media <nl> - bool first = false , wasCount = false , manyCounts = false ; <nl> - for ( int i = 0 ; i < OverviewCount ; + + i ) { <nl> - if ( i = = OverviewAudioDocuments ) continue ; <nl> - <nl> - int32 count = ( _hist - > _overviewCount [ i ] > 0 ) ? _hist - > _overviewCount [ i ] : ( _hist - > _overviewCount [ i ] = = 0 ? _hist - > _overview [ i ] . size ( ) : - 1 ) ; <nl> - if ( count > 0 ) { <nl> - if ( wasCount ) { <nl> - manyCounts = true ; <nl> - } else { <nl> - wasCount = true ; <nl> - } <nl> - } <nl> - if ( ! first | | _allMediaTypes ) { <nl> - if ( count > 0 | | count < 0 ) { <nl> - first = true ; <nl> - } else if ( ! _allMediaTypes ) { <nl> - _mediaButtons [ i ] - > hide ( ) ; <nl> - continue ; <nl> - } <nl> - if ( count > 0 ) { <nl> - _mediaButtons [ i ] - > setText ( overviewLinkText ( i , count ) ) ; <nl> - _mediaButtons [ i ] - > show ( ) ; <nl> - } else { <nl> - _mediaButtons [ i ] - > hide ( ) ; <nl> - } <nl> - } else { <nl> - _mediaButtons [ i ] - > hide ( ) ; <nl> - } <nl> - } <nl> - if ( _allMediaTypes | | ! manyCounts ) { <nl> - _mediaShowAll . hide ( ) ; <nl> - } else { <nl> - _mediaShowAll . show ( ) ; <nl> - } <nl> - <nl> / / participants <nl> reorderParticipants ( ) ; <nl> int32 h ; <nl> void ProfileInner : : showAll ( ) { <nl> } else if ( _peerChannel ) { <nl> h = _deleteConversation . y ( ) + _deleteConversation . height ( ) + st : : profileHeaderSkip ; <nl> } <nl> - resize ( width ( ) , h ) ; <nl> + resize ( width ( ) , h + _addToHeight ) ; <nl> } <nl> <nl> void ProfileInner : : updateInvitationLink ( ) { <nl> - if ( ! _peerChat ) return ; <nl> + if ( ! _peerChat & & ! _peerChannel ) return ; <nl> <nl> - if ( _peerChat - > invitationUrl . isEmpty ( ) ) { <nl> + if ( ( _peerChat & & _peerChat - > invitationUrl . isEmpty ( ) ) | | ( _peerChannel & & _peerChannel - > invitationUrl . isEmpty ( ) ) ) { <nl> _createInvitationLink . setText ( lang ( lng_group_invite_create ) ) ; <nl> } else { <nl> _createInvitationLink . setText ( lang ( lng_group_invite_create_new ) ) ; <nl> - _invitationText = _peerChat - > invitationUrl ; <nl> + _invitationText = _peerChat ? _peerChat - > invitationUrl : _peerChannel - > invitationUrl ; <nl> if ( _invitationText . startsWith ( qstr ( " http : / / " ) , Qt : : CaseInsensitive ) ) { <nl> _invitationText = _invitationText . mid ( 7 ) ; <nl> } else if ( _invitationText . startsWith ( qstr ( " https : / / " ) , Qt : : CaseInsensitive ) ) { <nl> ProfileWidget : : ProfileWidget ( QWidget * parent , const PeerData * peer ) : QWidget ( pa <nl> <nl> void ProfileWidget : : onScroll ( ) { <nl> _inner . loadProfilePhotos ( _scroll . scrollTop ( ) ) ; <nl> + if ( ! _scroll . isHidden ( ) & & _scroll . scrollTop ( ) < _scroll . scrollTopMax ( ) ) { <nl> + _inner . allowDecreaseHeight ( _scroll . scrollTopMax ( ) - _scroll . scrollTop ( ) ) ; <nl> + } <nl> } <nl> <nl> void ProfileWidget : : resizeEvent ( QResizeEvent * e ) { <nl> void ProfileWidget : : resizeEvent ( QResizeEvent * e ) { <nl> int32 newScrollY = _scroll . scrollTop ( ) + addToY ; <nl> _scroll . resize ( size ( ) ) ; <nl> _inner . resize ( width ( ) , _inner . height ( ) ) ; <nl> - if ( addToY ) { <nl> - _scroll . scrollToY ( newScrollY ) ; <nl> + if ( ! _scroll . isHidden ( ) ) { <nl> + if ( addToY ) { <nl> + _scroll . scrollToY ( newScrollY ) ; <nl> + } <nl> + if ( _scroll . scrollTop ( ) < _scroll . scrollTopMax ( ) ) { <nl> + _inner . allowDecreaseHeight ( _scroll . scrollTopMax ( ) - _scroll . scrollTop ( ) ) ; <nl> + } <nl> } <nl> } <nl> <nl> int32 ProfileWidget : : lastScrollTop ( ) const { <nl> return _scroll . scrollTop ( ) ; <nl> } <nl> <nl> - bool ProfileWidget : : allMediaShown ( ) const { <nl> - return _inner . allMediaShown ( ) ; <nl> - } <nl> - <nl> - void ProfileWidget : : animShow ( const QPixmap & bgAnimCache , const QPixmap & bgAnimTopBarCache , bool back , int32 lastScrollTop , bool allMediaShown ) { <nl> + void ProfileWidget : : animShow ( const QPixmap & bgAnimCache , const QPixmap & bgAnimTopBarCache , bool back , int32 lastScrollTop ) { <nl> stopGif ( ) ; <nl> _bgAnimCache = bgAnimCache ; <nl> _bgAnimTopBarCache = bgAnimTopBarCache ; <nl> - if ( allMediaShown ) _inner . onMediaShowAll ( ) ; <nl> if ( lastScrollTop > = 0 ) _scroll . scrollToY ( lastScrollTop ) ; <nl> _animCache = myGrab ( this , rect ( ) ) ; <nl> App : : main ( ) - > topBar ( ) - > stopAnim ( ) ; <nl> void ProfileWidget : : updateNotifySettings ( ) { <nl> } <nl> <nl> void ProfileWidget : : mediaOverviewUpdated ( PeerData * peer , MediaOverviewType type ) { <nl> - _inner . mediaOverviewUpdated ( peer , type ) ; <nl> + int32 addToScroll = _inner . mediaOverviewUpdated ( peer , type ) ; <nl> + if ( ! _scroll . isHidden ( ) & & addToScroll & & _scroll . geometry ( ) . contains ( mapFromGlobal ( QCursor : : pos ( ) ) ) ) { <nl> + if ( addToScroll > 0 & & _scroll . scrollTop ( ) + addToScroll > _scroll . scrollTopMax ( ) ) { <nl> + _inner . requestHeight ( _scroll . scrollTop ( ) + addToScroll + _scroll . height ( ) ) ; <nl> + } <nl> + _scroll . scrollToY ( _scroll . scrollTop ( ) + addToScroll ) ; <nl> + } <nl> } <nl> <nl> void ProfileWidget : : clear ( ) { <nl> mmm a / Telegram / SourceFiles / profilewidget . h <nl> ppp b / Telegram / SourceFiles / profilewidget . h <nl> class ProfileInner : public TWidget , public RPCSender , public Animated { <nl> void loadProfilePhotos ( int32 yFrom ) ; <nl> <nl> void updateNotifySettings ( ) ; <nl> - void mediaOverviewUpdated ( PeerData * peer , MediaOverviewType type ) ; <nl> + int32 mediaOverviewUpdated ( PeerData * peer , MediaOverviewType type ) ; / / returns scroll shift <nl> + <nl> + void requestHeight ( int32 newHeight ) ; <nl> + void allowDecreaseHeight ( int32 decreaseBy ) ; <nl> <nl> ~ ProfileInner ( ) ; <nl> <nl> public slots : <nl> <nl> void onKickConfirm ( ) ; <nl> <nl> - void onMediaShowAll ( ) ; <nl> void onMediaPhotos ( ) ; <nl> void onMediaVideos ( ) ; <nl> void onMediaDocuments ( ) ; <nl> public slots : <nl> void updateBotLinksVisibility ( ) ; <nl> <nl> void chatInviteDone ( const MTPExportedChatInvite & result ) ; <nl> + bool updateMediaLinks ( int32 * addToScroll = 0 ) ; / / returns if anything changed <nl> <nl> ProfileWidget * _profile ; <nl> ScrollArea * _scroll ; <nl> public slots : <nl> History * _hist ; <nl> bool _isAdmin ; <nl> <nl> - int32 _width , _left ; <nl> + int32 _width , _left , _addToHeight ; <nl> <nl> / / profile <nl> Text _nameText ; <nl> public slots : <nl> FlatCheckbox _enableNotifications ; <nl> <nl> / / shared media <nl> - bool _allMediaTypes ; <nl> - LinkButton _mediaShowAll ; <nl> + bool _notAllMediaLoaded ; <nl> LinkButton * _mediaButtons [ OverviewCount ] ; <nl> QString overviewLinkText ( int32 type , int32 count ) ; <nl> <nl> class ProfileWidget : public QWidget , public RPCSender , public Animated { <nl> <nl> PeerData * peer ( ) const ; <nl> int32 lastScrollTop ( ) const ; <nl> - bool allMediaShown ( ) const ; <nl> <nl> - void animShow ( const QPixmap & oldAnimCache , const QPixmap & bgAnimTopBarCache , bool back = false , int32 lastScrollTop = - 1 , bool allMediaShown = false ) ; <nl> + void animShow ( const QPixmap & oldAnimCache , const QPixmap & bgAnimTopBarCache , bool back = false , int32 lastScrollTop = - 1 ) ; <nl> bool animStep ( float64 ms ) ; <nl> <nl> void updateOnlineDisplay ( ) ; <nl> mmm a / Telegram / SourceFiles / structs . cpp <nl> ppp b / Telegram / SourceFiles / structs . cpp <nl> PeerData : : PeerData ( const PeerId & id ) : id ( id ) , lnk ( new PeerLink ( this ) ) <nl> , nameVersion ( 0 ) <nl> , notify ( UnknownNotifySettings ) <nl> { <nl> - if ( ! peerIsUser ( id ) ) updateName ( QString ( ) , QString ( ) , QString ( ) ) ; <nl> + if ( ! peerIsUser ( id ) & & ! peerIsChannel ( id ) ) updateName ( QString ( ) , QString ( ) , QString ( ) ) ; <nl> } <nl> <nl> void PeerData : : updateName ( const QString & newName , const QString & newNameOrPhone , const QString & newUsername ) { <nl> void PeerData : : fillNames ( ) { <nl> } <nl> } <nl> <nl> - const Text & PeerData : : dialogName ( ) const { <nl> - return ( isUser ( ) & & ! asUser ( ) - > phoneText . isEmpty ( ) ) ? asUser ( ) - > phoneText : nameText ; <nl> - } <nl> - <nl> - const QString & PeerData : : shortName ( ) const { <nl> - return isUser ( ) ? asUser ( ) - > firstName : name ; <nl> - } <nl> - <nl> void UserData : : setName ( const QString & first , const QString & last , const QString & phoneName , const QString & usern ) { <nl> bool updName = ! first . isEmpty ( ) | | ! last . isEmpty ( ) , updUsername = ( username ! = usern ) ; <nl> <nl> void ChannelData : : setPhoto ( const MTPChatPhoto & p , const PhotoId & phId ) { / / see <nl> } <nl> } <nl> <nl> + void ChannelData : : setName ( const QString & newName , const QString & usern ) { <nl> + bool updName = ! newName . isEmpty ( ) , updUsername = ( username ! = usern ) ; <nl> + <nl> + updateName ( newName . isEmpty ( ) ? name : newName , QString ( ) , usern ) ; <nl> + if ( updUsername ) { <nl> + if ( App : : main ( ) ) { <nl> + App : : main ( ) - > peerUsernameChanged ( this ) ; <nl> + } <nl> + } <nl> + } <nl> + <nl> void PhotoLink : : onClick ( Qt : : MouseButton button ) const { <nl> if ( button = = Qt : : LeftButton ) { <nl> App : : wnd ( ) - > showPhoto ( this , App : : hoveredLinkItem ( ) ) ; <nl> mmm a / Telegram / SourceFiles / structs . h <nl> ppp b / Telegram / SourceFiles / structs . h <nl> ImagePtr chatDefPhoto ( int32 index ) ; <nl> <nl> static const PhotoId UnknownPeerPhotoId = 0xFFFFFFFFFFFFFFFFULL ; <nl> <nl> + inline const QString & emptyUsername ( ) { <nl> + static QString empty ; <nl> + return empty ; <nl> + } <nl> + <nl> class UserData ; <nl> class ChatData ; <nl> class ChannelData ; <nl> class PeerData { <nl> <nl> const Text & dialogName ( ) const ; <nl> const QString & shortName ( ) const ; <nl> + const QString & userName ( ) const ; <nl> <nl> const PeerId id ; <nl> int32 bareId ( ) const { <nl> class ChannelData : public PeerData { <nl> public : <nl> <nl> ChannelData ( const PeerId & id ) : PeerData ( id ) , access ( 0 ) , inputChat ( MTP_inputChannel ( MTP_int ( bareId ( ) ) , MTP_long ( 0 ) ) ) , date ( 0 ) , version ( 0 ) , adminned ( false ) , left ( false ) , forbidden ( true ) , botStatus ( - 1 ) { <nl> + setName ( QString ( ) , QString ( ) ) ; <nl> } <nl> void setPhoto ( const MTPChatPhoto & photo , const PhotoId & phId = UnknownPeerPhotoId ) ; <nl> + void setName ( const QString & name , const QString & username ) ; <nl> <nl> uint64 access ; <nl> <nl> MTPInputChat inputChat ; <nl> <nl> + QString username ; <nl> int32 date ; <nl> int32 version ; <nl> bool adminned ; <nl> inline ChannelData * PeerData : : asChannel ( ) { <nl> inline const ChannelData * PeerData : : asChannel ( ) const { <nl> return isChannel ( ) ? static_cast < const ChannelData * > ( this ) : 0 ; <nl> } <nl> + inline const Text & PeerData : : dialogName ( ) const { <nl> + return ( isUser ( ) & & ! asUser ( ) - > phoneText . isEmpty ( ) ) ? asUser ( ) - > phoneText : nameText ; <nl> + } <nl> + inline const QString & PeerData : : shortName ( ) const { <nl> + return isUser ( ) ? asUser ( ) - > firstName : name ; <nl> + } <nl> + inline const QString & PeerData : : userName ( ) const { <nl> + return isUser ( ) ? asUser ( ) - > username : ( isChannel ( ) ? asChannel ( ) - > username : emptyUsername ( ) ) ; <nl> + } <nl> + <nl> <nl> inline int32 newMessageFlags ( PeerData * p ) { <nl> return ( p - > input . type ( ) = = mtpc_inputPeerSelf ) ? 0 : ( ( ( p - > isChat ( ) | | ( p - > isUser ( ) & & ! p - > asUser ( ) - > botInfo ) ) ? MTPDmessage_flag_unread : 0 ) | MTPDmessage_flag_out ) ; <nl> mmm a / Telegram / SourceFiles / types . cpp <nl> ppp b / Telegram / SourceFiles / types . cpp <nl> namespace { <nl> volatile int32 unixtimeDelta = 0 ; <nl> volatile bool unixtimeWasSet = false ; <nl> volatile uint64 _msgIdStart , _msgIdLocal = 0 , _msgIdMsStart ; <nl> - uint32 _reqId = 0 ; <nl> + int32 _reqId = 0 ; <nl> <nl> void _initMsgIdConstants ( ) { <nl> # ifdef Q_OS_WIN <nl> uint64 msgid ( ) { <nl> return result + ( _msgIdLocal + = 4 ) ; <nl> } <nl> <nl> - uint32 reqid ( ) { <nl> + int32 reqid ( ) { <nl> QWriteLocker locker ( & unixtimeLock ) ; <nl> + if ( _reqId = = INT_MAX ) { <nl> + _reqId = 0 ; <nl> + } <nl> return + + _reqId ; <nl> } <nl> <nl> mmm a / Telegram / SourceFiles / types . h <nl> ppp b / Telegram / SourceFiles / types . h <nl> void unixtimeSet ( int32 servertime , bool force = false ) ; <nl> int32 unixtime ( ) ; <nl> int32 fromServerTime ( const MTPint & serverTime ) ; <nl> uint64 msgid ( ) ; <nl> - uint32 reqid ( ) ; <nl> + int32 reqid ( ) ; <nl> <nl> inline QDateTime date ( int32 time = - 1 ) { <nl> QDateTime result ; <nl>
broadcast channels support started
telegramdesktop/tdesktop
b53e35e04678503fcaa7a1f97bb893e2dc88a7b5
2015-09-06T10:17:09Z
mmm a / tests / trans_sync_across_mixed_cluster_test . sh <nl> ppp b / tests / trans_sync_across_mixed_cluster_test . sh <nl> verifyErrorCode ( ) <nl> <nl> killAll ( ) <nl> { <nl> - programs / launcher / launcher - k 15 <nl> + programs / eosio - launcher / eosio - launcher - k 15 <nl> } <nl> <nl> cleanup ( ) <nl> cleanup <nl> # stand up eosiod cluster <nl> launcherOpts = " - p $ pnodes - n $ total_nodes - s $ topo - d $ delay " <nl> echo Launcher options : - - eosiod \ " - - plugin eosio : : wallet_api_plugin \ " $ launcherOpts <nl> - programs / launcher / launcher - - eosiod " - - plugin eosio : : wallet_api_plugin " $ launcherOpts <nl> + programs / eosio - launcher / eosio - launcher - - eosiod " - - plugin eosio : : wallet_api_plugin " $ launcherOpts <nl> sleep 7 <nl> <nl> startPort = 8888 <nl>
Update launcher path one more time .
EOSIO/eos
815d60a82ac4611003d8a37aa4fd81e8de090bd1
2018-02-02T14:32:46Z
mmm a / buildscripts / resmokeconfig / suites / json_schema . yml <nl> ppp b / buildscripts / resmokeconfig / suites / json_schema . yml <nl> selector : <nl> include_files : <nl> - src / third_party / JSON - Schema - Test - Suite / tests / draft4 / maximum . json <nl> - src / third_party / JSON - Schema - Test - Suite / tests / draft4 / minimum . json <nl> + - src / third_party / JSON - Schema - Test - Suite / tests / draft4 / multipleOf . json <nl> + - src / third_party / JSON - Schema - Test - Suite / tests / draft4 / pattern . json <nl> <nl> executor : <nl> config : <nl> mmm a / jstests / core / json_schema . js <nl> ppp b / jstests / core / json_schema . js <nl> <nl> { _id : 1 } ) <nl> . sort ( { _id : 1 } ) <nl> . toArray ( ) ) ; <nl> + <nl> + coll . drop ( ) ; <nl> + assert . writeOK ( coll . insert ( { _id : 0 , arr : 3 } ) ) ; <nl> + assert . writeOK ( coll . insert ( { _id : 1 , arr : [ 1 , " foo " ] } ) ) ; <nl> + assert . writeOK ( coll . insert ( { _id : 2 , arr : [ { a : 1 } , { b : 2 } ] } ) ) ; <nl> + assert . writeOK ( coll . insert ( { _id : 3 , arr : [ ] } ) ) ; <nl> + assert . writeOK ( coll . insert ( { _id : 4 , arr : { a : [ ] } } ) ) ; <nl> + <nl> + / / Test that the type : " array " restriction works as expected . <nl> + assert . eq ( [ { _id : 1 } , { _id : 2 } , { _id : 3 } ] , <nl> + coll . find ( { $ jsonSchema : { properties : { arr : { type : " array " } } } } , { _id : 1 } ) <nl> + . sort ( { _id : 1 } ) <nl> + . toArray ( ) ) ; <nl> + <nl> + / / Test that type : " number " works correctly in the presence of arrays . <nl> + assert . eq ( [ { _id : 0 } ] , <nl> + coll . find ( { $ jsonSchema : { properties : { arr : { type : " number " } } } } , { _id : 1 } ) <nl> + . sort ( { _id : 1 } ) <nl> + . toArray ( ) ) ; <nl> } ( ) ) ; <nl> mmm a / src / mongo / db / matcher / SConscript <nl> ppp b / src / mongo / db / matcher / SConscript <nl> env . Library ( <nl> ' expression_text_base . cpp ' , <nl> ' expression_text_noop . cpp ' , <nl> ' expression_tree . cpp ' , <nl> + ' expression_type . cpp ' , <nl> ' expression_where_base . cpp ' , <nl> ' expression_where_noop . cpp ' , <nl> ' expression_with_placeholder . cpp ' , <nl> env . Library ( <nl> ' match_details . cpp ' , <nl> ' matchable . cpp ' , <nl> ' matcher . cpp ' , <nl> + ' matcher_type_alias . cpp ' , <nl> ' schema / expression_internal_schema_all_elem_match_from_index . cpp ' , <nl> ' schema / expression_internal_schema_cond . cpp ' , <nl> ' schema / expression_internal_schema_fmod . cpp ' , <nl> env . Library ( <nl> env . CppUnitTest ( <nl> target = ' expression_test ' , <nl> source = [ <nl> - ' expression_array_test . cpp ' , <nl> ' expression_always_boolean_test . cpp ' , <nl> + ' expression_array_test . cpp ' , <nl> ' expression_geo_test . cpp ' , <nl> ' expression_leaf_test . cpp ' , <nl> ' expression_parser_geo_test . cpp ' , <nl> ' expression_test . cpp ' , <nl> ' expression_tree_test . cpp ' , <nl> + ' expression_type_test . cpp ' , <nl> ' expression_with_placeholder_test . cpp ' , <nl> ' path_accepting_keyword_test . cpp ' , <nl> - ' schema / expression_internal_schema_all_elem_match_from_index_test . cpp ' , <nl> + ' schema / expression_internal_schema_all_elem_match_from_index_test . cpp ' , <nl> ' schema / expression_internal_schema_cond_test . cpp ' , <nl> ' schema / expression_internal_schema_fmod_test . cpp ' , <nl> ' schema / expression_internal_schema_match_array_index_test . cpp ' , <nl> env . CppUnitTest ( <nl> ' expression_parser_leaf_test . cpp ' , <nl> ' expression_parser_test . cpp ' , <nl> ' expression_parser_tree_test . cpp ' , <nl> + ' matcher_type_alias_test . cpp ' , <nl> ' schema / expression_parser_schema_test . cpp ' , <nl> ] , <nl> LIBDEPS = [ <nl> mmm a / src / mongo / db / matcher / expression . h <nl> ppp b / src / mongo / db / matcher / expression . h <nl> class MatchExpression { <nl> INTERNAL_SCHEMA_ALL_ELEM_MATCH_FROM_INDEX , <nl> INTERNAL_SCHEMA_COND , <nl> INTERNAL_SCHEMA_FMOD , <nl> + INTERNAL_SCHEMA_MATCH_ARRAY_INDEX , <nl> INTERNAL_SCHEMA_MAX_ITEMS , <nl> - INTERNAL_SCHEMA_MIN_ITEMS , <nl> + INTERNAL_SCHEMA_MAX_LENGTH , <nl> INTERNAL_SCHEMA_MAX_PROPERTIES , <nl> + INTERNAL_SCHEMA_MIN_ITEMS , <nl> + INTERNAL_SCHEMA_MIN_LENGTH , <nl> INTERNAL_SCHEMA_MIN_PROPERTIES , <nl> INTERNAL_SCHEMA_OBJECT_MATCH , <nl> + INTERNAL_SCHEMA_TYPE , <nl> INTERNAL_SCHEMA_UNIQUE_ITEMS , <nl> INTERNAL_SCHEMA_XOR , <nl> - INTERNAL_SCHEMA_MIN_LENGTH , <nl> - INTERNAL_SCHEMA_MAX_LENGTH , <nl> - INTERNAL_SCHEMA_MATCH_ARRAY_INDEX , <nl> } ; <nl> <nl> MatchExpression ( MatchType type ) ; <nl> mmm a / src / mongo / db / matcher / expression_leaf . cpp <nl> ppp b / src / mongo / db / matcher / expression_leaf . cpp <nl> bool ExistsMatchExpression : : equivalent ( const MatchExpression * other ) const { <nl> <nl> / / mmm - <nl> <nl> - const std : : string TypeMatchExpression : : kMatchesAllNumbersAlias = " number " ; <nl> - <nl> - const stdx : : unordered_map < std : : string , BSONType > TypeMatchExpression : : typeAliasMap = { <nl> - { typeName ( BSONType : : NumberDouble ) , BSONType : : NumberDouble } , <nl> - { typeName ( BSONType : : String ) , BSONType : : String } , <nl> - { typeName ( BSONType : : Object ) , BSONType : : Object } , <nl> - { typeName ( BSONType : : Array ) , BSONType : : Array } , <nl> - { typeName ( BSONType : : BinData ) , BSONType : : BinData } , <nl> - { typeName ( BSONType : : Undefined ) , BSONType : : Undefined } , <nl> - { typeName ( BSONType : : jstOID ) , BSONType : : jstOID } , <nl> - { typeName ( BSONType : : Bool ) , BSONType : : Bool } , <nl> - { typeName ( BSONType : : Date ) , BSONType : : Date } , <nl> - { typeName ( BSONType : : jstNULL ) , BSONType : : jstNULL } , <nl> - { typeName ( BSONType : : RegEx ) , BSONType : : RegEx } , <nl> - { typeName ( BSONType : : DBRef ) , BSONType : : DBRef } , <nl> - { typeName ( BSONType : : Code ) , BSONType : : Code } , <nl> - { typeName ( BSONType : : Symbol ) , BSONType : : Symbol } , <nl> - { typeName ( BSONType : : CodeWScope ) , BSONType : : CodeWScope } , <nl> - { typeName ( BSONType : : NumberInt ) , BSONType : : NumberInt } , <nl> - { typeName ( BSONType : : bsonTimestamp ) , BSONType : : bsonTimestamp } , <nl> - { typeName ( BSONType : : NumberLong ) , BSONType : : NumberLong } , <nl> - { typeName ( BSONType : : NumberDecimal ) , BSONType : : NumberDecimal } , <nl> - { typeName ( BSONType : : MaxKey ) , BSONType : : MaxKey } , <nl> - { typeName ( BSONType : : MinKey ) , BSONType : : MinKey } } ; <nl> - <nl> - Status TypeMatchExpression : : init ( StringData path , Type type ) { <nl> - _type = std : : move ( type ) ; <nl> - return setPath ( path ) ; <nl> - } <nl> - <nl> - bool TypeMatchExpression : : matchesSingleElement ( const BSONElement & e , MatchDetails * details ) const { <nl> - if ( _type . allNumbers ) { <nl> - return e . isNumber ( ) ; <nl> - } <nl> - <nl> - return e . type ( ) = = _type . bsonType ; <nl> - } <nl> - <nl> - void TypeMatchExpression : : debugString ( StringBuilder & debug , int level ) const { <nl> - _debugAddSpace ( debug , level ) ; <nl> - debug < < path ( ) < < " type : " ; <nl> - if ( matchesAllNumbers ( ) ) { <nl> - debug < < kMatchesAllNumbersAlias ; <nl> - } else { <nl> - debug < < _type . bsonType ; <nl> - } <nl> - <nl> - MatchExpression : : TagData * td = getTag ( ) ; <nl> - if ( NULL ! = td ) { <nl> - debug < < " " ; <nl> - td - > debugString ( & debug ) ; <nl> - } <nl> - debug < < " \ n " ; <nl> - } <nl> - <nl> - void TypeMatchExpression : : serialize ( BSONObjBuilder * out ) const { <nl> - if ( matchesAllNumbers ( ) ) { <nl> - out - > append ( path ( ) , BSON ( " $ type " < < kMatchesAllNumbersAlias ) ) ; <nl> - } else { <nl> - out - > append ( path ( ) , BSON ( " $ type " < < _type . bsonType ) ) ; <nl> - } <nl> - } <nl> - <nl> - bool TypeMatchExpression : : equivalent ( const MatchExpression * other ) const { <nl> - if ( matchType ( ) ! = other - > matchType ( ) ) <nl> - return false ; <nl> - <nl> - const TypeMatchExpression * realOther = static_cast < const TypeMatchExpression * > ( other ) ; <nl> - <nl> - if ( path ( ) ! = realOther - > path ( ) ) { <nl> - return false ; <nl> - } <nl> - <nl> - if ( _type . allNumbers ) { <nl> - return realOther - > _type . allNumbers ; <nl> - } <nl> - <nl> - return _type . bsonType = = realOther - > _type . bsonType ; <nl> - } <nl> - <nl> - <nl> - / / mmmmmmmmm - - <nl> - <nl> Status InMatchExpression : : init ( StringData path ) { <nl> return setPath ( path ) ; <nl> } <nl> mmm a / src / mongo / db / matcher / expression_leaf . h <nl> ppp b / src / mongo / db / matcher / expression_leaf . h <nl> class LeafMatchExpression : public PathMatchExpression { <nl> <nl> virtual ~ LeafMatchExpression ( ) { } <nl> <nl> - bool shouldExpandLeafArray ( ) const final { <nl> + bool shouldExpandLeafArray ( ) const override { <nl> return true ; <nl> } <nl> <nl> - MatchCategory getCategory ( ) const final { <nl> + MatchCategory getCategory ( ) const override { <nl> return MatchCategory : : kLeaf ; <nl> } <nl> } ; <nl> class InMatchExpression : public LeafMatchExpression { <nl> std : : vector < std : : unique_ptr < RegexMatchExpression > > _regexes ; <nl> } ; <nl> <nl> - / * * <nl> - * Implements matching for $ type . <nl> - * / <nl> - class TypeMatchExpression : public LeafMatchExpression { <nl> - public : <nl> - static const std : : string kMatchesAllNumbersAlias ; <nl> - static const stdx : : unordered_map < std : : string , BSONType > typeAliasMap ; <nl> - <nl> - / * * <nl> - * Represents either a particular BSON type , or the " number " type , which is an alias for all <nl> - * numeric BSON types . <nl> - * / <nl> - struct Type { <nl> - Type ( ) = default ; <nl> - / * implicit * / Type ( BSONType bsonType ) : bsonType ( bsonType ) { } <nl> - <nl> - bool allNumbers = false ; <nl> - BSONType bsonType = BSONType : : EOO ; <nl> - } ; <nl> - <nl> - TypeMatchExpression ( ) : LeafMatchExpression ( TYPE_OPERATOR ) { } <nl> - <nl> - Status init ( StringData path , Type type ) ; <nl> - <nl> - std : : unique_ptr < MatchExpression > shallowClone ( ) const override { <nl> - std : : unique_ptr < TypeMatchExpression > e = stdx : : make_unique < TypeMatchExpression > ( ) ; <nl> - invariantOK ( e - > init ( path ( ) , _type ) ) ; <nl> - if ( getTag ( ) ) { <nl> - e - > setTag ( getTag ( ) - > clone ( ) ) ; <nl> - } <nl> - return std : : move ( e ) ; <nl> - } <nl> - <nl> - bool matchesSingleElement ( const BSONElement & , MatchDetails * details = nullptr ) const final ; <nl> - <nl> - void debugString ( StringBuilder & debug , int level ) const override ; <nl> - <nl> - void serialize ( BSONObjBuilder * out ) const override ; <nl> - <nl> - bool equivalent ( const MatchExpression * other ) const override ; <nl> - <nl> - BSONType getBSONType ( ) const { <nl> - return _type . bsonType ; <nl> - } <nl> - <nl> - Type getType ( ) const { <nl> - return _type ; <nl> - } <nl> - <nl> - / * * <nl> - * Whether or not to match against all number types ( NumberDouble , NumberLong , and NumberInt ) . <nl> - * Defaults to false . If this is true , _type is EOO . <nl> - * / <nl> - bool matchesAllNumbers ( ) const { <nl> - return _type . allNumbers ; <nl> - } <nl> - <nl> - private : <nl> - bool _matches ( StringData path , const MatchableDocument * doc , MatchDetails * details = 0 ) const ; <nl> - <nl> - Type _type ; <nl> - } ; <nl> - <nl> / * * <nl> * Bit test query operators include $ bitsAllSet , $ bitsAllClear , $ bitsAnySet , and $ bitsAnyClear . <nl> * / <nl> mmm a / src / mongo / db / matcher / expression_leaf_test . cpp <nl> ppp b / src / mongo / db / matcher / expression_leaf_test . cpp <nl> TEST ( ExistsMatchExpression , Equivalent ) { <nl> ASSERT ( ! e1 . equivalent ( & e2 ) ) ; <nl> } <nl> <nl> - TEST ( TypeMatchExpression , MatchesElementStringType ) { <nl> - BSONObj match = BSON ( " a " <nl> - < < " abc " ) ; <nl> - BSONObj notMatch = BSON ( " a " < < 5 ) ; <nl> - TypeMatchExpression type ; <nl> - ASSERT ( type . init ( " " , String ) . isOK ( ) ) ; <nl> - ASSERT ( type . matchesSingleElement ( match [ " a " ] ) ) ; <nl> - ASSERT ( ! type . matchesSingleElement ( notMatch [ " a " ] ) ) ; <nl> - } <nl> - <nl> - TEST ( TypeMatchExpression , MatchesElementNullType ) { <nl> - BSONObj match = BSON ( " a " < < BSONNULL ) ; <nl> - BSONObj notMatch = BSON ( " a " <nl> - < < " abc " ) ; <nl> - TypeMatchExpression type ; <nl> - ASSERT ( type . init ( " " , jstNULL ) . isOK ( ) ) ; <nl> - ASSERT ( type . matchesSingleElement ( match [ " a " ] ) ) ; <nl> - ASSERT ( ! type . matchesSingleElement ( notMatch [ " a " ] ) ) ; <nl> - } <nl> - <nl> - TEST ( TypeMatchExpression , MatchesElementNumber ) { <nl> - BSONObj match1 = BSON ( " a " < < 1 ) ; <nl> - BSONObj match2 = BSON ( " a " < < 1LL ) ; <nl> - BSONObj match3 = BSON ( " a " < < 2 . 5 ) ; <nl> - BSONObj notMatch = BSON ( " a " <nl> - < < " abc " ) ; <nl> - ASSERT_EQ ( BSONType : : NumberInt , match1 [ " a " ] . type ( ) ) ; <nl> - ASSERT_EQ ( BSONType : : NumberLong , match2 [ " a " ] . type ( ) ) ; <nl> - ASSERT_EQ ( BSONType : : NumberDouble , match3 [ " a " ] . type ( ) ) ; <nl> - <nl> - TypeMatchExpression typeExpr ; <nl> - TypeMatchExpression : : Type type ; <nl> - type . allNumbers = true ; <nl> - ASSERT_OK ( typeExpr . init ( " a " , type ) ) ; <nl> - ASSERT_EQ ( " a " , typeExpr . path ( ) ) ; <nl> - ASSERT_TRUE ( typeExpr . matchesSingleElement ( match1 [ " a " ] ) ) ; <nl> - ASSERT_TRUE ( typeExpr . matchesSingleElement ( match2 [ " a " ] ) ) ; <nl> - ASSERT_TRUE ( typeExpr . matchesSingleElement ( match3 [ " a " ] ) ) ; <nl> - ASSERT_FALSE ( typeExpr . matchesSingleElement ( notMatch [ " a " ] ) ) ; <nl> - } <nl> - <nl> - TEST ( TypeMatchExpression , MatchesScalar ) { <nl> - TypeMatchExpression type ; <nl> - ASSERT ( type . init ( " a " , Bool ) . isOK ( ) ) ; <nl> - ASSERT ( type . matchesBSON ( BSON ( " a " < < true ) , NULL ) ) ; <nl> - ASSERT ( ! type . matchesBSON ( BSON ( " a " < < 1 ) , NULL ) ) ; <nl> - } <nl> - <nl> - TEST ( TypeMatchExpression , MatchesArray ) { <nl> - TypeMatchExpression type ; <nl> - ASSERT ( type . init ( " a " , NumberInt ) . isOK ( ) ) ; <nl> - ASSERT ( type . matchesBSON ( BSON ( " a " < < BSON_ARRAY ( 4 ) ) , NULL ) ) ; <nl> - ASSERT ( type . matchesBSON ( BSON ( " a " < < BSON_ARRAY ( 4 < < " a " ) ) , NULL ) ) ; <nl> - ASSERT ( type . matchesBSON ( BSON ( " a " < < BSON_ARRAY ( " a " < < 4 ) ) , NULL ) ) ; <nl> - ASSERT ( ! type . matchesBSON ( BSON ( " a " < < BSON_ARRAY ( " a " ) ) , NULL ) ) ; <nl> - ASSERT ( ! type . matchesBSON ( BSON ( " a " < < BSON_ARRAY ( BSON_ARRAY ( 4 ) ) ) , NULL ) ) ; <nl> - } <nl> - <nl> - TEST ( TypeMatchExpression , TypeArrayMatchesOuterAndInnerArray ) { <nl> - TypeMatchExpression type ; <nl> - ASSERT ( type . init ( " a " , Array ) . isOK ( ) ) ; <nl> - ASSERT ( type . matchesBSON ( BSON ( " a " < < BSONArray ( ) ) , nullptr ) ) ; <nl> - ASSERT ( type . matchesBSON ( BSON ( " a " < < BSON_ARRAY ( 4 < < " a " ) ) , nullptr ) ) ; <nl> - ASSERT ( type . matchesBSON ( BSON ( " a " < < BSON_ARRAY ( BSONArray ( ) < < 2 ) ) , nullptr ) ) ; <nl> - ASSERT ( ! type . matchesBSON ( BSON ( " a " <nl> - < < " bar " ) , <nl> - nullptr ) ) ; <nl> - } <nl> - <nl> - TEST ( TypeMatchExpression , MatchesObject ) { <nl> - TypeMatchExpression type ; <nl> - ASSERT ( type . init ( " a " , Object ) . isOK ( ) ) ; <nl> - ASSERT ( type . matchesBSON ( BSON ( " a " < < BSON ( " b " < < 1 ) ) , NULL ) ) ; <nl> - ASSERT ( ! type . matchesBSON ( BSON ( " a " < < 1 ) , NULL ) ) ; <nl> - } <nl> - <nl> - TEST ( TypeMatchExpression , MatchesDotNotationFieldObject ) { <nl> - TypeMatchExpression type ; <nl> - ASSERT ( type . init ( " a . b " , Object ) . isOK ( ) ) ; <nl> - ASSERT ( type . matchesBSON ( BSON ( " a " < < BSON ( " b " < < BSON ( " c " < < 1 ) ) ) , NULL ) ) ; <nl> - ASSERT ( ! type . matchesBSON ( BSON ( " a " < < BSON ( " b " < < 1 ) ) , NULL ) ) ; <nl> - } <nl> - <nl> - TEST ( TypeMatchExpression , MatchesDotNotationArrayElementArray ) { <nl> - TypeMatchExpression type ; <nl> - ASSERT ( type . init ( " a . 0 " , Array ) . isOK ( ) ) ; <nl> - ASSERT ( type . matchesBSON ( BSON ( " a " < < BSON_ARRAY ( BSON_ARRAY ( 1 ) ) ) , NULL ) ) ; <nl> - ASSERT ( ! type . matchesBSON ( BSON ( " a " < < BSON_ARRAY ( " b " ) ) , NULL ) ) ; <nl> - } <nl> - <nl> - TEST ( TypeMatchExpression , MatchesDotNotationArrayElementScalar ) { <nl> - TypeMatchExpression type ; <nl> - ASSERT ( type . init ( " a . 0 " , String ) . isOK ( ) ) ; <nl> - ASSERT ( type . matchesBSON ( BSON ( " a " < < BSON_ARRAY ( " b " ) ) , NULL ) ) ; <nl> - ASSERT ( ! type . matchesBSON ( BSON ( " a " < < BSON_ARRAY ( 1 ) ) , NULL ) ) ; <nl> - } <nl> - <nl> - TEST ( TypeMatchExpression , MatchesDotNotationArrayElementObject ) { <nl> - TypeMatchExpression type ; <nl> - ASSERT ( type . init ( " a . 0 " , Object ) . isOK ( ) ) ; <nl> - ASSERT ( type . matchesBSON ( BSON ( " a " < < BSON_ARRAY ( BSON ( " b " < < 1 ) ) ) , NULL ) ) ; <nl> - ASSERT ( ! type . matchesBSON ( BSON ( " a " < < BSON_ARRAY ( 1 ) ) , NULL ) ) ; <nl> - } <nl> - <nl> - TEST ( TypeMatchExpression , MatchesNull ) { <nl> - TypeMatchExpression type ; <nl> - ASSERT ( type . init ( " a " , jstNULL ) . isOK ( ) ) ; <nl> - ASSERT ( type . matchesBSON ( BSON ( " a " < < BSONNULL ) , NULL ) ) ; <nl> - ASSERT ( ! type . matchesBSON ( BSON ( " a " < < 4 ) , NULL ) ) ; <nl> - ASSERT ( ! type . matchesBSON ( BSONObj ( ) , NULL ) ) ; <nl> - } <nl> - <nl> - TEST ( TypeMatchExpression , ElemMatchKey ) { <nl> - TypeMatchExpression type ; <nl> - ASSERT ( type . init ( " a . b " , String ) . isOK ( ) ) ; <nl> - MatchDetails details ; <nl> - details . requestElemMatchKey ( ) ; <nl> - ASSERT ( ! type . matchesBSON ( BSON ( " a " < < 1 ) , & details ) ) ; <nl> - ASSERT ( ! details . hasElemMatchKey ( ) ) ; <nl> - ASSERT ( type . matchesBSON ( BSON ( " a " < < BSON ( " b " <nl> - < < " string " ) ) , <nl> - & details ) ) ; <nl> - ASSERT ( ! details . hasElemMatchKey ( ) ) ; <nl> - ASSERT ( type . matchesBSON ( BSON ( " a " < < BSON ( " b " < < BSON_ARRAY ( " string " ) ) ) , & details ) ) ; <nl> - ASSERT ( details . hasElemMatchKey ( ) ) ; <nl> - ASSERT_EQUALS ( " 0 " , details . elemMatchKey ( ) ) ; <nl> - ASSERT ( type . matchesBSON ( BSON ( " a " < < BSON_ARRAY ( 2 < < BSON ( " b " < < BSON_ARRAY ( " string " ) ) ) ) , <nl> - & details ) ) ; <nl> - ASSERT ( details . hasElemMatchKey ( ) ) ; <nl> - ASSERT_EQUALS ( " 1 " , details . elemMatchKey ( ) ) ; <nl> - } <nl> - <nl> - TEST ( TypeMatchExpression , Equivalent ) { <nl> - TypeMatchExpression e1 ; <nl> - TypeMatchExpression e2 ; <nl> - TypeMatchExpression e3 ; <nl> - ASSERT_OK ( e1 . init ( " a " , BSONType : : String ) ) ; <nl> - ASSERT_OK ( e2 . init ( " a " , BSONType : : NumberDouble ) ) ; <nl> - ASSERT_OK ( e3 . init ( " b " , BSONType : : String ) ) ; <nl> - <nl> - ASSERT ( e1 . equivalent ( & e1 ) ) ; <nl> - ASSERT ( ! e1 . equivalent ( & e2 ) ) ; <nl> - ASSERT ( ! e1 . equivalent ( & e3 ) ) ; <nl> - } <nl> - <nl> TEST ( InMatchExpression , MatchesElementSingle ) { <nl> BSONArray operand = BSON_ARRAY ( 1 ) ; <nl> BSONObj match = BSON ( " a " < < 1 ) ; <nl> mmm a / src / mongo / db / matcher / expression_parser . cpp <nl> ppp b / src / mongo / db / matcher / expression_parser . cpp <nl> <nl> # include " mongo / db / matcher / expression_geo . h " <nl> # include " mongo / db / matcher / expression_leaf . h " <nl> # include " mongo / db / matcher / expression_tree . h " <nl> + # include " mongo / db / matcher / expression_type . h " <nl> # include " mongo / db / matcher / expression_with_placeholder . h " <nl> # include " mongo / db / matcher / schema / expression_internal_schema_all_elem_match_from_index . h " <nl> # include " mongo / db / matcher / schema / expression_internal_schema_cond . h " <nl> StatusWithMatchExpression MatchExpressionParser : : _parseSubField ( <nl> } <nl> <nl> case PathAcceptingKeyword : : TYPE : <nl> - return _parseType ( name , e , expCtx ) ; <nl> + return _parseType < TypeMatchExpression > ( name , e , expCtx ) ; <nl> <nl> case PathAcceptingKeyword : : MOD : <nl> return _parseMOD ( name , e , expCtx ) ; <nl> StatusWithMatchExpression MatchExpressionParser : : _parseSubField ( <nl> } <nl> return { std : : move ( expr ) } ; <nl> } <nl> + <nl> + case PathAcceptingKeyword : : INTERNAL_SCHEMA_TYPE : { <nl> + return _parseType < InternalSchemaTypeExpression > ( name , e , expCtx ) ; <nl> + } <nl> } <nl> + <nl> return { Status ( ErrorCodes : : BadValue , <nl> mongoutils : : str : : stream ( ) < < " not handled : " < < e . fieldName ( ) ) } ; <nl> } <nl> Status MatchExpressionParser : : _parseInExpression ( <nl> return inExpression - > setEqualities ( std : : move ( equalities ) ) ; <nl> } <nl> <nl> - StatusWith < std : : unique_ptr < TypeMatchExpression > > MatchExpressionParser : : parseTypeFromAlias ( <nl> - StringData path , StringData typeAlias ) { <nl> - auto typeExpr = stdx : : make_unique < TypeMatchExpression > ( ) ; <nl> - <nl> - TypeMatchExpression : : Type type ; <nl> - <nl> - if ( typeAlias = = TypeMatchExpression : : kMatchesAllNumbersAlias ) { <nl> - type . allNumbers = true ; <nl> - Status status = typeExpr - > init ( path , type ) ; <nl> - if ( ! status . isOK ( ) ) { <nl> - return status ; <nl> - } <nl> - return { std : : move ( typeExpr ) } ; <nl> - } <nl> - <nl> - auto it = TypeMatchExpression : : typeAliasMap . find ( typeAlias . toString ( ) ) ; <nl> - if ( it = = TypeMatchExpression : : typeAliasMap . end ( ) ) { <nl> - return Status ( ErrorCodes : : BadValue , <nl> - str : : stream ( ) < < " Unknown string alias for $ type : " < < typeAlias ) ; <nl> - } <nl> - <nl> - type . bsonType = it - > second ; <nl> - Status status = typeExpr - > init ( path , type ) ; <nl> - if ( ! status . isOK ( ) ) { <nl> - return status ; <nl> - } <nl> - return { std : : move ( typeExpr ) } ; <nl> - } <nl> - <nl> + template < class T > <nl> StatusWithMatchExpression MatchExpressionParser : : _parseType ( <nl> const char * name , <nl> const BSONElement & elt , <nl> const boost : : intrusive_ptr < ExpressionContext > & expCtx ) { <nl> - if ( ! elt . isNumber ( ) & & elt . type ( ) ! = BSONType : : String ) { <nl> - return Status ( ErrorCodes : : TypeMismatch , " argument to $ type is not a number or a string " ) ; <nl> + auto parsedType = MatcherTypeAlias : : parse ( elt ) ; <nl> + if ( ! parsedType . isOK ( ) ) { <nl> + return parsedType . getStatus ( ) ; <nl> } <nl> <nl> - if ( elt . type ( ) = = BSONType : : String ) { <nl> - auto typeExpr = parseTypeFromAlias ( name , elt . valueStringData ( ) ) ; <nl> - if ( ! typeExpr . isOK ( ) ) { <nl> - return typeExpr . getStatus ( ) ; <nl> - } <nl> - <nl> - return { std : : move ( typeExpr . getValue ( ) ) } ; <nl> - } <nl> - <nl> - invariant ( elt . isNumber ( ) ) ; <nl> - int typeInt = elt . numberInt ( ) ; <nl> - if ( elt . type ( ) ! = BSONType : : NumberInt & & typeInt ! = elt . number ( ) ) { <nl> - typeInt = - 1 ; <nl> - } <nl> - <nl> - if ( ! isValidBSONType ( typeInt ) ) { <nl> - return Status ( ErrorCodes : : BadValue , <nl> - str : : stream ( ) < < " Invalid numerical $ type code : " < < typeInt ) ; <nl> - } <nl> - <nl> - auto typeExpr = stdx : : make_unique < TypeMatchExpression > ( ) ; <nl> - auto status = typeExpr - > init ( name , static_cast < BSONType > ( typeInt ) ) ; <nl> + auto typeExpr = stdx : : make_unique < T > ( ) ; <nl> + auto status = typeExpr - > init ( name , parsedType . getValue ( ) ) ; <nl> if ( ! status . isOK ( ) ) { <nl> return status ; <nl> } <nl> MONGO_INITIALIZER ( MatchExpressionParser ) ( InitializerContext * context ) { <nl> queryOperatorMap = <nl> stdx : : make_unique < StringMap < PathAcceptingKeyword > > ( StringMap < PathAcceptingKeyword > { <nl> / / TODO : SERVER - 19565 Add $ eq after auditing callers . <nl> - { " lt " , PathAcceptingKeyword : : LESS_THAN } , <nl> - { " lte " , PathAcceptingKeyword : : LESS_THAN_OR_EQUAL } , <nl> - { " gte " , PathAcceptingKeyword : : GREATER_THAN_OR_EQUAL } , <nl> - { " gt " , PathAcceptingKeyword : : GREATER_THAN } , <nl> - { " in " , PathAcceptingKeyword : : IN_EXPR } , <nl> - { " ne " , PathAcceptingKeyword : : NOT_EQUAL } , <nl> - { " size " , PathAcceptingKeyword : : SIZE } , <nl> + { " _internalSchemaAllElemMatchFromIndex " , <nl> + PathAcceptingKeyword : : INTERNAL_SCHEMA_ALL_ELEM_MATCH_FROM_INDEX } , <nl> + { " _internalSchemaFmod " , PathAcceptingKeyword : : INTERNAL_SCHEMA_FMOD } , <nl> + { " _internalSchemaMatchArrayIndex " , <nl> + PathAcceptingKeyword : : INTERNAL_SCHEMA_MATCH_ARRAY_INDEX } , <nl> + { " _internalSchemaMaxItems " , PathAcceptingKeyword : : INTERNAL_SCHEMA_MAX_ITEMS } , <nl> + { " _internalSchemaMaxLength " , PathAcceptingKeyword : : INTERNAL_SCHEMA_MAX_LENGTH } , <nl> + { " _internalSchemaMaxLength " , PathAcceptingKeyword : : INTERNAL_SCHEMA_MAX_LENGTH } , <nl> + { " _internalSchemaMinItems " , PathAcceptingKeyword : : INTERNAL_SCHEMA_MIN_ITEMS } , <nl> + { " _internalSchemaMinItems " , PathAcceptingKeyword : : INTERNAL_SCHEMA_MIN_ITEMS } , <nl> + { " _internalSchemaMinLength " , PathAcceptingKeyword : : INTERNAL_SCHEMA_MIN_LENGTH } , <nl> + { " _internalSchemaObjectMatch " , PathAcceptingKeyword : : INTERNAL_SCHEMA_OBJECT_MATCH } , <nl> + { " _internalSchemaType " , PathAcceptingKeyword : : INTERNAL_SCHEMA_TYPE } , <nl> + { " _internalSchemaUniqueItems " , PathAcceptingKeyword : : INTERNAL_SCHEMA_UNIQUE_ITEMS } , <nl> { " all " , PathAcceptingKeyword : : ALL } , <nl> - { " nin " , PathAcceptingKeyword : : NOT_IN } , <nl> + { " bitsAllClear " , PathAcceptingKeyword : : BITS_ALL_CLEAR } , <nl> + { " bitsAllSet " , PathAcceptingKeyword : : BITS_ALL_SET } , <nl> + { " bitsAnyClear " , PathAcceptingKeyword : : BITS_ANY_CLEAR } , <nl> + { " bitsAnySet " , PathAcceptingKeyword : : BITS_ANY_SET } , <nl> + { " elemMatch " , PathAcceptingKeyword : : ELEM_MATCH } , <nl> { " exists " , PathAcceptingKeyword : : EXISTS } , <nl> + { " geoIntersects " , PathAcceptingKeyword : : GEO_INTERSECTS } , <nl> + { " geoNear " , PathAcceptingKeyword : : GEO_NEAR } , <nl> + { " geoWithin " , PathAcceptingKeyword : : WITHIN } , <nl> + { " gt " , PathAcceptingKeyword : : GREATER_THAN } , <nl> + { " gte " , PathAcceptingKeyword : : GREATER_THAN_OR_EQUAL } , <nl> + { " in " , PathAcceptingKeyword : : IN_EXPR } , <nl> + { " lt " , PathAcceptingKeyword : : LESS_THAN } , <nl> + { " lte " , PathAcceptingKeyword : : LESS_THAN_OR_EQUAL } , <nl> { " mod " , PathAcceptingKeyword : : MOD } , <nl> - { " type " , PathAcceptingKeyword : : TYPE } , <nl> - { " regex " , PathAcceptingKeyword : : REGEX } , <nl> - { " options " , PathAcceptingKeyword : : OPTIONS } , <nl> - { " elemMatch " , PathAcceptingKeyword : : ELEM_MATCH } , <nl> + { " ne " , PathAcceptingKeyword : : NOT_EQUAL } , <nl> { " near " , PathAcceptingKeyword : : GEO_NEAR } , <nl> { " nearSphere " , PathAcceptingKeyword : : GEO_NEAR } , <nl> - { " geoNear " , PathAcceptingKeyword : : GEO_NEAR } , <nl> + { " nin " , PathAcceptingKeyword : : NOT_IN } , <nl> + { " options " , PathAcceptingKeyword : : OPTIONS } , <nl> + { " regex " , PathAcceptingKeyword : : REGEX } , <nl> + { " size " , PathAcceptingKeyword : : SIZE } , <nl> + { " type " , PathAcceptingKeyword : : TYPE } , <nl> { " within " , PathAcceptingKeyword : : WITHIN } , <nl> - { " geoWithin " , PathAcceptingKeyword : : WITHIN } , <nl> - { " geoIntersects " , PathAcceptingKeyword : : GEO_INTERSECTS } , <nl> - { " bitsAllSet " , PathAcceptingKeyword : : BITS_ALL_SET } , <nl> - { " bitsAllClear " , PathAcceptingKeyword : : BITS_ALL_CLEAR } , <nl> - { " bitsAnySet " , PathAcceptingKeyword : : BITS_ANY_SET } , <nl> - { " bitsAnyClear " , PathAcceptingKeyword : : BITS_ANY_CLEAR } , <nl> - { " _internalSchemaAllElemMatchFromIndex " , <nl> - PathAcceptingKeyword : : INTERNAL_SCHEMA_ALL_ELEM_MATCH_FROM_INDEX } , <nl> - { " _internalSchemaFmod " , PathAcceptingKeyword : : INTERNAL_SCHEMA_FMOD } , <nl> - { " _internalSchemaMinItems " , PathAcceptingKeyword : : INTERNAL_SCHEMA_MIN_ITEMS } , <nl> - { " _internalSchemaMaxItems " , PathAcceptingKeyword : : INTERNAL_SCHEMA_MAX_ITEMS } , <nl> - { " _internalSchemaUniqueItems " , PathAcceptingKeyword : : INTERNAL_SCHEMA_UNIQUE_ITEMS } , <nl> - { " _internalSchemaObjectMatch " , PathAcceptingKeyword : : INTERNAL_SCHEMA_OBJECT_MATCH } , <nl> - { " _internalSchemaMinLength " , PathAcceptingKeyword : : INTERNAL_SCHEMA_MIN_LENGTH } , <nl> - { " _internalSchemaMaxLength " , PathAcceptingKeyword : : INTERNAL_SCHEMA_MAX_LENGTH } , <nl> - { " _internalSchemaMatchArrayIndex " , <nl> - PathAcceptingKeyword : : INTERNAL_SCHEMA_MATCH_ARRAY_INDEX } } ) ; <nl> + } ) ; <nl> return Status : : OK ( ) ; <nl> } <nl> } / / anonymous namespace <nl> mmm a / src / mongo / db / matcher / expression_parser . h <nl> ppp b / src / mongo / db / matcher / expression_parser . h <nl> <nl> # include " mongo / db / matcher / expression . h " <nl> # include " mongo / db / matcher / expression_leaf . h " <nl> # include " mongo / db / matcher / expression_tree . h " <nl> + # include " mongo / db / matcher / expression_type . h " <nl> # include " mongo / db / matcher / extensions_callback . h " <nl> # include " mongo / db / pipeline / expression_context . h " <nl> # include " mongo / stdx / functional . h " <nl> class CollatorInterface ; <nl> class OperationContext ; <nl> <nl> enum class PathAcceptingKeyword { <nl> - EQUALITY , <nl> - LESS_THAN , <nl> - LESS_THAN_OR_EQUAL , <nl> - GREATER_THAN_OR_EQUAL , <nl> - GREATER_THAN , <nl> - IN_EXPR , <nl> - NOT_EQUAL , <nl> - SIZE , <nl> ALL , <nl> - NOT_IN , <nl> - EXISTS , <nl> - MOD , <nl> - TYPE , <nl> - REGEX , <nl> - OPTIONS , <nl> - ELEM_MATCH , <nl> - GEO_NEAR , <nl> - WITHIN , <nl> - GEO_INTERSECTS , <nl> - BITS_ALL_SET , <nl> BITS_ALL_CLEAR , <nl> - BITS_ANY_SET , <nl> + BITS_ALL_SET , <nl> BITS_ANY_CLEAR , <nl> + BITS_ANY_SET , <nl> + ELEM_MATCH , <nl> + EQUALITY , <nl> + EXISTS , <nl> + GEO_INTERSECTS , <nl> + GEO_NEAR , <nl> + GREATER_THAN , <nl> + GREATER_THAN_OR_EQUAL , <nl> INTERNAL_SCHEMA_ALL_ELEM_MATCH_FROM_INDEX , <nl> INTERNAL_SCHEMA_FMOD , <nl> - INTERNAL_SCHEMA_MIN_ITEMS , <nl> + INTERNAL_SCHEMA_MATCH_ARRAY_INDEX , <nl> INTERNAL_SCHEMA_MAX_ITEMS , <nl> - INTERNAL_SCHEMA_UNIQUE_ITEMS , <nl> - INTERNAL_SCHEMA_OBJECT_MATCH , <nl> - INTERNAL_SCHEMA_MIN_LENGTH , <nl> INTERNAL_SCHEMA_MAX_LENGTH , <nl> - INTERNAL_SCHEMA_MATCH_ARRAY_INDEX , <nl> + INTERNAL_SCHEMA_MIN_ITEMS , <nl> + INTERNAL_SCHEMA_MIN_LENGTH , <nl> + INTERNAL_SCHEMA_OBJECT_MATCH , <nl> + INTERNAL_SCHEMA_TYPE , <nl> + INTERNAL_SCHEMA_UNIQUE_ITEMS , <nl> + IN_EXPR , <nl> + LESS_THAN , <nl> + LESS_THAN_OR_EQUAL , <nl> + MOD , <nl> + NOT_EQUAL , <nl> + NOT_IN , <nl> + OPTIONS , <nl> + REGEX , <nl> + SIZE , <nl> + TYPE , <nl> + WITHIN , <nl> } ; <nl> <nl> class MatchExpressionParser { <nl> class MatchExpressionParser { <nl> * / <nl> static StatusWith < long long > parseIntegerElementToLong ( BSONElement elem ) ; <nl> <nl> - / * * <nl> - * Given a path over which to match , and a type alias ( e . g . " long " , " number " , or " object " ) , <nl> - * returns the corresponding $ type match expression node . <nl> - * / <nl> - static StatusWith < std : : unique_ptr < TypeMatchExpression > > parseTypeFromAlias ( <nl> - StringData path , StringData typeAlias ) ; <nl> - <nl> private : <nl> MatchExpressionParser ( const ExtensionsCallback * extensionsCallback ) <nl> : _extensionsCallback ( extensionsCallback ) { } <nl> class MatchExpressionParser { <nl> const CollatorInterface * collator , <nl> const boost : : intrusive_ptr < ExpressionContext > & expCtx ) ; <nl> <nl> + template < class T > <nl> StatusWithMatchExpression _parseType ( const char * name , <nl> const BSONElement & elt , <nl> const boost : : intrusive_ptr < ExpressionContext > & expCtx ) ; <nl> mmm a / src / mongo / db / matcher / expression_parser_test . cpp <nl> ppp b / src / mongo / db / matcher / expression_parser_test . cpp <nl> TEST ( MatchExpressionParserTest , ParseIntegerElementToLongAcceptsThree ) { <nl> ASSERT_EQ ( result . getValue ( ) , 3LL ) ; <nl> } <nl> <nl> - TEST ( MatchExpressionParserTest , ParseTypeFromAliasCanParseNumberAlias ) { <nl> - auto result = MatchExpressionParser : : parseTypeFromAlias ( " a " , " number " ) ; <nl> - ASSERT_OK ( result . getStatus ( ) ) ; <nl> - ASSERT_EQ ( result . getValue ( ) - > path ( ) , " a " ) ; <nl> - ASSERT_TRUE ( result . getValue ( ) - > getType ( ) . allNumbers ) ; <nl> - ASSERT_TRUE ( result . getValue ( ) - > matchesAllNumbers ( ) ) ; <nl> - } <nl> - <nl> - TEST ( MatchExpressionParserTest , ParseTypeFromAliasCanParseLongAlias ) { <nl> - auto result = MatchExpressionParser : : parseTypeFromAlias ( " a " , " long " ) ; <nl> - ASSERT_OK ( result . getStatus ( ) ) ; <nl> - ASSERT_EQ ( result . getValue ( ) - > path ( ) , " a " ) ; <nl> - ASSERT_FALSE ( result . getValue ( ) - > getType ( ) . allNumbers ) ; <nl> - ASSERT_FALSE ( result . getValue ( ) - > matchesAllNumbers ( ) ) ; <nl> - ASSERT_EQ ( result . getValue ( ) - > getType ( ) . bsonType , BSONType : : NumberLong ) ; <nl> - ASSERT_EQ ( result . getValue ( ) - > getBSONType ( ) , BSONType : : NumberLong ) ; <nl> - } <nl> - <nl> - TEST ( MatchExpressionParserTest , ParseTypeFromAliasFailsToParseUnknownAlias ) { <nl> - auto result = MatchExpressionParser : : parseTypeFromAlias ( " a " , " unknown " ) ; <nl> - ASSERT_NOT_OK ( result . getStatus ( ) ) ; <nl> - } <nl> - <nl> StatusWith < int > fib ( int n ) { <nl> if ( n < 0 ) <nl> return StatusWith < int > ( ErrorCodes : : BadValue , " paramter to fib has to be > = 0 " ) ; <nl> mmm a / src / mongo / db / matcher / expression_serialization_test . cpp <nl> ppp b / src / mongo / db / matcher / expression_serialization_test . cpp <nl> TEST ( SerializeBasic , ExpressionTypeWithNumberSerializesCorrectly ) { <nl> ASSERT_EQ ( original . matches ( obj ) , reserialized . matches ( obj ) ) ; <nl> } <nl> <nl> + TEST ( SerializeInternalSchema , InternalSchemaTypeExpressionSerializesCorrectly ) { <nl> + Matcher original ( <nl> + fromjson ( " { x : { $ _internalSchemaType : 2 } } " ) , ExtensionsCallbackNoop ( ) , kSimpleCollator ) ; <nl> + Matcher reserialized ( <nl> + serialize ( original . getMatchExpression ( ) ) , ExtensionsCallbackNoop ( ) , kSimpleCollator ) ; <nl> + ASSERT_BSONOBJ_EQ ( * reserialized . getQuery ( ) , fromjson ( " { x : { $ _internalSchemaType : 2 } } " ) ) ; <nl> + ASSERT_BSONOBJ_EQ ( * reserialized . getQuery ( ) , serialize ( reserialized . getMatchExpression ( ) ) ) ; <nl> + <nl> + BSONObj obj = fromjson ( " { x : 3 } " ) ; <nl> + ASSERT_EQ ( original . matches ( obj ) , reserialized . matches ( obj ) ) ; <nl> + <nl> + obj = fromjson ( " { x : ' 3 ' } " ) ; <nl> + ASSERT_EQ ( original . matches ( obj ) , reserialized . matches ( obj ) ) ; <nl> + } <nl> + <nl> + TEST ( SerializeInternalSchema , InternalSchemaTypeExpressionWithNumberSerializesCorrectly ) { <nl> + Matcher original ( fromjson ( " { x : { $ _internalSchemaType : ' number ' } } " ) , <nl> + ExtensionsCallbackNoop ( ) , <nl> + kSimpleCollator ) ; <nl> + Matcher reserialized ( <nl> + serialize ( original . getMatchExpression ( ) ) , ExtensionsCallbackNoop ( ) , kSimpleCollator ) ; <nl> + ASSERT_BSONOBJ_EQ ( * reserialized . getQuery ( ) , fromjson ( " { x : { $ _internalSchemaType : ' number ' } } " ) ) ; <nl> + ASSERT_BSONOBJ_EQ ( * reserialized . getQuery ( ) , serialize ( reserialized . getMatchExpression ( ) ) ) ; <nl> + <nl> + BSONObj obj = fromjson ( " { x : 3 } " ) ; <nl> + ASSERT_EQ ( original . matches ( obj ) , reserialized . matches ( obj ) ) ; <nl> + <nl> + obj = fromjson ( " { x : ' 3 ' } " ) ; <nl> + ASSERT_EQ ( original . matches ( obj ) , reserialized . matches ( obj ) ) ; <nl> + } <nl> + <nl> TEST ( SerializeBasic , ExpressionEmptySerializesCorrectly ) { <nl> Matcher original ( fromjson ( " { } " ) , ExtensionsCallbackNoop ( ) , kSimpleCollator ) ; <nl> Matcher reserialized ( <nl> new file mode 100644 <nl> index 000000000000 . . d5ad8fc08149 <nl> mmm / dev / null <nl> ppp b / src / mongo / db / matcher / expression_type . cpp <nl> <nl> + / * * <nl> + * Copyright ( C ) 2017 MongoDB Inc . <nl> + * <nl> + * This program is free software : you can redistribute it and / or modify <nl> + * it under the terms of the GNU Affero General Public License , version 3 , <nl> + * as published by the Free Software Foundation . <nl> + * <nl> + * This program is distributed in the hope that it will be useful , <nl> + * but WITHOUT ANY WARRANTY ; without even the implied warranty of <nl> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the <nl> + * GNU Affero General Public License for more details . <nl> + * <nl> + * You should have received a copy of the GNU Affero General Public License <nl> + * along with this program . If not , see < http : / / www . gnu . org / licenses / > . <nl> + * <nl> + * As a special exception , the copyright holders give permission to link the <nl> + * code of portions of this program with the OpenSSL library under certain <nl> + * conditions as described in each individual source file and distribute <nl> + * linked combinations including the program with the OpenSSL library . You <nl> + * must comply with the GNU Affero General Public License in all respects <nl> + * for all of the code used other than as permitted herein . If you modify <nl> + * file ( s ) with this exception , you may extend this exception to your <nl> + * version of the file ( s ) , but you are not obligated to do so . If you do not <nl> + * wish to do so , delete this exception statement from your version . If you <nl> + * delete this exception statement from all source files in the program , <nl> + * then also delete it in the license file . <nl> + * / <nl> + <nl> + # include " mongo / platform / basic . h " <nl> + <nl> + # include " mongo / db / matcher / expression_type . h " <nl> + <nl> + namespace mongo { <nl> + <nl> + constexpr StringData TypeMatchExpression : : kName ; <nl> + constexpr StringData InternalSchemaTypeExpression : : kName ; <nl> + <nl> + } / / namespace mongo <nl> new file mode 100644 <nl> index 000000000000 . . a77f7d7c7d1c <nl> mmm / dev / null <nl> ppp b / src / mongo / db / matcher / expression_type . h <nl> <nl> + / * * <nl> + * Copyright ( C ) 2017 MongoDB Inc . <nl> + * <nl> + * This program is free software : you can redistribute it and / or modify <nl> + * it under the terms of the GNU Affero General Public License , version 3 , <nl> + * as published by the Free Software Foundation . <nl> + * <nl> + * This program is distributed in the hope that it will be useful , <nl> + * but WITHOUT ANY WARRANTY ; without even the implied warranty of <nl> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the <nl> + * GNU Affero General Public License for more details . <nl> + * <nl> + * You should have received a copy of the GNU Affero General Public License <nl> + * along with this program . If not , see < http : / / www . gnu . org / licenses / > . <nl> + * <nl> + * As a special exception , the copyright holders give permission to link the <nl> + * code of portions of this program with the OpenSSL library under certain <nl> + * conditions as described in each individual source file and distribute <nl> + * linked combinations including the program with the OpenSSL library . You <nl> + * must comply with the GNU Affero General Public License in all respects <nl> + * for all of the code used other than as permitted herein . If you modify <nl> + * file ( s ) with this exception , you may extend this exception to your <nl> + * version of the file ( s ) , but you are not obligated to do so . If you do not <nl> + * wish to do so , delete this exception statement from your version . If you <nl> + * delete this exception statement from all source files in the program , <nl> + * then also delete it in the license file . <nl> + * / <nl> + <nl> + # pragma once <nl> + <nl> + # include " mongo / db / matcher / expression_leaf . h " <nl> + # include " mongo / db / matcher / matcher_type_alias . h " <nl> + <nl> + namespace mongo { <nl> + <nl> + template < class T > <nl> + class TypeMatchExpressionBase : public LeafMatchExpression { <nl> + public : <nl> + explicit TypeMatchExpressionBase ( MatchType matchType ) : LeafMatchExpression ( matchType ) { } <nl> + <nl> + virtual ~ TypeMatchExpressionBase ( ) = default ; <nl> + <nl> + / * * <nl> + * Returns the name of this MatchExpression . <nl> + * / <nl> + virtual StringData name ( ) const = 0 ; <nl> + <nl> + Status init ( StringData path , MatcherTypeAlias type ) { <nl> + _type = std : : move ( type ) ; <nl> + return setPath ( path ) ; <nl> + } <nl> + <nl> + std : : unique_ptr < MatchExpression > shallowClone ( ) const final { <nl> + auto expr = stdx : : make_unique < T > ( ) ; <nl> + invariantOK ( expr - > init ( path ( ) , _type ) ) ; <nl> + if ( getTag ( ) ) { <nl> + expr - > setTag ( getTag ( ) - > clone ( ) ) ; <nl> + } <nl> + return std : : move ( expr ) ; <nl> + } <nl> + <nl> + bool matchesSingleElement ( const BSONElement & elem , <nl> + MatchDetails * details = nullptr ) const final { <nl> + return getType ( ) . elementMatchesType ( elem ) ; <nl> + } <nl> + <nl> + void debugString ( StringBuilder & debug , int level ) const final { <nl> + _debugAddSpace ( debug , level ) ; <nl> + debug < < path ( ) < < " " < < name ( ) < < " : " ; <nl> + if ( matchesAllNumbers ( ) ) { <nl> + debug < < MatcherTypeAlias : : kMatchesAllNumbersAlias ; <nl> + } else { <nl> + debug < < _type . bsonType ; <nl> + } <nl> + <nl> + MatchExpression : : TagData * td = getTag ( ) ; <nl> + if ( td ) { <nl> + debug < < " " ; <nl> + td - > debugString ( & debug ) ; <nl> + } <nl> + debug < < " \ n " ; <nl> + } <nl> + <nl> + void serialize ( BSONObjBuilder * out ) const final { <nl> + BSONObjBuilder subBuilder ( out - > subobjStart ( path ( ) ) ) ; <nl> + if ( matchesAllNumbers ( ) ) { <nl> + subBuilder . append ( name ( ) , MatcherTypeAlias : : kMatchesAllNumbersAlias ) ; <nl> + } else { <nl> + subBuilder . append ( name ( ) , _type . bsonType ) ; <nl> + } <nl> + subBuilder . doneFast ( ) ; <nl> + } <nl> + <nl> + bool equivalent ( const MatchExpression * other ) const final { <nl> + if ( matchType ( ) ! = other - > matchType ( ) ) <nl> + return false ; <nl> + <nl> + auto realOther = static_cast < const T * > ( other ) ; <nl> + <nl> + if ( path ( ) ! = realOther - > path ( ) ) { <nl> + return false ; <nl> + } <nl> + <nl> + if ( _type . allNumbers ) { <nl> + return realOther - > _type . allNumbers ; <nl> + } <nl> + <nl> + return _type . bsonType = = realOther - > _type . bsonType ; <nl> + } <nl> + <nl> + BSONType getBSONType ( ) const { <nl> + return _type . bsonType ; <nl> + } <nl> + <nl> + MatcherTypeAlias getType ( ) const { <nl> + return _type ; <nl> + } <nl> + <nl> + / * * <nl> + * Whether or not to match against all number types ( NumberDouble , NumberLong , and NumberInt ) . <nl> + * Defaults to false . If this is true , _type is EOO . <nl> + * / <nl> + bool matchesAllNumbers ( ) const { <nl> + return _type . allNumbers ; <nl> + } <nl> + <nl> + private : <nl> + MatcherTypeAlias _type ; <nl> + } ; <nl> + <nl> + class TypeMatchExpression final : public TypeMatchExpressionBase < TypeMatchExpression > { <nl> + public : <nl> + static constexpr StringData kName = " $ type " _sd ; <nl> + <nl> + TypeMatchExpression ( ) : TypeMatchExpressionBase ( MatchExpression : : TYPE_OPERATOR ) { } <nl> + <nl> + StringData name ( ) const final { <nl> + return kName ; <nl> + } <nl> + } ; <nl> + <nl> + / * * <nl> + * Implements matching semantics for the JSON Schema type keyword . Although the MongoDB query <nl> + * language has a $ type operator , its meaning for arrays differs from JSON Schema . Therefore , we <nl> + * implement a separate type node for schema matching . <nl> + * / <nl> + class InternalSchemaTypeExpression final <nl> + : public TypeMatchExpressionBase < InternalSchemaTypeExpression > { <nl> + public : <nl> + static constexpr StringData kName = " $ _internalSchemaType " _sd ; <nl> + <nl> + InternalSchemaTypeExpression ( ) <nl> + : TypeMatchExpressionBase ( MatchExpression : : INTERNAL_SCHEMA_TYPE ) { } <nl> + <nl> + StringData name ( ) const final { <nl> + return kName ; <nl> + } <nl> + <nl> + MatchCategory getCategory ( ) const final { <nl> + return MatchCategory : : kOther ; <nl> + } <nl> + <nl> + bool shouldExpandLeafArray ( ) const final { <nl> + return false ; <nl> + } <nl> + } ; <nl> + <nl> + } / / namespace mongo <nl> new file mode 100644 <nl> index 000000000000 . . 759527cbd311 <nl> mmm / dev / null <nl> ppp b / src / mongo / db / matcher / expression_type_test . cpp <nl> <nl> + / * * <nl> + * Copyright ( C ) 2017 MongoDB Inc . <nl> + * <nl> + * This program is free software : you can redistribute it and / or modify <nl> + * it under the terms of the GNU Affero General Public License , version 3 , <nl> + * as published by the Free Software Foundation . <nl> + * <nl> + * This program is distributed in the hope that it will be useful , <nl> + * but WITHOUT ANY WARRANTY ; without even the implied warranty of <nl> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the <nl> + * GNU Affero General Public License for more details . <nl> + * <nl> + * You should have received a copy of the GNU Affero General Public License <nl> + * along with this program . If not , see < http : / / www . gnu . org / licenses / > . <nl> + * <nl> + * As a special exception , the copyright holders give permission to link the <nl> + * code of portions of this program with the OpenSSL library under certain <nl> + * conditions as described in each individual source file and distribute <nl> + * linked combinations including the program with the OpenSSL library . You <nl> + * must comply with the GNU Affero General Public License in all respects <nl> + * for all of the code used other than as permitted herein . If you modify <nl> + * file ( s ) with this exception , you may extend this exception to your <nl> + * version of the file ( s ) , but you are not obligated to do so . If you do not <nl> + * wish to do so , delete this exception statement from your version . If you <nl> + * delete this exception statement from all source files in the program , <nl> + * then also delete it in the license file . <nl> + * / <nl> + <nl> + # include " mongo / db / matcher / expression_type . h " <nl> + # include " mongo / bson / json . h " <nl> + # include " mongo / unittest / unittest . h " <nl> + <nl> + namespace mongo { <nl> + namespace { <nl> + <nl> + TEST ( ExpressionTypeTest , MatchesElementStringType ) { <nl> + BSONObj match = BSON ( " a " <nl> + < < " abc " ) ; <nl> + BSONObj notMatch = BSON ( " a " < < 5 ) ; <nl> + TypeMatchExpression type ; <nl> + ASSERT ( type . init ( " " , String ) . isOK ( ) ) ; <nl> + ASSERT ( type . matchesSingleElement ( match [ " a " ] ) ) ; <nl> + ASSERT ( ! type . matchesSingleElement ( notMatch [ " a " ] ) ) ; <nl> + } <nl> + <nl> + TEST ( ExpressionTypeTest , MatchesElementNullType ) { <nl> + BSONObj match = BSON ( " a " < < BSONNULL ) ; <nl> + BSONObj notMatch = BSON ( " a " <nl> + < < " abc " ) ; <nl> + TypeMatchExpression type ; <nl> + ASSERT ( type . init ( " " , jstNULL ) . isOK ( ) ) ; <nl> + ASSERT ( type . matchesSingleElement ( match [ " a " ] ) ) ; <nl> + ASSERT ( ! type . matchesSingleElement ( notMatch [ " a " ] ) ) ; <nl> + } <nl> + <nl> + TEST ( ExpressionTypeTest , MatchesElementNumber ) { <nl> + BSONObj match1 = BSON ( " a " < < 1 ) ; <nl> + BSONObj match2 = BSON ( " a " < < 1LL ) ; <nl> + BSONObj match3 = BSON ( " a " < < 2 . 5 ) ; <nl> + BSONObj notMatch = BSON ( " a " <nl> + < < " abc " ) ; <nl> + ASSERT_EQ ( BSONType : : NumberInt , match1 [ " a " ] . type ( ) ) ; <nl> + ASSERT_EQ ( BSONType : : NumberLong , match2 [ " a " ] . type ( ) ) ; <nl> + ASSERT_EQ ( BSONType : : NumberDouble , match3 [ " a " ] . type ( ) ) ; <nl> + <nl> + TypeMatchExpression typeExpr ; <nl> + MatcherTypeAlias type ; <nl> + type . allNumbers = true ; <nl> + ASSERT_OK ( typeExpr . init ( " a " , type ) ) ; <nl> + ASSERT_EQ ( " a " , typeExpr . path ( ) ) ; <nl> + ASSERT_TRUE ( typeExpr . matchesSingleElement ( match1 [ " a " ] ) ) ; <nl> + ASSERT_TRUE ( typeExpr . matchesSingleElement ( match2 [ " a " ] ) ) ; <nl> + ASSERT_TRUE ( typeExpr . matchesSingleElement ( match3 [ " a " ] ) ) ; <nl> + ASSERT_FALSE ( typeExpr . matchesSingleElement ( notMatch [ " a " ] ) ) ; <nl> + } <nl> + <nl> + TEST ( ExpressionTypeTest , MatchesScalar ) { <nl> + TypeMatchExpression type ; <nl> + ASSERT ( type . init ( " a " , Bool ) . isOK ( ) ) ; <nl> + ASSERT ( type . matchesBSON ( BSON ( " a " < < true ) , NULL ) ) ; <nl> + ASSERT ( ! type . matchesBSON ( BSON ( " a " < < 1 ) , NULL ) ) ; <nl> + } <nl> + <nl> + TEST ( ExpressionTypeTest , MatchesArray ) { <nl> + TypeMatchExpression type ; <nl> + ASSERT ( type . init ( " a " , NumberInt ) . isOK ( ) ) ; <nl> + ASSERT ( type . matchesBSON ( BSON ( " a " < < BSON_ARRAY ( 4 ) ) , NULL ) ) ; <nl> + ASSERT ( type . matchesBSON ( BSON ( " a " < < BSON_ARRAY ( 4 < < " a " ) ) , NULL ) ) ; <nl> + ASSERT ( type . matchesBSON ( BSON ( " a " < < BSON_ARRAY ( " a " < < 4 ) ) , NULL ) ) ; <nl> + ASSERT ( ! type . matchesBSON ( BSON ( " a " < < BSON_ARRAY ( " a " ) ) , NULL ) ) ; <nl> + ASSERT ( ! type . matchesBSON ( BSON ( " a " < < BSON_ARRAY ( BSON_ARRAY ( 4 ) ) ) , NULL ) ) ; <nl> + } <nl> + <nl> + TEST ( ExpressionTypeTest , TypeArrayMatchesOuterAndInnerArray ) { <nl> + TypeMatchExpression type ; <nl> + ASSERT ( type . init ( " a " , Array ) . isOK ( ) ) ; <nl> + ASSERT ( type . matchesBSON ( BSON ( " a " < < BSONArray ( ) ) , nullptr ) ) ; <nl> + ASSERT ( type . matchesBSON ( BSON ( " a " < < BSON_ARRAY ( 4 < < " a " ) ) , nullptr ) ) ; <nl> + ASSERT ( type . matchesBSON ( BSON ( " a " < < BSON_ARRAY ( BSONArray ( ) < < 2 ) ) , nullptr ) ) ; <nl> + ASSERT ( ! type . matchesBSON ( BSON ( " a " <nl> + < < " bar " ) , <nl> + nullptr ) ) ; <nl> + } <nl> + <nl> + TEST ( ExpressionTypeTest , MatchesObject ) { <nl> + TypeMatchExpression type ; <nl> + ASSERT ( type . init ( " a " , Object ) . isOK ( ) ) ; <nl> + ASSERT ( type . matchesBSON ( BSON ( " a " < < BSON ( " b " < < 1 ) ) , NULL ) ) ; <nl> + ASSERT ( ! type . matchesBSON ( BSON ( " a " < < 1 ) , NULL ) ) ; <nl> + } <nl> + <nl> + TEST ( ExpressionTypeTest , MatchesDotNotationFieldObject ) { <nl> + TypeMatchExpression type ; <nl> + ASSERT ( type . init ( " a . b " , Object ) . isOK ( ) ) ; <nl> + ASSERT ( type . matchesBSON ( BSON ( " a " < < BSON ( " b " < < BSON ( " c " < < 1 ) ) ) , NULL ) ) ; <nl> + ASSERT ( ! type . matchesBSON ( BSON ( " a " < < BSON ( " b " < < 1 ) ) , NULL ) ) ; <nl> + } <nl> + <nl> + TEST ( ExpressionTypeTest , MatchesDotNotationArrayElementArray ) { <nl> + TypeMatchExpression type ; <nl> + ASSERT ( type . init ( " a . 0 " , Array ) . isOK ( ) ) ; <nl> + ASSERT ( type . matchesBSON ( BSON ( " a " < < BSON_ARRAY ( BSON_ARRAY ( 1 ) ) ) , NULL ) ) ; <nl> + ASSERT ( ! type . matchesBSON ( BSON ( " a " < < BSON_ARRAY ( " b " ) ) , NULL ) ) ; <nl> + } <nl> + <nl> + TEST ( ExpressionTypeTest , MatchesDotNotationArrayElementScalar ) { <nl> + TypeMatchExpression type ; <nl> + ASSERT ( type . init ( " a . 0 " , String ) . isOK ( ) ) ; <nl> + ASSERT ( type . matchesBSON ( BSON ( " a " < < BSON_ARRAY ( " b " ) ) , NULL ) ) ; <nl> + ASSERT ( ! type . matchesBSON ( BSON ( " a " < < BSON_ARRAY ( 1 ) ) , NULL ) ) ; <nl> + } <nl> + <nl> + TEST ( ExpressionTypeTest , MatchesDotNotationArrayElementObject ) { <nl> + TypeMatchExpression type ; <nl> + ASSERT ( type . init ( " a . 0 " , Object ) . isOK ( ) ) ; <nl> + ASSERT ( type . matchesBSON ( BSON ( " a " < < BSON_ARRAY ( BSON ( " b " < < 1 ) ) ) , NULL ) ) ; <nl> + ASSERT ( ! type . matchesBSON ( BSON ( " a " < < BSON_ARRAY ( 1 ) ) , NULL ) ) ; <nl> + } <nl> + <nl> + TEST ( ExpressionTypeTest , MatchesNull ) { <nl> + TypeMatchExpression type ; <nl> + ASSERT ( type . init ( " a " , jstNULL ) . isOK ( ) ) ; <nl> + ASSERT ( type . matchesBSON ( BSON ( " a " < < BSONNULL ) , NULL ) ) ; <nl> + ASSERT ( ! type . matchesBSON ( BSON ( " a " < < 4 ) , NULL ) ) ; <nl> + ASSERT ( ! type . matchesBSON ( BSONObj ( ) , NULL ) ) ; <nl> + } <nl> + <nl> + TEST ( ExpressionTypeTest , ElemMatchKey ) { <nl> + TypeMatchExpression type ; <nl> + ASSERT ( type . init ( " a . b " , String ) . isOK ( ) ) ; <nl> + MatchDetails details ; <nl> + details . requestElemMatchKey ( ) ; <nl> + ASSERT ( ! type . matchesBSON ( BSON ( " a " < < 1 ) , & details ) ) ; <nl> + ASSERT ( ! details . hasElemMatchKey ( ) ) ; <nl> + ASSERT ( type . matchesBSON ( BSON ( " a " < < BSON ( " b " <nl> + < < " string " ) ) , <nl> + & details ) ) ; <nl> + ASSERT ( ! details . hasElemMatchKey ( ) ) ; <nl> + ASSERT ( type . matchesBSON ( BSON ( " a " < < BSON ( " b " < < BSON_ARRAY ( " string " ) ) ) , & details ) ) ; <nl> + ASSERT ( details . hasElemMatchKey ( ) ) ; <nl> + ASSERT_EQUALS ( " 0 " , details . elemMatchKey ( ) ) ; <nl> + ASSERT ( type . matchesBSON ( BSON ( " a " < < BSON_ARRAY ( 2 < < BSON ( " b " < < BSON_ARRAY ( " string " ) ) ) ) , <nl> + & details ) ) ; <nl> + ASSERT ( details . hasElemMatchKey ( ) ) ; <nl> + ASSERT_EQUALS ( " 1 " , details . elemMatchKey ( ) ) ; <nl> + } <nl> + <nl> + TEST ( ExpressionTypeTest , Equivalent ) { <nl> + TypeMatchExpression e1 ; <nl> + TypeMatchExpression e2 ; <nl> + TypeMatchExpression e3 ; <nl> + ASSERT_OK ( e1 . init ( " a " , BSONType : : String ) ) ; <nl> + ASSERT_OK ( e2 . init ( " a " , BSONType : : NumberDouble ) ) ; <nl> + ASSERT_OK ( e3 . init ( " b " , BSONType : : String ) ) ; <nl> + <nl> + ASSERT ( e1 . equivalent ( & e1 ) ) ; <nl> + ASSERT ( ! e1 . equivalent ( & e2 ) ) ; <nl> + ASSERT ( ! e1 . equivalent ( & e3 ) ) ; <nl> + } <nl> + <nl> + TEST ( ExpressionTypeTest , InternalSchemaTypeArrayOnlyMatchesArrays ) { <nl> + InternalSchemaTypeExpression expr ; <nl> + ASSERT_OK ( expr . init ( " a " , BSONType : : Array ) ) ; <nl> + ASSERT_TRUE ( expr . matchesBSON ( fromjson ( " { a : [ ] } " ) ) ) ; <nl> + ASSERT_TRUE ( expr . matchesBSON ( fromjson ( " { a : [ 1 ] } " ) ) ) ; <nl> + ASSERT_TRUE ( expr . matchesBSON ( fromjson ( " { a : [ { b : 1 } , { b : 2 } ] } " ) ) ) ; <nl> + ASSERT_FALSE ( expr . matchesBSON ( fromjson ( " { a : 1 } " ) ) ) ; <nl> + ASSERT_FALSE ( expr . matchesBSON ( fromjson ( " { a : { b : [ ] } } " ) ) ) ; <nl> + } <nl> + <nl> + TEST ( ExpressionTypeTest , InternalSchemaTypeNumberDoesNotMatchArrays ) { <nl> + InternalSchemaTypeExpression expr ; <nl> + MatcherTypeAlias typeAlias ; <nl> + typeAlias . allNumbers = true ; <nl> + ASSERT_OK ( expr . init ( " a " , typeAlias ) ) ; <nl> + ASSERT_FALSE ( expr . matchesBSON ( fromjson ( " { a : [ ] } " ) ) ) ; <nl> + ASSERT_FALSE ( expr . matchesBSON ( fromjson ( " { a : [ 1 ] } " ) ) ) ; <nl> + ASSERT_FALSE ( expr . matchesBSON ( fromjson ( " { a : [ ' b ' , 2 , 3 ] } " ) ) ) ; <nl> + ASSERT_FALSE ( expr . matchesBSON ( fromjson ( " { a : [ { b : 1 } , { b : 2 } ] } " ) ) ) ; <nl> + ASSERT_FALSE ( expr . matchesBSON ( fromjson ( " { a : { b : [ ] } } " ) ) ) ; <nl> + ASSERT_TRUE ( expr . matchesBSON ( fromjson ( " { a : 1 } " ) ) ) ; <nl> + } <nl> + <nl> + } / / namespace <nl> + } / / namepace mongo <nl> new file mode 100644 <nl> index 000000000000 . . 4f6ccafc78fa <nl> mmm / dev / null <nl> ppp b / src / mongo / db / matcher / matcher_type_alias . cpp <nl> <nl> + / * * <nl> + * Copyright ( C ) 2017 MongoDB Inc . <nl> + * <nl> + * This program is free software : you can redistribute it and / or modify <nl> + * it under the terms of the GNU Affero General Public License , version 3 , <nl> + * as published by the Free Software Foundation . <nl> + * <nl> + * This program is distributed in the hope that it will be useful , <nl> + * but WITHOUT ANY WARRANTY ; without even the implied warranty of <nl> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the <nl> + * GNU Affero General Public License for more details . <nl> + * <nl> + * You should have received a copy of the GNU Affero General Public License <nl> + * along with this program . If not , see < http : / / www . gnu . org / licenses / > . <nl> + * <nl> + * As a special exception , the copyright holders give permission to link the <nl> + * code of portions of this program with the OpenSSL library under certain <nl> + * conditions as described in each individual source file and distribute <nl> + * linked combinations including the program with the OpenSSL library . You <nl> + * must comply with the GNU Affero General Public License in all respects <nl> + * for all of the code used other than as permitted herein . If you modify <nl> + * file ( s ) with this exception , you may extend this exception to your <nl> + * version of the file ( s ) , but you are not obligated to do so . If you do not <nl> + * wish to do so , delete this exception statement from your version . If you <nl> + * delete this exception statement from all source files in the program , <nl> + * then also delete it in the license file . <nl> + * / <nl> + <nl> + # include " mongo / platform / basic . h " <nl> + <nl> + # include " mongo / db / matcher / matcher_type_alias . h " <nl> + <nl> + namespace mongo { <nl> + <nl> + constexpr StringData MatcherTypeAlias : : kMatchesAllNumbersAlias ; <nl> + <nl> + const stdx : : unordered_map < std : : string , BSONType > MatcherTypeAlias : : typeAliasMap = { <nl> + { typeName ( BSONType : : NumberDouble ) , BSONType : : NumberDouble } , <nl> + { typeName ( BSONType : : String ) , BSONType : : String } , <nl> + { typeName ( BSONType : : Object ) , BSONType : : Object } , <nl> + { typeName ( BSONType : : Array ) , BSONType : : Array } , <nl> + { typeName ( BSONType : : BinData ) , BSONType : : BinData } , <nl> + { typeName ( BSONType : : Undefined ) , BSONType : : Undefined } , <nl> + { typeName ( BSONType : : jstOID ) , BSONType : : jstOID } , <nl> + { typeName ( BSONType : : Bool ) , BSONType : : Bool } , <nl> + { typeName ( BSONType : : Date ) , BSONType : : Date } , <nl> + { typeName ( BSONType : : jstNULL ) , BSONType : : jstNULL } , <nl> + { typeName ( BSONType : : RegEx ) , BSONType : : RegEx } , <nl> + { typeName ( BSONType : : DBRef ) , BSONType : : DBRef } , <nl> + { typeName ( BSONType : : Code ) , BSONType : : Code } , <nl> + { typeName ( BSONType : : Symbol ) , BSONType : : Symbol } , <nl> + { typeName ( BSONType : : CodeWScope ) , BSONType : : CodeWScope } , <nl> + { typeName ( BSONType : : NumberInt ) , BSONType : : NumberInt } , <nl> + { typeName ( BSONType : : bsonTimestamp ) , BSONType : : bsonTimestamp } , <nl> + { typeName ( BSONType : : NumberLong ) , BSONType : : NumberLong } , <nl> + { typeName ( BSONType : : NumberDecimal ) , BSONType : : NumberDecimal } , <nl> + { typeName ( BSONType : : MaxKey ) , BSONType : : MaxKey } , <nl> + { typeName ( BSONType : : MinKey ) , BSONType : : MinKey } } ; <nl> + <nl> + StatusWith < MatcherTypeAlias > MatcherTypeAlias : : parseFromStringAlias ( StringData typeAlias ) { <nl> + if ( typeAlias = = MatcherTypeAlias : : kMatchesAllNumbersAlias ) { <nl> + MatcherTypeAlias type ; <nl> + type . allNumbers = true ; <nl> + return type ; <nl> + } <nl> + <nl> + auto it = MatcherTypeAlias : : typeAliasMap . find ( typeAlias . toString ( ) ) ; <nl> + if ( it = = MatcherTypeAlias : : typeAliasMap . end ( ) ) { <nl> + return Status ( ErrorCodes : : BadValue , <nl> + str : : stream ( ) < < " Unknown type name alias : " < < typeAlias ) ; <nl> + } <nl> + <nl> + return { it - > second } ; <nl> + } <nl> + <nl> + StatusWith < MatcherTypeAlias > MatcherTypeAlias : : parse ( BSONElement elt ) { <nl> + if ( ! elt . isNumber ( ) & & elt . type ( ) ! = BSONType : : String ) { <nl> + return Status ( ErrorCodes : : TypeMismatch , " type must be represented as a number or a string " ) ; <nl> + } <nl> + <nl> + if ( elt . type ( ) = = BSONType : : String ) { <nl> + return parseFromStringAlias ( elt . valueStringData ( ) ) ; <nl> + } <nl> + <nl> + invariant ( elt . isNumber ( ) ) ; <nl> + int typeInt = elt . numberInt ( ) ; <nl> + if ( elt . type ( ) ! = BSONType : : NumberInt & & typeInt ! = elt . number ( ) ) { <nl> + typeInt = - 1 ; <nl> + } <nl> + <nl> + if ( ! isValidBSONType ( typeInt ) ) { <nl> + return Status ( ErrorCodes : : BadValue , <nl> + str : : stream ( ) < < " Invalid numerical type code : " < < typeInt ) ; <nl> + } <nl> + <nl> + return { static_cast < BSONType > ( typeInt ) } ; <nl> + } <nl> + <nl> + bool MatcherTypeAlias : : elementMatchesType ( BSONElement elt ) const { <nl> + if ( allNumbers ) { <nl> + return elt . isNumber ( ) ; <nl> + } <nl> + <nl> + return elt . type ( ) = = bsonType ; <nl> + } <nl> + <nl> + } / / namespace mongo <nl> new file mode 100644 <nl> index 000000000000 . . d05a0ee6e74e <nl> mmm / dev / null <nl> ppp b / src / mongo / db / matcher / matcher_type_alias . h <nl> <nl> + / * * <nl> + * Copyright ( C ) 2017 MongoDB Inc . <nl> + * <nl> + * This program is free software : you can redistribute it and / or modify <nl> + * it under the terms of the GNU Affero General Public License , version 3 , <nl> + * as published by the Free Software Foundation . <nl> + * <nl> + * This program is distributed in the hope that it will be useful , <nl> + * but WITHOUT ANY WARRANTY ; without even the implied warranty of <nl> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the <nl> + * GNU Affero General Public License for more details . <nl> + * <nl> + * You should have received a copy of the GNU Affero General Public License <nl> + * along with this program . If not , see < http : / / www . gnu . org / licenses / > . <nl> + * <nl> + * As a special exception , the copyright holders give permission to link the <nl> + * code of portions of this program with the OpenSSL library under certain <nl> + * conditions as described in each individual source file and distribute <nl> + * linked combinations including the program with the OpenSSL library . You <nl> + * must comply with the GNU Affero General Public License in all respects <nl> + * for all of the code used other than as permitted herein . If you modify <nl> + * file ( s ) with this exception , you may extend this exception to your <nl> + * version of the file ( s ) , but you are not obligated to do so . If you do not <nl> + * wish to do so , delete this exception statement from your version . If you <nl> + * delete this exception statement from all source files in the program , <nl> + * then also delete it in the license file . <nl> + * / <nl> + <nl> + # pragma once <nl> + <nl> + # include < string > <nl> + <nl> + # include " mongo / bson / bsonelement . h " <nl> + # include " mongo / bson / bsontypes . h " <nl> + # include " mongo / stdx / unordered_map . h " <nl> + <nl> + namespace mongo { <nl> + <nl> + / * * <nl> + * Represents a type alias in the match language . This is either a particular BSON type , or the <nl> + * " number " type , which is is the union of all numeric BSON types . <nl> + * / <nl> + struct MatcherTypeAlias { <nl> + static constexpr StringData kMatchesAllNumbersAlias = " number " _sd ; <nl> + static const stdx : : unordered_map < std : : string , BSONType > typeAliasMap ; <nl> + <nl> + / * * <nl> + * Creates a MatcherTypeAlias from a BSONElement . Returns an error if the element does not <nl> + * contain a valid numerical type code or a valid string type alias . <nl> + * / <nl> + static StatusWith < MatcherTypeAlias > parse ( BSONElement ) ; <nl> + <nl> + / * * <nl> + * Creates a MatcherTypeAlias from a type alias string , or returns an error if the alias is not <nl> + * valid . <nl> + * / <nl> + static StatusWith < MatcherTypeAlias > parseFromStringAlias ( StringData typeAlias ) ; <nl> + <nl> + MatcherTypeAlias ( ) = default ; <nl> + <nl> + / * implicit * / MatcherTypeAlias ( BSONType bsonType ) : bsonType ( bsonType ) { } <nl> + <nl> + / * * <nl> + * Returns whether the element is of a type which matches this type . <nl> + * / <nl> + bool elementMatchesType ( BSONElement ) const ; <nl> + <nl> + bool allNumbers = false ; <nl> + BSONType bsonType = BSONType : : EOO ; <nl> + } ; <nl> + <nl> + } / / namespace mongo <nl> new file mode 100644 <nl> index 000000000000 . . 1ccfd83812c7 <nl> mmm / dev / null <nl> ppp b / src / mongo / db / matcher / matcher_type_alias_test . cpp <nl> <nl> + / * * <nl> + * Copyright ( C ) 2017 MongoDB Inc . <nl> + * <nl> + * This program is free software : you can redistribute it and / or modify <nl> + * it under the terms of the GNU Affero General Public License , version 3 , <nl> + * as published by the Free Software Foundation . <nl> + * <nl> + * This program is distributed in the hope that it will be useful , <nl> + * but WITHOUT ANY WARRANTY ; without even the implied warranty of <nl> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the <nl> + * GNU Affero General Public License for more details . <nl> + * <nl> + * You should have received a copy of the GNU Affero General Public License <nl> + * along with this program . If not , see < http : / / www . gnu . org / licenses / > . <nl> + * <nl> + * As a special exception , the copyright holders give permission to link the <nl> + * code of portions of this program with the OpenSSL library under certain <nl> + * conditions as described in each individual source file and distribute <nl> + * linked combinations including the program with the OpenSSL library . You <nl> + * must comply with the GNU Affero General Public License in all respects <nl> + * for all of the code used other than as permitted herein . If you modify <nl> + * file ( s ) with this exception , you may extend this exception to your <nl> + * version of the file ( s ) , but you are not obligated to do so . If you do not <nl> + * wish to do so , delete this exception statement from your version . If you <nl> + * delete this exception statement from all source files in the program , <nl> + * then also delete it in the license file . <nl> + * / <nl> + <nl> + # include " mongo / platform / basic . h " <nl> + <nl> + # include " mongo / bson / bsonmisc . h " <nl> + # include " mongo / bson / bsonobj . h " <nl> + # include " mongo / bson / bsonobjbuilder . h " <nl> + # include " mongo / bson / json . h " <nl> + # include " mongo / db / matcher / matcher_type_alias . h " <nl> + # include " mongo / unittest / unittest . h " <nl> + <nl> + namespace mongo { <nl> + namespace { <nl> + <nl> + TEST ( MatcherTypeAliasTest , ParseFromStringCanParseNumberAlias ) { <nl> + auto result = MatcherTypeAlias : : parseFromStringAlias ( " number " ) ; <nl> + ASSERT_OK ( result . getStatus ( ) ) ; <nl> + ASSERT_TRUE ( result . getValue ( ) . allNumbers ) ; <nl> + } <nl> + <nl> + TEST ( MatcherTypeAliasTest , ParseFromStringCanParseLongAlias ) { <nl> + auto result = MatcherTypeAlias : : parseFromStringAlias ( " long " ) ; <nl> + ASSERT_OK ( result . getStatus ( ) ) ; <nl> + ASSERT_FALSE ( result . getValue ( ) . allNumbers ) ; <nl> + ASSERT_EQ ( result . getValue ( ) . bsonType , BSONType : : NumberLong ) ; <nl> + } <nl> + <nl> + TEST ( MatcherTypeAliasTest , ParseFromStringFailsToParseUnknownAlias ) { <nl> + auto result = MatcherTypeAlias : : parseFromStringAlias ( " unknown " ) ; <nl> + ASSERT_NOT_OK ( result . getStatus ( ) ) ; <nl> + } <nl> + <nl> + TEST ( MatcherTypeAliasTest , ParseFromElementCanParseNumberAlias ) { <nl> + auto obj = BSON ( " " <nl> + < < " number " ) ; <nl> + auto result = MatcherTypeAlias : : parse ( obj . firstElement ( ) ) ; <nl> + ASSERT_OK ( result . getStatus ( ) ) ; <nl> + ASSERT_TRUE ( result . getValue ( ) . allNumbers ) ; <nl> + } <nl> + <nl> + TEST ( MatcherTypeAliasTest , ParseFromElementCanParseLongAlias ) { <nl> + auto obj = BSON ( " " <nl> + < < " long " ) ; <nl> + auto result = MatcherTypeAlias : : parse ( obj . firstElement ( ) ) ; <nl> + ASSERT_OK ( result . getStatus ( ) ) ; <nl> + ASSERT_FALSE ( result . getValue ( ) . allNumbers ) ; <nl> + ASSERT_EQ ( result . getValue ( ) . bsonType , BSONType : : NumberLong ) ; <nl> + } <nl> + <nl> + TEST ( MatcherTypeAliasTest , ParseFromElementFailsToParseUnknownAlias ) { <nl> + auto obj = BSON ( " " <nl> + < < " unknown " ) ; <nl> + auto result = MatcherTypeAlias : : parse ( obj . firstElement ( ) ) ; <nl> + ASSERT_NOT_OK ( result . getStatus ( ) ) ; <nl> + } <nl> + <nl> + TEST ( MatcherTypeAliasTest , ParseFromElementFailsToParseWrongElementType ) { <nl> + auto obj = BSON ( " " < < BSON ( " " <nl> + < < " " ) ) ; <nl> + auto result = MatcherTypeAlias : : parse ( obj . firstElement ( ) ) ; <nl> + ASSERT_NOT_OK ( result . getStatus ( ) ) ; <nl> + <nl> + obj = fromjson ( " { ' ' : null } " ) ; <nl> + result = MatcherTypeAlias : : parse ( obj . firstElement ( ) ) ; <nl> + ASSERT_NOT_OK ( result . getStatus ( ) ) ; <nl> + } <nl> + <nl> + TEST ( MatcherTypeAliasTest , ParseFromElementFailsToParseUnknownBSONType ) { <nl> + auto obj = BSON ( " " < < 99 ) ; <nl> + auto result = MatcherTypeAlias : : parse ( obj . firstElement ( ) ) ; <nl> + ASSERT_NOT_OK ( result . getStatus ( ) ) ; <nl> + } <nl> + <nl> + TEST ( MatcherTypeAliasTest , ParseFromElementCanParseIntegerTypeCode ) { <nl> + auto obj = BSON ( " " < < 2 ) ; <nl> + auto result = MatcherTypeAlias : : parse ( obj . firstElement ( ) ) ; <nl> + ASSERT_OK ( result . getStatus ( ) ) ; <nl> + ASSERT_FALSE ( result . getValue ( ) . allNumbers ) ; <nl> + ASSERT_EQ ( result . getValue ( ) . bsonType , BSONType : : String ) ; <nl> + } <nl> + <nl> + TEST ( MatcherTypeAliasTest , ParseFromElementCanParseDoubleTypeCode ) { <nl> + auto obj = BSON ( " " < < 2 . 0 ) ; <nl> + auto result = MatcherTypeAlias : : parse ( obj . firstElement ( ) ) ; <nl> + ASSERT_OK ( result . getStatus ( ) ) ; <nl> + ASSERT_FALSE ( result . getValue ( ) . allNumbers ) ; <nl> + ASSERT_EQ ( result . getValue ( ) . bsonType , BSONType : : String ) ; <nl> + } <nl> + <nl> + } / / namespace <nl> + } / / namespace mongo <nl> mmm a / src / mongo / db / matcher / schema / expression_parser_schema_test . cpp <nl> ppp b / src / mongo / db / matcher / schema / expression_parser_schema_test . cpp <nl> <nl> # include " mongo / db / json . h " <nl> # include " mongo / db / matcher / expression . h " <nl> # include " mongo / db / matcher / expression_parser . h " <nl> + # include " mongo / db / matcher / expression_type . h " <nl> # include " mongo / db / matcher / extensions_callback_disallow_extensions . h " <nl> # include " mongo / db / matcher / schema / expression_internal_schema_max_items . h " <nl> # include " mongo / db / matcher / schema / expression_internal_schema_max_length . h " <nl> TEST ( InternalSchemaAllElemMatchFromIndexMatchExpression , ParsesCorreclyWithValid <nl> ASSERT_TRUE ( expr . getValue ( ) - > matchesBSON ( fromjson ( " { a : [ 5 , 3 , 3 , 3 , 3 , 3 ] } " ) ) ) ; <nl> ASSERT_FALSE ( expr . getValue ( ) - > matchesBSON ( fromjson ( " { a : [ 3 , 3 , 3 , 5 , 3 , 3 ] } " ) ) ) ; <nl> } <nl> + <nl> + TEST ( MatchExpressionParserSchemaTest , InternalTypeFailsToParseOnTypeMismatch ) { <nl> + BSONObj query = BSON ( " x " < < BSON ( " $ _internalSchemaType " < < BSONObj ( ) ) ) ; <nl> + auto result = MatchExpressionParser : : parse ( <nl> + query , ExtensionsCallbackDisallowExtensions ( ) , kSimpleCollator ) ; <nl> + ASSERT_NOT_OK ( result . getStatus ( ) ) ; <nl> + } <nl> + <nl> + TEST ( MatchExpressionParserSchemaTest , InternalTypeCanParseNumberAlias ) { <nl> + BSONObj query = BSON ( " x " < < BSON ( " $ _internalSchemaType " <nl> + < < " number " ) ) ; <nl> + auto result = MatchExpressionParser : : parse ( <nl> + query , ExtensionsCallbackDisallowExtensions ( ) , kSimpleCollator ) ; <nl> + ASSERT_OK ( result . getStatus ( ) ) ; <nl> + <nl> + ASSERT_EQ ( result . getValue ( ) - > matchType ( ) , MatchExpression : : INTERNAL_SCHEMA_TYPE ) ; <nl> + auto typeExpr = static_cast < const InternalSchemaTypeExpression * > ( result . getValue ( ) . get ( ) ) ; <nl> + ASSERT_TRUE ( typeExpr - > matchesAllNumbers ( ) ) ; <nl> + } <nl> + <nl> + TEST ( MatchExpressionParserSchemaTest , InternalTypeCanParseLongAlias ) { <nl> + BSONObj query = BSON ( " x " < < BSON ( " $ _internalSchemaType " <nl> + < < " long " ) ) ; <nl> + auto result = MatchExpressionParser : : parse ( <nl> + query , ExtensionsCallbackDisallowExtensions ( ) , kSimpleCollator ) ; <nl> + ASSERT_OK ( result . getStatus ( ) ) ; <nl> + <nl> + ASSERT_EQ ( result . getValue ( ) - > matchType ( ) , MatchExpression : : INTERNAL_SCHEMA_TYPE ) ; <nl> + auto typeExpr = static_cast < const InternalSchemaTypeExpression * > ( result . getValue ( ) . get ( ) ) ; <nl> + ASSERT_FALSE ( typeExpr - > matchesAllNumbers ( ) ) ; <nl> + ASSERT_EQ ( typeExpr - > getBSONType ( ) , BSONType : : NumberLong ) ; <nl> + } <nl> + <nl> + TEST ( MatchExpressionParserSchemaTest , InternalTypeCanParseLongCode ) { <nl> + BSONObj query = BSON ( " x " < < BSON ( " $ _internalSchemaType " < < 18 ) ) ; <nl> + auto result = MatchExpressionParser : : parse ( <nl> + query , ExtensionsCallbackDisallowExtensions ( ) , kSimpleCollator ) ; <nl> + ASSERT_OK ( result . getStatus ( ) ) ; <nl> + <nl> + ASSERT_EQ ( result . getValue ( ) - > matchType ( ) , MatchExpression : : INTERNAL_SCHEMA_TYPE ) ; <nl> + auto typeExpr = static_cast < const InternalSchemaTypeExpression * > ( result . getValue ( ) . get ( ) ) ; <nl> + ASSERT_FALSE ( typeExpr - > matchesAllNumbers ( ) ) ; <nl> + ASSERT_EQ ( typeExpr - > getBSONType ( ) , BSONType : : NumberLong ) ; <nl> + } <nl> } / / namespace <nl> } / / namespace mongo <nl> mmm a / src / mongo / db / matcher / schema / json_schema_parser . cpp <nl> ppp b / src / mongo / db / matcher / schema / json_schema_parser . cpp <nl> <nl> # include " mongo / bson / bsontypes . h " <nl> # include " mongo / db / matcher / expression_always_boolean . h " <nl> # include " mongo / db / matcher / expression_parser . h " <nl> + # include " mongo / db / matcher / matcher_type_alias . h " <nl> # include " mongo / db / matcher / schema / expression_internal_schema_fmod . h " <nl> # include " mongo / db / matcher / schema / expression_internal_schema_max_length . h " <nl> # include " mongo / db / matcher / schema / expression_internal_schema_min_length . h " <nl> constexpr StringData kSchemaTypeKeyword = " type " _sd ; <nl> * enforce this restriction , should the types match ( e . g . $ _internalSchemaMaxItems ) . ' statedType ' is <nl> * a parsed representation of the JSON Schema type keyword which is in effect . <nl> * / <nl> - std : : unique_ptr < MatchExpression > makeRestriction ( TypeMatchExpression : : Type restrictionType , <nl> + std : : unique_ptr < MatchExpression > makeRestriction ( MatcherTypeAlias restrictionType , <nl> std : : unique_ptr < MatchExpression > restrictionExpr , <nl> - TypeMatchExpression * statedType ) { <nl> + InternalSchemaTypeExpression * statedType ) { <nl> if ( statedType ) { <nl> const bool bothNumeric = restrictionType . allNumbers & & <nl> ( statedType - > matchesAllNumbers ( ) | | isNumericBSONType ( statedType - > getBSONType ( ) ) ) ; <nl> const bool bsonTypesMatch = restrictionType . bsonType = = statedType - > getBSONType ( ) ; <nl> <nl> - if ( ! bothNumeric & & ! bsonTypesMatch ) { <nl> + if ( bothNumeric | | bsonTypesMatch ) { <nl> + / / This restriction applies to the type that is already being enforced . We return the <nl> + / / restriction unmodified . <nl> + return restrictionExpr ; <nl> + } else { <nl> / / This restriction doesn ' t take any effect , since the type of the schema is different <nl> / / from the type to which this retriction applies . <nl> return stdx : : make_unique < AlwaysTrueMatchExpression > ( ) ; <nl> std : : unique_ptr < MatchExpression > makeRestriction ( TypeMatchExpression : : Type restr <nl> <nl> / / Generate and return the following expression tree : <nl> / / <nl> - / / OR <nl> - / / / / <nl> - / / NOT < restrictionExpr > <nl> - / / / <nl> - / / TYPE <nl> - / / < restrictionType > <nl> + / / ( OR ( < restrictionExpr > ) ( NOT ( INTERNAL_SCHEMA_TYPE < restrictionType > ) ) <nl> / / <nl> / / We need to do this because restriction keywords do not apply when a field is either not <nl> / / present or of a different type . <nl> - auto typeExprForNot = stdx : : make_unique < TypeMatchExpression > ( ) ; <nl> - invariantOK ( typeExprForNot - > init ( restrictionExpr - > path ( ) , restrictionType ) ) ; <nl> + auto typeExpr = stdx : : make_unique < InternalSchemaTypeExpression > ( ) ; <nl> + invariantOK ( typeExpr - > init ( restrictionExpr - > path ( ) , restrictionType ) ) ; <nl> <nl> - auto notExpr = stdx : : make_unique < NotMatchExpression > ( typeExprForNot . release ( ) ) ; <nl> - auto orExpr = stdx : : make_unique < OrMatchExpression > ( ) ; <nl> - orExpr - > add ( notExpr . release ( ) ) ; <nl> - orExpr - > add ( restrictionExpr . release ( ) ) ; <nl> - <nl> - return std : : move ( orExpr ) ; <nl> - } <nl> - <nl> - / * * <nl> - * Constructs and returns the following expression tree : <nl> - * OR <nl> - * / \ <nl> - * NOT < typeExpr > <nl> - * / <nl> - * EXISTS <nl> - * < typeExpr field > <nl> - * <nl> - * This is needed because the JSON Schema ' type ' keyword only applies if the corresponding field is <nl> - * present . <nl> - * <nl> - * ' typeExpr ' must be non - null and must have a non - empty path . <nl> - * / <nl> - std : : unique_ptr < MatchExpression > makeTypeRestriction ( <nl> - std : : unique_ptr < TypeMatchExpression > typeExpr ) { <nl> - invariant ( typeExpr ) ; <nl> - invariant ( ! typeExpr - > path ( ) . empty ( ) ) ; <nl> + auto notExpr = stdx : : make_unique < NotMatchExpression > ( ) ; <nl> + invariantOK ( notExpr - > init ( typeExpr . release ( ) ) ) ; <nl> <nl> - auto existsExpr = stdx : : make_unique < ExistsMatchExpression > ( ) ; <nl> - invariantOK ( existsExpr - > init ( typeExpr - > path ( ) ) ) ; <nl> - <nl> - auto notExpr = stdx : : make_unique < NotMatchExpression > ( existsExpr . release ( ) ) ; <nl> auto orExpr = stdx : : make_unique < OrMatchExpression > ( ) ; <nl> orExpr - > add ( notExpr . release ( ) ) ; <nl> - orExpr - > add ( typeExpr . release ( ) ) ; <nl> + orExpr - > add ( restrictionExpr . release ( ) ) ; <nl> <nl> return std : : move ( orExpr ) ; <nl> } <nl> <nl> - StatusWith < std : : unique_ptr < TypeMatchExpression > > parseType ( StringData path , BSONElement typeElt ) { <nl> + StatusWith < std : : unique_ptr < InternalSchemaTypeExpression > > parseType ( StringData path , <nl> + BSONElement typeElt ) { <nl> if ( ! typeElt ) { <nl> return { nullptr } ; <nl> } <nl> StatusWith < std : : unique_ptr < TypeMatchExpression > > parseType ( StringData path , BSON <nl> < < " ' must be a string " ) } ; <nl> } <nl> <nl> - return MatchExpressionParser : : parseTypeFromAlias ( path , typeElt . valueStringData ( ) ) ; <nl> + auto parsedType = MatcherTypeAlias : : parseFromStringAlias ( typeElt . valueStringData ( ) ) ; <nl> + if ( ! parsedType . isOK ( ) ) { <nl> + return parsedType . getStatus ( ) ; <nl> + } <nl> + <nl> + auto typeExpr = stdx : : make_unique < InternalSchemaTypeExpression > ( ) ; <nl> + auto initStatus = typeExpr - > init ( path , parsedType . getValue ( ) ) ; <nl> + if ( ! initStatus . isOK ( ) ) { <nl> + return initStatus ; <nl> + } <nl> + <nl> + return { std : : move ( typeExpr ) } ; <nl> } <nl> <nl> StatusWithMatchExpression parseMaximum ( StringData path , <nl> BSONElement maximum , <nl> - TypeMatchExpression * typeExpr , <nl> + InternalSchemaTypeExpression * typeExpr , <nl> bool isExclusiveMaximum ) { <nl> if ( ! maximum . isNumber ( ) ) { <nl> return { Status ( ErrorCodes : : TypeMismatch , <nl> StatusWithMatchExpression parseMaximum ( StringData path , <nl> return status ; <nl> } <nl> <nl> - TypeMatchExpression : : Type restrictionType ; <nl> + MatcherTypeAlias restrictionType ; <nl> restrictionType . allNumbers = true ; <nl> return makeRestriction ( restrictionType , std : : move ( expr ) , typeExpr ) ; <nl> } <nl> <nl> StatusWithMatchExpression parseMinimum ( StringData path , <nl> BSONElement minimum , <nl> - TypeMatchExpression * typeExpr , <nl> + InternalSchemaTypeExpression * typeExpr , <nl> bool isExclusiveMinimum ) { <nl> if ( ! minimum . isNumber ( ) ) { <nl> return { Status ( ErrorCodes : : TypeMismatch , <nl> StatusWithMatchExpression parseMinimum ( StringData path , <nl> return status ; <nl> } <nl> <nl> - TypeMatchExpression : : Type restrictionType ; <nl> + MatcherTypeAlias restrictionType ; <nl> restrictionType . allNumbers = true ; <nl> return makeRestriction ( restrictionType , std : : move ( expr ) , typeExpr ) ; <nl> } <nl> StatusWithMatchExpression parseMinimum ( StringData path , <nl> template < class T > <nl> StatusWithMatchExpression parseStrLength ( StringData path , <nl> BSONElement strLength , <nl> - TypeMatchExpression * typeExpr , <nl> + InternalSchemaTypeExpression * typeExpr , <nl> StringData keyword ) { <nl> if ( ! strLength . isNumber ( ) ) { <nl> return { <nl> StatusWithMatchExpression parseStrLength ( StringData path , <nl> <nl> StatusWithMatchExpression parsePattern ( StringData path , <nl> BSONElement pattern , <nl> - TypeMatchExpression * typeExpr ) { <nl> + InternalSchemaTypeExpression * typeExpr ) { <nl> if ( pattern . type ( ) ! = BSONType : : String ) { <nl> return { Status ( ErrorCodes : : TypeMismatch , <nl> str : : stream ( ) < < " $ jsonSchema keyword ' " < < kSchemaPatternKeyword <nl> StatusWithMatchExpression parsePattern ( StringData path , <nl> <nl> StatusWithMatchExpression parseMultipleOf ( StringData path , <nl> BSONElement multipleOf , <nl> - TypeMatchExpression * typeExpr ) { <nl> + InternalSchemaTypeExpression * typeExpr ) { <nl> if ( ! multipleOf . isNumber ( ) ) { <nl> return { Status ( ErrorCodes : : TypeMismatch , <nl> str : : stream ( ) < < " $ jsonSchema keyword ' " < < kSchemaMultipleOfKeyword <nl> StatusWithMatchExpression parseMultipleOf ( StringData path , <nl> return status ; <nl> } <nl> <nl> - TypeMatchExpression : : Type restrictionType ; <nl> + MatcherTypeAlias restrictionType ; <nl> restrictionType . allNumbers = true ; <nl> return makeRestriction ( restrictionType , std : : move ( expr ) , typeExpr ) ; <nl> } <nl> <nl> } / / namespace <nl> <nl> - StatusWithMatchExpression JSONSchemaParser : : _parseProperties ( StringData path , <nl> - BSONElement propertiesElt , <nl> - TypeMatchExpression * typeExpr ) { <nl> + StatusWithMatchExpression JSONSchemaParser : : _parseProperties ( <nl> + StringData path , BSONElement propertiesElt , InternalSchemaTypeExpression * typeExpr ) { <nl> if ( propertiesElt . type ( ) ! = BSONType : : Object ) { <nl> return { Status ( ErrorCodes : : TypeMismatch , <nl> str : : stream ( ) < < " $ jsonSchema keyword ' " < < kSchemaPropertiesKeyword <nl> StatusWithMatchExpression JSONSchemaParser : : _parseProperties ( StringData path , <nl> if ( ! nestedSchemaMatch . isOK ( ) ) { <nl> return nestedSchemaMatch . getStatus ( ) ; <nl> } <nl> - andExpr - > add ( nestedSchemaMatch . getValue ( ) . release ( ) ) ; <nl> + <nl> + / / Each property either must not exist or must match the nested schema . Therefore , we <nl> + / / generate the match expression ( OR ( NOT ( EXISTS ) ) < nestedSchemaMatch > ) . <nl> + auto existsExpr = stdx : : make_unique < ExistsMatchExpression > ( ) ; <nl> + invariantOK ( existsExpr - > init ( property . fieldNameStringData ( ) ) ) ; <nl> + <nl> + auto notExpr = stdx : : make_unique < NotMatchExpression > ( ) ; <nl> + invariantOK ( notExpr - > init ( existsExpr . release ( ) ) ) ; <nl> + <nl> + auto orExpr = stdx : : make_unique < OrMatchExpression > ( ) ; <nl> + orExpr - > add ( notExpr . release ( ) ) ; <nl> + orExpr - > add ( nestedSchemaMatch . getValue ( ) . release ( ) ) ; <nl> + <nl> + andExpr - > add ( orExpr . release ( ) ) ; <nl> } <nl> <nl> / / If this is a top - level schema , then we have no path and there is no need for an <nl> StatusWithMatchExpression JSONSchemaParser : : _parse ( StringData path , BSONObj sche <nl> } <nl> <nl> if ( ! path . empty ( ) & & typeExpr . getValue ( ) ) { <nl> - andExpr - > add ( makeTypeRestriction ( std : : move ( typeExpr . getValue ( ) ) ) . release ( ) ) ; <nl> + andExpr - > add ( typeExpr . getValue ( ) . release ( ) ) ; <nl> } <nl> return { std : : move ( andExpr ) } ; <nl> } <nl> mmm a / src / mongo / db / matcher / schema / json_schema_parser . h <nl> ppp b / src / mongo / db / matcher / schema / json_schema_parser . h <nl> <nl> # pragma once <nl> <nl> # include " mongo / db / matcher / expression . h " <nl> - # include " mongo / db / matcher / expression_leaf . h " <nl> # include " mongo / db / matcher / expression_tree . h " <nl> + # include " mongo / db / matcher / expression_type . h " <nl> <nl> namespace mongo { <nl> <nl> class JSONSchemaParser { <nl> / / Parser for the JSON Schema ' properties ' keyword . <nl> static StatusWithMatchExpression _parseProperties ( StringData path , <nl> BSONElement propertiesElt , <nl> - TypeMatchExpression * typeExpr ) ; <nl> + InternalSchemaTypeExpression * typeExpr ) ; <nl> } ; <nl> <nl> } / / namespace mongo <nl> mmm a / src / mongo / db / matcher / schema / json_schema_parser_test . cpp <nl> ppp b / src / mongo / db / matcher / schema / json_schema_parser_test . cpp <nl> TEST ( JSONSchemaParserTest , NestedTypeObjectTranslatesCorrectly ) { <nl> ASSERT_OK ( result . getStatus ( ) ) ; <nl> BSONObjBuilder builder ; <nl> result . getValue ( ) - > serialize ( & builder ) ; <nl> - ASSERT_BSONOBJ_EQ ( <nl> - builder . obj ( ) , <nl> - fromjson ( " { $ and : [ { $ and : [ { $ and : [ " <nl> - " { $ or : [ { $ nor : [ { a : { $ type : 3 } } ] } , { a : { $ _internalSchemaObjectMatch : " <nl> - " { $ and : [ { $ and : [ { $ or : [ { $ nor : [ { b : { $ exists : true } } ] } , { b : { $ type : 2 } } ] } ] } ] } } } ] } , " <nl> - " { $ or : [ { $ nor : [ { a : { $ exists : true } } ] } , { a : { $ type : 3 } } ] } ] } ] } ] } " ) ) ; <nl> + ASSERT_BSONOBJ_EQ ( builder . obj ( ) , fromjson ( R " ( { <nl> + $ and : [ { <nl> + $ and : [ { <nl> + $ or : [ <nl> + { $ nor : [ { a : { $ exists : true } } ] } , <nl> + { <nl> + $ and : [ <nl> + { <nl> + a : { <nl> + $ _internalSchemaObjectMatch : { <nl> + $ and : [ { <nl> + $ or : [ <nl> + { $ nor : [ { b : { $ exists : true } } ] } , <nl> + { $ and : [ { b : { $ _internalSchemaType : 2 } } ] } <nl> + ] <nl> + } ] <nl> + } <nl> + } <nl> + } , <nl> + { a : { $ _internalSchemaType : 3 } } <nl> + ] <nl> + } <nl> + ] <nl> + } ] <nl> + } ] <nl> + } ) " ) ) ; <nl> } <nl> <nl> TEST ( JSONSchemaParserTest , TopLevelNonObjectTypeTranslatesCorrectly ) { <nl> TEST ( JSONSchemaParserTest , TypeNumberTranslatesCorrectly ) { <nl> ASSERT_OK ( result . getStatus ( ) ) ; <nl> BSONObjBuilder builder ; <nl> result . getValue ( ) - > serialize ( & builder ) ; <nl> - ASSERT_BSONOBJ_EQ ( <nl> - builder . obj ( ) , <nl> - fromjson ( " { $ and : [ { $ and : [ { $ and : [ " <nl> - " { $ or : [ { $ nor : [ { num : { $ exists : true } } ] } , { num : { $ type : ' number ' } } ] } ] } ] } ] } " ) ) ; <nl> + ASSERT_BSONOBJ_EQ ( builder . obj ( ) , fromjson ( R " ( { <nl> + $ and : [ { <nl> + $ and : [ { <nl> + $ or : [ <nl> + { $ nor : [ { num : { $ exists : true } } ] } , <nl> + { $ and : [ { num : { $ _internalSchemaType : ' number ' } } ] } <nl> + ] <nl> + } ] <nl> + } ] <nl> + } ) " ) ) ; <nl> } <nl> <nl> TEST ( JSONSchemaParserTest , MaximumTranslatesCorrectlyWithTypeNumber ) { <nl> TEST ( JSONSchemaParserTest , MaximumTranslatesCorrectlyWithTypeNumber ) { <nl> ASSERT_OK ( result . getStatus ( ) ) ; <nl> BSONObjBuilder builder ; <nl> result . getValue ( ) - > serialize ( & builder ) ; <nl> - ASSERT_BSONOBJ_EQ ( builder . obj ( ) , <nl> - fromjson ( " { $ and : [ { $ and : [ { $ and : [ " <nl> - " { $ or : [ { $ nor : [ { num : { $ type : ' number ' } } ] } , { num : { $ lte : 0 } } ] } , " <nl> - " { $ or : [ { $ nor : [ { num : { $ exists : true } } ] } , { num : { $ type : ' number ' } } ] } " <nl> - " ] } ] } ] } " ) ) ; <nl> + ASSERT_BSONOBJ_EQ ( builder . obj ( ) , fromjson ( R " ( { <nl> + $ and : [ { <nl> + $ and : [ { <nl> + $ or : [ <nl> + { $ nor : [ { num : { $ exists : true } } ] } , <nl> + { <nl> + $ and : [ <nl> + { num : { $ lte : 0 } } , <nl> + { num : { $ _internalSchemaType : ' number ' } } <nl> + ] <nl> + } <nl> + ] <nl> + } ] <nl> + } ] <nl> + } ) " ) ) ; <nl> } <nl> <nl> TEST ( JSONSchemaParserTest , MaximumTranslatesCorrectlyWithTypeLong ) { <nl> TEST ( JSONSchemaParserTest , MaximumTranslatesCorrectlyWithTypeLong ) { <nl> ASSERT_OK ( result . getStatus ( ) ) ; <nl> BSONObjBuilder builder ; <nl> result . getValue ( ) - > serialize ( & builder ) ; <nl> - ASSERT_BSONOBJ_EQ ( builder . obj ( ) , <nl> - fromjson ( " { $ and : [ { $ and : [ { $ and : [ " <nl> - " { $ or : [ { $ nor : [ { num : { $ type : ' number ' } } ] } , { num : { $ lte : 0 } } ] } , " <nl> - " { $ or : [ { $ nor : [ { num : { $ exists : true } } ] } , { num : { $ type : 18 } } ] } " <nl> - " ] } ] } ] } " ) ) ; <nl> + ASSERT_BSONOBJ_EQ ( builder . obj ( ) , fromjson ( R " ( { <nl> + $ and : [ { <nl> + $ and : [ { <nl> + $ or : [ <nl> + { $ nor : [ { num : { $ exists : true } } ] } , <nl> + { <nl> + $ and : [ <nl> + { num : { $ lte : 0 } } , <nl> + { num : { $ _internalSchemaType : 18 } } <nl> + ] <nl> + } <nl> + ] <nl> + } ] <nl> + } ] <nl> + } ) " ) ) ; <nl> } <nl> <nl> TEST ( JSONSchemaParserTest , MaximumTranslatesCorrectlyWithTypeString ) { <nl> TEST ( JSONSchemaParserTest , MaximumTranslatesCorrectlyWithTypeString ) { <nl> ASSERT_OK ( result . getStatus ( ) ) ; <nl> BSONObjBuilder builder ; <nl> result . getValue ( ) - > serialize ( & builder ) ; <nl> - ASSERT_BSONOBJ_EQ ( builder . obj ( ) , <nl> - fromjson ( " { $ and : [ { $ and : [ { $ and : [ { $ alwaysTrue : 1 } , " <nl> - " { $ or : [ { $ nor : [ { num : { $ exists : true } } ] } , { num : { $ type : 2 } } ] } " <nl> - " ] } ] } ] } " ) ) ; <nl> + ASSERT_BSONOBJ_EQ ( builder . obj ( ) , fromjson ( R " ( { <nl> + $ and : [ { <nl> + $ and : [ { <nl> + $ or : [ <nl> + { $ nor : [ { num : { $ exists : true } } ] } , <nl> + { $ and : [ { $ alwaysTrue : 1 } , { num : { $ _internalSchemaType : 2 } } ] } <nl> + ] <nl> + } ] <nl> + } ] <nl> + } ) " ) ) ; <nl> } <nl> <nl> TEST ( JSONSchemaParserTest , MaximumTranslatesCorrectlyWithNoType ) { <nl> TEST ( JSONSchemaParserTest , MaximumTranslatesCorrectlyWithNoType ) { <nl> ASSERT_OK ( result . getStatus ( ) ) ; <nl> BSONObjBuilder builder ; <nl> result . getValue ( ) - > serialize ( & builder ) ; <nl> - ASSERT_BSONOBJ_EQ ( <nl> - builder . obj ( ) , <nl> - fromjson ( " { $ and : [ { $ and : [ { $ and : [ " <nl> - " { $ or : [ { $ nor : [ { num : { $ type : ' number ' } } ] } , { num : { $ lte : 0 } } ] } ] } ] } ] } " ) ) ; <nl> + ASSERT_BSONOBJ_EQ ( builder . obj ( ) , fromjson ( R " ( { <nl> + $ and : [ { <nl> + $ and : [ { <nl> + $ or : [ <nl> + { $ nor : [ { num : { $ exists : true } } ] } , <nl> + { <nl> + $ and : [ { <nl> + $ or : [ <nl> + { $ nor : [ { num : { $ _internalSchemaType : ' number ' } } ] } , <nl> + { num : { $ lte : 0 } } <nl> + ] <nl> + } ] <nl> + } <nl> + ] <nl> + } ] <nl> + } ] <nl> + } ) " ) ) ; <nl> } <nl> <nl> TEST ( JSONSchemaParserTest , FailsToParseIfMaximumIsNotANumber ) { <nl> TEST ( JSONSchemaParserTest , MinimumTranslatesCorrectlyWithTypeNumber ) { <nl> ASSERT_OK ( result . getStatus ( ) ) ; <nl> BSONObjBuilder builder ; <nl> result . getValue ( ) - > serialize ( & builder ) ; <nl> - ASSERT_BSONOBJ_EQ ( builder . obj ( ) , <nl> - fromjson ( " { $ and : [ { $ and : [ { $ and : [ " <nl> - " { $ or : [ { $ nor : [ { num : { $ type : ' number ' } } ] } , { num : { $ gte : 0 } } ] } , " <nl> - " { $ or : [ { $ nor : [ { num : { $ exists : true } } ] } , { num : { $ type : ' number ' } } ] } " <nl> - " ] } ] } ] } " ) ) ; <nl> + ASSERT_BSONOBJ_EQ ( builder . obj ( ) , fromjson ( R " ( { <nl> + $ and : [ { <nl> + $ and : [ { <nl> + $ or : [ <nl> + { $ nor : [ { num : { $ exists : true } } ] } , <nl> + { <nl> + $ and : [ <nl> + { num : { $ gte : 0 } } , <nl> + { num : { $ _internalSchemaType : ' number ' } } <nl> + ] <nl> + } <nl> + ] <nl> + } ] <nl> + } ] <nl> + } ) " ) ) ; <nl> } <nl> <nl> TEST ( JSONSchemaParserTest , FailsToParseIfMaxLengthIsNonIntegralDouble ) { <nl> TEST ( JSONSchemaParserTest , MaxLengthTranslatesCorrectlyWithIntegralDouble ) { <nl> ASSERT_OK ( result . getStatus ( ) ) ; <nl> BSONObjBuilder builder ; <nl> result . getValue ( ) - > serialize ( & builder ) ; <nl> - ASSERT_BSONOBJ_EQ ( <nl> - builder . obj ( ) , <nl> - fromjson ( " { $ and : [ { $ and : [ { $ and : [ { $ or : [ { $ nor : [ { foo : { $ type : 2 } } ] } , { " <nl> - " foo : { $ _internalSchemaMaxLength : 5 } } ] } , { $ or : [ { $ nor : [ { foo : { " <nl> - " $ exists : true } } ] } , { foo : { $ type : 2 } } ] } ] } ] } ] } " ) ) ; <nl> + ASSERT_BSONOBJ_EQ ( builder . obj ( ) , fromjson ( R " ( { <nl> + $ and : [ { <nl> + $ and : [ { <nl> + $ or : [ <nl> + { $ nor : [ { foo : { $ exists : true } } ] } , <nl> + { <nl> + $ and : [ <nl> + { foo : { $ _internalSchemaMaxLength : 5 } } , <nl> + { foo : { $ _internalSchemaType : 2 } } <nl> + ] <nl> + } <nl> + ] <nl> + } ] <nl> + } ] <nl> + } ) " ) ) ; <nl> } <nl> <nl> TEST ( JSONSchemaParserTest , MaxLengthTranslatesCorrectlyWithTypeString ) { <nl> TEST ( JSONSchemaParserTest , MaxLengthTranslatesCorrectlyWithTypeString ) { <nl> ASSERT_OK ( result . getStatus ( ) ) ; <nl> BSONObjBuilder builder ; <nl> result . getValue ( ) - > serialize ( & builder ) ; <nl> - ASSERT_BSONOBJ_EQ ( <nl> - builder . obj ( ) , <nl> - fromjson ( " { $ and : [ { $ and : [ { $ and : [ { $ or : [ { $ nor : [ { foo : { $ type : 2 } } ] } , { " <nl> - " foo : { $ _internalSchemaMaxLength : 5 } } ] } , { $ or : [ { $ nor : [ { foo : { " <nl> - " $ exists : true } } ] } , { foo : { $ type : 2 } } ] } ] } ] } ] } " ) ) ; <nl> + ASSERT_BSONOBJ_EQ ( builder . obj ( ) , fromjson ( R " ( { <nl> + $ and : [ { <nl> + $ and : [ { <nl> + $ or : [ <nl> + { $ nor : [ { foo : { $ exists : true } } ] } , <nl> + { <nl> + $ and : [ <nl> + { foo : { $ _internalSchemaMaxLength : 5 } } , <nl> + { foo : { $ _internalSchemaType : 2 } } <nl> + ] <nl> + } <nl> + ] <nl> + } ] <nl> + } ] <nl> + } ) " ) ) ; <nl> } <nl> <nl> TEST ( JSONSchemaParserTest , MinimumTranslatesCorrectlyWithTypeLong ) { <nl> TEST ( JSONSchemaParserTest , MinimumTranslatesCorrectlyWithTypeLong ) { <nl> ASSERT_OK ( result . getStatus ( ) ) ; <nl> BSONObjBuilder builder ; <nl> result . getValue ( ) - > serialize ( & builder ) ; <nl> - ASSERT_BSONOBJ_EQ ( builder . obj ( ) , <nl> - fromjson ( " { $ and : [ { $ and : [ { $ and : [ " <nl> - " { $ or : [ { $ nor : [ { num : { $ type : ' number ' } } ] } , { num : { $ gte : 0 } } ] } , " <nl> - " { $ or : [ { $ nor : [ { num : { $ exists : true } } ] } , { num : { $ type : 18 } } ] } " <nl> - " ] } ] } ] } " ) ) ; <nl> + ASSERT_BSONOBJ_EQ ( builder . obj ( ) , fromjson ( R " ( { <nl> + $ and : [ { <nl> + $ and : [ { <nl> + $ or : [ <nl> + { $ nor : [ { num : { $ exists : true } } ] } , <nl> + { <nl> + $ and : [ <nl> + { num : { $ gte : 0 } } , <nl> + { num : { $ _internalSchemaType : 18 } } <nl> + ] <nl> + } <nl> + ] <nl> + } ] <nl> + } ] <nl> + } ) " ) ) ; <nl> } <nl> <nl> TEST ( JSONSchemaParserTest , MinimumTranslatesCorrectlyWithTypeString ) { <nl> TEST ( JSONSchemaParserTest , MinimumTranslatesCorrectlyWithTypeString ) { <nl> ASSERT_OK ( result . getStatus ( ) ) ; <nl> BSONObjBuilder builder ; <nl> result . getValue ( ) - > serialize ( & builder ) ; <nl> - ASSERT_BSONOBJ_EQ ( builder . obj ( ) , <nl> - fromjson ( " { $ and : [ { $ and : [ { $ and : [ { $ alwaysTrue : 1 } , " <nl> - " { $ or : [ { $ nor : [ { num : { $ exists : true } } ] } , { num : { $ type : 2 } } ] } " <nl> - " ] } ] } ] } " ) ) ; <nl> + ASSERT_BSONOBJ_EQ ( builder . obj ( ) , fromjson ( R " ( { <nl> + $ and : [ { <nl> + $ and : [ { <nl> + $ or : [ <nl> + { $ nor : [ { num : { $ exists : true } } ] } , <nl> + { $ and : [ { $ alwaysTrue : 1 } , { num : { $ _internalSchemaType : 2 } } ] } <nl> + ] <nl> + } ] <nl> + } ] <nl> + } ) " ) ) ; <nl> } <nl> <nl> TEST ( JSONSchemaParserTest , MinimumTranslatesCorrectlyWithNoType ) { <nl> TEST ( JSONSchemaParserTest , MinimumTranslatesCorrectlyWithNoType ) { <nl> ASSERT_OK ( result . getStatus ( ) ) ; <nl> BSONObjBuilder builder ; <nl> result . getValue ( ) - > serialize ( & builder ) ; <nl> - ASSERT_BSONOBJ_EQ ( <nl> - builder . obj ( ) , <nl> - fromjson ( " { $ and : [ { $ and : [ { $ and : [ " <nl> - " { $ or : [ { $ nor : [ { num : { $ type : ' number ' } } ] } , { num : { $ gte : 0 } } ] } ] } ] } ] } " ) ) ; <nl> + ASSERT_BSONOBJ_EQ ( builder . obj ( ) , fromjson ( R " ( { <nl> + $ and : [ { <nl> + $ and : [ { <nl> + $ or : [ <nl> + { $ nor : [ { num : { $ exists : true } } ] } , <nl> + { <nl> + $ and : [ { <nl> + $ or : [ <nl> + { $ nor : [ { num : { $ _internalSchemaType : ' number ' } } ] } , <nl> + { num : { $ gte : 0 } } <nl> + ] <nl> + } ] <nl> + } <nl> + ] <nl> + } ] <nl> + } ] <nl> + } ) " ) ) ; <nl> } <nl> <nl> TEST ( JSONSchemaParserTest , MaximumTranslatesCorrectlyWithExclusiveMaximumTrue ) { <nl> TEST ( JSONSchemaParserTest , MaximumTranslatesCorrectlyWithExclusiveMaximumTrue ) { <nl> ASSERT_OK ( result . getStatus ( ) ) ; <nl> BSONObjBuilder builder ; <nl> result . getValue ( ) - > serialize ( & builder ) ; <nl> - ASSERT_BSONOBJ_EQ ( builder . obj ( ) , <nl> - fromjson ( " { $ and : [ { $ and : [ { $ and : [ { $ or : [ { $ nor : [ { " <nl> - " num : { $ type : ' number ' } } ] } , { num : { $ lt : 0 } } " <nl> - " ] } , { $ or : [ { $ nor : [ { num : { $ exists : true } } " <nl> - " ] } , { num : { $ type : 18 } } ] } ] } ] } ] } " ) ) ; <nl> + ASSERT_BSONOBJ_EQ ( builder . obj ( ) , fromjson ( R " ( { <nl> + $ and : [ { <nl> + $ and : [ { <nl> + $ or : [ <nl> + { $ nor : [ { num : { $ exists : true } } ] } , <nl> + { <nl> + $ and : [ <nl> + { num : { $ lt : 0 } } , <nl> + { num : { $ _internalSchemaType : 18 } } <nl> + ] <nl> + } <nl> + ] <nl> + } ] <nl> + } ] <nl> + } ) " ) ) ; <nl> } <nl> <nl> TEST ( JSONSchemaParserTest , MaximumTranslatesCorrectlyWithExclusiveMaximumFalse ) { <nl> TEST ( JSONSchemaParserTest , MaximumTranslatesCorrectlyWithExclusiveMaximumFalse ) <nl> ASSERT_OK ( result . getStatus ( ) ) ; <nl> BSONObjBuilder builder ; <nl> result . getValue ( ) - > serialize ( & builder ) ; <nl> - ASSERT_BSONOBJ_EQ ( builder . obj ( ) , <nl> - fromjson ( " { $ and : [ { $ and : [ { $ and : [ { $ or : [ { $ nor : [ { " <nl> - " num : { $ type : ' number ' } } ] } , { num : { $ lte : 0 } " <nl> - " } ] } , { $ or : [ { $ nor : [ { num : { $ exists : true } " <nl> - " } ] } , { num : { $ type : 18 } } ] } ] } ] } ] } " ) ) ; <nl> + ASSERT_BSONOBJ_EQ ( builder . obj ( ) , fromjson ( R " ( { <nl> + $ and : [ { <nl> + $ and : [ { <nl> + $ or : [ <nl> + { $ nor : [ { num : { $ exists : true } } ] } , <nl> + { <nl> + $ and : [ <nl> + { num : { $ lte : 0 } } , <nl> + { num : { $ _internalSchemaType : 18 } } <nl> + ] <nl> + } <nl> + ] <nl> + } ] <nl> + } ] <nl> + } ) " ) ) ; <nl> } <nl> <nl> TEST ( JSONSchemaParserTest , FailsToParseIfExclusiveMaximumIsPresentButMaximumIsNot ) { <nl> TEST ( JSONSchemaParserTest , MinimumTranslatesCorrectlyWithExclusiveMinimumTrue ) { <nl> ASSERT_OK ( result . getStatus ( ) ) ; <nl> BSONObjBuilder builder ; <nl> result . getValue ( ) - > serialize ( & builder ) ; <nl> - ASSERT_BSONOBJ_EQ ( builder . obj ( ) , <nl> - fromjson ( " { $ and : [ { $ and : [ { $ and : [ " <nl> - " { $ or : [ { $ nor : [ { num : { $ type : ' number ' } } ] } , { num : { $ gt : 0 } } ] } , " <nl> - " { $ or : [ { $ nor : [ { num : { $ exists : true } } ] } , { num : { $ type : 18 } } ] } " <nl> - " ] } ] } ] } " ) ) ; <nl> + ASSERT_BSONOBJ_EQ ( builder . obj ( ) , fromjson ( R " ( { <nl> + $ and : [ { <nl> + $ and : [ { <nl> + $ or : [ <nl> + { $ nor : [ { num : { $ exists : true } } ] } , <nl> + { <nl> + $ and : [ <nl> + { num : { $ gt : 0 } } , <nl> + { num : { $ _internalSchemaType : 18 } } <nl> + ] <nl> + } <nl> + ] <nl> + } ] <nl> + } ] <nl> + } ) " ) ) ; <nl> } <nl> <nl> TEST ( JSONSchemaParserTest , MinimumTranslatesCorrectlyWithExclusiveMinimumFalse ) { <nl> TEST ( JSONSchemaParserTest , MinimumTranslatesCorrectlyWithExclusiveMinimumFalse ) <nl> ASSERT_OK ( result . getStatus ( ) ) ; <nl> BSONObjBuilder builder ; <nl> result . getValue ( ) - > serialize ( & builder ) ; <nl> - ASSERT_BSONOBJ_EQ ( builder . obj ( ) , <nl> - fromjson ( " { $ and : [ { $ and : [ { $ and : [ " <nl> - " { $ or : [ { $ nor : [ { num : { $ type : ' number ' } } ] } , { num : { $ gte : 0 } } ] } , " <nl> - " { $ or : [ { $ nor : [ { num : { $ exists : true } } ] } , { num : { $ type : 18 } } ] } " <nl> - " ] } ] } ] } " ) ) ; <nl> + ASSERT_BSONOBJ_EQ ( builder . obj ( ) , fromjson ( R " ( { <nl> + $ and : [ { <nl> + $ and : [ { <nl> + $ or : [ <nl> + { $ nor : [ { num : { $ exists : true } } ] } , <nl> + { <nl> + $ and : [ <nl> + { num : { $ gte : 0 } } , <nl> + { num : { $ _internalSchemaType : 18 } } <nl> + ] <nl> + } <nl> + ] <nl> + } ] <nl> + } ] <nl> + } ) " ) ) ; <nl> } <nl> <nl> TEST ( JSONSchemaParserTest , FailsToParseIfExclusiveMinimumIsPresentButMinimumIsNot ) { <nl> TEST ( JSONSchemaParserTest , MinLengthTranslatesCorrectlyWithTypeString ) { <nl> ASSERT_OK ( result . getStatus ( ) ) ; <nl> BSONObjBuilder builder ; <nl> result . getValue ( ) - > serialize ( & builder ) ; <nl> - ASSERT_BSONOBJ_EQ ( <nl> - builder . obj ( ) , <nl> - fromjson ( " { $ and : [ { $ and : [ { $ and : [ { $ or : [ { $ nor : [ { foo : { $ type : 2 } } ] } , { " <nl> - " foo : { $ _internalSchemaMinLength : 5 } } ] } , { $ or : [ { $ nor : [ { foo : { " <nl> - " $ exists : true } } ] } , { foo : { $ type : 2 } } ] } ] } ] } ] } " ) ) ; <nl> + ASSERT_BSONOBJ_EQ ( builder . obj ( ) , fromjson ( R " ( { <nl> + $ and : [ { <nl> + $ and : [ { <nl> + $ or : [ <nl> + { $ nor : [ { foo : { $ exists : true } } ] } , <nl> + { <nl> + $ and : [ <nl> + { foo : { $ _internalSchemaMinLength : 5 } } , <nl> + { foo : { $ _internalSchemaType : 2 } } <nl> + ] <nl> + } <nl> + ] <nl> + } ] <nl> + } ] <nl> + } ) " ) ) ; <nl> } <nl> <nl> TEST ( JSONSchemaParserTest , MinLengthTranslatesCorrectlyWithIntegralDouble ) { <nl> TEST ( JSONSchemaParserTest , MinLengthTranslatesCorrectlyWithIntegralDouble ) { <nl> ASSERT_OK ( result . getStatus ( ) ) ; <nl> BSONObjBuilder builder ; <nl> result . getValue ( ) - > serialize ( & builder ) ; <nl> - ASSERT_BSONOBJ_EQ ( <nl> - builder . obj ( ) , <nl> - fromjson ( " { $ and : [ { $ and : [ { $ and : [ { $ or : [ { $ nor : [ { foo : { $ type : 2 } } ] } , { " <nl> - " foo : { $ _internalSchemaMinLength : 5 } } ] } , { $ or : [ { $ nor : [ { foo : { " <nl> - " $ exists : true } } ] } , { foo : { $ type : 2 } } ] } ] } ] } ] } " ) ) ; <nl> + ASSERT_BSONOBJ_EQ ( builder . obj ( ) , fromjson ( R " ( { <nl> + $ and : [ { <nl> + $ and : [ { <nl> + $ or : [ <nl> + { $ nor : [ { foo : { $ exists : true } } ] } , <nl> + { <nl> + $ and : [ <nl> + { foo : { $ _internalSchemaMinLength : 5 } } , <nl> + { foo : { $ _internalSchemaType : 2 } } <nl> + ] <nl> + } <nl> + ] <nl> + } ] <nl> + } ] <nl> + } ) " ) ) ; <nl> } <nl> <nl> TEST ( JSONSchemaParserTest , FailsToParseIfMinimumIsNotANumber ) { <nl> TEST ( JSONSchemaParserTest , PatternTranslatesCorrectlyWithString ) { <nl> BSONObjBuilder builder ; <nl> result . getValue ( ) - > serialize ( & builder ) ; <nl> <nl> - BSONObj expected = BSON ( <nl> - " $ and " < < BSON_ARRAY ( BSON ( <nl> - " $ and " < < BSON_ARRAY ( BSON ( <nl> - " $ and " < < BSON_ARRAY ( <nl> - BSON ( " $ or " < < BSON_ARRAY ( <nl> - BSON ( " $ nor " < < BSON_ARRAY ( BSON ( " foo " < < BSON ( " $ type " < < 2 ) ) ) ) <nl> - < < BSON ( " foo " < < BSON ( " $ regex " <nl> - < < " abc " ) ) ) ) <nl> - < < BSON ( " $ or " < < BSON_ARRAY ( <nl> - BSON ( " $ nor " < < BSON_ARRAY ( BSON ( " foo " < < BSON ( " $ exists " < < true ) ) ) ) <nl> - < < BSON ( " foo " < < BSON ( " $ type " < < 2 ) ) ) ) ) ) ) ) ) ) ; <nl> + BSONObj expected = <nl> + BSON ( " $ and " < < BSON_ARRAY ( BSON ( <nl> + " $ and " < < BSON_ARRAY ( BSON ( <nl> + " $ or " < < BSON_ARRAY ( <nl> + BSON ( " $ nor " < < BSON_ARRAY ( BSON ( " foo " < < BSON ( " $ exists " < < true ) ) ) ) <nl> + < < BSON ( " $ and " < < BSON_ARRAY ( <nl> + BSON ( " foo " < < BSON ( " $ regex " <nl> + < < " abc " ) ) <nl> + < < BSON ( " foo " < < BSON ( " $ _internalSchemaType " < < 2 ) ) ) ) ) ) ) ) ) ) ; <nl> <nl> ASSERT_BSONOBJ_EQ ( builder . obj ( ) , expected ) ; <nl> } <nl> TEST ( JSONSchemaParserTest , MultipleOfTranslatesCorrectlyWithTypeNumber ) { <nl> ASSERT_OK ( result . getStatus ( ) ) ; <nl> BSONObjBuilder builder ; <nl> result . getValue ( ) - > serialize ( & builder ) ; <nl> - ASSERT_BSONOBJ_EQ ( <nl> - builder . obj ( ) , <nl> - fromjson ( " { $ and : [ { $ and : [ { $ and : [ { $ or : [ { $ nor : [ { foo : { $ type : ' number ' } } ] } , " <nl> - " { foo : { $ _internalSchemaFmod : [ NumberDecimal ( ' 5 . 3 ' ) , 0 ] } } ] } , { $ or : [ { $ nor : [ { foo : " <nl> - " { $ exists : true } } ] } , { foo : { $ type : ' number ' } } ] } ] } ] } ] } " ) ) ; <nl> + ASSERT_BSONOBJ_EQ ( builder . obj ( ) , fromjson ( R " ( { <nl> + $ and : [ { <nl> + $ and : [ { <nl> + $ or : [ <nl> + { $ nor : [ { foo : { $ exists : true } } ] } , <nl> + { <nl> + $ and : [ <nl> + { foo : { $ _internalSchemaFmod : [ NumberDecimal ( ' 5 . 3 ' ) , 0 ] } } , <nl> + { foo : { $ _internalSchemaType : ' number ' } } <nl> + ] <nl> + } <nl> + ] <nl> + } ] <nl> + } ] <nl> + } ) " ) ) ; <nl> } <nl> <nl> } / / namespace <nl> mmm a / src / mongo / db / pipeline / document_source_match . cpp <nl> ppp b / src / mongo / db / pipeline / document_source_match . cpp <nl> Document redactSafePortionDollarOps ( BSONObj expr ) { <nl> <nl> / / These are never allowed <nl> case PathAcceptingKeyword : : EQUALITY : / / This actually means unknown <nl> - case PathAcceptingKeyword : : GEO_NEAR : <nl> - case PathAcceptingKeyword : : NOT_EQUAL : <nl> - case PathAcceptingKeyword : : SIZE : <nl> - case PathAcceptingKeyword : : NOT_IN : <nl> case PathAcceptingKeyword : : EXISTS : <nl> - case PathAcceptingKeyword : : WITHIN : <nl> case PathAcceptingKeyword : : GEO_INTERSECTS : <nl> + case PathAcceptingKeyword : : GEO_NEAR : <nl> case PathAcceptingKeyword : : INTERNAL_SCHEMA_ALL_ELEM_MATCH_FROM_INDEX : <nl> case PathAcceptingKeyword : : INTERNAL_SCHEMA_FMOD : <nl> - case PathAcceptingKeyword : : INTERNAL_SCHEMA_MIN_ITEMS : <nl> + case PathAcceptingKeyword : : INTERNAL_SCHEMA_MATCH_ARRAY_INDEX : <nl> case PathAcceptingKeyword : : INTERNAL_SCHEMA_MAX_ITEMS : <nl> - case PathAcceptingKeyword : : INTERNAL_SCHEMA_UNIQUE_ITEMS : <nl> - case PathAcceptingKeyword : : INTERNAL_SCHEMA_OBJECT_MATCH : <nl> - case PathAcceptingKeyword : : INTERNAL_SCHEMA_MIN_LENGTH : <nl> case PathAcceptingKeyword : : INTERNAL_SCHEMA_MAX_LENGTH : <nl> - case PathAcceptingKeyword : : INTERNAL_SCHEMA_MATCH_ARRAY_INDEX : <nl> + case PathAcceptingKeyword : : INTERNAL_SCHEMA_MIN_ITEMS : <nl> + case PathAcceptingKeyword : : INTERNAL_SCHEMA_MIN_LENGTH : <nl> + case PathAcceptingKeyword : : INTERNAL_SCHEMA_OBJECT_MATCH : <nl> + case PathAcceptingKeyword : : INTERNAL_SCHEMA_TYPE : <nl> + case PathAcceptingKeyword : : INTERNAL_SCHEMA_UNIQUE_ITEMS : <nl> + case PathAcceptingKeyword : : NOT_EQUAL : <nl> + case PathAcceptingKeyword : : NOT_IN : <nl> + case PathAcceptingKeyword : : SIZE : <nl> + case PathAcceptingKeyword : : WITHIN : <nl> continue ; <nl> } <nl> } <nl> mmm a / src / mongo / db / pipeline / document_source_match_test . cpp <nl> ppp b / src / mongo / db / pipeline / document_source_match_test . cpp <nl> TEST_F ( DocumentSourceMatchTest , RedactSafePortion ) { <nl> assertExpectedRedactSafePortion ( <nl> " { a : { $ _internalSchemaAllElemMatchFromIndex : [ 3 , { a : { $ lt : 4 } } ] } } " , " { } " ) ; <nl> <nl> + assertExpectedRedactSafePortion ( " { a : { $ _internalSchemaType : 2 } } " , " { } " ) ; <nl> + <nl> / / Combinations <nl> assertExpectedRedactSafePortion ( " { a : 1 , b : ' asdf ' } " , " { a : 1 , b : ' asdf ' } " ) ; <nl> <nl> mmm a / src / mongo / db / query / plan_cache . cpp <nl> ppp b / src / mongo / db / query / plan_cache . cpp <nl> const char * encodeMatchType ( MatchExpression : : MatchType mt ) { <nl> <nl> case MatchExpression : : BITS_ANY_CLEAR : <nl> return " yc " ; <nl> - break ; <nl> <nl> case MatchExpression : : INTERNAL_SCHEMA_ALL_ELEM_MATCH_FROM_INDEX : <nl> return " internalSchemaAllElemMatchFromIndex " ; <nl> - break ; <nl> <nl> case MatchExpression : : INTERNAL_SCHEMA_COND : <nl> return " internalSchemaCond " ; <nl> - break ; <nl> <nl> case MatchExpression : : INTERNAL_SCHEMA_FMOD : <nl> return " internalSchemaFmod " ; <nl> - break ; <nl> <nl> case MatchExpression : : INTERNAL_SCHEMA_MIN_ITEMS : <nl> return " internalSchemaMinItems " ; <nl> const char * encodeMatchType ( MatchExpression : : MatchType mt ) { <nl> case MatchExpression : : INTERNAL_SCHEMA_MATCH_ARRAY_INDEX : <nl> return " internalSchemaMatchArrayIndex " ; <nl> <nl> + case MatchExpression : : INTERNAL_SCHEMA_TYPE : <nl> + return " internalSchemaType " ; <nl> + <nl> default : <nl> MONGO_UNREACHABLE ; <nl> } <nl>
SERVER - 30245 Add $ _internalSchemaType .
mongodb/mongo
ecfdeb1bbe8979586bd841a07f47de748c1b4094
2017-08-17T20:00:04Z
mmm a / lib / Sema / NameBinding . cpp <nl> ppp b / lib / Sema / NameBinding . cpp <nl> static void insertPrecedenceGroupDecl ( NameBinder & binder , SourceFile & SF , <nl> / / / performNameBinding - Once parsing is complete , this walks the AST to <nl> / / / resolve names and do other top - level validation . <nl> / / / <nl> - / / / At this parsing has been performed , but we still have UnresolvedDeclRefExpr <nl> - / / / nodes for unresolved value names , and we may have unresolved type names as <nl> - / / / well . This handles import directives and forward references . <nl> + / / / At this point parsing has been performed , but we still have <nl> + / / / UnresolvedDeclRefExpr nodes for unresolved value names , and we may have <nl> + / / / unresolved type names as well . This handles import directives and forward <nl> + / / / references . <nl> void swift : : performNameBinding ( SourceFile & SF , unsigned StartElem ) { <nl> SharedTimer timer ( " Name binding " ) ; <nl> / / Make sure we skip adding the standard library imports if the <nl> mmm a / lib / Sema / TypeChecker . cpp <nl> ppp b / lib / Sema / TypeChecker . cpp <nl> void swift : : performTypeChecking ( SourceFile & SF , TopLevelContext & TLC , <nl> <nl> / / Make sure we have a type checker . <nl> / / <nl> - / / FIXME : We should never have a type checker here , but currently do when <nl> + / / FIXME : We should never have a type checker here , but currently we do when <nl> / / we ' re using immediate together with - enable - source - import . <nl> / / <nl> / / This possibility should be eliminated , since it results in duplicated <nl> void swift : : performTypeChecking ( SourceFile & SF , TopLevelContext & TLC , <nl> <nl> / / Make sure that name binding has been completed before doing any type <nl> / / checking . <nl> - performNameBinding ( SF , StartElem ) ; <nl> + performNameBinding ( SF , StartElem ) ; <nl> <nl> { <nl> / / NOTE : The type checker is scoped to be torn down before AST <nl>
Merge pull request from Azoy / sema - typos
apple/swift
8031f06697f2a52c2ec5dca0b4589e6ba4a0e3b0
2018-06-07T00:30:49Z
mmm a / aten / src / ATen / core / Tensor . h <nl> ppp b / aten / src / ATen / core / Tensor . h <nl> class CAFFE2_API Tensor { <nl> void backward ( const Tensor & gradient = { } , bool keep_graph = false , bool create_graph = false ) const ; <nl> void set_data ( const Tensor & new_data ) const ; <nl> # ifdef BUILD_NAMEDTENSOR <nl> - Tensor & set_names_ ( c10 : : optional < DimnameList > names ) const ; <nl> + Tensor & names_ ( c10 : : optional < DimnameList > names ) const ; <nl> # endif <nl> # ifdef BUILD_NAMEDTENSOR <nl> - Tensor set_names ( c10 : : optional < DimnameList > names ) const ; <nl> + Tensor view_names ( c10 : : optional < DimnameList > names ) const ; <nl> # endif <nl> # ifdef BUILD_NAMEDTENSOR <nl> Tensor align_to ( DimnameList names ) const ; <nl> mmm a / aten / src / ATen / core / TensorMethods . h <nl> ppp b / aten / src / ATen / core / TensorMethods . h <nl> inline void Tensor : : set_data ( const Tensor & new_data ) const { <nl> return table - > getOp < void ( const Tensor & , const Tensor & ) > ( tensorTypeIdToBackend ( type_id ( ) ) , is_variable ( ) ) ( const_cast < Tensor & > ( * this ) , new_data ) ; <nl> } <nl> # ifdef BUILD_NAMEDTENSOR <nl> - inline Tensor & Tensor : : set_names_ ( c10 : : optional < DimnameList > names ) const { <nl> - static auto table = globalATenDispatch ( ) . getOpTable ( " aten : : set_names_ ( Tensor ( a ! ) self , Dimname [ ] ? names ) - > Tensor ( a ! ) " ) ; <nl> + inline Tensor & Tensor : : names_ ( c10 : : optional < DimnameList > names ) const { <nl> + static auto table = globalATenDispatch ( ) . getOpTable ( " aten : : names_ ( Tensor ( a ! ) self , Dimname [ ] ? names ) - > Tensor ( a ! ) " ) ; <nl> return table - > getOp < Tensor & ( Tensor & , c10 : : optional < DimnameList > ) > ( tensorTypeIdToBackend ( type_id ( ) ) , is_variable ( ) ) ( const_cast < Tensor & > ( * this ) , names ) ; <nl> } <nl> # endif <nl> # ifdef BUILD_NAMEDTENSOR <nl> - inline Tensor Tensor : : set_names ( c10 : : optional < DimnameList > names ) const { <nl> - static auto table = globalATenDispatch ( ) . getOpTable ( " aten : : set_names ( Tensor ( a ! ) self , Dimname [ ] ? names ) - > Tensor ( a ! ) " ) ; <nl> + inline Tensor Tensor : : view_names ( c10 : : optional < DimnameList > names ) const { <nl> + static auto table = globalATenDispatch ( ) . getOpTable ( " aten : : view_names ( Tensor ( a ) self , Dimname [ ] ? names ) - > Tensor ( a ) " ) ; <nl> return table - > getOp < Tensor ( const Tensor & , c10 : : optional < DimnameList > ) > ( tensorTypeIdToBackend ( type_id ( ) ) , is_variable ( ) ) ( const_cast < Tensor & > ( * this ) , names ) ; <nl> } <nl> # endif <nl> mmm a / aten / src / ATen / native / NamedTensor . cpp <nl> ppp b / aten / src / ATen / native / NamedTensor . cpp <nl> <nl> <nl> namespace at { namespace native { <nl> <nl> - Tensor & set_names_ ( Tensor & self , optional < DimnameList > names ) { <nl> + Tensor & names_ ( Tensor & self , optional < DimnameList > names ) { <nl> return at : : internal_set_names_inplace ( self , names ) ; <nl> } <nl> <nl> - Tensor set_names ( const Tensor & self , optional < DimnameList > names ) { <nl> + Tensor view_names ( const Tensor & self , optional < DimnameList > names ) { <nl> auto result = self . alias ( ) ; <nl> at : : internal_set_names_inplace ( result , names ) ; <nl> return result ; <nl> static Tensor align ( const Tensor & tensor , DimnameList names , bool is_aligning_tw <nl> names , <nl> is_aligning_two_tensors ) ; <nl> } <nl> - auto result = tensor . set_names ( nullopt ) . view ( expanded_sizes ) ; <nl> + auto result = tensor . view_names ( nullopt ) . view ( expanded_sizes ) ; <nl> at : : internal_set_names_inplace ( result , names ) ; <nl> return result ; <nl> } <nl> mmm a / aten / src / ATen / native / native_functions . yaml <nl> ppp b / aten / src / ATen / native / native_functions . yaml <nl> <nl> - func : set_data ( Tensor ( a ! ) self , Tensor new_data ) - > void <nl> variants : method <nl> <nl> - - func : set_names_ ( Tensor ( a ! ) self , Dimname [ ] ? names ) - > Tensor ( a ! ) <nl> + - func : names_ ( Tensor ( a ! ) self , Dimname [ ] ? names ) - > Tensor ( a ! ) <nl> variants : method <nl> named_guard : False <nl> <nl> - - func : set_names ( Tensor ( a ! ) self , Dimname [ ] ? names ) - > Tensor ( a ! ) <nl> + - func : view_names ( Tensor ( a ) self , Dimname [ ] ? names ) - > Tensor ( a ) <nl> variants : method <nl> named_guard : False <nl> <nl> mmm a / test / test_namedtensor . py <nl> ppp b / test / test_namedtensor . py <nl> def test_trivial ( self ) : <nl> # Right now I don ' t know what it should look like . <nl> def assertTensorDataAndNamesEqual ( self , x , y ) : <nl> self . assertEqual ( x . names , y . names ) <nl> - unnamed_x = x . set_names ( None ) <nl> - unnamed_y = y . set_names ( None ) <nl> + unnamed_x = x . view_names ( None ) <nl> + unnamed_y = y . view_names ( None ) <nl> self . assertEqual ( unnamed_x , unnamed_y ) <nl> <nl> def _test_factory ( self , factory , device ) : <nl> def test_has_names ( self ) : <nl> self . assertTrue ( fully_named . has_names ( ) ) <nl> <nl> def test_repr ( self ) : <nl> - named_tensor = torch . zeros ( 2 , 3 ) . set_names_ ( [ ' N ' , ' C ' ] ) <nl> + named_tensor = torch . zeros ( 2 , 3 ) . names_ ( [ ' N ' , ' C ' ] ) <nl> expected = " tensor ( [ [ 0 . , 0 . , 0 . ] , \ n [ 0 . , 0 . , 0 . ] ] , names = ( ' N ' , ' C ' ) ) " <nl> self . assertEqual ( repr ( named_tensor ) , expected ) <nl> <nl> def test_repr ( self ) : <nl> expected = " tensor ( [ [ 0 . , 0 . , 0 . ] , \ n [ 0 . , 0 . , 0 . ] ] ) " <nl> self . assertEqual ( repr ( unnamed_tensor ) , expected ) <nl> <nl> - none_named_tensor = torch . zeros ( 2 , 3 ) . set_names_ ( [ None , None ] ) <nl> + none_named_tensor = torch . zeros ( 2 , 3 ) . names_ ( [ None , None ] ) <nl> self . assertEqual ( repr ( none_named_tensor ) , expected ) <nl> <nl> def test_noncontig_contiguous ( self ) : <nl> # This type of contiguous is special - cased and therefore needs its own test <nl> for device in torch . testing . get_all_device_types ( ) : <nl> - x = torch . randn ( 2 , 3 , device = device ) . t ( ) . set_names_ ( ( ' N ' , ' C ' ) ) <nl> + x = torch . randn ( 2 , 3 , device = device ) . t ( ) . names_ ( ( ' N ' , ' C ' ) ) <nl> self . assertEqual ( x . contiguous ( ) . names , ( ' N ' , ' C ' ) ) <nl> <nl> def test_copy_transpose ( self ) : <nl> # This type of copy is special - cased and therefore needs its own test <nl> def _test ( self_names , other_names , expected_names ) : <nl> x = torch . empty ( 2 , 5 , names = self_names ) <nl> - y = torch . empty ( 5 , 2 ) . t ( ) . set_names_ ( other_names ) <nl> + y = torch . empty ( 5 , 2 ) . t ( ) . names_ ( other_names ) <nl> x . copy_ ( y ) <nl> self . assertEqual ( x . names , expected_names ) <nl> <nl> def _test ( self_names , other_names , expected_names ) : <nl> _test ( ( ' N ' , None ) , ( ' N ' , ' C ' ) , ( ' N ' , ' C ' ) ) <nl> _test ( None , ( ' N ' , ' C ' ) , ( ' N ' , ' C ' ) ) <nl> <nl> - def test_set_names_ ( self ) : <nl> + def test_names_ ( self ) : <nl> tensor = torch . empty ( 1 , 1 , names = ( ' N ' , ' C ' ) ) <nl> - self . assertEqual ( tensor . set_names_ ( None ) . names , ( None , None ) ) <nl> - self . assertEqual ( tensor . set_names_ ( [ ' H ' , ' W ' ] ) . names , ( ' H ' , ' W ' ) ) <nl> + self . assertEqual ( tensor . names_ ( None ) . names , ( None , None ) ) <nl> + self . assertEqual ( tensor . names_ ( [ ' H ' , ' W ' ] ) . names , ( ' H ' , ' W ' ) ) <nl> with self . assertRaisesRegex ( RuntimeError , ' Number of names ' ) : <nl> - tensor . set_names_ ( [ ' N ' , ' C ' , ' W ' ] ) <nl> + tensor . names_ ( [ ' N ' , ' C ' , ' W ' ] ) <nl> with self . assertRaisesRegex ( RuntimeError , ' duplicate names ' ) : <nl> - tensor . set_names_ ( [ ' N ' , ' N ' ] ) <nl> + tensor . names_ ( [ ' N ' , ' N ' ] ) <nl> <nl> - def test_set_names ( self ) : <nl> + def test_view_names ( self ) : <nl> tensor = torch . empty ( 1 , 1 , names = ( ' N ' , ' C ' ) ) <nl> <nl> - self . assertEqual ( tensor . set_names ( None ) . names , ( None , None ) ) <nl> - self . assertEqual ( tensor . set_names ( [ ' H ' , ' W ' ] ) . names , ( ' H ' , ' W ' ) ) <nl> + self . assertEqual ( tensor . view_names ( None ) . names , ( None , None ) ) <nl> + self . assertEqual ( tensor . view_names ( [ ' H ' , ' W ' ] ) . names , ( ' H ' , ' W ' ) ) <nl> <nl> # Check that we didn ' t modify tensor . names <nl> self . assertEqual ( tensor . names , ( ' N ' , ' C ' ) ) <nl> <nl> with self . assertRaisesRegex ( RuntimeError , ' Number of names ' ) : <nl> - tensor . set_names ( [ ' N ' , ' C ' , ' W ' ] ) <nl> + tensor . view_names ( [ ' N ' , ' C ' , ' W ' ] ) <nl> with self . assertRaisesRegex ( RuntimeError , ' duplicate names ' ) : <nl> - tensor . set_names ( [ ' N ' , ' N ' ] ) <nl> + tensor . view_names ( [ ' N ' , ' N ' ] ) <nl> <nl> def test_set_names_property ( self ) : <nl> tensor = torch . empty ( 1 , 1 , names = ( ' N ' , ' C ' ) ) <nl> def _test ( factory , device ) : <nl> result = factory ( 1 , 2 , 3 , names = names , device = device ) <nl> <nl> torch . manual_seed ( 0 ) <nl> - expected = factory ( 1 , 2 , 3 , device = device ) . set_names_ ( names ) <nl> + expected = factory ( 1 , 2 , 3 , device = device ) . names_ ( names ) <nl> <nl> self . assertTensorDataAndNamesEqual ( result , expected ) <nl> <nl> def _test ( factory , device ) : <nl> for device in torch . testing . get_all_device_types ( ) : <nl> names = ( ' N ' , ' T ' , ' D ' ) <nl> result = torch . full ( [ 1 , 2 , 3 ] , 2 , names = names , device = device ) <nl> - expected = torch . full ( [ 1 , 2 , 3 ] , 2 , device = device ) . set_names_ ( names ) <nl> + expected = torch . full ( [ 1 , 2 , 3 ] , 2 , device = device ) . names_ ( names ) <nl> self . assertTensorDataAndNamesEqual ( result , expected ) <nl> <nl> def test_size ( self ) : <nl> mmm a / test / test_torch . py <nl> ppp b / test / test_torch . py <nl> def test_namespace ( ns , * skips ) : <nl> ' sparse_resize_ ' , <nl> ' sparse_resize_and_clear_ ' , <nl> ' align_to ' , # BUILD_NAMEDTENSOR only <nl> - ' set_names ' , # BUILD_NAMEDTENSOR only <nl> - ' set_names_ ' , # BUILD_NAMEDTENSOR only <nl> + ' view_names ' , # BUILD_NAMEDTENSOR only <nl> + ' names_ ' , # BUILD_NAMEDTENSOR only <nl> ' has_names ' , # BUILD_NAMEDTENSOR only <nl> ) <nl> test_namespace ( torch . nn ) <nl>
Rename set_names - > view_names , set_names_ - > names_ ( )
pytorch/pytorch
2fcdb3a1f33787c0f2433677139a33784d393be6
2019-08-14T16:40:31Z
new file mode 100644 <nl> index 00000000000 . . 61918aecffe <nl> mmm / dev / null <nl> ppp b / tests / queries / 0_stateless / 001501_cache_dictionary_all_fields . sql <nl> <nl> + CREATE TABLE table_cache_dict ( <nl> + KeyField UInt64 , <nl> + UInt8_ UInt8 , <nl> + UInt16_ UInt16 , <nl> + UInt32_ UInt32 , <nl> + UInt64_ UInt64 , <nl> + Int8_ Int8 , <nl> + Int16_ Int16 , <nl> + Int32_ Int32 , <nl> + Int64_ Int64 , <nl> + UUID_ UUID , <nl> + Date_ Date , <nl> + DateTime_ DateTime , <nl> + String_ String , <nl> + Float32_ Float32 , <nl> + Float64_ Float64 , <nl> + ParentKeyField UInt64 ) <nl> + ENGINE = MergeTree ( ) ORDER BY KeyField ; <nl> + <nl> + <nl> + CREATE DICTIONARY IF NOT EXISTS cache_dict ( <nl> + KeyField UInt64 DEFAULT 9999999 , <nl> + UInt8_ UInt8 DEFAULT 55 , <nl> + UInt16_ UInt16 DEFAULT 65535 , <nl> + UInt32_ UInt32 DEFAULT 4294967295 , <nl> + UInt64_ UInt64 DEFAULT 18446744073709551615 , <nl> + Int8_ Int8 DEFAULT - 128 , <nl> + Int16_ Int16 DEFAULT - 32768 , <nl> + Int32_ Int32 DEFAULT - 2147483648 , <nl> + Int64_ Int64 DEFAULT - 9223372036854775808 , <nl> + UUID_ UUID DEFAULT ' 550e8400 - 0000 - 0000 - 0000 - 000000000000 ' , <nl> + Date_ Date DEFAULT ' 2018 - 12 - 30 ' , <nl> + DateTime_ DateTime DEFAULT ' 2018 - 12 - 30 00 : 00 : 00 ' , <nl> + String_ String DEFAULT ' hi ' , <nl> + Float32_ Float32 DEFAULT 555 . 11 , <nl> + Float64_ Float64 DEFAULT 777 . 11 , <nl> + ParentKeyField UInt64 DEFAULT 444 ) <nl> + PRIMARY KEY KeyField <nl> + SOURCE ( CLICKHOUSE ( HOST ' localhost ' PORT 9000 USER ' default ' TABLE ' table_cache_dict ' DB ' default ' ) ) <nl> + LIFETIME ( 2 ) LAYOUT ( CACHE ( SIZE_IN_CELLS 1 ) ) ; <nl> + <nl> + <nl> + INSERT INTO table_cache_dict VALUES ( 1 , 22 , 333 , 4444 , 55555 , - 6 , - 77 , - 888 , - 999 , ' 550e8400 - e29b - 41d4 - a716 - 446655440003 ' , ' 1973 - 06 - 28 ' , ' 1985 - 02 - 28 23 : 43 : 25 ' , ' clickhouse ' , 22 . 543 , 3332154213 . 4 , 0 ) ; <nl> + INSERT INTO table_cache_dict VALUES ( 2 , 3 , 4 , 5 , 6 , - 7 , - 8 , - 9 , - 10 , ' 550e8400 - e29b - 41d4 - a716 - 446655440002 ' , ' 1978 - 06 - 28 ' , ' 1986 - 02 - 28 23 : 42 : 25 ' , ' hello ' , 21 . 543 , 3222154213 . 4 , 1 ] ) ; <nl> + <nl> + <nl> + <nl> + SELECT arrayDistinct ( groupArray ( dictGetUInt8 ( ' default . cache_dict ' , ' UInt8_ ' , toUInt64 ( number ) ) ) ) from numbers ( 10 ) ; <nl> + SELECT arrayDistinct ( groupArray ( dictGetUInt16 ( ' default . cache_dict ' , ' UInt16_ ' , toUInt64 ( number ) ) ) ) from numbers ( 10 ) ; <nl> + SELECT arrayDistinct ( groupArray ( dictGetUInt32 ( ' default . cache_dict ' , ' UInt32_ ' , toUInt64 ( number ) ) ) ) from numbers ( 10 ) ; <nl> + SELECT arrayDistinct ( groupArray ( dictGetUInt64 ( ' default . cache_dict ' , ' UInt64_ ' , toUInt64 ( number ) ) ) ) from numbers ( 10 ) ; <nl> + SELECT arrayDistinct ( groupArray ( dictGetInt8 ( ' default . cache_dict ' , ' Int8_ ' , toUInt64 ( number ) ) ) ) from numbers ( 10 ) ; <nl> + SELECT arrayDistinct ( groupArray ( dictGetInt16 ( ' default . cache_dict ' , ' Int16_ ' , toUInt64 ( number ) ) ) ) from numbers ( 10 ) ; <nl> + SELECT arrayDistinct ( groupArray ( dictGetInt32 ( ' default . cache_dict ' , ' Int32_ ' , toUInt64 ( number ) ) ) ) from numbers ( 10 ) ; <nl> + SELECT arrayDistinct ( groupArray ( dictGetInt64 ( ' default . cache_dict ' , ' Int64_ ' , toUInt64 ( number ) ) ) ) from numbers ( 10 ) ; <nl> + SELECT arrayDistinct ( groupArray ( dictGetFloat32 ( ' default . cache_dict ' , ' Float32_ ' , toUInt64 ( number ) ) ) ) from numbers ( 10 ) ; <nl> + SELECT arrayDistinct ( groupArray ( dictGetFloat64 ( ' default . cache_dict ' , ' Float64_ ' , toUInt64 ( number ) ) ) ) from numbers ( 10 ) ; <nl> + SELECT arrayDistinct ( groupArray ( dictGetString ( ' default . cache_dict ' , ' String_ ' , toUInt64 ( number ) ) ) ) from numbers ( 10 ) ; <nl> \ No newline at end of file <nl>
add test
ClickHouse/ClickHouse
e75f885ac17f220fa07945308a2428611d2db273
2020-11-17T13:59:12Z
mmm a / folly / portability / Time . cpp <nl> ppp b / folly / portability / Time . cpp <nl> <nl> * / <nl> <nl> # include < folly / portability / Time . h > <nl> + <nl> + # include < folly / CPortability . h > <nl> # include < folly / Likely . h > <nl> <nl> # include < assert . h > <nl> static int clock_thread_cputime ( struct timespec * ts ) { <nl> return 0 ; <nl> } <nl> <nl> - __attribute__ ( ( weak ) ) int clock_gettime ( clockid_t clk_id , struct timespec * ts ) { <nl> + FOLLY_ATTR_WEAK int clock_gettime ( clockid_t clk_id , struct timespec * ts ) { <nl> switch ( clk_id ) { <nl> case CLOCK_REALTIME : { <nl> auto now = std : : chrono : : system_clock : : now ( ) . time_since_epoch ( ) ; <nl>
Prefer FOLLY_ATTR_WEAK over __attribute__ ( ( __weak__ ) )
facebook/folly
561062e6aef7e75962db640a712ba9dd7b62c555
2018-08-14T01:51:35Z
mmm a / . gitmodules <nl> ppp b / . gitmodules <nl> <nl> [ submodule " Telegram / ThirdParty / qt5ct " ] <nl> path = Telegram / ThirdParty / qt5ct <nl> url = https : / / github . com / desktop - app / qt5ct . git <nl> - [ submodule " Telegram / ThirdParty / lxqt - qtplugin " ] <nl> - path = Telegram / ThirdParty / lxqt - qtplugin <nl> - url = https : / / github . com / lxqt / lxqt - qtplugin . git <nl> - [ submodule " Telegram / ThirdParty / libqtxdg " ] <nl> - path = Telegram / ThirdParty / libqtxdg <nl> - url = https : / / github . com / lxqt / libqtxdg . git <nl> [ submodule " Telegram / ThirdParty / fcitx5 - qt " ] <nl> path = Telegram / ThirdParty / fcitx5 - qt <nl> url = https : / / github . com / fcitx / fcitx5 - qt . git <nl> mmm a / Telegram / CMakeLists . txt <nl> ppp b / Telegram / CMakeLists . txt <nl> if ( LINUX ) <nl> ) <nl> <nl> if ( NOT DESKTOP_APP_DISABLE_DBUS_INTEGRATION ) <nl> - # conflicts with Qt static link <nl> - if ( DESKTOP_APP_USE_PACKAGED_LAZY_PLATFORMTHEMES ) <nl> - target_link_libraries ( Telegram <nl> - PRIVATE <nl> - desktop - app : : external_lxqt_qtplugin <nl> - ) <nl> - endif ( ) <nl> - <nl> target_link_libraries ( Telegram <nl> PRIVATE <nl> desktop - app : : external_statusnotifieritem <nl> mmm a / Telegram / SourceFiles / qt_static_plugins . cpp <nl> ppp b / Telegram / SourceFiles / qt_static_plugins . cpp <nl> Q_IMPORT_PLUGIN ( QHimePlatformInputContextPlugin ) <nl> Q_IMPORT_PLUGIN ( Qt5CTPlatformThemePlugin ) <nl> Q_IMPORT_PLUGIN ( Qt5CTStylePlugin ) <nl> # endif / / ! DESKTOP_APP_USE_PACKAGED | | DESKTOP_APP_USE_PACKAGED_LAZY_PLATFORMTHEMES <nl> - <nl> - / / conflicts with Qt static link <nl> - # ifdef DESKTOP_APP_USE_PACKAGED_LAZY_PLATFORMTHEMES <nl> - # ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION <nl> - Q_IMPORT_PLUGIN ( LXQtPlatformThemePlugin ) <nl> - # endif / / ! DESKTOP_APP_DISABLE_DBUS_INTEGRATION <nl> - # endif / / DESKTOP_APP_USE_PACKAGED_LAZY_PLATFORMTHEMES <nl> # endif / / Q_OS_UNIX & & ! Q_OS_MAC <nl> deleted file mode 160000 <nl> index ae412d30c69 . . 00000000000 <nl> mmm a / Telegram / ThirdParty / libqtxdg <nl> ppp / dev / null <nl> @ @ - 1 + 0 , 0 @ @ <nl> - Subproject commit ae412d30c695f3d4ce9b79feabc937eefde5537b <nl> deleted file mode 160000 <nl> index 418162b36ef . . 00000000000 <nl> mmm a / Telegram / ThirdParty / lxqt - qtplugin <nl> ppp / dev / null <nl> @ @ - 1 + 0 , 0 @ @ <nl> - Subproject commit 418162b36eff24fe70fd9195c60fae7276afa286 <nl>
Get rid of lxqt - qtplugin
telegramdesktop/tdesktop
143b9682a43575a4a9ec2bc1bbe893cb23250496
2020-10-23T08:24:37Z
mmm a / torch / csrc / api / include / torch / nn / functional / pooling . h <nl> ppp b / torch / csrc / api / include / torch / nn / functional / pooling . h <nl> inline Tensor max_unpool3d ( const Tensor & input , const Tensor & indices , <nl> namespace detail { <nl> inline Tensor lp_pool1d ( <nl> const Tensor & input , <nl> - float norm_type , <nl> + double norm_type , <nl> ExpandingArray < 1 > kernel_size , <nl> ExpandingArray < 1 > stride , <nl> bool ceil_mode ) { <nl> inline Tensor lp_pool1d ( const Tensor & input , const LPPool1dFuncOptions & options ) <nl> namespace detail { <nl> inline Tensor lp_pool2d ( <nl> const Tensor & input , <nl> - float norm_type , <nl> + double norm_type , <nl> ExpandingArray < 2 > kernel_size , <nl> ExpandingArray < 2 > stride , <nl> bool ceil_mode ) { <nl> mmm a / torch / csrc / api / include / torch / nn / modules / pooling . h <nl> ppp b / torch / csrc / api / include / torch / nn / modules / pooling . h <nl> TORCH_MODULE ( MaxUnpool3d ) ; <nl> template < size_t D , typename Derived > <nl> class TORCH_API LPPoolImpl : public torch : : nn : : Cloneable < Derived > { <nl> public : <nl> - LPPoolImpl ( float norm_type , ExpandingArray < D > kernel_size ) <nl> + LPPoolImpl ( double norm_type , ExpandingArray < D > kernel_size ) <nl> : LPPoolImpl ( LPPoolOptions < D > ( norm_type , kernel_size ) ) { } <nl> explicit LPPoolImpl ( const LPPoolOptions < D > & options_ ) ; <nl> <nl> mmm a / torch / csrc / api / include / torch / nn / options / pooling . h <nl> ppp b / torch / csrc / api / include / torch / nn / options / pooling . h <nl> using MaxUnpool3dFuncOptions = MaxUnpoolFuncOptions < 3 > ; <nl> / / / Options for a ` D ` - dimensional lppool functional and module . <nl> template < size_t D > <nl> struct LPPoolOptions { <nl> - LPPoolOptions ( float norm_type , ExpandingArray < D > kernel_size ) <nl> + LPPoolOptions ( double norm_type , ExpandingArray < D > kernel_size ) <nl> : norm_type_ ( norm_type ) , kernel_size_ ( kernel_size ) , stride_ ( kernel_size ) { } <nl> <nl> - TORCH_ARG ( float , norm_type ) ; <nl> + TORCH_ARG ( double , norm_type ) ; <nl> <nl> / / the size of the window to take an average over <nl> TORCH_ARG ( ExpandingArray < D > , kernel_size ) ; <nl> mmm a / torch / csrc / api / include / torch / nn / utils / clip_grad . h <nl> ppp b / torch / csrc / api / include / torch / nn / utils / clip_grad . h <nl> namespace utils { <nl> / / See <nl> / / https : / / pytorch . org / docs / stable / nn . html ? highlight = clip_grad_norm # torch . nn . utils . clip_grad_norm_ <nl> / / for more details about this module . <nl> - inline float clip_grad_norm_ ( <nl> + inline double clip_grad_norm_ ( <nl> std : : vector < Tensor > & parameters , <nl> - float max_norm , <nl> - float norm_type = 2 . 0 ) { <nl> + double max_norm , <nl> + double norm_type = 2 . 0 ) { <nl> std : : vector < Tensor > params_with_grad ; <nl> <nl> for ( const auto & param : parameters ) { <nl> inline float clip_grad_norm_ ( <nl> params_with_grad . push_back ( param ) ; <nl> } <nl> } <nl> - float total_norm = 0 . 0 ; <nl> - if ( norm_type = = std : : numeric_limits < float > : : infinity ( ) ) { <nl> + double total_norm = 0 . 0 ; <nl> + if ( norm_type = = std : : numeric_limits < double > : : infinity ( ) ) { <nl> for ( const auto & param : params_with_grad ) { <nl> - auto param_max = param . grad ( ) . data ( ) . abs ( ) . max ( ) . item ( ) . toFloat ( ) ; <nl> + auto param_max = param . grad ( ) . data ( ) . abs ( ) . max ( ) . item ( ) . toDouble ( ) ; <nl> if ( param_max > total_norm ) { <nl> total_norm = param_max ; <nl> } <nl> inline float clip_grad_norm_ ( <nl> } else { <nl> for ( const auto & param : params_with_grad ) { <nl> auto param_norm = param . grad ( ) . data ( ) . norm ( norm_type ) ; <nl> - total_norm + = std : : pow ( param_norm . item ( ) . toFloat ( ) , norm_type ) ; <nl> + total_norm + = std : : pow ( param_norm . item ( ) . toDouble ( ) , norm_type ) ; <nl> } <nl> total_norm = std : : pow ( total_norm , 1 . 0 / norm_type ) ; <nl> } <nl> inline float clip_grad_norm_ ( <nl> <nl> / / A wrapper around clip_grad_norm_ that allows us to call the function with a <nl> / / single Tensor . <nl> - inline float clip_grad_norm_ ( <nl> + inline double clip_grad_norm_ ( <nl> Tensor & parameters , <nl> - float max_norm , <nl> - float norm_type = 2 . 0 ) { <nl> + double max_norm , <nl> + double norm_type = 2 . 0 ) { <nl> std : : vector < Tensor > params = { parameters } ; <nl> return clip_grad_norm_ ( params , max_norm , norm_type ) ; <nl> } <nl> inline float clip_grad_norm_ ( <nl> / / for more details about this module . <nl> inline void clip_grad_value_ ( <nl> std : : vector < Tensor > & parameters , <nl> - float clip_value ) { <nl> + double clip_value ) { <nl> <nl> for ( const auto & param : parameters ) { <nl> if ( param . grad ( ) . defined ( ) ) { <nl> inline void clip_grad_value_ ( <nl> <nl> / / A wrapper around clip_grad_value_ that allows us to call the function with a <nl> / / single Tensor . <nl> - inline void clip_grad_value_ ( Tensor & parameters , float clip_value ) { <nl> + inline void clip_grad_value_ ( Tensor & parameters , double clip_value ) { <nl> std : : vector < Tensor > params = { parameters } ; <nl> clip_grad_value_ ( params , clip_value ) ; <nl> } <nl>
Change arg dtype from float to double in LPPool and nn / utils / clip_grad . h ( )
pytorch/pytorch
433baf1b9067774aecdeef8e32664827779ddb86
2019-11-13T00:05:35Z
mmm a / src / image / imagecommandlineparser . cc <nl> ppp b / src / image / imagecommandlineparser . cc <nl> void ImageCommandLineParser : : parseArguments ( int argc , const char * * argv , bool f <nl> bool defaultMode = false ; <nl> for ( int i = 1 ; i < argc ; + + i ) { <nl> if ( i = = argc - 2 & & ( argv [ i ] [ 0 ] ! = ' - ' | | argv [ i ] [ 1 ] = = ' \ 0 ' ) ) { / / the arg before last ( in ) <nl> - settings . in = argv [ i ] ; <nl> + settings . in = QString : : fromUtf8 ( argv [ i ] ) ; <nl> } else if ( i = = argc - 1 & & ( argv [ i ] [ 0 ] ! = ' - ' | | argv [ i ] [ 1 ] = = ' \ 0 ' ) ) { / / the last arg ( out ) <nl> - settings . out = argv [ i ] ; <nl> + settings . out = QString : : fromUtf8 ( argv [ i ] ) ; <nl> } else { <nl> parseArg ( global , argc , argv , defaultMode , i , 0 ) ; <nl> } <nl> mmm a / src / pdf / pdfcommandlineparser . cc <nl> ppp b / src / pdf / pdfcommandlineparser . cc <nl> void PdfCommandLineParser : : parseArguments ( int argc , const char * * argv , bool fro <nl> usage ( stderr , false ) ; <nl> exit ( 1 ) ; <nl> } <nl> - globalSettings . out = argv [ argc - 1 ] ; <nl> + globalSettings . out = QString : : fromUtf8 ( argv [ argc - 1 ] ) ; <nl> } <nl>
Fix issue 429 : output filenames interperted as latin1 instead of utf8
wkhtmltopdf/wkhtmltopdf
b92de5910fd977585e2a95312a7b6e0daba6da9f
2011-10-03T18:57:51Z
mmm a / tools / ports / binaryen . py <nl> ppp b / tools / ports / binaryen . py <nl> <nl> import logging <nl> <nl> TAG = ' version_84 ' <nl> + HASH = ' 8ac3dc8dc63e76925c4c0cbe1da2fb3a936fb4ff9563c11b360fc483411ee1960b8b4d32fb61505e559e451724c632830bacd2158ead2efc52b5313354bf35f7 ' <nl> <nl> <nl> def needed ( settings , shared , ports ) : <nl> def get ( ports , settings , shared ) : <nl> if not needed ( settings , shared , ports ) : <nl> return [ ] <nl> <nl> - ports . fetch_project ( ' binaryen ' , ' https : / / github . com / WebAssembly / binaryen / archive / ' + TAG + ' . zip ' , ' binaryen - ' + TAG ) <nl> + ports . fetch_project ( ' binaryen ' , ' https : / / github . com / WebAssembly / binaryen / archive / ' + TAG + ' . zip ' , ' binaryen - ' + TAG , sha512hash = HASH ) <nl> <nl> def create ( ) : <nl> logging . info ( ' building port : binaryen ' ) <nl> mmm a / tools / ports / bullet . py <nl> ppp b / tools / ports / bullet . py <nl> <nl> import shutil <nl> <nl> TAG = ' version_1 ' <nl> + HASH = ' 3922486816cf7d99ee02c3c1ef63d94290e8ed304016dd9927137d04206e7674d9df8773a4abb7bb57783d0a5107ad0f893aa87acfb34f7b316eec22ca55a536 ' <nl> <nl> <nl> def get ( ports , settings , shared ) : <nl> if settings . USE_BULLET ! = 1 : <nl> return [ ] <nl> <nl> - ports . fetch_project ( ' bullet ' , ' https : / / github . com / emscripten - ports / bullet / archive / ' + TAG + ' . zip ' , ' Bullet - ' + TAG ) <nl> + ports . fetch_project ( ' bullet ' , ' https : / / github . com / emscripten - ports / bullet / archive / ' + TAG + ' . zip ' , ' Bullet - ' + TAG , sha512hash = HASH ) <nl> libname = ports . get_lib_name ( ' libbullet ' ) <nl> <nl> def create ( ) : <nl> mmm a / tools / ports / bzip2 . py <nl> ppp b / tools / ports / bzip2 . py <nl> <nl> import shutil <nl> <nl> VERSION = ' 1 . 0 . 6 ' <nl> + HASH = ' 00ace5438cfa0c577e5f578d8a808613187eff5217c35164ffe044fbafdfec9e98f4192c02a7d67e01e5a5ccced630583ad1003c37697219b0f147343a3fdd12 ' <nl> <nl> <nl> def get ( ports , settings , shared ) : <nl> if settings . USE_BZIP2 ! = 1 : <nl> return [ ] <nl> <nl> - ports . fetch_project ( ' bzip2 ' , ' https : / / downloads . sourceforge . net / project / bzip2 / bzip2 - 1 . 0 . 6 . tar . gz ' , ' bzip2 - 1 . 0 . 6 ' ) <nl> + ports . fetch_project ( ' bzip2 ' , ' https : / / downloads . sourceforge . net / project / bzip2 / bzip2 - 1 . 0 . 6 . tar . gz ' , ' bzip2 - 1 . 0 . 6 ' , sha512hash = HASH ) <nl> <nl> def create ( ) : <nl> ports . clear_project_build ( ' bzip2 ' ) <nl> mmm a / tools / ports / cocos2d . py <nl> ppp b / tools / ports / cocos2d . py <nl> <nl> import re <nl> <nl> TAG = ' version_3_3 ' <nl> + HASH = ' d7b22660036c684f09754fcbbc7562984f02aa955eef2b76555270c63a717e6672c4fe695afb16280822e8b7c75d4b99ae21975a01a4ed51cad957f7783722cd ' <nl> <nl> <nl> def get ( ports , settings , shared ) : <nl> def get ( ports , settings , shared ) : <nl> return [ ] <nl> <nl> ports . fetch_project ( <nl> - ' cocos2d ' , ' https : / / github . com / emscripten - ports / Cocos2d / archive / ' + TAG + ' . zip ' , ' Cocos2d - ' + TAG ) <nl> + ' cocos2d ' , ' https : / / github . com / emscripten - ports / Cocos2d / archive / ' + TAG + ' . zip ' , ' Cocos2d - ' + TAG , sha512hash = HASH ) <nl> libname = ports . get_lib_name ( ' libcocos2d ' ) <nl> <nl> def create ( ) : <nl> mmm a / tools / ports / freetype . py <nl> ppp b / tools / ports / freetype . py <nl> <nl> from subprocess import Popen <nl> <nl> TAG = ' version_1 ' <nl> + HASH = ' 0d0b1280ba0501ad0a23cf1daa1f86821c722218b59432734d3087a89acd22aabd5c3e5e1269700dcd41e87073046e906060f167c032eb91a3ac8c5808a02783 ' <nl> <nl> <nl> def get ( ports , settings , shared ) : <nl> if settings . USE_FREETYPE ! = 1 : <nl> return [ ] <nl> <nl> - ports . fetch_project ( ' freetype ' , ' https : / / github . com / emscripten - ports / FreeType / archive / ' + TAG + ' . zip ' , ' FreeType - ' + TAG ) <nl> + ports . fetch_project ( ' freetype ' , ' https : / / github . com / emscripten - ports / FreeType / archive / ' + TAG + ' . zip ' , ' FreeType - ' + TAG , sha512hash = HASH ) <nl> <nl> def create ( ) : <nl> ports . clear_project_build ( ' freetype ' ) <nl> mmm a / tools / ports / harfbuzz . py <nl> ppp b / tools / ports / harfbuzz . py <nl> <nl> import logging <nl> <nl> TAG = ' 1 . 7 . 5 ' <nl> + HASH = ' c2c13fc97bb74f0f13092b07804f7087e948bce49793f48b62c2c24a5792523acc0002840bebf21829172bb2e7c3df9f9625250aec6c786a55489667dd04d6a0 ' <nl> <nl> <nl> def get ( ports , settings , shared ) : <nl> def get ( ports , settings , shared ) : <nl> return [ ] <nl> <nl> ports . fetch_project ( ' harfbuzz ' , ' https : / / github . com / harfbuzz / harfbuzz / releases / download / ' + <nl> - TAG + ' / harfbuzz - ' + TAG + ' . tar . bz2 ' , ' harfbuzz - ' + TAG , is_tarbz2 = True ) <nl> + TAG + ' / harfbuzz - ' + TAG + ' . tar . bz2 ' , ' harfbuzz - ' + TAG , is_tarbz2 = True , sha512hash = HASH ) <nl> <nl> def create ( ) : <nl> logging . info ( ' building port : harfbuzz ' ) <nl> mmm a / tools / ports / icu . py <nl> ppp b / tools / ports / icu . py <nl> <nl> import shutil <nl> <nl> TAG = ' release - 62 - 1 ' <nl> + HASH = ' a990529dc03901f40424b506b6ad748010db98bbb29249e7106f259cc11e03a17cb3054bd7f7cb86116b169ff39c90f232603d762d39271fb5be94550d03f9fb ' <nl> <nl> <nl> def get ( ports , settings , shared ) : <nl> if settings . USE_ICU ! = 1 : <nl> return [ ] <nl> <nl> - ports . fetch_project ( ' icu ' , ' https : / / github . com / unicode - org / icu / archive / ' + TAG + ' . zip ' , ' icu - ' + TAG ) <nl> + ports . fetch_project ( ' icu ' , ' https : / / github . com / unicode - org / icu / archive / ' + TAG + ' . zip ' , ' icu - ' + TAG , sha512hash = HASH ) <nl> libname = ports . get_lib_name ( ' libicuuc ' ) <nl> <nl> def create ( ) : <nl> mmm a / tools / ports / libjpeg . py <nl> ppp b / tools / ports / libjpeg . py <nl> <nl> import logging <nl> <nl> VERSION = ' 9c ' <nl> + HASH = ' 2b581c60ae401a79bbbe748ff2deeda5acd50bfd2ea22e5926e36d34b9ebcffb6580b0ff48e972c1441583e30e21e1ea821ca0423f9c67ce08a31dffabdbe6b7 ' <nl> <nl> <nl> def get ( ports , settings , shared ) : <nl> if settings . USE_LIBJPEG ! = 1 : <nl> return [ ] <nl> <nl> - ports . fetch_project ( ' libjpeg ' , ' https : / / dl . bintray . com / homebrew / mirror / jpeg - 9c . tar . gz ' , ' jpeg - 9c ' ) <nl> + ports . fetch_project ( ' libjpeg ' , ' https : / / dl . bintray . com / homebrew / mirror / jpeg - 9c . tar . gz ' , ' jpeg - 9c ' , sha512hash = HASH ) <nl> <nl> libname = ports . get_lib_name ( ' libjpeg ' ) <nl> <nl> mmm a / tools / ports / libpng . py <nl> ppp b / tools / ports / libpng . py <nl> <nl> import logging <nl> <nl> TAG = ' version_1 ' <nl> + HASH = ' a19ede8a4339f2745a490c22f3893899e1a5eae9d2b270e49d88d3a85239fbbaa26c9a352d0e6fb8bb69b4f45bd00c1ae9eff29b60cf03e79c5df45a4409992f ' <nl> <nl> <nl> def get ( ports , settings , shared ) : <nl> if settings . USE_LIBPNG ! = 1 : <nl> return [ ] <nl> <nl> - ports . fetch_project ( ' libpng ' , ' https : / / github . com / emscripten - ports / libpng / archive / ' + TAG + ' . zip ' , ' libpng - ' + TAG ) <nl> + ports . fetch_project ( ' libpng ' , ' https : / / github . com / emscripten - ports / libpng / archive / ' + TAG + ' . zip ' , ' libpng - ' + TAG , sha512hash = HASH ) <nl> <nl> libname = ports . get_lib_name ( ' libpng ' ) <nl> <nl> mmm a / tools / ports / ogg . py <nl> ppp b / tools / ports / ogg . py <nl> <nl> import shutil <nl> <nl> TAG = ' version_1 ' <nl> + HASH = ' 929e8d6003c06ae09593021b83323c8f1f54532b67b8ba189f4aedce52c25dc182bac474de5392c46ad5b0dea5a24928e4ede1492d52f4dd5cd58eea9be4dba7 ' <nl> <nl> <nl> def get ( ports , settings , shared ) : <nl> if settings . USE_OGG ! = 1 : <nl> return [ ] <nl> <nl> - ports . fetch_project ( ' ogg ' , ' https : / / github . com / emscripten - ports / ogg / archive / ' + TAG + ' . zip ' , ' Ogg - ' + TAG ) <nl> + ports . fetch_project ( ' ogg ' , ' https : / / github . com / emscripten - ports / ogg / archive / ' + TAG + ' . zip ' , ' Ogg - ' + TAG , sha512hash = HASH ) <nl> libname = ports . get_lib_name ( ' libogg ' ) <nl> <nl> def create ( ) : <nl> mmm a / tools / ports / regal . py <nl> ppp b / tools / ports / regal . py <nl> <nl> import shutil <nl> <nl> TAG = ' version_4 ' <nl> + HASH = ' db702ee677d6ee276663922560012fe8d28c5f414ba50a628320432212bdcb606c34bc71f7a533416f43bd0226ceb819f79af822f11518d53552a071a27fc841 ' <nl> <nl> <nl> def get ( ports , settings , shared ) : <nl> def get ( ports , settings , shared ) : <nl> return [ ] <nl> <nl> ports . fetch_project ( ' regal ' , ' https : / / github . com / emscripten - ports / regal / archive / ' + TAG + ' . zip ' , <nl> - ' regal - ' + TAG ) <nl> + ' regal - ' + TAG , sha512hash = HASH ) <nl> libname = ports . get_lib_name ( ' libregal ' ) <nl> <nl> def create ( ) : <nl> mmm a / tools / ports / sdl2 . py <nl> ppp b / tools / ports / sdl2 . py <nl> <nl> import shutil <nl> <nl> TAG = ' version_18 ' <nl> + HASH = ' 3a677c06d693c1568543eeb9179f9211a8c482738dab4400ccbc39aabe0cd1e57085e63ba1c25e9faefda1e06046d3b528298c96bb20c132b7c80e2e0aba972c ' <nl> SUBDIR = ' SDL2 - ' + TAG <nl> <nl> <nl> def get ( ports , settings , shared ) : <nl> return [ ] <nl> <nl> # get the port <nl> - ports . fetch_project ( ' sdl2 ' , ' https : / / github . com / emscripten - ports / SDL2 / archive / ' + TAG + ' . zip ' , SUBDIR ) <nl> + ports . fetch_project ( ' sdl2 ' , ' https : / / github . com / emscripten - ports / SDL2 / archive / ' + TAG + ' . zip ' , SUBDIR , sha512hash = HASH ) <nl> libname = ports . get_lib_name ( ' libSDL2 ' + ( ' - mt ' if settings . USE_PTHREADS else ' ' ) ) <nl> <nl> def create ( ) : <nl> mmm a / tools / ports / sdl2_gfx . py <nl> ppp b / tools / ports / sdl2_gfx . py <nl> <nl> import logging <nl> <nl> TAG = ' 2b147ffef10ec541d3eace326eafe11a54e635f8 ' <nl> + HASH = ' f39f1f50a039a1667fe92b87d28548d32adcf0eb8526008656de5315039aa21f29d230707caa47f80f6b3a412a577698cd4bbfb9458bb92ac47e6ba993b8efe6 ' <nl> <nl> <nl> def get ( ports , settings , shared ) : <nl> def get ( ports , settings , shared ) : <nl> <nl> sdl_build = os . path . join ( ports . get_build_dir ( ) , ' sdl2 ' ) <nl> assert os . path . exists ( sdl_build ) , ' You must use SDL2 to use SDL2_gfx ' <nl> - ports . fetch_project ( ' sdl2_gfx ' , ' https : / / github . com / svn2github / sdl2_gfx / archive / ' + TAG + ' . zip ' , ' sdl2_gfx - ' + TAG ) <nl> + ports . fetch_project ( ' sdl2_gfx ' , ' https : / / github . com / svn2github / sdl2_gfx / archive / ' + TAG + ' . zip ' , ' sdl2_gfx - ' + TAG , sha512hash = HASH ) <nl> libname = ports . get_lib_name ( ' libSDL2_gfx ' ) <nl> <nl> def create ( ) : <nl> mmm a / tools / ports / sdl2_image . py <nl> ppp b / tools / ports / sdl2_image . py <nl> <nl> import shutil <nl> <nl> TAG = ' version_4 ' <nl> + HASH = ' 30a7b04652239bccff3cb1fa7cd8ae602791b5f502a96df39585c13ebc4bb2b64ba1598c0d1f5382028d94e04a5ca02185ea06bf7f4b3520f6df4cc253f9dd24 ' <nl> <nl> <nl> def get ( ports , settings , shared ) : <nl> def get ( ports , settings , shared ) : <nl> <nl> sdl_build = os . path . join ( ports . get_build_dir ( ) , ' sdl2 ' ) <nl> assert os . path . exists ( sdl_build ) , ' You must use SDL2 to use SDL2_image ' <nl> - ports . fetch_project ( ' sdl2_image ' , ' https : / / github . com / emscripten - ports / SDL2_image / archive / ' + TAG + ' . zip ' , ' SDL2_image - ' + TAG ) <nl> + ports . fetch_project ( ' sdl2_image ' , ' https : / / github . com / emscripten - ports / SDL2_image / archive / ' + TAG + ' . zip ' , ' SDL2_image - ' + TAG , sha512hash = HASH ) <nl> <nl> settings . SDL2_IMAGE_FORMATS . sort ( ) <nl> formats = ' - ' . join ( settings . SDL2_IMAGE_FORMATS ) <nl> mmm a / tools / ports / sdl2_mixer . py <nl> ppp b / tools / ports / sdl2_mixer . py <nl> <nl> import stat <nl> <nl> TAG = ' release - 2 . 0 . 1 ' <nl> + HASH = ' 81fac757bd058adcb3eb5b2cc46addeaa44cee2cd4db653dad5d9666bdc0385cdc21bf5b72872e6dd6dd8eb65812a46d7752298827d6c61ad5ce2b6c963f7ed0 ' <nl> <nl> <nl> def get ( ports , settings , shared ) : <nl> def get ( ports , settings , shared ) : <nl> <nl> sdl_build = os . path . join ( ports . get_build_dir ( ) , ' sdl2 ' ) <nl> assert os . path . exists ( sdl_build ) , ' You must use SDL2 to use SDL2_mixer ' <nl> - ports . fetch_project ( ' sdl2_mixer ' , ' https : / / github . com / emscripten - ports / SDL2_mixer / archive / ' + TAG + ' . zip ' , ' SDL2_mixer - ' + TAG ) <nl> + ports . fetch_project ( ' sdl2_mixer ' , ' https : / / github . com / emscripten - ports / SDL2_mixer / archive / ' + TAG + ' . zip ' , ' SDL2_mixer - ' + TAG , sha512hash = HASH ) <nl> <nl> def create ( ) : <nl> cwd = os . getcwd ( ) <nl> mmm a / tools / ports / sdl2_net . py <nl> ppp b / tools / ports / sdl2_net . py <nl> <nl> <nl> <nl> TAG = ' version_2 ' <nl> + HASH = ' 317b22ad9b6b2f7b40fac7b7c426da2fa2da1803bbe58d480631f1e5b190d730763f2768c77c72affa806c69a1e703f401b15a1be3ec611cd259950d5ebc3711 ' <nl> <nl> <nl> def get ( ports , settings , shared ) : <nl> def get ( ports , settings , shared ) : <nl> <nl> sdl_build = os . path . join ( ports . get_build_dir ( ) , ' sdl2 ' ) <nl> assert os . path . exists ( sdl_build ) , ' You must use SDL2 to use SDL2_net ' <nl> - ports . fetch_project ( ' sdl2_net ' , ' https : / / github . com / emscripten - ports / SDL2_net / archive / ' + TAG + ' . zip ' , ' SDL2_net - ' + TAG ) <nl> + ports . fetch_project ( ' sdl2_net ' , ' https : / / github . com / emscripten - ports / SDL2_net / archive / ' + TAG + ' . zip ' , ' SDL2_net - ' + TAG , sha512hash = HASH ) <nl> libname = ports . get_lib_name ( ' libSDL2_net ' ) <nl> <nl> def create ( ) : <nl> mmm a / tools / ports / sdl2_ttf . py <nl> ppp b / tools / ports / sdl2_ttf . py <nl> <nl> import shutil <nl> <nl> TAG = ' version_1 ' <nl> + HASH = ' 6ce426de0411ba51dd307027c4ef00ff3de4ee396018e524265970039132ab20adb29c2d2e61576c393056374f03fd148dd96f0c4abf8dcee51853dd32f0778f ' <nl> <nl> <nl> def get ( ports , settings , shared ) : <nl> if settings . USE_SDL_TTF ! = 2 : <nl> return [ ] <nl> <nl> - ports . fetch_project ( ' sdl2_ttf ' , ' https : / / github . com / emscripten - ports / SDL2_ttf / archive / ' + TAG + ' . zip ' , ' SDL2_ttf - ' + TAG ) <nl> + ports . fetch_project ( ' sdl2_ttf ' , ' https : / / github . com / emscripten - ports / SDL2_ttf / archive / ' + TAG + ' . zip ' , ' SDL2_ttf - ' + TAG , sha512hash = HASH ) <nl> libname = ports . get_lib_name ( ' libSDL2_ttf ' ) <nl> <nl> def create ( ) : <nl> mmm a / tools / ports / vorbis . py <nl> ppp b / tools / ports / vorbis . py <nl> <nl> import shutil <nl> <nl> TAG = ' version_1 ' <nl> + HASH = ' 99bee75beb662f8520bbb18ad6dbf8590d30eb3a7360899f0ac4764ca72fe8013da37c9df21e525f9d2dc5632827d4b4cea558cbc938e7fbed0c41a29a7a2dc5 ' <nl> <nl> <nl> def get ( ports , settings , shared ) : <nl> if settings . USE_VORBIS ! = 1 : <nl> return [ ] <nl> <nl> - ports . fetch_project ( ' vorbis ' , ' https : / / github . com / emscripten - ports / vorbis / archive / ' + TAG + ' . zip ' , ' Vorbis - ' + TAG ) <nl> + ports . fetch_project ( ' vorbis ' , ' https : / / github . com / emscripten - ports / vorbis / archive / ' + TAG + ' . zip ' , ' Vorbis - ' + TAG , sha512hash = HASH ) <nl> libname = ports . get_lib_name ( ' libvorbis ' ) <nl> <nl> def create ( ) : <nl> mmm a / tools / ports / zlib . py <nl> ppp b / tools / ports / zlib . py <nl> <nl> import shutil <nl> <nl> TAG = ' version_1 ' <nl> + HASH = ' 77f7d8f18fe11bb66a57e358325b7422d721f7b506bd63293cfde74079f958864db66ead5a36c311a76dd8c2b089b7659641a5522de650de0f9e6865782a60dd ' <nl> <nl> <nl> def get ( ports , settings , shared ) : <nl> if settings . USE_ZLIB ! = 1 : <nl> return [ ] <nl> <nl> - ports . fetch_project ( ' zlib ' , ' https : / / github . com / emscripten - ports / zlib / archive / ' + TAG + ' . zip ' , ' zlib - ' + TAG ) <nl> + ports . fetch_project ( ' zlib ' , ' https : / / github . com / emscripten - ports / zlib / archive / ' + TAG + ' . zip ' , ' zlib - ' + TAG , sha512hash = HASH ) <nl> <nl> def create ( ) : <nl> ports . clear_project_build ( ' zlib ' ) <nl> mmm a / tools / system_libs . py <nl> ppp b / tools / system_libs . py <nl> <nl> # found in the LICENSE file . <nl> <nl> from __future__ import print_function <nl> + import hashlib <nl> import itertools <nl> import json <nl> import logging <nl> def get_build_dir ( ) : <nl> name_cache = set ( ) <nl> <nl> @ staticmethod <nl> - def fetch_project ( name , url , subdir , is_tarbz2 = False ) : <nl> + def fetch_project ( name , url , subdir , is_tarbz2 = False , sha512hash = None ) : <nl> + # To compute the sha512 hash , run ` curl URL | sha512sum ` . <nl> fullname = os . path . join ( Ports . get_dir ( ) , name ) <nl> <nl> # if EMCC_LOCAL_PORTS is set , we use a local directory as our ports . This is useful <nl> def retrieve ( ) : <nl> f = urlopen ( url ) <nl> data = f . read ( ) <nl> <nl> + if sha512hash : <nl> + actual_hash = hashlib . sha512 ( data ) . hexdigest ( ) <nl> + if actual_hash ! = sha512hash : <nl> + raise RuntimeError ( ' Unexpected hash : ' + actual_hash + ' \ n ' <nl> + ' If you are updating the port , please update the hash in the port module . ' ) <nl> open ( fullpath , ' wb ' ) . write ( data ) <nl> State . retrieved = True <nl> <nl>
Check hash when downloading ports ( )
emscripten-core/emscripten
e293d8cbf638b5d09e67790a2f6a49ddde5219df
2019-06-18T00:59:51Z
mmm a / test / test_nn . py <nl> ppp b / test / test_nn . py <nl> def test_bce_with_logits_gives_same_result_as_sigmooid_and_bce_loss ( self ) : <nl> weight = torch . rand ( 4 ) <nl> self . assertEqual ( nn . BCEWithLogitsLoss ( weight ) ( output , target ) , nn . BCELoss ( weight ) ( sigmoid ( output ) , target ) ) <nl> <nl> + def test_batchnorm_raises_error_if_running_mean_is_not_same_size_as_input ( self ) : <nl> + input = Variable ( torch . rand ( 2 , 10 ) ) <nl> + running_var = torch . rand ( 10 ) <nl> + wrong_sizes = [ 9 , 11 ] <nl> + for size in wrong_sizes : <nl> + with self . assertRaises ( RuntimeError ) : <nl> + F . batch_norm ( input , torch . rand ( size ) , running_var ) <nl> + <nl> + def test_batchnorm_raises_error_if_running_var_is_not_same_size_as_input ( self ) : <nl> + input = Variable ( torch . rand ( 2 , 10 ) ) <nl> + running_mean = torch . rand ( 10 ) <nl> + wrong_sizes = [ 9 , 11 ] <nl> + for size in wrong_sizes : <nl> + with self . assertRaises ( RuntimeError ) : <nl> + F . batch_norm ( input , running_mean , torch . rand ( size ) ) <nl> + <nl> + def test_batchnorm_raises_error_if_weight_is_not_same_size_as_input ( self ) : <nl> + input = Variable ( torch . rand ( 2 , 10 ) ) <nl> + running_mean = torch . rand ( 10 ) <nl> + running_var = torch . rand ( 10 ) <nl> + wrong_sizes = [ 9 , 11 ] <nl> + for size in wrong_sizes : <nl> + with self . assertRaises ( RuntimeError ) : <nl> + F . batch_norm ( input , running_mean , running_var , weight = Parameter ( torch . rand ( size ) ) ) <nl> + <nl> + def test_batchnorm_raises_error_if_bias_is_not_same_size_as_input ( self ) : <nl> + input = Variable ( torch . rand ( 2 , 10 ) ) <nl> + running_mean = torch . rand ( 10 ) <nl> + running_var = torch . rand ( 10 ) <nl> + wrong_sizes = [ 9 , 11 ] <nl> + for size in wrong_sizes : <nl> + with self . assertRaises ( RuntimeError ) : <nl> + F . batch_norm ( input , running_mean , running_var , bias = Parameter ( torch . rand ( size ) ) ) <nl> + <nl> def test_batchnorm_eval ( self ) : <nl> types = ( torch . FloatTensor , ) <nl> if TEST_CUDA : <nl> mmm a / torch / csrc / autograd / functions / batch_normalization . cpp <nl> ppp b / torch / csrc / autograd / functions / batch_normalization . cpp <nl> <nl> # include " torch / csrc / autograd / functions / basic_ops . h " <nl> # include " torch / csrc / nn / THNN_generic . h " <nl> # include " torch / csrc / utils / auto_gpu . h " <nl> + # include < sstream > <nl> <nl> # ifdef WITH_CUDNN <nl> # include " torch / csrc / cudnn / BatchNorm . h " <nl> <nl> extern THCState * state ; <nl> # endif <nl> <nl> + namespace { <nl> + void check_dims_match_num_input_features ( const std : : string & arg_name , long expected , long actual ) { <nl> + if ( actual ! = expected ) { <nl> + std : : stringstream ss ; <nl> + ss < < arg_name < < " should contain " < < expected < < " elements not " < < actual ; <nl> + throw std : : runtime_error ( ss . str ( ) ) ; <nl> + } <nl> + } <nl> + } <nl> + <nl> namespace torch { namespace autograd { <nl> <nl> using thpp : : Tensor ; <nl> using thpp : : Tensor ; <nl> <nl> auto BatchNormForward : : apply ( const variable_list & inputs ) - > variable_list { <nl> check_input_variables ( " BatchNorm " , inputs , 3 , 1 ) ; <nl> - <nl> + <nl> auto & input = inputs [ 0 ] ; <nl> auto & weight = inputs [ 1 ] ; <nl> auto & bias = inputs [ 2 ] ; <nl> AutoGPU guard ( input - > data - > getDevice ( ) ) ; <nl> + <nl> + auto num_features = input - > data - > rawSizes ( ) [ 1 ] ; <nl> + check_dims_match_num_input_features ( " running_mean " , num_features , running_mean - > numel ( ) ) ; <nl> + check_dims_match_num_input_features ( " running_var " , num_features , running_var - > numel ( ) ) ; <nl> + if ( weight ) { <nl> + check_dims_match_num_input_features ( " weight " , num_features , weight - > data - > numel ( ) ) ; <nl> + } <nl> + if ( bias ) { <nl> + check_dims_match_num_input_features ( " bias " , num_features , bias - > data - > numel ( ) ) ; <nl> + } <nl> <nl> bool use_cudnn = false ; <nl> # ifdef WITH_CUDNN <nl> mmm a / torch / nn / modules / batchnorm . py <nl> ppp b / torch / nn / modules / batchnorm . py <nl> def reset_parameters ( self ) : <nl> self . weight . data . uniform_ ( ) <nl> self . bias . data . zero_ ( ) <nl> <nl> - def _check_input_dim ( self , input ) : <nl> - if input . size ( 1 ) ! = self . running_mean . nelement ( ) : <nl> - raise ValueError ( ' got { } - feature tensor , expected { } ' <nl> - . format ( input . size ( 1 ) , self . num_features ) ) <nl> - <nl> def forward ( self , input ) : <nl> - self . _check_input_dim ( input ) <nl> return F . batch_norm ( <nl> input , self . running_mean , self . running_var , self . weight , self . bias , <nl> self . training , self . momentum , self . eps ) <nl> mmm a / torch / nn / modules / instancenorm . py <nl> ppp b / torch / nn / modules / instancenorm . py <nl> def __init__ ( self , num_features , eps = 1e - 5 , momentum = 0 . 1 , affine = False ) : <nl> num_features , eps , momentum , affine ) <nl> <nl> def forward ( self , input ) : <nl> - self . _check_input_dim ( input ) <nl> - <nl> b , c = input . size ( 0 ) , input . size ( 1 ) <nl> <nl> # Repeat stored stats and affine transform params <nl>
added input size checks to batchnorm ( )
pytorch/pytorch
c6d7e1e6bfd52a8f93debd44aaaecde4daf759ac
2017-07-09T19:31:24Z
mmm a / yoga / YGStyle . h <nl> ppp b / yoga / YGStyle . h <nl> <nl> # include < array > <nl> # include < cstdint > <nl> # include < type_traits > <nl> - # include " Bitfield . h " <nl> # include " CompactValue . h " <nl> # include " YGEnums . h " <nl> # include " YGFloatOptional . h " <nl> # include " Yoga - internal . h " <nl> # include " Yoga . h " <nl> + # include " BitUtils . h " <nl> <nl> class YOGA_EXPORT YGStyle { <nl> template < typename Enum > <nl> class YOGA_EXPORT YGStyle { <nl> using Dimensions = Values < YGDimension > ; <nl> using Edges = Values < YGEdge > ; <nl> <nl> + template < typename T > <nl> + struct BitfieldRef { <nl> + YGStyle & style ; <nl> + size_t offset ; <nl> + operator T ( ) const { <nl> + return facebook : : yoga : : detail : : getEnumData < T > ( style . flags , offset ) ; <nl> + } <nl> + BitfieldRef < T > & operator = ( T x ) { <nl> + facebook : : yoga : : detail : : setEnumData < T > ( style . flags , offset , x ) ; <nl> + return * this ; <nl> + } <nl> + } ; <nl> + <nl> template < typename T , T YGStyle : : * Prop > <nl> struct Ref { <nl> YGStyle & style ; <nl> class YOGA_EXPORT YGStyle { <nl> CompactValue operator [ ] ( Idx idx ) const { return ( style . * Prop ) [ idx ] ; } <nl> } ; <nl> <nl> - YGStyle ( ) = default ; <nl> + YGStyle ( ) { <nl> + alignContent ( ) = YGAlignFlexStart ; <nl> + alignItems ( ) = YGAlignStretch ; <nl> + } <nl> ~ YGStyle ( ) = default ; <nl> <nl> private : <nl> - static constexpr size_t directionIdx = 0 ; <nl> - static constexpr size_t flexDirectionIdx = 1 ; <nl> - static constexpr size_t justifyContentIdx = 2 ; <nl> - static constexpr size_t alignContentIdx = 3 ; <nl> - static constexpr size_t alignItemsIdx = 4 ; <nl> - static constexpr size_t alignSelfIdx = 5 ; <nl> - static constexpr size_t positionTypeIdx = 6 ; <nl> - static constexpr size_t flexWrapIdx = 7 ; <nl> - static constexpr size_t overflowIdx = 8 ; <nl> - static constexpr size_t displayIdx = 9 ; <nl> - using Flags = facebook : : yoga : : Bitfield < <nl> - uint32_t , <nl> - YGDirection , <nl> - YGFlexDirection , <nl> - YGJustify , <nl> - YGAlign , <nl> - YGAlign , <nl> - YGAlign , <nl> - YGPositionType , <nl> - YGWrap , <nl> - YGOverflow , <nl> - YGDisplay > ; <nl> - <nl> - Flags flags_ = { YGDirectionInherit , <nl> - YGFlexDirectionColumn , <nl> - YGJustifyFlexStart , <nl> - YGAlignFlexStart , <nl> - YGAlignStretch , <nl> - YGAlignAuto , <nl> - YGPositionTypeRelative , <nl> - YGWrapNoWrap , <nl> - YGOverflowVisible , <nl> - YGDisplayFlex } ; <nl> + static constexpr size_t directionOffset = 0 ; <nl> + static constexpr size_t flexdirectionOffset = <nl> + directionOffset + facebook : : yoga : : detail : : bitWidthFn < YGDirection > ( ) ; <nl> + static constexpr size_t justifyContentOffset = flexdirectionOffset + <nl> + facebook : : yoga : : detail : : bitWidthFn < YGFlexDirection > ( ) ; <nl> + static constexpr size_t alignContentOffset = <nl> + justifyContentOffset + facebook : : yoga : : detail : : bitWidthFn < YGJustify > ( ) ; <nl> + static constexpr size_t alignItemsOffset = <nl> + alignContentOffset + facebook : : yoga : : detail : : bitWidthFn < YGAlign > ( ) ; <nl> + static constexpr size_t alignSelfOffset = <nl> + alignItemsOffset + facebook : : yoga : : detail : : bitWidthFn < YGAlign > ( ) ; <nl> + static constexpr size_t positionTypeOffset = <nl> + alignSelfOffset + facebook : : yoga : : detail : : bitWidthFn < YGAlign > ( ) ; <nl> + static constexpr size_t flexWrapOffset = <nl> + positionTypeOffset + facebook : : yoga : : detail : : bitWidthFn < YGPositionType > ( ) ; <nl> + static constexpr size_t overflowOffset = <nl> + flexWrapOffset + facebook : : yoga : : detail : : bitWidthFn < YGWrap > ( ) ; <nl> + static constexpr size_t displayOffset = <nl> + overflowOffset + facebook : : yoga : : detail : : bitWidthFn < YGOverflow > ( ) ; <nl> + <nl> + uint32_t flags = 0 ; <nl> + <nl> YGFloatOptional flex_ = { } ; <nl> YGFloatOptional flexGrow_ = { } ; <nl> YGFloatOptional flexShrink_ = { } ; <nl> class YOGA_EXPORT YGStyle { <nl> / / for library users needing a type <nl> using ValueRepr = std : : remove_reference < decltype ( margin_ [ 0 ] ) > : : type ; <nl> <nl> - YGDirection direction ( ) const { return flags_ . at < directionIdx > ( ) ; } <nl> - Flags : : Ref < directionIdx > direction ( ) { return flags_ . at < directionIdx > ( ) ; } <nl> + YGDirection direction ( ) const { <nl> + return facebook : : yoga : : detail : : getEnumData < YGDirection > ( <nl> + flags , directionOffset ) ; <nl> + } <nl> + BitfieldRef < YGDirection > direction ( ) { return { * this , directionOffset } ; } <nl> <nl> YGFlexDirection flexDirection ( ) const { <nl> - return flags_ . at < flexDirectionIdx > ( ) ; <nl> + return facebook : : yoga : : detail : : getEnumData < YGFlexDirection > ( <nl> + flags , flexdirectionOffset ) ; <nl> } <nl> - Flags : : Ref < flexDirectionIdx > flexDirection ( ) { <nl> - return flags_ . at < flexDirectionIdx > ( ) ; <nl> + BitfieldRef < YGFlexDirection > flexDirection ( ) { <nl> + return { * this , flexdirectionOffset } ; <nl> } <nl> <nl> - YGJustify justifyContent ( ) const { return flags_ . at < justifyContentIdx > ( ) ; } <nl> - Flags : : Ref < justifyContentIdx > justifyContent ( ) { <nl> - return flags_ . at < justifyContentIdx > ( ) ; <nl> + YGJustify justifyContent ( ) const { <nl> + return facebook : : yoga : : detail : : getEnumData < YGJustify > ( <nl> + flags , justifyContentOffset ) ; <nl> + } <nl> + BitfieldRef < YGJustify > justifyContent ( ) { <nl> + return { * this , justifyContentOffset } ; <nl> } <nl> <nl> - YGAlign alignContent ( ) const { return flags_ . at < alignContentIdx > ( ) ; } <nl> - Flags : : Ref < alignContentIdx > alignContent ( ) { <nl> - return flags_ . at < alignContentIdx > ( ) ; <nl> + YGAlign alignContent ( ) const { <nl> + return facebook : : yoga : : detail : : getEnumData < YGAlign > ( <nl> + flags , alignContentOffset ) ; <nl> } <nl> + BitfieldRef < YGAlign > alignContent ( ) { return { * this , alignContentOffset } ; } <nl> <nl> - YGAlign alignItems ( ) const { return flags_ . at < alignItemsIdx > ( ) ; } <nl> - Flags : : Ref < alignItemsIdx > alignItems ( ) { return flags_ . at < alignItemsIdx > ( ) ; } <nl> + YGAlign alignItems ( ) const { <nl> + return facebook : : yoga : : detail : : getEnumData < YGAlign > ( <nl> + flags , alignItemsOffset ) ; <nl> + } <nl> + BitfieldRef < YGAlign > alignItems ( ) { return { * this , alignItemsOffset } ; } <nl> <nl> - YGAlign alignSelf ( ) const { return flags_ . at < alignSelfIdx > ( ) ; } <nl> - Flags : : Ref < alignSelfIdx > alignSelf ( ) { return flags_ . at < alignSelfIdx > ( ) ; } <nl> + YGAlign alignSelf ( ) const { <nl> + return facebook : : yoga : : detail : : getEnumData < YGAlign > ( flags , alignSelfOffset ) ; <nl> + } <nl> + BitfieldRef < YGAlign > alignSelf ( ) { return { * this , alignSelfOffset } ; } <nl> <nl> - YGPositionType positionType ( ) const { return flags_ . at < positionTypeIdx > ( ) ; } <nl> - Flags : : Ref < positionTypeIdx > positionType ( ) { <nl> - return flags_ . at < positionTypeIdx > ( ) ; <nl> + YGPositionType positionType ( ) const { <nl> + return facebook : : yoga : : detail : : getEnumData < YGPositionType > ( <nl> + flags , positionTypeOffset ) ; <nl> + } <nl> + BitfieldRef < YGPositionType > positionType ( ) { <nl> + return { * this , positionTypeOffset } ; <nl> } <nl> <nl> - YGWrap flexWrap ( ) const { return flags_ . at < flexWrapIdx > ( ) ; } <nl> - Flags : : Ref < flexWrapIdx > flexWrap ( ) { return flags_ . at < flexWrapIdx > ( ) ; } <nl> + YGWrap flexWrap ( ) const { <nl> + return facebook : : yoga : : detail : : getEnumData < YGWrap > ( flags , flexWrapOffset ) ; <nl> + } <nl> + BitfieldRef < YGWrap > flexWrap ( ) { return { * this , flexWrapOffset } ; } <nl> <nl> - YGOverflow overflow ( ) const { return flags_ . at < overflowIdx > ( ) ; } <nl> - Flags : : Ref < overflowIdx > overflow ( ) { return flags_ . at < overflowIdx > ( ) ; } <nl> + YGOverflow overflow ( ) const { <nl> + return facebook : : yoga : : detail : : getEnumData < YGOverflow > ( <nl> + flags , overflowOffset ) ; <nl> + } <nl> + BitfieldRef < YGOverflow > overflow ( ) { return { * this , overflowOffset } ; } <nl> <nl> - YGDisplay display ( ) const { return flags_ . at < displayIdx > ( ) ; } <nl> - Flags : : Ref < displayIdx > display ( ) { return flags_ . at < displayIdx > ( ) ; } <nl> + YGDisplay display ( ) const { <nl> + return facebook : : yoga : : detail : : getEnumData < YGDisplay > ( flags , displayOffset ) ; <nl> + } <nl> + BitfieldRef < YGDisplay > display ( ) { return { * this , displayOffset } ; } <nl> <nl> YGFloatOptional flex ( ) const { return flex_ ; } <nl> Ref < YGFloatOptional , & YGStyle : : flex_ > flex ( ) { return { * this } ; } <nl>
Remove Bitfield from YGStyle
facebook/yoga
9d2ca758fade8bcf743624b7ecff134cfa044cf0
2019-11-22T12:51:13Z
mmm a / xbmc / cores / dvdplayer / DVDCodecs / Video / DVDVideoCodecVideoToolBox . cpp <nl> ppp b / xbmc / cores / dvdplayer / DVDCodecs / Video / DVDVideoCodecVideoToolBox . cpp <nl> enum { <nl> enum { <nl> / / tells the decoder not to bother returning a CVPixelBuffer <nl> / / in the outputCallback . The output callback will still be called . <nl> - kVTDecoderDecodeFlags_DontEmitFrame = 1 < < 0 , <nl> - kVTDecoderDecodeFlags_DontEmitFrameIOS8 = 1 < < 1 <nl> + kVTDecoderDecodeFlags_DontEmitFrame = 1 < < 1 , <nl> } ; <nl> enum { <nl> / / decode and return buffers for all frames currently in flight . <nl> int CDVDVideoCodecVideoToolBox : : Decode ( uint8_t * pData , int iSize , double dts , do <nl> <nl> if ( m_DropPictures ) <nl> { <nl> - if ( CDarwinUtils : : GetIOSVersion ( ) > = 8 . 0 ) <nl> - decoderFlags = kVTDecoderDecodeFlags_DontEmitFrameIOS8 ; <nl> - else <nl> - decoderFlags = kVTDecoderDecodeFlags_DontEmitFrame ; <nl> + decoderFlags = kVTDecoderDecodeFlags_DontEmitFrame ; <nl> } <nl> <nl> / / submit for decoding <nl>
Merge pull request from Memphiz / vtbdropfix
xbmc/xbmc
050ba058088d71ae9f0666af7c7003f07dc7dd27
2014-11-13T10:45:33Z
mmm a / rabit - learn / io / io - inl . h <nl> ppp b / rabit - learn / io / io - inl . h <nl> <nl> <nl> # include " . / io . h " <nl> <nl> - # if RABIT_USE_WORMHOLE = = 0 <nl> + # if RABIT_USE_DMLC = = 0 <nl> # if RABIT_USE_HDFS <nl> # include " . / hdfs - inl . h " <nl> # endif <nl> namespace io { <nl> inline InputSplit * CreateInputSplit ( const char * uri , <nl> unsigned part , <nl> unsigned nsplit ) { <nl> - # if RABIT_USE_WORMHOLE <nl> + # if RABIT_USE_DMLC <nl> return dmlc : : InputSplit : : Create ( uri , part , nsplit ) ; <nl> # else <nl> using namespace std ; <nl> class StreamAdapter : public Stream { <nl> * \ param mode can be ' w ' or ' r ' for read or write <nl> * / <nl> inline Stream * CreateStream ( const char * uri , const char * mode ) { <nl> - # if RABIT_USE_WORMHOLE <nl> + # if RABIT_USE_DMLC <nl> return new StreamAdapter < dmlc : : Stream > ( dmlc : : Stream : : Create ( uri , mode ) ) ; <nl> # else <nl> using namespace std ; <nl> mmm a / rabit - learn / io / io . h <nl> ppp b / rabit - learn / io / io . h <nl> <nl> # define RABIT_USE_HDFS 0 <nl> # endif <nl> <nl> - # ifndef RABIT_USE_WORMHOLE <nl> - # define RABIT_USE_WORMHOLE 0 <nl> + # ifndef RABIT_USE_DMLC <nl> + # define RABIT_USE_DMLC 0 <nl> # endif <nl> <nl> - # if RABIT_USE_WORMHOLE <nl> + # if RABIT_USE_DMLC <nl> # include < dmlc / io . h > <nl> # endif <nl> / * ! \ brief io interface * / <nl> namespace rabit { <nl> * / <nl> namespace io { <nl> / * ! \ brief reused SeekStream ' s definition * / <nl> - # if RABIT_USE_WORMHOLE <nl> + # if RABIT_USE_DMLC <nl> typedef dmlc : : SeekStream SeekStream ; <nl> typedef dmlc : : InputSplit InputSplit ; <nl> # else <nl>
ch
dmlc/xgboost
ef13aaf37926c30ca0b18650570b029d1d475805
2015-04-11T05:29:07Z
mmm a / R - package / NAMESPACE <nl> ppp b / R - package / NAMESPACE <nl> importClassesFrom ( Matrix , dgCMatrix ) <nl> importClassesFrom ( Matrix , dgeMatrix ) <nl> importFrom ( Ckmeans . 1d . dp , Ckmeans . 1d . dp ) <nl> importFrom ( DiagrammeR , mermaid ) <nl> + importFrom ( Matrix , cBind ) <nl> + importFrom ( Matrix , colSums ) <nl> importFrom ( data . table , " : = " ) <nl> importFrom ( data . table , as . data . table ) <nl> importFrom ( data . table , copy ) <nl> mmm a / R - package / R / xgb . importance . R <nl> ppp b / R - package / R / xgb . importance . R <nl> <nl> # ' @ importFrom data . table setnames <nl> # ' @ importFrom data . table : = <nl> # ' @ importFrom magrittr % > % <nl> + # ' @ importFrom Matrix colSums <nl> + # ' @ importFrom Matrix cBind <nl> # ' <nl> # ' @ param feature_names names of each feature as a character vector . Can be extracted from a sparse matrix ( see example ) . If model dump already contains feature names , this argument should be \ code { NULL } . <nl> # ' <nl> <nl> # ' <nl> # ' @ param label the label vetor used for the training step . Will be used with \ code { data } parameter for co - occurence computation . More information in \ code { Detail } part . This parameter is optional . <nl> # ' <nl> - # ' @ param target a function which returns \ code { TRUE } or \ code { 1 } when an observation should be count as a co - occurence and \ code { FALSE } or \ code { 0 } otherwise . Default function is provided for computing co - occurence between a one - hot encoded categorical feature and a binary classification label . The \ code { target } function should have only one parameter ( will be used to provide each feature vector listed as importance feature ) . More information in \ code { Detail } part . This parameter is optional . <nl> + # ' @ param target a function which returns \ code { TRUE } or \ code { 1 } when an observation should be count as a co - occurence and \ code { FALSE } or \ code { 0 } otherwise . Default function is provided for computing co - occurences in a binary classification . The \ code { target } function should have only one parameter . This parameter will be used to provide each important feature vector after having applied the split condition , therefore these vector will be only made of 0 and 1 only , whatever was the information before . More information in \ code { Detail } part . This parameter is optional . <nl> # ' <nl> # ' @ return A \ code { data . table } of the features used in the model with their average gain ( and their weight for boosted tree model ) in the model . <nl> # ' <nl> <nl> # ' } <nl> # ' <nl> # ' Co - occurence count <nl> + # ' mmmmmmmmmmmmmmmmmm <nl> # ' <nl> - # ' The gain gives you indication about the information of how a feature is important in making a branch of a decision tree more pure . But , by itself , you can ' t know if this feature has to be present or not to get a specific classification . In the example code , you may wonder if odor = none should be \ code { TRUE } to not eat a mushroom . <nl> + # ' The gain gives you indication about the information of how a feature is important in making a branch of a decision tree more pure . However , with this information only , you can ' t know if this feature has to be present or not to get a specific classification . In the example code , you may wonder if odor = none should be \ code { TRUE } to not eat a mushroom . <nl> # ' <nl> - # ' Co - occurence computation is here to help in understanding this relation . It will counts how many observations have target function true . In our example , there are 92 times only over the 3140 observations of the train dataset where a mushroom have no odor and can be eaten safely . <nl> + # ' Co - occurence computation is here to help in understanding this relation between a predictor and a specific class . It will count how many observations are returned as \ code { TRUE } by the \ code { target } function ( see parameters ) . When you execute the example below , there are 92 times only over the 3140 observations of the train dataset where a mushroom have no odor and can be eaten safely . <nl> # ' <nl> - # ' If you need to remember one thing of all of this : until you want to leave us early , don ' t eat a mushroom which has no odor : - ) <nl> + # ' If you need to remember one thing only : until you want to leave us early , don ' t eat a mushroom which has no odor : - ) <nl> # ' <nl> # ' @ examples <nl> # ' data ( agaricus . train , package = ' xgboost ' ) <nl> xgb . importance < - function ( feature_names = NULL , filename_dump = NULL , model = N <nl> result < - readLines ( filename_dump ) % > % linearDump ( feature_names , . ) <nl> if ( ! is . null ( data ) | ! is . null ( label ) ) warning ( " data / label : these parameters should only be provided with decision tree based models . " ) <nl> } else { <nl> - result < - treeDump ( feature_names , text = text ) <nl> + result < - treeDump ( feature_names , text = text , keepDetail = ! is . null ( data ) ) <nl> <nl> # Co - occurence computation <nl> if ( ! is . null ( data ) & ! is . null ( label ) & nrow ( result ) > 0 ) { <nl> - apply ( data [ , result [ , Feature ] , drop = FALSE ] , 2 , . % > % target % > % sum ) - > vec <nl> - <nl> - result < - result [ Feature = = names ( vec ) , " RealCover " : = as . numeric ( vec ) , with = F ] [ , " RealCover % " : = RealCover / sum ( label ) ] <nl> + # Take care of missing column <nl> + a < - data [ , result [ MissingNo = = T , Feature ] , drop = FALSE ] ! = 0 <nl> + # Bind the two Matrix and reorder columns <nl> + c < - data [ , result [ MissingNo = = F , Feature ] , drop = FALSE ] % > % cBind ( a , . ) % > % . [ , result [ , Feature ] ] <nl> + rm ( a ) <nl> + # Apply split <nl> + d < - data [ , result [ , Feature ] , drop = FALSE ] < as . numeric ( result [ , Split ] ) <nl> + apply ( c & d , 2 , . % > % target % > % sum ) - > vec <nl> + <nl> + result < - result [ , " RealCover " : = as . numeric ( vec ) , with = F ] [ , " RealCover % " : = RealCover / sum ( label ) ] [ , MissingNo : = NULL ] <nl> } <nl> } <nl> result <nl> } <nl> <nl> - treeDump < - function ( feature_names , text ) { <nl> - result < - xgb . model . dt . tree ( feature_names = feature_names , text = text ) [ Feature ! = " Leaf " , . ( Gain = sum ( Quality ) , Cover = sum ( Cover ) , Frequence = . N ) , by = Feature ] [ , ` : = ` ( Gain = Gain / sum ( Gain ) , Cover = Cover / sum ( Cover ) , Frequence = Frequence / sum ( Frequence ) ) ] [ order ( Gain , decreasing = T ) ] <nl> + treeDump < - function ( feature_names , text , keepDetail ) { <nl> + if ( keepDetail ) groupBy < - c ( " Feature " , " Split " , " MissingNo " ) else groupBy < - " Feature " <nl> + <nl> + result < - xgb . model . dt . tree ( feature_names = feature_names , text = text ) [ , " MissingNo " : = Missing = = No ] [ Feature ! = " Leaf " , . ( Gain = sum ( Quality ) , Cover = sum ( Cover ) , Frequence = . N ) , by = groupBy , with = T ] [ , ` : = ` ( Gain = Gain / sum ( Gain ) , Cover = Cover / sum ( Cover ) , Frequence = Frequence / sum ( Frequence ) ) ] [ order ( Gain , decreasing = T ) ] <nl> <nl> result <nl> } <nl> linearDump < - function ( feature_names , text ) { <nl> # Avoid error messages during CRAN check . <nl> # The reason is that these variables are never declared <nl> # They are mainly column names inferred by Data . table . . . <nl> - globalVariables ( " . " ) <nl> + globalVariables ( c ( " . " , " Feature " , " Split " , " No " , " Missing " ) ) <nl> mmm a / R - package / R / xgb . plot . importance . R <nl> ppp b / R - package / R / xgb . plot . importance . R <nl> xgb . plot . importance < - function ( importance_matrix = NULL , numberOfClusters = c ( 1 <nl> stop ( " importance_matrix : Should be a data . table . " ) <nl> } <nl> <nl> + # To avoid issues in clustering when co - occurences are used <nl> + importance_matrix < - importance_matrix [ , . ( Gain = sum ( Gain ) ) , by = Feature ] <nl> + <nl> clusters < - suppressWarnings ( Ckmeans . 1d . dp ( importance_matrix [ , Gain ] , numberOfClusters ) ) <nl> importance_matrix [ , " Cluster " : = clusters $ cluster % > % as . character ] <nl> <nl> xgb . plot . importance < - function ( importance_matrix = NULL , numberOfClusters = c ( 1 <nl> # Avoid error messages during CRAN check . <nl> # The reason is that these variables are never declared <nl> # They are mainly column names inferred by Data . table . . . <nl> - globalVariables ( c ( " Feature " , " Gain " , " Cluster " ) ) <nl> \ No newline at end of file <nl> + globalVariables ( c ( " Feature " , " Gain " , " Cluster " ) ) <nl> \ No newline at end of file <nl> mmm a / R - package / man / xgb . importance . Rd <nl> ppp b / R - package / man / xgb . importance . Rd <nl> xgb . importance ( feature_names = NULL , filename_dump = NULL , model = NULL , <nl> <nl> \ item { label } { the label vetor used for the training step . Will be used with \ code { data } parameter for co - occurence computation . More information in \ code { Detail } part . This parameter is optional . } <nl> <nl> - \ item { target } { a function which returns \ code { TRUE } or \ code { 1 } when an observation should be count as a co - occurence and \ code { FALSE } or \ code { 0 } otherwise . Default function is provided for computing co - occurence between a one - hot encoded categorical feature and a binary classification label . The \ code { target } function should have only one parameter ( will be used to provide each feature vector listed as importance feature ) . More information in \ code { Detail } part . This parameter is optional . } <nl> + \ item { target } { a function which returns \ code { TRUE } or \ code { 1 } when an observation should be count as a co - occurence and \ code { FALSE } or \ code { 0 } otherwise . Default function is provided for computing co - occurences in a binary classification . The \ code { target } function should have only one parameter . This parameter will be used to provide each important feature vector after having applied the split condition , therefore these vector will be only made of 0 and 1 only , whatever was the information before . More information in \ code { Detail } part . This parameter is optional . } <nl> } <nl> \ value { <nl> A \ code { data . table } of the features used in the model with their average gain ( and their weight for boosted tree model ) in the model . <nl> There are 3 columns : <nl> } <nl> <nl> Co - occurence count <nl> + mmmmmmmmmmmmmmmmmm <nl> <nl> - The gain gives you indication about the information of how a feature is important in making a branch of a decision tree more pure . But , by itself , you can ' t know if this feature has to be present or not to get a specific classification . In the example code , you may wonder if odor = none should be \ code { TRUE } to not eat a mushroom . <nl> + The gain gives you indication about the information of how a feature is important in making a branch of a decision tree more pure . However , with this information only , you can ' t know if this feature has to be present or not to get a specific classification . In the example code , you may wonder if odor = none should be \ code { TRUE } to not eat a mushroom . <nl> <nl> - Co - occurence computation is here to help in understanding this relation . It will counts how many observations have target function true . In our example , there are 92 times only over the 3140 observations of the train dataset where a mushroom have no odor and can be eaten safely . <nl> + Co - occurence computation is here to help in understanding this relation between a predictor and a specific class . It will count how many observations are returned as \ code { TRUE } by the \ code { target } function ( see parameters ) . When you execute the example below , there are 92 times only over the 3140 observations of the train dataset where a mushroom have no odor and can be eaten safely . <nl> <nl> - If you need to remember one thing of all of this : until you want to leave us early , don ' t eat a mushroom which has no odor : - ) <nl> + If you need to remember one thing only : until you want to leave us early , don ' t eat a mushroom which has no odor : - ) <nl> } <nl> \ examples { <nl> data ( agaricus . train , package = ' xgboost ' ) <nl> mmm a / R - package / vignettes / discoverYourData . Rmd <nl> ppp b / R - package / vignettes / discoverYourData . Rmd <nl> Sometimes the dataset we have to work on have * categorical * data . <nl> A * categorical * variable is one which have a fixed number of different values . By exemple , if for each observation a variable called * Colour * can have only * red * , * blue * or * green * as value , it is a * categorical * variable . <nl> <nl> > In * R * , * categorical * variable is called ` factor ` . <nl> + > <nl> > Type ` ? factor ` in console for more information . <nl> <nl> In this demo we will see how to transform a dense dataframe ( dense = few zero in the matrix ) with * categorical * variables to a very sparse matrix ( sparse = lots of zero in the matrix ) of ` numeric ` features before analyzing these data in * * Xgboost * * . <nl> str ( df ) <nl> ` ` ` <nl> <nl> > 2 columns have ` factor ` type , one has ` ordinal ` type . <nl> - > ` ordinal ` variable is a categorical variable with values wich can be ordered <nl> - > Here : ` None ` > ` Some ` > ` Marked ` . <nl> + > <nl> + > ` ordinal ` variable can take a limited number of values and these values can be ordered . <nl> + > <nl> + > ` Marked > Some > None ` <nl> <nl> Let ' s add some new * categorical * features to see if it helps . <nl> <nl> df [ , AgeDiscret : = as . factor ( round ( Age / 10 , 0 ) ) ] [ 1 : 10 ] <nl> ` ` ` <nl> <nl> > For the first feature we create groups of age by rounding the real age . <nl> - > Note that we transform it to ` factor ` so the algorithm treat these age groups as independant values . <nl> + > Note that we transform it to ` factor ` so the algorithm treat these age groups as independent values . <nl> > Therefore , 20 is not closer to 30 than 60 . To make it short , the distance between ages is lost in this transformation . <nl> <nl> Following is an even stronger simplification of the real age with an arbitrary split at 30 years old . I choose this value * * based on nothing * * . We will see later if simplifying the information based on arbitrary values is a good strategy ( I am sure you already have an idea of how well it will work ! ) . <nl> print ( importance ) <nl> ` ` ` <nl> <nl> > The column ` Gain ` provide the information we are looking for . <nl> + > <nl> > As you can see , features are classified by ` Gain ` . <nl> <nl> ` Gain ` is the improvement in accuracy brought by a feature to the branches it is on . The idea is that before adding a new split on a feature X to the branch there was some wrongly classified elements , after adding the split on this feature , there are two new branches , and each of these branch is more accurate ( one branch saying if your observation is on this branch then it should be classified as 1 , and the other branch saying the exact opposite , both new branches being more accurate than the one before the split ) . <nl> print ( importance ) <nl> <nl> ` Frequence ` is a simpler way to measure the ` Gain ` . It just counts the number of times a feature is used in all generated trees . You should not use it ( unless you know why you want to use it ) . <nl> <nl> + We can go deeper in the analysis . In the table above , we have discovered which features counts to predict if the illness will go or not . But we don ' t yet know the role of these features . For instance , one of the question we will try to answer will be : does receiving a placebo helps to recover from the illness ? <nl> + <nl> + One simple solution is to count the co - occurrences of a feature and a class of the classification . <nl> + <nl> + For that purpose we will execute the same function as above but using two more parameters , ` data ` and ` label ` . <nl> + <nl> + ` ` ` { r } <nl> + importance < - xgb . importance ( sparse_matrix @ Dimnames [ [ 2 ] ] , model = bst , data = sparse_matrix , label = output_vector ) <nl> + <nl> + # Cleaning for better display <nl> + importance < - importance [ , ` : = ` ( Cover = NULL , Frequence = NULL ) ] [ 1 : 10 , ] <nl> + <nl> + print ( importance ) <nl> + ` ` ` <nl> + <nl> + > In the table above we have removed two not needed columns and select only the first 10 lines . <nl> + <nl> + First thing you notice is the new column ` Split ` . It is the split applied to the feature on a branch of one of the tree . Each split is present , therefore a feature can appear several times in this table . Here we can see the feature ` Age ` is used several times with different splits . <nl> + <nl> + How the split is applied to count the co - occurrences ? It is always ` < ` . For instance , in the second line , we measure the number of persons under 61 years with the illness gone after the treatment . <nl> + <nl> + The two other new columns are ` RealCover ` and ` RealCover % ` . In the first column it measures the number of observations in the dataset where the split is respected and the label marked as ` 1 ` . The second column is the percentage of the whole population that ` RealCover ` represents . <nl> + <nl> + Therefore , according to our findings , getting a placebo doesn ' t seem to help but being younger than 61 years may help ( seems logic ) . <nl> + <nl> + > You may wonder how to interpret the ` < 1 . 00001 ` on the first line . Basically , in a sparse ` Matrix ` , there is no ` 0 ` , therefore , looking for one hot - encoded categorical observations validating the rule ` < 1 . 00001 ` is like just looking for ` 1 ` for this feature . <nl> + <nl> Plotting the feature importance <nl> mmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - <nl> <nl> In * data science * expression , there is the word * science * : - ) <nl> Conclusion <nl> = = = = = = = = = = <nl> <nl> - As you can see , in general * destroying information by simplying it won ' t improve your model * . * * Chi2 * * just demonstrates that . <nl> + As you can see , in general * destroying information by simplifying it won ' t improve your model * . * * Chi2 * * just demonstrates that . <nl> <nl> But in more complex cases , creating a new feature based on existing one which makes link with the outcome more obvious may help the algorithm and improve the model . <nl> <nl> Linear model may not be that strong in these scenario . <nl> Special Note : What about Random forest ? <nl> = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> <nl> - As you may know , [ Random Forest ] ( http : / / en . wikipedia . org / wiki / Random_forest ) algorithm is cousin with boosting and both are part of the [ ensemble leanrning ] ( http : / / en . wikipedia . org / wiki / Ensemble_learning ) family . <nl> + As you may know , [ Random Forest ] ( http : / / en . wikipedia . org / wiki / Random_forest ) algorithm is cousin with boosting and both are part of the [ ensemble learning ] ( http : / / en . wikipedia . org / wiki / Ensemble_learning ) family . <nl> <nl> - Both trains several decision trees for one dataset . The * main * difference is that in Random Forest , trees are independant and in boosting tree N + 1 focus its learning on the loss ( = what has no been well modeled by tree N ) . <nl> + Both trains several decision trees for one dataset . The * main * difference is that in Random Forest , trees are independent and in boosting tree N + 1 focus its learning on the loss ( = what has no been well modeled by tree N ) . <nl> <nl> This difference have an impact on feature importance analysis : the * correlated features * . <nl> <nl> Imagine two features perfectly correlated , feature ` A ` and feature ` B ` . For one specific tree , if the algorithm needs one of them , it will choose randomly ( true in both boosting and random forest ) . <nl> <nl> - However , in Random Forest this random choice will be done for each tree , because each tree is independant from the others . Therefore , approximatively , depending of your parameters , 50 % of the trees will choose feature ` A ` and the other 50 % will choose feature ` B ` . So the * * importance * * of the information contained in ` A ` and ` B ` ( which is the same , because they are perfectly correlated ) is diluted in ` A ` and ` B ` . So you won ' t easily know this information is important to predict what you want to predict ! It is even worse when you have 10 correlated features . . . <nl> + However , in Random Forest this random choice will be done for each tree , because each tree is independent from the others . Therefore , approximatively , depending of your parameters , 50 % of the trees will choose feature ` A ` and the other 50 % will choose feature ` B ` . So the * * importance * * of the information contained in ` A ` and ` B ` ( which is the same , because they are perfectly correlated ) is diluted in ` A ` and ` B ` . So you won ' t easily know this information is important to predict what you want to predict ! It is even worse when you have 10 correlated features . . . <nl> <nl> In boosting , when a specific link between feature and outcome have been learned by the algorithm , it will try to not refocus on it ( in theory it is what happens , reality is never that simple ) . Therefore , all the importance will be on ` A ` or on ` B ` . You will know that one feature have an important role in the link between your dataset and the outcome . It is still up to you to search for the correlated features to the one detected as important if you need all of them . <nl> mmm a / R - package / vignettes / vignette . css <nl> ppp b / R - package / vignettes / vignette . css <nl> pre { <nl> } <nl> <nl> code { <nl> - font - family : Consolas , Monaco , Andale Mono , monospace ; <nl> + font - family : Consolas , Monaco , Andale Mono , monospace , courrier new ; <nl> line - height : 1 . 5 ; <nl> font - size : 15px ; <nl> - background : # CDCDCD ; <nl> + background : # F8F8F8 ; <nl> border - radius : 4px ; <nl> padding : 5px ; <nl> display : inline - block ; <nl> code { <nl> white - space : pre - wrap ; <nl> } <nl> <nl> + <nl> + p code { <nl> + background : # CDCDCD ; <nl> + color : # 606AAA ; <nl> + } <nl> + <nl> code . r , code . cpp { <nl> display : block ; <nl> word - wrap : break - word ; <nl> - background : # F8F8F8 ; <nl> border : 1px solid # 606AAA ; <nl> } <nl> <nl> blockquote { <nl> max - width : 500px ; <nl> } <nl> <nl> - blockquote cite { <nl> + blockquote cite { <nl> font - size : 14px ; <nl> line - height : 10px ; <nl> color : # bfbfbf ; <nl>
Merge pull request from pommedeterresautee / master
dmlc/xgboost
dce522d7a10e4629847dedb94b4e7d25806a17f8
2015-02-19T00:55:40Z
mmm a / bazel / grpc_build_system . bzl <nl> ppp b / bazel / grpc_build_system . bzl <nl> def _get_external_deps ( external_deps ) : <nl> ret = [ ] <nl> for dep in external_deps : <nl> if dep = = " nanopb " : <nl> - ret + = [ " / / third_party / nanopb " ] <nl> + ret + = [ " grpc_nanopb " ] <nl> elif dep = = " cares " : <nl> ret + = select ( { " / / : grpc_no_ares " : [ ] , <nl> " / / conditions : default " : [ " / / external : cares " ] , } ) <nl> def _maybe_update_cc_library_hdrs ( hdrs ) : <nl> ret . append ( h ) <nl> return ret <nl> <nl> - def _maybe_update_cc_library_defines ( name ) : <nl> - ret = [ ] <nl> - if name = = " alts_proto " : <nl> - ret + = [ " PB_FIELD_16BIT = 1 " ] <nl> - return ret <nl> - <nl> def grpc_cc_library ( name , srcs = [ ] , public_hdrs = [ ] , hdrs = [ ] , <nl> external_deps = [ ] , deps = [ ] , standalone = False , <nl> language = " C + + " , testonly = False , visibility = None , <nl> def grpc_cc_library ( name , srcs = [ ] , public_hdrs = [ ] , hdrs = [ ] , <nl> copts = [ ] <nl> if language . upper ( ) = = " C " : <nl> copts = if_not_windows ( [ " - std = c99 " ] ) <nl> - defines = _maybe_update_cc_library_defines ( name ) <nl> native . cc_library ( <nl> name = name , <nl> srcs = srcs , <nl> - defines = defines + select ( { " / / : grpc_no_ares " : [ " GRPC_ARES = 0 " ] , <nl> + defines = select ( { " / / : grpc_no_ares " : [ " GRPC_ARES = 0 " ] , <nl> " / / conditions : default " : [ ] , } ) + <nl> select ( { " / / : remote_execution " : [ " GRPC_PORT_ISOLATED_RUNTIME = 1 " ] , <nl> " / / conditions : default " : [ ] , } ) + <nl> def grpc_cc_binary ( name , srcs = [ ] , deps = [ ] , external_deps = [ ] , args = [ ] , da <nl> ) <nl> <nl> def grpc_generate_one_off_targets ( ) : <nl> - pass <nl> + native . cc_library ( <nl> + name = " grpc_nanopb " , <nl> + hdrs = [ <nl> + " / / third_party / nanopb : pb . h " , <nl> + " / / third_party / nanopb : pb_common . h " , <nl> + " / / third_party / nanopb : pb_decode . h " , <nl> + " / / third_party / nanopb : pb_encode . h " , <nl> + ] , <nl> + srcs = [ <nl> + " / / third_party / nanopb : pb_common . c " , <nl> + " / / third_party / nanopb : pb_decode . c " , <nl> + " / / third_party / nanopb : pb_encode . c " , <nl> + ] , <nl> + defines = [ <nl> + " PB_FIELD_16BIT = 1 " , <nl> + ] , <nl> + ) <nl> <nl> def grpc_sh_test ( name , srcs , args = [ ] , data = [ ] ) : <nl> native . sh_test ( <nl>
Merge pull request from yihuazhang / bazel_nanopb
grpc/grpc
355554a45fb46a5d426675ecf95c549841f32700
2018-03-15T20:16:00Z
mmm a / src / video_core / engines / maxwell_3d . h <nl> ppp b / src / video_core / engines / maxwell_3d . h <nl> class Maxwell3D final { <nl> u32 entry ; <nl> } macros ; <nl> <nl> - INSERT_PADDING_WORDS ( 0x1B8 ) ; <nl> + INSERT_PADDING_WORDS ( 0x189 ) ; <nl> + <nl> + u32 tfb_enabled ; <nl> + <nl> + INSERT_PADDING_WORDS ( 0x2E ) ; <nl> <nl> RenderTargetConfig rt [ NumRenderTargets ] ; <nl> <nl> class Maxwell3D final { <nl> <nl> u32 depth_write_enabled ; <nl> <nl> - INSERT_PADDING_WORDS ( 0x7 ) ; <nl> + u32 alpha_test_enabled ; <nl> + <nl> + INSERT_PADDING_WORDS ( 0x6 ) ; <nl> <nl> u32 d3d_cull_mode ; <nl> <nl> class Maxwell3D final { <nl> " Field " # field_name " has invalid position " ) <nl> <nl> ASSERT_REG_POSITION ( macros , 0x45 ) ; <nl> + ASSERT_REG_POSITION ( tfb_enabled , 0x1D1 ) ; <nl> ASSERT_REG_POSITION ( rt , 0x200 ) ; <nl> ASSERT_REG_POSITION ( viewport_transform [ 0 ] , 0x280 ) ; <nl> ASSERT_REG_POSITION ( viewport , 0x300 ) ; <nl> ASSERT_REG_POSITION ( zeta_height , 0x48b ) ; <nl> ASSERT_REG_POSITION ( depth_test_enable , 0x4B3 ) ; <nl> ASSERT_REG_POSITION ( independent_blend_enable , 0x4B9 ) ; <nl> ASSERT_REG_POSITION ( depth_write_enabled , 0x4BA ) ; <nl> + ASSERT_REG_POSITION ( alpha_test_enabled , 0x4BB ) ; <nl> ASSERT_REG_POSITION ( d3d_cull_mode , 0x4C2 ) ; <nl> ASSERT_REG_POSITION ( depth_test_func , 0x4C3 ) ; <nl> ASSERT_REG_POSITION ( blend , 0x4CF ) ; <nl> mmm a / src / video_core / engines / maxwell_compute . cpp <nl> ppp b / src / video_core / engines / maxwell_compute . cpp <nl> <nl> / / Licensed under GPLv2 or any later version <nl> / / Refer to the license . txt file included . <nl> <nl> + # include " common / logging / log . h " <nl> + # include " core / core . h " <nl> # include " video_core / engines / maxwell_compute . h " <nl> <nl> namespace Tegra { <nl> namespace Engines { <nl> <nl> - void MaxwellCompute : : WriteReg ( u32 method , u32 value ) { } <nl> + void MaxwellCompute : : WriteReg ( u32 method , u32 value ) { <nl> + ASSERT_MSG ( method < Regs : : NUM_REGS , <nl> + " Invalid MaxwellCompute register , increase the size of the Regs structure " ) ; <nl> + <nl> + regs . reg_array [ method ] = value ; <nl> + <nl> + switch ( method ) { <nl> + case MAXWELL_COMPUTE_REG_INDEX ( compute ) : { <nl> + LOG_CRITICAL ( HW_GPU , " Compute shaders are not implemented " ) ; <nl> + UNREACHABLE ( ) ; <nl> + break ; <nl> + } <nl> + default : <nl> + break ; <nl> + } <nl> + } <nl> <nl> } / / namespace Engines <nl> } / / namespace Tegra <nl> mmm a / src / video_core / engines / maxwell_compute . h <nl> ppp b / src / video_core / engines / maxwell_compute . h <nl> <nl> <nl> # pragma once <nl> <nl> + # include < array > <nl> + # include " common / assert . h " <nl> + # include " common / bit_field . h " <nl> + # include " common / common_funcs . h " <nl> # include " common / common_types . h " <nl> <nl> namespace Tegra : : Engines { <nl> <nl> + # define MAXWELL_COMPUTE_REG_INDEX ( field_name ) \ <nl> + ( offsetof ( Tegra : : Engines : : MaxwellCompute : : Regs , field_name ) / sizeof ( u32 ) ) <nl> + <nl> class MaxwellCompute final { <nl> public : <nl> MaxwellCompute ( ) = default ; <nl> ~ MaxwellCompute ( ) = default ; <nl> <nl> + struct Regs { <nl> + static constexpr std : : size_t NUM_REGS = 0xCF8 ; <nl> + <nl> + union { <nl> + struct { <nl> + INSERT_PADDING_WORDS ( 0x281 ) ; <nl> + <nl> + union { <nl> + u32 compute_end ; <nl> + BitField < 0 , 1 , u32 > unknown ; <nl> + } compute ; <nl> + <nl> + INSERT_PADDING_WORDS ( 0xA76 ) ; <nl> + } ; <nl> + std : : array < u32 , NUM_REGS > reg_array ; <nl> + } ; <nl> + } regs { } ; <nl> + <nl> + static_assert ( sizeof ( Regs ) = = Regs : : NUM_REGS * sizeof ( u32 ) , <nl> + " MaxwellCompute Regs has wrong size " ) ; <nl> + <nl> / / / Write the value to the register identified by method . <nl> void WriteReg ( u32 method , u32 value ) ; <nl> } ; <nl> <nl> + # define ASSERT_REG_POSITION ( field_name , position ) \ <nl> + static_assert ( offsetof ( MaxwellCompute : : Regs , field_name ) = = position * 4 , \ <nl> + " Field " # field_name " has invalid position " ) <nl> + <nl> + ASSERT_REG_POSITION ( compute , 0x281 ) ; <nl> + <nl> + # undef ASSERT_REG_POSITION <nl> + <nl> } / / namespace Tegra : : Engines <nl> mmm a / src / video_core / renderer_opengl / gl_rasterizer . cpp <nl> ppp b / src / video_core / renderer_opengl / gl_rasterizer . cpp <nl> void RasterizerOpenGL : : DrawArrays ( ) { <nl> SyncBlendState ( ) ; <nl> SyncLogicOpState ( ) ; <nl> SyncCullMode ( ) ; <nl> + SyncAlphaTest ( ) ; <nl> + SyncTransformFeedback ( ) ; <nl> <nl> / / TODO ( bunnei ) : Sync framebuffer_scale uniform here <nl> / / TODO ( bunnei ) : Sync scissorbox uniform ( s ) here <nl> void RasterizerOpenGL : : SyncLogicOpState ( ) { <nl> state . logic_op . operation = MaxwellToGL : : LogicOp ( regs . logic_op . operation ) ; <nl> } <nl> <nl> + void RasterizerOpenGL : : SyncAlphaTest ( ) { <nl> + const auto & regs = Core : : System : : GetInstance ( ) . GPU ( ) . Maxwell3D ( ) . regs ; <nl> + <nl> + / / TODO ( Rodrigo ) : Alpha testing is a legacy OpenGL feature , but it can be <nl> + / / implemented with a test + discard in fragment shaders . <nl> + if ( regs . alpha_test_enabled ! = 0 ) { <nl> + LOG_CRITICAL ( Render_OpenGL , " Alpha testing is not implemented " ) ; <nl> + UNREACHABLE ( ) ; <nl> + } <nl> + } <nl> + <nl> + void RasterizerOpenGL : : SyncTransformFeedback ( ) { <nl> + const auto & regs = Core : : System : : GetInstance ( ) . GPU ( ) . Maxwell3D ( ) . regs ; <nl> + <nl> + if ( regs . tfb_enabled ! = 0 ) { <nl> + LOG_CRITICAL ( Render_OpenGL , " Transform feedbacks are not implemented " ) ; <nl> + UNREACHABLE ( ) ; <nl> + } <nl> + } <nl> + <nl> } / / namespace OpenGL <nl> mmm a / src / video_core / renderer_opengl / gl_rasterizer . h <nl> ppp b / src / video_core / renderer_opengl / gl_rasterizer . h <nl> class RasterizerOpenGL : public VideoCore : : RasterizerInterface { <nl> / / / Syncs the LogicOp state to match the guest state <nl> void SyncLogicOpState ( ) ; <nl> <nl> + / / / Syncs the alpha test state to match the guest state <nl> + void SyncAlphaTest ( ) ; <nl> + <nl> + / / / Syncs the transform feedback state to match the guest state <nl> + void SyncTransformFeedback ( ) ; <nl> + <nl> bool has_ARB_direct_state_access = false ; <nl> bool has_ARB_multi_bind = false ; <nl> bool has_ARB_separate_shader_objects = false ; <nl>
Merge pull request from ReinUsesLisp / asserts
yuzu-emu/yuzu
cc866d138468f648033dcd1ae4a54ed0f6e78aea
2018-09-26T20:10:55Z
mmm a / examples / mpm_fluid . py <nl> ppp b / examples / mpm_fluid . py <nl> <nl> import taichi as ti <nl> - import numpy as np <nl> import random <nl> - import cv2 <nl> <nl> real = ti . f32 <nl> dim = 2 <nl> def g2p ( ) : <nl> J [ p ] * = 1 + dt * new_C . trace ( ) <nl> C [ p ] = new_C <nl> <nl> - gui = ti . core . GUI ( " Differentiable MPM " , ti . veci ( 512 , 512 ) ) <nl> + gui = ti . core . GUI ( " MPM " , ti . veci ( 512 , 512 ) ) <nl> canvas = gui . get_canvas ( ) <nl> <nl> def main ( ) : <nl> def main ( ) : <nl> g2p ( ) <nl> <nl> <nl> + # TODO : why is visualization so slow ? <nl> for i in range ( n_particles ) : <nl> canvas . circle ( ti . vec ( x [ i ] [ 0 ] , x [ i ] [ 1 ] ) ) . radius ( 1 ) . color ( 0x068587 ) . finish ( ) <nl> gui . update ( ) <nl> new file mode 100644 <nl> index 00000000000 . . 33a4f29d43c <nl> mmm / dev / null <nl> ppp b / examples / mpm_lagrangian_forces . py <nl> <nl> + import taichi as ti <nl> + import random <nl> + <nl> + real = ti . f32 <nl> + dim = 2 <nl> + n_particle_x = 64 <nl> + n_particle_y = 8 <nl> + n_particles = 8192 * 4 <nl> + n_elements = ( n_particle_x - 1 ) * ( n_particle_y - 1 ) * 2 <nl> + n_grid = 64 <nl> + dx = 1 / n_grid <nl> + inv_dx = 1 / dx <nl> + dt = 1e - 4 <nl> + p_mass = 1 <nl> + p_vol = 1 <nl> + mu = 1 <nl> + la = 1 <nl> + <nl> + scalar = lambda : ti . var ( dt = real ) <nl> + vec = lambda : ti . Vector ( dim , dt = real ) <nl> + mat = lambda : ti . Matrix ( dim , dim , dt = real ) <nl> + <nl> + x , v = vec ( ) , vec ( ) <nl> + grid_v , grid_m = vec ( ) , scalar ( ) <nl> + C , J = mat ( ) , scalar ( ) <nl> + restT = mat ( ) <nl> + total_energy = scalar ( ) <nl> + vertices = ti . var ( ti . i32 ) <nl> + <nl> + ti . cfg . arch = ti . cuda <nl> + <nl> + @ ti . layout <nl> + def place ( ) : <nl> + ti . root . dense ( ti . k , n_particles ) . place ( x , x . grad , v , J , C ) <nl> + ti . root . dense ( ti . ij , n_grid ) . place ( grid_v , grid_m ) <nl> + ti . root . dense ( ti . i , n_elements ) . place ( restT , restT . grad ) <nl> + ti . root . dense ( ti . ij , ( n_elements , 3 ) ) . place ( vertices ) <nl> + ti . root . place ( total_energy , total_energy . grad ) <nl> + <nl> + <nl> + @ ti . kernel <nl> + def clear_grid ( ) : <nl> + for i , j in grid_m : <nl> + grid_v [ i , j ] = [ 0 , 0 ] <nl> + grid_m [ i , j ] = 0 <nl> + <nl> + @ ti . func <nl> + def compute_T ( i ) : <nl> + a = vertices [ i , 0 ] <nl> + b = vertices [ i , 1 ] <nl> + c = vertices [ i , 2 ] <nl> + ab = x [ b ] - x [ a ] <nl> + ac = x [ c ] - x [ a ] <nl> + return ti . Matrix ( [ [ ab [ 0 ] , ac [ 0 ] ] , [ ab [ 1 ] , ac [ 1 ] ] ] ) <nl> + <nl> + @ ti . kernel <nl> + def compute_rest_T ( ) : <nl> + for i in range ( n_elements ) : <nl> + restT [ i ] = compute_T ( i ) <nl> + <nl> + @ ti . kernel <nl> + def compute_total_energy ( ) : <nl> + for i in range ( n_elements ) : <nl> + currentT = compute_T ( i ) <nl> + F = restT [ i ] * currentT . inverse ( ) <nl> + # Fixed Corotated <nl> + I1 = ( F @ F . transpose ( ) ) . trace ( ) <nl> + J = F . determinant ( ) <nl> + element_energy = 0 . 5 * mu * ( I1 - 3 ) - mu * ti . log ( J ) + 0 . 5 * la * ti . log ( J ) * * 2 <nl> + ti . atomic_add ( total_energy [ None ] , element_energy ) <nl> + <nl> + <nl> + @ ti . kernel <nl> + def p2g ( ) : <nl> + for p in x : <nl> + base = ti . cast ( x [ p ] * inv_dx - 0 . 5 , ti . i32 ) <nl> + fx = x [ p ] * inv_dx - ti . cast ( base , ti . f32 ) <nl> + w = [ 0 . 5 * ti . sqr ( 1 . 5 - fx ) , 0 . 75 - ti . sqr ( fx - 1 ) , <nl> + 0 . 5 * ti . sqr ( fx - 0 . 5 ) ] <nl> + affine = p_mass * C [ p ] <nl> + for i in ti . static ( range ( 3 ) ) : <nl> + for j in ti . static ( range ( 3 ) ) : <nl> + offset = ti . Vector ( [ i , j ] ) <nl> + dpos = ( ti . cast ( ti . Vector ( [ i , j ] ) , ti . f32 ) - fx ) * dx <nl> + weight = w [ i ] ( 0 ) * w [ j ] ( 1 ) <nl> + grid_v [ base + offset ] . atomic_add ( weight * ( p_mass * v [ p ] + x . grad [ p ] + affine @ dpos ) ) <nl> + grid_m [ base + offset ] . atomic_add ( weight * p_mass ) <nl> + <nl> + <nl> + bound = 3 <nl> + <nl> + <nl> + @ ti . kernel <nl> + def grid_op ( ) : <nl> + for i , j in grid_m : <nl> + if grid_m [ i , j ] > 0 : <nl> + inv_m = 1 / grid_m [ i , j ] <nl> + grid_v [ i , j ] = inv_m * grid_v [ i , j ] <nl> + grid_v ( 1 ) [ i , j ] - = dt * 9 . 8 <nl> + if i < bound and grid_v ( 0 ) [ i , j ] < 0 : <nl> + grid_v ( 0 ) [ i , j ] = 0 <nl> + if i > n_grid - bound and grid_v ( 0 ) [ i , j ] > 0 : <nl> + grid_v ( 0 ) [ i , j ] = 0 <nl> + if j < bound and grid_v ( 1 ) [ i , j ] < 0 : <nl> + grid_v ( 1 ) [ i , j ] = 0 <nl> + if j > n_grid - bound and grid_v ( 1 ) [ i , j ] > 0 : <nl> + grid_v ( 1 ) [ i , j ] = 0 <nl> + <nl> + <nl> + @ ti . kernel <nl> + def g2p ( ) : <nl> + for p in x : <nl> + base = ti . cast ( x [ p ] * inv_dx - 0 . 5 , ti . i32 ) <nl> + fx = x [ p ] * inv_dx - ti . cast ( base , ti . f32 ) <nl> + w = [ 0 . 5 * ti . sqr ( 1 . 5 - fx ) , 0 . 75 - ti . sqr ( fx - 1 . 0 ) , <nl> + 0 . 5 * ti . sqr ( fx - 0 . 5 ) ] <nl> + new_v = ti . Vector ( [ 0 . 0 , 0 . 0 ] ) <nl> + new_C = ti . Matrix ( [ [ 0 . 0 , 0 . 0 ] , [ 0 . 0 , 0 . 0 ] ] ) <nl> + <nl> + for i in ti . static ( range ( 3 ) ) : <nl> + for j in ti . static ( range ( 3 ) ) : <nl> + dpos = ti . cast ( ti . Vector ( [ i , j ] ) , ti . f32 ) - fx <nl> + g_v = grid_v [ base ( 0 ) + i , base ( 1 ) + j ] <nl> + weight = w [ i ] ( 0 ) * w [ j ] ( 1 ) <nl> + new_v + = weight * g_v <nl> + new_C + = 4 * weight * ti . outer_product ( g_v , dpos ) * inv_dx <nl> + <nl> + v [ p ] = new_v <nl> + x [ p ] + = dt * v [ p ] <nl> + J [ p ] * = 1 + dt * new_C . trace ( ) <nl> + C [ p ] = new_C <nl> + <nl> + gui = ti . core . GUI ( " MPM " , ti . veci ( 512 , 512 ) ) <nl> + canvas = gui . get_canvas ( ) <nl> + <nl> + def main ( ) : <nl> + for i in range ( n_particle_x ) : <nl> + for j in range ( n_particle_y ) : <nl> + t = i * n_particle_y + j <nl> + x [ t ] = [ 0 . 2 + i * dx * 0 . 5 , 0 . 6 + j * dx * 0 . 5 ] <nl> + v [ t ] = [ 0 , 0 ] <nl> + J [ t ] = 1 <nl> + <nl> + for f in range ( 200 ) : <nl> + canvas . clear ( 0x112F41 ) <nl> + for s in range ( 150 ) : <nl> + clear_grid ( ) <nl> + p2g ( ) <nl> + grid_op ( ) <nl> + g2p ( ) <nl> + <nl> + <nl> + # TODO : why is visualization so slow ? <nl> + for i in range ( n_particles ) : <nl> + canvas . circle ( ti . vec ( x [ i ] [ 0 ] , x [ i ] [ 1 ] ) ) . radius ( 1 ) . color ( 0x068587 ) . finish ( ) <nl> + gui . update ( ) <nl> + ti . profiler_print ( ) <nl> + <nl> + if __name__ = = ' __main__ ' : <nl> + main ( ) <nl> mmm a / python / taichi / lang / impl . py <nl> ppp b / python / taichi / lang / impl . py <nl> def layout ( ) : <nl> taichi_lang_core . layout ( layout ) <nl> self . materialized = True <nl> for var in self . global_vars : <nl> - assert var . ptr . snode ( ) is not None , ' variable not placed . ' <nl> + assert var . ptr . snode ( ) is not None , ' Some variable ( s ) not placed ' <nl> <nl> def clear ( self ) : <nl> if self . prog : <nl>
lagrangian forces basics
taichi-dev/taichi
30f42b77aa75068828ce92b8944f2e25d25aca8a
2019-10-24T20:57:08Z
mmm a / editor / create_dialog . cpp <nl> ppp b / editor / create_dialog . cpp <nl> void CreateDialog : : add_type ( const String & p_type , HashMap < String , TreeItem * > & p <nl> item - > set_custom_color ( 0 , get_color ( " disabled_font_color " , " Editor " ) ) ; <nl> item - > set_selectable ( 0 , false ) ; <nl> } else if ( ! ( * to_select & & ( * to_select ) - > get_text ( 0 ) = = search_box - > get_text ( ) ) ) { <nl> - bool is_search_subsequence = search_box - > get_text ( ) . is_subsequence_ofi ( p_type ) ; <nl> - String to_select_type = * to_select ? ( * to_select ) - > get_text ( 0 ) : " " ; <nl> - to_select_type = to_select_type . split ( " " ) [ 0 ] ; <nl> - bool current_item_is_preferred ; <nl> - if ( cpp_type ) { <nl> - String cpp_to_select_type = to_select_type ; <nl> - if ( ScriptServer : : is_global_class ( to_select_type ) ) <nl> - cpp_to_select_type = ScriptServer : : get_global_class_native_base ( to_select_type ) ; <nl> - current_item_is_preferred = ClassDB : : is_parent_class ( p_type , preferred_search_result_type ) & & ! ClassDB : : is_parent_class ( cpp_to_select_type , preferred_search_result_type ) ; <nl> - } else { <nl> - current_item_is_preferred = ed . script_class_is_parent ( p_type , preferred_search_result_type ) & & ! ed . script_class_is_parent ( to_select_type , preferred_search_result_type ) & & search_box - > get_text ( ) ! = to_select_type ; <nl> - } <nl> - if ( search_box - > get_text ( ) = = p_type | | ( * to_select & & p_type . length ( ) < ( * to_select ) - > get_text ( 0 ) . length ( ) ) ) { <nl> - current_item_is_preferred = true ; <nl> + bool current_type_prefered = _is_type_prefered ( p_type ) ; <nl> + bool selected_type_prefered = * to_select ? _is_type_prefered ( ( * to_select ) - > get_text ( 0 ) . split ( " " ) [ 0 ] ) : false ; <nl> + <nl> + String search_term = search_box - > get_text ( ) . to_lower ( ) ; <nl> + bool is_subsequence_of_type = search_box - > get_text ( ) . is_subsequence_ofi ( p_type ) ; <nl> + bool is_substring_of_type = p_type . to_lower ( ) . find ( search_term ) > = 0 ; <nl> + bool is_substring_of_selected = false ; <nl> + bool is_subsequence_of_selected = false ; <nl> + bool is_selected_equal = false ; <nl> + <nl> + if ( * to_select ) { <nl> + String name = ( * to_select ) - > get_text ( 0 ) . split ( " " ) [ 0 ] . to_lower ( ) ; <nl> + is_substring_of_selected = name . find ( search_term ) > = 0 ; <nl> + is_subsequence_of_selected = search_term . is_subsequence_of ( name ) ; <nl> + is_selected_equal = name = = search_term ; <nl> } <nl> <nl> - if ( ( ( ! * to_select | | current_item_is_preferred ) & & is_search_subsequence ) ) { <nl> - * to_select = item ; <nl> + if ( is_subsequence_of_type & & ! is_selected_equal ) { <nl> + if ( is_substring_of_type ) { <nl> + if ( ! is_substring_of_selected | | ( is_substring_of_selected & & ( current_type_prefered & & ! selected_type_prefered ) ) ) { <nl> + * to_select = item ; <nl> + } <nl> + } else { <nl> + / / substring results weigh more than subsequences , so let ' s make sure we don ' t override them <nl> + if ( ! is_substring_of_selected ) { <nl> + if ( ! is_subsequence_of_selected | | ( is_subsequence_of_selected & & ( current_type_prefered & & ! selected_type_prefered ) ) ) { <nl> + * to_select = item ; <nl> + } <nl> + } <nl> + } <nl> } <nl> } <nl> <nl> void CreateDialog : : add_type ( const String & p_type , HashMap < String , TreeItem * > & p <nl> p_types [ p_type ] = item ; <nl> } <nl> <nl> + bool CreateDialog : : _is_type_prefered ( const String & type ) { <nl> + bool cpp_type = ClassDB : : class_exists ( type ) ; <nl> + EditorData & ed = EditorNode : : get_editor_data ( ) ; <nl> + <nl> + if ( cpp_type ) { <nl> + return ClassDB : : is_parent_class ( type , preferred_search_result_type ) ; <nl> + } <nl> + return ed . script_class_is_parent ( type , preferred_search_result_type ) ; <nl> + } <nl> + <nl> bool CreateDialog : : _is_class_disabled_by_feature_profile ( const StringName & p_class ) { <nl> <nl> Ref < EditorFeatureProfile > profile = EditorFeatureProfileManager : : get_singleton ( ) - > get_current_profile ( ) ; <nl> void CreateDialog : : select_type ( const String & p_type ) { <nl> } <nl> <nl> void CreateDialog : : _update_search ( ) { <nl> - <nl> search_options - > clear ( ) ; <nl> favorite - > set_disabled ( true ) ; <nl> <nl> mmm a / editor / create_dialog . h <nl> ppp b / editor / create_dialog . h <nl> class CreateDialog : public ConfirmationDialog { <nl> void drop_data_fw ( const Point2 & p_point , const Variant & p_data , Control * p_from ) ; <nl> <nl> bool _is_class_disabled_by_feature_profile ( const StringName & p_class ) ; <nl> + bool _is_type_prefered ( const String & type ) ; <nl> <nl> protected : <nl> void _notification ( int p_what ) ; <nl>
Merge pull request from mbrlabs / node - search - fix
godotengine/godot
e285114e0ce6534add2d74232ee61f6a4b2f1f81
2019-07-01T10:03:16Z
mmm a / hphp / hack / src / hhbc / hhbc_from_nast . ml <nl> ppp b / hphp / hack / src / hhbc / hhbc_from_nast . ml <nl> and emit_yield_break ( ) = <nl> instr_retc ; <nl> ] <nl> <nl> - and emit_string2 = function <nl> + and emit_string2 exprs = <nl> + match exprs with <nl> + | [ e ] - > <nl> + gather [ <nl> + from_expr e ; <nl> + instr ( IOp CastString ) <nl> + ] <nl> | e1 : : e2 : : es - > <nl> - gather @ @ <nl> - List . rev @ @ <nl> - List . fold_left <nl> - es <nl> - ~ init : [ instr ( IOp Concat ) ; from_expr e2 ; from_expr e1 ] <nl> - ~ f : ( fun acc e - > instr ( IOp Concat ) : : from_expr e : : acc ) <nl> - | _ - > failwith " String2 with zero or one arguments is impossible " <nl> + gather @ @ [ <nl> + emit_two_exprs e1 e2 ; <nl> + instr ( IOp Concat ) ; <nl> + gather ( List . map es ( fun e - > gather [ from_expr e ; instr ( IOp Concat ) ] ) ) <nl> + ] <nl> + <nl> + | [ ] - > failwith " String2 with zero arguments is impossible " <nl> <nl> and emit_lambda fundef ids = <nl> ( * Closure conversion puts the class number used for CreateCl in the " name " <nl>
Hack codegen : fixes for string interpolation
facebook/hhvm
58bff2d85d4bf3a82c58eeb4a0ba85a7dfcc2dd1
2017-03-23T14:08:06Z
mmm a / src / btree / append_prepend . cc <nl> ppp b / src / btree / append_prepend . cc <nl> <nl> <nl> struct btree_append_prepend_oper_t : public btree_modify_oper_t { <nl> <nl> - btree_append_prepend_oper_t ( unique_ptr_t < data_provider_t > _data , bool _append ) <nl> + btree_append_prepend_oper_t ( boost : : shared_ptr < data_provider_t > _data , bool _append ) <nl> : data ( _data ) , append ( _append ) <nl> { } <nl> <nl> struct btree_append_prepend_oper_t : public btree_modify_oper_t { <nl> <nl> append_prepend_result_t result ; <nl> <nl> - unique_ptr_t < data_provider_t > data ; <nl> + boost : : shared_ptr < data_provider_t > data ; <nl> bool append ; / / true = append , false = prepend <nl> <nl> union { <nl> struct btree_append_prepend_oper_t : public btree_modify_oper_t { <nl> boost : : scoped_ptr < large_buf_t > large_buflock ; <nl> } ; <nl> <nl> - append_prepend_result_t btree_append_prepend ( const store_key_t & key , btree_slice_t * slice , unique_ptr_t < data_provider_t > data , bool append , castime_t castime ) { <nl> + append_prepend_result_t btree_append_prepend ( const store_key_t & key , btree_slice_t * slice , boost : : shared_ptr < data_provider_t > data , bool append , castime_t castime ) { <nl> btree_append_prepend_oper_t oper ( data , append ) ; <nl> run_btree_modify_oper ( & oper , slice , key , castime ) ; <nl> return oper . result ; <nl> mmm a / src / btree / append_prepend . hpp <nl> ppp b / src / btree / append_prepend . hpp <nl> <nl> # include " btree / slice . hpp " <nl> # include " store . hpp " <nl> <nl> - append_prepend_result_t btree_append_prepend ( const store_key_t & key , btree_slice_t * slice , unique_ptr_t < data_provider_t > data , bool append , castime_t castime ) ; <nl> + append_prepend_result_t btree_append_prepend ( const store_key_t & key , btree_slice_t * slice , boost : : shared_ptr < data_provider_t > data , bool append , castime_t castime ) ; <nl> <nl> # endif / / __BTREE_APPEND_PREPEND_HPP__ <nl> mmm a / src / btree / backfill . cc <nl> ppp b / src / btree / backfill . cc <nl> struct backfill_traversal_helper_t : public btree_traversal_helper_t , public hom <nl> <nl> if ( recency . time > = since_when_ . time ) { <nl> const btree_value * value = pair - > value ( ) ; <nl> - unique_ptr_t < value_data_provider_t > data_provider ( value_data_provider_t : : create ( value , txor ) ) ; <nl> + boost : : shared_ptr < value_data_provider_t > data_provider ( value_data_provider_t : : create ( value , txor ) ) ; <nl> backfill_atom_t atom ; <nl> atom . key . assign ( pair - > key . size , pair - > key . contents ) ; <nl> atom . value = data_provider ; <nl> mmm a / src / btree / backfill . hpp <nl> ppp b / src / btree / backfill . hpp <nl> class btree_slice_t ; <nl> <nl> struct backfill_atom_t { <nl> store_key_t key ; <nl> - unique_ptr_t < data_provider_t > value ; <nl> + boost : : shared_ptr < data_provider_t > value ; <nl> mcflags_t flags ; <nl> exptime_t exptime ; <nl> repli_timestamp recency ; <nl> mmm a / src / btree / get . cc <nl> ppp b / src / btree / get . cc <nl> get_result_t btree_get ( const store_key_t & store_key , btree_slice_t * slice ) { <nl> return get_result_t ( ) ; <nl> } else { <nl> / * Construct a data - provider to hold the result * / <nl> - unique_ptr_t < value_data_provider_t > dp ( value_data_provider_t : : create ( value , transactor ) ) ; <nl> + boost : : shared_ptr < value_data_provider_t > dp ( value_data_provider_t : : create ( value , transactor ) ) ; <nl> <nl> / / Data provider created above copies the small value ( and doesn ' t <nl> / / need the buf for the large value ) , so we can release the buf <nl> mmm a / src / btree / get_cas . cc <nl> ppp b / src / btree / get_cas . cc <nl> <nl> <nl> struct death_signalling_data_provider_t : public data_provider_t { <nl> <nl> - death_signalling_data_provider_t ( unique_ptr_t < data_provider_t > dp , cond_t * c ) : <nl> + death_signalling_data_provider_t ( boost : : shared_ptr < data_provider_t > dp , cond_t * c ) : <nl> dp ( dp ) , pulse_on_death ( c ) { } <nl> ~ death_signalling_data_provider_t ( ) { <nl> pulse_on_death - > pulse ( ) ; <nl> struct death_signalling_data_provider_t : public data_provider_t { <nl> } <nl> <nl> private : <nl> - unique_ptr_t < data_provider_t > dp ; <nl> + boost : : shared_ptr < data_provider_t > dp ; <nl> cond_t * pulse_on_death ; <nl> } ; <nl> <nl> struct btree_get_cas_oper_t : public btree_modify_oper_t , public home_thread_mix <nl> <nl> / / Need to block on the caller so we don ' t free the large value before it ' s done <nl> / / Deliver the value to the client via the promise_t we got <nl> - unique_ptr_t < value_data_provider_t > dp ( value_data_provider_t : : create ( & value , txor ) ) ; <nl> + boost : : shared_ptr < value_data_provider_t > dp ( value_data_provider_t : : create ( & value , txor ) ) ; <nl> if ( value . is_large ( ) ) { <nl> / / When dp2 is destroyed , it will signal to_signal_when_done . <nl> cond_t to_signal_when_done ; <nl> - unique_ptr_t < death_signalling_data_provider_t > dp2 ( <nl> + boost : : shared_ptr < death_signalling_data_provider_t > dp2 ( <nl> new death_signalling_data_provider_t ( dp , & to_signal_when_done ) ) ; <nl> res - > pulse ( get_result_t ( dp2 , value . mcflags ( ) , cas_to_report ) ) ; <nl> to_signal_when_done . wait ( ) ; <nl> mmm a / src / btree / rget . cc <nl> ppp b / src / btree / rget . cc <nl> rget_result_t btree_rget_slice ( btree_slice_t * slice , rget_bound_mode_t left_mode <nl> thread_saver_t saver ; <nl> boost : : shared_ptr < transactor_t > transactor = boost : : shared_ptr < transactor_t > ( new transactor_t ( saver , slice - > cache ( ) , rwi_read , repli_timestamp : : invalid ) ) ; <nl> transactor - > get ( ) - > snapshot ( ) ; <nl> - return unique_ptr_t < one_way_iterator_t < key_with_data_provider_t > > ( <nl> + return boost : : shared_ptr < one_way_iterator_t < key_with_data_provider_t > > ( <nl> new slice_keys_iterator_t ( transactor , slice , left_mode , left_key , right_mode , right_key ) ) ; <nl> } <nl> mmm a / src / btree / set . cc <nl> ppp b / src / btree / set . cc <nl> <nl> # include " buffer_cache / co_functions . hpp " <nl> <nl> struct btree_set_oper_t : public btree_modify_oper_t { <nl> - explicit btree_set_oper_t ( unique_ptr_t < data_provider_t > _data , mcflags_t _mcflags , exptime_t _exptime , <nl> + explicit btree_set_oper_t ( boost : : shared_ptr < data_provider_t > _data , mcflags_t _mcflags , exptime_t _exptime , <nl> add_policy_t ap , replace_policy_t rp , cas_t _req_cas ) <nl> : btree_modify_oper_t ( ) , data ( _data ) , mcflags ( _mcflags ) , exptime ( _exptime ) , <nl> add_policy ( ap ) , replace_policy ( rp ) , req_cas ( _req_cas ) <nl> struct btree_set_oper_t : public btree_modify_oper_t { <nl> <nl> ticks_t start_time ; <nl> <nl> - unique_ptr_t < data_provider_t > data ; <nl> + boost : : shared_ptr < data_provider_t > data ; <nl> mcflags_t mcflags ; <nl> exptime_t exptime ; <nl> add_policy_t add_policy ; <nl> struct btree_set_oper_t : public btree_modify_oper_t { <nl> } ; <nl> <nl> set_result_t btree_set ( const store_key_t & key , btree_slice_t * slice , <nl> - unique_ptr_t < data_provider_t > data , mcflags_t mcflags , exptime_t exptime , <nl> + boost : : shared_ptr < data_provider_t > data , mcflags_t mcflags , exptime_t exptime , <nl> add_policy_t add_policy , replace_policy_t replace_policy , cas_t req_cas , <nl> castime_t castime ) { <nl> btree_set_oper_t oper ( data , mcflags , exptime , add_policy , replace_policy , req_cas ) ; <nl> mmm a / src / btree / set . hpp <nl> ppp b / src / btree / set . hpp <nl> <nl> # include " btree / slice . hpp " <nl> <nl> set_result_t btree_set ( const store_key_t & key , btree_slice_t * slice , <nl> - unique_ptr_t < data_provider_t > data , mcflags_t mcflags , exptime_t exptime , <nl> + boost : : shared_ptr < data_provider_t > data , mcflags_t mcflags , exptime_t exptime , <nl> add_policy_t add_policy , replace_policy_t replace_policy , cas_t req_cas , <nl> castime_t castime ) ; <nl> <nl> mmm a / src / containers / unique_ptr . hpp <nl> ppp b / src / containers / unique_ptr . hpp <nl> this hack . It ' s like an auto_ptr , but with two differences : <nl> modifies it . <nl> * / <nl> <nl> - template < class T > <nl> + / * template < class T > <nl> class unique_ptr_t { <nl> <nl> template < class T2 > friend class unique_ptr_t ; <nl> class unique_ptr_t { <nl> template < class T , class U > <nl> unique_ptr_t < T > static_pointer_cast ( const unique_ptr_t < U > & ptr ) { <nl> return static_cast < T * > ( ptr . release ( ) ) ; <nl> - } <nl> + } * / <nl> <nl> # endif / * __CONTAINERS_UNIQUE_PTR_HPP__ * / <nl> mmm a / src / data_provider . cc <nl> ppp b / src / data_provider . cc <nl> void auto_copying_data_provider_t : : get_data_into_buffers ( const buffer_group_t * d <nl> <nl> / * buffered_data_provider_t * / <nl> <nl> - buffered_data_provider_t : : buffered_data_provider_t ( unique_ptr_t < data_provider_t > dp ) : <nl> + buffered_data_provider_t : : buffered_data_provider_t ( boost : : shared_ptr < data_provider_t > dp ) : <nl> size ( dp - > get_size ( ) ) , buffer ( new char [ size ] ) <nl> { <nl> buffer_group_t writable_bg ; <nl> size_t buffered_data_provider_t : : get_size ( ) const { <nl> } <nl> <nl> const const_buffer_group_t * buffered_data_provider_t : : get_data_as_buffers ( ) throw ( data_provider_failed_exc_t ) { <nl> - rassert ( bg . num_buffers ( ) = = 0 ) ; / / This should be our first time here <nl> - bg . add_buffer ( size , buffer . get ( ) ) ; <nl> + if ( bg . num_buffers ( ) = = 0 ) / / This should be our first time here <nl> + bg . add_buffer ( size , buffer . get ( ) ) ; <nl> return & bg ; <nl> } <nl> <nl> / * maybe_buffered_data_provider_t * / <nl> <nl> - maybe_buffered_data_provider_t : : maybe_buffered_data_provider_t ( unique_ptr_t < data_provider_t > dp , int threshold ) : <nl> + maybe_buffered_data_provider_t : : maybe_buffered_data_provider_t ( boost : : shared_ptr < data_provider_t > dp , int threshold ) : <nl> size ( dp - > get_size ( ) ) , original ( ) , exception_was_thrown ( false ) , buffer ( ) <nl> { <nl> if ( size > = threshold ) { <nl> const const_buffer_group_t * bad_data_provider_t : : get_data_as_buffers ( ) throw ( da <nl> <nl> / * duplicate_data_provider ( ) * / <nl> <nl> - void duplicate_data_provider ( unique_ptr_t < data_provider_t > original , int n , unique_ptr_t < data_provider_t > * dps_out ) { <nl> + void duplicate_data_provider ( boost : : shared_ptr < data_provider_t > original , int n , boost : : shared_ptr < data_provider_t > * dps_out ) { <nl> <nl> if ( n > 0 ) { <nl> <nl> void duplicate_data_provider ( unique_ptr_t < data_provider_t > original , int n , uniq <nl> } <nl> } <nl> <nl> - data_provider_splitter_t : : data_provider_splitter_t ( data_provider_t * dp ) { <nl> + / * data_provider_splitter_t : : data_provider_splitter_t ( data_provider_t * dp ) { <nl> BREAKPOINT ; <nl> reusable_provider . size = dp - > get_size ( ) ; <nl> try { <nl> data_provider_splitter_t : : data_provider_splitter_t ( data_provider_t * dp ) { <nl> <nl> data_provider_t * data_provider_splitter_t : : branch ( ) { <nl> return & reusable_provider ; <nl> - } <nl> + } * / <nl> mmm a / src / data_provider . hpp <nl> ppp b / src / data_provider . hpp <nl> <nl> # include " errors . hpp " <nl> # include < boost / scoped_array . hpp > <nl> # include < boost / scoped_ptr . hpp > <nl> + # include < boost / shared_ptr . hpp > <nl> # include < vector > <nl> # include < exception > <nl> # include " containers / buffer_group . hpp " <nl> provides the data from . * / <nl> <nl> class buffered_data_provider_t : public auto_copying_data_provider_t { <nl> public : <nl> - explicit buffered_data_provider_t ( unique_ptr_t < data_provider_t > dp ) ; / / Create with contents of another <nl> + explicit buffered_data_provider_t ( boost : : shared_ptr < data_provider_t > dp ) ; / / Create with contents of another <nl> buffered_data_provider_t ( const void * , size_t ) ; / / Create by copying out of a buffer <nl> buffered_data_provider_t ( size_t , void * * ) ; / / Allocate buffer , let creator fill it <nl> size_t get_size ( ) const ; <nl> it buffers the other data_provider_t if it is sufficiently small , improving perf <nl> <nl> class maybe_buffered_data_provider_t : public data_provider_t { <nl> public : <nl> - maybe_buffered_data_provider_t ( unique_ptr_t < data_provider_t > dp , int threshold ) ; <nl> + maybe_buffered_data_provider_t ( boost : : shared_ptr < data_provider_t > dp , int threshold ) ; <nl> <nl> size_t get_size ( ) const ; <nl> void get_data_into_buffers ( const buffer_group_t * dest ) throw ( data_provider_failed_exc_t ) ; <nl> class maybe_buffered_data_provider_t : public data_provider_t { <nl> <nl> private : <nl> int size ; <nl> - unique_ptr_t < data_provider_t > original ; <nl> + boost : : shared_ptr < data_provider_t > original ; <nl> / / true if we decide to buffer but there is an exception . We catch the exception in the <nl> / / constructor and then set this variable to true , then throw data_provider_failed_exc_t ( ) <nl> / / when our data is requested . This way we behave exactly the same whether or not we buffer . <nl> class bad_data_provider_t : public data_provider_t { <nl> branch ( ) every time you want a separate data provider . All the data providers returned by branch ( ) <nl> will become invalid once the data_provider_splitter_t is destroyed . * / <nl> <nl> - class data_provider_splitter_t { <nl> + / / class data_provider_splitter_t { <nl> <nl> / * TODO : Special - case the situation where we only intend to call branch ( ) once , by just <nl> returning the original data - provider again . This will require cooperation from the code <nl> that uses data_provider_splitter_t . * / <nl> <nl> - public : <nl> + / * public : <nl> data_provider_splitter_t ( data_provider_t * dp ) ; <nl> data_provider_t * branch ( ) ; <nl> <nl> class data_provider_splitter_t { <nl> else throw data_provider_failed_exc_t ( ) ; <nl> } <nl> } reusable_provider ; <nl> - } ; <nl> + } ; * / <nl> / * duplicate_data_provider ( ) makes a bunch of data providers that are all equivalent to the original <nl> data provider . Internally it makes many copies of the data , so the created data providers are <nl> completely independent . * / <nl> <nl> - void duplicate_data_provider ( unique_ptr_t < data_provider_t > original , int n , unique_ptr_t < data_provider_t > * dps_out ) ; <nl> + void duplicate_data_provider ( boost : : shared_ptr < data_provider_t > original , int n , boost : : shared_ptr < data_provider_t > * dps_out ) ; <nl> <nl> # endif / * __DATA_PROVIDER_HPP__ * / <nl> mmm a / src / gated_store . cc <nl> ppp b / src / gated_store . cc <nl> rget_result_t gated_get_store_t : : rget ( rget_bound_mode_t left_mode , const store_k <nl> threadsafe_gate_t : : entry_t entry ( & gate ) ; <nl> return internal - > rget ( left_mode , left_key , right_mode , right_key ) ; <nl> } else { <nl> - return rget_result_t ( NULL ) ; <nl> + return rget_result_t ( ( one_way_iterator_t < key_with_data_provider_t > * ) NULL ) ; <nl> } <nl> } <nl> <nl> mmm a / src / memcached / memcached . cc <nl> ppp b / src / memcached / memcached . cc <nl> void run_storage_command ( txt_memcached_handler_t * rh , <nl> <nl> thread_saver_t saver ; <nl> <nl> - unique_ptr_t < memcached_data_provider_t > unbuffered_data ( new memcached_data_provider_t ( rh , value_size , value_read_promise ) ) ; <nl> - unique_ptr_t < maybe_buffered_data_provider_t > data ( new maybe_buffered_data_provider_t ( unbuffered_data , MAX_BUFFERED_SET_SIZE ) ) ; <nl> + boost : : shared_ptr < memcached_data_provider_t > unbuffered_data ( new memcached_data_provider_t ( rh , value_size , value_read_promise ) ) ; <nl> + boost : : shared_ptr < maybe_buffered_data_provider_t > data ( new maybe_buffered_data_provider_t ( unbuffered_data , MAX_BUFFERED_SET_SIZE ) ) ; <nl> <nl> block_pm_duration set_timer ( & pm_cmd_set ) ; <nl> <nl> void do_quickset ( const thread_saver_t & saver , txt_memcached_handler_t * rh , std : : <nl> rh - > writef ( saver , " CLIENT_ERROR Invalid key % s \ r \ n " , args [ i ] ) ; <nl> return ; <nl> } <nl> - unique_ptr_t < buffered_data_provider_t > value ( new buffered_data_provider_t ( args [ i + 1 ] , strlen ( args [ i + 1 ] ) ) ) ; <nl> + boost : : shared_ptr < buffered_data_provider_t > value ( new buffered_data_provider_t ( args [ i + 1 ] , strlen ( args [ i + 1 ] ) ) ) ; <nl> <nl> set_result_t res = rh - > set_store - > sarc ( key , value , 0 , 0 , add_policy_yes , replace_policy_yes , 0 ) ; <nl> <nl> mmm a / src / replication / backfill . hpp <nl> ppp b / src / replication / backfill . hpp <nl> struct backfill_and_realtime_streaming_callback_t { <nl> virtual void backfill_done ( repli_timestamp_t timestamp ) = 0 ; <nl> <nl> virtual void realtime_get_cas ( const store_key_t & key , castime_t castime ) = 0 ; <nl> - virtual void realtime_sarc ( const store_key_t & key , unique_ptr_t < data_provider_t > data , <nl> + virtual void realtime_sarc ( const store_key_t & key , boost : : shared_ptr < data_provider_t > data , <nl> mcflags_t flags , exptime_t exptime , castime_t castime , add_policy_t add_policy , <nl> replace_policy_t replace_policy , cas_t old_cas ) = 0 ; <nl> virtual void realtime_incr_decr ( incr_decr_kind_t kind , const store_key_t & key , uint64_t amount , <nl> castime_t castime ) = 0 ; <nl> virtual void realtime_append_prepend ( append_prepend_kind_t kind , const store_key_t & key , <nl> - unique_ptr_t < data_provider_t > data , castime_t castime ) = 0 ; <nl> + boost : : shared_ptr < data_provider_t > data , castime_t castime ) = 0 ; <nl> virtual void realtime_delete_key ( const store_key_t & key , repli_timestamp timestamp ) = 0 ; <nl> <nl> / / ` realtime_time_barrier ( ) ` is called when all the realtime changes with timestamps less than <nl> mmm a / src / replication / backfill_in . cc <nl> ppp b / src / replication / backfill_in . cc <nl> void backfill_storer_t : : realtime_get_cas ( const store_key_t & key , castime_t casti <nl> internal_store_ . handover ( new mutation_t ( mut ) , castime ) ; <nl> } <nl> <nl> - void backfill_storer_t : : realtime_sarc ( const store_key_t & key , unique_ptr_t < data_provider_t > data , <nl> + void backfill_storer_t : : realtime_sarc ( const store_key_t & key , boost : : shared_ptr < data_provider_t > data , <nl> mcflags_t flags , exptime_t exptime , castime_t castime , add_policy_t add_policy , <nl> replace_policy_t replace_policy , cas_t old_cas ) { <nl> block_pm_duration set_timer ( & pm_slave_rt_sarc ) ; <nl> void backfill_storer_t : : realtime_incr_decr ( incr_decr_kind_t kind , const store_ke <nl> } <nl> <nl> void backfill_storer_t : : realtime_append_prepend ( append_prepend_kind_t kind , const store_key_t & key , <nl> - unique_ptr_t < data_provider_t > data , castime_t castime ) { <nl> + boost : : shared_ptr < data_provider_t > data , castime_t castime ) { <nl> block_pm_duration set_timer ( & pm_slave_rt_app_prep ) ; <nl> append_prepend_mutation_t mut ; <nl> mut . key = key ; <nl> mmm a / src / replication / backfill_in . hpp <nl> ppp b / src / replication / backfill_in . hpp <nl> struct backfill_storer_t : public backfill_and_realtime_streaming_callback_t { <nl> void backfill_done ( repli_timestamp_t timestamp ) ; <nl> <nl> void realtime_get_cas ( const store_key_t & key , castime_t castime ) ; <nl> - void realtime_sarc ( const store_key_t & key , unique_ptr_t < data_provider_t > data , <nl> + void realtime_sarc ( const store_key_t & key , boost : : shared_ptr < data_provider_t > data , <nl> mcflags_t flags , exptime_t exptime , castime_t castime , add_policy_t add_policy , <nl> replace_policy_t replace_policy , cas_t old_cas ) ; <nl> void realtime_incr_decr ( incr_decr_kind_t kind , const store_key_t & key , uint64_t amount , <nl> castime_t castime ) ; <nl> void realtime_append_prepend ( append_prepend_kind_t kind , const store_key_t & key , <nl> - unique_ptr_t < data_provider_t > data , castime_t castime ) ; <nl> + boost : : shared_ptr < data_provider_t > data , castime_t castime ) ; <nl> void realtime_delete_key ( const store_key_t & key , repli_timestamp timestamp ) ; <nl> void realtime_time_barrier ( repli_timestamp_t timestamp ) ; <nl> <nl> mmm a / src / replication / backfill_out . cc <nl> ppp b / src / replication / backfill_out . cc <nl> struct backfill_and_streaming_manager_t : <nl> return m ; <nl> } <nl> mutation_t operator ( ) ( const sarc_mutation_t & m ) { <nl> - unique_ptr_t < data_provider_t > dps [ 2 ] ; <nl> + boost : : shared_ptr < data_provider_t > dps [ 2 ] ; <nl> duplicate_data_provider ( m . data , 2 , dps ) ; <nl> manager - > realtime_job_queue . push ( boost : : bind ( & backfill_and_streaming_manager_t : : realtime_sarc , manager , <nl> m . key , dps [ 0 ] , m . flags , m . exptime , castime , m . add_policy , m . replace_policy , m . old_cas ) ) ; <nl> struct backfill_and_streaming_manager_t : <nl> return m ; <nl> } <nl> mutation_t operator ( ) ( const append_prepend_mutation_t & m ) { <nl> - unique_ptr_t < data_provider_t > dps [ 2 ] ; <nl> + boost : : shared_ptr < data_provider_t > dps [ 2 ] ; <nl> duplicate_data_provider ( m . data , 2 , dps ) ; <nl> manager - > realtime_job_queue . push ( boost : : bind ( & backfill_and_streaming_manager_t : : realtime_append_prepend , manager , <nl> m . kind , m . key , dps [ 0 ] , castime ) ) ; <nl> struct backfill_and_streaming_manager_t : <nl> block_pm_duration set_timer ( & master_rt_get_cas ) ; <nl> handler_ - > realtime_get_cas ( key , castime ) ; <nl> } <nl> - void realtime_sarc ( const store_key_t & key , unique_ptr_t < data_provider_t > data , <nl> + void realtime_sarc ( const store_key_t & key , boost : : shared_ptr < data_provider_t > data , <nl> mcflags_t flags , exptime_t exptime , castime_t castime , add_policy_t add_policy , <nl> replace_policy_t replace_policy , cas_t old_cas ) { <nl> block_pm_duration set_timer ( & master_rt_sarc ) ; <nl> struct backfill_and_streaming_manager_t : <nl> handler_ - > realtime_incr_decr ( kind , key , amount , castime ) ; <nl> } <nl> void realtime_append_prepend ( append_prepend_kind_t kind , const store_key_t & key , <nl> - unique_ptr_t < data_provider_t > data , castime_t castime ) { <nl> + boost : : shared_ptr < data_provider_t > data , castime_t castime ) { <nl> block_pm_duration set_timer ( & master_rt_app_prep ) ; <nl> handler_ - > realtime_append_prepend ( kind , key , data , castime ) ; <nl> } <nl> mmm a / src / replication / backfill_sender . cc <nl> ppp b / src / replication / backfill_sender . cc <nl> void backfill_sender_t : : realtime_get_cas ( const store_key_t & key , castime_t casti <nl> } <nl> } <nl> <nl> - void backfill_sender_t : : realtime_sarc ( const store_key_t & key , unique_ptr_t < data_provider_t > data , mcflags_t flags , exptime_t exptime , castime_t castime , add_policy_t add_policy , replace_policy_t replace_policy , cas_t old_cas ) { <nl> + void backfill_sender_t : : realtime_sarc ( const store_key_t & key , boost : : shared_ptr < data_provider_t > data , mcflags_t flags , exptime_t exptime , castime_t castime , add_policy_t add_policy , replace_policy_t replace_policy , cas_t old_cas ) { <nl> assert_thread ( ) ; <nl> <nl> debugf ( " send realtime_sarc ( % . * s ) , % d \ n " , key . size , key . contents , int ( bool ( * stream_ ) ) ) ; <nl> void backfill_sender_t : : incr_decr_like ( const store_key_t & key , uint64_t amount , <nl> if ( * stream_ ) ( * stream_ ) - > send ( msg . get ( ) ) ; <nl> } <nl> <nl> - void backfill_sender_t : : realtime_append_prepend ( append_prepend_kind_t kind , const store_key_t & key , unique_ptr_t < data_provider_t > data , castime_t castime ) { <nl> + void backfill_sender_t : : realtime_append_prepend ( append_prepend_kind_t kind , const store_key_t & key , boost : : shared_ptr < data_provider_t > data , castime_t castime ) { <nl> assert_thread ( ) ; <nl> <nl> debugf ( " send realtime_append_prepend ( % . * s ) , % d \ n " , key . size , key . contents , int ( bool ( * stream_ ) ) ) ; <nl> mmm a / src / replication / backfill_sender . hpp <nl> ppp b / src / replication / backfill_sender . hpp <nl> struct backfill_sender_t : <nl> void backfill_done ( repli_timestamp_t timestamp_when_backfill_began ) ; <nl> <nl> void realtime_get_cas ( const store_key_t & key , castime_t castime ) ; <nl> - void realtime_sarc ( const store_key_t & key , unique_ptr_t < data_provider_t > data , <nl> + void realtime_sarc ( const store_key_t & key , boost : : shared_ptr < data_provider_t > data , <nl> mcflags_t flags , exptime_t exptime , castime_t castime , add_policy_t add_policy , <nl> replace_policy_t replace_policy , cas_t old_cas ) ; <nl> void realtime_incr_decr ( incr_decr_kind_t kind , const store_key_t & key , uint64_t amount , <nl> castime_t castime ) ; <nl> void realtime_append_prepend ( append_prepend_kind_t kind , const store_key_t & key , <nl> - unique_ptr_t < data_provider_t > data , castime_t castime ) ; <nl> + boost : : shared_ptr < data_provider_t > data , castime_t castime ) ; <nl> void realtime_delete_key ( const store_key_t & key , repli_timestamp timestamp ) ; <nl> void realtime_time_barrier ( repli_timestamp_t timestamp ) ; <nl> <nl> mmm a / src / replication / protocol . cc <nl> ppp b / src / replication / protocol . cc <nl> void repli_stream_t : : sendobj ( uint8_t msgcode , net_struct_type * msg ) { <nl> } <nl> <nl> template < class net_struct_type > <nl> - void repli_stream_t : : sendobj ( uint8_t msgcode , net_struct_type * msg , const char * key , unique_ptr_t < data_provider_t > data ) { <nl> + void repli_stream_t : : sendobj ( uint8_t msgcode , net_struct_type * msg , const char * key , boost : : shared_ptr < data_provider_t > data ) { <nl> rassert ( msg - > value_size = = data - > get_size ( ) ) ; <nl> <nl> size_t bufsize = objsize ( msg ) ; <nl> void repli_stream_t : : send ( net_get_cas_t * msg ) { <nl> sendobj ( GET_CAS , msg ) ; <nl> } <nl> <nl> - void repli_stream_t : : send ( net_sarc_t * msg , const char * key , unique_ptr_t < data_provider_t > value ) { <nl> + void repli_stream_t : : send ( net_sarc_t * msg , const char * key , boost : : shared_ptr < data_provider_t > value ) { <nl> drain_semaphore_t : : lock_t keep_us_alive ( & drain_semaphore_ ) ; <nl> sendobj ( SARC , msg , key , value ) ; <nl> } <nl> <nl> - void repli_stream_t : : send ( net_backfill_set_t * msg , const char * key , unique_ptr_t < data_provider_t > value ) { <nl> + void repli_stream_t : : send ( net_backfill_set_t * msg , const char * key , boost : : shared_ptr < data_provider_t > value ) { <nl> drain_semaphore_t : : lock_t keep_us_alive ( & drain_semaphore_ ) ; <nl> sendobj ( BACKFILL_SET , msg , key , value ) ; <nl> } <nl> void repli_stream_t : : send ( net_decr_t * msg ) { <nl> sendobj ( DECR , msg ) ; <nl> } <nl> <nl> - void repli_stream_t : : send ( net_append_t * msg , const char * key , unique_ptr_t < data_provider_t > value ) { <nl> + void repli_stream_t : : send ( net_append_t * msg , const char * key , boost : : shared_ptr < data_provider_t > value ) { <nl> drain_semaphore_t : : lock_t keep_us_alive ( & drain_semaphore_ ) ; <nl> sendobj ( APPEND , msg , key , value ) ; <nl> } <nl> <nl> - void repli_stream_t : : send ( net_prepend_t * msg , const char * key , unique_ptr_t < data_provider_t > value ) { <nl> + void repli_stream_t : : send ( net_prepend_t * msg , const char * key , boost : : shared_ptr < data_provider_t > value ) { <nl> drain_semaphore_t : : lock_t keep_us_alive ( & drain_semaphore_ ) ; <nl> sendobj ( PREPEND , msg , key , value ) ; <nl> } <nl> mmm a / src / replication / protocol . hpp <nl> ppp b / src / replication / protocol . hpp <nl> namespace replication { <nl> <nl> template < class T > <nl> struct stream_pair { <nl> - unique_ptr_t < buffered_data_provider_t > stream ; <nl> + boost : : shared_ptr < buffered_data_provider_t > stream ; <nl> unique_malloc_t < T > data ; <nl> <nl> / / This uses key_size , which is completely crap . <nl> class repli_stream_t : public home_thread_mixin_t { <nl> void send ( net_backfill_complete_t * msg ) ; <nl> void send ( net_backfill_delete_everything_t msg ) ; <nl> void send ( net_backfill_delete_t * msg ) ; <nl> - void send ( net_backfill_set_t * msg , const char * key , unique_ptr_t < data_provider_t > value ) ; <nl> + void send ( net_backfill_set_t * msg , const char * key , boost : : shared_ptr < data_provider_t > value ) ; <nl> void send ( net_get_cas_t * msg ) ; <nl> - void send ( net_sarc_t * msg , const char * key , unique_ptr_t < data_provider_t > value ) ; <nl> + void send ( net_sarc_t * msg , const char * key , boost : : shared_ptr < data_provider_t > value ) ; <nl> void send ( net_incr_t * msg ) ; <nl> void send ( net_decr_t * msg ) ; <nl> - void send ( net_append_t * msg , const char * key , unique_ptr_t < data_provider_t > value ) ; <nl> - void send ( net_prepend_t * msg , const char * key , unique_ptr_t < data_provider_t > value ) ; <nl> + void send ( net_append_t * msg , const char * key , boost : : shared_ptr < data_provider_t > value ) ; <nl> + void send ( net_prepend_t * msg , const char * key , boost : : shared_ptr < data_provider_t > value ) ; <nl> void send ( net_delete_t * msg ) ; <nl> void send ( net_nop_t msg ) ; <nl> <nl> class repli_stream_t : public home_thread_mixin_t { <nl> void sendobj ( uint8_t msgcode , net_struct_type * msg ) ; <nl> <nl> template < class net_struct_type > <nl> - void sendobj ( uint8_t msgcode , net_struct_type * msg , const char * key , unique_ptr_t < data_provider_t > data ) ; <nl> + void sendobj ( uint8_t msgcode , net_struct_type * msg , const char * key , boost : : shared_ptr < data_provider_t > data ) ; <nl> <nl> void send_hello ( const mutex_acquisition_t & proof_of_acquisition ) ; <nl> <nl> mmm a / src / rpc / serialize / others . hpp <nl> ppp b / src / rpc / serialize / others . hpp <nl> inline void unserialize ( cluster_inpipe_t * conn , UNUSED unserialize_extra_storage <nl> } <nl> <nl> / * Serializing and unserializing data_provider_ts . Two flavors are provided : one that works with <nl> - unique_ptr_t < data_provider_t > , and one that works with raw data_provider_t * . * / <nl> + boost : : shared_ptr < data_provider_t > , and one that works with raw data_provider_t * . * / <nl> <nl> inline void serialize ( cluster_outpipe_t * conn , data_provider_t * data ) { <nl> - BREAKPOINT ; <nl> if ( data ) { <nl> : : serialize ( conn , true ) ; <nl> int size = data - > get_size ( ) ; <nl> inline void unserialize ( cluster_inpipe_t * conn , unserialize_extra_storage_t * es , <nl> } <nl> } <nl> <nl> - inline void serialize ( cluster_outpipe_t * conn , const unique_ptr_t < data_provider_t > & data ) { <nl> + inline void serialize ( cluster_outpipe_t * conn , const boost : : shared_ptr < data_provider_t > & data ) { <nl> serialize ( conn , data . get ( ) ) ; <nl> } <nl> <nl> - inline int ser_size ( const unique_ptr_t < data_provider_t > & data ) { <nl> + inline int ser_size ( const boost : : shared_ptr < data_provider_t > & data ) { <nl> return ser_size ( data . get ( ) ) ; <nl> } <nl> <nl> - inline void unserialize ( cluster_inpipe_t * conn , unserialize_extra_storage_t * es , unique_ptr_t < data_provider_t > * data ) { <nl> + inline void unserialize ( cluster_inpipe_t * conn , unserialize_extra_storage_t * es , boost : : shared_ptr < data_provider_t > * data ) { <nl> bool non_null ; <nl> : : unserialize ( conn , es , & non_null ) ; <nl> if ( non_null ) { <nl> mmm a / src / server / key_value_store . cc <nl> ppp b / src / server / key_value_store . cc <nl> rget_result_t btree_key_value_store_t : : rget ( rget_bound_mode_t left_mode , const s <nl> / / if we don ' t call something that takes it as a parameter . <nl> thread_saver_t thread_saver ; <nl> <nl> - unique_ptr_t < merged_results_iterator_t > merge_iterator ( new merged_results_iterator_t ( ) ) ; <nl> + boost : : shared_ptr < merged_results_iterator_t > merge_iterator ( new merged_results_iterator_t ( ) ) ; <nl> for ( int s = 0 ; s < btree_static_config . n_slices ; s + + ) { <nl> - merge_iterator - > add_mergee ( shards [ s ] - > rget ( left_mode , left_key , right_mode , right_key ) . release ( ) ) ; <nl> + merge_iterator - > add_mergee ( shards [ s ] - > rget ( left_mode , left_key , right_mode , right_key ) . get ( ) ) ; <nl> + / / @ jdoliner this is probably a memory leak here <nl> } <nl> return merge_iterator ; <nl> } <nl> mmm a / src / store . cc <nl> ppp b / src / store . cc <nl> struct mutation_get_data_provider_functor_t : public boost : : static_visitor < data_ <nl> } ; <nl> <nl> struct mutation_replace_data_provider_functor_t : public boost : : static_visitor < mutation_t > { <nl> - data_provider_splitter_t * data_splitter ; <nl> + / / data_provider_splitter_t * data_splitter ; <nl> mutation_t operator ( ) ( const get_cas_mutation_t & m ) { <nl> return m ; <nl> } <nl> mutation_t operator ( ) ( const sarc_mutation_t & m ) { <nl> sarc_mutation_t m2 = m ; <nl> - m2 . data . reset ( data_splitter - > branch ( ) ) ; <nl> + duplicate_data_provider ( m . data , 1 , & m2 . data ) ; <nl> return m2 ; <nl> } <nl> mutation_t operator ( ) ( const delete_mutation_t & m ) { <nl> struct mutation_replace_data_provider_functor_t : public boost : : static_visitor < m <nl> } <nl> mutation_t operator ( ) ( const append_prepend_mutation_t & m ) { <nl> append_prepend_mutation_t m2 = m ; <nl> - m2 . data . reset ( data_splitter - > branch ( ) ) ; <nl> + duplicate_data_provider ( m . data , 1 , & m2 . data ) ; <nl> return m2 ; <nl> } <nl> } ; <nl> <nl> mutation_splitter_t : : mutation_splitter_t ( const mutation_t & mut ) <nl> : original ( mut ) <nl> - { <nl> - mutation_get_data_provider_functor_t functor ; <nl> - if ( data_provider_t * dp = boost : : apply_visitor ( functor , original . mutation ) ) { <nl> - dp_splitter . reset ( new data_provider_splitter_t ( dp ) ) ; <nl> - } <nl> - } <nl> + { } <nl> <nl> mutation_t mutation_splitter_t : : branch ( ) { <nl> mutation_replace_data_provider_functor_t functor ; <nl> - functor . data_splitter = dp_splitter . get ( ) ; <nl> return boost : : apply_visitor ( functor , original . mutation ) ; <nl> } <nl> <nl> get_result_t set_store_interface_t : : get_cas ( const store_key_t & key ) { <nl> return boost : : get < get_result_t > ( change ( mut ) . result ) ; <nl> } <nl> <nl> - set_result_t set_store_interface_t : : sarc ( const store_key_t & key , unique_ptr_t < data_provider_t > data , mcflags_t flags , exptime_t exptime , add_policy_t add_policy , replace_policy_t replace_policy , cas_t old_cas ) { <nl> + set_result_t set_store_interface_t : : sarc ( const store_key_t & key , boost : : shared_ptr < data_provider_t > data , mcflags_t flags , exptime_t exptime , add_policy_t add_policy , replace_policy_t replace_policy , cas_t old_cas ) { <nl> sarc_mutation_t mut ; <nl> mut . key = key ; <nl> mut . data = data ; <nl> set_result_t set_store_interface_t : : sarc ( const store_key_t & key , unique_ptr_t < da <nl> mut . add_policy = add_policy ; <nl> mut . replace_policy = replace_policy ; <nl> mut . old_cas = old_cas ; <nl> - return boost : : get < set_result_t > ( change ( mut ) . result ) ; <nl> + mutation_result_t foo ( change ( mut ) ) ; <nl> + return boost : : get < set_result_t > ( foo . result ) ; <nl> } <nl> <nl> incr_decr_result_t set_store_interface_t : : incr_decr ( incr_decr_kind_t kind , const store_key_t & key , uint64_t amount ) { <nl> incr_decr_result_t set_store_interface_t : : incr_decr ( incr_decr_kind_t kind , const <nl> return boost : : get < incr_decr_result_t > ( change ( mut ) . result ) ; <nl> } <nl> <nl> - append_prepend_result_t set_store_interface_t : : append_prepend ( append_prepend_kind_t kind , const store_key_t & key , unique_ptr_t < data_provider_t > data ) { <nl> + append_prepend_result_t set_store_interface_t : : append_prepend ( append_prepend_kind_t kind , const store_key_t & key , boost : : shared_ptr < data_provider_t > data ) { <nl> append_prepend_mutation_t mut ; <nl> mut . kind = kind ; <nl> mut . key = key ; <nl> mmm a / src / store . hpp <nl> ppp b / src / store . hpp <nl> struct key_with_data_provider_t { <nl> } ; <nl> <nl> / / A NULL unique pointer means not allowed <nl> - typedef unique_ptr_t < one_way_iterator_t < key_with_data_provider_t > > rget_result_t ; <nl> + typedef boost : : shared_ptr < one_way_iterator_t < key_with_data_provider_t > > rget_result_t ; <nl> <nl> struct get_result_t { <nl> - get_result_t ( unique_ptr_t < data_provider_t > v , mcflags_t f , cas_t c ) : <nl> + get_result_t ( boost : : shared_ptr < data_provider_t > v , mcflags_t f , cas_t c ) : <nl> is_not_allowed ( false ) , value ( v ) , flags ( f ) , cas ( c ) { } <nl> get_result_t ( ) : <nl> is_not_allowed ( false ) , value ( ) , flags ( 0 ) , cas ( 0 ) { } <nl> struct get_result_t { <nl> <nl> / / NULL means not found . Parts of the store may wait for the data_provider_t ' s destructor , <nl> / / so don ' t hold on to it forever . <nl> - unique_ptr_t < data_provider_t > value ; <nl> + boost : : shared_ptr < data_provider_t > value ; <nl> <nl> mcflags_t flags ; <nl> cas_t cas ; <nl> struct sarc_mutation_t { <nl> <nl> / * The value to give the key ; must not be NULL . <nl> TODO : Should NULL mean a deletion ? * / <nl> - unique_ptr_t < data_provider_t > data ; <nl> + boost : : shared_ptr < data_provider_t > data ; <nl> <nl> / * The flags to store with the value * / <nl> mcflags_t flags ; <nl> struct sarc_mutation_t { <nl> the return value will be sr_didnt_replace . * / <nl> replace_policy_t replace_policy ; <nl> cas_t old_cas ; <nl> + <nl> + / / sarc_mutation_t ( ) { BREAKPOINT ; } <nl> } ; <nl> <nl> enum set_result_t { <nl> enum append_prepend_kind_t { append_prepend_APPEND , append_prepend_PREPEND } ; <nl> struct append_prepend_mutation_t { <nl> append_prepend_kind_t kind ; <nl> store_key_t key ; <nl> - unique_ptr_t < data_provider_t > data ; <nl> + boost : : shared_ptr < data_provider_t > data ; <nl> } ; <nl> <nl> enum append_prepend_result_t { <nl> struct mutation_t { <nl> typedef boost : : variant < get_cas_mutation_t , sarc_mutation_t , delete_mutation_t , incr_decr_mutation_t , append_prepend_mutation_t > mutation_variant_t ; <nl> mutation_variant_t mutation ; <nl> <nl> - mutation_t ( ) { } <nl> + mutation_t ( ) { <nl> + } <nl> <nl> / / implicit <nl> template < class T > <nl> struct mutation_splitter_t { <nl> mutation_t branch ( ) ; <nl> private : <nl> mutation_t original ; <nl> - boost : : scoped_ptr < data_provider_splitter_t > dp_splitter ; <nl> + boost : : scoped_ptr < data_provider_t > dp ; <nl> } ; <nl> <nl> class set_store_interface_t { <nl> class set_store_interface_t { <nl> public : <nl> / * These NON - VIRTUAL methods all construct a mutation_t and then call change ( ) . * / <nl> get_result_t get_cas ( const store_key_t & key ) ; <nl> - set_result_t sarc ( const store_key_t & key , unique_ptr_t < data_provider_t > data , mcflags_t flags , exptime_t exptime , add_policy_t add_policy , replace_policy_t replace_policy , cas_t old_cas ) ; <nl> + set_result_t sarc ( const store_key_t & key , boost : : shared_ptr < data_provider_t > data , mcflags_t flags , exptime_t exptime , add_policy_t add_policy , replace_policy_t replace_policy , cas_t old_cas ) ; <nl> incr_decr_result_t incr_decr ( incr_decr_kind_t kind , const store_key_t & key , uint64_t amount ) ; <nl> - append_prepend_result_t append_prepend ( append_prepend_kind_t kind , const store_key_t & key , unique_ptr_t < data_provider_t > data ) ; <nl> + append_prepend_result_t append_prepend ( append_prepend_kind_t kind , const store_key_t & key , boost : : shared_ptr < data_provider_t > data ) ; <nl> delete_result_t delete_key ( const store_key_t & key , bool dont_store_in_delete_queue = false ) ; <nl> <nl> virtual mutation_result_t change ( const mutation_t & ) = 0 ; <nl>
Gets rid of the unique_ptr type .
rethinkdb/rethinkdb
8b088abd8b408ac2851c5008bc777cd9dfc08bf6
2011-05-09T22:48:35Z
mmm a / db / queryutil . cpp <nl> ppp b / db / queryutil . cpp <nl> namespace mongo { <nl> <nl> if ( e . eoo ( ) ) <nl> return ; <nl> + <nl> int op = e . getGtLtOp ( ) ; <nl> + <nl> + bool existsSpec = false ; <nl> + if ( op = = BSONObj : : opEXISTS ) { <nl> + existsSpec = e . Bool ( ) ; <nl> + } <nl> + <nl> if ( e . type ( ) = = RegEx <nl> | | ( e . type ( ) = = Object & & ! e . embeddedObject ( ) [ " $ regex " ] . eoo ( ) ) <nl> ) { <nl> namespace mongo { <nl> case BSONObj : : GTE : <nl> op = BSONObj : : LT ; <nl> break ; <nl> + case BSONObj : : opEXISTS : <nl> + existsSpec = ! existsSpec ; <nl> + break ; <nl> default : / / otherwise doesn ' t matter <nl> break ; <nl> } <nl> namespace mongo { <nl> case BSONObj : : opWITHIN : <nl> _special = " 2d " ; <nl> break ; <nl> + case BSONObj : : opEXISTS : { <nl> + if ( ! existsSpec ) { <nl> + lower = upper = staticNull . firstElement ( ) ; <nl> + } <nl> + optimize = false ; <nl> + break ; <nl> + } <nl> default : <nl> break ; <nl> } <nl> mmm a / jstests / exists6 . js <nl> ppp b / jstests / exists6 . js <nl> <nl> t = db . jstests_exists6 ; <nl> t . drop ( ) ; <nl> <nl> + t . ensureIndex ( { b : 1 } ) ; <nl> + t . save ( { } ) ; <nl> + t . save ( { b : 1 } ) ; <nl> + t . save ( { b : null } ) ; <nl> + <nl> + checkExists = function ( query ) { <nl> + / / Constraint on ' b ' is trivial , so a BasicCursor is the default cursor type . <nl> + assert . eq ( ' BasicCursor ' , t . find ( query ) . explain ( ) . cursor ) ; <nl> + / / Index bounds include all elements . <nl> + assert . eq ( [ [ { $ minElement : 1 } , { $ maxElement : 1 } ] ] , t . find ( query ) . hint ( { b : 1 } ) . explain ( ) . indexBounds . b ) ; <nl> + / / All keys must be scanned . <nl> + assert . eq ( 3 , t . find ( query ) . hint ( { b : 1 } ) . explain ( ) . nscanned ) ; <nl> + / / 2 docs will match . <nl> + assert . eq ( 2 , t . find ( query ) . hint ( { b : 1 } ) . itcount ( ) ) ; <nl> + } <nl> + checkExists ( { b : { $ exists : true } } ) ; <nl> + checkExists ( { b : { $ not : { $ exists : false } } } ) ; <nl> + <nl> + checkMissing = function ( query ) { <nl> + / / Constraint on ' b ' is nontrivial , so a BtreeCursor is the default cursor type . <nl> + assert . eq ( ' BtreeCursor b_1 ' , t . find ( query ) . explain ( ) . cursor ) ; <nl> + / / Scan null index keys . <nl> + assert . eq ( [ [ null , null ] ] , t . find ( query ) . explain ( ) . indexBounds . b ) ; <nl> + / / Two existing null keys will be scanned . <nl> + assert . eq ( 2 , t . find ( query ) . explain ( ) . nscanned ) ; <nl> + / / One doc is missing ' b ' . <nl> + assert . eq ( 1 , t . find ( query ) . hint ( { b : 1 } ) . itcount ( ) ) ; <nl> + } <nl> + checkMissing ( { b : { $ exists : false } } ) ; <nl> + checkMissing ( { b : { $ not : { $ exists : true } } } ) ; <nl> + <nl> + / / Now check existence of second compound field . <nl> t . ensureIndex ( { a : 1 , b : 1 } ) ; <nl> t . save ( { a : 1 } ) ; <nl> + t . save ( { a : 1 , b : 1 } ) ; <nl> + t . save ( { a : 1 , b : null } ) ; <nl> + <nl> + checkExists = function ( query ) { <nl> + / / Index bounds include all elements . <nl> + assert . eq ( [ [ { $ minElement : 1 } , { $ maxElement : 1 } ] ] , t . find ( query ) . explain ( ) . indexBounds . b ) ; <nl> + / / All keys must be scanned . <nl> + assert . eq ( 3 , t . find ( query ) . explain ( ) . nscanned ) ; <nl> + / / 2 docs will match . <nl> + assert . eq ( 2 , t . find ( query ) . hint ( { a : 1 , b : 1 } ) . itcount ( ) ) ; <nl> + } <nl> + checkExists ( { a : 1 , b : { $ exists : true } } ) ; <nl> + checkExists ( { a : 1 , b : { $ not : { $ exists : false } } } ) ; <nl> <nl> - assert . eq ( 1 , t . find ( { a : 1 , b : { $ exists : false } } ) . itcount ( ) ) ; <nl> + checkMissing = function ( query ) { <nl> + / / Scan null index keys . <nl> + assert . eq ( [ [ null , null ] ] , t . find ( query ) . explain ( ) . indexBounds . b ) ; <nl> + / / Two existing null keys will be scanned . <nl> + assert . eq ( 2 , t . find ( query ) . explain ( ) . nscanned ) ; <nl> + / / One doc is missing ' b ' . <nl> + assert . eq ( 1 , t . find ( query ) . hint ( { a : 1 , b : 1 } ) . itcount ( ) ) ; <nl> + } <nl> + checkMissing ( { a : 1 , b : { $ exists : false } } ) ; <nl> + checkMissing ( { a : 1 , b : { $ not : { $ exists : true } } } ) ; <nl>
SERVER - 393 Use index bounds for exists : false
mongodb/mongo
a7360cc67fffc5951f1f5e898f90e2fc3575e396
2011-04-05T20:14:16Z
mmm a / include / rapidjson / schema . h <nl> ppp b / include / rapidjson / schema . h <nl> class BaseSchema { <nl> not_ ( ) , <nl> type_ ( ( 1 < < kTotalSchemaType ) - 1 ) , / / typeless <nl> properties_ ( ) , <nl> - additionalPropertySchema_ ( ) , <nl> + additionalPropertiesSchema_ ( ) , <nl> # if RAPIDJSON_SCHEMA_HAS_REGEX <nl> patternProperties_ ( ) , <nl> patternPropertyCount_ ( ) , <nl> class BaseSchema { <nl> requiredCount_ ( ) , <nl> minProperties_ ( ) , <nl> maxProperties_ ( SizeType ( ~ 0 ) ) , <nl> - additionalProperty_ ( true ) , <nl> + additionalProperties_ ( true ) , <nl> hasDependencies_ ( ) , <nl> + additionalItemsSchema_ ( ) , <nl> itemsList_ ( ) , <nl> itemsTuple_ ( ) , <nl> itemsTupleCount_ ( ) , <nl> class BaseSchema { <nl> <nl> if ( const ValueType * v = GetMember ( value , " additionalProperties " ) ) { <nl> if ( v - > IsBool ( ) ) <nl> - additionalProperty_ = v - > GetBool ( ) ; <nl> + additionalProperties_ = v - > GetBool ( ) ; <nl> else if ( v - > IsObject ( ) ) <nl> - additionalPropertySchema_ = new BaseSchema < Encoding > ( * v ) ; <nl> + additionalPropertiesSchema_ = new BaseSchema < Encoding > ( * v ) ; <nl> } <nl> <nl> AssignIfExist ( minProperties_ , value , " minProperties " ) ; <nl> class BaseSchema { <nl> <nl> AssignIfExist ( minItems_ , value , " minItems " ) ; <nl> AssignIfExist ( maxItems_ , value , " maxItems " ) ; <nl> - AssignIfExist ( additionalItems_ , value , " additionalItems " ) ; <nl> + <nl> + if ( const ValueType * v = GetMember ( value , " additionalItems " ) ) { <nl> + if ( v - > IsBool ( ) ) <nl> + additionalItems_ = v - > GetBool ( ) ; <nl> + else if ( v - > IsObject ( ) ) <nl> + additionalItemsSchema_ = new BaseSchema < Encoding > ( * v ) ; <nl> + } <nl> <nl> / / String <nl> AssignIfExist ( minLength_ , value , " minLength " ) ; <nl> class BaseSchema { <nl> ~ BaseSchema ( ) { <nl> delete not_ ; <nl> delete [ ] properties_ ; <nl> - delete additionalPropertySchema_ ; <nl> + delete additionalPropertiesSchema_ ; <nl> # if RAPIDJSON_SCHEMA_HAS_REGEX <nl> delete [ ] patternProperties_ ; <nl> # endif <nl> class BaseSchema { <nl> else if ( itemsTuple_ ) { <nl> if ( context . arrayElementIndex < itemsTupleCount_ ) <nl> context . valueSchema = itemsTuple_ [ context . arrayElementIndex ] ; <nl> + else if ( additionalItemsSchema_ ) <nl> + context . valueSchema = additionalItemsSchema_ ; <nl> else if ( additionalItems_ ) <nl> context . valueSchema = GetTypeless ( ) ; <nl> else <nl> class BaseSchema { <nl> } <nl> # endif <nl> <nl> - if ( additionalPropertySchema_ ) { <nl> - context . valueSchema = additionalPropertySchema_ ; <nl> + if ( additionalPropertiesSchema_ ) { <nl> + context . valueSchema = additionalPropertiesSchema_ ; <nl> return true ; <nl> } <nl> - else if ( additionalProperty_ ) { <nl> + else if ( additionalProperties_ ) { <nl> context . valueSchema = GetTypeless ( ) ; <nl> return true ; <nl> } <nl> class BaseSchema { <nl> unsigned type_ ; / / bitmask of kSchemaType <nl> <nl> Property * properties_ ; <nl> - BaseSchema < Encoding > * additionalPropertySchema_ ; <nl> + BaseSchema < Encoding > * additionalPropertiesSchema_ ; <nl> # if RAPIDJSON_SCHEMA_HAS_REGEX <nl> PatternProperty * patternProperties_ ; <nl> SizeType patternPropertyCount_ ; <nl> class BaseSchema { <nl> SizeType requiredCount_ ; <nl> SizeType minProperties_ ; <nl> SizeType maxProperties_ ; <nl> - bool additionalProperty_ ; <nl> + bool additionalProperties_ ; <nl> bool hasDependencies_ ; <nl> <nl> + BaseSchema < Encoding > * additionalItemsSchema_ ; <nl> BaseSchema < Encoding > * itemsList_ ; <nl> BaseSchema < Encoding > * * itemsTuple_ ; <nl> SizeType itemsTupleCount_ ; <nl>
Fix " additional items do not match schema "
Tencent/rapidjson
9c0e409ff272ffb1c26b9b764593f886af1ad4b8
2015-05-07T07:36:48Z
mmm a / cmake / FDBComponents . cmake <nl> ppp b / cmake / FDBComponents . cmake <nl> endif ( ) <nl> # TOML11 <nl> # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # <nl> <nl> + # TOML can download and install itself into the binary directory , so it should <nl> + # always be available . <nl> find_package ( TOML11 ) <nl> - if ( TOML11_FOUND ) <nl> - set ( WITH_TOML ON ) <nl> - else ( ) <nl> - set ( WITH_TOML OFF ) <nl> - endif ( ) <nl> <nl> # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # <nl> <nl> function ( print_components ) <nl> message ( STATUS " Build Bindings ( depends on Python ) : $ { WITH_PYTHON } " ) <nl> message ( STATUS " Configure CTest ( depends on Python ) : $ { WITH_PYTHON } " ) <nl> message ( STATUS " Build with RocksDB : $ { WITH_ROCKSDB_EXPERIMENTAL } " ) <nl> - message ( STATUS " Build with TOML testspecs : $ { WITH_TOML } " ) <nl> message ( STATUS " = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = " ) <nl> endfunction ( ) <nl> <nl> mmm a / fdbserver / CMakeLists . txt <nl> ppp b / fdbserver / CMakeLists . txt <nl> else ( ) <nl> target_link_libraries ( fdbserver PRIVATE fdbclient fdb_sqlite ) <nl> endif ( ) <nl> <nl> - if ( WITH_TOML ) <nl> - add_dependencies ( fdbserver toml11 ) <nl> - target_include_directories ( fdbserver PRIVATE $ { TOML11_INCLUDE_DIR } ) <nl> - message ( STATUS TOML11_INCLUDE_DIR : " $ { TOML11_INCLUDE_DIR } " ) <nl> - endif ( ) <nl> + add_dependencies ( fdbserver toml11 ) <nl> + target_include_directories ( fdbserver PRIVATE $ { TOML11_INCLUDE_DIR } ) <nl> <nl> if ( GPERFTOOLS_FOUND ) <nl> add_compile_definitions ( USE_GPERFTOOLS ) <nl>
Make TOML mandatory .
apple/foundationdb
0a8f61b967a71ac067f1ddba65f7212360f717ea
2020-07-13T02:43:38Z
mmm a / doc / PROTOCOL - WEB . md <nl> ppp b / doc / PROTOCOL - WEB . md <nl> HTTP / 2 related behavior ( specified in [ gRPC over HTTP2 ] ( http : / / www . grpc . io / docs / <nl> Message framing ( vs . [ http2 - transport - mapping ] ( http : / / www . grpc . io / docs / guides / wire . html # http2 - transport - mapping ) ) <nl> <nl> 1 . Response status encoded as part of the response body <nl> - * Key - value pairs formatted as HTTP / 1 . 1 headers block ( without the empty <nl> - newline \ r \ n to terminate the block ) <nl> + * Key - value pairs encoded in the HTTP / 2 [ literal header format ] ( https : / / tools . ietf . org / html / rfc7541 # section - 6 . 2 ) as a single header block . <nl> 2 . 8th ( MSB ) bit of the 1st gRPC frame byte <nl> * 0 : data <nl> * 1 : trailers <nl>
Update PROTOCOL - WEB . md
grpc/grpc
fd825f51ac7c62cf5c9258d46aaee4695dae1d2e
2016-11-10T23:47:03Z
mmm a / hphp / hack / src / server / dune <nl> ppp b / hphp / hack / src / server / dune <nl> <nl> server_monitor <nl> shared_lru_stubs <nl> typechecker_options <nl> + typing_service_api <nl> + typing_service_api_stubs <nl> utils_core <nl> utils_www_root <nl> version ) <nl> <nl> shared_lru_stubs <nl> sys_utils <nl> typing <nl> + typing_service_api <nl> utils_core <nl> version <nl> watchman_utils <nl> mmm a / hphp / hack / src / server / serverEnv . ml <nl> ppp b / hphp / hack / src / server / serverEnv . ml <nl> type full_check_status = <nl> * ) <nl> type env = { <nl> naming_table : Naming_table . t ; <nl> + typing_service : typing_service ; <nl> tcopt : TypecheckerOptions . t ; <nl> popt : ParserOptions . t ; <nl> gleanopt : GleanOptions . t ; <nl> and dirty_deps = { <nl> clean_local_deps : Typing_deps . DepSet . t ; <nl> } <nl> <nl> + and typing_service = { <nl> + delegate_state : Typing_service_delegate . state ; [ @ opaque ] <nl> + enabled : bool ; <nl> + } <nl> + <nl> ( * When using prechecked files we split initial typechecking in two phases <nl> * ( dirty files and a subset of their fan - out ) . Other init types compute the <nl> * full fan - out up - front . * ) <nl> mmm a / hphp / hack / src / server / serverEnvBuild . ml <nl> ppp b / hphp / hack / src / server / serverEnvBuild . ml <nl> let make_env ? init_id config = <nl> popt = ServerConfig . parser_options config ; <nl> gleanopt = ServerConfig . glean_options config ; <nl> naming_table = Naming_table . empty ; <nl> + typing_service = <nl> + { delegate_state = Typing_service_delegate . create ( ) ; enabled = false } ; <nl> errorl = Errors . empty ; <nl> failed_naming = Relative_path . Set . empty ; <nl> persistent_client = None ; <nl>
Add typing service delegate to ServerEnv
facebook/hhvm
dca30d39ff8151789ec09f7ead780de8330a9335
2019-11-19T00:30:22Z
mmm a / docs / en / table_functions / numbers . md <nl> ppp b / docs / en / table_functions / numbers . md <nl> <nl> # numbers <nl> <nl> ` numbers ( N ) ` – Returns a table with the single ' number ' column ( UInt64 ) that contains integers from 0 to N - 1 . <nl> + ` numbers ( N , M ) ` - Returns a table with the single ' number ' column ( UInt64 ) that contains integers from N to ( N + M - 1 ) . <nl> <nl> - Similar to the ` system . numbers ` table , it can be used for testing and generating successive values . <nl> + Similar to the ` system . numbers ` table , it can be used for testing and generating successive values , ` numbers ( N , M ) ` more efficient than ` system . numbers ` . <nl> <nl> - The following two queries are equivalent : <nl> + The following queries are equivalent : <nl> <nl> ` ` ` sql <nl> SELECT * FROM numbers ( 10 ) ; <nl> + SELECT * FROM numbers ( 0 , 10 ) ; <nl> SELECT * FROM system . numbers LIMIT 10 ; <nl> ` ` ` <nl> <nl>
ISSUES - 2533 add numbers table function document
ClickHouse/ClickHouse
49d524244f9d56a438b8a9806476052a889acdf0
2018-06-25T18:10:35Z
mmm a / bindings / python / cntk / tests / onnx_model_test . py <nl> ppp b / bindings / python / cntk / tests / onnx_model_test . py <nl> <nl> skip_model_names = [ <nl> # Convolution Nan issue on Linux . <nl> ' shufflenet ' , <nl> + # Tests from onnx backend tests that currently fails . <nl> + ' test_constant ' , <nl> + ' test_edge_pad ' , <nl> + ' test_gru_defaults ' , <nl> + ' test_gru_seq_length ' , <nl> + ' test_gru_with_initial_bias ' , <nl> + ' test_lstm_defaults ' , <nl> + ' test_lstm_with_initial_bias ' , <nl> + ' test_lstm_with_peepholes ' , <nl> + ' test_max_example ' , <nl> + ' test_min_example ' , <nl> + ' test_reduce_log_sum ' , <nl> + ' test_reduce_log_sum_asc_axes ' , <nl> + ' test_reduce_log_sum_default ' , <nl> + ' test_reduce_log_sum_desc_axes ' , <nl> + ' test_reshape_extended_dims ' , <nl> + ' test_reshape_negative_dim ' , <nl> + ' test_reshape_one_dim ' , <nl> + ' test_reshape_reduced_dims ' , <nl> + ' test_reshape_reordered_dims ' , <nl> + ' test_rnn_seq_length ' , <nl> + ' test_shape ' , <nl> + ' test_shape_example ' , <nl> + ' test_simple_rnn_defaults ' , <nl> + ' test_simple_rnn_with_initial_bias ' , <nl> + ' test_size ' , <nl> + ' test_size_example ' , <nl> + ' test_slice_end_out_of_bounds ' , <nl> + ' test_slice_start_out_of_bounds ' , <nl> + ' test_split_equal_parts_1d ' , <nl> + ' test_split_equal_parts_2d ' , <nl> + ' test_split_equal_parts_default_axis ' , <nl> + ' test_split_variable_parts_1d ' , <nl> + ' test_split_variable_parts_2d ' , <nl> + ' test_split_variable_parts_default_axis ' , <nl> + ' test_sum_one_input ' , <nl> + ' test_thresholdedrelu ' , <nl> + ' test_thresholdedrelu_default ' , <nl> + ' test_thresholdedrelu_example ' , <nl> + ' test_tile ' , <nl> + ' test_tile_precomputed ' , <nl> + ' test_top_k ' , <nl> + ' test_transpose_default ' , <nl> + ' test_upsample_nearest ' , <nl> ] <nl> <nl> skip_round_trip_model_names = [ <nl> # Convolution Nan issue on Linux . <nl> ' shufflenet ' , <nl> + # Tests from onnx backend tests that currently fails . <nl> + ' test_constant ' , <nl> + ' test_edge_pad ' , <nl> + ' test_gru_defaults ' , <nl> + ' test_gru_seq_length ' , <nl> + ' test_gru_with_initial_bias ' , <nl> + ' test_lstm_defaults ' , <nl> + ' test_lstm_with_initial_bias ' , <nl> + ' test_lstm_with_peepholes ' , <nl> + ' test_max_example ' , <nl> + ' test_min_example ' , <nl> + ' test_reduce_log_sum ' , <nl> + ' test_reduce_log_sum_asc_axes ' , <nl> + ' test_reduce_log_sum_default ' , <nl> + ' test_reduce_log_sum_desc_axes ' , <nl> + ' test_reshape_extended_dims ' , <nl> + ' test_reshape_negative_dim ' , <nl> + ' test_reshape_one_dim ' , <nl> + ' test_reshape_reduced_dims ' , <nl> + ' test_reshape_reordered_dims ' , <nl> + ' test_rnn_seq_length ' , <nl> + ' test_shape ' , <nl> + ' test_shape_example ' , <nl> + ' test_simple_rnn_defaults ' , <nl> + ' test_simple_rnn_with_initial_bias ' , <nl> + ' test_size ' , <nl> + ' test_size_example ' , <nl> + ' test_slice ' , <nl> + ' test_slice_default_axes ' , <nl> + ' test_slice_end_out_of_bounds ' , <nl> + ' test_slice_start_out_of_bounds ' , <nl> + ' test_split_equal_parts_1d ' , <nl> + ' test_split_equal_parts_2d ' , <nl> + ' test_split_equal_parts_default_axis ' , <nl> + ' test_split_variable_parts_1d ' , <nl> + ' test_split_variable_parts_2d ' , <nl> + ' test_split_variable_parts_default_axis ' , <nl> + ' test_sum_one_input ' , <nl> + ' test_thresholdedrelu ' , <nl> + ' test_thresholdedrelu_default ' , <nl> + ' test_thresholdedrelu_example ' , <nl> + ' test_tile ' , <nl> + ' test_tile_precomputed ' , <nl> + ' test_top_k ' , <nl> + ' test_transpose_default ' , <nl> + ' test_upsample_nearest ' , <nl> ] <nl> <nl> @ pytest . mark . parametrize ( ' model_name , round_trip ' , <nl> def test_onnx_model ( model_name , round_trip ) : <nl> cntk_input = { model . arguments [ i ] : inputs [ i ] for i in range ( len ( inputs ) ) } <nl> cntk_res = [ model . eval ( cntk_input ) ] <nl> <nl> + if ref_outputs [ 0 ] . dtype = = np . bool : <nl> + cntk_res = [ cntk_res [ 0 ] . astype ( " bool " ) ] <nl> + <nl> outputs = list ( cntk_res ) <nl> <nl> np . testing . assert_equal ( len ( ref_outputs ) , len ( outputs ) ) <nl>
update onnx_model_test with tests from onnx backend test
microsoft/CNTK
0754b38e34f8f4431dac8926c2816531b11624ac
2018-09-09T20:53:26Z