diff
stringlengths
41
2.03M
msg
stringlengths
1
1.5k
repo
stringlengths
5
40
sha
stringlengths
40
40
time
stringlengths
20
20
mmm a / . gitignore <nl> ppp b / . gitignore <nl> cmake_build / <nl> / cmake - 3 . 7 . 2 - win64 - x64 . zip <nl> / 3 . 3 . 2 . zip <nl> / Clients / Python / * * / cloud . txt <nl> + / Clients / Python / * * / cloud . asc <nl> / Unreal / Plugins / AirSim / Content / VehicleAdv / SUV / <nl> / suv_download_tmp <nl> car_assets . zip <nl> mmm a / AirLib / include / vehicles / multirotor / api / MultirotorApiBase . hpp <nl> ppp b / AirLib / include / vehicles / multirotor / api / MultirotorApiBase . hpp <nl> class MultirotorApiBase : public VehicleApiBase { <nl> unused ( environment ) ; <nl> } <nl> <nl> + virtual void reset ( ) override ; <nl> + <nl> + <nl> public : / / these APIs uses above low level APIs <nl> virtual ~ MultirotorApiBase ( ) = default ; <nl> <nl> mmm a / AirLib / include / vehicles / multirotor / firmwares / simple_flight / firmware / Firmware . hpp <nl> ppp b / AirLib / include / vehicles / multirotor / firmwares / simple_flight / firmware / Firmware . hpp <nl> class Firmware : public IFirmware { <nl> controller_ = std : : unique_ptr < AdaptiveController > ( new AdaptiveController ( ) ) ; <nl> break ; <nl> default : <nl> - throw std : : invalid_argument ( " Cannot regonize controller specified by params - > controller_type " ) ; <nl> + throw std : : invalid_argument ( " Cannot recognize controller specified by params - > controller_type " ) ; <nl> } <nl> <nl> <nl> mmm a / AirLib / include / vehicles / multirotor / firmwares / simple_flight / firmware / OffboardApi . hpp <nl> ppp b / AirLib / include / vehicles / multirotor / firmwares / simple_flight / firmware / OffboardApi . hpp <nl> class OffboardApi : <nl> rc_ . reset ( ) ; <nl> has_api_control_ = false ; <nl> landed_ = true ; <nl> - goal_timestamp_ = 0 ; <nl> + takenoff_ = false ; <nl> + goal_timestamp_ = clock_ - > millis ( ) ; <nl> updateGoalFromRc ( ) ; <nl> } <nl> <nl> class OffboardApi : <nl> if ( ! has_api_control_ ) <nl> updateGoalFromRc ( ) ; <nl> else { <nl> - if ( clock_ - > millis ( ) - goal_timestamp_ > params_ - > api_goal_timeout ) { <nl> + if ( takenoff_ & & <nl> + ( clock_ - > millis ( ) - goal_timestamp_ > params_ - > api_goal_timeout ) ) { <nl> if ( ! is_api_timedout_ ) { <nl> comm_link_ - > log ( " API call was not received , entering hover mode for safety " ) ; <nl> goal_mode_ = GoalMode : : getPositionMode ( ) ; <nl> class OffboardApi : <nl> / / else leave the goal set by IOffboardApi API <nl> <nl> detectLanding ( ) ; <nl> + detectTakingOff ( ) ; <nl> } <nl> <nl> / * * * * * * * * * * * * * * * * IOffboardApi * * * * * * * * * * * * * * * * * * * * / <nl> class OffboardApi : <nl> void detectLanding ( ) { <nl> <nl> / / if we are not trying to move by setting motor outputs <nl> - if ( isAlmostZero ( goal_ . roll ( ) ) & & isAlmostZero ( goal_ . pitch ( ) ) & & isAlmostZero ( goal_ . yaw ( ) ) & & isGreaterThanMinThrottle ( goal_ . throttle ( ) ) ) <nl> + if ( takenoff_ ) <nl> { <nl> - / / and we are not currently moving ( based on current velocities ) <nl> - auto angular = state_estimator_ - > getAngularVelocity ( ) ; <nl> - auto velocity = state_estimator_ - > getLinearVelocity ( ) ; <nl> - if ( isAlmostZero ( angular . roll ( ) ) & & isAlmostZero ( angular . pitch ( ) ) & & isAlmostZero ( angular . yaw ( ) ) & & <nl> - isAlmostZero ( velocity . roll ( ) ) & & isAlmostZero ( velocity . pitch ( ) ) & & isAlmostZero ( velocity . yaw ( ) ) ) { <nl> - / / then we must be landed . . . <nl> - landed_ = true ; <nl> - return ; <nl> + if ( ! isGreaterThanArmedThrottle ( goal_ . throttle ( ) ) ) { <nl> + / / and we are not currently moving ( based on current velocities ) <nl> + auto angular = state_estimator_ - > getAngularVelocity ( ) ; <nl> + auto velocity = state_estimator_ - > getLinearVelocity ( ) ; <nl> + if ( isAlmostZero ( angular . roll ( ) ) & & isAlmostZero ( angular . pitch ( ) ) & & isAlmostZero ( angular . yaw ( ) ) & & <nl> + isAlmostZero ( velocity . x ( ) ) & & isAlmostZero ( velocity . y ( ) ) & & isAlmostZero ( velocity . z ( ) ) ) { <nl> + / / then we must be landed . . . <nl> + landed_ = true ; <nl> + takenoff_ = false ; <nl> + } <nl> } <nl> } <nl> + } <nl> + <nl> + void detectTakingOff ( ) <nl> + { <nl> + / / if we are not trying to move by setting motor outputs <nl> + if ( ! takenoff_ ) <nl> + { <nl> + / / TODO : better handling of landed & takenoff states <nl> + if ( isGreaterThanArmedThrottle ( goal_ . throttle ( ) ) & & <nl> + std : : abs ( state_estimator_ - > getLinearVelocity ( ) . z ( ) ) > 0 . 01f ) { <nl> + takenoff_ = true ; <nl> + landed_ = false ; <nl> + } <nl> <nl> - landed_ = false ; <nl> + } <nl> } <nl> <nl> bool isAlmostZero ( float v ) { <nl> return std : : abs ( v ) < kMovementTolerance ; <nl> } <nl> - bool isGreaterThanMinThrottle ( float throttle ) { <nl> - return std : : abs ( throttle ) < = std : : abs ( params_ - > rc . min_angling_throttle ) ; <nl> + bool isGreaterThanArmedThrottle ( float throttle ) { <nl> + return throttle > params_ - > min_armed_throttle ( ) ; <nl> } <nl> <nl> private : <nl> class OffboardApi : <nl> <nl> bool has_api_control_ ; <nl> bool is_api_timedout_ ; <nl> - bool landed_ ; <nl> + bool landed_ , takenoff_ ; <nl> } ; <nl> <nl> <nl> mmm a / AirLib / src / vehicles / multirotor / api / MultirotorApiBase . cpp <nl> ppp b / AirLib / src / vehicles / multirotor / api / MultirotorApiBase . cpp <nl> <nl> <nl> namespace msr { namespace airlib { <nl> <nl> + void MultirotorApiBase : : reset ( ) <nl> + { <nl> + cancelLastTask ( ) ; <nl> + SingleTaskCall lock ( this ) ; / / cancel previous tasks <nl> + <nl> + VehicleApiBase : : reset ( ) ; <nl> + } <nl> <nl> bool MultirotorApiBase : : takeoff ( float timeout_sec ) <nl> { <nl> mmm a / Clients / Python / PythonClient . pyproj <nl> ppp b / Clients / Python / PythonClient . pyproj <nl> <nl> < SchemaVersion > 2 . 0 < / SchemaVersion > <nl> < ProjectGuid > e2049e20 - b6dd - 474e - 8bca - 1c8dc54725aa < / ProjectGuid > <nl> < ProjectHome > . < / ProjectHome > <nl> - < StartupFile > samples \ multirotor \ orbit . py < / StartupFile > <nl> + < StartupFile > samples \ car \ pause_continue_car . py < / StartupFile > <nl> < SearchPath > <nl> < / SearchPath > <nl> < WorkingDirectory > . < / WorkingDirectory > <nl> <nl> < Compile Include = " samples \ computer_vision \ getpos . py " / > <nl> < Compile Include = " samples \ computer_vision \ setup_path . py " / > <nl> < Compile Include = " samples \ multirotor \ land . py " / > <nl> - < Compile Include = " samples \ general \ pause_continue_car . py " > <nl> + < Compile Include = " samples \ car \ pause_continue_car . py " > <nl> < SubType > Code < / SubType > <nl> < / Compile > <nl> - < Compile Include = " samples \ general \ clock_speed . py " > <nl> + < Compile Include = " samples \ multirotor \ clock_speed . py " > <nl> < SubType > Code < / SubType > <nl> < / Compile > <nl> - < Compile Include = " samples \ general \ manual_mode_demo . py " > <nl> + < Compile Include = " samples \ multirotor \ manual_mode_demo . py " > <nl> < SubType > Code < / SubType > <nl> < / Compile > <nl> < Compile Include = " samples \ computer_vision \ objects . py " > <nl> <nl> < Compile Include = " samples \ multirotor \ navigate . py " > <nl> < SubType > Code < / SubType > <nl> < / Compile > <nl> - < Compile Include = " samples \ general \ pfm . py " / > <nl> + < Compile Include = " airsim \ pfm . py " / > <nl> < Compile Include = " samples \ car \ car_collision . py " / > <nl> < Compile Include = " samples \ car \ car_monitor . py " / > <nl> < Compile Include = " samples \ car \ car_stress_test . py " / > <nl> <nl> < Folder Include = " samples \ " / > <nl> < Folder Include = " samples \ car \ " / > <nl> < Folder Include = " samples \ computer_vision \ " / > <nl> - < Folder Include = " samples \ general \ " / > <nl> < Folder Include = " samples \ multirotor \ " / > <nl> < / ItemGroup > <nl> < ItemGroup > <nl> similarity index 100 % <nl> rename from Clients / Python / samples / general / pfm . py <nl> rename to Clients / Python / airsim / pfm . py <nl> similarity index 84 % <nl> rename from Clients / Python / samples / general / pause_continue_car . py <nl> rename to Clients / Python / samples / car / pause_continue_car . py <nl> mmm a / Clients / Python / samples / general / pause_continue_car . py <nl> ppp b / Clients / Python / samples / car / pause_continue_car . py <nl> <nl> - from AirSimClient import * <nl> + import setup_path <nl> + import airsim <nl> + <nl> + import time <nl> <nl> # connect to the AirSim simulator <nl> - client = CarClient ( ) <nl> + client = airsim . CarClient ( ) <nl> client . confirmConnection ( ) <nl> client . enableApiControl ( True ) <nl> <nl> - car_controls = CarControls ( ) <nl> + car_controls = airsim . CarControls ( ) <nl> <nl> for i in range ( 1 , 6 ) : <nl> print ( " Starting command " ) <nl> mmm a / Clients / Python / samples / multirotor / box . py <nl> ppp b / Clients / Python / samples / multirotor / box . py <nl> <nl> speed = 1 <nl> delay = duration * speed <nl> <nl> - # using DrivetrainType . MaxDegreeOfFreedom means we can control the drone yaw independently <nl> + # using airsim . DrivetrainType . MaxDegreeOfFreedom means we can control the drone yaw independently <nl> # from the direction the drone is flying . I ' ve set values here that make the drone always point inwards <nl> # towards the inside of the box ( which would be handy if you are building a 3d scan of an object in the real world ) . <nl> vx = speed <nl> new file mode 100644 <nl> index 000000000 . . ee4f981be <nl> mmm / dev / null <nl> ppp b / Clients / Python / samples / multirotor / clock_speed . py <nl> <nl> + import setup_path <nl> + import airsim <nl> + <nl> + import time <nl> + <nl> + # change clock speed in settings . json <nl> + # " ClockSpeed " : 0 . 5 <nl> + <nl> + # connect to the AirSim simulator <nl> + client = airsim . MultirotorClient ( ) <nl> + client . confirmConnection ( ) <nl> + client . enableApiControl ( True ) <nl> + client . armDisarm ( True ) <nl> + <nl> + client . moveByVelocityZAsync ( 0 , 0 , - 2 , 3 ) . join ( ) <nl> + <nl> + <nl> + while True : <nl> + client . moveByVelocityZAsync ( 5 , 5 , - 2 , 1 ) . join ( ) <nl> + time . sleep ( 10 ) <nl> + <nl> + client . armDisarm ( False ) <nl> + client . reset ( ) <nl> + <nl> + # that ' s enough fun for now . let ' s quit cleanly <nl> + client . enableApiControl ( False ) <nl> similarity index 58 % <nl> rename from Clients / Python / samples / general / manual_mode_demo . py <nl> rename to Clients / Python / samples / multirotor / manual_mode_demo . py <nl> mmm a / Clients / Python / samples / general / manual_mode_demo . py <nl> ppp b / Clients / Python / samples / multirotor / manual_mode_demo . py <nl> <nl> " " " <nl> For connecting to the AirSim drone environment and testing API functionality <nl> " " " <nl> + import setup_path <nl> + import airsim <nl> <nl> import os <nl> import tempfile <nl> import pprint <nl> <nl> - from AirSimClient import * <nl> - <nl> - <nl> # connect to the AirSim simulator <nl> client = airsim . MultirotorClient ( ) <nl> client . confirmConnection ( ) <nl> <nl> s = pprint . pformat ( state ) <nl> print ( " state : % s " % s ) <nl> <nl> - client . moveByManual ( vx_max = 1E6 , vy_max = 1E6 , z_min = - 1E6 , duration = 1E10 ) <nl> + client . moveByManualAsync ( vx_max = 1E6 , vy_max = 1E6 , z_min = - 1E6 , duration = 1E10 ) <nl> airsim . wait_key ( ' Manual mode is setup . Press any key to send RC data to takeoff ' ) <nl> <nl> - client . setRCData ( rcdata = RCData ( pitch = 0 . 0 , throttle = 1 . 0 , is_initialized = True , is_valid = True ) ) <nl> + client . moveByRC ( rcdata = airsim . RCData ( pitch = 0 . 0 , throttle = 1 . 0 , is_initialized = True , is_valid = True ) ) <nl> <nl> airsim . wait_key ( ' Set Yaw and pitch to 0 . 5 ' ) <nl> <nl> - client . setRCData ( rcdata = RCData ( roll = 0 . 5 , throttle = 1 . 0 , yaw = 0 . 5 , is_initialized = True , is_valid = True ) ) <nl> + client . moveByRC ( rcdata = airsim . RCData ( roll = 0 . 5 , throttle = 1 . 0 , yaw = 0 . 5 , is_initialized = True , is_valid = True ) ) <nl> mmm a / Clients / Python / samples / multirotor / path . py <nl> ppp b / Clients / Python / samples / multirotor / path . py <nl> <nl> - from AirSimClient import * <nl> + import setup_path <nl> + import airsim <nl> + <nl> import sys <nl> import time <nl> <nl> <nl> landed = client . getMultirotorState ( ) . landed_state <nl> if landed = = airsim . LandedState . Landed : <nl> print ( " taking off . . . " ) <nl> - x = client . takeoffAsync ( ) . join ( ) <nl> - if not x : <nl> - print ( " take off failed " ) <nl> - client . armDisarm ( False ) <nl> - client . enableApiControl ( False ) <nl> + client . takeoffAsync ( ) . join ( ) <nl> else : <nl> client . hoverAsync ( ) . join ( ) <nl> <nl> <nl> # see https : / / github . com / Microsoft / AirSim / wiki / moveOnPath - demo <nl> <nl> # this method is async and we are not waiting for the result since we are passing timeout_sec = 0 . <nl> - result = client . moveOnPath ( [ airsim . Vector3r ( 0 , - 253 , z ) , airsim . Vector3r ( 125 , - 253 , z ) , airsim . Vector3r ( 125 , 0 , z ) , airsim . Vector3r ( 0 , 0 , z ) , airsim . Vector3r ( 0 , 0 , - 20 ) ] , <nl> + result = client . moveOnPathAsync ( [ airsim . Vector3r ( 0 , - 253 , z ) , airsim . Vector3r ( 125 , - 253 , z ) , airsim . Vector3r ( 125 , 0 , z ) , airsim . Vector3r ( 0 , 0 , z ) , airsim . Vector3r ( 0 , 0 , - 20 ) ] , <nl> 12 , 120 , <nl> - DrivetrainType . ForwardOnly , airsim . YawMode ( False , 0 ) , 20 , 1 ) <nl> + airsim . DrivetrainType . ForwardOnly , airsim . YawMode ( False , 0 ) , 20 , 1 ) . join ( ) <nl> client . moveToPositionAsync ( 0 , 0 , z , 1 ) . join ( ) <nl> client . land ( ) <nl> client . armDisarm ( False ) <nl> mmm a / Clients / Python / samples / multirotor / pause_continue_drone . py <nl> ppp b / Clients / Python / samples / multirotor / pause_continue_drone . py <nl> <nl> - from AirSimClient import * <nl> + import setup_path <nl> + import airsim <nl> + <nl> + import time <nl> <nl> # connect to the AirSim simulator <nl> client = airsim . MultirotorClient ( ) <nl> <nl> <nl> for i in range ( 1 , 6 ) : <nl> print ( " Starting command to run for 15sec " ) <nl> - client . moveByVelocityZAsync ( - 1 * i , - 1 * i , - 20 - i , 15 ) . join ( ) <nl> + client . moveByVelocityZAsync ( - 1 * i , - 1 * i , - 20 - i , 15 ) <nl> time . sleep ( 5 ) # run <nl> print ( " Pausing after 5sec " ) <nl> client . simPause ( True ) <nl> mmm a / Clients / Python / samples / multirotor / point_cloud . py <nl> ppp b / Clients / Python / samples / multirotor / point_cloud . py <nl> def savePointCloud ( image , fileName ) : <nl> rawImage = client . simGetImage ( " 0 " , airsim . ImageType . DepthPerspective ) <nl> if ( rawImage is None ) : <nl> print ( " Camera is not returning image , please check airsim for error messages " ) <nl> + airsim . wait_key ( " Press any key to exit " ) <nl> sys . exit ( 0 ) <nl> else : <nl> png = cv2 . imdecode ( np . frombuffer ( rawImage , np . uint8 ) , cv2 . IMREAD_UNCHANGED ) <nl> def savePointCloud ( image , fileName ) : <nl> Image3D = cv2 . reprojectImageTo3D ( gray , projectionMatrix ) <nl> savePointCloud ( Image3D , outputFile ) <nl> print ( " saved " + outputFile ) <nl> + airsim . wait_key ( " Press any key to exit " ) <nl> sys . exit ( 0 ) <nl> <nl> key = cv2 . waitKey ( 1 ) & 0xFF ; <nl> mmm a / Clients / Python / samples / multirotor / reset_test_drone . py <nl> ppp b / Clients / Python / samples / multirotor / reset_test_drone . py <nl> <nl> - from AirSimClient import * <nl> + import setup_path <nl> + import airsim <nl> <nl> + import time <nl> <nl> # connect to the AirSim simulator <nl> client = airsim . MultirotorClient ( ) <nl> <nl> <nl> print ( " fly " ) <nl> client . moveToPositionAsync ( 0 , 0 , - 10 , 5 ) . join ( ) <nl> - time . sleep ( 5 ) # let car drive a bit <nl> <nl> print ( " reset " ) <nl> client . reset ( ) <nl> client . enableApiControl ( True ) <nl> client . armDisarm ( True ) <nl> - time . sleep ( 5 ) # let car drive a bit <nl> - <nl> + time . sleep ( 5 ) <nl> + print ( " done " ) <nl> <nl> print ( " fly " ) <nl> client . moveToPositionAsync ( 0 , 0 , - 10 , 5 ) . join ( ) <nl> - time . sleep ( 5 ) # let car drive a bit <nl> \ No newline at end of file <nl> mmm a / Clients / Python / samples / multirotor / survey . py <nl> ppp b / Clients / Python / samples / multirotor / survey . py <nl> <nl> - from AirSimClient import * <nl> + import setup_path <nl> + import airsim <nl> + <nl> import sys <nl> import time <nl> import argparse <nl> def start ( self ) : <nl> trip_time = distance / self . velocity <nl> print ( " estimated survey time is " + str ( trip_time ) ) <nl> try : <nl> - result = self . client . moveOnPath ( path , self . velocity , trip_time , airsim . DrivetrainType . ForwardOnly , airsim . YawMode ( True , 0 ) , self . velocity + ( self . velocity / 2 ) , 1 ) <nl> + result = self . client . moveOnPathAsync ( path , self . velocity , trip_time , airsim . DrivetrainType . ForwardOnly , <nl> + airsim . YawMode ( True , 0 ) , self . velocity + ( self . velocity / 2 ) , 1 ) . join ( ) <nl> except : <nl> errorType , value , traceback = sys . exc_info ( ) <nl> print ( " moveOnPath threw exception : " + str ( value ) ) <nl> def start ( self ) : <nl> self . client . moveToPositionAsync ( 0 , 0 , - 5 , 2 ) . join ( ) <nl> <nl> print ( " landing . . . " ) <nl> - self . client . land ( ) <nl> + self . client . landAsync ( ) . join ( ) <nl> <nl> print ( " disarming . " ) <nl> self . client . armDisarm ( False ) <nl> mmm a / Clients / Python / samples / multirotor / takeoff . py <nl> ppp b / Clients / Python / samples / multirotor / takeoff . py <nl> <nl> - from AirSimClient import * <nl> + import setup_path <nl> + import airsim <nl> <nl> client = airsim . MultirotorClient ( ) <nl> client . confirmConnection ( ) <nl> mmm a / Unreal / Plugins / AirSim / Source / AirSimGameMode . cpp <nl> ppp b / Unreal / Plugins / AirSim / Source / AirSimGameMode . cpp <nl> <nl> # include " AirBlueprintLib . h " <nl> <nl> <nl> - <nl> class AUnrealLog : public msr : : airlib : : Utils : : Logger <nl> { <nl> public : <nl>
All scripts tested
microsoft/AirSim
43e8bc6cb9a8beece3b710b483845b540657f3e8
2018-06-17T11:19:13Z
mmm a / modules / core / src / ocl . cpp <nl> ppp b / modules / core / src / ocl . cpp <nl> bool useOpenCL ( ) <nl> { <nl> CoreTLSData * data = coreTlsData . get ( ) ; <nl> if ( data - > useOpenCL < 0 ) <nl> - data - > useOpenCL = ( int ) haveOpenCL ( ) & & Device : : getDefault ( ) . ptr ( ) ! = NULL ; <nl> + { <nl> + try <nl> + { <nl> + data - > useOpenCL = ( int ) haveOpenCL ( ) & & Device : : getDefault ( ) . ptr ( ) ! = NULL ; <nl> + } <nl> + catch ( . . . ) <nl> + { <nl> + data - > useOpenCL = 0 ; <nl> + } <nl> + } <nl> return data - > useOpenCL > 0 ; <nl> } <nl> <nl> mmm a / modules / highgui / src / cap_qtkit . mm <nl> ppp b / modules / highgui / src / cap_qtkit . mm <nl> - ( IplImage * ) getOutput ; <nl> QTFormatDescription * format = [ [ connections objectAtIndex : 0 ] formatDescription ] ; <nl> NSSize s1 = [ [ format attributeForKey : QTFormatDescriptionVideoCleanApertureDisplaySizeAttribute ] sizeValue ] ; <nl> <nl> - int width = s1 . width , height = s1 . height ; <nl> switch ( property_id ) { <nl> case CV_CAP_PROP_FRAME_WIDTH : <nl> - retval = width ; <nl> + retval = s1 . width ; <nl> break ; <nl> case CV_CAP_PROP_FRAME_HEIGHT : <nl> - retval = height ; <nl> + retval = s1 . height ; <nl> break ; <nl> default : <nl> retval = 0 ; <nl> - ( int ) updateImage { <nl> cvCvtColor ( image , argbimage , CV_BGR2BGRA ) ; <nl> <nl> <nl> - unsigned char * imagedata = ( unsigned char * ) argbimage - > imageData ; <nl> + unsigned char * imagedata_ = ( unsigned char * ) argbimage - > imageData ; <nl> / / BGRA - - > ARGB <nl> <nl> for ( int j = 0 ; j < argbimage - > height ; j + + ) { <nl> int rowstart = argbimage - > widthStep * j ; <nl> for ( int i = rowstart ; i < rowstart + argbimage - > widthStep ; i + = 4 ) { <nl> - unsigned char temp = imagedata [ i ] ; <nl> - imagedata [ i ] = 255 ; <nl> - imagedata [ i + 3 ] = temp ; <nl> - temp = imagedata [ i + 2 ] ; <nl> - imagedata [ i + 2 ] = imagedata [ i + 1 ] ; <nl> - imagedata [ i + 1 ] = temp ; <nl> + unsigned char temp = imagedata_ [ i ] ; <nl> + imagedata_ [ i ] = 255 ; <nl> + imagedata_ [ i + 3 ] = temp ; <nl> + temp = imagedata_ [ i + 2 ] ; <nl> + imagedata_ [ i + 2 ] = imagedata_ [ i + 1 ] ; <nl> + imagedata_ [ i + 1 ] = temp ; <nl> } <nl> } <nl> <nl> - NSBitmapImageRep * imageRep = [ [ NSBitmapImageRep alloc ] initWithBitmapDataPlanes : & imagedata <nl> + NSBitmapImageRep * imageRep = [ [ NSBitmapImageRep alloc ] initWithBitmapDataPlanes : & imagedata_ <nl> pixelsWide : movieSize . width <nl> pixelsHigh : movieSize . height <nl> bitsPerSample : 8 <nl>
Merge pull request from alalek : mac_fix_master
opencv/opencv
d183554600dca2cc8a1a2ba83c256c35dd832607
2014-07-03T09:26:52Z
mmm a / bindings / python / doc / setup . rst <nl> ppp b / bindings / python / doc / setup . rst <nl> You have the choice of installing CNTK from binary distributions or from <nl> the GitHub sources for both * Windows * and * Linux * environment with <nl> optional support for Nvidia GPU . <nl> <nl> - Please follow ` these instructions < https : / / github . com / Microsoft / CNTK / wiki / Recommended - CNTK - 2 . 0 - Setup > ` __ <nl> + Please follow ` these instructions < https : / / github . com / Microsoft / CNTK / wiki / Setup - CNTK - on - your - machine > ` __ <nl> mmm a / bindings / python / tutorials / CNTK_101_LogisticRegression . ipynb <nl> ppp b / bindings / python / tutorials / CNTK_101_LogisticRegression . ipynb <nl> <nl> " \ n " , <nl> " This tutorial is targeted to individuals who are new to CNTK and to machine learning . In this tutorial , you will train a simple yet powerful machine learning model that is widely used in industry for a variety of applications . The model trained below scales to massive data sets in the most expeditious manner by harnessing computational scalability leveraging the computational resources you may have ( one or more CPU cores , one or more GPUs , a cluster of CPUs or a cluster of GPUs ) , transparently via the CNTK library . \ n " , <nl> " \ n " , <nl> - " The following notebook users Python APIs . If you are looking for this example in Brainscript , please look [ here ] ( https : / / github . com / Microsoft / CNTK / tree / master / Examples / Tutorials / LogisticRegressionAndMultiClass ) . \ n " , <nl> + " The following notebook users Python APIs . If you are looking for this example in Brainscript , please look [ here ] ( https : / / github . com / Microsoft / CNTK / tree / v2 . 0 . beta1 . 0 / Examples / Tutorials / LogisticRegressionAndMultiClass ) . \ n " , <nl> " \ n " , <nl> " # # Introduction \ n " , <nl> " \ n " , <nl> mmm a / bindings / python / tutorials / CNTK_102_FeedForward . ipynb <nl> ppp b / bindings / python / tutorials / CNTK_102_FeedForward . ipynb <nl> <nl> " \ n " , <nl> " If you want to try running the tutorial from python command prompt . Please run the [ FeedForwardNet . py ] [ ] example . \ n " , <nl> " \ n " , <nl> - " [ FeedForwardNet . py ] : https : / / github . com / Microsoft / CNTK / blob / master / bindings / python / examples / NumpyInterop / FeedForwardNet . py " <nl> + " [ FeedForwardNet . py ] : https : / / github . com / Microsoft / CNTK / blob / v2 . 0 . beta1 . 0 / bindings / python / examples / NumpyInterop / FeedForwardNet . py " <nl> ] <nl> } , <nl> { <nl> mmm a / bindings / python / tutorials / CNTK_103A_MNIST_DataLoader . ipynb <nl> ppp b / bindings / python / tutorials / CNTK_103A_MNIST_DataLoader . ipynb <nl> <nl> " \ n " , <nl> " CNTK 103 tutorial is divided into two parts : \ n " , <nl> " - Part A : Familiarize with the [ MNIST ] [ ] database that will be used later in the tutorial \ n " , <nl> - " - [ Part B ] ( https : / / github . com / Microsoft / CNTK / blob / master / bindings / python / tutorials / CNTK_103A_MNIST_DataLoader . ipynb ) : We will use the feedforward classifier used in CNTK 102 to classify digits in MNIST data set . \ n " , <nl> + " - [ Part B ] ( https : / / github . com / Microsoft / CNTK / blob / v2 . 0 . beta1 . 0 / bindings / python / tutorials / CNTK_103A_MNIST_DataLoader . ipynb ) : We will use the feedforward classifier used in CNTK 102 to classify digits in MNIST data set . \ n " , <nl> " \ n " , <nl> " [ MNIST ] : http : / / yann . lecun . com / exdb / mnist / \ n " , <nl> " \ n " <nl> mmm a / bindings / python / tutorials / CNTK_103B_MNIST_FeedForwardNetwork . ipynb <nl> ppp b / bindings / python / tutorials / CNTK_103B_MNIST_FeedForwardNetwork . ipynb <nl> <nl> " \ n " , <nl> " We assume that you have successfully completed CNTK 103 Part A . \ n " , <nl> " \ n " , <nl> - " In this tutorial we will train a fully connected network on MNIST data . This notebook provides the recipe using Python APIs . If you are looking for this example in Brainscript , please look [ here ] ( https : / / github . com / Microsoft / CNTK / tree / master / Examples / Image / GettingStarted ) \ n " , <nl> + " In this tutorial we will train a fully connected network on MNIST data . This notebook provides the recipe using Python APIs . If you are looking for this example in Brainscript , please look [ here ] ( https : / / github . com / Microsoft / CNTK / tree / v2 . 0 . beta1 . 0 / Examples / Image / GettingStarted ) \ n " , <nl> " \ n " , <nl> " # # Introduction \ n " , <nl> " \ n " , <nl> <nl> " source " : [ <nl> " # # # # Code link \ n " , <nl> " \ n " , <nl> - " If you want to try running the tutorial from python command prompt . Please run the [ SimpleMNIST . py ] ( https : / / github . com / Microsoft / CNTK / tree / master / bindings / python / examples / MNIST ) example . " <nl> + " If you want to try running the tutorial from python command prompt . Please run the [ SimpleMNIST . py ] ( https : / / github . com / Microsoft / CNTK / tree / v2 . 0 . beta1 . 0 / bindings / python / examples / MNIST ) example . " <nl> ] <nl> } , <nl> { <nl>
bindings / python : update some links
microsoft/CNTK
0b014e7053c9df6a3f3e9aab10cf1b127c7b955e
2016-10-25T12:07:14Z
mmm a / src / mongo / dbtests / updatetests . cpp <nl> ppp b / src / mongo / dbtests / updatetests . cpp <nl> namespace UpdateTests { <nl> auto_ptr < ModSetState > modSetState = modSet . prepare ( obj ) ; <nl> ASSERT_FALSE ( modSetState - > canApplyInPlace ( ) ) ; <nl> modSetState - > createNewFromMods ( ) ; <nl> - / / This is incorrectly logged as { $ set : { ' a . b ' : [ 1 ] } , $ unset : { ' a . c ' : 1 } } . <nl> ASSERT_EQUALS ( fromjson ( " { $ set : { ' a . b ' : [ 1 ] } , $ set : { ' a . c ' : [ 1 ] } } " ) , <nl> modSetState - > getOpLogRewrite ( ) ) ; <nl> } <nl>
SERVER - 7371 Remove old comment .
mongodb/mongo
f2ebdd6197a417692a209db2691b540bc2235ced
2012-10-16T21:27:30Z
mmm a / platform / windows / key_mapping_windows . cpp <nl> ppp b / platform / windows / key_mapping_windows . cpp <nl> static _WinTranslatePair _vk_to_keycode [ ] = { <nl> <nl> { KEY_MASK_META , VK_LWIN } , / / ( 0x5B ) <nl> { KEY_MASK_META , VK_RWIN } , / / ( 0x5C ) <nl> - / / VK_APPS ( 0x5D ) <nl> + { KEY_MENU , VK_APPS } , / / ( 0x5D ) <nl> { KEY_STANDBY , VK_SLEEP } , / / ( 0x5F ) <nl> { KEY_KP_0 , VK_NUMPAD0 } , / / ( 0x60 ) <nl> { KEY_KP_1 , VK_NUMPAD1 } , / / ( 0x61 ) <nl>
Merge pull request from EricEzaM / fix - menu - key - windows
godotengine/godot
e45735ec4afb4540cdd5f8e8cdcefa38b9184df1
2020-05-08T09:24:05Z
mmm a / modules / ocl / src / hog . cpp <nl> ppp b / modules / ocl / src / hog . cpp <nl> namespace cv <nl> int cdescr_width ; <nl> int cdescr_height ; <nl> <nl> + / / A shift value and type that allows qangle to be different <nl> + / / sizes on different hardware <nl> + int qangle_step_shift ; <nl> + int qangle_type ; <nl> + <nl> void set_up_constants ( int nbins , int block_stride_x , int block_stride_y , <nl> int nblocks_win_x , int nblocks_win_y ) ; <nl> <nl> cv : : ocl : : HOGDescriptor : : HOGDescriptor ( Size win_size_ , Size block_size_ , Size blo <nl> hog_device_cpu = true ; <nl> else <nl> hog_device_cpu = false ; <nl> + <nl> } <nl> <nl> size_t cv : : ocl : : HOGDescriptor : : getDescriptorSize ( ) const <nl> void cv : : ocl : : HOGDescriptor : : init_buffer ( const oclMat & img , Size win_stride ) <nl> effect_size = img . size ( ) ; <nl> <nl> grad . create ( img . size ( ) , CV_32FC2 ) ; <nl> - qangle . create ( img . size ( ) , CV_8UC2 ) ; <nl> + qangle . create ( img . size ( ) , hog : : qangle_type ) ; <nl> <nl> const size_t block_hist_size = getBlockHistogramSize ( ) ; <nl> const Size blocks_per_img = numPartsWithin ( img . size ( ) , block_size , block_stride ) ; <nl> void cv : : ocl : : device : : hog : : set_up_constants ( int nbins , <nl> <nl> int descr_size = descr_width * nblocks_win_y ; <nl> cdescr_size = descr_size ; <nl> + <nl> + qangle_type = CV_8UC2 ; <nl> + qangle_step_shift = 0 ; <nl> + / / Some Intel devices have low single - byte access performance , <nl> + / / so we change the datatype here . <nl> + if ( Context : : getContext ( ) - > supportsFeature ( FEATURE_CL_INTEL_DEVICE ) ) <nl> + { <nl> + qangle_type = CV_32SC2 ; <nl> + qangle_step_shift = 2 ; <nl> + } <nl> } <nl> <nl> void cv : : ocl : : device : : hog : : compute_hists ( int nbins , <nl> void cv : : ocl : : device : : hog : : compute_hists ( int nbins , <nl> int blocks_total = img_block_width * img_block_height ; <nl> <nl> int grad_quadstep = grad . step > > 2 ; <nl> - int qangle_step = qangle . step ; <nl> + int qangle_step = qangle . step > > qangle_step_shift ; <nl> <nl> int blocks_in_group = 4 ; <nl> size_t localThreads [ 3 ] = { blocks_in_group * 24 , 2 , 1 } ; <nl> void cv : : ocl : : device : : hog : : compute_gradients_8UC1 ( int height , int width , <nl> char correctGamma = ( correct_gamma ) ? 1 : 0 ; <nl> int img_step = img . step ; <nl> int grad_quadstep = grad . step > > 3 ; <nl> - int qangle_step = qangle . step > > 1 ; <nl> + int qangle_step = qangle . step > > ( 1 + qangle_step_shift ) ; <nl> <nl> args . push_back ( make_pair ( sizeof ( cl_int ) , ( void * ) & height ) ) ; <nl> args . push_back ( make_pair ( sizeof ( cl_int ) , ( void * ) & width ) ) ; <nl> void cv : : ocl : : device : : hog : : compute_gradients_8UC4 ( int height , int width , <nl> char correctGamma = ( correct_gamma ) ? 1 : 0 ; <nl> int img_step = img . step > > 2 ; <nl> int grad_quadstep = grad . step > > 3 ; <nl> - int qangle_step = qangle . step > > 1 ; <nl> + int qangle_step = qangle . step > > ( 1 + qangle_step_shift ) ; <nl> <nl> args . push_back ( make_pair ( sizeof ( cl_int ) , ( void * ) & height ) ) ; <nl> args . push_back ( make_pair ( sizeof ( cl_int ) , ( void * ) & width ) ) ; <nl> mmm a / modules / ocl / src / opencl / objdetect_hog . cl <nl> ppp b / modules / ocl / src / opencl / objdetect_hog . cl <nl> <nl> # define NTHREADS 256 <nl> # define CV_PI_F 3 . 1415926535897932384626433832795f <nl> <nl> + # ifdef INTEL_DEVICE <nl> + # define QANGLE_TYPE int <nl> + # define QANGLE_TYPE2 int2 <nl> + # else <nl> + # define QANGLE_TYPE uchar <nl> + # define QANGLE_TYPE2 uchar2 <nl> + # endif <nl> + <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - <nl> / / Histogram computation <nl> / / 12 threads for a cell , 12x4 threads per block <nl> __kernel void compute_hists_lut_kernel ( <nl> const int cnbins , const int cblock_hist_size , const int img_block_width , <nl> const int blocks_in_group , const int blocks_total , <nl> const int grad_quadstep , const int qangle_step , <nl> - __global const float * grad , __global const uchar * qangle , <nl> + __global const float * grad , __global const QANGLE_TYPE * qangle , <nl> __global const float * gauss_w_lut , <nl> __global float * block_hists , __local float * smem ) <nl> { <nl> __kernel void compute_hists_lut_kernel ( <nl> <nl> __global const float * grad_ptr = ( gid < blocks_total ) ? <nl> grad + offset_y * grad_quadstep + ( offset_x < < 1 ) : grad ; <nl> - __global const uchar * qangle_ptr = ( gid < blocks_total ) ? <nl> + __global const QANGLE_TYPE * qangle_ptr = ( gid < blocks_total ) ? <nl> qangle + offset_y * qangle_step + ( offset_x < < 1 ) : qangle ; <nl> <nl> __local float * hist = hists + 12 * ( cell_y * CELLS_PER_BLOCK_Y + cell_x ) + <nl> __kernel void compute_hists_lut_kernel ( <nl> for ( int dist_y = dist_y_begin ; dist_y < dist_y_begin + 12 ; + + dist_y ) <nl> { <nl> float2 vote = ( float2 ) ( grad_ptr [ 0 ] , grad_ptr [ 1 ] ) ; <nl> - uchar2 bin = ( uchar2 ) ( qangle_ptr [ 0 ] , qangle_ptr [ 1 ] ) ; <nl> + QANGLE_TYPE2 bin = ( QANGLE_TYPE2 ) ( qangle_ptr [ 0 ] , qangle_ptr [ 1 ] ) ; <nl> <nl> grad_ptr + = grad_quadstep ; <nl> qangle_ptr + = qangle_step ; <nl> __kernel void extract_descrs_by_cols_kernel ( <nl> __kernel void compute_gradients_8UC4_kernel ( <nl> const int height , const int width , <nl> const int img_step , const int grad_quadstep , const int qangle_step , <nl> - const __global uchar4 * img , __global float * grad , __global uchar * qangle , <nl> + const __global uchar4 * img , __global float * grad , __global QANGLE_TYPE * qangle , <nl> const float angle_scale , const char correct_gamma , const int cnbins ) <nl> { <nl> const int x = get_global_id ( 0 ) ; <nl> __kernel void compute_gradients_8UC4_kernel ( <nl> __kernel void compute_gradients_8UC1_kernel ( <nl> const int height , const int width , <nl> const int img_step , const int grad_quadstep , const int qangle_step , <nl> - __global const uchar * img , __global float * grad , __global uchar * qangle , <nl> + __global const uchar * img , __global float * grad , __global QANGLE_TYPE * qangle , <nl> const float angle_scale , const char correct_gamma , const int cnbins ) <nl> { <nl> const int x = get_global_id ( 0 ) ; <nl>
Changes the datatype of the angle of the gradient for Intel platforms .
opencv/opencv
f3ee1c3d2fb11c10acabfd2b4993fca6dbe50f71
2013-12-17T10:06:14Z
mmm a / Telegram / Resources / colors . palette <nl> ppp b / Telegram / Resources / colors . palette <nl> placeholderFg : windowSubTextFg ; / / default input field placeholder when field is <nl> placeholderFgActive : # aaaaaa ; / / default input field placeholder when field is focused <nl> inputBorderFg : # e0e0e0 ; / / default input field bottom border ( like in code input field when you log in and field is not focused ) <nl> filterInputBorderFg : # 54c3f3 ; / / default rounded input field border ( like in chats list search field when field is focused ) <nl> - filterInputInactiveBg : windowBgOver ; / / default rounded input field background ( like in chats list search field when field is inactive ) <nl> + filterInputActiveBg : windowBg ; / / default rounded input field active background ( like in chats list search field when field is focused ) <nl> + filterInputInactiveBg : windowBgOver ; / / default rounded input field inactive background ( like in chats list search field when field is inactive ) <nl> checkboxFg : # b3b3b3 ; / / default unchecked checkbox rounded rectangle <nl> <nl> + botKbBg : menuBgOver ; / / bot keyboard button background <nl> + botKbDownBg : menuBgRipple ; / / bot keyboard button ripple effect <nl> + botKbColor : windowBoldFgOver ; / / bot keyboard button text <nl> + <nl> sliderBgInactive : # e1eaef ; / / default slider not active bar ( like in Settings when you choose interface scale or custom notifications count ) <nl> sliderBgActive : windowBgActive ; / / default slider active bar ( like in Settings when you choose interface scale or custom notifications count ) <nl> <nl> dialogsUnreadBgActive : dialogsTextFgActive ; / / chat list unread badge background <nl> dialogsUnreadBgMutedActive : dialogsDraftFgActive ; / / chat list unread badge background for muted chat for current ( active ) chat <nl> dialogsUnreadFgActive : dialogsBgActive ; / / chat list unread badge text for current ( active ) chat <nl> <nl> - dialogsRippleBg : windowBgRipple ; <nl> - dialogsRippleBgActive : activeButtonBgRipple ; <nl> + dialogsRippleBg : windowBgRipple ; / / chat list background ripple effect <nl> + dialogsRippleBgActive : activeButtonBgRipple ; / / chat list background ripple effect for current ( active ) chat <nl> <nl> dialogsForwardBg : dialogsBgActive ; / / forwarding panel background ( when forwarding messages in the smallest window size ) <nl> dialogsForwardFg : dialogsNameFgActive ; / / forwarding panel text ( when forwarding messages in the smallest window size ) <nl> historyComposeButtonBgOver : windowBgOver ; / / unblock / join channel / mute chann <nl> historyComposeButtonBgRipple : windowBgRipple ; / / unblock / join channel / mute channel button ripple effect <nl> <nl> / / overview <nl> - overviewCheckBg : # 00000040 ; / / shared files / links checkbox background for not selected rows when some rows are selected <nl> + overviewCheckBg : # 00000040 ; / / shared media / files / links checkbox background for not selected rows when some rows are selected <nl> + overviewCheckBgActive : windowBgActive ; / / shared media / files / links checkbox background for selected rows <nl> + overviewCheckBorder : windowBg ; / / shared media round checkbox border <nl> overviewCheckFg : windowBg ; / / shared files / links checkbox icon for not selected rows when some rows are selected <nl> overviewCheckFgActive : windowBg ; / / shared files / links checkbox icon for selected rows <nl> overviewPhotoSelectOverlay : # 40ace333 ; / / shared photos / videos / links fill for selected rows <nl> mmm a / Telegram / SourceFiles / app . cpp <nl> ppp b / Telegram / SourceFiles / app . cpp <nl> namespace { <nl> prepareCorners ( EmojiHoverCorners , st : : buttonRadius , st : : emojiPanHover ) ; <nl> prepareCorners ( StickerHoverCorners , st : : buttonRadius , st : : emojiPanHover ) ; <nl> prepareCorners ( BotKeyboardCorners , st : : buttonRadius , st : : botKbBg ) ; <nl> - prepareCorners ( BotKeyboardOverCorners , st : : buttonRadius , st : : botKbOverBg ) ; <nl> - prepareCorners ( BotKeyboardDownCorners , st : : buttonRadius , st : : botKbDownBg ) ; <nl> prepareCorners ( PhotoSelectOverlayCorners , st : : buttonRadius , st : : overviewPhotoSelectOverlay ) ; <nl> <nl> prepareCorners ( Doc1Corners , st : : buttonRadius , st : : msgFile1Bg ) ; <nl> mmm a / Telegram / SourceFiles / history / history . style <nl> ppp b / Telegram / SourceFiles / history / history . style <nl> msgBotKbButton : BotKeyboardButton { <nl> } <nl> <nl> botKbDuration : 200 ; <nl> - botKbBg : menuBgOver ; <nl> - botKbOverBg : menuBgOver ; <nl> - botKbDownBg : menuBgRipple ; <nl> - botKbColor : windowBoldFgOver ; <nl> botKbStyle : TextStyle ( defaultTextStyle ) { <nl> font : font ( 15px semibold ) ; <nl> linkFont : font ( 15px semibold ) ; <nl> botKbButton : BotKeyboardButton { <nl> padding : 10px ; <nl> height : 38px ; <nl> textTop : 9px ; <nl> - ripple : defaultRippleAnimation ; <nl> + ripple : RippleAnimation ( defaultRippleAnimation ) { <nl> + color : botKbDownBg ; <nl> + } <nl> } <nl> botKbTinyButton : BotKeyboardButton { <nl> margin : 4px ; <nl> mmm a / Telegram / SourceFiles / layout . h <nl> ppp b / Telegram / SourceFiles / layout . h <nl> enum RoundCorners { <nl> EmojiHoverCorners , <nl> StickerHoverCorners , <nl> BotKeyboardCorners , <nl> - BotKeyboardOverCorners , <nl> - BotKeyboardDownCorners , <nl> PhotoSelectOverlayCorners , <nl> <nl> Doc1Corners , <nl> mmm a / Telegram / SourceFiles / overview / overview . style <nl> ppp b / Telegram / SourceFiles / overview / overview . style <nl> overviewLeftMax : 42px ; <nl> overviewCheckPressedSize : 0 . 8 ; <nl> overviewCheck : RoundCheckbox ( defaultRoundCheckbox ) { <nl> bgInactive : overviewCheckBg ; <nl> + bgActive : overviewCheckBgActive ; <nl> + border : overviewCheckBorder ; <nl> size : 29px ; <nl> sizeSmall : 0 . 3 ; <nl> check : icon { { " overview_photo_check " , overviewCheckFgActive , point ( 4px , 8px ) } } ; <nl> overviewPhotoMinSize : minPhotoSize ; <nl> overviewVideoBg : imageBg ; <nl> <nl> overviewFileThumbBg : imageBg ; <nl> - overviewFileChecked : windowBgActive ; <nl> + overviewFileChecked : overviewCheckBgActive ; <nl> overviewFileCheck : overviewCheckBg ; <nl> overviewFileExtPadding : 5px ; <nl> overviewFileExtTop : 24px ; <nl> overviewLinksCheck : icon { <nl> { " overview_links_check " , overviewCheckFg , point ( 4px , 5px ) } , <nl> } ; <nl> overviewLinksChecked : icon { <nl> - { " overview_links_check_bg " , windowBgActive } , <nl> + { " overview_links_check_bg " , overviewCheckBgActive } , <nl> { " overview_links_check " , overviewCheckFgActive , point ( 4px , 5px ) } , <nl> } ; <nl> <nl> mmm a / Telegram / SourceFiles / overview / overview_layout . cpp <nl> ppp b / Telegram / SourceFiles / overview / overview_layout . cpp <nl> void Document : : paint ( Painter & p , const QRect & clip , TextSelection selection , con <nl> int32 nameleft = 0 , nametop = 0 , nameright = 0 , statustop = 0 , datetop = - 1 ; <nl> bool wthumb = withThumb ( ) ; <nl> <nl> - if ( _data - > song ( ) ) { <nl> + auto isSong = ( _data - > song ( ) ! = nullptr ) ; <nl> + if ( isSong ) { <nl> nameleft = _st . songPadding . left ( ) + _st . songThumbSize + _st . songPadding . right ( ) ; <nl> nameright = _st . songPadding . left ( ) ; <nl> nametop = _st . songNameTop ; <nl> void Document : : paint ( Painter & p , const QRect & clip , TextSelection selection , con <nl> <nl> if ( clip . intersects ( rtlrect ( nameleft , statustop , availwidth , st : : normalFont - > height , _width ) ) ) { <nl> p . setFont ( st : : normalFont ) ; <nl> - p . setPen ( st : : mediaInFg ) ; <nl> + p . setPen ( ( isSong & & selected ) ? st : : mediaInFgSelected : st : : mediaInFg ) ; <nl> p . drawTextLeft ( nameleft , statustop , _width , _status . text ( ) ) ; <nl> } <nl> if ( datetop > = 0 & & clip . intersects ( rtlrect ( nameleft , datetop , _datew , st : : normalFont - > height , _width ) ) ) { <nl> mmm a / Telegram / SourceFiles / ui / widgets / widgets . style <nl> ppp b / Telegram / SourceFiles / ui / widgets / widgets . style <nl> defaultInputFont : font ( 17px ) ; <nl> defaultFlatInput : FlatInput { <nl> textColor : windowFg ; <nl> bgColor : filterInputInactiveBg ; <nl> - bgActive : windowBg ; <nl> + bgActive : filterInputActiveBg ; <nl> width : 210px ; <nl> height : 40px ; <nl> align : align ( left ) ; <nl>
Add some more colors for theming .
telegramdesktop/tdesktop
75fdd5315f260b47ccd82e49087dfe70c2678180
2017-06-30T06:21:44Z
mmm a / tools / jenkins - scripts / emptytest . py <nl> ppp b / tools / jenkins - scripts / emptytest . py <nl> <nl> # will add : window - android , linux - android <nl> <nl> import os <nl> - import subprocess <nl> import sys <nl> import json <nl> import time <nl> import socket <nl> + import platform <nl> <nl> payload = { } <nl> # get payload from os env <nl> if os . environ . has_key ( ' payload ' ) : <nl> payload_str = os . environ [ ' payload ' ] <nl> # parse to json obj <nl> - global payload <nl> payload = json . loads ( payload_str ) <nl> print ' payload : ' , payload <nl> - pr_num = 1 <nl> + pr_num = 6326 <nl> # get pull number <nl> - if payload . has_key ( ' issue ' ) : <nl> - issue = payload [ ' issue ' ] <nl> - if issue . has_key ( ' number ' ) : <nl> - pr_num = issue [ ' number ' ] <nl> + if payload . has_key ( ' number ' ) : <nl> + pr_num = payload [ ' number ' ] <nl> print ' pr_num : ' + str ( pr_num ) <nl> + run_app_time = 5 <nl> + if os . environ . has_key ( ' RUN_APP_TIME ' ) : <nl> + global run_app_time <nl> + run_app_time = os . environ [ ' RUN_APP_TIME ' ] <nl> + print ' run_app_time : ' , run_app_time <nl> <nl> test_name = [ ' cpp_empty_test ' ] <nl> if os . environ . has_key ( ' TESTS_NAME ' ) : <nl> - temp_var = os . environ ( ' TESTS_NAME ' ) <nl> + temp_var = os . environ [ ' TESTS_NAME ' ] <nl> test_name = temp_var . split ( ' , ' ) <nl> - package_name = [ ' org . cocos2dx . hellocpp ' ] <nl> + package_name = [ ' org . cocos2dx . cpp_empty_test ' ] <nl> if os . environ . has_key ( ' PACKAGE_NAME ' ) : <nl> - temp_var = os . environ ( ' PACKAGE_NAME ' ) <nl> + temp_var = os . environ [ ' PACKAGE_NAME ' ] <nl> package_name = temp_var . split ( ' , ' ) <nl> - activity_name = [ ' org . cocos2dx . cpp . AppActivity ' ] <nl> + activity_name = [ ' org . cocos2dx . cpp_empty_test . AppActivity ' ] <nl> if os . environ . has_key ( ' ACTIVITY_NAME ' ) : <nl> - temp_var = os . environ ( ' ACTIVITY_NAME ' ) <nl> + temp_var = os . environ [ ' ACTIVITY_NAME ' ] <nl> activity_name = temp_var . split ( ' , ' ) <nl> gIdx = 0 <nl> if os . environ . has_key ( ' TEST_INDEX ' ) : <nl> gIdx = os . environ ( ' TEST_INDEX ' ) <nl> <nl> + current_platform = platform . system ( ) <nl> + print ' current platform is : ' , current_platform <nl> + <nl> + empty_test_result = True <nl> + empty_test_result_info = ' ' <nl> arrDevices = [ ] <nl> def getDevices ( ) : <nl> cmd = ' adb devices ' <nl> def getDevices ( ) : <nl> def getADBDeviceIP ( device_name ) : <nl> output = os . popen ( " adb - s " + device_name + " shell netcfg " ) <nl> configs = output . read ( ) . split ( ' \ r \ n ' ) <nl> + output . close ( ) <nl> for l in configs : <nl> items = l . split ( ) <nl> if len ( items ) > 1 and items [ 1 ] = = ' UP ' : <nl> def getADBDeviceIP ( device_name ) : <nl> def mapIP ( ) : <nl> for device in arrDevices : <nl> ip_d = getADBDeviceIP ( device [ ' name ' ] ) <nl> - if ip_d : <nl> - ip_d = ip_d . replace ( ' . 30 . ' , ' . 40 . ' ) <nl> device [ ' ip ' ] = ip_d <nl> <nl> + device_info = { } <nl> + info_list = ' { " product " : [ " model " , " brand " , " name " , " cpu . abi " , " cpu . abi2 " , " manufacturer " , " locale . language " , " locale . region " ] , " build " : [ " id " , " version . sdk " , " version . release " ] } ' <nl> + if os . environ . has_key ( ' DEVICE_INFO_LIST ' ) : <nl> + info_list = os . environ [ ' DEVICE_INFO_LIST ' ] <nl> + info_list = eval ( info_list ) <nl> + def getDeviceInfoByName ( name ) : <nl> + cmd = ' ' <nl> + if len ( name ) > 0 : <nl> + cmd = ' adb - s ' + name + ' shell cat / system / build . prop ' <nl> + else : <nl> + cmd = ' adb shell cat / system / build . prop ' <nl> + pip_cat = os . popen ( cmd ) <nl> + read_info = pip_cat . read ( ) <nl> + read_info_list = read_info . split ( ' \ r \ n ' ) <nl> + def checkProperty ( item_str ) : <nl> + for argv in info_list : <nl> + for item in info_list [ argv ] : <nl> + prop = argv + ' . ' + item <nl> + if item_str . find ( prop ) > - 1 : <nl> + arr_item = item_str . split ( ' = ' ) <nl> + device_info [ prop ] = arr_item [ 1 ] <nl> + break <nl> + for item in read_info_list : <nl> + checkProperty ( item ) <nl> + <nl> + # getDeviceInfoByName ( ' ' ) <nl> + # print ' device_info : ' , device_info <nl> + def logDeviceInfomation ( ) : <nl> + getDeviceInfoByName ( ' ' ) <nl> + for key in device_info : <nl> + print ' \ t ' + key + ' : ' + device_info [ key ] <nl> + <nl> info_empty_test = { } <nl> - apk_name = ' apk / ' + test_name [ gIdx ] + ' / ' + test_name [ gIdx ] + ' _ ' + str ( pr_num ) + ' . apk ' <nl> + apk_name = ' apks / ' + test_name [ gIdx ] + ' / ' + test_name [ gIdx ] + ' _ ' + str ( pr_num ) + ' . apk ' <nl> def install_apk ( ) : <nl> print ' will install apk : ' , apk_name <nl> + global empty_test_result <nl> if len ( arrDevices ) = = 0 : <nl> - print ' no android device . ' <nl> + empty_test_result = False <nl> + empty_test_result_info = ' no android device . ' <nl> + print empty_test_result_info <nl> return False <nl> info_of_install = [ ] <nl> + if not os . path . isfile ( apk_name ) : <nl> + print apk_name , ' is not exist ! ' <nl> + empty_test_result = False <nl> + return False <nl> for device in arrDevices : <nl> name = device [ ' name ' ] <nl> cmd = ' adb - s ' + name + ' install ' + apk_name <nl> def open_apk ( type_of_apk ) : <nl> for info in info_start : <nl> if info . find ( ' Error : ' ) > - 1 : <nl> print ' infomation of open activity : ' , info <nl> + global empty_test_result <nl> + empty_test_result = False <nl> + empty_test_result_info = ' open : ' + info <nl> return info <nl> - print ' activity is opened . ' <nl> + if len ( arrDevices ) : <nl> + print ' activity is opened . ' <nl> + else : <nl> + print ' no device . ' <nl> return True <nl> <nl> PORT = 5678 <nl> def socket_status ( device_name ) : <nl> soc = socket . socket ( socket . AF_INET , socket . SOCK_STREAM ) <nl> + status_socket = False <nl> + global empty_test_result <nl> try : <nl> - print ' will check status of app : ' , device_name <nl> + print ' telnet ' , device_name [ ' ip ' ] , PORT <nl> soc . connect ( ( device_name [ ' ip ' ] , PORT ) ) <nl> cmd = ' resolution \ r \ n ' <nl> # print ' socket cmd : ' , cmd <nl> + print ' connected successfully . ' <nl> + print ' send console command : resolution ' <nl> soc . send ( cmd ) <nl> while True : <nl> data = soc . recv ( 1024 ) <nl> if len ( data ) : <nl> print data <nl> if data . find ( ' size : ' ) > - 1 : <nl> - print test_name [ gIdx ] + ' is successful ! ' <nl> - return True <nl> + print ' OK ' <nl> + print ' close ' , test_name [ gIdx ] <nl> + soc . send ( ' director end ' ) <nl> + print ' OK ' <nl> + status_socket = True <nl> + break <nl> if not data : <nl> - print test_name [ gIdx ] + ' is crashed ! ' <nl> + empty_test_result = False <nl> + empty_test_result_info = test_name [ gIdx ] + ' is crashed ! ' <nl> + print empty_test_result_info <nl> break <nl> except Exception , e : <nl> - print test_name [ gIdx ] + ' is crashed ! ' <nl> - return False <nl> + empty_test_result = False <nl> + empty_test_result_info = test_name [ gIdx ] + ' is crashed ! ' <nl> + print empty_test_result_info <nl> + time . sleep ( 2 ) <nl> + soc . close ( ) <nl> + return status_socket <nl> <nl> def uninstall_apk ( idx ) : <nl> # adb shell pm uninstall - n org . cocos2dx . hellolua <nl> - print ' will uninstall apk : ' , package_name [ idx ] <nl> + print ' uninstall ' , test_name [ idx ] <nl> for device in arrDevices : <nl> cmd = ' adb - s ' + device [ ' name ' ] + ' shell pm uninstall - n ' + package_name [ idx ] <nl> info_uninstall = os . popen ( cmd ) . read ( ) <nl> - print ' uninstall apk : ' , info_uninstall <nl> + if info_uninstall . find ( ' Success ' ) > - 1 : <nl> + print ' OK ' <nl> + else : <nl> + empty_test_result_info = ' uninstall Failed ! ' <nl> + print empty_test_result_info <nl> return True <nl> <nl> def main ( ) : <nl> def main ( ) : <nl> if len ( arrDevices ) : <nl> mapIP ( ) <nl> print ' arrDevices : ' , arrDevices <nl> + uninstall_apk ( gIdx ) <nl> + time . sleep ( 1 ) <nl> + else : <nl> + print ' there is no device for emptytest , please check devices ! ' <nl> + return 1 <nl> print ' empty test start : ' <nl> + print ' device infomation : ' <nl> + if len ( arrDevices ) : <nl> + logDeviceInfomation ( ) <nl> + else : <nl> + print ' \ tno android device . ' <nl> install_info = install_apk ( ) <nl> open_info = open_apk ( test_name [ gIdx ] ) <nl> info_empty_test [ ' open_info ' ] = open_info <nl> def main ( ) : <nl> socket_info = socket_status ( arrDevices [ 0 ] ) <nl> info_empty_test [ ' socket_info ' ] = socket_info <nl> if install_info : <nl> - time . sleep ( 5 ) <nl> + time . sleep ( run_app_time ) <nl> info_uninstall = uninstall_apk ( gIdx ) <nl> print ' info_empty_test : ' , info_empty_test <nl> - print ' empty test end ' <nl> + print ' empty test end ' , empty_test_result <nl> + if empty_test_result : <nl> + return 0 <nl> + else : <nl> + print ' empty_test_result_info : ' , empty_test_result_info <nl> + return 1 <nl> <nl> # mmmmmmmmmmmm - - main mmmmmmmmmmmm - - <nl> if __name__ = = ' __main__ ' : <nl>
Merge pull request from shujunqiao / emptytest - device
cocos2d/cocos2d-x
b5f30ff7ec50f1046e412228ac782129c1b734a0
2014-04-22T03:14:07Z
mmm a / hphp / hack / src / deps / dune <nl> ppp b / hphp / hack / src / deps / dune <nl> <nl> depgraph <nl> file_info <nl> heap_shared_mem_hash <nl> + ocamlpool <nl> relative_path <nl> typing_deps_rust <nl> worker_cancel ) <nl> mmm a / hphp / hack / src / deps / typing_deps . ml <nl> ppp b / hphp / hack / src / deps / typing_deps . ml <nl> let add_idep_directly_to_graph ~ dependent ~ dependency = <nl> ( * TODO ( hverr ) : implement , only used in hh_fanout * ) <nl> failwith " unimplemented " <nl> <nl> + let dep_edges_make ( ) : dep_edges = Some CustomGraph . DepEdgeSet . empty <nl> + <nl> let flush_ideps_batch ( ) : dep_edges = <nl> match ! mode with <nl> | SQLiteMode - > <nl> let flush_ideps_batch ( ) : dep_edges = <nl> CustomGraph . filtered_deps_batch : = CustomGraph . DepEdgeSet . empty ; <nl> Some old_batch <nl> <nl> + let merge_dep_edges ( x : dep_edges ) ( y : dep_edges ) : dep_edges = <nl> + match ( x , y ) with <nl> + | ( Some x , Some y ) - > Some ( CustomGraph . DepEdgeSet . union x y ) <nl> + | _ - > None <nl> + <nl> let get_ideps_from_hash hash = <nl> let open DepSet in <nl> match ! mode with <nl> mmm a / hphp / hack / src / deps / typing_deps . mli <nl> ppp b / hphp / hack / src / deps / typing_deps . mli <nl> val add_idep : Dep . dependent Dep . variant - > Dep . dependency Dep . variant - > unit <nl> <nl> val add_idep_directly_to_graph : dependent : Dep . t - > dependency : Dep . t - > unit <nl> <nl> + val dep_edges_make : unit - > dep_edges <nl> + <nl> val flush_ideps_batch : unit - > dep_edges <nl> <nl> + val merge_dep_edges : dep_edges - > dep_edges - > dep_edges <nl> + <nl> val get_ideps_from_hash : Dep . t - > DepSet . t <nl> <nl> val get_ideps : Dep . dependency Dep . variant - > DepSet . t <nl> mmm a / hphp / hack / src / typing / dune <nl> ppp b / hphp / hack / src / typing / dune <nl> <nl> counters <nl> typing <nl> typing_defs <nl> + typing_deps <nl> typing_service_api <nl> typing_service_api_stubs <nl> vfs ) <nl> mmm a / hphp / hack / src / typing / service / dune <nl> ppp b / hphp / hack / src / typing / service / dune <nl> <nl> job_runner_stubs <nl> relative_path <nl> typechecker_options <nl> + typing_deps <nl> ) <nl> ( preprocess ( pps ppx_deriving . std ) ) ) <nl> mmm a / hphp / hack / src / typing / service / typing_service_delegate_sig . ml <nl> ppp b / hphp / hack / src / typing / service / typing_service_delegate_sig . ml <nl> module type Delegate_sig = sig <nl> <nl> val on_cancelled : state - > file_computation list * state <nl> <nl> - val process : delegate_job_sig - > Errors . t * computation_progress <nl> + val process : delegate_job_sig - > typing_result * computation_progress <nl> <nl> val steal : state - > int - > file_computation list * state <nl> <nl> mmm a / hphp / hack / src / typing / service / typing_service_types . ml <nl> ppp b / hphp / hack / src / typing / service / typing_service_types . ml <nl> type computation_progress = { <nl> } <nl> [ @ @ deriving show ] <nl> <nl> - type delegate_job_sig = unit - > Errors . t * computation_progress <nl> + type typing_result = { <nl> + errors : Errors . t ; <nl> + dep_edges : Typing_deps . dep_edges ; <nl> + } <nl> + <nl> + type delegate_job_sig = unit - > typing_result * computation_progress <nl> <nl> type progress_kind = <nl> | Progress <nl> mmm a / hphp / hack / src / typing / typing_check_service . ml <nl> ppp b / hphp / hack / src / typing / typing_check_service . ml <nl> module Delegate = Typing_service_delegate <nl> <nl> type progress = job_progress <nl> <nl> - let neutral = Errors . empty <nl> + let neutral : unit - > typing_result = <nl> + ( fun ( ) - > { errors = Errors . empty ; dep_edges = Typing_deps . dep_edges_make ( ) } ) <nl> <nl> ( * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ) <nl> ( * The job that will be run on the workers * ) <nl> let read_counters ( ) : unix_time * Telemetry . t = <nl> let process_files <nl> ( dynamic_view_files : Relative_path . Set . t ) <nl> ( ctx : Provider_context . t ) <nl> - ( errors : Errors . t ) <nl> + ( typing_result : typing_result ) <nl> ( progress : computation_progress ) <nl> ~ ( memory_cap : int option ) <nl> - ~ ( check_info : check_info ) : Errors . t * computation_progress = <nl> + ~ ( check_info : check_info ) : typing_result * computation_progress = <nl> SharedMem . invalidate_caches ( ) ; <nl> File_provider . local_changes_push_sharedmem_stack ( ) ; <nl> Ast_provider . local_changes_push_sharedmem_stack ( ) ; <nl> let process_files <nl> process_or_exit errors progress <nl> | [ ] - > ( errors , progress ) <nl> in <nl> - let result = process_or_exit errors progress in <nl> + let ( errors , progress ) = process_or_exit typing_result . errors progress in <nl> + let dep_edges = Typing_deps . flush_ideps_batch ( ) in <nl> + let dep_edges = <nl> + Typing_deps . merge_dep_edges typing_result . dep_edges dep_edges <nl> + in <nl> TypingLogger . flush_buffers ( ) ; <nl> Ast_provider . local_changes_pop_sharedmem_stack ( ) ; <nl> File_provider . local_changes_pop_sharedmem_stack ( ) ; <nl> - result <nl> + ( { errors ; dep_edges } , progress ) <nl> <nl> let load_and_process_files <nl> ( ctx : Provider_context . t ) <nl> ( dynamic_view_files : Relative_path . Set . t ) <nl> - ( errors : Errors . t ) <nl> + ( typing_result : typing_result ) <nl> ( progress : computation_progress ) <nl> ~ ( memory_cap : int option ) <nl> - ~ ( check_info : check_info ) : Errors . t * computation_progress = <nl> + ~ ( check_info : check_info ) : typing_result * computation_progress = <nl> ( * When the type - checking worker receives SIGUSR1 , display a position which <nl> corresponds approximately with the function / expression being checked . * ) <nl> Sys_utils . set_signal <nl> Sys . sigusr1 <nl> ( Sys . Signal_handle Typing . debug_print_last_pos ) ; <nl> - process_files dynamic_view_files ctx errors progress ~ memory_cap ~ check_info <nl> + process_files <nl> + dynamic_view_files <nl> + ctx <nl> + typing_result <nl> + progress <nl> + ~ memory_cap <nl> + ~ check_info <nl> <nl> ( * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ) <nl> ( * Let ' s go ! That ' s where the action is * ) <nl> let merge <nl> ( files_initial_count : int ) <nl> ( files_in_progress : file_computation Hash_set . t ) <nl> ( files_checked_count : int ref ) <nl> - ( ( errors : Errors . t ) , ( results : progress ) ) <nl> - ( acc : Errors . t ) : Errors . t = <nl> + ( { errors ; dep_edges } , ( results : progress ) ) <nl> + ( typing_result : typing_result ) : typing_result = <nl> let ( ) = <nl> match results . kind with <nl> | Progress - > ( ) <nl> let merge <nl> ~ total_count : files_initial_count <nl> ~ unit : " files " <nl> ~ extra : delegate_progress ; <nl> - Errors . merge errors acc <nl> + let dep_edges = <nl> + Typing_deps . merge_dep_edges typing_result . dep_edges dep_edges <nl> + in <nl> + let errors = Errors . merge errors typing_result . errors in <nl> + { errors ; dep_edges } <nl> <nl> let next <nl> ( workers : MultiWorker . worker list option ) <nl> let process_in_parallel <nl> ~ ( interrupt : ' a MultiWorker . interrupt_config ) <nl> ~ ( memory_cap : int option ) <nl> ~ ( check_info : check_info ) : <nl> - Errors . t * Delegate . state * Telemetry . t * ' a * Relative_path . t list = <nl> + typing_result * Delegate . state * Telemetry . t * ' a * Relative_path . t list = <nl> let delegate_state = ref delegate_state in <nl> let files_to_process = ref fnl in <nl> let files_in_progress = Hash_set . Poly . create ( ) in <nl> let process_in_parallel <nl> let job = <nl> load_and_process_files ctx dynamic_view_files ~ memory_cap ~ check_info <nl> in <nl> - let job ( errors : Errors . t ) ( progress : progress ) = <nl> - let ( errors , computation_progress ) = <nl> + let job ( typing_result : typing_result ) ( progress : progress ) = <nl> + let ( typing_result , computation_progress ) = <nl> match progress . kind with <nl> - | Progress - > job errors progress . progress <nl> + | Progress - > job typing_result progress . progress <nl> | DelegateProgress job - > Delegate . process job <nl> in <nl> - ( errors , { progress with progress = computation_progress } ) <nl> + ( typing_result , { progress with progress = computation_progress } ) <nl> in <nl> - let ( errors , env , cancelled_results ) = <nl> + let ( typing_result , env , cancelled_results ) = <nl> MultiWorker . call_with_interrupt <nl> workers <nl> ~ job <nl> - ~ neutral <nl> + ~ neutral : ( neutral ( ) ) <nl> ~ merge : <nl> ( merge <nl> ~ should_prefetch_deferred_files <nl> let process_in_parallel <nl> in <nl> List . concat ( List . map cancelled_results ~ f : paths_of ) <nl> in <nl> - ( errors , ! delegate_state , telemetry , env , paths_of cancelled_results ) <nl> + ( typing_result , ! delegate_state , telemetry , env , paths_of cancelled_results ) <nl> <nl> type ( ' a , ' b , ' c , ' d ) job_result = ' a * ' b * ' c * ' d * Relative_path . t list <nl> <nl> let go_with_interrupt <nl> in <nl> let fnl = List . map fnl ~ f : ( fun path - > Check { path ; deferred_count = 0 } ) in <nl> Mocking . with_test_mocking fnl @ @ fun fnl - > <nl> - let result = <nl> + let ( typing_result , delegate_state , telemetry , env , cancelled_fnl ) = <nl> if should_process_sequentially opts fnl then begin <nl> Hh_logger . log " Type checking service will process files sequentially " ; <nl> let progress = { completed = [ ] ; remaining = fnl ; deferred = [ ] } in <nl> - let ( errors , _ ) = <nl> + let ( typing_result , _ ) = <nl> process_files <nl> dynamic_view_files <nl> ctx <nl> - neutral <nl> + ( neutral ( ) ) <nl> progress <nl> ~ memory_cap : None <nl> ~ check_info <nl> in <nl> - ( errors , delegate_state , telemetry , interrupt . MultiThreadedCall . env , [ ] ) <nl> + ( typing_result , <nl> + delegate_state , <nl> + telemetry , <nl> + interrupt . MultiThreadedCall . env , <nl> + [ ] ) <nl> end else begin <nl> Hh_logger . log " Type checking service will process files in parallel " ; <nl> let workers = <nl> let go_with_interrupt <nl> ( HackEventLogger . ProfileTypeCheck . get_telemetry_url <nl> ~ init_id : check_info . init_id <nl> ~ recheck_id : check_info . recheck_id ) ; <nl> - result <nl> + ( typing_result . errors , delegate_state , telemetry , env , cancelled_fnl ) <nl> <nl> let go <nl> ( ctx : Provider_context . t ) <nl>
Accumulate dep graph delta in master
facebook/hhvm
106bfff9ced0e8dcb42178bb201078cb3281e5ee
2020-09-30T20:40:43Z
mmm a / ports / libtorrent / CONTROL <nl> ppp b / ports / libtorrent / CONTROL <nl> <nl> Source : libtorrent <nl> Version : 1 . 2 . 10 <nl> + Port - Version : 1 <nl> Homepage : https : / / github . com / arvidn / libtorrent <nl> Description : An efficient feature complete C + + BitTorrent implementation <nl> - Build - Depends : openssl , boost - system , boost - date - time , boost - chrono , boost - random , boost - asio , boost - crc , boost - config , boost - iterator , boost - scope - exit , boost - multiprecision , boost - variant <nl> + Build - Depends : openssl , boost - system , boost - date - time , boost - chrono , boost - random , boost - asio , boost - crc , boost - config , boost - iterator , boost - scope - exit , boost - multiprecision , boost - pool , boost - variant <nl> Supports : ! uwp & ! ( windows & arm ) <nl> <nl> Feature : deprfun <nl>
[ libtorrent ] Fix build on arm - linux community triplet ( )
microsoft/vcpkg
18ab4b72a26284f0df28295ce7bf9b21c96f20f4
2020-09-10T06:06:25Z
mmm a / xbmc / video / VideoDatabase . cpp <nl> ppp b / xbmc / video / VideoDatabase . cpp <nl> void CVideoDatabase : : CreateAnalytics ( ) <nl> <nl> CLog : : Log ( LOGINFO , " % s - creating triggers " , __FUNCTION__ ) ; <nl> m_pDS - > exec ( " CREATE TRIGGER delete_movie AFTER DELETE ON movie FOR EACH ROW BEGIN " <nl> + " DELETE FROM genrelinkmovie WHERE idMovie = old . idMovie ; " <nl> + " DELETE FROM actorlinkmovie WHERE idMovie = old . idMovie ; " <nl> + " DELETE FROM directorlinkmovie WHERE idMovie = old . idMovie ; " <nl> + " DELETE FROM studiolinkmovie WHERE idMovie = old . idMovie ; " <nl> + " DELETE FROM countrylinkmovie WHERE idMovie = old . idMovie ; " <nl> + " DELETE FROM writerlinkmovie WHERE idMovie = old . idMovie ; " <nl> + " DELETE FROM movielinktvshow WHERE idMovie = old . idMovie ; " <nl> " DELETE FROM art WHERE media_id = old . idMovie AND media_type = ' movie ' ; " <nl> " DELETE FROM taglinks WHERE idMedia = old . idMovie AND media_type = ' movie ' ; " <nl> " END " ) ; <nl> m_pDS - > exec ( " CREATE TRIGGER delete_tvshow AFTER DELETE ON tvshow FOR EACH ROW BEGIN " <nl> + " DELETE FROM actorlinktvshow WHERE idShow = old . idShow ; " <nl> + " DELETE FROM directorlinktvshow WHERE idShow = old . idShow ; " <nl> + " DELETE FROM tvshowlinkpath WHERE idShow = old . idShow ; " <nl> + " DELETE FROM genrelinktvshow WHERE idShow = old . idShow ; " <nl> + " DELETE FROM movielinktvshow WHERE idShow = old . idShow ; " <nl> + " DELETE FROM seasons WHERE idShow = old . idShow ; " <nl> " DELETE FROM art WHERE media_id = old . idShow AND media_type = ' tvshow ' ; " <nl> " DELETE FROM taglinks WHERE idMedia = old . idShow AND media_type = ' tvshow ' ; " <nl> " END " ) ; <nl> m_pDS - > exec ( " CREATE TRIGGER delete_musicvideo AFTER DELETE ON musicvideo FOR EACH ROW BEGIN " <nl> + " DELETE FROM artistlinkmusicvideo WHERE idMVideo = old . idMVideo ; " <nl> + " DELETE FROM directorlinkmusicvideo WHERE idMVideo = old . idMVideo ; " <nl> + " DELETE FROM genrelinkmusicvideo WHERE idMVideo = old . idMVideo ; " <nl> + " DELETE FROM studiolinkmusicvideo WHERE idMVideo = old . idMVideo ; " <nl> " DELETE FROM art WHERE media_id = old . idMVideo AND media_type = ' musicvideo ' ; " <nl> " DELETE FROM taglinks WHERE idMedia = old . idMVideo AND media_type = ' musicvideo ' ; " <nl> " END " ) ; <nl> m_pDS - > exec ( " CREATE TRIGGER delete_episode AFTER DELETE ON episode FOR EACH ROW BEGIN " <nl> + " DELETE FROM actorlinkepisode WHERE idEpisode = old . idEpisode ; " <nl> + " DELETE FROM directorlinkepisode WHERE idEpisode = old . idEpisode ; " <nl> + " DELETE FROM writerlinkepisode WHERE idEpisode = old . idEpisode ; " <nl> " DELETE FROM art WHERE media_id = old . idEpisode AND media_type = ' episode ' ; " <nl> " END " ) ; <nl> m_pDS - > exec ( " CREATE TRIGGER delete_season AFTER DELETE ON seasons FOR EACH ROW BEGIN " <nl> void CVideoDatabase : : DeleteMovie ( int idMovie , bool bKeepId / * = false * / ) <nl> strSQL = PrepareSQL ( " delete from movie where idMovie = % i " , idMovie ) ; <nl> m_pDS - > exec ( strSQL . c_str ( ) ) ; <nl> <nl> - strSQL = PrepareSQL ( " delete from movielinktvshow where idMovie = % i " , idMovie ) ; <nl> - m_pDS - > exec ( strSQL . c_str ( ) ) ; <nl> - <nl> / / TODO : Why are we invalidating paths here ? <nl> int idFile = GetDbId ( PrepareSQL ( " SELECT idFile FROM movie WHERE idMovie = % i " , idMovie ) ) ; <nl> std : : string path = GetSingleValue ( PrepareSQL ( " SELECT strPath FROM path JOIN files ON files . idPath = path . idPath WHERE files . idFile = % i " , idFile ) ) ; <nl> void CVideoDatabase : : UpdateTables ( int iVersion ) <nl> <nl> int CVideoDatabase : : GetSchemaVersion ( ) const <nl> { <nl> - return 88 ; <nl> + return 89 ; <nl> } <nl> <nl> bool CVideoDatabase : : LookupByFolders ( const CStdString & path , bool shows ) <nl> void CVideoDatabase : : CleanDatabase ( CGUIDialogProgressBarHandle * handle , const se <nl> CLog : : Log ( LOGDEBUG , " % s : Cleaning movie table " , __FUNCTION__ ) ; <nl> sql = " DELETE FROM movie WHERE idMovie IN " + moviesToDelete ; <nl> m_pDS - > exec ( sql . c_str ( ) ) ; <nl> - <nl> - CLog : : Log ( LOGDEBUG , " % s : Cleaning actorlinkmovie table " , __FUNCTION__ ) ; <nl> - sql = " DELETE FROM actorlinkmovie WHERE idMovie IN " + moviesToDelete ; <nl> - m_pDS - > exec ( sql . c_str ( ) ) ; <nl> - <nl> - CLog : : Log ( LOGDEBUG , " % s : Cleaning directorlinkmovie table " , __FUNCTION__ ) ; <nl> - sql = " DELETE FROM directorlinkmovie WHERE idMovie IN " + moviesToDelete ; <nl> - m_pDS - > exec ( sql . c_str ( ) ) ; <nl> - <nl> - CLog : : Log ( LOGDEBUG , " % s : Cleaning writerlinkmovie table " , __FUNCTION__ ) ; <nl> - sql = " DELETE FROM writerlinkmovie WHERE idMovie IN " + moviesToDelete ; <nl> - m_pDS - > exec ( sql . c_str ( ) ) ; <nl> - <nl> - CLog : : Log ( LOGDEBUG , " % s : Cleaning genrelinkmovie table " , __FUNCTION__ ) ; <nl> - sql = " DELETE FROM genrelinkmovie WHERE idMovie IN " + moviesToDelete ; <nl> - m_pDS - > exec ( sql . c_str ( ) ) ; <nl> - <nl> - CLog : : Log ( LOGDEBUG , " % s : Cleaning countrylinkmovie table " , __FUNCTION__ ) ; <nl> - sql = " DELETE FROM countrylinkmovie WHERE idMovie IN " + moviesToDelete ; <nl> - m_pDS - > exec ( sql . c_str ( ) ) ; <nl> - <nl> - CLog : : Log ( LOGDEBUG , " % s : Cleaning studiolinkmovie table " , __FUNCTION__ ) ; <nl> - sql = " DELETE FROM studiolinkmovie WHERE idMovie IN " + moviesToDelete ; <nl> - m_pDS - > exec ( sql . c_str ( ) ) ; <nl> } <nl> <nl> if ( ! episodeIDs . empty ( ) ) <nl> void CVideoDatabase : : CleanDatabase ( CGUIDialogProgressBarHandle * handle , const se <nl> CLog : : Log ( LOGDEBUG , " % s : Cleaning episode table " , __FUNCTION__ ) ; <nl> sql = " DELETE FROM episode WHERE idEpisode IN " + episodesToDelete ; <nl> m_pDS - > exec ( sql . c_str ( ) ) ; <nl> - <nl> - CLog : : Log ( LOGDEBUG , " % s : Cleaning actorlinkepisode table " , __FUNCTION__ ) ; <nl> - sql = " DELETE FROM actorlinkepisode WHERE idEpisode IN " + episodesToDelete ; <nl> - m_pDS - > exec ( sql . c_str ( ) ) ; <nl> - <nl> - CLog : : Log ( LOGDEBUG , " % s : Cleaning directorlinkepisode table " , __FUNCTION__ ) ; <nl> - sql = " DELETE FROM directorlinkepisode WHERE idEpisode IN " + episodesToDelete ; <nl> - m_pDS - > exec ( sql . c_str ( ) ) ; <nl> - <nl> - CLog : : Log ( LOGDEBUG , " % s : Cleaning writerlinkepisode table " , __FUNCTION__ ) ; <nl> - sql = " DELETE FROM writerlinkepisode WHERE idEpisode IN " + episodesToDelete ; <nl> - m_pDS - > exec ( sql . c_str ( ) ) ; <nl> } <nl> <nl> CLog : : Log ( LOGDEBUG , " % s : Cleaning paths that don ' t exist and have content set . . . " , __FUNCTION__ ) ; <nl> void CVideoDatabase : : CleanDatabase ( CGUIDialogProgressBarHandle * handle , const se <nl> m_pDS - > exec ( sql . c_str ( ) ) ; <nl> } <nl> <nl> - CLog : : Log ( LOGDEBUG , " % s : Cleaning actorlinktvshow table " , __FUNCTION__ ) ; <nl> - sql = " DELETE FROM actorlinktvshow WHERE NOT EXISTS ( SELECT 1 FROM tvshow WHERE tvshow . idShow = actorlinktvshow . idShow ) " ; <nl> - m_pDS - > exec ( sql . c_str ( ) ) ; <nl> - <nl> - CLog : : Log ( LOGDEBUG , " % s : Cleaning directorlinktvshow table " , __FUNCTION__ ) ; <nl> - sql = " DELETE FROM directorlinktvshow WHERE NOT EXISTS ( SELECT 1 FROM tvshow WHERE tvshow . idShow = directorlinktvshow . idShow ) " ; <nl> - m_pDS - > exec ( sql . c_str ( ) ) ; <nl> - <nl> - CLog : : Log ( LOGDEBUG , " % s : Cleaning tvshowlinkpath table " , __FUNCTION__ ) ; <nl> - sql = " DELETE FROM tvshowlinkpath WHERE NOT EXISTS ( SELECT 1 FROM tvshow WHERE tvshow . idShow = tvshowlinkpath . idShow ) " ; <nl> - m_pDS - > exec ( sql . c_str ( ) ) ; <nl> - <nl> - CLog : : Log ( LOGDEBUG , " % s : Cleaning genrelinktvshow table " , __FUNCTION__ ) ; <nl> - sql = " DELETE FROM genrelinktvshow WHERE NOT EXISTS ( SELECT 1 FROM tvshow WHERE tvshow . idShow = genrelinktvshow . idShow ) " ; <nl> - m_pDS - > exec ( sql . c_str ( ) ) ; <nl> - <nl> - CLog : : Log ( LOGDEBUG , " % s : Cleaning seasons table " , __FUNCTION__ ) ; <nl> - sql = " DELETE FROM seasons WHERE NOT EXISTS ( SELECT 1 FROM tvshow WHERE tvshow . idShow = seasons . idShow ) " ; <nl> - m_pDS - > exec ( sql . c_str ( ) ) ; <nl> - <nl> - CLog : : Log ( LOGDEBUG , " % s : Cleaning movielinktvshow table " , __FUNCTION__ ) ; <nl> - sql = " DELETE FROM movielinktvshow WHERE NOT EXISTS ( SELECT 1 FROM tvshow WHERE tvshow . idShow = movielinktvshow . idShow ) " ; <nl> - m_pDS - > exec ( sql . c_str ( ) ) ; <nl> - sql = " DELETE FROM movielinktvshow WHERE NOT EXISTS ( SELECT 1 FROM movie WHERE movie . idMovie = movielinktvshow . idMovie ) " ; <nl> - m_pDS - > exec ( sql . c_str ( ) ) ; <nl> - <nl> if ( ! musicVideoIDs . empty ( ) ) <nl> { <nl> std : : string musicVideosToDelete ; <nl> void CVideoDatabase : : CleanDatabase ( CGUIDialogProgressBarHandle * handle , const se <nl> CLog : : Log ( LOGDEBUG , " % s : Cleaning musicvideo table " , __FUNCTION__ ) ; <nl> sql = " DELETE FROM musicvideo WHERE idMVideo IN " + musicVideosToDelete ; <nl> m_pDS - > exec ( sql . c_str ( ) ) ; <nl> - <nl> - CLog : : Log ( LOGDEBUG , " % s : Cleaning artistlinkmusicvideo table " , __FUNCTION__ ) ; <nl> - sql = " DELETE FROM artistlinkmusicvideo WHERE idMVideo IN " + musicVideosToDelete ; <nl> - m_pDS - > exec ( sql . c_str ( ) ) ; <nl> - <nl> - CLog : : Log ( LOGDEBUG , " % s : Cleaning directorlinkmusicvideo table " , __FUNCTION__ ) ; <nl> - sql = " DELETE FROM directorlinkmusicvideo WHERE idMVideo IN " + musicVideosToDelete ; <nl> - m_pDS - > exec ( sql . c_str ( ) ) ; <nl> - <nl> - CLog : : Log ( LOGDEBUG , " % s : Cleaning genrelinkmusicvideo table " , __FUNCTION__ ) ; <nl> - sql = " DELETE FROM genrelinkmusicvideo WHERE idMVideo IN " + musicVideosToDelete ; <nl> - m_pDS - > exec ( sql . c_str ( ) ) ; <nl> - <nl> - CLog : : Log ( LOGDEBUG , " % s : Cleaning studiolinkmusicvideo table " , __FUNCTION__ ) ; <nl> - sql = " DELETE FROM studiolinkmusicvideo WHERE idMVideo IN " + musicVideosToDelete ; <nl> - m_pDS - > exec ( sql . c_str ( ) ) ; <nl> } <nl> <nl> CLog : : Log ( LOGDEBUG , " % s : Cleaning path table " , __FUNCTION__ ) ; <nl>
videodb : use triggers to delete items from link tables
xbmc/xbmc
85d39513d9a9dbdf63c01d5f803d5f050d1e3660
2014-08-03T21:08:57Z
mmm a / tools / regression_test . sh <nl> ppp b / tools / regression_test . sh <nl> PERC_PATTERN + = " P99 : ( [ 0 - 9 \ . ] + ) P99 . 9 : ( [ 0 - 9 \ . ] + ) P99 . 99 : ( [ 0 - 9 \ . ] + ) " <nl> <nl> function main { <nl> commit = $ { 1 : - " origin / master " } <nl> - test_root_dir = $ { TEST_PATH : - " / tmp / rocksdb / regression_test " } <nl> - init_arguments $ test_root_dir <nl> + TEST_ROOT_DIR = $ { TEST_PATH : - " / tmp / rocksdb / regression_test " } <nl> + init_arguments $ TEST_ROOT_DIR <nl> <nl> if [ $ DEBUG - eq 0 ] ; then <nl> checkout_rocksdb $ commit <nl> function main { <nl> run_db_bench " seekrandomwhilewriting " <nl> fi <nl> <nl> - cleanup_test_directory $ test_root_dir <nl> + cleanup_test_directory $ TEST_ROOT_DIR <nl> echo " " <nl> echo " Benchmark completed ! Results are available in $ RESULT_PATH " <nl> } <nl> function run_db_bench { <nl> if [ " $ grep_output " ! = " " ] ; then <nl> echo " Stopped regression_test . sh as there ' re still db_bench processes running : " <nl> echo $ grep_output <nl> + echo " Clean up test directory " <nl> + cleanup_test_directory $ TEST_ROOT_DIR <nl> exit 2 <nl> fi <nl> <nl>
remove test dir before exit when current regression is running
facebook/rocksdb
7e5fac2c34b667805486465986275882999c0abb
2017-06-03T00:26:19Z
mmm a / docs / RELEASE_NOTES . md <nl> ppp b / docs / RELEASE_NOTES . md <nl> Please refer to this document : [ ReadMe ] ( . . / README . md ) <nl> <nl> * Behavior : Slave Behavior <nl> <nl> + * Observer and Event Handler allow you listen to the particle system and trigger some events . The Event handler can do something when the event happens . For example , there is a observer on the particle system , and it listens to the particle number when the number is greater than 100 then it tirggers an event to stop the particle system . This allow you to create more complex particles . For more details , please refer to the Particle Universe User ' s Guide . <nl> + <nl> # v3 . 5beta0 <nl> <nl> # # Highlights of v3 . 5beta0 <nl>
add release note
cocos2d/cocos2d-x
b124df143b00f07cb0d1f7c347bf20ad7e599dcb
2015-03-13T10:09:47Z
mmm a / tools / whitespace . txt <nl> ppp b / tools / whitespace . txt <nl> A Smi balks into a war and says : <nl> The doubles heard this and started to unbox . <nl> The Smi looked at them when a crazy v8 - autoroll account showed up . . . <nl> The autoroller bought a round of Himbeerbrause . Suddenly . . . . . <nl> - The bartender starts to shake the bottles . . . . . . . . . . . <nl> + The bartender starts to shake the bottles . . . . . . . . . . . . <nl>
Whitespace change to trigger bots
v8/v8
f3764354251a5e9618caa920d8dde13f92706d11
2019-07-31T09:41:27Z
mmm a / editor / editor_help . cpp <nl> ppp b / editor / editor_help . cpp <nl> void EditorHelp : : _add_method ( const DocData : : MethodDoc & p_method , bool p_overview <nl> } <nl> <nl> class_desc - > push_color ( symbol_color ) ; <nl> - class_desc - > add_text ( p_method . arguments . size ( ) | | is_vararg ? " ( " : " ( " ) ; <nl> + class_desc - > add_text ( " ( " ) ; <nl> class_desc - > pop ( ) ; <nl> <nl> for ( int j = 0 ; j < p_method . arguments . size ( ) ; j + + ) { <nl> class_desc - > push_color ( text_color ) ; <nl> if ( j > 0 ) <nl> class_desc - > add_text ( " , " ) ; <nl> - _add_type ( p_method . arguments [ j ] . type , p_method . arguments [ j ] . enumeration ) ; <nl> - class_desc - > add_text ( " " ) ; <nl> + <nl> _add_text ( p_method . arguments [ j ] . name ) ; <nl> + class_desc - > add_text ( " : " ) ; <nl> + _add_type ( p_method . arguments [ j ] . type , p_method . arguments [ j ] . enumeration ) ; <nl> if ( p_method . arguments [ j ] . default_value ! = " " ) { <nl> <nl> class_desc - > push_color ( symbol_color ) ; <nl> void EditorHelp : : _add_method ( const DocData : : MethodDoc & p_method , bool p_overview <nl> } <nl> <nl> class_desc - > push_color ( symbol_color ) ; <nl> - class_desc - > add_text ( p_method . arguments . size ( ) | | is_vararg ? " ) " : " ) " ) ; <nl> + class_desc - > add_text ( " ) " ) ; <nl> class_desc - > pop ( ) ; <nl> if ( p_method . qualifiers ! = " " ) { <nl> <nl> void EditorHelp : : _update_doc ( ) { <nl> <nl> class_desc - > push_color ( title_color ) ; <nl> class_desc - > push_font ( doc_title_font ) ; <nl> - class_desc - > add_text ( TTR ( " Brief Description : " ) ) ; <nl> + class_desc - > add_text ( TTR ( " Brief Description " ) ) ; <nl> class_desc - > pop ( ) ; <nl> class_desc - > pop ( ) ; <nl> <nl> void EditorHelp : : _update_doc ( ) { <nl> section_line . push_back ( Pair < String , int > ( TTR ( " Properties " ) , class_desc - > get_line_count ( ) - 2 ) ) ; <nl> class_desc - > push_color ( title_color ) ; <nl> class_desc - > push_font ( doc_title_font ) ; <nl> - class_desc - > add_text ( TTR ( " Properties : " ) ) ; <nl> + class_desc - > add_text ( TTR ( " Properties " ) ) ; <nl> class_desc - > pop ( ) ; <nl> class_desc - > pop ( ) ; <nl> <nl> void EditorHelp : : _update_doc ( ) { <nl> section_line . push_back ( Pair < String , int > ( TTR ( " Methods " ) , class_desc - > get_line_count ( ) - 2 ) ) ; <nl> class_desc - > push_color ( title_color ) ; <nl> class_desc - > push_font ( doc_title_font ) ; <nl> - class_desc - > add_text ( TTR ( " Methods : " ) ) ; <nl> + class_desc - > add_text ( TTR ( " Methods " ) ) ; <nl> class_desc - > pop ( ) ; <nl> class_desc - > pop ( ) ; <nl> <nl> void EditorHelp : : _update_doc ( ) { <nl> section_line . push_back ( Pair < String , int > ( TTR ( " Theme Properties " ) , class_desc - > get_line_count ( ) - 2 ) ) ; <nl> class_desc - > push_color ( title_color ) ; <nl> class_desc - > push_font ( doc_title_font ) ; <nl> - class_desc - > add_text ( TTR ( " Theme Properties : " ) ) ; <nl> + class_desc - > add_text ( TTR ( " Theme Properties " ) ) ; <nl> class_desc - > pop ( ) ; <nl> class_desc - > pop ( ) ; <nl> <nl> void EditorHelp : : _update_doc ( ) { <nl> section_line . push_back ( Pair < String , int > ( TTR ( " Signals " ) , class_desc - > get_line_count ( ) - 2 ) ) ; <nl> class_desc - > push_color ( title_color ) ; <nl> class_desc - > push_font ( doc_title_font ) ; <nl> - class_desc - > add_text ( TTR ( " Signals : " ) ) ; <nl> + class_desc - > add_text ( TTR ( " Signals " ) ) ; <nl> class_desc - > pop ( ) ; <nl> class_desc - > pop ( ) ; <nl> <nl> void EditorHelp : : _update_doc ( ) { <nl> _add_text ( cd . signals [ i ] . name ) ; <nl> class_desc - > pop ( ) ; <nl> class_desc - > push_color ( symbol_color ) ; <nl> - class_desc - > add_text ( cd . signals [ i ] . arguments . size ( ) ? " ( " : " ( " ) ; <nl> + class_desc - > add_text ( " ( " ) ; <nl> class_desc - > pop ( ) ; <nl> for ( int j = 0 ; j < cd . signals [ i ] . arguments . size ( ) ; j + + ) { <nl> class_desc - > push_color ( text_color ) ; <nl> if ( j > 0 ) <nl> class_desc - > add_text ( " , " ) ; <nl> - _add_type ( cd . signals [ i ] . arguments [ j ] . type ) ; <nl> - class_desc - > add_text ( " " ) ; <nl> + <nl> _add_text ( cd . signals [ i ] . arguments [ j ] . name ) ; <nl> + class_desc - > add_text ( " : " ) ; <nl> + _add_type ( cd . signals [ i ] . arguments [ j ] . type ) ; <nl> if ( cd . signals [ i ] . arguments [ j ] . default_value ! = " " ) { <nl> <nl> class_desc - > push_color ( symbol_color ) ; <nl> void EditorHelp : : _update_doc ( ) { <nl> } <nl> <nl> class_desc - > push_color ( symbol_color ) ; <nl> - class_desc - > add_text ( cd . signals [ i ] . arguments . size ( ) ? " ) " : " ) " ) ; <nl> + class_desc - > add_text ( " ) " ) ; <nl> class_desc - > pop ( ) ; <nl> class_desc - > pop ( ) ; / / end monofont <nl> if ( cd . signals [ i ] . description ! = " " ) { <nl> void EditorHelp : : _update_doc ( ) { <nl> section_line . push_back ( Pair < String , int > ( TTR ( " Enumerations " ) , class_desc - > get_line_count ( ) - 2 ) ) ; <nl> class_desc - > push_color ( title_color ) ; <nl> class_desc - > push_font ( doc_title_font ) ; <nl> - class_desc - > add_text ( TTR ( " Enumerations : " ) ) ; <nl> + class_desc - > add_text ( TTR ( " Enumerations " ) ) ; <nl> class_desc - > pop ( ) ; <nl> class_desc - > pop ( ) ; <nl> class_desc - > push_indent ( 1 ) ; <nl> void EditorHelp : : _update_doc ( ) { <nl> section_line . push_back ( Pair < String , int > ( TTR ( " Constants " ) , class_desc - > get_line_count ( ) - 2 ) ) ; <nl> class_desc - > push_color ( title_color ) ; <nl> class_desc - > push_font ( doc_title_font ) ; <nl> - class_desc - > add_text ( TTR ( " Constants : " ) ) ; <nl> + class_desc - > add_text ( TTR ( " Constants " ) ) ; <nl> class_desc - > pop ( ) ; <nl> class_desc - > pop ( ) ; <nl> class_desc - > push_indent ( 1 ) ; <nl> void EditorHelp : : _update_doc ( ) { <nl> description_line = class_desc - > get_line_count ( ) - 2 ; <nl> class_desc - > push_color ( title_color ) ; <nl> class_desc - > push_font ( doc_title_font ) ; <nl> - class_desc - > add_text ( TTR ( " Class Description : " ) ) ; <nl> + class_desc - > add_text ( TTR ( " Class Description " ) ) ; <nl> class_desc - > pop ( ) ; <nl> class_desc - > pop ( ) ; <nl> <nl> void EditorHelp : : _update_doc ( ) { <nl> { <nl> class_desc - > push_color ( title_color ) ; <nl> class_desc - > push_font ( doc_title_font ) ; <nl> - class_desc - > add_text ( TTR ( " Online Tutorials : " ) ) ; <nl> + class_desc - > add_text ( TTR ( " Online Tutorials " ) ) ; <nl> class_desc - > pop ( ) ; <nl> class_desc - > pop ( ) ; <nl> class_desc - > push_indent ( 1 ) ; <nl> void EditorHelp : : _update_doc ( ) { <nl> section_line . push_back ( Pair < String , int > ( TTR ( " Property Descriptions " ) , class_desc - > get_line_count ( ) - 2 ) ) ; <nl> class_desc - > push_color ( title_color ) ; <nl> class_desc - > push_font ( doc_title_font ) ; <nl> - class_desc - > add_text ( TTR ( " Property Descriptions : " ) ) ; <nl> + class_desc - > add_text ( TTR ( " Property Descriptions " ) ) ; <nl> class_desc - > pop ( ) ; <nl> class_desc - > pop ( ) ; <nl> <nl> void EditorHelp : : _update_doc ( ) { <nl> section_line . push_back ( Pair < String , int > ( TTR ( " Method Descriptions " ) , class_desc - > get_line_count ( ) - 2 ) ) ; <nl> class_desc - > push_color ( title_color ) ; <nl> class_desc - > push_font ( doc_title_font ) ; <nl> - class_desc - > add_text ( TTR ( " Method Descriptions : " ) ) ; <nl> + class_desc - > add_text ( TTR ( " Method Descriptions " ) ) ; <nl> class_desc - > pop ( ) ; <nl> class_desc - > pop ( ) ; <nl> <nl>
Merge pull request from Calinou / improve - editor - help - display
godotengine/godot
db47221b8c8491e21cdd0afdf3bc20bed5ce1618
2019-09-24T07:52:21Z
mmm a / fdbserver / workloads / BackupAndParallelRestoreCorrectness . actor . cpp <nl> ppp b / fdbserver / workloads / BackupAndParallelRestoreCorrectness . actor . cpp <nl> struct BackupAndParallelRestoreCorrectnessWorkload : TestWorkload { <nl> targetVersion = desc . minRestorableVersion . get ( ) ; <nl> } else if ( deterministicRandom ( ) - > random01 ( ) < 0 . 1 ) { <nl> targetVersion = desc . maxRestorableVersion . get ( ) ; <nl> - } else if ( deterministicRandom ( ) - > random01 ( ) < 0 . 5 ) { <nl> + } else if ( deterministicRandom ( ) - > random01 ( ) < 0 . 5 & & <nl> + desc . minRestorableVersion . get ( ) < desc . contiguousLogEnd . get ( ) ) { <nl> / / The assertion may fail because minRestorableVersion may be decided by snapshot version . <nl> / / ASSERT_WE_THINK ( desc . minRestorableVersion . get ( ) < = desc . contiguousLogEnd . get ( ) ) ; <nl> / / This assertion can fail when contiguousLogEnd < maxRestorableVersion and <nl>
Fix a test failure
apple/foundationdb
0e54f1ed31c3be93732c2adfef41e7b45b8b80bc
2020-04-21T05:26:42Z
mmm a / tests / test_core . py <nl> ppp b / tests / test_core . py <nl> def test_simd6 ( self ) : <nl> <nl> def test_simd7 ( self ) : <nl> # test_simd7 is to test negative zero handling . <nl> + return self . skip ( ' see issue # 3103 ' ) <nl> <nl> if Settings . ASM_JS : Settings . ASM_JS = 2 # does not validate <nl> if os . environ . get ( ' EMCC_FAST_COMPILER ' ) = = ' 0 ' : return self . skip ( ' needs fastcomp ' ) <nl>
temporarily disable test_simd7 ; issue
emscripten-core/emscripten
6fa69f8f4619da8ce4a00c3d3a2f8a94ee12f2a8
2014-12-21T18:59:53Z
mmm a / android / sdk / src / main / java / com / taobao / weex / common / WXPerformance . java <nl> ppp b / android / sdk / src / main / java / com / taobao / weex / common / WXPerformance . java <nl> public String toString ( ) { <nl> + " , componentCount : " + componentCount <nl> + " , syncTaskTime : " + syncTaskTime <nl> + " , pureNetworkTime : " + pureNetworkTime <nl> + + " , networkTime : " + networkTime <nl> + " , actualNetworkTime : " + actualNetworkTime <nl> + " , packageSpendTime : " + packageSpendTime <nl> + " , connectionType : " + connectionType <nl>
* [ android ] add network log
apache/incubator-weex
e230d69736d2484ffeef9c3be0b5b387e2cc5f11
2016-07-05T06:08:18Z
mmm a / . taskcluster . yml <nl> ppp b / . taskcluster . yml <nl> metadata : <nl> source : " { { event . head . repo . url } } " # the repo where the pr came from will be inserted here <nl> tasks : <nl> - provisionerId : " proj - deepspeech " <nl> - workerType : " ci " <nl> + workerType : " ci - decision - task " <nl> extra : <nl> github : <nl> env : true <nl> mmm a / taskcluster / . build . yml <nl> ppp b / taskcluster / . build . yml <nl> build : <nl> docker_image : " ubuntu : 16 . 04 " <nl> generic : <nl> workerType : ' ds - macos - light ' <nl> + workerType : ' ' <nl> system_setup : <nl> > <nl> true <nl> mmm a / taskcluster / . shared . yml <nl> ppp b / taskcluster / . shared . yml <nl> nodejs : <nl> prep_14 : ' / usr / bin / wget . exe https : / / nodejs . org / dist / v14 . 3 . 0 / node - v14 . 3 . 0 - win - x64 . zip & & " " C : \ Program Files \ 7 - zip \ 7z . exe " " x - o $ TASKCLUSTER_NODE_DIR - tzip - aoa node - v14 . 3 . 0 - win - x64 . zip & & rm node - * . zip & & export PATH = $ TASKCLUSTER_TASK_DIR / bin / node - v14 . 3 . 0 - win - x64 / : $ PATH ' <nl> system : <nl> node_gyp_cache : <nl> - url : ' https : / / community - tc . services . mozilla . com / api / index / v1 / task / project . deepspeech . node - gyp - cache . 7 / artifacts / public / node - gyp - cache . tar . gz ' <nl> - namespace : ' project . deepspeech . node - gyp - cache . 7 ' <nl> + url : ' https : / / community - tc . services . mozilla . com / api / index / v1 / task / project . deepspeech . node - gyp - cache . 8 / artifacts / public / node - gyp - cache . tar . gz ' <nl> + namespace : ' project . deepspeech . node - gyp - cache . 8 ' <nl> homebrew_builds : <nl> url : ' https : / / community - tc . services . mozilla . com / api / index / v1 / task / project . deepspeech . homebrew_builds . 8 / artifacts / public / homebrew_builds . tar . gz ' <nl> namespace : ' project . deepspeech . homebrew_builds . 8 ' <nl> system : <nl> android_cache : <nl> arm64_v8a : <nl> android_24 : <nl> - url : ' https : / / community - tc . services . mozilla . com / api / index / v1 / task / project . deepspeech . android_cache . arm64 - v8a . android - 24 . 6 / artifacts / public / android_cache . tar . gz ' <nl> - namespace : ' project . deepspeech . android_cache . arm64 - v8a . android - 24 . 6 ' <nl> + url : ' https : / / community - tc . services . mozilla . com / api / index / v1 / task / project . deepspeech . android_cache . arm64 - v8a . android - 24 . 7 / artifacts / public / android_cache . tar . gz ' <nl> + namespace : ' project . deepspeech . android_cache . arm64 - v8a . android - 24 . 7 ' <nl> android_25 : <nl> - url : ' https : / / community - tc . services . mozilla . com / api / index / v1 / task / project . deepspeech . android_cache . arm64 - v8a . android - 25 . 6 / artifacts / public / android_cache . tar . gz ' <nl> - namespace : ' project . deepspeech . android_cache . arm64 - v8a . android - 25 . 6 ' <nl> + url : ' https : / / community - tc . services . mozilla . com / api / index / v1 / task / project . deepspeech . android_cache . arm64 - v8a . android - 25 . 7 / artifacts / public / android_cache . tar . gz ' <nl> + namespace : ' project . deepspeech . android_cache . arm64 - v8a . android - 25 . 7 ' <nl> armeabi_v7a : <nl> android_24 : <nl> - url : ' https : / / community - tc . services . mozilla . com / api / index / v1 / task / project . deepspeech . android_cache . armeabi - v7a . android - 24 . 6 / artifacts / public / android_cache . tar . gz ' <nl> - namespace : ' project . deepspeech . android_cache . armeabi - v7a . android - 24 . 6 ' <nl> + url : ' https : / / community - tc . services . mozilla . com / api / index / v1 / task / project . deepspeech . android_cache . armeabi - v7a . android - 24 . 7 / artifacts / public / android_cache . tar . gz ' <nl> + namespace : ' project . deepspeech . android_cache . armeabi - v7a . android - 24 . 7 ' <nl> android_25 : <nl> - url : ' https : / / community - tc . services . mozilla . com / api / index / v1 / task / project . deepspeech . android_cache . armeabi - v7a . android - 25 . 6 / artifacts / public / android_cache . tar . gz ' <nl> - namespace : ' project . deepspeech . android_cache . armeabi - v7a . android - 25 . 6 ' <nl> + url : ' https : / / community - tc . services . mozilla . com / api / index / v1 / task / project . deepspeech . android_cache . armeabi - v7a . android - 25 . 7 / artifacts / public / android_cache . tar . gz ' <nl> + namespace : ' project . deepspeech . android_cache . armeabi - v7a . android - 25 . 7 ' <nl> x86_64 : <nl> android_24 : <nl> - url : ' https : / / community - tc . services . mozilla . com / api / index / v1 / task / project . deepspeech . android_cache . x86_64 . android - 24 . 6 / artifacts / public / android_cache . tar . gz ' <nl> - namespace : ' project . deepspeech . android_cache . x86_64 . android - 24 . 6 ' <nl> + url : ' https : / / community - tc . services . mozilla . com / api / index / v1 / task / project . deepspeech . android_cache . x86_64 . android - 24 . 7 / artifacts / public / android_cache . tar . gz ' <nl> + namespace : ' project . deepspeech . android_cache . x86_64 . android - 24 . 7 ' <nl> android_25 : <nl> - url : ' https : / / community - tc . services . mozilla . com / api / index / v1 / task / project . deepspeech . android_cache . x86_64 . android - 25 . 6 / artifacts / public / android_cache . tar . gz ' <nl> - namespace : ' project . deepspeech . android_cache . x86_64 . android - 25 . 6 ' <nl> + url : ' https : / / community - tc . services . mozilla . com / api / index / v1 / task / project . deepspeech . android_cache . x86_64 . android - 25 . 7 / artifacts / public / android_cache . tar . gz ' <nl> + namespace : ' project . deepspeech . android_cache . x86_64 . android - 25 . 7 ' <nl> android_26 : <nl> - url : ' https : / / community - tc . services . mozilla . com / api / index / v1 / task / project . deepspeech . android_cache . x86_64 . android - 26 . 2 / artifacts / public / android_cache . tar . gz ' <nl> - namespace : ' project . deepspeech . android_cache . x86_64 . android - 26 . 2 ' <nl> + url : ' https : / / community - tc . services . mozilla . com / api / index / v1 / task / project . deepspeech . android_cache . x86_64 . android - 26 . 3 / artifacts / public / android_cache . tar . gz ' <nl> + namespace : ' project . deepspeech . android_cache . x86_64 . android - 26 . 3 ' <nl> android_27 : <nl> - url : ' https : / / community - tc . services . mozilla . com / api / index / v1 / task / project . deepspeech . android_cache . x86_64 . android - 27 . 2 / artifacts / public / android_cache . tar . gz ' <nl> - namespace : ' project . deepspeech . android_cache . x86_64 . android - 27 . 2 ' <nl> + url : ' https : / / community - tc . services . mozilla . com / api / index / v1 / task / project . deepspeech . android_cache . x86_64 . android - 27 . 3 / artifacts / public / android_cache . tar . gz ' <nl> + namespace : ' project . deepspeech . android_cache . x86_64 . android - 27 . 3 ' <nl> android_28 : <nl> - url : ' https : / / community - tc . services . mozilla . com / api / index / v1 / task / project . deepspeech . android_cache . x86_64 . android - 28 . 2 / artifacts / public / android_cache . tar . gz ' <nl> - namespace : ' project . deepspeech . android_cache . x86_64 . android - 28 . 2 ' <nl> + url : ' https : / / community - tc . services . mozilla . com / api / index / v1 / task / project . deepspeech . android_cache . x86_64 . android - 28 . 3 / artifacts / public / android_cache . tar . gz ' <nl> + namespace : ' project . deepspeech . android_cache . x86_64 . android - 28 . 3 ' <nl> android_29 : <nl> - url : ' https : / / community - tc . services . mozilla . com / api / index / v1 / task / project . deepspeech . android_cache . x86_64 . android - 29 . 2 / artifacts / public / android_cache . tar . gz ' <nl> - namespace : ' project . deepspeech . android_cache . x86_64 . android - 29 . 2 ' <nl> + url : ' https : / / community - tc . services . mozilla . com / api / index / v1 / task / project . deepspeech . android_cache . x86_64 . android - 29 . 3 / artifacts / public / android_cache . tar . gz ' <nl> + namespace : ' project . deepspeech . android_cache . x86_64 . android - 29 . 3 ' <nl> android_30 : <nl> - url : ' https : / / community - tc . services . mozilla . com / api / index / v1 / task / project . deepspeech . android_cache . x86_64 . android - 30 . 2 / artifacts / public / android_cache . tar . gz ' <nl> - namespace : ' project . deepspeech . android_cache . x86_64 . android - 30 . 2 ' <nl> + url : ' https : / / community - tc . services . mozilla . com / api / index / v1 / task / project . deepspeech . android_cache . x86_64 . android - 30 . 3 / artifacts / public / android_cache . tar . gz ' <nl> + namespace : ' project . deepspeech . android_cache . x86_64 . android - 30 . 3 ' <nl> sdk : <nl> android_27 : <nl> - url : ' https : / / community - tc . services . mozilla . com / api / index / v1 / task / project . deepspeech . android_cache . sdk . android - 27 . 6 / artifacts / public / android_cache . tar . gz ' <nl> - namespace : ' project . deepspeech . android_cache . sdk . android - 27 . 6 ' <nl> + url : ' https : / / community - tc . services . mozilla . com / api / index / v1 / task / project . deepspeech . android_cache . sdk . android - 27 . 7 / artifacts / public / android_cache . tar . gz ' <nl> + namespace : ' project . deepspeech . android_cache . sdk . android - 27 . 7 ' <nl> gradle_cache : <nl> - url : ' https : / / community - tc . services . mozilla . com / api / index / v1 / task / project . deepspeech . gradle . 6 / artifacts / public / gradle . tar . gz ' <nl> - namespace : ' project . deepspeech . gradle . 6 ' <nl> + url : ' https : / / community - tc . services . mozilla . com / api / index / v1 / task / project . deepspeech . gradle . 7 / artifacts / public / gradle . tar . gz ' <nl> + namespace : ' project . deepspeech . gradle . 7 ' <nl> pyenv : <nl> linux : <nl> - url : ' https : / / community - tc . services . mozilla . com / api / index / v1 / task / project . deepspeech . pyenv . linux . 8 / artifacts / public / pyenv . tar . gz ' <nl> - namespace : ' project . deepspeech . pyenv . linux . 8 ' <nl> + url : ' https : / / community - tc . services . mozilla . com / api / index / v1 / task / project . deepspeech . pyenv . linux . 9 / artifacts / public / pyenv . tar . gz ' <nl> + namespace : ' project . deepspeech . pyenv . linux . 9 ' <nl> osx : <nl> url : ' https : / / community - tc . services . mozilla . com / api / index / v1 / task / project . deepspeech . pyenv . osx . 9 / artifacts / public / pyenv . tar . gz ' <nl> namespace : ' project . deepspeech . pyenv . osx . 9 ' <nl> system : <nl> namespace : ' project . deepspeech . pyenv . win . 8 ' <nl> swig : <nl> repo : " https : / / github . com / lissyx / swig " <nl> - sha1 : " b5fea54d39832d1d132d7dd921b69c0c2c9d5118 " <nl> + sha1 : " 1a4c14945012f1282c2eddc174fb7674d5295de8 " <nl> swig_build : <nl> linux : <nl> - url : " https : / / community - tc . services . mozilla . com / api / index / v1 / task / project . deepspeech . swig . linux . amd64 . b5fea54d39832d1d132d7dd921b69c0c2c9d5118 / artifacts / public / ds - swig . tar . gz " <nl> - namespace : " project . deepspeech . swig . linux . amd64 . b5fea54d39832d1d132d7dd921b69c0c2c9d5118 " <nl> + url : " https : / / community - tc . services . mozilla . com / api / index / v1 / task / project . deepspeech . swig . linux . amd64 . 1a4c14945012f1282c2eddc174fb7674d5295de8 . 0 / artifacts / public / ds - swig . tar . gz " <nl> + namespace : " project . deepspeech . swig . linux . amd64 . 1a4c14945012f1282c2eddc174fb7674d5295de8 . 0 " <nl> osx : <nl> url : " https : / / community - tc . services . mozilla . com / api / index / v1 / task / project . deepspeech . swig . darwin . amd64 . b5fea54d39832d1d132d7dd921b69c0c2c9d5118 / artifacts / public / ds - swig . tar . gz " <nl> namespace : " project . deepspeech . swig . darwin . amd64 . b5fea54d39832d1d132d7dd921b69c0c2c9d5118 " <nl> win : <nl> - url : " https : / / community - tc . services . mozilla . com / api / index / v1 / task / project . deepspeech . swig . win . amd64 . b5fea54d39832d1d132d7dd921b69c0c2c9d5118 / artifacts / public / ds - swig . tar . gz " <nl> - namespace : " project . deepspeech . swig . win . amd64 . b5fea54d39832d1d132d7dd921b69c0c2c9d5118 " <nl> + url : " https : / / community - tc . services . mozilla . com / api / index / v1 / task / project . deepspeech . swig . win . amd64 . 1a4c14945012f1282c2eddc174fb7674d5295de8 . 0 / artifacts / public / ds - swig . tar . gz " <nl> + namespace : " project . deepspeech . swig . win . amd64 . 1a4c14945012f1282c2eddc174fb7674d5295de8 . 0 " <nl> tensorflow : <nl> linux_amd64_cpu : <nl> - url : " https : / / community - tc . services . mozilla . com / api / index / v1 / task / project . deepspeech . tensorflow . pip . r2 . 2 . 1c1b2b9dd9ce767796a8414efbf65da1b67d1622 . 0 . cpu / artifacts / public / home . tar . xz " <nl> - namespace : " project . deepspeech . tensorflow . pip . r2 . 2 . 1c1b2b9dd9ce767796a8414efbf65da1b67d1622 . 0 . cpu " <nl> + url : " https : / / community - tc . services . mozilla . com / api / index / v1 / task / project . deepspeech . tensorflow . pip . r2 . 2 . 1c1b2b9dd9ce767796a8414efbf65da1b67d1622 . 1 . cpu / artifacts / public / home . tar . xz " <nl> + namespace : " project . deepspeech . tensorflow . pip . r2 . 2 . 1c1b2b9dd9ce767796a8414efbf65da1b67d1622 . 1 . cpu " <nl> linux_amd64_cuda : <nl> - url : " https : / / community - tc . services . mozilla . com / api / index / v1 / task / project . deepspeech . tensorflow . pip . r2 . 2 . 1c1b2b9dd9ce767796a8414efbf65da1b67d1622 . 0 . cuda / artifacts / public / home . tar . xz " <nl> - namespace : " project . deepspeech . tensorflow . pip . r2 . 2 . 1c1b2b9dd9ce767796a8414efbf65da1b67d1622 . 0 . cuda " <nl> + url : " https : / / community - tc . services . mozilla . com / api / index / v1 / task / project . deepspeech . tensorflow . pip . r2 . 2 . 1c1b2b9dd9ce767796a8414efbf65da1b67d1622 . 1 . cuda / artifacts / public / home . tar . xz " <nl> + namespace : " project . deepspeech . tensorflow . pip . r2 . 2 . 1c1b2b9dd9ce767796a8414efbf65da1b67d1622 . 1 . cuda " <nl> linux_armv7 : <nl> - url : " https : / / community - tc . services . mozilla . com / api / index / v1 / task / project . deepspeech . tensorflow . pip . r2 . 2 . 1c1b2b9dd9ce767796a8414efbf65da1b67d1622 . 0 . arm / artifacts / public / home . tar . xz " <nl> - namespace : " project . deepspeech . tensorflow . pip . r2 . 2 . 1c1b2b9dd9ce767796a8414efbf65da1b67d1622 . 0 . arm " <nl> + url : " https : / / community - tc . services . mozilla . com / api / index / v1 / task / project . deepspeech . tensorflow . pip . r2 . 2 . 1c1b2b9dd9ce767796a8414efbf65da1b67d1622 . 1 . arm / artifacts / public / home . tar . xz " <nl> + namespace : " project . deepspeech . tensorflow . pip . r2 . 2 . 1c1b2b9dd9ce767796a8414efbf65da1b67d1622 . 1 . arm " <nl> linux_arm64 : <nl> - url : " https : / / community - tc . services . mozilla . com / api / index / v1 / task / project . deepspeech . tensorflow . pip . r2 . 2 . 1c1b2b9dd9ce767796a8414efbf65da1b67d1622 . 0 . arm64 / artifacts / public / home . tar . xz " <nl> - namespace : " project . deepspeech . tensorflow . pip . r2 . 2 . 1c1b2b9dd9ce767796a8414efbf65da1b67d1622 . 0 . arm64 " <nl> + url : " https : / / community - tc . services . mozilla . com / api / index / v1 / task / project . deepspeech . tensorflow . pip . r2 . 2 . 1c1b2b9dd9ce767796a8414efbf65da1b67d1622 . 1 . arm64 / artifacts / public / home . tar . xz " <nl> + namespace : " project . deepspeech . tensorflow . pip . r2 . 2 . 1c1b2b9dd9ce767796a8414efbf65da1b67d1622 . 1 . arm64 " <nl> darwin_amd64 : <nl> url : " https : / / community - tc . services . mozilla . com / api / index / v1 / task / project . deepspeech . tensorflow . pip . r2 . 2 . 1c1b2b9dd9ce767796a8414efbf65da1b67d1622 . 0 . osx / artifacts / public / home . tar . xz " <nl> namespace : " project . deepspeech . tensorflow . pip . r2 . 2 . 1c1b2b9dd9ce767796a8414efbf65da1b67d1622 . 0 . osx " <nl> android_arm64 : <nl> - url : " https : / / community - tc . services . mozilla . com / api / index / v1 / task / project . deepspeech . tensorflow . pip . r2 . 2 . 1c1b2b9dd9ce767796a8414efbf65da1b67d1622 . 0 . android - arm64 / artifacts / public / home . tar . xz " <nl> - namespace : " project . deepspeech . tensorflow . pip . r2 . 2 . 1c1b2b9dd9ce767796a8414efbf65da1b67d1622 . 0 . android - arm64 " <nl> + url : " https : / / community - tc . services . mozilla . com / api / index / v1 / task / project . deepspeech . tensorflow . pip . r2 . 2 . 1c1b2b9dd9ce767796a8414efbf65da1b67d1622 . 1 . android - arm64 / artifacts / public / home . tar . xz " <nl> + namespace : " project . deepspeech . tensorflow . pip . r2 . 2 . 1c1b2b9dd9ce767796a8414efbf65da1b67d1622 . 1 . android - arm64 " <nl> android_armv7 : <nl> - url : " https : / / community - tc . services . mozilla . com / api / index / v1 / task / project . deepspeech . tensorflow . pip . r2 . 2 . 1c1b2b9dd9ce767796a8414efbf65da1b67d1622 . 0 . android - armv7 / artifacts / public / home . tar . xz " <nl> - namespace : " project . deepspeech . tensorflow . pip . r2 . 2 . 1c1b2b9dd9ce767796a8414efbf65da1b67d1622 . 0 . android - armv7 " <nl> + url : " https : / / community - tc . services . mozilla . com / api / index / v1 / task / project . deepspeech . tensorflow . pip . r2 . 2 . 1c1b2b9dd9ce767796a8414efbf65da1b67d1622 . 1 . android - armv7 / artifacts / public / home . tar . xz " <nl> + namespace : " project . deepspeech . tensorflow . pip . r2 . 2 . 1c1b2b9dd9ce767796a8414efbf65da1b67d1622 . 1 . android - armv7 " <nl> win_amd64_cpu : <nl> url : " https : / / community - tc . services . mozilla . com / api / index / v1 / task / project . deepspeech . tensorflow . pip . r2 . 2 . 1c1b2b9dd9ce767796a8414efbf65da1b67d1622 . 0 . win / artifacts / public / home . tar . xz " <nl> namespace : " project . deepspeech . tensorflow . pip . r2 . 2 . 1c1b2b9dd9ce767796a8414efbf65da1b67d1622 . 0 . win " <nl> system : <nl> msys2 : <nl> url : ' https : / / github . com / msys2 / msys2 - installer / releases / download / 2020 - 07 - 20 / msys2 - base - x86_64 - 20200720 . tar . xz ' <nl> sha : ' 24f0a7a3f499d9309bb55bcde5d34a08e752922c3bee9de3a33d2c40896a1496 ' <nl> + docker : <nl> + smallTask : ' ci - decision - task ' <nl> + smallTaskBeta : ' ci - decision - task - b ' <nl> + tfBuild : ' ci - tf - build ' <nl> + tfBuildBeta : ' ci - tf - build - b ' <nl> + dsBuild : ' ci - ds - build ' <nl> + dsBuildBeta : ' ci - ds - build - b ' <nl> + dsTests : ' ci - ds - tests ' <nl> + dsTestsBeta : ' ci - ds - tests - b ' <nl> + dsHighMemTests : ' ci - ds - mem - tests ' <nl> + dsHighMemTestsBeta : ' ci - ds - mem - tests - b ' <nl> mmm a / taskcluster / android - arm64 - cpu - opt . yml <nl> ppp b / taskcluster / android - arm64 - cpu - opt . yml <nl> build : <nl> build : " taskcluster / android - build . sh arm64 - v8a " <nl> package : " taskcluster / android - package . sh arm64 - v8a " <nl> nc_asset_name : " native_client . arm64 . cpu . android . tar . xz " <nl> + workerType : " $ { docker . dsBuild } " <nl> metadata : <nl> name : " DeepSpeech Android ARM64 " <nl> description : " Building DeepSpeech for Android ARM64 , optimized version " <nl> mmm a / taskcluster / android - armv7 - cpu - opt . yml <nl> ppp b / taskcluster / android - armv7 - cpu - opt . yml <nl> build : <nl> build : " taskcluster / android - build . sh armeabi - v7a " <nl> package : " taskcluster / android - package . sh armeabi - v7a " <nl> nc_asset_name : " native_client . armv7 . cpu . android . tar . xz " <nl> + workerType : " $ { docker . dsBuild } " <nl> metadata : <nl> name : " DeepSpeech Android ARMv7 " <nl> description : " Building DeepSpeech for Android ARMv7 , optimized version " <nl> mmm a / taskcluster / android - cache - arm64 - v8a - android - 24 . yml <nl> ppp b / taskcluster / android - cache - arm64 - v8a - android - 24 . yml <nl> build : <nl> setup : " taskcluster / tc - true . sh " <nl> build : " taskcluster / android_cache - build . sh arm64 - v8a android - 24 " <nl> package : " taskcluster / android_cache - package . sh " <nl> + workerType : " $ { docker . smallTask } " <nl> metadata : <nl> name : " Builds Android cache arm64 - v8a / android - 24 " <nl> description : " Setup an Android SDK / emulator cache for Android arm64 - v8a / android - 24 " <nl> mmm a / taskcluster / android - cache - arm64 - v8a - android - 25 . yml <nl> ppp b / taskcluster / android - cache - arm64 - v8a - android - 25 . yml <nl> build : <nl> setup : " taskcluster / tc - true . sh " <nl> build : " taskcluster / android_cache - build . sh arm64 - v8a android - 25 " <nl> package : " taskcluster / android_cache - package . sh " <nl> + workerType : " $ { docker . smallTask } " <nl> metadata : <nl> name : " Builds Android cache arm64 - v8a / android - 25 " <nl> description : " Setup an Android SDK / emulator cache for Android arm64 - v8a / android - 25 " <nl> mmm a / taskcluster / android - cache - armeabi - v7a - android - 24 . yml <nl> ppp b / taskcluster / android - cache - armeabi - v7a - android - 24 . yml <nl> build : <nl> setup : " taskcluster / tc - true . sh " <nl> build : " taskcluster / android_cache - build . sh armeabi - v7a android - 24 default " <nl> package : " taskcluster / android_cache - package . sh " <nl> + workerType : " $ { docker . smallTask } " <nl> metadata : <nl> name : " Builds Android cache armeabi - v7a / android - 24 " <nl> description : " Setup an Android SDK / emulator cache for Android armeabi - v7a / android - 24 " <nl> mmm a / taskcluster / android - cache - armeabi - v7a - android - 25 . yml <nl> ppp b / taskcluster / android - cache - armeabi - v7a - android - 25 . yml <nl> build : <nl> setup : " taskcluster / tc - true . sh " <nl> build : " taskcluster / android_cache - build . sh armeabi - v7a android - 25 " <nl> package : " taskcluster / android_cache - package . sh " <nl> + workerType : " $ { docker . smallTask } " <nl> metadata : <nl> name : " Builds Android cache armeabi - v7a / android - 25 " <nl> description : " Setup an Android SDK / emulator cache for Android armeabi - v7a / android - 25 " <nl> mmm a / taskcluster / android - cache - sdk - android - 27 . yml <nl> ppp b / taskcluster / android - cache - sdk - android - 27 . yml <nl> build : <nl> setup : " taskcluster / tc - true . sh " <nl> build : " taskcluster / android_cache - build . sh sdk android - 27 " <nl> package : " taskcluster / android_cache - package . sh " <nl> + workerType : " $ { docker . smallTask } " <nl> metadata : <nl> name : " Builds Android cache sdk / android - 27 " <nl> description : " Setup an Android SDK / emulator cache for Android sdk / android - 27 " <nl> mmm a / taskcluster / android - cache - x86_64 - android - 24 . yml <nl> ppp b / taskcluster / android - cache - x86_64 - android - 24 . yml <nl> build : <nl> setup : " taskcluster / tc - true . sh " <nl> build : " taskcluster / android_cache - build . sh x86_64 android - 24 " <nl> package : " taskcluster / android_cache - package . sh " <nl> + workerType : " $ { docker . smallTask } " <nl> metadata : <nl> name : " Builds Android cache x86_64 / android - 24 " <nl> description : " Setup an Android SDK / emulator cache for Android x86_64 / android - 24 " <nl> mmm a / taskcluster / android - cache - x86_64 - android - 25 . yml <nl> ppp b / taskcluster / android - cache - x86_64 - android - 25 . yml <nl> build : <nl> setup : " taskcluster / tc - true . sh " <nl> build : " taskcluster / android_cache - build . sh x86_64 android - 25 " <nl> package : " taskcluster / android_cache - package . sh " <nl> + workerType : " $ { docker . smallTask } " <nl> metadata : <nl> name : " Builds Android cache x86_64 / android - 25 " <nl> description : " Setup an Android SDK / emulator cache for Android / x86_64 android - 25 " <nl> mmm a / taskcluster / android - cache - x86_64 - android - 26 . yml <nl> ppp b / taskcluster / android - cache - x86_64 - android - 26 . yml <nl> build : <nl> setup : " taskcluster / tc - true . sh " <nl> build : " taskcluster / android_cache - build . sh x86_64 android - 26 " <nl> package : " taskcluster / android_cache - package . sh " <nl> + workerType : " $ { docker . smallTask } " <nl> metadata : <nl> name : " Builds Android cache x86_64 / android - 26 " <nl> description : " Setup an Android SDK / emulator cache for Android / x86_64 android - 26 " <nl> mmm a / taskcluster / android - cache - x86_64 - android - 28 . yml <nl> ppp b / taskcluster / android - cache - x86_64 - android - 28 . yml <nl> build : <nl> setup : " taskcluster / tc - true . sh " <nl> build : " taskcluster / android_cache - build . sh x86_64 android - 28 " <nl> package : " taskcluster / android_cache - package . sh " <nl> + workerType : " $ { docker . smallTask } " <nl> metadata : <nl> name : " Builds Android cache x86_64 / android - 28 " <nl> description : " Setup an Android SDK / emulator cache for Android / x86_64 android - 28 " <nl> mmm a / taskcluster / android - cache - x86_64 - android - 29 . yml <nl> ppp b / taskcluster / android - cache - x86_64 - android - 29 . yml <nl> build : <nl> setup : " taskcluster / tc - true . sh " <nl> build : " taskcluster / android_cache - build . sh x86_64 android - 29 " <nl> package : " taskcluster / android_cache - package . sh " <nl> + workerType : " $ { docker . smallTask } " <nl> metadata : <nl> name : " Builds Android cache x86_64 / android - 29 " <nl> description : " Setup an Android SDK / emulator cache for Android / x86_64 android - 29 " <nl> mmm a / taskcluster / android - cache - x86_64 - android - 30 . yml <nl> ppp b / taskcluster / android - cache - x86_64 - android - 30 . yml <nl> build : <nl> setup : " taskcluster / tc - true . sh " <nl> build : " taskcluster / android_cache - build . sh x86_64 android - 30 " <nl> package : " taskcluster / android_cache - package . sh " <nl> + workerType : " $ { docker . smallTask } " <nl> metadata : <nl> name : " Builds Android cache x86_64 / android - 30 " <nl> description : " Setup an Android SDK / emulator cache for Android / x86_64 android - 30 " <nl> mmm a / taskcluster / android - java - opt . yml <nl> ppp b / taskcluster / android - java - opt . yml <nl> build : <nl> build : " taskcluster / android - apk - build . sh " <nl> package : " taskcluster / android - apk - package . sh " <nl> nc_asset_name : " native_client . apk . cpu . android . tar . xz " <nl> + workerType : " $ { docker . dsBuild } " <nl> metadata : <nl> name : " DeepSpeech Android APK ( ARM64 + ARMv7 + x86_64 ) " <nl> description : " Building DeepSpeech for Android APK ( ARM64 + ARMv7 + x86_64 ) , optimized version " <nl> mmm a / taskcluster / android - x86_64 - cpu - opt . yml <nl> ppp b / taskcluster / android - x86_64 - cpu - opt . yml <nl> build : <nl> build : " taskcluster / android - build . sh x86_64 " <nl> package : " taskcluster / android - package . sh x86_64 " <nl> nc_asset_name : " native_client . x86_64 . cpu . android . tar . xz " <nl> + workerType : " $ { docker . dsBuild } " <nl> metadata : <nl> name : " DeepSpeech Android x86_64 " <nl> description : " Building DeepSpeech for Android x86_64 , optimized version " <nl> mmm a / taskcluster / docker - build - base . tyml <nl> ppp b / taskcluster / docker - build - base . tyml <nl> $ if : ' ( event . event ! = " push " ) & & ( event . event ! = " tag " ) ' <nl> then : <nl> taskId : $ { taskcluster . taskId } <nl> provisionerId : $ { taskcluster . docker . provisionerId } <nl> - workerType : $ { taskcluster . docker . workerType } <nl> + workerType : $ { build . workerType } <nl> taskGroupId : $ { taskcluster . taskGroupId } <nl> schedulerId : $ { taskcluster . schedulerId } <nl> created : { $ fromNow : ' 0 sec ' } <nl> mmm a / taskcluster / docker - image - build . yml <nl> ppp b / taskcluster / docker - image - build . yml <nl> <nl> build : <nl> template_file : docker - build - base . tyml <nl> dockerfile : " Dockerfile . build " <nl> + workerType : " $ { docker . dsBuild } " <nl> metadata : <nl> name : " DeepSpeech Docker build " <nl> description : " Testing | docker build | of DeepSpeech build image " <nl> mmm a / taskcluster / docker - image - train . yml <nl> ppp b / taskcluster / docker - image - train . yml <nl> <nl> build : <nl> template_file : docker - build - base . tyml <nl> dockerfile : " Dockerfile . train " <nl> + workerType : " $ { docker . dsBuild } " <nl> metadata : <nl> name : " DeepSpeech Docker train " <nl> description : " Testing | docker build | of DeepSpeech train image " <nl> mmm a / taskcluster / docs . tyml <nl> ppp b / taskcluster / docs . tyml <nl> $ if : ' event . event in build . allowed ' <nl> then : <nl> taskId : $ { taskcluster . taskId } <nl> provisionerId : $ { taskcluster . docker . provisionerId } <nl> - workerType : $ { taskcluster . docker . workerType } <nl> + workerType : $ { build . workerType } <nl> taskGroupId : $ { taskcluster . taskGroupId } <nl> schedulerId : $ { taskcluster . schedulerId } <nl> dependencies : <nl> mmm a / taskcluster / docs . yml <nl> ppp b / taskcluster / docs . yml <nl> build : <nl> scripts : <nl> build : " taskcluster / docs - build . sh " <nl> package : " taskcluster / docs - package . sh " <nl> + workerType : " $ { docker . smallTask } " <nl> metadata : <nl> name : " DeepSpeech API Documentation " <nl> description : " Building DeepSpeech API Documentation " <nl> mmm a / taskcluster / examples - base . tyml <nl> ppp b / taskcluster / examples - base . tyml <nl> $ if : ' ( event . event ! = " push " ) & & ( event . event ! = " tag " ) ' <nl> then : <nl> taskId : $ { taskcluster . taskId } <nl> provisionerId : $ { taskcluster . docker . provisionerId } <nl> - workerType : $ { taskcluster . docker . workerType } <nl> + workerType : $ { build . workerType } <nl> taskGroupId : $ { taskcluster . taskGroupId } <nl> schedulerId : $ { taskcluster . schedulerId } <nl> dependencies : <nl> mmm a / taskcluster / examples - ffmpeg_vad_streaming - node10 . yml <nl> ppp b / taskcluster / examples - ffmpeg_vad_streaming - node10 . yml <nl> build : <nl> apt - get - qq - y install ffmpeg <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / examples / ffmpeg_vad_streaming / test . sh " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech examples : ffmpeg VAD Streaming NodeJS v10 . x " <nl> description : " DeepSpeech examples : ffmpeg VAD Streaming NodeJS v10 . x " <nl> mmm a / taskcluster / examples - ffmpeg_vad_streaming - node12 . yml <nl> ppp b / taskcluster / examples - ffmpeg_vad_streaming - node12 . yml <nl> build : <nl> apt - get - qq - y install ffmpeg <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / examples / ffmpeg_vad_streaming / test . sh " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech examples : ffmpeg VAD Streaming NodeJS v12 . x " <nl> description : " DeepSpeech examples : ffmpeg VAD Streaming NodeJS v12 . x " <nl> mmm a / taskcluster / examples - mic_vad_streaming - py36 . yml <nl> ppp b / taskcluster / examples - mic_vad_streaming - py36 . yml <nl> build : <nl> apt - get - qq - y install portaudio19 - dev pulseaudio <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / examples / mic_vad_streaming / test . sh 3 . 6 . 0 : m " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech examples : mic VAD streaming Py3 . 6 " <nl> description : " DeepSpeech examples : mic VAD streaming Python 3 . 6 " <nl> mmm a / taskcluster / examples - mic_vad_streaming - py37 . yml <nl> ppp b / taskcluster / examples - mic_vad_streaming - py37 . yml <nl> build : <nl> apt - get - qq - y install portaudio19 - dev pulseaudio <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / examples / mic_vad_streaming / test . sh 3 . 7 . 0 : m " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech examples : mic VAD streaming Py3 . 7 " <nl> description : " DeepSpeech examples : mic VAD streaming Python 3 . 7 " <nl> mmm a / taskcluster / examples - nodejs_wav - node10 . yml <nl> ppp b / taskcluster / examples - nodejs_wav - node10 . yml <nl> build : <nl> - " linux - amd64 - cpu - opt " <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / examples / nodejs_wav / test . sh " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech examples : NodeJS WAV NodeJS v10 . x " <nl> description : " DeepSpeech examples : NodeJS WAV NodeJS v10 . x " <nl> mmm a / taskcluster / examples - nodejs_wav - node12 . yml <nl> ppp b / taskcluster / examples - nodejs_wav - node12 . yml <nl> build : <nl> - " linux - amd64 - cpu - opt " <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / examples / nodejs_wav / test . sh " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech examples : NodeJS WAV NodeJS v12 . x " <nl> description : " DeepSpeech examples : NodeJS WAV NodeJS v12 . x " <nl> mmm a / taskcluster / examples - vad_transcriber - py35 . yml <nl> ppp b / taskcluster / examples - vad_transcriber - py35 . yml <nl> build : <nl> - " linux - amd64 - cpu - opt " <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / examples / vad_transcriber / test . sh 3 . 5 . 0 : m " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech examples : VAD transcriber Py3 . 5 " <nl> description : " DeepSpeech examples : VAD transcriberaming Python 3 . 5 " <nl> mmm a / taskcluster / examples - vad_transcriber - py36 . yml <nl> ppp b / taskcluster / examples - vad_transcriber - py36 . yml <nl> build : <nl> - " linux - amd64 - cpu - opt " <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / examples / vad_transcriber / test . sh 3 . 6 . 0 : m " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech examples : VAD transcriber Py3 . 6 " <nl> description : " DeepSpeech examples : VAD transcriberaming Python 3 . 6 " <nl> mmm a / taskcluster / examples - vad_transcriber - py37 . yml <nl> ppp b / taskcluster / examples - vad_transcriber - py37 . yml <nl> build : <nl> - " linux - amd64 - cpu - opt " <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / examples / vad_transcriber / test . sh 3 . 7 . 0 : m " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech examples : VAD transcriber Py3 . 7 " <nl> description : " DeepSpeech examples : VAD transcriberaming Python 3 . 7 " <nl> mmm a / taskcluster / examples - vad_transcriber - py38 . yml <nl> ppp b / taskcluster / examples - vad_transcriber - py38 . yml <nl> build : <nl> - " linux - amd64 - cpu - opt " <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / examples / vad_transcriber / test . sh 3 . 8 . 0 : " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech examples : VAD transcriber Py3 . 8 " <nl> description : " DeepSpeech examples : VAD transcriberaming Python 3 . 8 " <nl> mmm a / taskcluster / generic_tc_caching - linux - opt - base . tyml <nl> ppp b / taskcluster / generic_tc_caching - linux - opt - base . tyml <nl> <nl> taskId : $ { taskcluster . taskId } <nl> provisionerId : $ { taskcluster . docker . provisionerId } <nl> - workerType : $ { taskcluster . docker . workerType } <nl> + workerType : $ { build . workerType } <nl> taskGroupId : $ { taskcluster . taskGroupId } <nl> schedulerId : $ { taskcluster . schedulerId } <nl> created : { $ fromNow : ' 0 sec ' } <nl> mmm a / taskcluster / gradle - cache . yml <nl> ppp b / taskcluster / gradle - cache . yml <nl> build : <nl> setup : " taskcluster / tc - true . sh " <nl> build : " taskcluster / gradle - build . sh " <nl> package : " taskcluster / gradle - package . sh " <nl> + workerType : " $ { docker . smallTask } " <nl> metadata : <nl> name : " Builds Gradle cache " <nl> description : " Setup a Gradle cache for Android " <nl> mmm a / taskcluster / linux - amd64 - cpu - opt . yml <nl> ppp b / taskcluster / linux - amd64 - cpu - opt . yml <nl> build : <nl> build : " taskcluster / host - build . sh " <nl> package : " taskcluster / package . sh " <nl> nc_asset_name : " native_client . amd64 . cpu . linux . tar . xz " <nl> + workerType : " $ { docker . dsBuild } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU " <nl> description : " Building DeepSpeech for Linux / AMD64 , CPU only , optimized version " <nl> mmm a / taskcluster / linux - amd64 - ctc - opt . yml <nl> ppp b / taskcluster / linux - amd64 - ctc - opt . yml <nl> build : <nl> setup : " taskcluster / tc - true . sh " <nl> build : ' taskcluster / decoder - build . sh ' <nl> package : ' taskcluster / decoder - package . sh ' <nl> + workerType : " $ { docker . dsBuild } " <nl> metadata : <nl> name : " DeepSpeech CTC Decoder Linux AMD64 CPU " <nl> description : " Building DeepSpeech CTC Decoder for Linux / AMD64 , CPU only , optimized version " <nl> mmm a / taskcluster / linux - amd64 - gpu - opt . yml <nl> ppp b / taskcluster / linux - amd64 - gpu - opt . yml <nl> build : <nl> build : " taskcluster / cuda - build . sh " <nl> package : " taskcluster / package . sh " <nl> nc_asset_name : " native_client . amd64 . cuda . linux . tar . xz " <nl> + workerType : " $ { docker . dsBuild } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CUDA " <nl> description : " Building DeepSpeech for Linux / AMD64 , CUDA - enabled , optimized version " <nl> mmm a / taskcluster / linux - amd64 - tflite - opt . yml <nl> ppp b / taskcluster / linux - amd64 - tflite - opt . yml <nl> build : <nl> build : " taskcluster / host - build . sh tflite " <nl> package : " taskcluster / package . sh " <nl> nc_asset_name : " native_client . amd64 . tflite . linux . tar . xz " <nl> + workerType : " $ { docker . dsBuild } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 TFLite " <nl> description : " Building DeepSpeech for Linux / AMD64 , TFLite , optimized version " <nl> mmm a / taskcluster / linux - arm64 - cpu - opt . yml <nl> ppp b / taskcluster / linux - arm64 - cpu - opt . yml <nl> build : <nl> build : " taskcluster / arm64 - build . sh " <nl> package : " taskcluster / package . sh " <nl> nc_asset_name : " native_client . arm64 . cpu . linux . tar . xz " <nl> + workerType : " $ { docker . dsBuild } " <nl> metadata : <nl> name : " DeepSpeech Linux ARM64 Cortex - A53 CPU " <nl> description : " Building DeepSpeech for Linux ARM64 Cortex - A53 , CPU only , optimized version " <nl> mmm a / taskcluster / linux - opt - base . tyml <nl> ppp b / taskcluster / linux - opt - base . tyml <nl> $ if : ' event . event in build . allowed ' <nl> then : <nl> taskId : $ { taskcluster . taskId } <nl> provisionerId : $ { taskcluster . docker . provisionerId } <nl> - workerType : $ { taskcluster . docker . workerType } <nl> + workerType : $ { build . workerType } <nl> taskGroupId : $ { taskcluster . taskGroupId } <nl> schedulerId : $ { taskcluster . schedulerId } <nl> dependencies : <nl> mmm a / taskcluster / linux - rpi3 - cpu - opt . yml <nl> ppp b / taskcluster / linux - rpi3 - cpu - opt . yml <nl> build : <nl> setup : " taskcluster / tc - true . sh " <nl> build : " taskcluster / rpi3 - build . sh " <nl> package : " taskcluster / package . sh " <nl> + workerType : " $ { docker . dsBuild } " <nl> nc_asset_name : " native_client . rpi3 . cpu . linux . tar . xz " <nl> metadata : <nl> name : " DeepSpeech Linux RPi3 / ARMv7 CPU " <nl> mmm a / taskcluster / node - gyp - cache . yml <nl> ppp b / taskcluster / node - gyp - cache . yml <nl> build : <nl> setup : " taskcluster / tc - true . sh " <nl> build : " taskcluster / node - gyp - populate . sh " <nl> package : " taskcluster / node - gyp - package . sh " <nl> + workerType : " $ { docker . smallTask } " <nl> metadata : <nl> name : " Cache for node - gyp headers " <nl> description : " Building cache for node - gyp headers " <nl> mmm a / taskcluster / node - package - cpu . yml <nl> ppp b / taskcluster / node - package - cpu . yml <nl> build : <nl> scripts : <nl> build : " taskcluster / node - build . sh " <nl> package : " taskcluster / node - package . sh " <nl> + workerType : " $ { docker . smallTask } " <nl> metadata : <nl> name : " DeepSpeech NodeJS CPU package " <nl> description : " Packaging DeepSpeech CPU for registry " <nl> mmm a / taskcluster / node - package - gpu . yml <nl> ppp b / taskcluster / node - package - gpu . yml <nl> build : <nl> scripts : <nl> build : " taskcluster / node - build . sh - - cuda " <nl> package : " taskcluster / node - package . sh " <nl> + workerType : " $ { docker . smallTask } " <nl> metadata : <nl> name : " DeepSpeech NodeJS GPU package " <nl> description : " Packaging DeepSpeech GPU for registry " <nl> mmm a / taskcluster / node - package - opt - base . tyml <nl> ppp b / taskcluster / node - package - opt - base . tyml <nl> $ if : ' event . event in build . allowed ' <nl> then : <nl> taskId : $ { taskcluster . taskId } <nl> provisionerId : $ { taskcluster . docker . provisionerId } <nl> - workerType : $ { taskcluster . docker . workerType } <nl> + workerType : $ { build . workerType } <nl> taskGroupId : $ { taskcluster . taskGroupId } <nl> schedulerId : $ { taskcluster . schedulerId } <nl> dependencies : <nl> mmm a / taskcluster / node - package - tflite . yml <nl> ppp b / taskcluster / node - package - tflite . yml <nl> build : <nl> scripts : <nl> build : " taskcluster / node - build . sh - - tflite " <nl> package : " taskcluster / node - package . sh " <nl> + workerType : " $ { docker . smallTask } " <nl> metadata : <nl> name : " DeepSpeech NodeJS TFLite package " <nl> description : " Packaging DeepSpeech TFLite for registry " <nl> mmm a / taskcluster / pyenv - linux - amd64 . yml <nl> ppp b / taskcluster / pyenv - linux - amd64 . yml <nl> build : <nl> setup : " taskcluster / tc - true . sh " <nl> build : " taskcluster / pyenv - build . sh " <nl> package : " taskcluster / pyenv - package . sh " <nl> + workerType : " $ { docker . dsBuild } " <nl> metadata : <nl> name : " Builds Pyenv Linux AMD64 " <nl> description : " Setup a builds Pyenv for Linux / AMD64 " <nl> mmm a / taskcluster / swig - linux - amd64 . yml <nl> ppp b / taskcluster / swig - linux - amd64 . yml <nl> build : <nl> setup : " taskcluster / tc - true . sh " <nl> build : " taskcluster / build . sh " <nl> package : " taskcluster / package . sh " <nl> + workerType : " $ { docker . dsBuild } " <nl> metadata : <nl> name : " SWIG Linux AMD64 " <nl> description : " Building SWIG for Linux / AMD64 " <nl> mmm a / taskcluster / swig - win - amd64 . yml <nl> ppp b / taskcluster / swig - win - amd64 . yml <nl> build : <nl> setup : " taskcluster / tc - true . sh " <nl> build : " taskcluster / build . sh x86_64 - w64 - mingw32 " <nl> package : " taskcluster / package . sh " <nl> + workerType : " $ { docker . dsBuild } " <nl> metadata : <nl> name : " SWIG Windows AMD64 " <nl> description : " Building SWIG for Windows / AMD64 " <nl> mmm a / taskcluster / test - android - opt - base . tyml <nl> ppp b / taskcluster / test - android - opt - base . tyml <nl> $ if : ' ( event . event ! = " push " ) & & ( event . event ! = " tag " ) ' <nl> then : <nl> taskId : $ { taskcluster . taskId } <nl> provisionerId : $ { taskcluster . docker . provisionerId } <nl> - workerType : $ { taskcluster . docker . workerType } <nl> + workerType : $ { build . workerType } <nl> taskGroupId : $ { taskcluster . taskGroupId } <nl> schedulerId : $ { taskcluster . schedulerId } <nl> dependencies : <nl> mmm a / taskcluster / test - apk - android - 24 - x86_64 - opt . yml <nl> ppp b / taskcluster / test - apk - android - 24 - x86_64 - opt . yml <nl> build : <nl> namespace : $ { system . gradle_cache . namespace } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - android - apk - tests . sh x86_64 android - 24 16k " <nl> + workerType : " $ { docker . dsHighMemTests } " <nl> metadata : <nl> name : " DeepSpeech Android 7 . 0 x86_64 Google Pixel APK / Java tests " <nl> description : " Testing DeepSpeech APK / Java for Android 7 . 0 x86_64 Google Pixel , optimized version " <nl> mmm a / taskcluster / test - apk - android - 25 - x86_64 - opt . yml <nl> ppp b / taskcluster / test - apk - android - 25 - x86_64 - opt . yml <nl> build : <nl> namespace : $ { system . gradle_cache . namespace } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - android - apk - tests . sh x86_64 android - 25 16k " <nl> + workerType : " $ { docker . dsHighMemTests } " <nl> metadata : <nl> name : " DeepSpeech Android 7 . 1 x86_64 Google Pixel APK / Java tests " <nl> description : " Testing DeepSpeech APK / Java for Android 7 . 1 x86_64 Google Pixel , optimized version " <nl> mmm a / taskcluster / test - apk - android - 26 - x86_64 - opt . yml <nl> ppp b / taskcluster / test - apk - android - 26 - x86_64 - opt . yml <nl> build : <nl> namespace : $ { system . gradle_cache . namespace } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - android - apk - tests . sh x86_64 android - 26 " <nl> + workerType : " $ { docker . dsHighMemTests } " <nl> metadata : <nl> name : " DeepSpeech Android 8 . 0 x86_64 Google Pixel APK / Java tests " <nl> description : " Testing DeepSpeech APK / Java for Android 8 . 0 x86_64 Google Pixel , optimized version " <nl> mmm a / taskcluster / test - apk - android - 28 - x86_64 - opt . yml <nl> ppp b / taskcluster / test - apk - android - 28 - x86_64 - opt . yml <nl> build : <nl> namespace : $ { system . gradle_cache . namespace } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - android - apk - tests . sh x86_64 android - 28 " <nl> + workerType : " $ { docker . dsHighMemTests } " <nl> metadata : <nl> name : " DeepSpeech Android 9 . 0 x86_64 Google Pixel APK / Java tests " <nl> description : " Testing DeepSpeech APK / Java for Android 9 . 0 x86_64 Google Pixel , optimized version " <nl> mmm a / taskcluster / test - apk - android - 29 - x86_64 - opt . yml <nl> ppp b / taskcluster / test - apk - android - 29 - x86_64 - opt . yml <nl> build : <nl> namespace : $ { system . gradle_cache . namespace } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - android - apk - tests . sh x86_64 android - 29 " <nl> + workerType : " $ { docker . dsHighMemTests } " <nl> metadata : <nl> name : " DeepSpeech Android 10 . 0 x86_64 Google Pixel APK / Java tests " <nl> description : " Testing DeepSpeech APK / Java for Android 10 . 0 x86_64 Google Pixel , optimized version " <nl> mmm a / taskcluster / test - apk - android - 30 - x86_64 - opt . yml <nl> ppp b / taskcluster / test - apk - android - 30 - x86_64 - opt . yml <nl> build : <nl> namespace : $ { system . gradle_cache . namespace } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - android - apk - tests . sh x86_64 android - 30 " <nl> + workerType : " $ { docker . dsHighMemTests } " <nl> metadata : <nl> name : " DeepSpeech Android 11 . 0 x86_64 Google Pixel APK / Java tests " <nl> description : " Testing DeepSpeech APK / Java for Android 11 . 0 x86_64 Google Pixel , optimized version " <nl> mmm a / taskcluster / test - augmentations - linux - amd64 - py36m - opt . yml <nl> ppp b / taskcluster / test - augmentations - linux - amd64 - py36m - opt . yml <nl> build : <nl> apt - get - qq update & & apt - get - qq - y install $ { training . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - augmentation - tests . sh 3 . 6 . 10 : m " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU signal augmentations Py3 . 6 " <nl> description : " Augmenting LDC93S1 sample in different ways for Linux / AMD64 16kHz Python 3 . 6 , CPU only , optimized version " <nl> mmm a / taskcluster / test - cpp - android - 24 - arm64 - opt . yml <nl> ppp b / taskcluster / test - cpp - android - 24 - arm64 - opt . yml <nl> build : <nl> test_model_task : " test - training_16k - linux - amd64 - py36m - opt " <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - android - ds - tests . sh arm64 - v8a android - 24 16k " <nl> + workerType : " $ { docker . dsHighMemTests } " <nl> metadata : <nl> name : " DeepSpeech Android 7 . 0 ARM64 Google Pixel C + + tests " <nl> description : " Testing DeepSpeech C + + for Android 7 . 0 ARM64 Google Pixel , optimized version " <nl> mmm a / taskcluster / test - cpp - android - 24 - armv7 - opt . yml <nl> ppp b / taskcluster / test - cpp - android - 24 - armv7 - opt . yml <nl> build : <nl> test_model_task : " test - training_16k - linux - amd64 - py36m - opt " <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - android - ds - tests . sh armeabi - v7a android - 24 16k " <nl> + workerType : " $ { docker . dsHighMemTests } " <nl> metadata : <nl> name : " DeepSpeech Android 7 . 0 ARMv7 Google Pixel C + + tests " <nl> description : " Testing DeepSpeech C + + for Android 7 . 0 ARMv7 Google Pixel , optimized version " <nl> mmm a / taskcluster / test - cpp - android - 25 - arm64 - opt . yml <nl> ppp b / taskcluster / test - cpp - android - 25 - arm64 - opt . yml <nl> build : <nl> test_model_task : " test - training_16k - linux - amd64 - py36m - opt " <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - android - ds - tests . sh arm64 - v8a android - 25 16k " <nl> + workerType : " $ { docker . dsHighMemTests } " <nl> metadata : <nl> name : " DeepSpeech Android 7 . 1 ARM64 Google Pixel C + + tests " <nl> description : " Testing DeepSpeech C + + for Android 7 . 1 ARM64 Google Pixel , optimized version " <nl> mmm a / taskcluster / test - cpp - android - 25 - armv7 - opt . yml <nl> ppp b / taskcluster / test - cpp - android - 25 - armv7 - opt . yml <nl> build : <nl> test_model_task : " test - training_16k - linux - amd64 - py36m - opt " <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - android - ds - tests . sh armeabi - v7a android - 25 16k " <nl> + workerType : " $ { docker . dsHighMemTests } " <nl> metadata : <nl> name : " DeepSpeech Android 7 . 1 ARMv7 Google Pixel C + + tests " <nl> description : " Testing DeepSpeech C + + for Android 7 . 1 ARMv7 Google Pixel , optimized version " <nl> mmm a / taskcluster / test - cpp - linux - amd64 - prod_pbmodel - opt . yml <nl> ppp b / taskcluster / test - cpp - linux - amd64 - prod_pbmodel - opt . yml <nl> build : <nl> - " linux - amd64 - cpu - opt " <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - cpp - ds - tests - prod . sh 16k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU C + + prod tests " <nl> description : " Testing DeepSpeech C + + for Linux / AMD64 on prod model , CPU only , optimized version " <nl> mmm a / taskcluster / test - cpp_16k - linux - amd64 - opt . yml <nl> ppp b / taskcluster / test - cpp_16k - linux - amd64 - opt . yml <nl> build : <nl> test_model_task : " test - training_16k - linux - amd64 - py36m - opt " <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - cpp - ds - tests . sh 16k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU C + + tests ( 16kHz ) " <nl> description : " Testing DeepSpeech C + + for Linux / AMD64 , CPU only , optimized version ( 16kHz ) " <nl> mmm a / taskcluster / test - cpp_16k_tflite - linux - amd64 - opt . yml <nl> ppp b / taskcluster / test - cpp_16k_tflite - linux - amd64 - opt . yml <nl> build : <nl> test_model_task : " test - training_16k - linux - amd64 - py36m - opt " <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - cpp_tflite_basic - ds - tests . sh 16k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 TFLite C + + tests ( 16kHz ) " <nl> description : " Testing DeepSpeech C + + for Linux / AMD64 , TFLite , optimized version ( 16kHz ) " <nl> mmm a / taskcluster / test - cpp_8k - linux - amd64 - opt . yml <nl> ppp b / taskcluster / test - cpp_8k - linux - amd64 - opt . yml <nl> build : <nl> test_model_task : " test - training_8k - linux - amd64 - py36m - opt " <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - cpp - ds - tests . sh 8k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU C + + tests ( 8kHz ) " <nl> description : " Testing DeepSpeech C + + for Linux / AMD64 , CPU only , optimized version ( 8kHz ) " <nl> mmm a / taskcluster / test - cpp_8k_tflite - linux - amd64 - opt . yml <nl> ppp b / taskcluster / test - cpp_8k_tflite - linux - amd64 - opt . yml <nl> build : <nl> test_model_task : " test - training_8k - linux - amd64 - py36m - opt " <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - cpp_tflite_basic - ds - tests . sh 8k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 TFLite C + + tests ( 16kHz ) " <nl> description : " Testing DeepSpeech C + + for Linux / AMD64 , TFLite , optimized version ( 16kHz ) " <nl> mmm a / taskcluster / test - cpp_tflite - linux - amd64 - prod - opt . yml <nl> ppp b / taskcluster / test - cpp_tflite - linux - amd64 - prod - opt . yml <nl> build : <nl> - " linux - amd64 - tflite - opt " <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - cpp_tflite - tests - prod . sh 16k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 TFLite C + + prod tests " <nl> description : " Testing DeepSpeech C + + for Linux / AMD64 on prod model , TFLite , optimized version " <nl> mmm a / taskcluster / test - electronjs_v5 . 0_16k - linux - amd64 - opt . yml <nl> ppp b / taskcluster / test - electronjs_v5 . 0_16k - linux - amd64 - opt . yml <nl> build : <nl> $ { nodejs . packages_xenial . prep_12 } & & $ { nodejs . packages_xenial . apt_pinning } & & apt - get - qq update & & apt - get - qq - y install $ { nodejs . packages_xenial . apt } $ { electronjs . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - electron - tests . sh 12 . x 5 . 0 . 6 16k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU ElectronJS v5 . 0 tests ( 16kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on ElectronJS v5 . 0 , CPU only , optimized version ( 16kHz ) " <nl> mmm a / taskcluster / test - electronjs_v5 . 0_8k - linux - amd64 - opt . yml <nl> ppp b / taskcluster / test - electronjs_v5 . 0_8k - linux - amd64 - opt . yml <nl> build : <nl> $ { nodejs . packages_xenial . prep_12 } & & $ { nodejs . packages_xenial . apt_pinning } & & apt - get - qq update & & apt - get - qq - y install $ { nodejs . packages_xenial . apt } $ { electronjs . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - electron - tests . sh 12 . x 5 . 0 . 6 8k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU ElectronJS v5 . 0 tests ( 8kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on ElectronJS v5 . 0 , CPU only , optimized version ( 8kHz ) " <nl> mmm a / taskcluster / test - electronjs_v6 . 0_16k - linux - amd64 - opt . yml <nl> ppp b / taskcluster / test - electronjs_v6 . 0_16k - linux - amd64 - opt . yml <nl> build : <nl> $ { nodejs . packages_xenial . prep_12 } & & $ { nodejs . packages_xenial . apt_pinning } & & apt - get - qq update & & apt - get - qq - y install $ { nodejs . packages_xenial . apt } $ { electronjs . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - electron - tests . sh 12 . x 6 . 0 . 12 16k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU ElectronJS v6 . 0 tests ( 16kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on ElectronJS v6 . 0 , CPU only , optimized version ( 16kHz ) " <nl> mmm a / taskcluster / test - electronjs_v6 . 0_8k - linux - amd64 - opt . yml <nl> ppp b / taskcluster / test - electronjs_v6 . 0_8k - linux - amd64 - opt . yml <nl> build : <nl> $ { nodejs . packages_xenial . prep_12 } & & $ { nodejs . packages_xenial . apt_pinning } & & apt - get - qq update & & apt - get - qq - y install $ { nodejs . packages_xenial . apt } $ { electronjs . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - electron - tests . sh 12 . x 6 . 0 . 12 8k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU ElectronJS v6 . 0 tests ( 8kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on ElectronJS v6 . 0 , CPU only , optimized version ( 8kHz ) " <nl> mmm a / taskcluster / test - electronjs_v6 . 1_16k - linux - amd64 - opt . yml <nl> ppp b / taskcluster / test - electronjs_v6 . 1_16k - linux - amd64 - opt . yml <nl> build : <nl> $ { nodejs . packages_xenial . prep_12 } & & $ { nodejs . packages_xenial . apt_pinning } & & apt - get - qq update & & apt - get - qq - y install $ { nodejs . packages_xenial . apt } $ { electronjs . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - electron - tests . sh 12 . x 6 . 1 . 7 16k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU ElectronJS v6 . 1 tests ( 16kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on ElectronJS v6 . 1 , CPU only , optimized version ( 16kHz ) " <nl> mmm a / taskcluster / test - electronjs_v6 . 1_8k - linux - amd64 - opt . yml <nl> ppp b / taskcluster / test - electronjs_v6 . 1_8k - linux - amd64 - opt . yml <nl> build : <nl> $ { nodejs . packages_xenial . prep_12 } & & $ { nodejs . packages_xenial . apt_pinning } & & apt - get - qq update & & apt - get - qq - y install $ { nodejs . packages_xenial . apt } $ { electronjs . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - electron - tests . sh 12 . x 6 . 1 . 7 8k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU ElectronJS v6 . 1 tests ( 8kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on ElectronJS v6 . 1 , CPU only , optimized version ( 8kHz ) " <nl> mmm a / taskcluster / test - electronjs_v7 . 0_16k - linux - amd64 - opt . yml <nl> ppp b / taskcluster / test - electronjs_v7 . 0_16k - linux - amd64 - opt . yml <nl> build : <nl> $ { nodejs . packages_xenial . prep_12 } & & $ { nodejs . packages_xenial . apt_pinning } & & apt - get - qq update & & apt - get - qq - y install $ { nodejs . packages_xenial . apt } $ { electronjs . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - electron - tests . sh 12 . x 7 . 0 . 1 16k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU ElectronJS v7 . 0 tests ( 16kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on ElectronJS v7 . 0 , CPU only , optimized version ( 16kHz ) " <nl> mmm a / taskcluster / test - electronjs_v7 . 0_8k - linux - amd64 - opt . yml <nl> ppp b / taskcluster / test - electronjs_v7 . 0_8k - linux - amd64 - opt . yml <nl> build : <nl> $ { nodejs . packages_xenial . prep_12 } & & $ { nodejs . packages_xenial . apt_pinning } & & apt - get - qq update & & apt - get - qq - y install $ { nodejs . packages_xenial . apt } $ { electronjs . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - electron - tests . sh 12 . x 7 . 0 . 1 8k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU ElectronJS v7 . 0 tests ( 8kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on ElectronJS v7 . 0 , CPU only , optimized version ( 8kHz ) " <nl> mmm a / taskcluster / test - electronjs_v7 . 1_16k - linux - amd64 - opt . yml <nl> ppp b / taskcluster / test - electronjs_v7 . 1_16k - linux - amd64 - opt . yml <nl> build : <nl> $ { nodejs . packages_xenial . prep_12 } & & $ { nodejs . packages_xenial . apt_pinning } & & apt - get - qq update & & apt - get - qq - y install $ { nodejs . packages_xenial . apt } $ { electronjs . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - electron - tests . sh 12 . x 7 . 1 . 2 16k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU ElectronJS v7 . 1 tests ( 16kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on ElectronJS v7 . 1 , CPU only , optimized version ( 16kHz ) " <nl> mmm a / taskcluster / test - electronjs_v7 . 1_8k - linux - amd64 - opt . yml <nl> ppp b / taskcluster / test - electronjs_v7 . 1_8k - linux - amd64 - opt . yml <nl> build : <nl> $ { nodejs . packages_xenial . prep_12 } & & $ { nodejs . packages_xenial . apt_pinning } & & apt - get - qq update & & apt - get - qq - y install $ { nodejs . packages_xenial . apt } $ { electronjs . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - electron - tests . sh 12 . x 7 . 1 . 2 8k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU ElectronJS v7 . 1 tests ( 8kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on ElectronJS v7 . 1 , CPU only , optimized version ( 8kHz ) " <nl> mmm a / taskcluster / test - electronjs_v8 . 0_16k - linux - amd64 - opt . yml <nl> ppp b / taskcluster / test - electronjs_v8 . 0_16k - linux - amd64 - opt . yml <nl> build : <nl> $ { nodejs . packages_xenial . prep_12 } & & $ { nodejs . packages_xenial . apt_pinning } & & apt - get - qq update & & apt - get - qq - y install $ { nodejs . packages_xenial . apt } $ { electronjs . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - electron - tests . sh 12 . x 8 . 0 . 1 16k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU ElectronJS v8 . 0 tests ( 16kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on ElectronJS v8 . 0 , CPU only , optimized version ( 16kHz ) " <nl> mmm a / taskcluster / test - electronjs_v8 . 0_8k - linux - amd64 - opt . yml <nl> ppp b / taskcluster / test - electronjs_v8 . 0_8k - linux - amd64 - opt . yml <nl> build : <nl> $ { nodejs . packages_xenial . prep_12 } & & $ { nodejs . packages_xenial . apt_pinning } & & apt - get - qq update & & apt - get - qq - y install $ { nodejs . packages_xenial . apt } $ { electronjs . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - electron - tests . sh 12 . x 8 . 0 . 1 8k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU ElectronJS v8 . 0 tests ( 8kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on ElectronJS v8 . 0 , CPU only , optimized version ( 8kHz ) " <nl> mmm a / taskcluster / test - electronjs_v9 . 0_16k - linux - amd64 - opt . yml <nl> ppp b / taskcluster / test - electronjs_v9 . 0_16k - linux - amd64 - opt . yml <nl> build : <nl> $ { nodejs . packages_xenial . prep_12 } & & $ { nodejs . packages_xenial . apt_pinning } & & apt - get - qq update & & apt - get - qq - y install $ { nodejs . packages_xenial . apt } $ { electronjs . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - electron - tests . sh 12 . x 9 . 0 . 1 16k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU ElectronJS v9 . 0 tests ( 16kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on ElectronJS v9 . 0 , CPU only , optimized version ( 16kHz ) " <nl> mmm a / taskcluster / test - electronjs_v9 . 0_8k - linux - amd64 - opt . yml <nl> ppp b / taskcluster / test - electronjs_v9 . 0_8k - linux - amd64 - opt . yml <nl> build : <nl> $ { nodejs . packages_xenial . prep_12 } & & $ { nodejs . packages_xenial . apt_pinning } & & apt - get - qq update & & apt - get - qq - y install $ { nodejs . packages_xenial . apt } $ { electronjs . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - electron - tests . sh 12 . x 9 . 0 . 1 8k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU ElectronJS v9 . 0 tests ( 8kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on ElectronJS v9 . 0 , CPU only , optimized version ( 8kHz ) " <nl> mmm a / taskcluster / test - electronjs_v9 . 1_16k - linux - amd64 - opt . yml <nl> ppp b / taskcluster / test - electronjs_v9 . 1_16k - linux - amd64 - opt . yml <nl> build : <nl> $ { nodejs . packages_xenial . prep_12 } & & $ { nodejs . packages_xenial . apt_pinning } & & apt - get - qq update & & apt - get - qq - y install $ { nodejs . packages_xenial . apt } $ { electronjs . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - electron - tests . sh 12 . x 9 . 0 . 1 16k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU ElectronJS v9 . 1 tests ( 16kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on ElectronJS v9 . 1 , CPU only , optimized version ( 16kHz ) " <nl> mmm a / taskcluster / test - electronjs_v9 . 1_8k - linux - amd64 - opt . yml <nl> ppp b / taskcluster / test - electronjs_v9 . 1_8k - linux - amd64 - opt . yml <nl> build : <nl> $ { nodejs . packages_xenial . prep_12 } & & $ { nodejs . packages_xenial . apt_pinning } & & apt - get - qq update & & apt - get - qq - y install $ { nodejs . packages_xenial . apt } $ { electronjs . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - electron - tests . sh 12 . x 9 . 0 . 1 8k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU ElectronJS v9 . 1 tests ( 8kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on ElectronJS v9 . 1 , CPU only , optimized version ( 8kHz ) " <nl> mmm a / taskcluster / test - evaluate_tflite - linux - amd64 - py36m - opt . yml <nl> ppp b / taskcluster / test - evaluate_tflite - linux - amd64 - py36m - opt . yml <nl> build : <nl> test_model_task : " test - training_16k - linux - amd64 - py36m - opt " <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - evaluate_tflite . sh 3 . 6 . 10 : m 16k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU evaluate_tflite . py Py3 . 6 ( 16kHz ) " <nl> description : " Test evaluate_tflite . py on Linux / AMD64 using upstream TensorFlow Python 3 . 6 , CPU only , optimized version " <nl> mmm a / taskcluster / test - linux - opt - base . tyml <nl> ppp b / taskcluster / test - linux - opt - base . tyml <nl> $ if : ' ( event . event ! = " push " ) & & ( event . event ! = " tag " ) ' <nl> then : <nl> taskId : $ { taskcluster . taskId } <nl> provisionerId : $ { taskcluster . docker . provisionerId } <nl> - workerType : $ { taskcluster . docker . workerType } <nl> + workerType : $ { build . workerType } <nl> taskGroupId : $ { taskcluster . taskGroupId } <nl> schedulerId : $ { taskcluster . schedulerId } <nl> dependencies : <nl> mmm a / taskcluster / test - linux - opt - tag - base . tyml <nl> ppp b / taskcluster / test - linux - opt - tag - base . tyml <nl> $ if : ' ( event . event in build . allowed ) & & ( ( event . event ! = " tag " ) | | ( build . ref_ma <nl> then : <nl> taskId : $ { taskcluster . taskId } <nl> provisionerId : $ { taskcluster . docker . provisionerId } <nl> - workerType : $ { taskcluster . docker . workerType } <nl> + workerType : $ { build . workerType } <nl> taskGroupId : $ { taskcluster . taskGroupId } <nl> schedulerId : $ { taskcluster . schedulerId } <nl> dependencies : <nl> mmm a / taskcluster / test - nodejs_10x_16k - linux - amd64 - opt . yml <nl> ppp b / taskcluster / test - nodejs_10x_16k - linux - amd64 - opt . yml <nl> build : <nl> $ { nodejs . packages_xenial . prep_10 } & & $ { nodejs . packages_xenial . apt_pinning } & & apt - get - qq update & & apt - get - qq - y install $ { nodejs . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - node - tests . sh 10 . x 16k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU NodeJS 10 . x tests ( 16kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on NodeJS v10 . x , CPU only , optimized version ( 16kHz ) " <nl> mmm a / taskcluster / test - nodejs_10x_16k - linux - amd64 - prod_pbmodel - opt . yml <nl> ppp b / taskcluster / test - nodejs_10x_16k - linux - amd64 - prod_pbmodel - opt . yml <nl> build : <nl> $ { nodejs . packages_xenial . prep_10 } & & $ { nodejs . packages_xenial . apt_pinning } & & apt - get - qq update & & apt - get - qq - y install $ { nodejs . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - node - tests - prod . sh 10 . x 16k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU NodeJS 10 . x prod tests ( 16kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on NodeJS v10 . x on prod model , CPU only , optimized version ( 16kHz ) " <nl> mmm a / taskcluster / test - nodejs_10x_16k_tflite - linux - amd64 - prod - opt . yml <nl> ppp b / taskcluster / test - nodejs_10x_16k_tflite - linux - amd64 - prod - opt . yml <nl> build : <nl> $ { nodejs . packages_xenial . prep_10 } & & $ { nodejs . packages_xenial . apt_pinning } & & apt - get - qq update & & apt - get - qq - y install $ { nodejs . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - node_tflite - tests - prod . sh 10 . x 16k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 TFLite NodeJS 10 . x prod tests ( 16kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on NodeJS v10 . x on prod model , TFLite , optimized version ( 16kHz ) " <nl> mmm a / taskcluster / test - nodejs_10x_8k - linux - amd64 - opt . yml <nl> ppp b / taskcluster / test - nodejs_10x_8k - linux - amd64 - opt . yml <nl> build : <nl> $ { nodejs . packages_xenial . prep_10 } & & $ { nodejs . packages_xenial . apt_pinning } & & apt - get - qq update & & apt - get - qq - y install $ { nodejs . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - node - tests . sh 10 . x 8k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU NodeJS 10 . x tests ( 8kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on NodeJS v10 . x , CPU only , optimized version ( 8kHz ) " <nl> mmm a / taskcluster / test - nodejs_10x_8k - linux - amd64 - prod_pbmodel - opt . yml <nl> ppp b / taskcluster / test - nodejs_10x_8k - linux - amd64 - prod_pbmodel - opt . yml <nl> build : <nl> $ { nodejs . packages_xenial . prep_10 } & & $ { nodejs . packages_xenial . apt_pinning } & & apt - get - qq update & & apt - get - qq - y install $ { nodejs . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - node - tests - prod . sh 10 . x 8k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU NodeJS 10 . x prod tests ( 8kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on NodeJS v10 . x on prod model , CPU only , optimized version ( 8kHz ) " <nl> mmm a / taskcluster / test - nodejs_10x_8k_tflite - linux - amd64 - prod - opt . yml <nl> ppp b / taskcluster / test - nodejs_10x_8k_tflite - linux - amd64 - prod - opt . yml <nl> build : <nl> $ { nodejs . packages_xenial . prep_10 } & & $ { nodejs . packages_xenial . apt_pinning } & & apt - get - qq update & & apt - get - qq - y install $ { nodejs . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - node_tflite - tests - prod . sh 10 . x 8k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 TFLite NodeJS 10 . x prod tests ( 8kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on NodeJS v10 . x on prod model , TFLite , optimized version ( 8kHz ) " <nl> mmm a / taskcluster / test - nodejs_11x_16k - linux - amd64 - opt . yml <nl> ppp b / taskcluster / test - nodejs_11x_16k - linux - amd64 - opt . yml <nl> build : <nl> $ { nodejs . packages_xenial . prep_11 } & & $ { nodejs . packages_xenial . apt_pinning } & & apt - get - qq update & & apt - get - qq - y install $ { nodejs . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - node - tests . sh 11 . x 16k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU NodeJS 11 . x tests ( 16kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on NodeJS v11 . x , CPU only , optimized version ( 16kHz ) " <nl> mmm a / taskcluster / test - nodejs_11x_16k - linux - amd64 - prod_pbmodel - opt . yml <nl> ppp b / taskcluster / test - nodejs_11x_16k - linux - amd64 - prod_pbmodel - opt . yml <nl> build : <nl> $ { nodejs . packages_xenial . prep_11 } & & $ { nodejs . packages_xenial . apt_pinning } & & apt - get - qq update & & apt - get - qq - y install $ { nodejs . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - node - tests - prod . sh 11 . x 16k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU NodeJS 11 . x prod tests ( 16kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on NodeJS v11 . x on prod model , CPU only , optimized version ( 16kHz ) " <nl> mmm a / taskcluster / test - nodejs_11x_16k_tflite - linux - amd64 - prod - opt . yml <nl> ppp b / taskcluster / test - nodejs_11x_16k_tflite - linux - amd64 - prod - opt . yml <nl> build : <nl> $ { nodejs . packages_xenial . prep_11 } & & $ { nodejs . packages_xenial . apt_pinning } & & apt - get - qq update & & apt - get - qq - y install $ { nodejs . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - node_tflite - tests - prod . sh 11 . x 16k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 TFLite NodeJS 11 . x prod tests ( 16kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on NodeJS v11 . x on prod model , TFLite , optimized version ( 16kHz ) " <nl> mmm a / taskcluster / test - nodejs_11x_8k - linux - amd64 - opt . yml <nl> ppp b / taskcluster / test - nodejs_11x_8k - linux - amd64 - opt . yml <nl> build : <nl> $ { nodejs . packages_xenial . prep_11 } & & $ { nodejs . packages_xenial . apt_pinning } & & apt - get - qq update & & apt - get - qq - y install $ { nodejs . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - node - tests . sh 11 . x 8k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU NodeJS 11 . x tests ( 8kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on NodeJS v11 . x , CPU only , optimized version ( 8kHz ) " <nl> mmm a / taskcluster / test - nodejs_11x_8k - linux - amd64 - prod_pbmodel - opt . yml <nl> ppp b / taskcluster / test - nodejs_11x_8k - linux - amd64 - prod_pbmodel - opt . yml <nl> build : <nl> $ { nodejs . packages_xenial . prep_11 } & & $ { nodejs . packages_xenial . apt_pinning } & & apt - get - qq update & & apt - get - qq - y install $ { nodejs . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - node - tests - prod . sh 11 . x 8k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU NodeJS 11 . x prod tests ( 8kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on NodeJS v11 . x on prod model , CPU only , optimized version ( 8kHz ) " <nl> mmm a / taskcluster / test - nodejs_11x_8k_tflite - linux - amd64 - prod - opt . yml <nl> ppp b / taskcluster / test - nodejs_11x_8k_tflite - linux - amd64 - prod - opt . yml <nl> build : <nl> $ { nodejs . packages_xenial . prep_11 } & & $ { nodejs . packages_xenial . apt_pinning } & & apt - get - qq update & & apt - get - qq - y install $ { nodejs . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - node_tflite - tests - prod . sh 11 . x 8k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 TFLite NodeJS 11 . x prod tests ( 8kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on NodeJS v11 . x on prod model , TFLite , optimized version ( 8kHz ) " <nl> mmm a / taskcluster / test - nodejs_12x_16k - linux - amd64 - opt . yml <nl> ppp b / taskcluster / test - nodejs_12x_16k - linux - amd64 - opt . yml <nl> build : <nl> $ { nodejs . packages_xenial . prep_12 } & & $ { nodejs . packages_xenial . apt_pinning } & & apt - get - qq update & & apt - get - qq - y install $ { nodejs . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - node - tests . sh 12 . x 16k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU NodeJS 12 . x tests ( 16kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on NodeJS v12 . x , CPU only , optimized version ( 16kHz ) " <nl> mmm a / taskcluster / test - nodejs_12x_16k - linux - amd64 - prod_pbmodel - opt . yml <nl> ppp b / taskcluster / test - nodejs_12x_16k - linux - amd64 - prod_pbmodel - opt . yml <nl> build : <nl> $ { nodejs . packages_xenial . prep_12 } & & $ { nodejs . packages_xenial . apt_pinning } & & apt - get - qq update & & apt - get - qq - y install $ { nodejs . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - node - tests - prod . sh 12 . x 16k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU NodeJS 12 . x prod tests ( 16kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on NodeJS v12 . x on prod model , CPU only , optimized version ( 16kHz ) " <nl> mmm a / taskcluster / test - nodejs_12x_16k_tflite - linux - amd64 - prod - opt . yml <nl> ppp b / taskcluster / test - nodejs_12x_16k_tflite - linux - amd64 - prod - opt . yml <nl> build : <nl> $ { nodejs . packages_xenial . prep_12 } & & $ { nodejs . packages_xenial . apt_pinning } & & apt - get - qq update & & apt - get - qq - y install $ { nodejs . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - node_tflite - tests - prod . sh 12 . x 16k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 TFLite NodeJS 12 . x prod tests ( 16kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on NodeJS v12 . x on prod model , TFLite , optimized version ( 16kHz ) " <nl> mmm a / taskcluster / test - nodejs_12x_8k - linux - amd64 - opt . yml <nl> ppp b / taskcluster / test - nodejs_12x_8k - linux - amd64 - opt . yml <nl> build : <nl> $ { nodejs . packages_xenial . prep_12 } & & $ { nodejs . packages_xenial . apt_pinning } & & apt - get - qq update & & apt - get - qq - y install $ { nodejs . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - node - tests . sh 12 . x 8k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU NodeJS 12 . x tests ( 8kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on NodeJS v12 . x , CPU only , optimized version ( 8kHz ) " <nl> mmm a / taskcluster / test - nodejs_12x_8k - linux - amd64 - prod_pbmodel - opt . yml <nl> ppp b / taskcluster / test - nodejs_12x_8k - linux - amd64 - prod_pbmodel - opt . yml <nl> build : <nl> $ { nodejs . packages_xenial . prep_12 } & & $ { nodejs . packages_xenial . apt_pinning } & & apt - get - qq update & & apt - get - qq - y install $ { nodejs . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - node - tests - prod . sh 12 . x 8k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU NodeJS 12 . x prod tests ( 8kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on NodeJS v12 . x on prod model , CPU only , optimized version ( 8kHz ) " <nl> mmm a / taskcluster / test - nodejs_12x_8k_tflite - linux - amd64 - prod - opt . yml <nl> ppp b / taskcluster / test - nodejs_12x_8k_tflite - linux - amd64 - prod - opt . yml <nl> build : <nl> $ { nodejs . packages_xenial . prep_12 } & & $ { nodejs . packages_xenial . apt_pinning } & & apt - get - qq update & & apt - get - qq - y install $ { nodejs . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - node_tflite - tests - prod . sh 12 . x 8k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 TFLite NodeJS 12 . x prod tests ( 8kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on NodeJS v12 . x on prod model , TFLite , optimized version ( 8kHz ) " <nl> mmm a / taskcluster / test - nodejs_13x_16k - linux - amd64 - opt . yml <nl> ppp b / taskcluster / test - nodejs_13x_16k - linux - amd64 - opt . yml <nl> build : <nl> $ { nodejs . packages_xenial . prep_13 } & & $ { nodejs . packages_xenial . apt_pinning } & & apt - get - qq update & & apt - get - qq - y install $ { nodejs . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - node - tests . sh 13 . x 16k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU NodeJS 13 . x tests ( 16kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on NodeJS v13 . x , CPU only , optimized version ( 16kHz ) " <nl> mmm a / taskcluster / test - nodejs_13x_16k - linux - amd64 - prod_pbmodel - opt . yml <nl> ppp b / taskcluster / test - nodejs_13x_16k - linux - amd64 - prod_pbmodel - opt . yml <nl> build : <nl> $ { nodejs . packages_xenial . prep_13 } & & $ { nodejs . packages_xenial . apt_pinning } & & apt - get - qq update & & apt - get - qq - y install $ { nodejs . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - node - tests - prod . sh 13 . x 16k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU NodeJS 13 . x prod tests ( 16kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on NodeJS v13 . x on prod model , CPU only , optimized version ( 16kHz ) " <nl> mmm a / taskcluster / test - nodejs_13x_16k_multiarchpkg - linux - amd64 - opt . yml <nl> ppp b / taskcluster / test - nodejs_13x_16k_multiarchpkg - linux - amd64 - opt . yml <nl> build : <nl> $ { nodejs . packages_xenial . prep_13 } & & $ { nodejs . packages_xenial . apt_pinning } & & apt - get - qq update & & apt - get - qq - y install $ { nodejs . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - node - tests . sh 13 . x 16k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU NodeJS MultiArch Package 13 . x tests ( 16kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on NodeJS MultiArch Package v13 . x , CPU only , optimized version ( 16kHz ) " <nl> mmm a / taskcluster / test - nodejs_13x_16k_multiarchpkg - linux - amd64 - prod_pbmodel - opt . yml <nl> ppp b / taskcluster / test - nodejs_13x_16k_multiarchpkg - linux - amd64 - prod_pbmodel - opt . yml <nl> build : <nl> $ { nodejs . packages_xenial . prep_13 } & & $ { nodejs . packages_xenial . apt_pinning } & & apt - get - qq update & & apt - get - qq - y install $ { nodejs . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - node - tests - prod . sh 13 . x 16k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU NodeJS MultiArch Package 13 . x prod tests ( 16kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on NodeJS MultiArch Package v13 . x on prod model , CPU only , optimized version ( 16kHz ) " <nl> mmm a / taskcluster / test - nodejs_13x_16k_multiarchpkg - linux - tflite - opt . yml <nl> ppp b / taskcluster / test - nodejs_13x_16k_multiarchpkg - linux - tflite - opt . yml <nl> build : <nl> $ { nodejs . packages_xenial . prep_13 } & & $ { nodejs . packages_xenial . apt_pinning } & & apt - get - qq update & & apt - get - qq - y install $ { nodejs . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - node_tflite - tests . sh 13 . x 16k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 TFLite NodeJS MultiArch Package 13 . x tests ( 16kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on NodeJS MultiArch Package v13 . x , TFLite only , optimized version ( 16kHz ) " <nl> mmm a / taskcluster / test - nodejs_13x_16k_tflite - linux - amd64 - prod - opt . yml <nl> ppp b / taskcluster / test - nodejs_13x_16k_tflite - linux - amd64 - prod - opt . yml <nl> build : <nl> $ { nodejs . packages_xenial . prep_13 } & & $ { nodejs . packages_xenial . apt_pinning } & & apt - get - qq update & & apt - get - qq - y install $ { nodejs . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - node_tflite - tests - prod . sh 13 . x 16k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 TFLite NodeJS 13 . x prod tests ( 16kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on NodeJS v13 . x on prod model , TFLite , optimized version ( 16kHz ) " <nl> mmm a / taskcluster / test - nodejs_13x_8k - linux - amd64 - opt . yml <nl> ppp b / taskcluster / test - nodejs_13x_8k - linux - amd64 - opt . yml <nl> build : <nl> $ { nodejs . packages_xenial . prep_13 } & & $ { nodejs . packages_xenial . apt_pinning } & & apt - get - qq update & & apt - get - qq - y install $ { nodejs . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - node - tests . sh 13 . x 8k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU NodeJS 13 . x tests ( 8kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on NodeJS v13 . x , CPU only , optimized version ( 8kHz ) " <nl> mmm a / taskcluster / test - nodejs_13x_8k - linux - amd64 - prod_pbmodel - opt . yml <nl> ppp b / taskcluster / test - nodejs_13x_8k - linux - amd64 - prod_pbmodel - opt . yml <nl> build : <nl> $ { nodejs . packages_xenial . prep_13 } & & $ { nodejs . packages_xenial . apt_pinning } & & apt - get - qq update & & apt - get - qq - y install $ { nodejs . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - node - tests - prod . sh 13 . x 8k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU NodeJS 13 . x prod tests ( 8kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on NodeJS v13 . x on prod model , CPU only , optimized version ( 8kHz ) " <nl> mmm a / taskcluster / test - nodejs_13x_8k_multiarchpkg - linux - amd64 - opt . yml <nl> ppp b / taskcluster / test - nodejs_13x_8k_multiarchpkg - linux - amd64 - opt . yml <nl> build : <nl> $ { nodejs . packages_xenial . prep_13 } & & $ { nodejs . packages_xenial . apt_pinning } & & apt - get - qq update & & apt - get - qq - y install $ { nodejs . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - node - tests . sh 13 . x 8k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU NodeJS MultiArch Package 13 . x tests ( 8kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on NodeJS MultiArch Package v13 . x , CPU only , optimized version ( 8kHz ) " <nl> mmm a / taskcluster / test - nodejs_13x_8k_multiarchpkg - linux - amd64 - prod_pbmodel - opt . yml <nl> ppp b / taskcluster / test - nodejs_13x_8k_multiarchpkg - linux - amd64 - prod_pbmodel - opt . yml <nl> build : <nl> $ { nodejs . packages_xenial . prep_13 } & & $ { nodejs . packages_xenial . apt_pinning } & & apt - get - qq update & & apt - get - qq - y install $ { nodejs . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - node - tests - prod . sh 13 . x 8k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU NodeJS MultiArch Package 13 . x prod tests ( 8kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on NodeJS MultiArch Package v13 . x on prod model , CPU only , optimized version ( 8kHz ) " <nl> mmm a / taskcluster / test - nodejs_13x_8k_multiarchpkg - linux - tflite - opt . yml <nl> ppp b / taskcluster / test - nodejs_13x_8k_multiarchpkg - linux - tflite - opt . yml <nl> build : <nl> $ { nodejs . packages_xenial . prep_13 } & & $ { nodejs . packages_xenial . apt_pinning } & & apt - get - qq update & & apt - get - qq - y install $ { nodejs . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - node_tflite - tests . sh 13 . x 8k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 TFLite NodeJS MultiArch Package 13 . x tests ( 8kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on NodeJS MultiArch Package v13 . x , TFLite only , optimized version ( 8kHz ) " <nl> mmm a / taskcluster / test - nodejs_13x_8k_tflite - linux - amd64 - prod - opt . yml <nl> ppp b / taskcluster / test - nodejs_13x_8k_tflite - linux - amd64 - prod - opt . yml <nl> build : <nl> $ { nodejs . packages_xenial . prep_13 } & & $ { nodejs . packages_xenial . apt_pinning } & & apt - get - qq update & & apt - get - qq - y install $ { nodejs . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - node_tflite - tests - prod . sh 13 . x 8k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 TFLite NodeJS 13 . x prod tests ( 8kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on NodeJS v13 . x on prod model , TFLite , optimized version ( 8kHz ) " <nl> mmm a / taskcluster / test - nodejs_14x_16k - linux - amd64 - opt . yml <nl> ppp b / taskcluster / test - nodejs_14x_16k - linux - amd64 - opt . yml <nl> build : <nl> $ { nodejs . packages_xenial . prep_14 } & & $ { nodejs . packages_xenial . apt_pinning } & & apt - get - qq update & & apt - get - qq - y install $ { nodejs . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - node - tests . sh 14 . x 16k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU NodeJS 14 . x tests ( 16kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on NodeJS v14 . x , CPU only , optimized version ( 16kHz ) " <nl> mmm a / taskcluster / test - nodejs_14x_16k - linux - amd64 - prod_pbmodel - opt . yml <nl> ppp b / taskcluster / test - nodejs_14x_16k - linux - amd64 - prod_pbmodel - opt . yml <nl> build : <nl> $ { nodejs . packages_xenial . prep_14 } & & $ { nodejs . packages_xenial . apt_pinning } & & apt - get - qq update & & apt - get - qq - y install $ { nodejs . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - node - tests - prod . sh 14 . x 16k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU NodeJS 14 . x prod tests ( 16kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on NodeJS v14 . x on prod model , CPU only , optimized version ( 16kHz ) " <nl> mmm a / taskcluster / test - nodejs_14x_16k_multiarchpkg - linux - amd64 - opt . yml <nl> ppp b / taskcluster / test - nodejs_14x_16k_multiarchpkg - linux - amd64 - opt . yml <nl> build : <nl> $ { nodejs . packages_xenial . prep_14 } & & $ { nodejs . packages_xenial . apt_pinning } & & apt - get - qq update & & apt - get - qq - y install $ { nodejs . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - node - tests . sh 14 . x 16k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU NodeJS MultiArch Package 14 . x tests ( 16kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on NodeJS MultiArch Package v14 . x , CPU only , optimized version ( 16kHz ) " <nl> mmm a / taskcluster / test - nodejs_14x_16k_multiarchpkg - linux - amd64 - prod_pbmodel - opt . yml <nl> ppp b / taskcluster / test - nodejs_14x_16k_multiarchpkg - linux - amd64 - prod_pbmodel - opt . yml <nl> build : <nl> $ { nodejs . packages_xenial . prep_14 } & & $ { nodejs . packages_xenial . apt_pinning } & & apt - get - qq update & & apt - get - qq - y install $ { nodejs . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - node - tests - prod . sh 14 . x 16k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU NodeJS MultiArch Package 14 . x prod tests ( 16kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on NodeJS MultiArch Package v14 . x on prod model , CPU only , optimized version ( 16kHz ) " <nl> mmm a / taskcluster / test - nodejs_14x_16k_multiarchpkg - linux - tflite - opt . yml <nl> ppp b / taskcluster / test - nodejs_14x_16k_multiarchpkg - linux - tflite - opt . yml <nl> build : <nl> $ { nodejs . packages_xenial . prep_14 } & & $ { nodejs . packages_xenial . apt_pinning } & & apt - get - qq update & & apt - get - qq - y install $ { nodejs . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - node_tflite - tests . sh 14 . x 16k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 TFLite NodeJS MultiArch Package 14 . x tests ( 16kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on NodeJS MultiArch Package v14 . x , TFLite only , optimized version ( 16kHz ) " <nl> mmm a / taskcluster / test - nodejs_14x_16k_tflite - linux - amd64 - prod - opt . yml <nl> ppp b / taskcluster / test - nodejs_14x_16k_tflite - linux - amd64 - prod - opt . yml <nl> build : <nl> $ { nodejs . packages_xenial . prep_14 } & & $ { nodejs . packages_xenial . apt_pinning } & & apt - get - qq update & & apt - get - qq - y install $ { nodejs . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - node_tflite - tests - prod . sh 14 . x 16k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 TFLite NodeJS 14 . x prod tests ( 16kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on NodeJS v14 . x on prod model , TFLite , optimized version ( 16kHz ) " <nl> mmm a / taskcluster / test - nodejs_14x_8k - linux - amd64 - opt . yml <nl> ppp b / taskcluster / test - nodejs_14x_8k - linux - amd64 - opt . yml <nl> build : <nl> $ { nodejs . packages_xenial . prep_14 } & & $ { nodejs . packages_xenial . apt_pinning } & & apt - get - qq update & & apt - get - qq - y install $ { nodejs . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - node - tests . sh 14 . x 8k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU NodeJS 14 . x tests ( 8kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on NodeJS v14 . x , CPU only , optimized version ( 8kHz ) " <nl> mmm a / taskcluster / test - nodejs_14x_8k - linux - amd64 - prod_pbmodel - opt . yml <nl> ppp b / taskcluster / test - nodejs_14x_8k - linux - amd64 - prod_pbmodel - opt . yml <nl> build : <nl> $ { nodejs . packages_xenial . prep_14 } & & $ { nodejs . packages_xenial . apt_pinning } & & apt - get - qq update & & apt - get - qq - y install $ { nodejs . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - node - tests - prod . sh 14 . x 8k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU NodeJS 14 . x prod tests ( 8kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on NodeJS v14 . x on prod model , CPU only , optimized version ( 8kHz ) " <nl> mmm a / taskcluster / test - nodejs_14x_8k_multiarchpkg - linux - amd64 - opt . yml <nl> ppp b / taskcluster / test - nodejs_14x_8k_multiarchpkg - linux - amd64 - opt . yml <nl> build : <nl> $ { nodejs . packages_xenial . prep_14 } & & $ { nodejs . packages_xenial . apt_pinning } & & apt - get - qq update & & apt - get - qq - y install $ { nodejs . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - node - tests . sh 14 . x 8k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU NodeJS MultiArch Package 14 . x tests ( 8kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on NodeJS MultiArch Package v14 . x , CPU only , optimized version ( 8kHz ) " <nl> mmm a / taskcluster / test - nodejs_14x_8k_multiarchpkg - linux - amd64 - prod_pbmodel - opt . yml <nl> ppp b / taskcluster / test - nodejs_14x_8k_multiarchpkg - linux - amd64 - prod_pbmodel - opt . yml <nl> build : <nl> $ { nodejs . packages_xenial . prep_14 } & & $ { nodejs . packages_xenial . apt_pinning } & & apt - get - qq update & & apt - get - qq - y install $ { nodejs . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - node - tests - prod . sh 14 . x 8k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU NodeJS MultiArch Package 14 . x prod tests ( 8kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on NodeJS MultiArch Package v14 . x on prod model , CPU only , optimized version ( 8kHz ) " <nl> mmm a / taskcluster / test - nodejs_14x_8k_multiarchpkg - linux - tflite - opt . yml <nl> ppp b / taskcluster / test - nodejs_14x_8k_multiarchpkg - linux - tflite - opt . yml <nl> build : <nl> $ { nodejs . packages_xenial . prep_14 } & & $ { nodejs . packages_xenial . apt_pinning } & & apt - get - qq update & & apt - get - qq - y install $ { nodejs . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - node_tflite - tests . sh 14 . x 8k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 TFLite NodeJS MultiArch Package 14 . x tests ( 8kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on NodeJS MultiArch Package v14 . x , TFLite only , optimized version ( 8kHz ) " <nl> mmm a / taskcluster / test - nodejs_14x_8k_tflite - linux - amd64 - prod - opt . yml <nl> ppp b / taskcluster / test - nodejs_14x_8k_tflite - linux - amd64 - prod - opt . yml <nl> build : <nl> $ { nodejs . packages_xenial . prep_14 } & & $ { nodejs . packages_xenial . apt_pinning } & & apt - get - qq update & & apt - get - qq - y install $ { nodejs . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - node_tflite - tests - prod . sh 14 . x 8k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 TFLite NodeJS 14 . x prod tests ( 8kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on NodeJS v14 . x on prod model , TFLite , optimized version ( 8kHz ) " <nl> mmm a / taskcluster / test - python_35_16k - linux - amd64 - opt . yml <nl> ppp b / taskcluster / test - python_35_16k - linux - amd64 - opt . yml <nl> build : <nl> test_model_task : " test - training_16k - linux - amd64 - py36m - opt " <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - python - tests . sh 3 . 5 . 8 : m 16k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU Python v3 . 5 tests ( 16kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on Python v3 . 5 , CPU only , optimized version ( 16kHz ) " <nl> mmm a / taskcluster / test - python_35_16k - linux - amd64 - prod_pbmodel - opt . yml <nl> ppp b / taskcluster / test - python_35_16k - linux - amd64 - prod_pbmodel - opt . yml <nl> build : <nl> - " linux - amd64 - cpu - opt " <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - python - tests - prod . sh 3 . 5 . 8 : m 16k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU Python v3 . 5 prod tests ( 16kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on Python v3 . 5 on prod model , CPU only , optimized version ( 16kHz ) " <nl> mmm a / taskcluster / test - python_35_8k - linux - amd64 - opt . yml <nl> ppp b / taskcluster / test - python_35_8k - linux - amd64 - opt . yml <nl> build : <nl> test_model_task : " test - training_8k - linux - amd64 - py36m - opt " <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - python - tests . sh 3 . 5 . 8 : m 8k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU Python v3 . 5 tests ( 8kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on Python v3 . 5 , CPU only , optimized version ( 8kHz ) " <nl> mmm a / taskcluster / test - python_35_8k - linux - amd64 - prod_pbmodel - opt . yml <nl> ppp b / taskcluster / test - python_35_8k - linux - amd64 - prod_pbmodel - opt . yml <nl> build : <nl> - " linux - amd64 - cpu - opt " <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - python - tests - prod . sh 3 . 5 . 8 : m 8k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU Python v3 . 5 prod tests ( 8kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on Python v3 . 5 on prod model , CPU only , optimized version ( 8kHz ) " <nl> mmm a / taskcluster / test - python_35_tflite_16k - linux - amd64 - opt . yml <nl> ppp b / taskcluster / test - python_35_tflite_16k - linux - amd64 - opt . yml <nl> build : <nl> test_model_task : " test - training_16k - linux - amd64 - py36m - opt " <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - python_tflite - tests . sh 3 . 5 . 8 : m 16k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 TFLite Python v3 . 5 tests ( 16kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on Python v3 . 5 TFLite , optimized version ( 16kHz ) " <nl> mmm a / taskcluster / test - python_35_tflite_16k - linux - amd64 - prod - opt . yml <nl> ppp b / taskcluster / test - python_35_tflite_16k - linux - amd64 - prod - opt . yml <nl> build : <nl> - " linux - amd64 - tflite - opt " <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - python_tflite - tests - prod . sh 3 . 5 . 8 : m 16k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 TFLite Python v3 . 5 prod tests ( 16kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on Python v3 . 5 on prod model , TFLite , optimized version ( 16kHz ) " <nl> mmm a / taskcluster / test - python_35_tflite_8k - linux - amd64 - prod - opt . yml <nl> ppp b / taskcluster / test - python_35_tflite_8k - linux - amd64 - prod - opt . yml <nl> build : <nl> - " linux - amd64 - tflite - opt " <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - python_tflite - tests - prod . sh 3 . 5 . 8 : m 8k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 TFLite Python v3 . 5 prod tests ( 8kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on Python v3 . 5 on prod model , TFLite , optimized version ( 8kHz ) " <nl> mmm a / taskcluster / test - python_36_16k - linux - amd64 - opt . yml <nl> ppp b / taskcluster / test - python_36_16k - linux - amd64 - opt . yml <nl> build : <nl> test_model_task : " test - training_16k - linux - amd64 - py36m - opt " <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - python - tests . sh 3 . 6 . 10 : m 16k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU Python v3 . 6 tests ( 16kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on Python v3 . 6 , CPU only , optimized version ( 16kHz ) " <nl> mmm a / taskcluster / test - python_36_16k - linux - amd64 - prod_pbmodel - opt . yml <nl> ppp b / taskcluster / test - python_36_16k - linux - amd64 - prod_pbmodel - opt . yml <nl> build : <nl> - " linux - amd64 - cpu - opt " <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - python - tests - prod . sh 3 . 6 . 10 : m 16k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU Python v3 . 6 prod tests ( 16kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on Python v3 . 6 on prod model , CPU only , optimized version ( 16kHz ) " <nl> mmm a / taskcluster / test - python_36_8k - linux - amd64 - opt . yml <nl> ppp b / taskcluster / test - python_36_8k - linux - amd64 - opt . yml <nl> build : <nl> test_model_task : " test - training_8k - linux - amd64 - py36m - opt " <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - python - tests . sh 3 . 6 . 10 : m 8k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU Python v3 . 6 tests ( 8kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on Python v3 . 6 , CPU only , optimized version ( 8kHz ) " <nl> mmm a / taskcluster / test - python_36_8k - linux - amd64 - prod_pbmodel - opt . yml <nl> ppp b / taskcluster / test - python_36_8k - linux - amd64 - prod_pbmodel - opt . yml <nl> build : <nl> - " linux - amd64 - cpu - opt " <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - python - tests - prod . sh 3 . 6 . 10 : m 8k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU Python v3 . 6 prod tests ( 8kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on Python v3 . 6 on prod model , CPU only , optimized version ( 8kHz ) " <nl> mmm a / taskcluster / test - python_36_tflite_16k - linux - amd64 - opt . yml <nl> ppp b / taskcluster / test - python_36_tflite_16k - linux - amd64 - opt . yml <nl> build : <nl> test_model_task : " test - training_16k - linux - amd64 - py36m - opt " <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - python_tflite - tests . sh 3 . 6 . 10 : m 16k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 TFLite Python v3 . 6 tests ( 16kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on Python v3 . 6 TFLite , optimized version ( 16kHz ) " <nl> mmm a / taskcluster / test - python_36_tflite_16k - linux - amd64 - prod - opt . yml <nl> ppp b / taskcluster / test - python_36_tflite_16k - linux - amd64 - prod - opt . yml <nl> build : <nl> - " linux - amd64 - tflite - opt " <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - python_tflite - tests - prod . sh 3 . 6 . 10 : m 16k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 TFLite Python v3 . 6 prod tests ( 16kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on Python v3 . 6 on prod model , TFLite , optimized version ( 16kHz ) " <nl> mmm a / taskcluster / test - python_36_tflite_8k - linux - amd64 - prod - opt . yml <nl> ppp b / taskcluster / test - python_36_tflite_8k - linux - amd64 - prod - opt . yml <nl> build : <nl> - " linux - amd64 - tflite - opt " <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - python_tflite - tests - prod . sh 3 . 6 . 10 : m 8k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 TFLite Python v3 . 6 prod tests ( 8kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on Python v3 . 6 on prod model , TFLite , optimized version ( 8kHz ) " <nl> mmm a / taskcluster / test - python_37_16k - linux - amd64 - opt . yml <nl> ppp b / taskcluster / test - python_37_16k - linux - amd64 - opt . yml <nl> build : <nl> test_model_task : " test - training_16k - linux - amd64 - py36m - opt " <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - python - tests . sh 3 . 7 . 6 : m 16k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU Python v3 . 7 tests ( 16kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on Python v3 . 7 , CPU only , optimized version ( 16kHz ) " <nl> mmm a / taskcluster / test - python_37_16k - linux - amd64 - prod_pbmodel - opt . yml <nl> ppp b / taskcluster / test - python_37_16k - linux - amd64 - prod_pbmodel - opt . yml <nl> build : <nl> - " linux - amd64 - cpu - opt " <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - python - tests - prod . sh 3 . 7 . 6 : m 16k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU Python v3 . 7 prod tests ( 16kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on Python v3 . 7 on prod model , CPU only , optimized version ( 16kHz ) " <nl> mmm a / taskcluster / test - python_37_8k - linux - amd64 - opt . yml <nl> ppp b / taskcluster / test - python_37_8k - linux - amd64 - opt . yml <nl> build : <nl> test_model_task : " test - training_8k - linux - amd64 - py36m - opt " <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - python - tests . sh 3 . 7 . 6 : m 8k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU Python v3 . 7 tests ( 8kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on Python v3 . 7 , CPU only , optimized version ( 8kHz ) " <nl> mmm a / taskcluster / test - python_37_8k - linux - amd64 - prod_pbmodel - opt . yml <nl> ppp b / taskcluster / test - python_37_8k - linux - amd64 - prod_pbmodel - opt . yml <nl> build : <nl> - " linux - amd64 - cpu - opt " <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - python - tests - prod . sh 3 . 7 . 6 : m 8k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU Python v3 . 7 prod tests ( 8kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on Python v3 . 7 on prod model , CPU only , optimized version ( 8kHz ) " <nl> mmm a / taskcluster / test - python_37_tflite_16k - linux - amd64 - opt . yml <nl> ppp b / taskcluster / test - python_37_tflite_16k - linux - amd64 - opt . yml <nl> build : <nl> test_model_task : " test - training_16k - linux - amd64 - py36m - opt " <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - python_tflite - tests . sh 3 . 7 . 6 : m 16k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 TFLite Python v3 . 7 tests ( 16kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on Python v3 . 7 TFLite , optimized version ( 16kHz ) " <nl> mmm a / taskcluster / test - python_37_tflite_16k - linux - amd64 - prod - opt . yml <nl> ppp b / taskcluster / test - python_37_tflite_16k - linux - amd64 - prod - opt . yml <nl> build : <nl> - " linux - amd64 - tflite - opt " <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - python_tflite - tests - prod . sh 3 . 7 . 6 : m 16k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 TFLite Python v3 . 7 prod tests ( 16kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on Python v3 . 7 on prod model , TFLite , optimized version ( 16kHz ) " <nl> mmm a / taskcluster / test - python_37_tflite_8k - linux - amd64 - prod - opt . yml <nl> ppp b / taskcluster / test - python_37_tflite_8k - linux - amd64 - prod - opt . yml <nl> build : <nl> - " linux - amd64 - tflite - opt " <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - python_tflite - tests - prod . sh 3 . 7 . 6 : m 8k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 TFLite Python v3 . 7 prod tests ( 8kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on Python v3 . 7 on prod model , TFLite , optimized version ( 8kHz ) " <nl> mmm a / taskcluster / test - python_38_16k - linux - amd64 - opt . yml <nl> ppp b / taskcluster / test - python_38_16k - linux - amd64 - opt . yml <nl> build : <nl> test_model_task : " test - training_16k - linux - amd64 - py36m - opt " <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - python - tests . sh 3 . 8 . 1 : 16k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU Python v3 . 8 tests ( 16kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on Python v3 . 8 , CPU only , optimized version ( 16kHz ) " <nl> mmm a / taskcluster / test - python_38_16k - linux - amd64 - prod_pbmodel - opt . yml <nl> ppp b / taskcluster / test - python_38_16k - linux - amd64 - prod_pbmodel - opt . yml <nl> build : <nl> - " linux - amd64 - cpu - opt " <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - python - tests - prod . sh 3 . 8 . 1 : 16k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU Python v3 . 8 prod tests ( 16kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on Python v3 . 8 on prod model , CPU only , optimized version ( 16kHz ) " <nl> mmm a / taskcluster / test - python_38_8k - linux - amd64 - opt . yml <nl> ppp b / taskcluster / test - python_38_8k - linux - amd64 - opt . yml <nl> build : <nl> test_model_task : " test - training_8k - linux - amd64 - py36m - opt " <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - python - tests . sh 3 . 8 . 1 : 8k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU Python v3 . 8 tests ( 8kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on Python v3 . 8 , CPU only , optimized version ( 8kHz ) " <nl> mmm a / taskcluster / test - python_38_8k - linux - amd64 - prod_pbmodel - opt . yml <nl> ppp b / taskcluster / test - python_38_8k - linux - amd64 - prod_pbmodel - opt . yml <nl> build : <nl> - " linux - amd64 - cpu - opt " <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - python - tests - prod . sh 3 . 8 . 1 : 8k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU Python v3 . 8 prod tests ( 8kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on Python v3 . 8 on prod model , CPU only , optimized version ( 8kHz ) " <nl> mmm a / taskcluster / test - python_38_tflite_16k - linux - amd64 - opt . yml <nl> ppp b / taskcluster / test - python_38_tflite_16k - linux - amd64 - opt . yml <nl> build : <nl> test_model_task : " test - training_16k - linux - amd64 - py36m - opt " <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - python_tflite - tests . sh 3 . 8 . 1 : 16k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 TFLite Python v3 . 8 tests ( 16kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on Python v3 . 8 TFLite , optimized version ( 16kHz ) " <nl> mmm a / taskcluster / test - python_38_tflite_16k - linux - amd64 - prod - opt . yml <nl> ppp b / taskcluster / test - python_38_tflite_16k - linux - amd64 - prod - opt . yml <nl> build : <nl> - " linux - amd64 - tflite - opt " <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - python_tflite - tests - prod . sh 3 . 8 . 1 : 16k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 TFLite Python v3 . 8 prod tests ( 16kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on Python v3 . 8 on prod model , TFLite , optimized version ( 16kHz ) " <nl> mmm a / taskcluster / test - python_38_tflite_8k - linux - amd64 - prod - opt . yml <nl> ppp b / taskcluster / test - python_38_tflite_8k - linux - amd64 - prod - opt . yml <nl> build : <nl> - " linux - amd64 - tflite - opt " <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - python_tflite - tests - prod . sh 3 . 8 . 1 : 8k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 TFLite Python v3 . 8 prod tests ( 8kHz ) " <nl> description : " Testing DeepSpeech for Linux / AMD64 on Python v3 . 8 on prod model , TFLite , optimized version ( 8kHz ) " <nl> mmm a / taskcluster / test - singleshotinference - linux - amd64 - py36m - opt . yml <nl> ppp b / taskcluster / test - singleshotinference - linux - amd64 - py36m - opt . yml <nl> build : <nl> - " linux - amd64 - ctc - opt " <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - single - shot - inference . sh 3 . 6 . 10 : m " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU single - shot inference Py3 . 6 " <nl> description : " Single - shot inference a DeepSpeech LDC93S1 checkpoint for Linux / AMD64 using upstream TensorFlow Python 3 . 6 , CPU only , optimized version " <nl> mmm a / taskcluster / test - training - extra_16k - linux - amd64 - py35m - opt . yml <nl> ppp b / taskcluster / test - training - extra_16k - linux - amd64 - py35m - opt . yml <nl> build : <nl> apt - get - qq update & & apt - get - qq - y install $ { training . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - train - extra - tests . sh 3 . 5 . 8 : m 16k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU 8kHz all training features Py3 . 7 " <nl> description : " Training ( all features ) a DeepSpeech LDC93S1 model for Linux / AMD64 8kHz Python 3 . 7 , CPU only , optimized version " <nl> mmm a / taskcluster / test - training - extra_16k - linux - amd64 - py36m - opt . yml <nl> ppp b / taskcluster / test - training - extra_16k - linux - amd64 - py36m - opt . yml <nl> build : <nl> apt - get - qq update & & apt - get - qq - y install $ { training . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - train - extra - tests . sh 3 . 6 . 10 : m 16k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU 8kHz all training features Py3 . 7 " <nl> description : " Training ( all features ) a DeepSpeech LDC93S1 model for Linux / AMD64 8kHz Python 3 . 7 , CPU only , optimized version " <nl> mmm a / taskcluster / test - training - extra_16k - linux - amd64 - py37m - opt . yml <nl> ppp b / taskcluster / test - training - extra_16k - linux - amd64 - py37m - opt . yml <nl> build : <nl> apt - get - qq update & & apt - get - qq - y install $ { training . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - train - extra - tests . sh 3 . 7 . 6 : m 16k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU 8kHz all training features Py3 . 7 " <nl> description : " Training ( all features ) a DeepSpeech LDC93S1 model for Linux / AMD64 8kHz Python 3 . 7 , CPU only , optimized version " <nl> mmm a / taskcluster / test - training - extra_8k - linux - amd64 - py36m - opt . yml <nl> ppp b / taskcluster / test - training - extra_8k - linux - amd64 - py36m - opt . yml <nl> build : <nl> apt - get - qq update & & apt - get - qq - y install $ { training . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - train - extra - tests . sh 3 . 6 . 10 : m 8k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU 8kHz all training features Py3 . 7 " <nl> description : " Training ( all features ) a DeepSpeech LDC93S1 model for Linux / AMD64 8kHz Python 3 . 7 , CPU only , optimized version " <nl> mmm a / taskcluster / test - training - extra_8k - linux - amd64 - py37m - opt . yml <nl> ppp b / taskcluster / test - training - extra_8k - linux - amd64 - py37m - opt . yml <nl> build : <nl> apt - get - qq update & & apt - get - qq - y install $ { training . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - train - extra - tests . sh 3 . 7 . 6 : m 8k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU 8kHz all training features Py3 . 7 " <nl> description : " Training ( all features ) a DeepSpeech LDC93S1 model for Linux / AMD64 8kHz Python 3 . 7 , CPU only , optimized version " <nl> mmm a / taskcluster / test - training - pypi_16k - linux - amd64 - py35m - opt . yml <nl> ppp b / taskcluster / test - training - pypi_16k - linux - amd64 - py35m - opt . yml <nl> build : <nl> apt - get - qq update & & apt - get - qq - y install $ { training . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - train - tests . sh 3 . 5 . 8 : m 16k - - pypi " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU 16kHz PyPI training Py3 . 5 " <nl> description : " Training a DeepSpeech LDC93S1 model for Linux / AMD64 16kHz Python 3 . 5 , CPU only , optimized version , decoder package from PyPI " <nl> mmm a / taskcluster / test - training - pypi_16k - linux - amd64 - py36m - opt . yml <nl> ppp b / taskcluster / test - training - pypi_16k - linux - amd64 - py36m - opt . yml <nl> build : <nl> apt - get - qq update & & apt - get - qq - y install $ { training . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - train - tests . sh 3 . 6 . 10 : m 16k - - pypi " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU 16kHz PyPI training Py3 . 6 " <nl> description : " Training a DeepSpeech LDC93S1 model for Linux / AMD64 16kHz Python 3 . 6 , CPU only , optimized version , decoder package from PyPI " <nl> mmm a / taskcluster / test - training - pypi_16k - linux - amd64 - py37m - opt . yml <nl> ppp b / taskcluster / test - training - pypi_16k - linux - amd64 - py37m - opt . yml <nl> build : <nl> apt - get - qq update & & apt - get - qq - y install $ { training . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - train - tests . sh 3 . 7 . 6 : m 16k - - pypi " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU 16kHz PyPI training Py3 . 7 " <nl> description : " Training a DeepSpeech LDC93S1 model for Linux / AMD64 16kHz Python 3 . 7 , CPU only , optimized version , decoder package from PyPI " <nl> mmm a / taskcluster / test - training - pypi_8k - linux - amd64 - py36m - opt . yml <nl> ppp b / taskcluster / test - training - pypi_8k - linux - amd64 - py36m - opt . yml <nl> build : <nl> apt - get - qq update & & apt - get - qq - y install $ { training . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - train - tests . sh 3 . 6 . 10 : m 8k - - pypi " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU 8kHz PyPI training Py3 . 6 " <nl> description : " Training a DeepSpeech LDC93S1 model for Linux / AMD64 8kHz Python 3 . 6 , CPU only , optimized version , decoder package from PyPI " <nl> mmm a / taskcluster / test - training - pypi_8k - linux - amd64 - py37m - opt . yml <nl> ppp b / taskcluster / test - training - pypi_8k - linux - amd64 - py37m - opt . yml <nl> build : <nl> apt - get - qq update & & apt - get - qq - y install $ { training . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - train - tests . sh 3 . 7 . 6 : m 8k - - pypi " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU 8kHz PyPI training Py3 . 7 " <nl> description : " Training a DeepSpeech LDC93S1 model for Linux / AMD64 8kHz Python 3 . 7 , CPU only , optimized version , decoder package from PyPI " <nl> mmm a / taskcluster / test - training - unittests_8k - linux - amd64 - py35m - opt . yml <nl> ppp b / taskcluster / test - training - unittests_8k - linux - amd64 - py35m - opt . yml <nl> <nl> build : <nl> - template_file : test - linux - opt - base . tyml <nl> - dependencies : <nl> - - " linux - amd64 - ctc - opt " <nl> - system_setup : <nl> - > <nl> - apt - get - qq update & & apt - get - qq - y install $ { training . packages_xenial . apt } <nl> - args : <nl> - tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - train - unittests . sh 3 . 5 . 8 : m " <nl> - metadata : <nl> - name : " DeepSpeech on Linux AMD64 CPU training unittests using Python 3 . 5 " <nl> - description : " Training unittests DeepSpeech LDC93S1 model for Linux / AMD64 using Python 3 . 5 , for CPU only , and optimized version " <nl> + template_file : test - linux - opt - base . tyml <nl> + dependencies : <nl> + - " linux - amd64 - ctc - opt " <nl> + system_setup : <nl> + > <nl> + apt - get - qq update & & apt - get - qq - y install $ { training . packages_xenial . apt } <nl> + args : <nl> + tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - train - unittests . sh 3 . 5 . 8 : m " <nl> + workerType : " $ { docker . dsTests } " <nl> + metadata : <nl> + name : " DeepSpeech on Linux AMD64 CPU training unittests using Python 3 . 5 " <nl> + description : " Training unittests DeepSpeech LDC93S1 model for Linux / AMD64 using Python 3 . 5 , for CPU only , and optimized version " <nl> mmm a / taskcluster / test - training - unittests_8k - linux - amd64 - py36m - opt . yml <nl> ppp b / taskcluster / test - training - unittests_8k - linux - amd64 - py36m - opt . yml <nl> <nl> build : <nl> - template_file : test - linux - opt - base . tyml <nl> - dependencies : <nl> - - " linux - amd64 - ctc - opt " <nl> - system_setup : <nl> - > <nl> - apt - get - qq update & & apt - get - qq - y install $ { training . packages_xenial . apt } <nl> - args : <nl> - tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - train - unittests . sh 3 . 6 . 10 : m " <nl> - metadata : <nl> - name : " DeepSpeech on Linux AMD64 CPU training unittests using Python 3 . 6 " <nl> - description : " Training unittests DeepSpeech LDC93S1 model for Linux / AMD64 using Python 3 . 6 , for CPU only , and optimized version " <nl> + template_file : test - linux - opt - base . tyml <nl> + dependencies : <nl> + - " linux - amd64 - ctc - opt " <nl> + system_setup : <nl> + > <nl> + apt - get - qq update & & apt - get - qq - y install $ { training . packages_xenial . apt } <nl> + args : <nl> + tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - train - unittests . sh 3 . 6 . 10 : m " <nl> + workerType : " $ { docker . dsTests } " <nl> + metadata : <nl> + name : " DeepSpeech on Linux AMD64 CPU training unittests using Python 3 . 6 " <nl> + description : " Training unittests DeepSpeech LDC93S1 model for Linux / AMD64 using Python 3 . 6 , for CPU only , and optimized version " <nl> <nl> mmm a / taskcluster / test - training - unittests_8k - linux - amd64 - py37m - opt . yml <nl> ppp b / taskcluster / test - training - unittests_8k - linux - amd64 - py37m - opt . yml <nl> <nl> build : <nl> - template_file : test - linux - opt - base . tyml <nl> - dependencies : <nl> - - " linux - amd64 - ctc - opt " <nl> - system_setup : <nl> - > <nl> - apt - get - qq update & & apt - get - qq - y install $ { training . packages_xenial . apt } <nl> - args : <nl> - tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - train - unittests . sh 3 . 7 . 6 : m " <nl> - metadata : <nl> - name : " DeepSpeech on Linux AMD64 CPU training unittests using Python 3 . 7 " <nl> - description : " Training unittests DeepSpeech LDC93S1 model for Linux / AMD64 using Python 3 . 7 , for CPU only , and optimized version " <nl> + template_file : test - linux - opt - base . tyml <nl> + dependencies : <nl> + - " linux - amd64 - ctc - opt " <nl> + system_setup : <nl> + > <nl> + apt - get - qq update & & apt - get - qq - y install $ { training . packages_xenial . apt } <nl> + args : <nl> + tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - train - unittests . sh 3 . 7 . 6 : m " <nl> + workerType : " $ { docker . dsTests } " <nl> + metadata : <nl> + name : " DeepSpeech on Linux AMD64 CPU training unittests using Python 3 . 7 " <nl> + description : " Training unittests DeepSpeech LDC93S1 model for Linux / AMD64 using Python 3 . 7 , for CPU only , and optimized version " <nl> mmm a / taskcluster / test - training_16k - linux - amd64 - py35m - opt . yml <nl> ppp b / taskcluster / test - training_16k - linux - amd64 - py35m - opt . yml <nl> build : <nl> apt - get - qq update & & apt - get - qq - y install $ { training . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - train - tests . sh 3 . 5 . 8 : m 16k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU 16kHz basic training Py3 . 5 " <nl> description : " Training a DeepSpeech LDC93S1 model for Linux / AMD64 16kHz Python 3 . 5 , CPU only , optimized version " <nl> mmm a / taskcluster / test - training_16k - linux - amd64 - py36m - opt . yml <nl> ppp b / taskcluster / test - training_16k - linux - amd64 - py36m - opt . yml <nl> build : <nl> apt - get - qq update & & apt - get - qq - y install $ { training . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - train - tests . sh 3 . 6 . 10 : m 16k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU 16kHz basic training Py3 . 6 " <nl> description : " Training a DeepSpeech LDC93S1 model for Linux / AMD64 16kHz Python 3 . 6 , CPU only , optimized version " <nl> mmm a / taskcluster / test - training_16k - linux - amd64 - py37m - opt . yml <nl> ppp b / taskcluster / test - training_16k - linux - amd64 - py37m - opt . yml <nl> build : <nl> apt - get - qq update & & apt - get - qq - y install $ { training . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - train - tests . sh 3 . 7 . 6 : m 16k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU 16kHz basic training Py3 . 7 " <nl> description : " Training a DeepSpeech LDC93S1 model for Linux / AMD64 16kHz Python 3 . 7 , CPU only , optimized version " <nl> mmm a / taskcluster / test - training_8k - linux - amd64 - py36m - opt . yml <nl> ppp b / taskcluster / test - training_8k - linux - amd64 - py36m - opt . yml <nl> build : <nl> apt - get - qq update & & apt - get - qq - y install $ { training . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - train - tests . sh 3 . 6 . 10 : m 8k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU 8kHz basic training Py3 . 6 " <nl> description : " Training a DeepSpeech LDC93S1 model for Linux / AMD64 8kHz Python 3 . 6 , CPU only , optimized version " <nl> mmm a / taskcluster / test - training_8k - linux - amd64 - py37m - opt . yml <nl> ppp b / taskcluster / test - training_8k - linux - amd64 - py37m - opt . yml <nl> build : <nl> apt - get - qq update & & apt - get - qq - y install $ { training . packages_xenial . apt } <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - train - tests . sh 3 . 7 . 6 : m 8k " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU 8kHz basic training Py3 . 7 " <nl> description : " Training a DeepSpeech LDC93S1 model for Linux / AMD64 8kHz Python 3 . 7 , CPU only , optimized version " <nl> mmm a / taskcluster / test - transfer - linux - amd64 - py36m - opt . yml <nl> ppp b / taskcluster / test - transfer - linux - amd64 - py36m - opt . yml <nl> build : <nl> - " linux - amd64 - ctc - opt " <nl> args : <nl> tests_cmdline : " $ { system . homedir . linux } / DeepSpeech / ds / taskcluster / tc - transfer - tests . sh 3 . 6 . 10 : m " <nl> + workerType : " $ { docker . dsTests } " <nl> metadata : <nl> name : " DeepSpeech Linux AMD64 CPU transfer learning Py3 . 6 " <nl> description : " Training a DeepSpeech LDC93S1 model with transfer learning for Linux / AMD64 16kHz Python 3 . 6 , CPU only , optimized version " <nl> mmm a / taskcluster / tf_android - arm64 - opt . yml <nl> ppp b / taskcluster / tf_android - arm64 - opt . yml <nl> build : <nl> build : " taskcluster / tf_tc - build . sh - - android - arm64 " <nl> package : " taskcluster / tf_tc - package . sh " <nl> maxRunTime : 14400 <nl> + workerType : " $ { docker . tfBuild } " <nl> metadata : <nl> name : " TensorFlow Android ARM64 " <nl> description : " Building TensorFlow for Android ARM64 , optimized version " <nl> mmm a / taskcluster / tf_android - armv7 - opt . yml <nl> ppp b / taskcluster / tf_android - armv7 - opt . yml <nl> build : <nl> build : " taskcluster / tf_tc - build . sh - - android - armv7 " <nl> package : " taskcluster / tf_tc - package . sh " <nl> maxRunTime : 14400 <nl> + workerType : " $ { docker . tfBuild } " <nl> metadata : <nl> name : " TensorFlow Android ARMv7 " <nl> description : " Building TensorFlow for Android ARMv7 , optimized version " <nl> mmm a / taskcluster / tf_linux - amd64 - cpu - opt . yml <nl> ppp b / taskcluster / tf_linux - amd64 - cpu - opt . yml <nl> build : <nl> build : " taskcluster / tf_tc - build . sh - - cpu " <nl> package : " taskcluster / tf_tc - package . sh " <nl> maxRunTime : 14400 <nl> + workerType : " $ { docker . tfBuild } " <nl> metadata : <nl> name : " TensorFlow Linux AMD64 CPU " <nl> description : " Building TensorFlow for Linux / AMD64 , CPU only , optimized version " <nl> mmm a / taskcluster / tf_linux - amd64 - gpu - opt . yml <nl> ppp b / taskcluster / tf_linux - amd64 - gpu - opt . yml <nl> build : <nl> build : " taskcluster / tf_tc - build . sh - - gpu " <nl> package : " taskcluster / tf_tc - package . sh " <nl> maxRunTime : 14400 <nl> + workerType : " $ { docker . tfBuild } " <nl> metadata : <nl> name : " TensorFlow Linux AMD64 CUDA " <nl> description : " Building TensorFlow for Linux / AMD64 , CUDA - enabled , optimized version " <nl> mmm a / taskcluster / tf_linux - arm64 - cpu - opt . yml <nl> ppp b / taskcluster / tf_linux - arm64 - cpu - opt . yml <nl> build : <nl> build : " taskcluster / tf_tc - build . sh - - arm64 " <nl> package : " taskcluster / tf_tc - package . sh " <nl> maxRunTime : 14400 <nl> + workerType : " $ { docker . tfBuild } " <nl> metadata : <nl> name : " TensorFlow Linux ARM64 Cortex - A53 CPU " <nl> description : " Building TensorFlow for Linux ARM64 Cortex - A53 , CPU only , optimized version " <nl> mmm a / taskcluster / tf_linux - rpi3 - cpu - opt . yml <nl> ppp b / taskcluster / tf_linux - rpi3 - cpu - opt . yml <nl> build : <nl> build : " taskcluster / tf_tc - build . sh - - arm " <nl> package : " taskcluster / tf_tc - package . sh " <nl> maxRunTime : 14400 <nl> + workerType : " $ { docker . tfBuild } " <nl> metadata : <nl> name : " TensorFlow Linux RPi3 / ARMv7 CPU " <nl> description : " Building TensorFlow for Linux RPi3 ARMv7 , CPU only , optimized version " <nl> mmm a / taskcluster / worker . cyml <nl> ppp b / taskcluster / worker . cyml <nl> taskcluster : <nl> schedulerId : taskcluster - github <nl> docker : <nl> provisionerId : proj - deepspeech <nl> - workerType : ci <nl> workerTypeKvm : kvm <nl> workerTypeWin : win <nl> workerTypeCuda : win - gpu <nl>
Fix : Use finer - grained gcp workers
mozilla/DeepSpeech
040f5eb2a3ccde75484aba510cdba0479f35bac6
2020-08-04T09:15:07Z
mmm a / DEPS <nl> ppp b / DEPS <nl> vars = { <nl> <nl> deps = { <nl> ' build ' : <nl> - Var ( ' chromium_url ' ) + ' / chromium / src / build . git ' + ' @ ' + ' 1016d674b32524375f6469b00267dcaed712ed91 ' , <nl> + Var ( ' chromium_url ' ) + ' / chromium / src / build . git ' + ' @ ' + ' b3c270e43c03ad0b1cde3f34a88ba183fc073b10 ' , <nl> ' third_party / depot_tools ' : <nl> - Var ( ' chromium_url ' ) + ' / chromium / tools / depot_tools . git ' + ' @ ' + ' 3b39cefc6195f782b655e2c73ac2a73313c28879 ' , <nl> + Var ( ' chromium_url ' ) + ' / chromium / tools / depot_tools . git ' + ' @ ' + ' 364205c70ed16c00802b1c264e88d8e03a0b37ae ' , <nl> ' third_party / icu ' : <nl> Var ( ' chromium_url ' ) + ' / chromium / deps / icu . git ' + ' @ ' + ' 899e18383fd732b47e6978db2b960a1b2a80179b ' , <nl> ' third_party / instrumented_libraries ' : <nl>
Update V8 DEPS .
v8/v8
9327fbdd1187c9c708784c05570be6c9b0e035ea
2020-12-31T03:45:29Z
mmm a / doc / README . md <nl> ppp b / doc / README . md <nl> Bitcoin Core 0 . 13 . 99 <nl> <nl> Setup <nl> mmmmmmmmmmmmmmmmmmmmm <nl> - [ Bitcoin Core ] ( http : / / bitcoin . org / en / download ) is the original Bitcoin client and it builds the backbone of the network . However , it downloads and stores the entire history of Bitcoin transactions ( which is currently several GBs ) ; depending on the speed of your computer and network connection , the synchronization process can take anywhere from a few hours to a day or more . <nl> + Bitcoin Core is the original Bitcoin client and it builds the backbone of the network . However , it downloads and stores the entire history of Bitcoin transactions ( which is currently several GBs ) ; depending on the speed of your computer and network connection , the synchronization process can take anywhere from a few hours to a day or more . <nl> + <nl> + To download Bitcoin Core , visit [ bitcoincore . org ] ( https : / / bitcoincore . org / en / releases / ) . <nl> <nl> Running <nl> mmmmmmmmmmmmmmmmmmmmm <nl> Development <nl> The Bitcoin repo ' s [ root README ] ( / README . md ) contains relevant information on the development process and automated testing . <nl> <nl> - [ Developer Notes ] ( developer - notes . md ) <nl> - - [ Multiwallet Qt Development ] ( multiwallet - qt . md ) <nl> - [ Release Notes ] ( release - notes . md ) <nl> - [ Release Process ] ( release - process . md ) <nl> - [ Source Code Documentation ( External Link ) ] ( https : / / dev . visucore . com / bitcoin / doxygen / ) <nl> - [ Translation Process ] ( translation_process . md ) <nl> - [ Translation Strings Policy ] ( translation_strings_policy . md ) <nl> - [ Unit Tests ] ( unit - tests . md ) <nl> + - [ Travis CI ] ( travis - ci . md ) <nl> - [ Unauthenticated REST Interface ] ( REST - interface . md ) <nl> - [ Shared Libraries ] ( shared - libraries . md ) <nl> - [ BIPS ] ( bips . md ) <nl> The Bitcoin repo ' s [ root README ] ( / README . md ) contains relevant information on th <nl> # # # Miscellaneous <nl> - [ Assets Attribution ] ( assets - attribution . md ) <nl> - [ Files ] ( files . md ) <nl> + - [ Reduce Traffic ] ( reduce - traffic . md ) <nl> - [ Tor Support ] ( tor . md ) <nl> - [ Init Scripts ( systemd / upstart / openrc ) ] ( init . md ) <nl> + - [ ZMQ ] ( zmq . md ) <nl> <nl> License <nl> mmmmmmmmmmmmmmmmmmmmm <nl> - Distributed under the [ MIT software license ] ( http : / / www . opensource . org / licenses / mit - license . php ) . <nl> + Distributed under the [ MIT software license ] ( / COPYING ) . <nl> This product includes software developed by the OpenSSL Project for use in the [ OpenSSL Toolkit ] ( https : / / www . openssl . org / ) . This product includes <nl> cryptographic software written by Eric Young ( [ eay @ cryptsoft . com ] ( mailto : eay @ cryptsoft . com ) ) , and UPnP software written by Thomas Bernard . <nl> deleted file mode 100644 <nl> index 3caab818076b . . 000000000000 <nl> mmm a / doc / multiwallet - qt . md <nl> ppp / dev / null <nl> <nl> - Multiwallet Qt Development and Integration Strategy <nl> - = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> - <nl> - In order to support loading of multiple wallets in bitcoin - qt , a few changes in the UI architecture will be needed . <nl> - Fortunately , only four of the files in the existing project are affected by this change . <nl> - <nl> - Two new classes have been implemented in two new . h / . cpp file pairs , with much of the functionality that was previously <nl> - implemented in the BitcoinGUI class moved over to these new classes . <nl> - <nl> - The two existing files most affected , by far , are bitcoingui . h and bitcoingui . cpp , as the BitcoinGUI class will require <nl> - some major retrofitting . <nl> - <nl> - Only requiring some minor changes is bitcoin . cpp . <nl> - <nl> - Finally , two new headers and source files will have to be added to bitcoin - qt . pro . <nl> - <nl> - Changes to class BitcoinGUI <nl> mmmmmmmmmmmmmmmmmmmmmmmmmmm - <nl> - The principal change to the BitcoinGUI class concerns the QStackedWidget instance called centralWidget . <nl> - This widget owns five page views : overviewPage , transactionsPage , addressBookPage , receiveCoinsPage , and sendCoinsPage . <nl> - <nl> - A new class called * WalletView * inheriting from QStackedWidget has been written to handle all renderings and updates of <nl> - these page views . In addition to owning these five page views , a WalletView also has a pointer to a WalletModel instance . <nl> - This allows the construction of multiple WalletView objects , each rendering a distinct wallet . <nl> - <nl> - A second class called * WalletFrame * inheriting from QFrame has been written as a container for embedding all wallet - related <nl> - controls into BitcoinGUI . At present it contains the WalletView instances for the wallets and does little more than passing on messages <nl> - from BitcoinGUI to the currently selected WalletView . It is a WalletFrame instance <nl> - that takes the place of what used to be centralWidget in BitcoinGUI . The purpose of this class is to allow future <nl> - refinements of the wallet controls with minimal need for further modifications to BitcoinGUI , thus greatly simplifying <nl> - merges while reducing the risk of breaking top - level stuff . <nl> - <nl> - Changes to bitcoin . cpp <nl> mmmmmmmmmmmmmmmmmmmmm - - <nl> - bitcoin . cpp is the entry point into bitcoin - qt , and as such , will require some minor modifications to provide hooks for <nl> - multiple wallet support . Most importantly will be the way it instantiates WalletModels and passes them to the <nl> - singleton BitcoinGUI instance called window . Formerly , BitcoinGUI kept a pointer to a single instance of a WalletModel . <nl> - The initial change required is very simple : rather than calling ` window . setWalletModel ( & walletModel ) ; ` we perform the <nl> - following two steps : <nl> - <nl> - window . addWallet ( " ~ Default " , & walletModel ) ; <nl> - window . setCurrentWallet ( " ~ Default " ) ; <nl> - <nl> - The string parameter is just an arbitrary name given to the default wallet . It ' s been prepended with a tilde to avoid name collisions in the future with additional wallets . <nl> - <nl> - The shutdown call ` window . setWalletModel ( 0 ) ` has also been removed . In its place is now : <nl> - <nl> - window . removeAllWallets ( ) ; <nl> mmm a / doc / release - notes / release - notes - 0 . 13 . 0 . md <nl> ppp b / doc / release - notes / release - notes - 0 . 13 . 0 . md <nl> git merge commit are mentioned . <nl> - # 8041 ` 5b736dd ` Fix bip9 - softforks blockstore issue ( MarcoFalke ) <nl> - # 7994 ` 1f01443 ` Add op csv tests to script_tests . json ( Christewart ) <nl> - # 8038 ` e2bf830 ` Various minor fixes ( MarcoFalke ) <nl> - - # 8072 ` 1b87e5b ` Travis : ' make check ' in parallel and verbose ( MarcoFalke ) <nl> + - # 8072 ` 1b87e5b ` Travis : ' make check ' in parallel and verbose ( theuni ) <nl> - # 8056 ` 8844ef1 ` Remove hardcoded " 4 nodes " from test_framework ( MarcoFalke ) <nl> - # 8047 ` 37f9a1f ` Test_framework : Set wait - timeout for bitcoind procs ( MarcoFalke ) <nl> - # 8095 ` 6700cc9 ` Test framework : only cleanup on successful test runs ( sdaftuar ) <nl> mmm a / doc / release - process . md <nl> ppp b / doc / release - process . md <nl> Before every minor and major release : <nl> Before every major release : <nl> <nl> * Update hardcoded [ seeds ] ( / contrib / seeds / README . md ) , see [ this pull request ] ( https : / / github . com / bitcoin / bitcoin / pull / 7415 ) for an example . <nl> + * Update [ ` BLOCK_CHAIN_SIZE ` ] ( / src / qt / intro . cpp ) to the current size plus some overhead . <nl> <nl> # # # First time / New builders <nl> <nl> similarity index 88 % <nl> rename from doc / travis - ci . txt <nl> rename to doc / travis - ci . md <nl> mmm a / doc / travis - ci . txt <nl> ppp b / doc / travis - ci . md <nl> <nl> + Travis CI <nl> + = = = = = = = = = <nl> + <nl> Support for using travis - ci has been added in order to automate pull - testing . <nl> - See https : / / travis - ci . org / for more info <nl> + See [ travis - ci . org ] ( https : / / travis - ci . org / ) for more info <nl> <nl> This procedure is different than the pull - tester that came before it in a few <nl> ways . <nl> ways . <nl> There is nothing to administer . This is a major feature as it means <nl> that builds have no local state . Because there is no ability to login to the <nl> builders to install packages ( tools , dependencies , etc ) , the entire build <nl> - procedure must instead be controlled by a declarative script ( . travis . yml ) . <nl> + procedure must instead be controlled by a declarative script ` . travis . yml ` . <nl> This script declares each build configuration , creates virtual machines as <nl> necessary , builds , then discards the virtual machines . <nl> <nl> than a single pass / fail . This helps to catch build failures and logic errors <nl> that present on platforms other than the ones the author has tested . This <nl> matrix is defined in the build script and can be changed at any time . <nl> <nl> - All builders use the dependency - generator in the depends dir , rather than <nl> + All builders use the dependency - generator in the [ depends dir ] ( / depends ) , rather than <nl> using apt - get to install build dependencies . This guarantees that the tester <nl> is using the same versions as Gitian , so the build results are nearly identical <nl> to what would be found in a final release . However , this also means that builds <nl> mmm a / src / qt / bitcoingui . cpp <nl> ppp b / src / qt / bitcoingui . cpp <nl> const std : : string BitcoinGUI : : DEFAULT_UIPLATFORM = <nl> # endif <nl> ; <nl> <nl> + / * * Display name for default wallet name . Uses tilde to avoid name <nl> + * collisions in the future with additional wallets * / <nl> const QString BitcoinGUI : : DEFAULT_WALLET = " ~ Default " ; <nl> <nl> BitcoinGUI : : BitcoinGUI ( const PlatformStyle * _platformStyle , const NetworkStyle * networkStyle , QWidget * parent ) : <nl> mmm a / src / qt / walletframe . h <nl> ppp b / src / qt / walletframe . h <nl> QT_BEGIN_NAMESPACE <nl> class QStackedWidget ; <nl> QT_END_NAMESPACE <nl> <nl> + / * * <nl> + * A container for embedding all wallet - related <nl> + * controls into BitcoinGUI . The purpose of this class is to allow future <nl> + * refinements of the wallet controls with minimal need for further <nl> + * modifications to BitcoinGUI , thus greatly simplifying merges while <nl> + * reducing the risk of breaking top - level stuff . <nl> + * / <nl> class WalletFrame : public QFrame <nl> { <nl> Q_OBJECT <nl>
Merge : [ doc ] Rework docs
bitcoin/bitcoin
f92805025d5b59b7fdb5a076bbe076e5cc5447e2
2016-10-05T03:07:19Z
mmm a / test / mjsunit / wasm / jsapi - harness . js <nl> ppp b / test / mjsunit / wasm / jsapi - harness . js <nl> assertPromiseResult ( last_promise , _ = > { <nl> " the bug , please remove the test from the known failures list . " ) <nl> } <nl> if ( unexpected ) { <nl> + print ( " \ n " ) ; <nl> + print ( " # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # " ) ; <nl> + print ( " # # " ) ; <nl> + print ( " # Unexpected outcome . Did you forget to run ' gclient sync ' ? # " ) ; <nl> + print ( " # # " ) ; <nl> + print ( " # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # " ) ; <nl> + print ( " \ n " ) ; <nl> assertUnreachable ( " Unexpected outcome " ) ; <nl> } <nl> } <nl>
[ wasm ] Suggest ' gclient sync ' when test is failing
v8/v8
b19fd0b77965fdc960e463d5f127632f485dd3d5
2017-07-03T09:10:26Z
mmm a / include / swift / Driver / ToolChain . h <nl> ppp b / include / swift / Driver / ToolChain . h <nl> class ToolChain { <nl> / / / <nl> / / / \ param args Invocation arguments . <nl> / / / \ param sanitizer Sanitizer name . <nl> + / / / \ param shared Whether the library is shared <nl> virtual bool sanitizerRuntimeLibExists ( const llvm : : opt : : ArgList & args , <nl> - StringRef sanitizer ) const ; <nl> + StringRef sanitizer , <nl> + bool shared = true ) const ; <nl> <nl> } ; <nl> } / / end namespace driver <nl> mmm a / include / swift / Option / SanitizerOptions . h <nl> ppp b / include / swift / Option / SanitizerOptions . h <nl> class DiagnosticEngine ; <nl> / / sanitizer dylib with a given name . <nl> / / / \ return Returns a SanitizerKind . <nl> OptionSet < SanitizerKind > parseSanitizerArgValues ( <nl> - const llvm : : opt : : ArgList & Args , <nl> - const llvm : : opt : : Arg * A , <nl> - const llvm : : Triple & Triple , <nl> - DiagnosticEngine & Diag , <nl> - llvm : : function_ref < bool ( llvm : : StringRef ) > sanitizerRuntimeLibExists ) ; <nl> + const llvm : : opt : : ArgList & Args , const llvm : : opt : : Arg * A , <nl> + const llvm : : Triple & Triple , DiagnosticEngine & Diag , <nl> + llvm : : function_ref < bool ( llvm : : StringRef , bool ) > sanitizerRuntimeLibExists ) ; <nl> <nl> / / / \ brief Parses a - sanitize - coverage = argument ' s value . <nl> llvm : : SanitizerCoverageOptions parseSanitizerCoverageArgValue ( <nl> mmm a / lib / Driver / Driver . cpp <nl> ppp b / lib / Driver / Driver . cpp <nl> void Driver : : buildOutputInfo ( const ToolChain & TC , const DerivedArgList & Args , <nl> if ( const Arg * A = Args . getLastArg ( options : : OPT_sanitize_EQ ) ) <nl> OI . SelectedSanitizers = parseSanitizerArgValues ( <nl> Args , A , TC . getTriple ( ) , Diags , <nl> - [ & ] ( StringRef sanitizerName ) { <nl> - return TC . sanitizerRuntimeLibExists ( Args , sanitizerName ) ; <nl> + [ & ] ( StringRef sanitizerName , bool shared ) { <nl> + return TC . sanitizerRuntimeLibExists ( Args , sanitizerName , shared ) ; <nl> } ) ; <nl> <nl> if ( const Arg * A = Args . getLastArg ( options : : OPT_sanitize_coverage_EQ ) ) { <nl> mmm a / lib / Driver / ToolChain . cpp <nl> ppp b / lib / Driver / ToolChain . cpp <nl> ToolChain : : constructBatchJob ( ArrayRef < const Job * > jobs , <nl> <nl> bool <nl> ToolChain : : sanitizerRuntimeLibExists ( const ArgList & args , <nl> - StringRef sanitizerName ) const { <nl> + StringRef sanitizerName , <nl> + bool shared ) const { <nl> / / Assume no sanitizers are supported by default . <nl> / / This method should be overriden by a platform - specific subclass . <nl> return false ; <nl> mmm a / lib / Driver / ToolChains . cpp <nl> ppp b / lib / Driver / ToolChains . cpp <nl> getSanitizerRuntimeLibNameForLinux ( StringRef Sanitizer , const llvm : : Triple & Trip <nl> } <nl> <nl> bool toolchains : : Darwin : : sanitizerRuntimeLibExists ( <nl> - const ArgList & args , StringRef sanitizer ) const { <nl> + const ArgList & args , StringRef sanitizer , bool shared ) const { <nl> SmallString < 128 > sanitizerLibPath ; <nl> getClangLibraryPath ( * this , args , sanitizerLibPath ) ; <nl> llvm : : sys : : path : : append ( sanitizerLibPath , <nl> - getSanitizerRuntimeLibNameForDarwin ( sanitizer , this - > getTriple ( ) ) ) ; <nl> + getSanitizerRuntimeLibNameForDarwin ( <nl> + sanitizer , this - > getTriple ( ) , shared ) ) ; <nl> return llvm : : sys : : fs : : exists ( sanitizerLibPath . str ( ) ) ; <nl> } <nl> <nl> bool toolchains : : GenericUnix : : sanitizerRuntimeLibExists ( <nl> - const ArgList & args , StringRef sanitizer ) const { <nl> + const ArgList & args , StringRef sanitizer , bool shared ) const { <nl> SmallString < 128 > sanitizerLibPath ; <nl> getClangLibraryPath ( * this , args , sanitizerLibPath ) ; <nl> + <nl> + / / All libraries are static for linux . <nl> llvm : : sys : : path : : append ( sanitizerLibPath , <nl> getSanitizerRuntimeLibNameForLinux ( sanitizer , this - > getTriple ( ) ) ) ; <nl> return llvm : : sys : : fs : : exists ( sanitizerLibPath . str ( ) ) ; <nl> std : : string toolchains : : Cygwin : : getDefaultLinker ( ) const { <nl> std : : string toolchains : : Cygwin : : getTargetForLinker ( ) const { <nl> return " " ; <nl> } <nl> - <nl> mmm a / lib / Driver / ToolChains . h <nl> ppp b / lib / Driver / ToolChains . h <nl> class LLVM_LIBRARY_VISIBILITY Darwin : public ToolChain { <nl> Darwin ( const Driver & D , const llvm : : Triple & Triple ) : ToolChain ( D , Triple ) { } <nl> ~ Darwin ( ) = default ; <nl> bool sanitizerRuntimeLibExists ( const llvm : : opt : : ArgList & args , <nl> - StringRef sanitizerLibName ) <nl> + StringRef sanitizerLibName , <nl> + bool shared ) <nl> const override ; <nl> } ; <nl> <nl> class LLVM_LIBRARY_VISIBILITY GenericUnix : public ToolChain { <nl> GenericUnix ( const Driver & D , const llvm : : Triple & Triple ) : ToolChain ( D , Triple ) { } <nl> ~ GenericUnix ( ) = default ; <nl> bool sanitizerRuntimeLibExists ( const llvm : : opt : : ArgList & args , <nl> - StringRef sanitizerLibName ) <nl> + StringRef sanitizerLibName , <nl> + bool shared ) <nl> const override ; <nl> } ; <nl> <nl> mmm a / lib / Frontend / CompilerInvocation . cpp <nl> ppp b / lib / Frontend / CompilerInvocation . cpp <nl> static bool ParseSILArgs ( SILOptions & Opts , ArgList & Args , <nl> if ( const Arg * A = Args . getLastArg ( options : : OPT_sanitize_EQ ) ) { <nl> Opts . Sanitizers = parseSanitizerArgValues ( <nl> Args , A , Triple , Diags , <nl> - / * sanitizerRuntimeLibExists = * / [ ] ( StringRef libName ) { <nl> + / * sanitizerRuntimeLibExists = * / [ ] ( StringRef libName , bool shared ) { <nl> <nl> / / The driver has checked the existence of the library <nl> / / already . <nl> mmm a / lib / Option / SanitizerOptions . cpp <nl> ppp b / lib / Option / SanitizerOptions . cpp <nl> static StringRef toStringRef ( const SanitizerKind kind ) { <nl> llvm_unreachable ( " Unsupported sanitizer " ) ; <nl> } <nl> <nl> + static const char * toFileName ( const SanitizerKind kind ) { <nl> + switch ( kind ) { <nl> + case SanitizerKind : : Address : <nl> + return " asan " ; <nl> + case SanitizerKind : : Thread : <nl> + return " tsan " ; <nl> + case SanitizerKind : : Fuzzer : <nl> + return " fuzzer " ; <nl> + } <nl> + llvm_unreachable ( " Unsupported sanitizer " ) ; <nl> + } <nl> + <nl> llvm : : SanitizerCoverageOptions swift : : parseSanitizerCoverageArgValue ( <nl> const llvm : : opt : : Arg * A , const llvm : : Triple & Triple , <nl> DiagnosticEngine & Diags , OptionSet < SanitizerKind > sanitizers ) { <nl> llvm : : SanitizerCoverageOptions swift : : parseSanitizerCoverageArgValue ( <nl> return opts ; <nl> } <nl> <nl> - static bool isTSanSupported ( <nl> - const llvm : : Triple & Triple , <nl> - llvm : : function_ref < bool ( llvm : : StringRef ) > sanitizerRuntimeLibExists ) { <nl> - <nl> - return Triple . isArch64Bit ( ) & & sanitizerRuntimeLibExists ( " tsan " ) ; <nl> - } <nl> - <nl> OptionSet < SanitizerKind > swift : : parseSanitizerArgValues ( <nl> const llvm : : opt : : ArgList & Args , <nl> const llvm : : opt : : Arg * A , <nl> const llvm : : Triple & Triple , <nl> DiagnosticEngine & Diags , <nl> - llvm : : function_ref < bool ( llvm : : StringRef ) > sanitizerRuntimeLibExists ) { <nl> + llvm : : function_ref < bool ( llvm : : StringRef , bool ) > sanitizerRuntimeLibExists ) { <nl> OptionSet < SanitizerKind > sanitizerSet ; <nl> <nl> / / Find the sanitizer kind . <nl> for ( int i = 0 , n = A - > getNumValues ( ) ; i ! = n ; + + i ) { <nl> - StringRef opt = A - > getValue ( i ) ; <nl> - if ( opt = = " address " ) { <nl> - sanitizerSet | = SanitizerKind : : Address ; <nl> - } else if ( opt = = " thread " ) { <nl> - sanitizerSet | = SanitizerKind : : Thread ; <nl> - } else if ( opt = = " fuzzer " ) { <nl> - sanitizerSet | = SanitizerKind : : Fuzzer ; <nl> - } else { <nl> + auto kind = llvm : : StringSwitch < Optional < SanitizerKind > > ( A - > getValue ( i ) ) <nl> + . Case ( " address " , SanitizerKind : : Address ) <nl> + . Case ( " thread " , SanitizerKind : : Thread ) <nl> + . Case ( " fuzzer " , SanitizerKind : : Fuzzer ) <nl> + . Default ( None ) ; <nl> + bool isShared = kind & & * kind ! = SanitizerKind : : Fuzzer ; <nl> + if ( ! kind ) { <nl> Diags . diagnose ( SourceLoc ( ) , diag : : error_unsupported_option_argument , <nl> A - > getOption ( ) . getPrefixedName ( ) , A - > getValue ( i ) ) ; <nl> + } else { <nl> + / / Support is determined by existance of the sanitizer library . <nl> + bool sanitizerSupported = <nl> + sanitizerRuntimeLibExists ( toFileName ( * kind ) , isShared ) ; <nl> + <nl> + / / TSan is explicitly not supported for 32 bits . <nl> + if ( * kind = = SanitizerKind : : Thread & & ! Triple . isArch64Bit ( ) ) <nl> + sanitizerSupported = false ; <nl> + <nl> + if ( ! sanitizerSupported ) { <nl> + SmallString < 128 > b ; <nl> + Diags . diagnose ( SourceLoc ( ) , diag : : error_unsupported_opt_for_target , <nl> + ( A - > getOption ( ) . getPrefixedName ( ) + toStringRef ( * kind ) ) <nl> + . toStringRef ( b ) , <nl> + Triple . getTriple ( ) ) ; <nl> + } else { <nl> + sanitizerSet | = * kind ; <nl> + } <nl> } <nl> } <nl> <nl> OptionSet < SanitizerKind > swift : : parseSanitizerArgValues ( <nl> + toStringRef ( SanitizerKind : : Thread ) ) . toStringRef ( b2 ) ) ; <nl> } <nl> <nl> - / / Thread Sanitizer only works on OS X and the simulators . It ' s only supported <nl> - / / on 64 bit architectures . <nl> - if ( ( sanitizerSet & SanitizerKind : : Thread ) & & <nl> - ! isTSanSupported ( Triple , sanitizerRuntimeLibExists ) ) { <nl> - SmallString < 128 > b ; <nl> - Diags . diagnose ( SourceLoc ( ) , diag : : error_unsupported_opt_for_target , <nl> - ( A - > getOption ( ) . getPrefixedName ( ) <nl> - + toStringRef ( SanitizerKind : : Thread ) ) . toStringRef ( b ) , <nl> - Triple . getTriple ( ) ) ; <nl> - } <nl> - <nl> return sanitizerSet ; <nl> } <nl> new file mode 100644 <nl> index 000000000000 . . e69de29bb2d1 <nl> new file mode 100644 <nl> index 000000000000 . . e69de29bb2d1 <nl> new file mode 100644 <nl> index 000000000000 . . e69de29bb2d1 <nl> new file mode 100644 <nl> index 000000000000 . . e69de29bb2d1 <nl> new file mode 100644 <nl> index 000000000000 . . e69de29bb2d1 <nl> new file mode 100644 <nl> index 000000000000 . . e69de29bb2d1 <nl> new file mode 100644 <nl> index 000000000000 . . e69de29bb2d1 <nl> new file mode 100644 <nl> index 000000000000 . . e69de29bb2d1 <nl> mmm a / test / Driver / fuzzer . swift <nl> ppp b / test / Driver / fuzzer . swift <nl> <nl> - / / RUN : % swiftc_driver - driver - print - jobs - sanitize = fuzzer , address % s | % FileCheck - check - prefix = LIBFUZZER % s <nl> + / / RUN : % swiftc_driver - driver - print - jobs - sanitize = fuzzer , address - resource - dir % S / Inputs / fake - resource - dir / lib / swift / % s | % FileCheck - check - prefix = LIBFUZZER % s <nl> <nl> / / LIBFUZZER : libclang_rt . fuzzer <nl> @ _cdecl ( " LLVMFuzzerTestOneInput " ) public func fuzzOneInput ( Data : UnsafePointer < CChar > , Size : CLong ) - > CInt { <nl> mmm a / test / Driver / sanitizers . swift <nl> ppp b / test / Driver / sanitizers . swift <nl> <nl> / / RUN : % swiftc_driver - resource - dir % S / Inputs / fake - resource - dir / lib / swift / - driver - print - jobs - sanitize = address - target x86_64 - apple - macosx10 . 9 % s | % FileCheck - check - prefix = ASAN - check - prefix = ASAN_OSX % s <nl> + / / RUN : not % swiftc_driver - driver - print - jobs - sanitize = fuzzer - target x86_64 - apple - macosx10 . 9 - resource - dir % S / Inputs / nonexistent - resource - dir % s 2 > & 1 | % FileCheck - check - prefix = FUZZER_NONEXISTENT % s <nl> / / RUN : % swiftc_driver - resource - dir % S / Inputs / fake - resource - dir / lib / swift / - driver - print - jobs - sanitize = address - target x86_64 - apple - ios7 . 1 % s | % FileCheck - check - prefix = ASAN - check - prefix = ASAN_IOSSIM % s <nl> / / RUN : % swiftc_driver - resource - dir % S / Inputs / fake - resource - dir / lib / swift / - driver - print - jobs - sanitize = address - target arm64 - apple - ios7 . 1 % s | % FileCheck - check - prefix = ASAN - check - prefix = ASAN_IOS % s <nl> / / RUN : % swiftc_driver - resource - dir % S / Inputs / fake - resource - dir / lib / swift / - driver - print - jobs - sanitize = address - target x86_64 - apple - tvos9 . 0 % s | % FileCheck - check - prefix = ASAN - check - prefix = ASAN_tvOS_SIM % s <nl> <nl> / / TSAN_tvOS : unsupported option ' - sanitize = thread ' for target ' arm64 - apple - tvos9 . 0 ' <nl> / / TSAN_watchOS_SIM : unsupported option ' - sanitize = thread ' for target ' i386 - apple - watchos2 . 0 ' <nl> / / TSAN_watchOS : unsupported option ' - sanitize = thread ' for target ' armv7k - apple - watchos2 . 0 ' <nl> + / / FUZZER_NONEXISTENT : unsupported option ' - sanitize = fuzzer ' for target ' x86_64 - apple - macosx10 . 9 ' <nl> / / TSAN_LINUX : lib / swift / clang / lib / linux / libclang_rt . tsan - x86_64 . a <nl> <nl> / / TSAN : - rpath @ executable_path <nl>
Merge remote - tracking branch ' origin / master ' into master - llvm - swift5 - transition
apple/swift
e05928e3d89d0487e3efd97235df5309baca8b7c
2018-03-03T01:00:13Z
mmm a / hphp / runtime / base / type - structure - helpers . cpp <nl> ppp b / hphp / runtime / base / type - structure - helpers . cpp <nl> Array resolveAndVerifyTypeStructure ( <nl> ) { <nl> assertx ( ! ts . empty ( ) ) ; <nl> assertx ( ts . isDictOrDArray ( ) ) ; <nl> + auto const handleResolutionException = [ & ] ( auto const & errMsg ) { <nl> + if ( ! suppress | | ! IsOrAsOp ) raise_error ( errMsg ) ; <nl> + if ( RuntimeOption : : EvalIsExprEnableUnresolvedWarning ) raise_warning ( errMsg ) ; <nl> + auto unresolved = Array : : CreateDArray ( ) ; <nl> + unresolved . set ( <nl> + s_kind , <nl> + Variant ( static_cast < uint8_t > ( TypeStructure : : Kind : : T_unresolved ) ) <nl> + ) ; <nl> + unresolved . set ( s_classname , Variant ( s_unresolved ) ) ; <nl> + return unresolved ; <nl> + } ; <nl> Array resolved ; <nl> try { <nl> bool persistent = true ; <nl> Array resolveAndVerifyTypeStructure ( <nl> TypeStructure : : resolve ( ts , calledCls , declaringCls , tsList , persistent ) ; <nl> } catch ( Exception & e ) { <nl> / / Catch and throw again so we get a line number <nl> - auto const errMsg = e . getMessage ( ) ; <nl> - if ( ! suppress | | ! IsOrAsOp ) raise_error ( errMsg ) ; <nl> - if ( RuntimeOption : : EvalIsExprEnableUnresolvedWarning ) raise_warning ( errMsg ) ; <nl> - / / Lets just return an unresolved array instead <nl> - resolved = Array : : CreateDArray ( ) ; <nl> - resolved . set ( s_kind , <nl> - Variant ( static_cast < uint8_t > ( <nl> - TypeStructure : : Kind : : T_unresolved ) ) ) ; <nl> - resolved . set ( s_classname , Variant ( s_unresolved ) ) ; <nl> + resolved = handleResolutionException ( e . getMessage ( ) ) ; <nl> + } catch ( Object & e ) { <nl> + std : : string errMsg = " unable to resolve anonymous type structure " ; <nl> + resolved = handleResolutionException ( errMsg ) ; <nl> } <nl> assertx ( ! resolved . empty ( ) ) ; <nl> assertx ( resolved . isDictOrDArray ( ) ) ; <nl> new file mode 100644 <nl> index 00000000000 . . b9effbd7c17 <nl> mmm / dev / null <nl> ppp b / hphp / test / slow / is_expression / is - expression - nonexistent3 . php <nl> <nl> + < ? hh <nl> + <nl> + function is_nonexistent ( mixed $ x ) : void { <nl> + if ( $ x is BlerpityBlerp ) { <nl> + echo " unreached \ n " ; <nl> + } else { <nl> + echo " not BlerpityBlerp \ n " ; <nl> + } <nl> + } <nl> + <nl> + function fail ( <nl> + string $ type , <nl> + string $ name , <nl> + mixed $ err = null , <nl> + ) : noreturn { <nl> + throw new Exception ( ' Unable to load class ' ) ; <nl> + } <nl> + <nl> + < < __EntryPoint > > <nl> + function main ( ) : void { <nl> + HH \ autoload_set_paths ( <nl> + dict [ <nl> + ' class ' = > dict [ ] , <nl> + ' constant ' = > dict [ ] , <nl> + ' function ' = > dict [ ] , <nl> + ' type ' = > dict [ ] , <nl> + ' failure ' = > fun ( ' fail ' ) , <nl> + ] , <nl> + __DIR__ . ' / ' , <nl> + ) ; <nl> + is_nonexistent ( new stdClass ( ) ) ; <nl> + } <nl> new file mode 100644 <nl> index 00000000000 . . 949c798accb <nl> mmm / dev / null <nl> ppp b / hphp / test / slow / is_expression / is - expression - nonexistent3 . php . expect <nl> @ @ - 0 , 0 + 1 @ @ <nl> + not BlerpityBlerp <nl> new file mode 100644 <nl> index 00000000000 . . b9effbd7c17 <nl> mmm / dev / null <nl> ppp b / hphp / test / slow / is_expression / is - expression - nonexistent4 . php <nl> <nl> + < ? hh <nl> + <nl> + function is_nonexistent ( mixed $ x ) : void { <nl> + if ( $ x is BlerpityBlerp ) { <nl> + echo " unreached \ n " ; <nl> + } else { <nl> + echo " not BlerpityBlerp \ n " ; <nl> + } <nl> + } <nl> + <nl> + function fail ( <nl> + string $ type , <nl> + string $ name , <nl> + mixed $ err = null , <nl> + ) : noreturn { <nl> + throw new Exception ( ' Unable to load class ' ) ; <nl> + } <nl> + <nl> + < < __EntryPoint > > <nl> + function main ( ) : void { <nl> + HH \ autoload_set_paths ( <nl> + dict [ <nl> + ' class ' = > dict [ ] , <nl> + ' constant ' = > dict [ ] , <nl> + ' function ' = > dict [ ] , <nl> + ' type ' = > dict [ ] , <nl> + ' failure ' = > fun ( ' fail ' ) , <nl> + ] , <nl> + __DIR__ . ' / ' , <nl> + ) ; <nl> + is_nonexistent ( new stdClass ( ) ) ; <nl> + } <nl> new file mode 100644 <nl> index 00000000000 . . 98428f55225 <nl> mmm / dev / null <nl> ppp b / hphp / test / slow / is_expression / is - expression - nonexistent4 . php . expectf <nl> <nl> + <nl> + Warning : unable to resolve anonymous type structure in % s on line % d <nl> + not BlerpityBlerp <nl> new file mode 100644 <nl> index 00000000000 . . b2a4570f26e <nl> mmm / dev / null <nl> ppp b / hphp / test / slow / is_expression / is - expression - nonexistent4 . php . hphp_opts <nl> @ @ - 0 , 0 + 1 @ @ <nl> + - vRuntime . Eval . IsExprEnableUnresolvedWarning = 1 <nl> new file mode 100644 <nl> index 00000000000 . . c455e08ede1 <nl> mmm / dev / null <nl> ppp b / hphp / test / slow / is_expression / is - expression - nonexistent4 . php . opts <nl> @ @ - 0 , 0 + 1 @ @ <nl> + - vEval . IsExprEnableUnresolvedWarning = 1 <nl>
Catch exceptions thrown by Hack code in is - expressions
facebook/hhvm
b6306e781d849b0332751c58f6ce4bb87f8b4b85
2018-12-08T17:57:13Z
mmm a / Marlin / Marlin . h <nl> ppp b / Marlin / Marlin . h <nl> void Stop ( ) ; <nl> * Debug flags - not yet widely applied <nl> * / <nl> enum DebugFlags { <nl> + DEBUG_NONE = 0 , <nl> DEBUG_ECHO = _BV ( 0 ) , <nl> DEBUG_INFO = _BV ( 1 ) , <nl> DEBUG_ERRORS = _BV ( 2 ) , <nl> mmm a / Marlin / Marlin_main . cpp <nl> ppp b / Marlin / Marlin_main . cpp <nl> <nl> <nl> bool Running = true ; <nl> <nl> - uint8_t marlin_debug_flags = DEBUG_INFO | DEBUG_ERRORS ; <nl> + uint8_t marlin_debug_flags = DEBUG_NONE ; <nl> <nl> static float feedrate = 1500 . 0 , saved_feedrate ; <nl> float current_position [ NUM_AXIS ] = { 0 . 0 } ; <nl> inline void gcode_M110 ( ) { <nl> * M111 : Set the debug level <nl> * / <nl> inline void gcode_M111 ( ) { <nl> - marlin_debug_flags = code_seen ( ' S ' ) ? code_value_short ( ) : DEBUG_INFO | DEBUG_COMMUNICATION ; <nl> - <nl> - if ( marlin_debug_flags & DEBUG_ECHO ) { <nl> - SERIAL_ECHO_START ; <nl> - SERIAL_ECHOLNPGM ( MSG_DEBUG_ECHO ) ; <nl> - } <nl> - / / FOR MOMENT NOT ACTIVE <nl> - / / if ( marlin_debug_flags & DEBUG_INFO ) SERIAL_ECHOLNPGM ( MSG_DEBUG_INFO ) ; <nl> - / / if ( marlin_debug_flags & DEBUG_ERRORS ) SERIAL_ECHOLNPGM ( MSG_DEBUG_ERRORS ) ; <nl> - if ( marlin_debug_flags & DEBUG_DRYRUN ) { <nl> - SERIAL_ECHO_START ; <nl> - SERIAL_ECHOLNPGM ( MSG_DEBUG_DRYRUN ) ; <nl> - disable_all_heaters ( ) ; <nl> - } <nl> + marlin_debug_flags = code_seen ( ' S ' ) ? code_value_short ( ) : DEBUG_NONE ; <nl> <nl> + const char str_debug_1 [ ] PROGMEM = MSG_DEBUG_ECHO ; <nl> + const char str_debug_2 [ ] PROGMEM = MSG_DEBUG_INFO ; <nl> + const char str_debug_4 [ ] PROGMEM = MSG_DEBUG_ERRORS ; <nl> + const char str_debug_8 [ ] PROGMEM = MSG_DEBUG_DRYRUN ; <nl> + const char str_debug_16 [ ] PROGMEM = MSG_DEBUG_COMMUNICATION ; <nl> # if ENABLED ( DEBUG_LEVELING_FEATURE ) <nl> - if ( marlin_debug_flags & DEBUG_LEVELING ) { <nl> - SERIAL_ECHO_START ; <nl> - SERIAL_ECHOLNPGM ( MSG_DEBUG_LEVELING ) ; <nl> - } <nl> + const char str_debug_32 [ ] PROGMEM = MSG_DEBUG_LEVELING ; <nl> # endif <nl> + <nl> + const char * const debug_strings [ ] PROGMEM = { <nl> + str_debug_1 , str_debug_2 , str_debug_4 , str_debug_8 , str_debug_16 , <nl> + # if ENABLED ( DEBUG_LEVELING_FEATURE ) <nl> + str_debug_32 <nl> + # endif <nl> + } ; <nl> + <nl> + SERIAL_ECHO_START ; <nl> + SERIAL_ECHOPGM ( MSG_DEBUG_PREFIX ) ; <nl> + if ( marlin_debug_flags ) { <nl> + uint8_t comma = 0 ; <nl> + for ( uint8_t i = 0 ; i < COUNT ( debug_strings ) ; i + + ) { <nl> + if ( TEST ( marlin_debug_flags , i ) ) { <nl> + if ( comma + + ) SERIAL_CHAR ( ' | ' ) ; <nl> + serialprintPGM ( debug_strings [ i ] ) ; <nl> + } <nl> + } <nl> + } <nl> + else { <nl> + SERIAL_ECHOPGM ( MSG_DEBUG_OFF ) ; <nl> + } <nl> + SERIAL_EOL ; <nl> } <nl> <nl> / * * <nl> mmm a / Marlin / language . h <nl> ppp b / Marlin / language . h <nl> <nl> # define MSG_T_MINTEMP " MINTEMP triggered " <nl> <nl> / / Debug <nl> - # define MSG_DEBUG_ECHO " DEBUG ECHO ENABLED " <nl> - # define MSG_DEBUG_INFO " DEBUG INFO ENABLED " <nl> - # define MSG_DEBUG_ERRORS " DEBUG ERRORS ENABLED " <nl> - # define MSG_DEBUG_DRYRUN " DEBUG DRYRUN ENABLED " <nl> - # define MSG_DEBUG_LEVELING " DEBUG LEVELING ENABLED " <nl> + # define MSG_DEBUG_PREFIX " DEBUG : " <nl> + # define MSG_DEBUG_OFF " off " <nl> + # define MSG_DEBUG_ECHO " ECHO " <nl> + # define MSG_DEBUG_INFO " INFO " <nl> + # define MSG_DEBUG_ERRORS " ERRORS " <nl> + # define MSG_DEBUG_DRYRUN " DRYRUN " <nl> + # define MSG_DEBUG_COMMUNICATION " COMMUNICATION " <nl> + # define MSG_DEBUG_LEVELING " LEVELING " <nl> <nl> / / LCD Menu Messages <nl> <nl>
Echo all debug levels in M111 , default to DEBUG_NONE
MarlinFirmware/Marlin
4402760739d2435bc58affecd70b0440dbeabf31
2016-03-30T02:18:45Z
mmm a / tools / profiling / microbenchmarks / bm_diff . py <nl> ppp b / tools / profiling / microbenchmarks / bm_diff . py <nl> def min_change ( pct ) : <nl> argp . add_argument ( ' - b ' , ' - - benchmarks ' , nargs = ' + ' , choices = _AVAILABLE_BENCHMARK_TESTS , default = [ ' bm_cq ' ] ) <nl> argp . add_argument ( ' - d ' , ' - - diff_base ' , type = str ) <nl> argp . add_argument ( ' - r ' , ' - - repetitions ' , type = int , default = 4 ) <nl> - argp . add_argument ( ' - p ' , ' - - p_threshold ' , type = float , default = 0 . 03 ) <nl> + argp . add_argument ( ' - p ' , ' - - p_threshold ' , type = float , default = 0 . 01 ) <nl> args = argp . parse_args ( ) <nl> <nl> assert args . diff_base <nl>
Tighten signalling requirements
grpc/grpc
15df1111789b534fd8cef3f5940c463e16b50a6b
2017-03-31T22:50:43Z
mmm a / torch / nn / parallel / distributed . py <nl> ppp b / torch / nn / parallel / distributed . py <nl> def _start_reduction_threads ( self ) : <nl> self . _reduction_threads . append ( threading . Thread ( <nl> target = self . _reduction_thread_fn , <nl> args = ( reduction_queue , group_id , self . device_ids , reduction_streams , self . _nccl_streams ) ) ) <nl> + self . _reduction_threads [ - 1 ] . daemon = True <nl> self . _reduction_threads [ - 1 ] . start ( ) <nl> <nl> @ staticmethod <nl>
Make DistributedDataParallel threads Daemon threads to allow clean process exit ( )
pytorch/pytorch
5d09fcd028678afdbc06b972778aa2a064898ff0
2017-08-24T10:32:29Z
mmm a / lib / Sema / CSDiagnostics . cpp <nl> ppp b / lib / Sema / CSDiagnostics . cpp <nl> bool GenericArgumentsMismatchFailure : : diagnoseAsError ( ) { <nl> auto * anchor = getAnchor ( ) ; <nl> auto path = getLocator ( ) - > getPath ( ) ; <nl> <nl> + auto fromType = getFromType ( ) ; <nl> + auto toType = getToType ( ) ; <nl> + <nl> Optional < Diag < Type , Type > > diagnostic ; <nl> if ( path . empty ( ) ) { <nl> if ( isa < AssignExpr > ( anchor ) ) { <nl> bool GenericArgumentsMismatchFailure : : diagnoseAsError ( ) { <nl> break ; <nl> } <nl> <nl> + case ConstraintLocator : : GenericArgument : { <nl> + / / In cases like ` [ [ Int ] ] ` vs . ` [ [ String ] ] ` <nl> + if ( auto * assignExpr = dyn_cast < AssignExpr > ( anchor ) ) { <nl> + diagnostic = getDiagnosticFor ( CTP_AssignSource ) ; <nl> + fromType = getType ( assignExpr - > getSrc ( ) ) ; <nl> + toType = getType ( assignExpr - > getDest ( ) ) ; <nl> + } <nl> + break ; <nl> + } <nl> + <nl> default : <nl> return false ; <nl> } <nl> bool GenericArgumentsMismatchFailure : : diagnoseAsError ( ) { <nl> if ( ! diagnostic ) <nl> return false ; <nl> <nl> - emitDiagnostic ( anchor - > getLoc ( ) , * diagnostic , getFromType ( ) , getToType ( ) ) ; <nl> + emitDiagnostic ( anchor - > getLoc ( ) , * diagnostic , fromType , toType ) ; <nl> emitNotesForMismatches ( ) ; <nl> return true ; <nl> } <nl> mmm a / lib / Sema / CSSimplify . cpp <nl> ppp b / lib / Sema / CSSimplify . cpp <nl> bool ConstraintSystem : : repairFailures ( <nl> return true ; <nl> } <nl> <nl> + / / An attempt to assign ` Int ? ` to ` String ? ` . <nl> + if ( hasConversionOrRestriction ( <nl> + ConversionRestrictionKind : : OptionalToOptional ) ) { <nl> + conversionsOrFixes . push_back ( IgnoreAssignmentDestinationType : : create ( <nl> + * this , lhs , rhs , getConstraintLocator ( locator ) ) ) ; <nl> + return true ; <nl> + } <nl> + <nl> / / If we are trying to assign e . g . ` Array < Int > ` to ` Array < Float > ` let ' s <nl> / / give solver a chance to determine which generic parameters are <nl> / / mismatched and produce a fix for that . <nl> bool ConstraintSystem : : repairFailures ( <nl> / / mismatch fix , or <nl> / / 2 . " existential " check , which is handled by a missing conformance <nl> / / fix . <nl> - if ( lhs - > is < BoundGenericType > ( ) | | rhs - > isAnyExistentialType ( ) ) <nl> + if ( ( lhs - > is < BoundGenericType > ( ) & & rhs - > is < BoundGenericType > ( ) ) | | <nl> + rhs - > isAnyExistentialType ( ) ) <nl> return false ; <nl> } <nl> <nl> mmm a / test / Constraints / trailing_closures_objc . swift <nl> ppp b / test / Constraints / trailing_closures_objc . swift <nl> class Test : NSObject { <nl> func rdar28012273 ( ) { <nl> let categories = [ " hello " , " world " ] <nl> self . categories = categories . sorted { $ 0 . localizedCaseInsensitiveCompare ( $ 1 ) = = ComparisonResult . orderedDescending } <nl> - / / expected - error @ - 1 { { cannot assign value of type ' [ String ] ' to type ' NSArray ? ' } } { { 121 - 121 = as NSArray } } <nl> + / / expected - error @ - 1 { { cannot assign value of type ' [ String ] ' to type ' NSArray ' } } { { 121 - 121 = as NSArray } } <nl> } <nl> } <nl> mmm a / test / expr / cast / array_bridge . swift <nl> ppp b / test / expr / cast / array_bridge . swift <nl> var aa : [ [ A ] ] = [ ] <nl> var bb : [ [ B ] ] = [ ] <nl> <nl> aa = bb / / expected - error { { cannot assign value of type ' [ [ B ] ] ' to type ' [ [ A ] ] ' } } <nl> + / / expected - note @ - 1 { { arguments to generic parameter ' Element ' ( ' B ' and ' A ' ) are expected to be equal } } <nl> bb = aa / / expected - error { { cannot assign value of type ' [ [ A ] ] ' to type ' [ [ B ] ] ' } } <nl> + / / expected - note @ - 1 { { arguments to generic parameter ' Element ' ( ' A ' and ' B ' ) are expected to be equal } } <nl> <nl> class C { <nl> } <nl>
[ Diagnostics ] Properly diagnose assignment type mismatches when either side is optional
apple/swift
3586af6e8a6d08777a7b0afc9c478d71eebfbd28
2019-11-05T20:38:13Z
mmm a / xbmc / pvr / epg / EpgContainer . cpp <nl> ppp b / xbmc / pvr / epg / EpgContainer . cpp <nl> void CPVREpgContainer : : LoadFromDB ( void ) <nl> m_database - > Lock ( ) ; <nl> m_iNextEpgId = m_database - > GetLastEPGId ( ) ; <nl> m_database - > DeleteEpgEntries ( cleanupTime ) ; <nl> - const std : : vector < CPVREpgPtr > result = m_database - > Get ( * this ) ; <nl> + const std : : vector < std : : shared_ptr < CPVREpg > > result = m_database - > GetAll ( ) ; <nl> m_database - > Unlock ( ) ; <nl> <nl> for ( const auto & entry : result ) <nl> mmm a / xbmc / pvr / epg / EpgDatabase . cpp <nl> ppp b / xbmc / pvr / epg / EpgDatabase . cpp <nl> <nl> # include " dbwrappers / dataset . h " <nl> # include " settings / AdvancedSettings . h " <nl> # include " settings / SettingsComponent . h " <nl> + # include " threads / SingleLock . h " <nl> # include " utils / log . h " <nl> # include " utils / StringUtils . h " <nl> <nl> - # include " pvr / epg / EpgContainer . h " <nl> + # include " pvr / epg / Epg . h " <nl> + # include " pvr / epg / EpgInfoTag . h " <nl> <nl> using namespace dbiplus ; <nl> using namespace PVR ; <nl> bool CPVREpgDatabase : : Delete ( const CPVREpgInfoTag & tag ) <nl> return DeleteValues ( " epgtags " , filter ) ; <nl> } <nl> <nl> - std : : vector < CPVREpgPtr > CPVREpgDatabase : : Get ( const CPVREpgContainer & container ) <nl> + std : : vector < std : : shared_ptr < CPVREpg > > CPVREpgDatabase : : GetAll ( ) <nl> { <nl> - std : : vector < CPVREpgPtr > result ; <nl> + std : : vector < std : : shared_ptr < CPVREpg > > result ; <nl> <nl> CSingleLock lock ( m_critSection ) ; <nl> std : : string strQuery = PrepareSQL ( " SELECT idEpg , sName , sScraperName FROM epg ; " ) ; <nl> std : : vector < CPVREpgPtr > CPVREpgDatabase : : Get ( const CPVREpgContainer & container ) <nl> return result ; <nl> } <nl> <nl> - std : : vector < CPVREpgInfoTagPtr > CPVREpgDatabase : : Get ( const CPVREpg & epg ) <nl> + std : : vector < std : : shared_ptr < CPVREpgInfoTag > > CPVREpgDatabase : : Get ( const CPVREpg & epg ) <nl> { <nl> - std : : vector < CPVREpgInfoTagPtr > result ; <nl> + std : : vector < std : : shared_ptr < CPVREpgInfoTag > > result ; <nl> <nl> CSingleLock lock ( m_critSection ) ; <nl> std : : string strQuery = PrepareSQL ( " SELECT * FROM epgtags WHERE idEpg = % u ; " , epg . EpgID ( ) ) ; <nl> std : : vector < CPVREpgInfoTagPtr > CPVREpgDatabase : : Get ( const CPVREpg & epg ) <nl> { <nl> while ( ! m_pDS - > eof ( ) ) <nl> { <nl> - CPVREpgInfoTagPtr newTag ( new CPVREpgInfoTag ( ) ) ; <nl> + std : : shared_ptr < CPVREpgInfoTag > newTag ( new CPVREpgInfoTag ( ) ) ; <nl> <nl> time_t iStartTime , iEndTime , iFirstAired ; <nl> iStartTime = ( time_t ) m_pDS - > fv ( " iStartTime " ) . get_asInt ( ) ; <nl> mmm a / xbmc / pvr / epg / EpgDatabase . h <nl> ppp b / xbmc / pvr / epg / EpgDatabase . h <nl> <nl> <nl> # pragma once <nl> <nl> - # include " XBDateTime . h " <nl> # include " dbwrappers / Database . h " <nl> # include " threads / CriticalSection . h " <nl> <nl> - # include " pvr / epg / Epg . h " <nl> + class CDateTime ; <nl> <nl> namespace PVR <nl> { <nl> + class CPVREpg ; <nl> class CPVREpgInfoTag ; <nl> - class CPVREpgContainer ; <nl> <nl> / * * The EPG database * / <nl> <nl> namespace PVR <nl> <nl> / * ! <nl> * @ brief Get all EPG tables from the database . Does not get the EPG tables ' entries . <nl> - * @ param container The container to get the EPG tables for . <nl> * @ return The entries . <nl> * / <nl> - std : : vector < CPVREpgPtr > Get ( const CPVREpgContainer & container ) ; <nl> + std : : vector < std : : shared_ptr < CPVREpg > > GetAll ( ) ; <nl> <nl> / * ! <nl> * @ brief Get all EPG entries for a table . <nl> * @ param epg The EPG table to get the entries for . <nl> * @ return The entries . <nl> * / <nl> - std : : vector < CPVREpgInfoTagPtr > Get ( const CPVREpg & epg ) ; <nl> + std : : vector < std : : shared_ptr < CPVREpgInfoTag > > Get ( const CPVREpg & epg ) ; <nl> <nl> / * ! <nl> * @ brief Get the last stored EPG scan time . <nl>
[ PVR ] Fix PVR inter component dependencies : Rework epg database dependencies .
xbmc/xbmc
3001ada160d2e1a9ef6b5e9d17ab6a37f6af3be1
2019-03-14T08:42:22Z
mmm a / Marlin / src / core / boards . h <nl> ppp b / Marlin / src / core / boards . h <nl> <nl> # define BOARD_RAMPS_ENDER_4 243 / / Creality : Ender - 4 , CR - 8 <nl> # define BOARD_RAMPS_CREALITY 244 / / Creality : CR10S , CR20 , CR - X <nl> # define BOARD_FYSETC_F6_13 541 / / Fysetc F6 <nl> + # define BOARD_DUPLICATOR_I3_PLUS 31 / / Wanhao Duplicator i3 Plus <nl> <nl> / / <nl> / / Other ATmega1280 , ATmega2560 <nl> <nl> # define BOARD_MEGATRONICS_2 701 / / Megatronics v2 . 0 <nl> # define BOARD_MEGATRONICS_3 703 / / Megatronics v3 . 0 <nl> # define BOARD_MEGATRONICS_31 704 / / Megatronics v3 . 1 <nl> + # define BOARD_MEGATRONICS_32 705 / / Megatronics v3 . 2 <nl> # define BOARD_RAMBO 301 / / Rambo <nl> # define BOARD_MINIRAMBO 302 / / Mini - Rambo <nl> # define BOARD_MINIRAMBO_10A 303 / / Mini - Rambo 1 . 0a <nl> mmm a / Marlin / src / pins / pins . h <nl> ppp b / Marlin / src / pins / pins . h <nl> <nl> # include " pins_RAMPS_CREALITY . h " / / ATmega2560 env : megaatmega2560 <nl> # elif MB ( FYSETC_F6_13 ) <nl> # include " pins_FYSETC_F6_13 . h " / / ATmega2560 env : megaatmega2560 <nl> + # elif MB ( DUPLICATOR_I3_PLUS ) <nl> + # include " pins_DUPLICATOR_I3_PLUS . h " / / ATmega2560 env : megaatmega2560 <nl> <nl> / / <nl> / / Other ATmega1280 , ATmega2560 <nl> <nl> # include " pins_MEGATRONICS . h " / / ATmega2560 env : megaatmega2560 <nl> # elif MB ( MEGATRONICS_2 ) <nl> # include " pins_MEGATRONICS_2 . h " / / ATmega2560 env : megaatmega2560 <nl> - # elif MB ( MEGATRONICS_3 ) | | MB ( MEGATRONICS_31 ) <nl> + # elif MB ( MEGATRONICS_3 ) | | MB ( MEGATRONICS_31 ) | | MB ( MEGATRONICS_32 ) <nl> # include " pins_MEGATRONICS_3 . h " / / ATmega2560 env : megaatmega2560 <nl> # elif MB ( RAMBO ) <nl> # include " pins_RAMBO . h " / / ATmega2560 env : rambo <nl> new file mode 100644 <nl> index 00000000000 . . db229446468 <nl> mmm / dev / null <nl> ppp b / Marlin / src / pins / pins_DUPLICATOR_I3_PLUS . h <nl> <nl> + / * * <nl> + * Marlin 3D Printer Firmware <nl> + * Copyright ( C ) 2016 MarlinFirmware [ https : / / github . com / MarlinFirmware / Marlin ] <nl> + * <nl> + * Based on Sprinter and grbl . <nl> + * Copyright ( C ) 2011 Camiel Gubbels / Erik van der Zalm <nl> + * <nl> + * This program is free software : you can redistribute it and / or modify <nl> + * it under the terms of the GNU General Public License as published by <nl> + * the Free Software Foundation , either version 3 of the License , or <nl> + * ( at your option ) any later version . <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 General Public License for more details . <nl> + * <nl> + * You should have received a copy of the GNU General Public License <nl> + * along with this program . If not , see < http : / / www . gnu . org / licenses / > . <nl> + * <nl> + * / <nl> + <nl> + / * * <nl> + * Wanhao Duplicator i3 Plus pin assignments <nl> + * / <nl> + <nl> + # ifndef __AVR_ATmega2560__ <nl> + # error " Oops ! Select ' Arduino / Genuino Mega or Mega 2560 ' in ' Tools > Board . ' " <nl> + # endif <nl> + <nl> + # define BOARD_NAME " Duplicator i3 Plus " <nl> + <nl> + / / <nl> + / / Limit Switches <nl> + / / <nl> + # define X_STOP_PIN 54 / / PF0 / A0 <nl> + # define Y_STOP_PIN 24 / / PA2 / AD2 <nl> + # define Z_MIN_PIN 23 / / PA1 / AD1 <nl> + # define Z_MAX_PIN 25 / / PA3 / AD3 <nl> + # define SERVO0_PIN 40 / / PG1 / ! RD <nl> + <nl> + / / <nl> + / / Steppers <nl> + / / <nl> + # define X_STEP_PIN 61 / / PF7 / A7 <nl> + # define X_DIR_PIN 62 / / PK0 / A8 <nl> + # define X_ENABLE_PIN 60 / / PF6 / A6 <nl> + <nl> + # define Y_STEP_PIN 64 / / PK2 / A10 <nl> + # define Y_DIR_PIN 65 / / PK3 / A11 <nl> + # define Y_ENABLE_PIN 63 / / PK1 / A9 <nl> + <nl> + # define Z_STEP_PIN 67 / / PK5 / A13 <nl> + # define Z_DIR_PIN 69 / / PK7 / A15 <nl> + # define Z_ENABLE_PIN 66 / / PK4 / A12 <nl> + # define Z_MIN_PROBE_PIN 25 / / PA3 / AD3 <nl> + <nl> + # define E0_STEP_PIN 58 / / PF4 / A4 <nl> + # define E0_DIR_PIN 59 / / PF5 / A5 <nl> + # define E0_ENABLE_PIN 57 / / PF3 / A3 <nl> + <nl> + / / <nl> + / / Temperature Sensors <nl> + / / <nl> + # define TEMP_0_PIN 1 / / PF1 / A1 Analog <nl> + # define TEMP_BED_PIN 14 / / PK6 / A14 Analog <nl> + <nl> + / / <nl> + / / Heaters / Fans <nl> + / / <nl> + # define HEATER_0_PIN 4 / / PG5 / PWM4 <nl> + # define HEATER_BED_PIN 3 / / PE5 / PWM3 <nl> + <nl> + # define FAN_PIN 5 / / PE3 / PWM5 <nl> + <nl> + / / <nl> + / / Misc . Functions <nl> + / / <nl> + # define SDSS 53 / / PB0 / SS <nl> + # define LED_PIN 13 / / PB7 / PWM13 <nl> + <nl> + # define MISO_PIN 50 / / PB3 <nl> + # define MOSI_PIN 51 / / PB2 <nl> + # define SCK_PIN 52 / / PB1 <nl> + <nl> + / / <nl> + / / LCDs and Controllers <nl> + / / <nl> + # if ENABLED ( ULTRA_LCD ) <nl> + # if ENABLED ( ZONESTAR_LCD ) <nl> + # define LCD_PINS_RS 2 <nl> + # define LCD_PINS_ENABLE 36 <nl> + # define LCD_PINS_D4 37 <nl> + # define LCD_PINS_D5 34 <nl> + # define LCD_PINS_D6 35 <nl> + # define LCD_PINS_D7 32 <nl> + # define ADC_KEYPAD_PIN 12 / / Analog <nl> + # endif <nl> + # endif <nl> + <nl> + / * * <nl> + * = = EXT connector = = <nl> + * <nl> + * 2 4 6 8 10 <nl> + * # mmmmmmmmmmmmmmm # <nl> + * # 2 | ° ° ° ° ° | <nl> + * # 1 | ° ° ° ° ° | <nl> + * # mmmmmmmmmmmmmmm # <nl> + * 1 3 5 7 9 <nl> + * <nl> + * # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # <nl> + * # Pin | ATMEGA2560 Pin | Arduino # <nl> + * # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # <nl> + * # 1 | 52 / PG1 ( ! RD ) | 40 # <nl> + * # 2 | 95 / PF2 ( A2 ) | 2 # <nl> + * # 3 | 54 / PC1 ( A9 ) | 36 # <nl> + * # 4 | 53 / PC0 ( A8 ) | 37 # <nl> + * # 5 | 56 / PC3 ( A11 ) | 34 # <nl> + * # 6 | 55 / PC2 ( A10 ) | 35 # <nl> + * # 7 | 58 / PC5 ( A13 ) | 32 # <nl> + * # 8 | 57 / PC4 ( A12 ) | 33 # <nl> + * # 9 | GND | - # <nl> + * # 10 | VCC | + # <nl> + * # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # <nl> + * <nl> + * @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ <nl> + * <nl> + * = = Z - probe connector = = <nl> + * <nl> + * 1 2 3 <nl> + * # mmmmmmmmm # <nl> + * | ° ° ° | <nl> + * # mmmmmmmmm # <nl> + * <nl> + * # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # <nl> + * # Pin | ATMEGA2560 Pin | Arduino # <nl> + * # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # <nl> + * # 1 | 24V or 5V | + # <nl> + * # 2 | 75 / PA3 ( AD3 ) | 25 # <nl> + * # 3 | GND | - # <nl> + * # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # <nl> + * <nl> + * @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ <nl> + * <nl> + * = = Y - endstop = = = = Z - endstop = = = = Bed temperature = = <nl> + * <nl> + * 1 2 1 2 1 2 <nl> + * # mmmmmm # # mmmmmm # # mmmmmm # <nl> + * | ° ° | | ° ° | | ° ° | <nl> + * # mmmmmm # # mmmmmm # # mmmmmm # <nl> + * <nl> + * # # # # # # # # # # # # # # # Y # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Z # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # BED # # # # # # # # # # # # # # # <nl> + * # Pin | ATMEGA2560 Pin | Arduino # # Pin | ATMEGA2560 Pin | Arduino # # Pin | ATMEGA2560 Pin | Arduino # <nl> + * # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # <nl> + * # 1 | GND | - # # 1 | GND | - # # 1 | GND | - # <nl> + * # 2 | 76 / PA2 ( AD2 ) | 24 # # 2 | 77 / PA1 ( AD1 ) | 23 # # 2 | 83 / PK6 ( ADC14 ) | 14 # <nl> + * # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # <nl> + * <nl> + * @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ <nl> + * <nl> + * = = SPI connector = = <nl> + * <nl> + * 5 3 1 <nl> + * # mmmmmmmmm # <nl> + * | ° ° ° | <nl> + * | ° ° ° | <nl> + * # mmmmmmmmm # <nl> + * 6 4 2 <nl> + * <nl> + * # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # <nl> + * # Pin | ATMEGA2560 Pin | Arduino # <nl> + * # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # <nl> + * # 1 | 22 / PB3 ( MISO ) | 50 # <nl> + * # 2 | VCC | + # <nl> + * # 3 | 20 / PB1 ( SCK ) | 52 # <nl> + * # 4 | 21 / PB2 ( MOSI ) | 51 # <nl> + * # 5 | 30 / ! RESET | RESET # <nl> + * # 6 | GND | - # <nl> + * # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # <nl> + * <nl> + * Pictogram by Ludy https : / / github . com / Ludy87 <nl> + * See : https : / / sebastien . andrivet . com / en / posts / wanhao - duplicator - i3 - plus - 3d - printer / <nl> + * / <nl> mmm a / Marlin / src / pins / pins_MEGATRONICS_3 . h <nl> ppp b / Marlin / src / pins / pins_MEGATRONICS_3 . h <nl> <nl> * / <nl> <nl> / * * <nl> - * MegaTronics v3 . 0 / v3 . 1 pin assignments <nl> + * MegaTronics v3 . 0 / v3 . 1 / v3 . 2 pin assignments <nl> * / <nl> <nl> # ifndef __AVR_ATmega2560__ <nl> # error " Oops ! Select ' Arduino / Genuino Mega or Mega 2560 ' in ' Tools > Board . ' " <nl> # endif <nl> <nl> - # if MB ( MEGATRONICS_31 ) <nl> + # if MB ( MEGATRONICS_32 ) <nl> + # define BOARD_NAME " Megatronics v3 . 2 " <nl> + # elif MB ( MEGATRONICS_31 ) <nl> # define BOARD_NAME " Megatronics v3 . 1 " <nl> # else <nl> # define BOARD_NAME " Megatronics v3 . 0 " <nl> <nl> # define SHIFT_OUT 34 <nl> # define SHIFT_EN 44 <nl> <nl> - # if MB ( MEGATRONICS_31 ) <nl> + # if MB ( MEGATRONICS_31 ) | | MB ( MEGATRONICS_32 ) <nl> # define SD_DETECT_PIN 56 <nl> # endif <nl> <nl>
Wanhao Duplicator i3 Plus pins create ( )
MarlinFirmware/Marlin
f7127c44f88ea7917050b0149f204b8bf0d9bad3
2018-12-20T23:30:36Z
mmm a / hphp / runtime / vm / jit / codegen . cpp <nl> ppp b / hphp / runtime / vm / jit / codegen . cpp <nl> void CodeGenerator : : cgContPreNext ( IRInstruction * inst ) { <nl> static_assert ( ( doneOffset + 1 ) = = c_Continuation : : runningOffset ( ) , <nl> " done should immediately precede running " ) ; <nl> / / Check done and running at the same time <nl> - m_as . test_imm16_disp_reg16 ( 0x0101 , doneOffset , contReg ) ; <nl> + m_as . testw ( 0x0101 , contReg [ doneOffset ] ) ; <nl> emitFwdJcc ( CC_NZ , inst - > taken ( ) ) ; <nl> <nl> / / + + m_index <nl> - m_as . add_imm64_disp_reg64 ( 0x1 , CONTOFF ( m_index ) , contReg ) ; <nl> + m_as . addq ( 0x1 , contReg [ CONTOFF ( m_index ) ] ) ; <nl> / / running = true <nl> - m_as . store_imm8_disp_reg ( 0x1 , c_Continuation : : runningOffset ( ) , contReg ) ; <nl> + m_as . storeb ( 0x1 , contReg [ c_Continuation : : runningOffset ( ) ] ) ; <nl> } <nl> <nl> void CodeGenerator : : cgContStartedCheck ( IRInstruction * inst ) { <nl> mmm a / hphp / util / asm - x64 . h <nl> ppp b / hphp / util / asm - x64 . h <nl> const int kNumGPRegs = 16 ; <nl> const int kNumXMMRegs = 16 ; <nl> const int kNumRegs = kNumGPRegs + kNumXMMRegs ; <nl> <nl> + const uint8_t kOpsizePrefix = 0x66 ; <nl> + <nl> / * <nl> * Type for register numbers , independent of the size we ' re going to <nl> * be using it as . Also , the same register number may mean different <nl> struct Reg64 { <nl> } <nl> <nl> SIMPLE_REGTYPE ( Reg32 ) ; <nl> + SIMPLE_REGTYPE ( Reg16 ) ; <nl> SIMPLE_REGTYPE ( Reg8 ) ; <nl> SIMPLE_REGTYPE ( RegXMM ) ; <nl> <nl> struct RegRIP { <nl> <nl> inline Reg8 rbyte ( Reg32 r ) { return Reg8 ( int ( r ) ) ; } <nl> inline Reg8 rbyte ( RegNumber r ) { return Reg8 ( int ( r ) ) ; } <nl> + inline Reg16 r16 ( Reg8 r ) { return Reg16 ( int ( r ) ) ; } <nl> + inline Reg16 r16 ( RegNumber r ) { return Reg16 ( int ( r ) ) ; } <nl> inline Reg32 r32 ( Reg8 r ) { return Reg32 ( int ( r ) ) ; } <nl> + inline Reg32 r32 ( Reg16 r ) { return Reg32 ( int ( r ) ) ; } <nl> inline Reg32 r32 ( Reg32 r ) { return r ; } <nl> inline Reg32 r32 ( RegNumber r ) { return Reg32 ( int ( r ) ) ; } <nl> inline Reg64 r64 ( RegNumber r ) { return Reg64 ( int ( r ) ) ; } <nl> namespace reg { <nl> constexpr Reg32 r14d ( 14 ) ; <nl> constexpr Reg32 r15d ( 15 ) ; <nl> <nl> + constexpr Reg16 ax ( 0 ) ; <nl> + constexpr Reg16 cx ( 1 ) ; <nl> + constexpr Reg16 dx ( 2 ) ; <nl> + constexpr Reg16 bx ( 3 ) ; <nl> + constexpr Reg16 sp ( 4 ) ; <nl> + constexpr Reg16 bp ( 5 ) ; <nl> + constexpr Reg16 si ( 6 ) ; <nl> + constexpr Reg16 di ( 7 ) ; <nl> + constexpr Reg16 r8w ( 8 ) ; <nl> + constexpr Reg16 r9w ( 9 ) ; <nl> + constexpr Reg16 r10w ( 10 ) ; <nl> + constexpr Reg16 r11w ( 11 ) ; <nl> + constexpr Reg16 r12w ( 12 ) ; <nl> + constexpr Reg16 r13w ( 13 ) ; <nl> + constexpr Reg16 r14w ( 14 ) ; <nl> + constexpr Reg16 r15w ( 15 ) ; <nl> + <nl> constexpr Reg8 al ( 0 ) ; <nl> constexpr Reg8 cl ( 1 ) ; <nl> constexpr Reg8 dl ( 2 ) ; <nl> namespace reg { <nl> X ( r8d ) ; X ( r9d ) ; X ( r10d ) ; X ( r11d ) ; X ( r12d ) ; X ( r13d ) ; X ( r14d ) ; X ( r15d ) ; <nl> return nullptr ; <nl> } <nl> + inline const char * regname ( Reg16 r ) { <nl> + X ( ax ) ; X ( cx ) ; X ( dx ) ; X ( bx ) ; X ( sp ) ; X ( bp ) ; X ( si ) ; X ( di ) ; <nl> + X ( r8w ) ; X ( r9w ) ; X ( r10w ) ; X ( r11w ) ; X ( r12w ) ; X ( r13w ) ; X ( r14w ) ; X ( r15w ) ; <nl> + return nullptr ; <nl> + } <nl> inline const char * regname ( Reg8 r ) { <nl> X ( al ) ; X ( cl ) ; X ( dl ) ; X ( bl ) ; X ( spl ) ; X ( bpl ) ; X ( sil ) ; X ( dil ) ; <nl> X ( r8b ) ; X ( r9b ) ; X ( r10b ) ; X ( r11b ) ; X ( r12b ) ; X ( r13b ) ; X ( r14b ) ; X ( r15b ) ; <nl> struct X64Assembler { <nl> # define LOAD_OP ( name , instr ) \ <nl> void name # # q ( MemoryRef m , Reg64 r ) { instrMR ( instr , m , r ) ; } \ <nl> void name # # l ( MemoryRef m , Reg32 r ) { instrMR ( instr , m , r ) ; } \ <nl> + void name # # w ( MemoryRef m , Reg16 r ) { instrMR ( instr , m , r ) ; } \ <nl> void name # # q ( IndexedMemoryRef m , Reg64 r ) { instrMR ( instr , m , r ) ; } \ <nl> void name # # l ( IndexedMemoryRef m , Reg32 r ) { instrMR ( instr , m , r ) ; } \ <nl> + void name # # w ( IndexedMemoryRef m , Reg16 r ) { instrMR ( instr , m , r ) ; } \ <nl> BYTE_LOAD_OP ( name , instr # # b ) <nl> <nl> - # define BYTE_STORE_OP ( name , instr ) \ <nl> + # define BYTE_STORE_OP ( name , instr ) \ <nl> void name # # b ( Reg8 r , MemoryRef m ) { instrRM ( instr , r , m ) ; } \ <nl> void name # # b ( Reg8 r , IndexedMemoryRef m ) { instrRM ( instr , r , m ) ; } \ <nl> void name # # b ( Immed i , MemoryRef m ) { instrIM8 ( instr , i , m ) ; } \ <nl> void name # # b ( Immed i , IndexedMemoryRef m ) { instrIM8 ( instr , i , m ) ; } <nl> <nl> # define STORE_OP ( name , instr ) \ <nl> + void name # # w ( Immed i , MemoryRef m ) { instrIM16 ( instr , i , m ) ; } \ <nl> void name # # l ( Immed i , MemoryRef m ) { instrIM32 ( instr , i , m ) ; } \ <nl> + void name # # w ( Reg16 r , MemoryRef m ) { instrRM ( instr , r , m ) ; } \ <nl> void name # # l ( Reg32 r , MemoryRef m ) { instrRM ( instr , r , m ) ; } \ <nl> void name # # q ( Reg64 r , MemoryRef m ) { instrRM ( instr , r , m ) ; } \ <nl> + void name # # w ( Immed i , IndexedMemoryRef m ) { instrIM16 ( instr , i , m ) ; } \ <nl> void name # # l ( Immed i , IndexedMemoryRef m ) { instrIM32 ( instr , i , m ) ; } \ <nl> + void name # # w ( Reg16 r , IndexedMemoryRef m ) { instrRM ( instr , r , m ) ; } \ <nl> void name # # l ( Reg32 r , IndexedMemoryRef m ) { instrRM ( instr , r , m ) ; } \ <nl> void name # # q ( Reg64 r , IndexedMemoryRef m ) { instrRM ( instr , r , m ) ; } \ <nl> BYTE_STORE_OP ( name , instr # # b ) <nl> struct X64Assembler { <nl> # define REG_OP ( name , instr ) \ <nl> void name # # q ( Reg64 r1 , Reg64 r2 ) { instrRR ( instr , r1 , r2 ) ; } \ <nl> void name # # l ( Reg32 r1 , Reg32 r2 ) { instrRR ( instr , r1 , r2 ) ; } \ <nl> - void name # # l ( Immed i , Reg32 r ) { instrIR ( instr , i , r ) ; } \ <nl> + void name # # w ( Reg16 r1 , Reg16 r2 ) { instrRR ( instr , r1 , r2 ) ; } \ <nl> + void name # # l ( Immed i , Reg32 r ) { instrIR ( instr , i , r ) ; } \ <nl> + void name # # w ( Immed i , Reg16 r ) { instrIR ( instr , i , r ) ; } \ <nl> BYTE_REG_OP ( name , instr # # b ) <nl> <nl> / * <nl> struct X64Assembler { <nl> void idiv ( Reg64 r ) { instrR ( instr_idiv , r ) ; } <nl> void incq ( Reg64 r ) { instrR ( instr_inc , r ) ; } <nl> void incl ( Reg32 r ) { instrR ( instr_inc , r ) ; } <nl> + void incw ( Reg16 r ) { instrR ( instr_inc , r ) ; } <nl> void decq ( Reg64 r ) { instrR ( instr_dec , r ) ; } <nl> / / decl ( Reg32 ) cannot be encoded ; it ' s REX . <nl> void notb ( Reg8 r ) { instrR ( instr_notb , r ) ; } <nl> struct X64Assembler { <nl> void pop ( MemoryRef m ) { instrM ( instr_pop , m ) ; } <nl> void incq ( MemoryRef m ) { instrM ( instr_inc , m ) ; } <nl> void incl ( MemoryRef m ) { instrM32 ( instr_inc , m ) ; } <nl> + void incw ( MemoryRef m ) { instrM16 ( instr_inc , m ) ; } <nl> void decq ( MemoryRef m ) { instrM ( instr_dec , m ) ; } <nl> void decl ( MemoryRef m ) { instrM32 ( instr_dec , m ) ; } <nl> + void decw ( MemoryRef m ) { instrM16 ( instr_dec , m ) ; } <nl> <nl> void movdqu ( RegXMM x , MemoryRef m ) { instrRM ( instr_movdqu , x , m ) ; } <nl> void movdqu ( RegXMM x , IndexedMemoryRef m ) { instrRM ( instr_movdqu , x , m ) ; } <nl> struct X64Assembler { <nl> void shrq ( Immed i , Reg64 r ) { instrIR ( instr_shr , i . b ( ) , r ) ; } <nl> void shll ( Immed i , Reg32 r ) { instrIR ( instr_shl , i . b ( ) , r ) ; } <nl> void shrl ( Immed i , Reg32 r ) { instrIR ( instr_shr , i . b ( ) , r ) ; } <nl> + void shlw ( Immed i , Reg16 r ) { instrIR ( instr_shl , i . b ( ) , r ) ; } <nl> + void shrw ( Immed i , Reg16 r ) { instrIR ( instr_shr , i . b ( ) , r ) ; } <nl> <nl> / * <nl> * Control - flow directives . Primitive labeling / patching facilities <nl> struct X64Assembler { <nl> assert ( regN ! = reg : : noreg ) ; <nl> int r = int ( regN ) ; <nl> <nl> + / / Opsize prefix <nl> + if ( opSz = = sz : : word ) { <nl> + byte ( kOpsizePrefix ) ; <nl> + } <nl> + <nl> / / REX <nl> unsigned char rex = 0 ; <nl> bool highByteReg = false ; <nl> struct X64Assembler { <nl> emitCR ( op , 0 , r , sz : : dword ) ; <nl> } <nl> <nl> + void emitR16 ( X64Instr op , RegNumber r ) ALWAYS_INLINE { <nl> + emitCR ( op , 0 , r , sz : : word ) ; <nl> + } <nl> + <nl> / / op % r2 , % r1 <nl> / / mmmmmmmmm - - <nl> / / Restrictions : <nl> struct X64Assembler { <nl> int r1 = int ( rn1 ) ; <nl> int r2 = int ( rn2 ) ; <nl> bool reverse = ( ( op . flags & IF_REVERSE ) ! = 0 ) ; <nl> - prefixBytes ( op . flags ) ; <nl> + prefixBytes ( op . flags , opSz ) ; <nl> / / The xchg instruction is special ; we have compact encodings for <nl> / / exchanging with rax or eax . <nl> if ( op . flags & IF_XCHG ) { <nl> struct X64Assembler { <nl> emitCRR ( op , 0 , r1 , r2 , sz : : dword ) ; <nl> } <nl> <nl> + void emitRR16 ( X64Instr op , RegNumber r1 , <nl> + RegNumber r2 ) ALWAYS_INLINE { <nl> + emitCRR ( op , 0 , r1 , r2 , sz : : word ) ; <nl> + } <nl> + <nl> void emitRR8 ( X64Instr op , RegNumber r1 , RegNumber r2 ) { <nl> emitCRR ( op , 0 , r1 , r2 , sz : : byte ) ; <nl> } <nl> struct X64Assembler { <nl> ALWAYS_INLINE { <nl> assert ( rname ! = reg : : noreg ) ; <nl> int r = int ( rname ) ; <nl> + / / Opsize prefix <nl> + prefixBytes ( 0 , opSz ) ; <nl> / / Determine the size of the immediate . This might change opSz so <nl> / / do it first . <nl> int immSize ; <nl> if ( ( op . flags & IF_MOV ) & & opSz = = sz : : qword ) { <nl> immSize = computeImmediateSizeForMovRI64 ( op , imm , opSz ) ; <nl> } else { <nl> - immSize = computeImmediateSize ( op , imm ) ; <nl> + immSize = computeImmediateSize ( op , imm , opSz ) ; <nl> } <nl> / / REX <nl> unsigned char rex = 0 ; <nl> struct X64Assembler { <nl> emitIR ( op , r , imm , sz : : dword ) ; <nl> } <nl> <nl> + void emitIR16 ( X64Instr op , RegNumber r , ssize_t imm ) <nl> + ALWAYS_INLINE { <nl> + emitIR ( op , r , safe_cast < int16_t > ( imm ) , sz : : word ) ; <nl> + } <nl> + <nl> void emitIR8 ( X64Instr op , RegNumber r , ssize_t imm ) { <nl> emitIR ( op , r , safe_cast < int8_t > ( imm ) , sz : : byte ) ; <nl> } <nl> struct X64Assembler { <nl> int r1 = int ( rn1 ) ; <nl> int r2 = int ( rn2 ) ; <nl> bool reverse = ( ( op . flags & IF_REVERSE ) ! = 0 ) ; <nl> + / / Opsize prefix <nl> + prefixBytes ( 0 , opSz ) ; <nl> / / REX <nl> unsigned char rex = 0 ; <nl> if ( ( op . flags & IF_NO_REXW ) = = 0 & & opSz = = sz : : qword ) rex | = 8 ; <nl> struct X64Assembler { <nl> if ( r2 & 8 ) rex | = ( reverse ? 4 : 1 ) ; <nl> if ( rex ) byte ( 0x40 | rex ) ; <nl> / / Determine the size of the immediate <nl> - int immSize = computeImmediateSize ( op , imm ) ; <nl> + int immSize = computeImmediateSize ( op , imm , opSz ) ; <nl> / / Use 2 - byte opcode for cmovcc , setcc , movsx , movzx , movsx8 , movzx8 <nl> / / instructions <nl> if ( ( op . flags & IF_TWOBYTEOP ) ! = 0 ) byte ( 0x0F ) ; <nl> struct X64Assembler { <nl> <nl> void emitCI ( X64Instr op , int jcond , ssize_t imm , int opSz = sz : : qword ) <nl> ALWAYS_INLINE { <nl> + / / Opsize prefix <nl> + prefixBytes ( 0 , opSz ) ; <nl> / / REX <nl> if ( ( op . flags & IF_NO_REXW ) = = 0 ) { <nl> byte ( 0x48 ) ; <nl> } <nl> / / Determine the size of the immediate <nl> - int immSize = computeImmediateSize ( op , imm ) ; <nl> + int immSize = computeImmediateSize ( op , imm , opSz ) ; <nl> / / Emit opcode <nl> if ( ( op . flags & IF_JCC ) ! = 0 ) { <nl> / / jcc is weird so we handle it separately <nl> struct X64Assembler { <nl> int r = int ( rName ) ; <nl> int br = int ( brName ) ; <nl> <nl> + / / The opsize prefix can be placed here , if the instruction <nl> + / / deals with words . <nl> / / When an instruction has a manditory prefix , it goes before the <nl> / / REX byte if we end up needing one . <nl> - prefixBytes ( op . flags ) ; <nl> + prefixBytes ( op . flags , opSz ) ; <nl> <nl> / / Determine immSize from the ' hasImmediate ' flag <nl> int immSize = sz : : nosize ; <nl> if ( hasImmediate ) { <nl> - immSize = computeImmediateSize ( op , imm ) ; <nl> + immSize = computeImmediateSize ( op , imm , opSz ) ; <nl> } <nl> if ( ( op . flags & IF_REVERSE ) ! = 0 ) reverse = ! reverse ; <nl> / / Determine if we need to use a two byte opcode ; <nl> struct X64Assembler { <nl> emitCMX ( op , 0 , br , ir , s , disp , r , false , 0 , false , sz : : dword ) ; <nl> } <nl> <nl> + void emitRM16 ( X64Instr op , RegNumber br , RegNumber ir , int s , <nl> + int disp , RegNumber r ) ALWAYS_INLINE { <nl> + emitCMX ( op , 0 , br , ir , s , disp , r , false , 0 , false , sz : : word ) ; <nl> + } <nl> + <nl> void emitRM8 ( X64Instr op , RegNumber br , RegNumber ir , int s , <nl> int disp , RegNumber r ) { <nl> emitCMX ( op , 0 , br , ir , s , disp , r , false , 0 , false , sz : : byte ) ; <nl> struct X64Assembler { <nl> emitCMX ( op , 0 , br , ir , s , disp , r , true , 0 , false , sz : : dword ) ; <nl> } <nl> <nl> + void emitMR16 ( X64Instr op , RegNumber br , RegNumber ir , <nl> + int s , int disp , RegNumber r ) ALWAYS_INLINE { <nl> + emitCMX ( op , 0 , br , ir , s , disp , r , true , 0 , false , sz : : word ) ; <nl> + } <nl> + <nl> void emitMR8 ( X64Instr op , RegNumber br , RegNumber ir , <nl> int s , int disp , RegNumber r ) ALWAYS_INLINE { <nl> emitCMX ( op , 0 , br , ir , s , disp , r , true , 0 , false , sz : : byte ) ; <nl> struct X64Assembler { <nl> sz : : dword ) ; <nl> } <nl> <nl> + void emitM16 ( X64Instr op , RegNumber br , RegNumber ir , <nl> + int s , int disp ) ALWAYS_INLINE { <nl> + emitCMX ( op , 0 , br , ir , s , disp , reg : : noreg , false , 0 , false , <nl> + sz : : word ) ; <nl> + } <nl> + <nl> void emitCM ( X64Instr op , int jcond , RegNumber br , <nl> RegNumber ir , int s , int disp , int opSz = sz : : qword ) <nl> ALWAYS_INLINE { <nl> struct X64Assembler { <nl> inline void name # # _imm32_reg32 ( int64_t imm , RegNumber rdest ) { \ <nl> emitIR32 ( instr_ # # name , rdest , safe_cast < int32_t > ( imm ) ) ; \ <nl> } \ <nl> - / * op imm , disp ( rdest ) * / \ <nl> - inline void name # # _imm16_disp_reg16 ( int64_t imm , int disp , \ <nl> - RegNumber rdest ) { \ <nl> - emitIM16 ( instr_ # # name , rdest , reg : : noreg , \ <nl> - sz : : byte , disp , safe_cast < int16_t > ( imm ) ) ; \ <nl> - } \ <nl> / * opl imm , disp ( rdest ) * / \ <nl> inline void name # # _imm32_disp_reg32 ( int64_t imm , int disp , \ <nl> RegNumber rdest ) { \ <nl> struct X64Assembler { <nl> " anything requiring a REX prefix " ) ; <nl> } <nl> <nl> - int computeImmediateSize ( X64Instr op , ssize_t imm ) { <nl> - / / Most instructions take a 32 - bit immediate , except <nl> - / / for ret which takes a 16 - bit immediate <nl> - int immSize = sz : : dword ; <nl> + int computeImmediateSize ( X64Instr op , <nl> + ssize_t imm , <nl> + int opsize = sz : : dword ) { <nl> + / / Most instructions take a 32 - bit or 16 - bit immediate , <nl> + / / depending on the presence of the opsize prefix ( 0x66 ) . <nl> + int immSize = opsize = = sz : : word ? sz : : word : sz : : dword ; <nl> + / / ret always takes a 16 - bit immediate . <nl> if ( op . flags & IF_RET ) { <nl> immSize = sz : : word ; <nl> } <nl> struct X64Assembler { <nl> } <nl> } <nl> <nl> - void prefixBytes ( unsigned long flags ) { <nl> + void prefixBytes ( unsigned long flags , int opSz ) { <nl> + if ( opSz = = sz : : word ) byte ( kOpsizePrefix ) ; <nl> if ( flags & IF_66PREFIXED ) byte ( 0x66 ) ; <nl> if ( flags & IF_F2PREFIXED ) byte ( 0xF2 ) ; <nl> if ( flags & IF_F3PREFIXED ) byte ( 0xF3 ) ; <nl> struct X64Assembler { <nl> <nl> private : <nl> RegNumber rn ( Reg8 r ) { return RegNumber ( r ) ; } <nl> + RegNumber rn ( Reg16 r ) { return RegNumber ( r ) ; } <nl> RegNumber rn ( Reg32 r ) { return RegNumber ( r ) ; } <nl> RegNumber rn ( Reg64 r ) { return RegNumber ( r ) ; } <nl> RegNumber rn ( RegXMM x ) { return RegNumber ( x ) ; } <nl> struct X64Assembler { <nl> <nl> void instrR ( X64Instr op , Reg64 r ) { emitR ( op , rn ( r ) ) ; } <nl> void instrR ( X64Instr op , Reg32 r ) { emitR32 ( op , rn ( r ) ) ; } <nl> + void instrR ( X64Instr op , Reg16 r ) { emitR16 ( op , rn ( r ) ) ; } <nl> void instrR ( X64Instr op , Reg8 r ) { emitR ( op , rn ( r ) , sz : : byte ) ; } <nl> - void instrRR ( X64Instr op , Reg64 x , Reg64 y ) { emitRR ( op , rn ( x ) , rn ( y ) ) ; } <nl> - void instrRR ( X64Instr op , Reg32 x , Reg32 y ) { emitRR32 ( op , rn ( x ) , rn ( y ) ) ; } <nl> + void instrRR ( X64Instr op , Reg64 x , Reg64 y ) { emitRR ( op , rn ( x ) , rn ( y ) ) ; } <nl> + void instrRR ( X64Instr op , Reg32 x , Reg32 y ) { emitRR32 ( op , rn ( x ) , rn ( y ) ) ; } <nl> + void instrRR ( X64Instr op , Reg16 x , Reg16 y ) { emitRR16 ( op , rn ( x ) , rn ( y ) ) ; } <nl> void instrRR ( X64Instr op , Reg8 x , Reg8 y ) { emitRR8 ( op , rn ( x ) , rn ( y ) ) ; } <nl> void instrRR ( X64Instr op , RegXMM x , RegXMM y ) { emitRR ( op , rn ( x ) , rn ( y ) ) ; } <nl> void instrM ( X64Instr op , MemoryRef m ) { emitM ( op , UMR ( m ) ) ; } <nl> void instrM ( X64Instr op , IndexedMemoryRef m ) { emitM ( op , UIMR ( m ) ) ; } <nl> void instrM32 ( X64Instr op , MemoryRef m ) { emitM32 ( op , UMR ( m ) ) ; } <nl> + void instrM16 ( X64Instr op , MemoryRef m ) { emitM16 ( op , UMR ( m ) ) ; } <nl> <nl> void instrRM ( X64Instr op , <nl> Reg64 r , <nl> struct X64Assembler { <nl> void instrRM ( X64Instr op , <nl> Reg32 r , <nl> MemoryRef m ) { emitRM32 ( op , UMR ( m ) , rn ( r ) ) ; } <nl> + void instrRM ( X64Instr op , <nl> + Reg16 r , <nl> + MemoryRef m ) { emitRM16 ( op , UMR ( m ) , rn ( r ) ) ; } <nl> void instrRM ( X64Instr op , <nl> Reg8 r , <nl> MemoryRef m ) { emitRM8 ( op , UMR ( m ) , rn ( r ) ) ; } <nl> struct X64Assembler { <nl> void instrRM ( X64Instr op , <nl> Reg32 r , <nl> IndexedMemoryRef m ) { emitRM32 ( op , UIMR ( m ) , rn ( r ) ) ; } <nl> + void instrRM ( X64Instr op , <nl> + Reg16 r , <nl> + IndexedMemoryRef m ) { emitRM16 ( op , UIMR ( m ) , rn ( r ) ) ; } <nl> void instrRM ( X64Instr op , <nl> Reg8 r , <nl> IndexedMemoryRef m ) { emitRM8 ( op , UIMR ( m ) , rn ( r ) ) ; } <nl> struct X64Assembler { <nl> void instrMR ( X64Instr op , <nl> MemoryRef m , <nl> Reg32 r ) { emitMR32 ( op , UMR ( m ) , rn ( r ) ) ; } <nl> + void instrMR ( X64Instr op , <nl> + MemoryRef m , <nl> + Reg16 r ) { emitMR16 ( op , UMR ( m ) , rn ( r ) ) ; } <nl> void instrMR ( X64Instr op , <nl> MemoryRef m , <nl> Reg8 r ) { emitMR8 ( op , UMR ( m ) , rn ( r ) ) ; } <nl> struct X64Assembler { <nl> void instrMR ( X64Instr op , <nl> IndexedMemoryRef m , <nl> Reg32 r ) { emitMR32 ( op , UIMR ( m ) , rn ( r ) ) ; } <nl> + void instrMR ( X64Instr op , <nl> + IndexedMemoryRef m , <nl> + Reg16 r ) { emitMR16 ( op , UIMR ( m ) , rn ( r ) ) ; } <nl> void instrMR ( X64Instr op , <nl> IndexedMemoryRef m , <nl> Reg8 r ) { emitMR8 ( op , UIMR ( m ) , rn ( r ) ) ; } <nl> struct X64Assembler { <nl> void instrIR ( X64Instr op , Immed i , Reg32 r ) { <nl> emitIR32 ( op , rn ( r ) , i . l ( ) ) ; <nl> } <nl> + void instrIR ( X64Instr op , Immed i , Reg16 r ) { <nl> + emitIR16 ( op , rn ( r ) , i . w ( ) ) ; <nl> + } <nl> void instrIR ( X64Instr op , Immed i , Reg8 r ) { <nl> emitIR8 ( op , rn ( r ) , i . b ( ) ) ; <nl> } <nl> struct X64Assembler { <nl> void instrIM32 ( X64Instr op , Immed i , MemoryRef m ) { <nl> emitIM32 ( op , UMR ( m ) , i . l ( ) ) ; <nl> } <nl> + void instrIM16 ( X64Instr op , Immed i , MemoryRef m ) { <nl> + emitIM16 ( op , UMR ( m ) , i . w ( ) ) ; <nl> + } <nl> void instrIM8 ( X64Instr op , Immed i , MemoryRef m ) { <nl> emitIM8 ( op , UMR ( m ) , i . b ( ) ) ; <nl> } <nl> struct X64Assembler { <nl> void instrIM32 ( X64Instr op , Immed i , IndexedMemoryRef m ) { <nl> emitIM32 ( op , UIMR ( m ) , i . l ( ) ) ; <nl> } <nl> + void instrIM16 ( X64Instr op , Immed i , IndexedMemoryRef m ) { <nl> + emitIM16 ( op , UIMR ( m ) , i . w ( ) ) ; <nl> + } <nl> void instrIM8 ( X64Instr op , Immed i , IndexedMemoryRef m ) { <nl> emitIM8 ( op , UIMR ( m ) , i . b ( ) ) ; <nl> } <nl> mmm a / hphp / util / test / asm . cpp <nl> ppp b / hphp / util / test / asm . cpp <nl> typedef void ( Asm : : * OpIR32 ) ( Immed , Reg32 ) ; <nl> typedef void ( Asm : : * OpIR8 ) ( Immed , Reg8 ) ; <nl> typedef void ( Asm : : * OpIM64 ) ( Immed , MemoryRef ) ; <nl> typedef void ( Asm : : * OpIM32 ) ( Immed , MemoryRef ) ; <nl> + typedef void ( Asm : : * OpIM16 ) ( Immed , MemoryRef ) ; <nl> typedef void ( Asm : : * OpISM64 ) ( Immed , IndexedMemoryRef ) ; <nl> typedef void ( Asm : : * OpISM32 ) ( Immed , IndexedMemoryRef ) ; <nl> + typedef void ( Asm : : * OpISM16 ) ( Immed , IndexedMemoryRef ) ; <nl> <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> <nl> TEST ( Asm , General ) { <nl> doingByteOpcodes = false ; <nl> } <nl> <nl> + TEST ( Asm , WordSizeInstructions ) { <nl> + Asm a ; <nl> + a . init ( 10 < < 24 ) ; <nl> + <nl> + / / single register operations <nl> + a . incw ( ax ) ; <nl> + / / single memory operations <nl> + a . decw ( * r8 ) ; <nl> + / / register - register operations <nl> + a . addw ( ax , bx ) ; <nl> + a . xorw ( r10w , r11w ) ; <nl> + a . movw ( cx , si ) ; <nl> + / / register - memory operations <nl> + a . storew ( ax , * rbx ) ; <nl> + a . testw ( r10w , rsi [ 0x10 ] ) ; <nl> + / / memory - register operations <nl> + a . subw ( * rcx , ax ) ; <nl> + a . orw ( r11 [ 0x100 ] , dx ) ; <nl> + / / immediate - register operations <nl> + a . shlw ( 0x3 , di ) ; <nl> + a . andw ( 0x5555 , r12w ) ; <nl> + / / immediate - memory operations <nl> + a . storew ( 0x1 , * r9 ) ; <nl> + a . storew ( 0x1 , rax [ 0x100 ] ) ; <nl> + <nl> + expect_asm ( a , R " ( <nl> + inc % ax <nl> + decw ( % r8 ) <nl> + add % ax , % bx <nl> + xor % r10w , % r11w <nl> + mov % cx , % si <nl> + mov % ax , ( % rbx ) <nl> + test % r10w , 0x10 ( % rsi ) <nl> + sub ( % rcx ) , % ax <nl> + or 0x100 ( % r11 ) , % dx <nl> + shl $ 0x3 , % di <nl> + and $ 0x5555 , % r12w <nl> + movw $ 0x1 , ( % r9 ) <nl> + movw $ 0x1 , 0x100 ( % rax ) <nl> + ) " ) ; <nl> + } <nl> + <nl> TEST ( Asm , HighByteReg ) { <nl> Asm a ; <nl> a . init ( 10 < < 24 ) ; <nl>
Adds word - size store instructions to x64 assembler
facebook/hhvm
1920e85155f604db044d6f9a1e338aecd6917d84
2013-06-16T06:30:24Z
mmm a / contracts / test_api / test_transaction . cpp <nl> ppp b / contracts / test_api / test_transaction . cpp <nl> void test_transaction : : send_action_empty ( ) { <nl> * / <nl> void test_transaction : : send_action_large ( ) { <nl> using namespace eosio ; <nl> - char large_message [ 8 * 1024 ] ; <nl> + static char large_message [ 8 * 1024 ] ; <nl> test_action_action < N ( testapi ) , WASM_TEST_ACTION ( " test_action " , " read_action_normal " ) > test_action ; <nl> copy_data ( large_message , 8 * 1024 , test_action . data ) ; <nl> action act ( vector < permission_level > { { N ( testapi ) , N ( active ) } } , test_action ) ; <nl> void test_transaction : : test_transaction_size ( ) { <nl> eosio_assert ( trans_size = = transaction_size ( ) , " transaction size does not match " ) ; <nl> } <nl> <nl> - void test_transaction : : send_transaction ( uint64_t receiver , uint64_t code , uint64_t action ) { <nl> + void test_transaction : : send_transaction ( uint64_t receiver , uint64_t , uint64_t ) { <nl> using namespace eosio ; <nl> dummy_action payload = { DUMMY_ACTION_DEFAULT_A , DUMMY_ACTION_DEFAULT_B , DUMMY_ACTION_DEFAULT_C } ; <nl> <nl> void test_transaction : : send_transaction ( uint64_t receiver , uint64_t code , uint64 <nl> trx . send ( 0 , receiver ) ; <nl> } <nl> <nl> - void test_transaction : : send_action_sender ( uint64_t receiver , uint64_t code , uint64_t action ) { <nl> + void test_transaction : : send_action_sender ( uint64_t receiver , uint64_t , uint64_t ) { <nl> using namespace eosio ; <nl> account_name cur_send ; <nl> read_action_data ( & cur_send , sizeof ( account_name ) ) ; <nl> void test_transaction : : send_action_sender ( uint64_t receiver , uint64_t code , uint <nl> trx . send ( 0 , receiver ) ; <nl> } <nl> <nl> - void test_transaction : : send_transaction_empty ( uint64_t receiver , uint64_t code , uint64_t action ) { <nl> + void test_transaction : : send_transaction_empty ( uint64_t receiver , uint64_t , uint64_t ) { <nl> using namespace eosio ; <nl> auto trx = transaction ( ) ; <nl> trx . send ( 0 , receiver ) ; <nl> void test_transaction : : send_transaction_empty ( uint64_t receiver , uint64_t code , <nl> / * * <nl> * cause failure due to a large transaction size <nl> * / <nl> - void test_transaction : : send_transaction_large ( uint64_t receiver , uint64_t code , uint64_t action ) { <nl> + void test_transaction : : send_transaction_large ( uint64_t receiver , uint64_t , uint64_t ) { <nl> using namespace eosio ; <nl> auto trx = transaction ( ) ; <nl> for ( int i = 0 ; i < 32 ; i + + ) { <nl> void test_transaction : : send_transaction_large ( uint64_t receiver , uint64_t code , <nl> eosio_assert ( false , " send_transaction_large ( ) should ' ve thrown an error " ) ; <nl> } <nl> <nl> - void test_transaction : : send_transaction_expiring_late ( uint64_t receiver , uint64_t code , uint64_t action ) { <nl> + void test_transaction : : send_transaction_expiring_late ( uint64_t receiver , uint64_t , uint64_t ) { <nl> using namespace eosio ; <nl> account_name cur_send ; <nl> read_action_data ( & cur_send , sizeof ( account_name ) ) ; <nl> void test_transaction : : deferred_print ( ) { <nl> eosio : : print ( " deferred executed \ n " ) ; <nl> } <nl> <nl> - void test_transaction : : send_deferred_transaction ( uint64_t receiver , uint64_t code , uint64_t action ) { <nl> + void test_transaction : : send_deferred_transaction ( uint64_t receiver , uint64_t , uint64_t ) { <nl> using namespace eosio ; <nl> auto trx = transaction ( ) ; <nl> test_action_action < N ( testapi ) , WASM_TEST_ACTION ( " test_transaction " , " deferred_print " ) > test_action ; <nl> void test_transaction : : read_inline_action ( ) { <nl> eosio_assert ( res ! = - 1 , " get_action error " ) ; <nl> <nl> action tmp ; <nl> - datastream < char * > ds ( buffer , res ) ; <nl> + datastream < char * > ds ( buffer , ( size_t ) res ) ; <nl> ds > > tmp . account ; <nl> ds > > tmp . name ; <nl> ds > > tmp . authorization ; <nl> void test_transaction : : read_inline_cf_action ( ) { <nl> eosio_assert ( res ! = - 1 , " get_action error " ) ; <nl> <nl> action tmp ; <nl> - datastream < char * > ds ( buffer , res ) ; <nl> + datastream < char * > ds ( buffer , ( size_t ) res ) ; <nl> ds > > tmp . account ; <nl> ds > > tmp . name ; <nl> ds > > tmp . authorization ; <nl>
move large stack allocation to heap to avoid stack overflow , silence warnings EOSIO / eos
EOSIO/eos
6bbf48407a3d3842531498e95432f4f8539fb31e
2018-04-03T12:50:53Z
mmm a / docs / howto / README . md <nl> ppp b / docs / howto / README . md <nl> <nl> - [ How to install ubuntu ] ( how_to_install_ubuntu . md ) <nl> - [ How to use IRC client on ubuntu ] ( how_to_use_IRC_client_on_ubuntu . md ) <nl> - [ How to generate and push images into Docker ] ( how_to_generate_and_push_docker_images . md ) <nl> - - [ How to add a different vehicle ] ( how_to_use_a_different_vehicle . md ) <nl> <nl> # # # Chinese versions <nl> <nl> - [ How to generate and push images into Docker ] ( how_to_generate_and_push_docker_images_cn . md ) <nl> - [ How to install ubuntu ] ( how_to_install_ubuntu_cn . md ) <nl> - - [ How to solve slow pull from cn ] ( how_to_solve_slow_pull_from_cn . md ) <nl> \ No newline at end of file <nl> + - [ How to solve slow pull from cn ] ( how_to_solve_slow_pull_from_cn . md ) <nl>
Docs : remove link to non - exist how_to_use_a_different_vehicle . md
ApolloAuto/apollo
888f9ae641699e7a17285a628fc6f2a20a549ed7
2020-08-31T03:48:32Z
mmm a / tools / profiling / ios_bin / binary_size . py <nl> ppp b / tools / profiling / ios_bin / binary_size . py <nl> <nl> - # ! / usr / bin / env python2 . 7 <nl> + # ! / usr / bin / env python3 <nl> # <nl> # Copyright 2018 gRPC authors . <nl> # <nl> def build ( where , frameworks ) : <nl> text + = ' \ n No significant differences in binary sizes \ n ' <nl> text + = ' \ n ' <nl> <nl> - print text <nl> + print ( text ) <nl> <nl> check_on_pr . check_on_pr ( ' Binary Size ' , ' ` ` ` \ n % s \ n ` ` ` ' % text ) <nl> mmm a / tools / profiling / ios_bin / parse_link_map . py <nl> ppp b / tools / profiling / ios_bin / parse_link_map . py <nl> def parse_link_map ( filename ) : <nl> objc_size = 0 <nl> protobuf_size = 0 <nl> <nl> - lines = list ( open ( filename ) ) <nl> + lines = open ( filename , encoding = ' utf - 8 ' , errors = ' ignore ' ) . readlines ( ) <nl> for line in lines : <nl> line_stripped = line [ : - 1 ] <nl> if " # Object files : " = = line_stripped : <nl> def parse_link_map ( filename ) : <nl> if len ( line_stripped ) = = 0 or line_stripped [ 0 ] = = ' # ' : <nl> continue <nl> segs = re . search ( ' ^ . + ? \ s + ( . + ? ) \ s + ( \ [ . + ? \ ] ) . * ' , line_stripped ) <nl> + if not segs : <nl> + continue <nl> target = table_tag [ segs . group ( 2 ) ] <nl> target_stripped = re . search ( ' ^ ( . * ? ) ( \ ( . + ? \ ) ) ? $ ' , target ) . group ( 1 ) <nl> size = int ( segs . group ( 1 ) , 16 ) <nl>
Python3 ios_bin / binary_size . py
grpc/grpc
bfdfc9eabc90effd1c8bbe70235182f7a08673cd
2020-11-13T02:48:46Z
mmm a / fdbserver / Restore . actor . cpp <nl> ppp b / fdbserver / Restore . actor . cpp <nl> <nl> class RestoreConfig ; <nl> struct RestoreData ; / / Only declare the struct exist but we cannot use its field <nl> <nl> + bool concatenateBackupMutationForLogFile ( Reference < RestoreData > rd , Standalone < StringRef > val_input , Standalone < StringRef > key_input ) ; <nl> + Future < Void > registerMutationsToApplier ( Reference < RestoreData > const & rd ) ; <nl> + Future < Void > notifyApplierToApplyMutations ( Reference < RestoreData > const & rd ) ; <nl> + void parseSerializedMutation ( Reference < RestoreData > rd ) ; <nl> + <nl> + / / Helper class for reading restore data from a buffer and throwing the right errors . <nl> + struct StringRefReaderMX { <nl> + StringRefReaderMX ( StringRef s = StringRef ( ) , Error e = Error ( ) ) : rptr ( s . begin ( ) ) , end ( s . end ( ) ) , failure_error ( e ) , str_size ( s . size ( ) ) { } <nl> + <nl> + / / Return remainder of data as a StringRef <nl> + StringRef remainder ( ) { <nl> + return StringRef ( rptr , end - rptr ) ; <nl> + } <nl> + <nl> + / / Return a pointer to len bytes at the current read position and advance read pos <nl> + / / Consume a little - Endian data . Since we only run on little - Endian machine , the data on storage is little Endian <nl> + const uint8_t * consume ( unsigned int len ) { <nl> + if ( rptr = = end & & len ! = 0 ) <nl> + throw end_of_stream ( ) ; <nl> + const uint8_t * p = rptr ; <nl> + rptr + = len ; <nl> + if ( rptr > end ) { <nl> + printf ( " [ ERROR ] StringRefReaderMX throw error ! string length : % d \ n " , str_size ) ; <nl> + throw failure_error ; <nl> + } <nl> + return p ; <nl> + } <nl> + <nl> + / / Return a T from the current read position and advance read pos <nl> + template < typename T > const T consume ( ) { <nl> + return * ( const T * ) consume ( sizeof ( T ) ) ; <nl> + } <nl> + <nl> + / / Functions for consuming big endian ( network byte order ) integers . <nl> + / / Consumes a big endian number , swaps it to little endian , and returns it . <nl> + const int32_t consumeNetworkInt32 ( ) { return ( int32_t ) bigEndian32 ( ( uint32_t ) consume < int32_t > ( ) ) ; } <nl> + const uint32_t consumeNetworkUInt32 ( ) { return bigEndian32 ( consume < uint32_t > ( ) ) ; } <nl> + <nl> + const int64_t consumeNetworkInt64 ( ) { return ( int64_t ) bigEndian64 ( ( uint32_t ) consume < int64_t > ( ) ) ; } <nl> + const uint64_t consumeNetworkUInt64 ( ) { return bigEndian64 ( consume < uint64_t > ( ) ) ; } <nl> + <nl> + bool eof ( ) { return rptr = = end ; } <nl> + <nl> + const uint8_t * rptr , * end ; <nl> + const int str_size ; <nl> + Error failure_error ; <nl> + } ; <nl> + <nl> bool debug_verbose = false ; <nl> <nl> <nl> / / / / - - Restore code declaration START <nl> / / TODO : Move to RestoreData <nl> - std : : map < Version , Standalone < VectorRef < MutationRef > > > kvOps ; <nl> - / / std : : map < Version , std : : vector < MutationRef > > kvOps ; / / TODO : Must change to standAlone before run correctness test . otherwise , you will see the mutationref memory is corrupted <nl> - std : : map < Standalone < StringRef > , Standalone < StringRef > > mutationMap ; / / key is the unique identifier for a batch of mutation logs at the same version <nl> - std : : map < Standalone < StringRef > , uint32_t > mutationPartMap ; / / Record the most recent <nl> + / / std : : map < Version , Standalone < VectorRef < MutationRef > > > kvOps ; <nl> + / / / / std : : map < Version , std : : vector < MutationRef > > kvOps ; / / TODO : Must change to standAlone before run correctness test . otherwise , you will see the mutationref memory is corrupted <nl> + / / std : : map < Standalone < StringRef > , Standalone < StringRef > > mutationMap ; / / key is the unique identifier for a batch of mutation logs at the same version <nl> + / / std : : map < Standalone < StringRef > , uint32_t > mutationPartMap ; / / Record the most recent <nl> / / MXX : Important : Can not use std : : vector because you won ' t have the arena and you will hold the reference to memory that will be freed . <nl> / / Use push_back_deep ( ) to copy data to the standalone arena . <nl> / / Standalone < VectorRef < MutationRef > > mOps ; <nl> namespace parallelFileRestore { <nl> struct RestoreData : NonCopyable , public ReferenceCounted < RestoreData > { <nl> / / mmm - Declare status structure which records the progress and status of each worker in each role <nl> std : : map < UID , RestoreCommandInterface > workers_interface ; / / UID is worker ' s node id , RestoreCommandInterface is worker ' s communication interface <nl> + UID masterApplier ; / / TODO : Remove this variable . The first version uses 1 applier to apply the mutations <nl> <nl> RestoreNodeStatus localNodeStatus ; / / Each worker node ( process ) has one such variable . <nl> std : : vector < RestoreNodeStatus > globalNodeStatus ; / / status of all notes , excluding master node , stored in master node / / May change to map , like servers_info <nl> struct RestoreData : NonCopyable , public ReferenceCounted < RestoreData > { <nl> <nl> std : : vector < RestoreFile > files ; / / backup files : range and log files <nl> <nl> + / / Temporary data structure for parsing range and log files into ( version , < K , V , mutationType > ) <nl> + std : : map < Version , Standalone < VectorRef < MutationRef > > > kvOps ; <nl> + / / std : : map < Version , std : : vector < MutationRef > > kvOps ; / / TODO : Must change to standAlone before run correctness test . otherwise , you will see the mutationref memory is corrupted <nl> + std : : map < Standalone < StringRef > , Standalone < StringRef > > mutationMap ; / / key is the unique identifier for a batch of mutation logs at the same version <nl> + std : : map < Standalone < StringRef > , uint32_t > mutationPartMap ; / / Record the most recent <nl> + <nl> + std : : string getRole ( ) { <nl> + return getRoleStr ( localNodeStatus . role ) ; <nl> + } <nl> + <nl> + std : : string getNodeID ( ) { <nl> + return localNodeStatus . nodeID . toString ( ) ; <nl> + } <nl> + <nl> ~ RestoreData ( ) { <nl> printf ( " [ Exit ] RestoreData is deleted \ n " ) ; <nl> } <nl> void printGlobalNodeStatus ( Reference < RestoreData > restoreData ) { <nl> <nl> void concatenateBackupMutation ( Standalone < StringRef > val_input , Standalone < StringRef > key_input ) ; <nl> void registerBackupMutationForAll ( Version empty ) ; <nl> - bool isKVOpsSorted ( ) ; <nl> - bool allOpsAreKnown ( ) ; <nl> + bool isKVOpsSorted ( Reference < RestoreData > rd ) ; <nl> + bool allOpsAreKnown ( Reference < RestoreData > rd ) ; <nl> <nl> <nl> <nl> ACTOR static Future < Void > prepareRestoreFilesV2 ( Reference < RestoreData > restoreDa <nl> } <nl> <nl> <nl> - ACTOR static Future < Void > _parseRangeFileToMutationsOnLoader ( Reference < IBackupContainer > bc , Version version , <nl> + ACTOR static Future < Void > _parseRangeFileToMutationsOnLoader ( Reference < RestoreData > rd , <nl> + Reference < IBackupContainer > bc , Version version , <nl> std : : string fileName , int64_t readOffset_input , int64_t readLen_input , <nl> KeyRange restoreRange , Key addPrefix , Key removePrefix ) { <nl> / / state Reference < ReadYourWritesTransaction > tr ( new ReadYourWritesTransaction ( cx ) ) ; / / Used to clear the range where the KV will be applied . <nl> ACTOR static Future < Void > prepareRestoreFilesV2 ( Reference < RestoreData > restoreDa <nl> <nl> / / TODO : we can commit the kv operation into DB . <nl> / / Right now , we cache all kv operations into kvOps , and apply all kv operations later in one place <nl> - if ( kvOps . find ( version ) = = kvOps . end ( ) ) { / / Create the map ' s key if mutation m is the first on to be inserted <nl> + if ( rd - > kvOps . find ( version ) = = rd - > kvOps . end ( ) ) { / / Create the map ' s key if mutation m is the first on to be inserted <nl> / / kvOps . insert ( std : : make_pair ( rangeFile . version , Standalone < VectorRef < MutationRef > > ( VectorRef < MutationRef > ( ) ) ) ) ; <nl> - kvOps . insert ( std : : make_pair ( version , VectorRef < MutationRef > ( ) ) ) ; <nl> + rd - > kvOps . insert ( std : : make_pair ( version , VectorRef < MutationRef > ( ) ) ) ; <nl> } <nl> <nl> - ASSERT ( kvOps . find ( version ) ! = kvOps . end ( ) ) ; <nl> - kvOps [ version ] . push_back_deep ( kvOps [ version ] . arena ( ) , m ) ; <nl> + ASSERT ( rd - > kvOps . find ( version ) ! = rd - > kvOps . end ( ) ) ; <nl> + rd - > kvOps [ version ] . push_back_deep ( rd - > kvOps [ version ] . arena ( ) , m ) ; <nl> <nl> } <nl> <nl> ACTOR static Future < Void > prepareRestoreFilesV2 ( Reference < RestoreData > restoreDa <nl> <nl> if ( start = = end ) { <nl> / / TraceEvent ( " ExtraApplyRangeFileToDB_MX " ) . detail ( " Progress " , " DoneApplyKVToDB " ) ; <nl> - printf ( " [ INFO ] RangeFile : % s : the number of kv operations = % d \ n " , fileName . c_str ( ) , kvCount ) ; <nl> + printf ( " [ INFO ] [ Loader ] NodeID : % s Parse RangeFile : % s : the number of kv operations = % d \ n " , <nl> + rd - > getNodeID ( ) . c_str ( ) , fileName . c_str ( ) , kvCount ) ; <nl> return Void ( ) ; <nl> } <nl> } <nl> ACTOR static Future < Void > prepareRestoreFilesV2 ( Reference < RestoreData > restoreDa <nl> } <nl> <nl> <nl> - ACTOR static Future < Void > _parseLogFileToMutationsOnLoader ( Reference < IBackupContainer > bc , Version version , <nl> - std : : string fileName , int64_t readOffset_input , int64_t readLen_input , <nl> - KeyRange restoreRange , Key addPrefix , Key removePrefix ) { <nl> + ACTOR static Future < Void > _parseLogFileToMutationsOnLoader ( Reference < RestoreData > rd , <nl> + Reference < IBackupContainer > bc , Version version , <nl> + std : : string fileName , int64_t readOffset , int64_t readLen , <nl> + KeyRange restoreRange , Key addPrefix , Key removePrefix , <nl> + Key mutationLogPrefix ) { <nl> <nl> - / / First concatenate the backuped param1 and param2 ( KV ) at the same version . <nl> + / / Step : concatenate the backuped param1 and param2 ( KV ) at the same version . <nl> + / / state Key mutationLogPrefix = mutationLogPrefix ; <nl> + / / TraceEvent ( " ReadLogFileStart " ) . detail ( " LogFileName " , fileName ) ; <nl> + state Reference < IAsyncFile > inFile = wait ( bc - > readFile ( fileName ) ) ; <nl> + / / TraceEvent ( " ReadLogFileFinish " ) . detail ( " LogFileName " , fileName ) ; <nl> <nl> - / / <nl> - / / wait ( _executeApplyMutationLogFileToDB ( cx , restore , f , readOffset , readLen , bc , restoreRange , addPrefix , removePrefix ) ) ; <nl> - / / <nl> - / / printf ( " Now parse concatenated mutation log and register it to kvOps , mutationMap size : % d start . . . \ n " , mutationMap . size ( ) ) ; <nl> - / / <nl> - / / registerBackupMutationForAll ( Version ( ) ) ; <nl> - / / printf ( " Now parse concatenated mutation log and register it to kvOps , mutationMap size : % d done . . . \ n " , mutationMap . size ( ) ) ; <nl> - / / <nl> - / / / / Get the range file into the kvOps later <nl> - / / printf ( " ApplyRangeFiles \ n " ) ; <nl> - / / futures . clear ( ) ; <nl> - / / for ( fi = 0 ; fi < files . size ( ) ; + + fi ) { <nl> - / / f = files [ fi ] ; <nl> - / / printf ( " ApplyRangeFiles : id : % d \ n " , fi ) ; <nl> - / / if ( f . isRange ) { <nl> - / / / / TraceEvent ( " ApplyRangeFileToDB_MX " ) . detail ( " FileInfo " , f . toString ( ) ) ; <nl> - / / printf ( " ApplyRangeFileToDB_MX FileInfo : % s \ n " , f . toString ( ) . c_str ( ) ) ; <nl> - / / beginBlock = 0 ; <nl> - / / j = beginBlock * f . blockSize ; <nl> - / / readLen = 0 ; <nl> - / / / / For each block of the file <nl> - / / for ( ; j < f . fileSize ; j + = f . blockSize ) { <nl> - / / readOffset = j ; <nl> - / / readLen = std : : min < int64_t > ( f . blockSize , f . fileSize - j ) ; <nl> - / / futures . push_back ( _parseLogFileToMutations ( cx , restore , f , readOffset , readLen , bc , restoreRange , addPrefix , removePrefix ) ) ; <nl> - / / <nl> - / / / / Increment beginBlock for the file <nl> - / / + + beginBlock ; <nl> - / / / / TraceEvent ( " ApplyRangeFileToDB_MX " ) . detail ( " FileInfo " , f . toString ( ) ) . detail ( " ReadOffset " , readOffset ) . detail ( " ReadLen " , readLen ) ; <nl> - / / } <nl> - / / } <nl> - / / } <nl> - / / if ( futures . size ( ) ! = 0 ) { <nl> - / / printf ( " Wait for futures of applyRangeFiles , start waiting \ n " ) ; <nl> - / / wait ( waitForAll ( futures ) ) ; <nl> - / / printf ( " Wait for futures of applyRangeFiles , finish waiting \ n " ) ; <nl> - / / } <nl> + <nl> + printf ( " Parse log file : % s readOffset : % d readLen : % d \ n " , fileName . c_str ( ) , readOffset , readLen ) ; <nl> + / / TODO : NOTE : decodeLogFileBlock ( ) should read block by block ! based on my serial version . This applies to decode range file as well <nl> + state Standalone < VectorRef < KeyValueRef > > data = wait ( parallelFileRestore : : decodeLogFileBlock ( inFile , readOffset , readLen ) ) ; <nl> + / / state Standalone < VectorRef < MutationRef > > data = wait ( fileBackup : : decodeLogFileBlock_MX ( inFile , readOffset , readLen ) ) ; / / Decode log file <nl> + TraceEvent ( " ReadLogFileFinish " ) . detail ( " LogFileName " , fileName ) . detail ( " DecodedDataSize " , data . contents ( ) . size ( ) ) ; <nl> + printf ( " ReadLogFile , raw data size : % d \ n " , data . size ( ) ) ; <nl> + <nl> + state int start = 0 ; <nl> + state int end = data . size ( ) ; <nl> + state int dataSizeLimit = BUGGIFY ? g_random - > randomInt ( 256 * 1024 , 10e6 ) : CLIENT_KNOBS - > RESTORE_WRITE_TX_SIZE ; <nl> + state int kvCount = 0 ; <nl> + state int numConcatenated = 0 ; <nl> + loop { <nl> + try { <nl> + printf ( " Process start : % d where end = % d \ n " , start , end ) ; <nl> + if ( start = = end ) { <nl> + printf ( " ReadLogFile : finish reading the raw data and concatenating the mutation at the same version \ n " ) ; <nl> + break ; <nl> + } <nl> + <nl> + state int i = start ; <nl> + state int txBytes = 0 ; <nl> + for ( ; i < end & & txBytes < dataSizeLimit ; + + i ) { <nl> + Key k = data [ i ] . key . withPrefix ( mutationLogPrefix ) ; <nl> + ValueRef v = data [ i ] . value ; <nl> + txBytes + = k . expectedSize ( ) ; <nl> + txBytes + = v . expectedSize ( ) ; <nl> + / / MXX : print out the key value version , and operations . <nl> + / / printf ( " LogFile [ key : % s , value : % s , version : % ld , op : NoOp ] \ n " , k . printable ( ) . c_str ( ) , v . printable ( ) . c_str ( ) , logFile . version ) ; <nl> + / / printf ( " LogFile [ KEY : % s , VALUE : % s , VERSION : % ld , op : NoOp ] \ n " , getHexString ( k ) . c_str ( ) , getHexString ( v ) . c_str ( ) , logFile . version ) ; <nl> + / / printBackupMutationRefValueHex ( v , " | \ t " ) ; <nl> + / * <nl> + printf ( " | | Register backup mutation : file : % s , data : % d \ n " , logFile . fileName . c_str ( ) , i ) ; <nl> + registerBackupMutation ( data [ i ] . value , logFile . version ) ; <nl> + * / <nl> + / / printf ( " [ DEBUG ] | | Concatenate backup mutation : fileInfo : % s , data : % d \ n " , logFile . toString ( ) . c_str ( ) , i ) ; <nl> + bool concatenated = concatenateBackupMutationForLogFile ( rd , data [ i ] . value , data [ i ] . key ) ; <nl> + numConcatenated + = ( concatenated ? 1 : 0 ) ; <nl> + / / / / TODO : Decode the value to get the mutation type . Use NoOp to distinguish from range kv for now . <nl> + / / MutationRef m ( MutationRef : : Type : : NoOp , data [ i ] . key , data [ i ] . value ) ; / / ASSUME : all operation in log file is NoOp . <nl> + / / if ( rd - > kvOps . find ( logFile . version ) = = rd - > kvOps . end ( ) ) { <nl> + / / rd - > kvOps . insert ( std : : make_pair ( logFile . version , std : : vector < MutationRef > ( ) ) ) ; <nl> + / / } else { <nl> + / / rd - > kvOps [ logFile . version ] . push_back ( m ) ; <nl> + / / } <nl> + } <nl> + <nl> + start = i ; <nl> + <nl> + } catch ( Error & e ) { <nl> + if ( e . code ( ) = = error_code_transaction_too_large ) <nl> + dataSizeLimit / = 2 ; <nl> + } <nl> + } <nl> + <nl> + printf ( " [ INFO ] raw kv number : % d parsed from log file , concatenated : % d kv , num_log_versions : % d \ n " , data . size ( ) , numConcatenated , rd - > mutationMap . size ( ) ) ; <nl> <nl> return Void ( ) ; <nl> } <nl> <nl> + / / Parse the kv pair ( version , serialized_mutation ) , which are the results parsed from log file . <nl> + void parseSerializedMutation ( Reference < RestoreData > rd ) { <nl> + / / Step : Parse the concatenated KV pairs into ( version , < K , V , mutationType > ) pair <nl> + printf ( " [ INFO ] Parse the concatenated log data \ n " ) ; <nl> + std : : string prefix = " | | \ t " ; <nl> + std : : stringstream ss ; <nl> + const int version_size = 12 ; <nl> + const int header_size = 12 ; <nl> + int kvCount = 0 ; <nl> + <nl> + for ( auto & m : rd - > mutationMap ) { <nl> + StringRef k = m . first . contents ( ) ; <nl> + StringRefReaderMX readerVersion ( k , restore_corrupted_data ( ) ) ; <nl> + uint64_t commitVersion = readerVersion . consume < uint64_t > ( ) ; / / Consume little Endian data <nl> + <nl> + <nl> + StringRef val = m . second . contents ( ) ; <nl> + StringRefReaderMX reader ( val , restore_corrupted_data ( ) ) ; <nl> + <nl> + int count_size = 0 ; <nl> + / / Get the include version in the batch commit , which is not the commitVersion . <nl> + / / commitVersion is in the key <nl> + uint64_t includeVersion = reader . consume < uint64_t > ( ) ; <nl> + count_size + = 8 ; <nl> + uint32_t val_length_decode = reader . consume < uint32_t > ( ) ; / / Parse little endian value , confirmed it is correct ! <nl> + count_size + = 4 ; <nl> + <nl> + if ( rd - > kvOps . find ( commitVersion ) = = rd - > kvOps . end ( ) ) { <nl> + rd - > kvOps . insert ( std : : make_pair ( commitVersion , VectorRef < MutationRef > ( ) ) ) ; <nl> + } <nl> <nl> + if ( debug_verbose ) { <nl> + printf ( " mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - Register Backup Mutation into KVOPs version : % 08lx \ n " , commitVersion ) ; <nl> + printf ( " To decode value : % s \ n " , getHexString ( val ) . c_str ( ) ) ; <nl> + } <nl> + if ( val_length_decode ! = ( val . size ( ) - 12 ) ) { <nl> + / / IF we see val . size ( ) = = 10000 , It means val should be concatenated ! The concatenation may fail to copy the data <nl> + fprintf ( stderr , " [ PARSE ERROR ] ! ! ! val_length_decode : % d ! = val . size : % d version : % ld ( 0x % lx ) \ n " , val_length_decode , val . size ( ) , <nl> + commitVersion , commitVersion ) ; <nl> + } else { <nl> + if ( debug_verbose ) { <nl> + printf ( " [ PARSE SUCCESS ] val_length_decode : % d = = ( val . size : % d - 12 ) \ n " , val_length_decode , val . size ( ) ) ; <nl> + } <nl> + } <nl> + <nl> + / / Get the mutation header <nl> + while ( 1 ) { <nl> + / / stop when reach the end of the string <nl> + if ( reader . eof ( ) ) { / / | | * reader . rptr = = 0xFF <nl> + / / printf ( " Finish decode the value \ n " ) ; <nl> + break ; <nl> + } <nl> + <nl> + <nl> + uint32_t type = reader . consume < uint32_t > ( ) ; / / reader . consumeNetworkUInt32 ( ) ; <nl> + uint32_t kLen = reader . consume < uint32_t > ( ) ; / / reader . consumeNetworkUInkvOps [ t32 ( ) ; <nl> + uint32_t vLen = reader . consume < uint32_t > ( ) ; / / reader . consumeNetworkUInt32 ( ) ; <nl> + const uint8_t * k = reader . consume ( kLen ) ; <nl> + const uint8_t * v = reader . consume ( vLen ) ; <nl> + count_size + = 4 * 3 + kLen + vLen ; <nl> + <nl> + MutationRef mutation ( ( MutationRef : : Type ) type , KeyRef ( k , kLen ) , KeyRef ( v , vLen ) ) ; <nl> + rd - > kvOps [ commitVersion ] . push_back_deep ( rd - > kvOps [ commitVersion ] . arena ( ) , mutation ) ; <nl> + kvCount + + ; <nl> + <nl> + if ( kLen < 0 | | kLen > val . size ( ) | | vLen < 0 | | vLen > val . size ( ) ) { <nl> + printf ( " % s [ PARSE ERROR ] ! ! ! ! kLen : % d ( 0x % 04x ) vLen : % d ( 0x % 04x ) \ n " , prefix . c_str ( ) , kLen , kLen , vLen , vLen ) ; <nl> + } <nl> + <nl> + if ( debug_verbose ) { <nl> + printf ( " % smmmRegisterBackupMutation [ % d ] : Version : % 016lx Type : % d K : % s V : % s k_size : % d v_size : % d \ n " , prefix . c_str ( ) , <nl> + kvCount , <nl> + commitVersion , type , getHexString ( KeyRef ( k , kLen ) ) . c_str ( ) , getHexString ( KeyRef ( v , vLen ) ) . c_str ( ) , kLen , vLen ) ; <nl> + } <nl> + <nl> + } <nl> + / / printf ( " mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - \ n " ) ; <nl> + } <nl> + <nl> + printf ( " [ INFO ] Produces % d mutation operations from concatenated kv pairs that are parsed from log \ n " , kvCount ) ; <nl> + <nl> + } <nl> + <nl> + / / TO BE DELETED <nl> + / * <nl> ACTOR static Future < Void > _parseRangeFileToMutations ( Database cx , Reference < RestoreConfig > restore_input , <nl> RestoreFile rangeFile_input , int64_t readOffset_input , int64_t readLen_input , <nl> Reference < IBackupContainer > bc , KeyRange restoreRange , Key addPrefix , Key removePrefix <nl> ACTOR static Future < Void > prepareRestoreFilesV2 ( Reference < RestoreData > restoreDa <nl> } <nl> <nl> } <nl> + * / <nl> <nl> - <nl> + / / TO BE DELETED <nl> + / * <nl> ACTOR static Future < Void > _parseLogFileToMutations ( Database cx , Reference < RestoreConfig > restore_input , <nl> RestoreFile logFile_input , int64_t readOffset_input , int64_t readLen_input , <nl> Reference < IBackupContainer > bc , KeyRange restoreRange , Key addPrefix , Key removePrefix <nl> ACTOR static Future < Void > prepareRestoreFilesV2 ( Reference < RestoreData > restoreDa <nl> / / printf ( " LogFile [ key : % s , value : % s , version : % ld , op : NoOp ] \ n " , k . printable ( ) . c_str ( ) , v . printable ( ) . c_str ( ) , logFile . version ) ; <nl> / / printf ( " LogFile [ KEY : % s , VALUE : % s , VERSION : % ld , op : NoOp ] \ n " , getHexString ( k ) . c_str ( ) , getHexString ( v ) . c_str ( ) , logFile . version ) ; <nl> / / printBackupMutationRefValueHex ( v , " | \ t " ) ; <nl> - / * <nl> - TraceEvent ( " PrintMutationLogFile_MX " ) . detail ( " Key " , getHexString ( k ) ) . detail ( " Value " , getHexString ( v ) ) <nl> - . detail ( " Version " , logFile . version ) . detail ( " Op " , " NoOps " ) ; <nl> - <nl> - printf ( " | | Register backup mutation : file : % s , data : % d \ n " , logFile . fileName . c_str ( ) , i ) ; <nl> - registerBackupMutation ( data [ i ] . value , logFile . version ) ; <nl> - * / <nl> + / / <nl> + / / TraceEvent ( " PrintMutationLogFile_MX " ) . detail ( " Key " , getHexString ( k ) ) . detail ( " Value " , getHexString ( v ) ) <nl> + / / . detail ( " Version " , logFile . version ) . detail ( " Op " , " NoOps " ) ; <nl> + / / <nl> + / / printf ( " | | Register backup mutation : file : % s , data : % d \ n " , logFile . fileName . c_str ( ) , i ) ; <nl> + / / registerBackupMutation ( data [ i ] . value , logFile . version ) ; <nl> + / / <nl> / / printf ( " [ DEBUG ] | | Concatenate backup mutation : fileInfo : % s , data : % d \ n " , logFile . toString ( ) . c_str ( ) , i ) ; <nl> concatenateBackupMutation ( data [ i ] . value , data [ i ] . key ) ; <nl> } <nl> ACTOR static Future < Void > prepareRestoreFilesV2 ( Reference < RestoreData > restoreDa <nl> <nl> / / return is in the above code <nl> } <nl> + * / <nl> <nl> <nl> <nl> - ACTOR Future < Void > applyKVOpsToDB ( Database cx ) { <nl> + ACTOR Future < Void > applyKVOpsToDB ( Reference < RestoreData > rd , Database cx ) { <nl> state bool isPrint = false ; / / Debug message <nl> state std : : string typeStr = " " ; <nl> <nl> if ( debug_verbose ) { <nl> - TraceEvent ( " ApplyKVOPsToDB " ) . detail ( " MapSize " , kvOps . size ( ) ) ; <nl> - printf ( " ApplyKVOPsToDB num_of_version : % d \ n " , kvOps . size ( ) ) ; <nl> + TraceEvent ( " ApplyKVOPsToDB " ) . detail ( " MapSize " , rd - > kvOps . size ( ) ) ; <nl> + printf ( " ApplyKVOPsToDB num_of_version : % d \ n " , rd - > kvOps . size ( ) ) ; <nl> } <nl> - state std : : map < Version , Standalone < VectorRef < MutationRef > > > : : iterator it = kvOps . begin ( ) ; <nl> + state std : : map < Version , Standalone < VectorRef < MutationRef > > > : : iterator it = rd - > kvOps . begin ( ) ; <nl> state int count = 0 ; <nl> - for ( ; it ! = kvOps . end ( ) ; + + it ) { <nl> + for ( ; it ! = rd - > kvOps . end ( ) ; + + it ) { <nl> <nl> if ( debug_verbose ) { <nl> TraceEvent ( " ApplyKVOPsToDB \ t " ) . detail ( " Version " , it - > first ) . detail ( " OpNum " , it - > second . size ( ) ) ; <nl> ACTOR static Future < Void > prepareRestoreFilesV2 ( Reference < RestoreData > restoreDa <nl> } <nl> } <nl> <nl> - printf ( " ApplyKVOPsToDB number of kv mutations : % d \ n " , count ) ; <nl> + printf ( " [ INFO ] ApplyKVOPsToDB number of kv mutations : % d \ n " , count ) ; <nl> <nl> return Void ( ) ; <nl> } <nl> <nl> + ACTOR Future < Void > setWorkerInterface ( Reference < RestoreData > restoreData , Database cx ) { <nl> + state Transaction tr ( cx ) ; <nl> + tr . setOption ( FDBTransactionOptions : : ACCESS_SYSTEM_KEYS ) ; <nl> + tr . setOption ( FDBTransactionOptions : : LOCK_AWARE ) ; <nl> + <nl> + state vector < RestoreCommandInterface > agents ; / / agents is cmdsInterf <nl> + printf ( " [ INFO ] [ Master ] Start configuring roles for workers \ n " ) ; <nl> + loop { <nl> + try { <nl> + Standalone < RangeResultRef > agentValues = wait ( tr . getRange ( restoreWorkersKeys , CLIENT_KNOBS - > TOO_MANY ) ) ; <nl> + ASSERT ( ! agentValues . more ) ; <nl> + if ( agentValues . size ( ) ) { <nl> + for ( auto & it : agentValues ) { <nl> + agents . push_back ( BinaryReader : : fromStringRef < RestoreCommandInterface > ( it . value , IncludeVersion ( ) ) ) ; <nl> + / / Save the RestoreCommandInterface for the later operations <nl> + restoreData - > workers_interface . insert ( std : : make_pair ( agents . back ( ) . id ( ) , agents . back ( ) ) ) ; <nl> + } <nl> + break ; <nl> + } <nl> + wait ( delay ( 5 . 0 ) ) ; <nl> + } catch ( Error & e ) { <nl> + printf ( " [ WARNING ] configureRoles transaction error : % s \ n " , e . what ( ) ) ; <nl> + wait ( tr . onError ( e ) ) ; <nl> + } <nl> + printf ( " [ WARNING ] setWorkerInterface should always succeeed in the first loop ! Something goes wrong ! \ n " ) ; <nl> + } ; <nl> + <nl> + return Void ( ) ; <nl> + } <nl> + <nl> <nl> / / / / mmm Restore Functions for the master role <nl> / / Set roles ( Loader or Applier ) for workers <nl> ACTOR Future < Void > configureRoles ( Reference < RestoreData > restoreData , Database c <nl> restoreData - > globalNodeStatus . back ( ) . init ( RestoreRole : : Applier ) ; <nl> restoreData - > globalNodeStatus . back ( ) . nodeID = agents [ i ] . id ( ) ; <nl> } <nl> + / / Set the last Applier as the master applier <nl> + restoreData - > masterApplier = restoreData - > globalNodeStatus . back ( ) . nodeID ; <nl> + printf ( " [ INFO ] [ Master ] masterApplier ID : % s \ n " , restoreData - > masterApplier . toString ( ) . c_str ( ) ) ; <nl> <nl> state int index = 0 ; <nl> state RestoreRole role ; <nl> ACTOR Future < Void > configureRoles ( Reference < RestoreData > restoreData , Database c <nl> nodeID = restoreData - > globalNodeStatus [ index ] . nodeID ; <nl> printf ( " [ CMD ] Set role ( % s ) to node ( index = % d uid = % s ) \ n " , <nl> getRoleStr ( role ) . c_str ( ) , index , nodeID . toString ( ) . c_str ( ) ) ; <nl> - cmdReplies . push_back ( cmdInterf . cmd . getReply ( RestoreCommand ( RestoreCommandEnum : : Set_Role , nodeID , role ) ) ) ; <nl> + cmdReplies . push_back ( cmdInterf . cmd . getReply ( RestoreCommand ( RestoreCommandEnum : : Set_Role , nodeID , role , restoreData - > masterApplier ) ) ) ; <nl> index + + ; <nl> } <nl> std : : vector < RestoreCommandReply > reps = wait ( getAll ( cmdReplies ) ) ; <nl> ACTOR Future < Void > configureRoles ( Reference < RestoreData > restoreData , Database c <nl> break ; <nl> } <nl> <nl> + <nl> + <nl> printf ( " Role : % s finish configure roles \ n " , getRoleStr ( restoreData - > localNodeStatus . role ) . c_str ( ) ) ; <nl> return Void ( ) ; <nl> <nl> ACTOR Future < Void > configureRolesHandler ( Reference < RestoreData > restoreData , Res <nl> if ( req . cmd = = RestoreCommandEnum : : Set_Role ) { <nl> restoreData - > localNodeStatus . init ( req . role ) ; <nl> restoreData - > localNodeStatus . nodeID = interf . id ( ) ; <nl> + restoreData - > masterApplier = req . masterApplier ; <nl> printf ( " [ INFO ] [ Worker ] Set localNodeID to % s , set role to % s \ n " , <nl> restoreData - > localNodeStatus . nodeID . toString ( ) . c_str ( ) , getRoleStr ( restoreData - > localNodeStatus . role ) . c_str ( ) ) ; <nl> req . reply . send ( RestoreCommandReply ( interf . id ( ) ) ) ; <nl> ACTOR Future < Void > assignKeyRangeToAppliersHandler ( Reference < RestoreData > restor <nl> printf ( " [ ERROR ] non - applier node : % s ( role : % d ) is waiting for cmds for appliers \ n " , <nl> restoreData - > localNodeStatus . nodeID . toString ( ) . c_str ( ) , restoreData - > localNodeStatus . role ) ; <nl> } else { <nl> - printf ( " [ INFO ] [ Worker ] nodeID : % s ( interface id : % s ) waits for Assign_Applier_KeyRange cmd \ n " , <nl> + printf ( " [ INFO ] [ Applier ] nodeID : % s ( interface id : % s ) waits for Assign_Applier_KeyRange cmd \ n " , <nl> restoreData - > localNodeStatus . nodeID . toString ( ) . c_str ( ) , interf . id ( ) . toString ( ) . c_str ( ) ) ; <nl> } <nl> <nl> ACTOR Future < Void > assignKeyRangeToAppliersHandler ( Reference < RestoreData > restor <nl> return Void ( ) ; <nl> } <nl> <nl> + / / Receive mutations sent from loader <nl> + ACTOR Future < Void > receiveMutations ( Reference < RestoreData > rd , RestoreCommandInterface interf ) { <nl> + if ( rd - > localNodeStatus . role ! = RestoreRole : : Applier ) { <nl> + printf ( " [ ERROR ] non - applier node : % s ( role : % d ) is waiting for cmds for appliers \ n " , <nl> + rd - > localNodeStatus . nodeID . toString ( ) . c_str ( ) , rd - > localNodeStatus . role ) ; <nl> + } else { <nl> + printf ( " [ INFO ] [ Applier ] nodeID : % s ( interface id : % s ) waits for Loader_Send_Mutations_To_Applier cmd \ n " , <nl> + rd - > localNodeStatus . nodeID . toString ( ) . c_str ( ) , interf . id ( ) . toString ( ) . c_str ( ) ) ; <nl> + } <nl> + <nl> + state int numMutations = 0 ; <nl> + <nl> + loop { <nl> + choose { <nl> + when ( RestoreCommand req = waitNext ( interf . cmd . getFuture ( ) ) ) { <nl> + / / printf ( " [ INFO ] [ Applier ] Got Restore Command : cmd : % d UID : % s \ n " , <nl> + / / req . cmd , req . id . toString ( ) . c_str ( ) ) ; <nl> + if ( rd - > localNodeStatus . nodeID ! = req . id ) { <nl> + printf ( " [ ERROR ] node : % s receive request with a different id : % s \ n " , <nl> + rd - > localNodeStatus . nodeID . toString ( ) . c_str ( ) , req . id . toString ( ) . c_str ( ) ) ; <nl> + } <nl> + if ( req . cmd = = RestoreCommandEnum : : Loader_Send_Mutations_To_Applier ) { <nl> + / / Applier will cache the mutations at each version . Once receive all mutations , applier will apply them to DB <nl> + state uint64_t commitVersion = req . commitVersion ; <nl> + MutationRef mutation ( req . mutation ) ; <nl> + if ( rd - > kvOps . find ( commitVersion ) = = rd - > kvOps . end ( ) ) { <nl> + rd - > kvOps . insert ( std : : make_pair ( commitVersion , VectorRef < MutationRef > ( ) ) ) ; <nl> + } <nl> + rd - > kvOps [ commitVersion ] . push_back_deep ( rd - > kvOps [ commitVersion ] . arena ( ) , mutation ) ; <nl> + numMutations + + ; <nl> + if ( numMutations % 1000 = = 1 ) { <nl> + printf ( " [ INFO ] [ Applier ] Receives % d mutations \ n " , numMutations ) ; <nl> + } <nl> + <nl> + req . reply . send ( RestoreCommandReply ( interf . id ( ) ) ) ; <nl> + } else if ( req . cmd = = RestoreCommandEnum : : Loader_Send_Mutations_To_Applier_Done ) { <nl> + printf ( " [ INFO ] [ Applier ] NodeID : % s receive all mutations \ n " , rd - > localNodeStatus . nodeID . toString ( ) . c_str ( ) ) ; <nl> + req . reply . send ( RestoreCommandReply ( interf . id ( ) ) ) ; <nl> + break ; <nl> + } else { <nl> + printf ( " [ ERROR ] Restore command % d is invalid . Master will be stuck at configuring roles \ n " , req . cmd ) ; <nl> + } <nl> + } <nl> + } <nl> + } <nl> + <nl> + return Void ( ) ; <nl> + } <nl> + <nl> + ACTOR Future < Void > applyMutationToDB ( Reference < RestoreData > rd , RestoreCommandInterface interf , Database cx ) { <nl> + if ( rd - > localNodeStatus . role ! = RestoreRole : : Applier ) { <nl> + printf ( " [ ERROR ] non - applier node : % s ( role : % d ) is waiting for cmds for appliers \ n " , <nl> + rd - > localNodeStatus . nodeID . toString ( ) . c_str ( ) , rd - > localNodeStatus . role ) ; <nl> + } else { <nl> + printf ( " [ INFO ] [ Applier ] nodeID : % s ( interface id : % s ) waits for Loader_Notify_Appler_To_Apply_Mutation cmd \ n " , <nl> + rd - > localNodeStatus . nodeID . toString ( ) . c_str ( ) , interf . id ( ) . toString ( ) . c_str ( ) ) ; <nl> + } <nl> + <nl> + state int numMutations = 0 ; <nl> + <nl> + loop { <nl> + choose { <nl> + when ( state RestoreCommand req = waitNext ( interf . cmd . getFuture ( ) ) ) { <nl> + / / printf ( " [ INFO ] [ Applier ] Got Restore Command : cmd : % d UID : % s \ n " , <nl> + / / req . cmd , req . id . toString ( ) . c_str ( ) ) ; <nl> + if ( rd - > localNodeStatus . nodeID ! = req . id ) { <nl> + printf ( " [ ERROR ] node : % s receive request with a different id : % s \ n " , <nl> + rd - > localNodeStatus . nodeID . toString ( ) . c_str ( ) , req . id . toString ( ) . c_str ( ) ) ; <nl> + } <nl> + if ( req . cmd = = RestoreCommandEnum : : Loader_Notify_Appler_To_Apply_Mutation ) { <nl> + / / Applier apply mutations to DB <nl> + printf ( " [ INFO ] [ Applier ] apply KV ops to DB starts . . . " ) ; <nl> + wait ( applyKVOpsToDB ( rd , cx ) ) ; <nl> + printf ( " [ INFO ] [ Applier ] apply KV ops to DB finishes . . . " ) ; <nl> + req . reply . send ( RestoreCommandReply ( interf . id ( ) ) ) ; <nl> + break ; <nl> + } else { <nl> + printf ( " [ ERROR ] Restore command % d is invalid . Master will be stuck at configuring roles \ n " , req . cmd ) ; <nl> + } <nl> + } <nl> + } <nl> + } <nl> + <nl> + return Void ( ) ; <nl> + } <nl> + <nl> + <nl> / / TODO : DONE : collectRestoreRequests <nl> ACTOR Future < Standalone < VectorRef < RestoreRequest > > > collectRestoreRequests ( Database cx ) { <nl> state int restoreId = 0 ; <nl> int IncreaseKeyRef ( KeyRef key , int step ) { <nl> * / <nl> <nl> / / TODO WiP : Distribution workload <nl> - ACTOR static Future < Void > distributeWorkload ( RestoreCommandInterface interf , Reference < RestoreData > restoreData , Database cx , RestoreRequest request ) { <nl> + ACTOR static Future < Void > distributeWorkload ( RestoreCommandInterface interf , Reference < RestoreData > restoreData , Database cx , RestoreRequest request , Reference < RestoreConfig > restoreConfig ) { <nl> state Key tagName = request . tagName ; <nl> state Key url = request . url ; <nl> state bool waitForComplete = request . waitForComplete ; <nl> ACTOR static Future < Void > distributeWorkload ( RestoreCommandInterface interf , Ref <nl> state Key removePrefix = request . removePrefix ; <nl> state bool lockDB = request . lockDB ; <nl> state UID randomUid = request . randomUid ; <nl> + state Key mutationLogPrefix = restoreConfig - > mutationLogPrefix ( ) ; <nl> + <nl> + printf ( " [ NOTE ] mutationLogPrefix : % s ( hex value : % s ) \ n " , mutationLogPrefix . toString ( ) . c_str ( ) , getHexString ( mutationLogPrefix ) . c_str ( ) ) ; <nl> <nl> / / Determine the key range each applier is responsible for <nl> std : : pair < int , int > numWorkers = getNumLoaderAndApplier ( restoreData ) ; <nl> ACTOR static Future < Void > distributeWorkload ( RestoreCommandInterface interf , Ref <nl> state int curFileIndex = 0 ; / / The smallest index of the files that has not been FULLY loaded <nl> state bool allLoadReqsSent = false ; <nl> state std : : vector < UID > loaderIDs = getLoaderIDs ( restoreData ) ; <nl> + state std : : vector < UID > applierIDs ; <nl> state std : : vector < UID > finishedLoaderIDs = loaderIDs ; <nl> <nl> try { <nl> ACTOR static Future < Void > distributeWorkload ( RestoreCommandInterface interf , Ref <nl> <nl> state std : : vector < Future < RestoreCommandReply > > cmdReplies ; <nl> for ( auto & loaderID : loaderIDs ) { <nl> + while ( restoreData - > files [ curFileIndex ] . fileSize = = 0 ) { <nl> + / / NOTE : & & restoreData - > files [ curFileIndex ] . cursor > = restoreData - > files [ curFileIndex ] . fileSize <nl> + printf ( " [ INFO ] File : % s filesize : % d skip the file \ n " , <nl> + restoreData - > files [ curFileIndex ] . fileName . c_str ( ) , restoreData - > files [ curFileIndex ] . fileSize ) ; <nl> + curFileIndex + + ; <nl> + } <nl> + if ( curFileIndex > = restoreData - > files . size ( ) ) { <nl> + allLoadReqsSent = true ; <nl> + break ; <nl> + } <nl> LoadingParam param ; <nl> param . url = request . url ; <nl> param . version = restoreData - > files [ curFileIndex ] . version ; <nl> ACTOR static Future < Void > distributeWorkload ( RestoreCommandInterface interf , Ref <nl> param . offset = restoreData - > files [ curFileIndex ] . cursor ; <nl> / / param . length = std : : min ( restoreData - > files [ curFileIndex ] . fileSize - restoreData - > files [ curFileIndex ] . cursor , loadSizeB ) ; <nl> param . length = restoreData - > files [ curFileIndex ] . fileSize ; <nl> + param . blockSize = restoreData - > files [ curFileIndex ] . blockSize ; <nl> param . restoreRange = restoreRange ; <nl> param . addPrefix = addPrefix ; <nl> param . removePrefix = removePrefix ; <nl> + param . mutationLogPrefix = mutationLogPrefix ; <nl> ASSERT ( param . length > 0 ) ; <nl> ASSERT ( param . offset > = 0 & & param . offset < restoreData - > files [ curFileIndex ] . fileSize ) ; <nl> restoreData - > files [ curFileIndex ] . cursor = restoreData - > files [ curFileIndex ] . cursor + param . length ; <nl> ACTOR static Future < Void > distributeWorkload ( RestoreCommandInterface interf , Ref <nl> break ; / / NOTE : need to change when change to wait on any cmdReplies <nl> } <nl> } <nl> + <nl> } catch ( Error & e ) { <nl> if ( e . code ( ) ! = error_code_end_of_stream ) { <nl> printf ( " [ ERROR ] cmd : Assign_Loader_File has error : % s ( code : % d ) \ n " , e . what ( ) , e . code ( ) ) ; <nl> ACTOR static Future < Void > distributeWorkload ( RestoreCommandInterface interf , Ref <nl> <nl> / / TODO : WiP Send cmd to Applier to apply the remaining mutations to DB <nl> <nl> - <nl> - <nl> - / / Notify the end of the loading <nl> + / / Notify loaders the end of the loading <nl> + printf ( " [ INFO ] [ Master ] Notify loaders the end of loading \ n " ) ; <nl> loaderIDs = getLoaderIDs ( restoreData ) ; <nl> cmdReplies . clear ( ) ; <nl> for ( auto & loaderID : loaderIDs ) { <nl> ACTOR static Future < Void > distributeWorkload ( RestoreCommandInterface interf , Ref <nl> RestoreCommandInterface & cmdInterf = restoreData - > workers_interface [ nodeID ] ; <nl> printf ( " [ CMD ] Assign_Loader_File_Done for node ID : % s \ n " , nodeID . toString ( ) . c_str ( ) ) ; <nl> cmdReplies . push_back ( cmdInterf . cmd . getReply ( RestoreCommand ( RestoreCommandEnum : : Assign_Loader_File_Done , nodeID ) ) ) ; <nl> + } <nl> + std : : vector < RestoreCommandReply > reps = wait ( getAll ( cmdReplies ) ) ; <nl> + for ( int i = 0 ; i < reps . size ( ) ; + + i ) { <nl> + printf ( " [ INFO ] Get restoreCommandReply value : % s for Assign_Loader_File_Done \ n " , <nl> + reps [ i ] . id . toString ( ) . c_str ( ) ) ; <nl> + } <nl> + <nl> + / / Notify appliers the end of the loading <nl> + printf ( " [ INFO ] [ Master ] Notify appliers the end of loading \ n " ) ; <nl> + applierIDs = getApplierIDs ( restoreData ) ; <nl> + cmdReplies . clear ( ) ; <nl> + for ( auto & id : applierIDs ) { <nl> + UID nodeID = id ; <nl> + RestoreCommandInterface & cmdInterf = restoreData - > workers_interface [ nodeID ] ; <nl> + printf ( " [ CMD ] Loader_Send_Mutations_To_Applier_Done for node ID : % s \ n " , nodeID . toString ( ) . c_str ( ) ) ; <nl> + cmdReplies . push_back ( cmdInterf . cmd . getReply ( RestoreCommand ( RestoreCommandEnum : : Loader_Send_Mutations_To_Applier_Done , nodeID ) ) ) ; <nl> + } <nl> + std : : vector < RestoreCommandReply > reps = wait ( getAll ( cmdReplies ) ) ; <nl> + for ( int i = 0 ; i < reps . size ( ) ; + + i ) { <nl> + printf ( " [ INFO ] get restoreCommandReply value : % s for Loader_Send_Mutations_To_Applier_Done \ n " , <nl> + reps [ i ] . id . toString ( ) . c_str ( ) ) ; <nl> + } <nl> <nl> + / / Notify to apply mutation to DB : ask loader to notify applier to do so <nl> + state int loaderIndex = 0 ; <nl> + for ( auto & loaderID : loaderIDs ) { <nl> + UID nodeID = loaderID ; <nl> + RestoreCommandInterface & cmdInterf = restoreData - > workers_interface [ nodeID ] ; <nl> + printf ( " [ CMD ] Apply_Mutation_To_DB for node ID : % s \ n " , nodeID . toString ( ) . c_str ( ) ) ; <nl> + if ( loaderIndex = = 0 ) { <nl> + cmdReplies . push_back ( cmdInterf . cmd . getReply ( RestoreCommand ( RestoreCommandEnum : : Apply_Mutation_To_DB , nodeID ) ) ) ; <nl> + } else { <nl> + / / Only apply mutation to DB once <nl> + cmdReplies . push_back ( cmdInterf . cmd . getReply ( RestoreCommand ( RestoreCommandEnum : : Apply_Mutation_To_DB_Skip , nodeID ) ) ) ; <nl> + } <nl> + loaderIndex + + ; <nl> } <nl> std : : vector < RestoreCommandReply > reps = wait ( getAll ( cmdReplies ) ) ; <nl> for ( int i = 0 ; i < reps . size ( ) ; + + i ) { <nl> - printf ( " [ INFO ] get restoreCommandReply value : % s for Assign_Loader_File_Done \ n " , <nl> + printf ( " [ INFO ] Finish Apply_Mutation_To_DB on nodes : % s \ n " , <nl> reps [ i ] . id . toString ( ) . c_str ( ) ) ; <nl> } <nl> <nl> ACTOR Future < Void > loadingHandler ( Reference < RestoreData > restoreData , RestoreCom <nl> printf ( " [ INFO ] Worker Node : % s Role : % s starts loadingHandler \ n " , <nl> restoreData - > localNodeStatus . nodeID . toString ( ) . c_str ( ) , <nl> getRoleStr ( restoreData - > localNodeStatus . role ) . c_str ( ) ) ; <nl> + <nl> try { <nl> + state int64_t cmdIndex = 0 ; <nl> + state LoadingParam param ; <nl> + state int64_t beginBlock = 0 ; <nl> + state int64_t j = 0 ; <nl> + state int64_t readLen = 0 ; <nl> + state int64_t readOffset = 0 ; <nl> + state Reference < IBackupContainer > bc ; <nl> loop { <nl> / / wait ( delay ( 1 . 0 ) ) ; <nl> choose { <nl> when ( state RestoreCommand req = waitNext ( interf . cmd . getFuture ( ) ) ) { <nl> - printf ( " [ INFO ] [ Worker ] Got Restore Command : cmd : % d UID : % s localNodeStatus . role : % d \ n " , <nl> + printf ( " [ INFO ] [ Loader ] Got Restore Command : cmd : % d UID : % s localNodeStatus . role : % d \ n " , <nl> req . cmd , req . id . toString ( ) . c_str ( ) , restoreData - > localNodeStatus . role ) ; <nl> if ( interf . id ( ) ! = req . id ) { <nl> printf ( " [ WARNING ] node : % s receive request with a different id : % s \ n " , <nl> restoreData - > localNodeStatus . nodeID . toString ( ) . c_str ( ) , req . id . toString ( ) . c_str ( ) ) ; <nl> } <nl> <nl> - state int64_t cmdIndex = req . cmdIndex ; <nl> - LoadingParam param = req . loadingParam ; <nl> + cmdIndex = req . cmdIndex ; <nl> + param = req . loadingParam ; <nl> + beginBlock = 0 ; <nl> + j = 0 ; <nl> + readLen = 0 ; <nl> + readOffset = 0 ; <nl> + readOffset = param . offset ; <nl> if ( req . cmd = = RestoreCommandEnum : : Assign_Loader_Range_File ) { <nl> - printf ( " [ INFO ] [ Worker ] Assign_Loader_Range_File Node : % s , role : % s , loading param : % s \ n " , <nl> + printf ( " [ INFO ] [ Loader ] Assign_Loader_Range_File Node : % s , role : % s , loading param : % s \ n " , <nl> restoreData - > localNodeStatus . nodeID . toString ( ) . c_str ( ) , <nl> getRoleStr ( restoreData - > localNodeStatus . role ) . c_str ( ) , <nl> param . toString ( ) . c_str ( ) ) ; <nl> - / / TODO : WiP : Load files <nl> - Reference < IBackupContainer > bc = IBackupContainer : : openContainer ( param . url . toString ( ) ) ; <nl> + <nl> + bc = IBackupContainer : : openContainer ( param . url . toString ( ) ) ; <nl> printf ( " [ INFO ] node : % s open backup container for url : % s \ n " , <nl> restoreData - > localNodeStatus . nodeID . toString ( ) . c_str ( ) , <nl> param . url . toString ( ) . c_str ( ) ) ; <nl> <nl> - wait ( _parseRangeFileToMutationsOnLoader ( bc , param . version , param . filename , param . offset , param . length , param . restoreRange , param . addPrefix , param . removePrefix ) ) ; <nl> <nl> - / / TODO : Send to applier to apply the mutations <nl> - printf ( " [ INFO ] [ TODO ] Loader will send mutations to applier \ n " ) ; <nl> + ASSERT ( param . blockSize > 0 ) ; <nl> + / / state std : : vector < Future < Void > > fileParserFutures ; <nl> + if ( param . offset % param . blockSize ! = 0 ) { <nl> + printf ( " [ WARNING ] Parse file not at block boundary ! param . offset : % ld param . blocksize : % ld , remainder \ n " , param . offset , param . blockSize , param . offset % param . blockSize ) ; <nl> + } <nl> + for ( j = param . offset ; j < param . length ; j + = param . blockSize ) { <nl> + readOffset = j ; <nl> + readLen = std : : min < int64_t > ( param . blockSize , param . length - j ) ; <nl> + wait ( _parseRangeFileToMutationsOnLoader ( restoreData , bc , param . version , param . filename , readOffset , readLen , param . restoreRange , param . addPrefix , param . removePrefix ) ) ; <nl> + + + beginBlock ; <nl> + } <nl> + <nl> + printf ( " [ INFO ] [ Loader ] Node : % s finishes process Range file : % s \ n " , restoreData - > getNodeID ( ) . c_str ( ) , param . filename . c_str ( ) ) ; <nl> + / / TODO : Send to applier to apply the mutations <nl> + printf ( " [ INFO ] [ Loader ] Node : % s will send range mutations to applier \ n " , restoreData - > getNodeID ( ) . c_str ( ) ) ; <nl> + wait ( registerMutationsToApplier ( restoreData ) ) ; / / Send the parsed mutation to applier who will apply the mutation to DB <nl> + <nl> <nl> / / TODO : Send ack to master that loader has finished loading the data <nl> req . reply . send ( RestoreCommandReply ( interf . id ( ) ) ) ; <nl> / / leaderInter . cmd . send ( RestoreCommand ( RestoreCommandEnum : : Loader_Send_Mutations_To_Applier_Done , restoreData - > localNodeStatus . nodeID , cmdIndex ) ) ; <nl> <nl> } else if ( req . cmd = = RestoreCommandEnum : : Assign_Loader_Log_File ) { <nl> - printf ( " [ INFO ] [ Worker ] Assign_Loader_Log_File Node : % s , role : % s , loading param : % s \ n " , <nl> + printf ( " [ INFO ] [ Loader ] Assign_Loader_Log_File Node : % s , role : % s , loading param : % s \ n " , <nl> restoreData - > localNodeStatus . nodeID . toString ( ) . c_str ( ) , <nl> getRoleStr ( restoreData - > localNodeStatus . role ) . c_str ( ) , <nl> param . toString ( ) . c_str ( ) ) ; <nl> <nl> - printf ( " [ INFO ] [ TODO ] Loader will send mutations to applier \ n " ) ; <nl> - req . reply . send ( RestoreCommandReply ( interf . id ( ) ) ) ; / / master node is waiting <nl> + bc = IBackupContainer : : openContainer ( param . url . toString ( ) ) ; <nl> + printf ( " [ INFO ] [ Loader ] Node : % s open backup container for url : % s \ n " , <nl> + restoreData - > localNodeStatus . nodeID . toString ( ) . c_str ( ) , <nl> + param . url . toString ( ) . c_str ( ) ) ; <nl> + printf ( " [ INFO ] [ Loader ] Node : % s filename : % s blockSize : % d \ n " , <nl> + restoreData - > localNodeStatus . nodeID . toString ( ) . c_str ( ) , <nl> + param . filename . c_str ( ) , param . blockSize ) ; <nl> + <nl> + ASSERT ( param . blockSize > 0 ) ; <nl> + / / state std : : vector < Future < Void > > fileParserFutures ; <nl> + if ( param . offset % param . blockSize ! = 0 ) { <nl> + printf ( " [ WARNING ] Parse file not at block boundary ! param . offset : % ld param . blocksize : % ld , remainder \ n " , param . offset , param . blockSize , param . offset % param . blockSize ) ; <nl> + } <nl> + for ( j = param . offset ; j < param . length ; j + = param . blockSize ) { <nl> + readOffset = j ; <nl> + readLen = std : : min < int64_t > ( param . blockSize , param . length - j ) ; <nl> + / / NOTE : Log file holds set of blocks of data . We need to parse the data block by block and get the kv pair ( version , serialized_mutations ) <nl> + / / The set of mutations at the same version may be splitted into multiple kv pairs ACROSS multiple data blocks when the size of serialized_mutations is larger than 20000 . <nl> + wait ( _parseLogFileToMutationsOnLoader ( restoreData , bc , param . version , param . filename , readOffset , readLen , param . restoreRange , param . addPrefix , param . removePrefix , param . mutationLogPrefix ) ) ; <nl> + + + beginBlock ; <nl> + } <nl> + printf ( " [ INFO ] [ Loader ] Node : % s finishes parsing the data block into kv pairs ( version , serialized_mutations ) for file : % s \ n " , restoreData - > getNodeID ( ) . c_str ( ) , param . filename . c_str ( ) ) ; <nl> + parseSerializedMutation ( restoreData ) ; <nl> + <nl> + printf ( " [ INFO ] [ Loader ] Node : % s finishes process Log file : % s \ n " , restoreData - > getNodeID ( ) . c_str ( ) , param . filename . c_str ( ) ) ; <nl> + printf ( " [ INFO ] [ Loader ] Node : % s will send log mutations to applier \ n " , restoreData - > getNodeID ( ) . c_str ( ) ) ; <nl> + wait ( registerMutationsToApplier ( restoreData ) ) ; / / Send the parsed mutation to applier who will apply the mutation to DB <nl> <nl> + req . reply . send ( RestoreCommandReply ( interf . id ( ) ) ) ; / / master node is waiting <nl> } else if ( req . cmd = = RestoreCommandEnum : : Assign_Loader_File_Done ) { <nl> - printf ( " [ INFO ] [ Worker ] Node : % s , role : % s , loading param : % s \ n " , <nl> + printf ( " [ INFO ] [ Loader ] Node : % s , role : % s , loading param : % s \ n " , <nl> restoreData - > localNodeStatus . nodeID . toString ( ) . c_str ( ) , <nl> getRoleStr ( restoreData - > localNodeStatus . role ) . c_str ( ) , <nl> param . toString ( ) . c_str ( ) ) ; <nl> ACTOR Future < Void > loadingHandler ( Reference < RestoreData > restoreData , RestoreCom <nl> req . reply . send ( RestoreCommandReply ( interf . id ( ) ) ) ; / / master node is waiting <nl> break ; <nl> } else { <nl> - printf ( " [ ERROR ] Restore command % d is invalid . Master will be stuck at configuring roles \ n " , req . cmd ) ; <nl> + printf ( " [ ERROR ] [ Loader ] Restore command % d is invalid . Master will be stuck \ n " , req . cmd ) ; <nl> } <nl> } <nl> } <nl> ACTOR Future < Void > loadingHandler ( Reference < RestoreData > restoreData , RestoreCom <nl> <nl> } catch ( Error & e ) { <nl> if ( e . code ( ) ! = error_code_end_of_stream ) { <nl> - printf ( " [ ERROR ] cmd : Assign_Loader_File has error : % s ( code : % d ) \ n " , e . what ( ) , e . code ( ) ) ; <nl> + printf ( " [ ERROR ] [ Loader ] Node : % s loadingHandler has error : % s ( code : % d ) \ n " , restoreData - > getNodeID ( ) . c_str ( ) , e . what ( ) , e . code ( ) ) ; <nl> } <nl> } <nl> <nl> ACTOR Future < Void > loadingHandler ( Reference < RestoreData > restoreData , RestoreCom <nl> } <nl> <nl> <nl> + ACTOR Future < Void > applyToDBHandler ( Reference < RestoreData > restoreData , RestoreCommandInterface interf , RestoreCommandInterface leaderInter ) { <nl> + printf ( " [ INFO ] Worker Node : % s Role : % s starts applyToDBHandler \ n " , <nl> + restoreData - > localNodeStatus . nodeID . toString ( ) . c_str ( ) , <nl> + getRoleStr ( restoreData - > localNodeStatus . role ) . c_str ( ) ) ; <nl> + try { <nl> + loop { <nl> + / / wait ( delay ( 1 . 0 ) ) ; <nl> + choose { <nl> + when ( state RestoreCommand req = waitNext ( interf . cmd . getFuture ( ) ) ) { <nl> + printf ( " [ INFO ] [ Worker ] Got Restore Command : cmd : % d UID : % s localNodeStatus . role : % d \ n " , <nl> + req . cmd , req . id . toString ( ) . c_str ( ) , restoreData - > localNodeStatus . role ) ; <nl> + if ( interf . id ( ) ! = req . id ) { <nl> + printf ( " [ WARNING ] node : % s receive request with a different id : % s \ n " , <nl> + restoreData - > localNodeStatus . nodeID . toString ( ) . c_str ( ) , req . id . toString ( ) . c_str ( ) ) ; <nl> + } <nl> + <nl> + state int64_t cmdIndex = req . cmdIndex ; <nl> + if ( req . cmd = = RestoreCommandEnum : : Apply_Mutation_To_DB ) { <nl> + printf ( " [ INFO ] [ Worker ] Node : % s , role : % s , receive cmd Apply_Mutation_To_DB \ n " , <nl> + restoreData - > localNodeStatus . nodeID . toString ( ) . c_str ( ) ) ; <nl> + <nl> + wait ( notifyApplierToApplyMutations ( restoreData ) ) ; <nl> <nl> + req . reply . send ( RestoreCommandReply ( interf . id ( ) ) ) ; / / master node is waiting <nl> + break ; <nl> + } else if ( req . cmd = = RestoreCommandEnum : : Apply_Mutation_To_DB_Skip ) { <nl> + printf ( " [ INFO ] [ Worker ] Node : % s , role : % s , receive cmd Apply_Mutation_To_DB_Skip \ n " , <nl> + restoreData - > localNodeStatus . nodeID . toString ( ) . c_str ( ) ) ; <nl> + <nl> + req . reply . send ( RestoreCommandReply ( interf . id ( ) ) ) ; / / master node is waiting <nl> + break ; <nl> + } else { <nl> + printf ( " [ ERROR ] Restore command % d is invalid . Master will be stuck at configuring roles \ n " , req . cmd ) ; <nl> + } <nl> + } <nl> + } <nl> + } <nl> <nl> + } catch ( Error & e ) { <nl> + if ( e . code ( ) ! = error_code_end_of_stream ) { <nl> + printf ( " [ ERROR ] cmd : Apply_Mutation_To_DB has error : % s ( code : % d ) \ n " , e . what ( ) , e . code ( ) ) ; <nl> + } <nl> + } <nl> + <nl> + return Void ( ) ; <nl> + } <nl> + <nl> + / / TO BE DELETED <nl> + / * <nl> ACTOR Future < Void > extractRestoreFileToMutations ( Database cx , std : : vector < RestoreFile > files , RestoreRequest request , <nl> Reference < RestoreConfig > restore , UID uid ) { <nl> state Key tagName = request . tagName ; <nl> ACTOR Future < Void > extractRestoreFileToMutations ( Database cx , std : : vector < Restor <nl> return Void ( ) ; <nl> <nl> } <nl> + * / <nl> <nl> - ACTOR Future < Void > sanityCheckRestoreOps ( Database cx , UID uid ) { <nl> + ACTOR Future < Void > sanityCheckRestoreOps ( Reference < RestoreData > rd , Database cx , UID uid ) { <nl> state Reference < ReadYourWritesTransaction > tr ( new ReadYourWritesTransaction ( cx ) ) ; <nl> tr - > setOption ( FDBTransactionOptions : : ACCESS_SYSTEM_KEYS ) ; <nl> tr - > setOption ( FDBTransactionOptions : : LOCK_AWARE ) ; <nl> ACTOR Future < Void > sanityCheckRestoreOps ( Database cx , UID uid ) { <nl> <nl> / / printf ( " Now sort KVOps in increasing order of commit version \ n " ) ; <nl> / / sort ( kvOps . begin ( ) , kvOps . end ( ) ) ; / / sort in increasing order of key using default less_than comparator <nl> - if ( isKVOpsSorted ( ) ) { <nl> + if ( isKVOpsSorted ( rd ) ) { <nl> printf ( " [ CORRECT ] KVOps is sorted by version \ n " ) ; <nl> } else { <nl> printf ( " [ ERROR ] ! ! ! KVOps is NOT sorted by version \ n " ) ; <nl> / / assert ( 0 ) ; <nl> } <nl> <nl> - if ( allOpsAreKnown ( ) ) { <nl> + if ( allOpsAreKnown ( rd ) ) { <nl> printf ( " [ CORRECT ] KVOps all operations are known . \ n " ) ; <nl> } else { <nl> printf ( " [ ERROR ] ! ! ! KVOps has unknown mutation op . Exit . . . \ n " ) ; <nl> ACTOR Future < Void > sanityCheckRestoreOps ( Database cx , UID uid ) { <nl> <nl> } <nl> <nl> - ACTOR Future < Void > applyRestoreOpsToDB ( Database cx ) { <nl> + ACTOR Future < Void > applyRestoreOpsToDB ( Reference < RestoreData > rd , Database cx ) { <nl> / / Apply the kv operations to DB <nl> - wait ( applyKVOpsToDB ( cx ) ) ; <nl> + wait ( applyKVOpsToDB ( rd , cx ) ) ; <nl> printf ( " Now apply KVOps to DB , Done \ n " ) ; <nl> <nl> return Void ( ) ; <nl> ACTOR Future < Void > _restoreWorker ( Database cx_input , LocalityData locality ) { <nl> } <nl> } <nl> <nl> + / / Find other worker ' s interfaces <nl> + wait ( setWorkerInterface ( restoreData , cx ) ) ; <nl> + <nl> / / Step : configure its role <nl> printf ( " [ INFO ] [ Worker ] Configure its role \ n " ) ; <nl> wait ( configureRolesHandler ( restoreData , interf ) ) ; <nl> ACTOR Future < Void > _restoreWorker ( Database cx_input , LocalityData locality ) { <nl> / / Step : prepare restore info : applier waits for the responsible keyRange , <nl> / / loader waits for the info of backup block it needs to load <nl> if ( restoreData - > localNodeStatus . role = = RestoreRole : : Applier ) { <nl> - printf ( " [ INFO ] [ Worker ] [ Applier ] Waits for the assignment of key range \ n " ) ; <nl> + printf ( " [ INFO ] [ Applier ] Waits for the assignment of key range \ n " ) ; <nl> wait ( assignKeyRangeToAppliersHandler ( restoreData , interf ) ) ; <nl> + <nl> + printf ( " [ INFO ] [ Applier ] Waits for the mutations parsed from loaders \ n " ) ; <nl> + wait ( receiveMutations ( restoreData , interf ) ) ; <nl> + <nl> + printf ( " [ INFO ] [ Applier ] Waits for the cmd to apply mutations from loaders \ n " ) ; <nl> + wait ( applyMutationToDB ( restoreData , interf , cx ) ) ; <nl> } else if ( restoreData - > localNodeStatus . role = = RestoreRole : : Loader ) { <nl> - printf ( " [ INFO ] [ Worker ] [ Loader ] Waits for the backup file assignment \ n " ) ; <nl> + printf ( " [ INFO ] [ Loader ] Waits for the backup file assignment \ n " ) ; <nl> wait ( loadingHandler ( restoreData , interf , leaderInterf . get ( ) ) ) ; <nl> + <nl> + printf ( " [ INFO ] [ Loader ] Waits for the backup file assignment \ n " ) ; <nl> + wait ( applyToDBHandler ( restoreData , interf , leaderInterf . get ( ) ) ) ; <nl> } else { <nl> printf ( " [ ERROR ] [ Worker ] In an invalid role : % d \ n " , restoreData - > localNodeStatus . role ) ; <nl> } <nl> ACTOR Future < Void > _restoreWorker ( Database cx_input , LocalityData locality ) { <nl> <nl> ACTOR Future < Void > restoreWorker ( Reference < ClusterConnectionFile > ccf , LocalityData locality ) { <nl> Database cx = Database : : createDatabase ( ccf - > getFilename ( ) , Database : : API_VERSION_LATEST , locality ) ; <nl> - Future < Void > ret = _restoreWorker ( cx , locality ) ; <nl> - return ret . get ( ) ; <nl> + wait ( _restoreWorker ( cx , locality ) ) ; <nl> + return Void ( ) ; <nl> } <nl> <nl> / / / / mmm Restore functions <nl> ACTOR static Future < Void > _finishMX ( Reference < ReadYourWritesTransaction > tr , Re <nl> <nl> <nl> / / mmm Extract backup range and log file and get the mutation list <nl> + / * <nl> ACTOR static Future < Void > _executeApplyRangeFileToDB ( Database cx , Reference < RestoreConfig > restore_input , <nl> RestoreFile rangeFile_input , int64_t readOffset_input , int64_t readLen_input , <nl> Reference < IBackupContainer > bc , KeyRange restoreRange , Key addPrefix , Key removePrefix <nl> ACTOR static Future < Void > _executeApplyRangeFileToDB ( Database cx , Reference < Rest <nl> <nl> <nl> } <nl> + * / <nl> <nl> + / * <nl> ACTOR static Future < Void > _executeApplyMutationLogFileToDB ( Database cx , Reference < RestoreConfig > restore_input , <nl> RestoreFile logFile_input , int64_t readOffset_input , int64_t readLen_input , <nl> Reference < IBackupContainer > bc , KeyRange restoreRange , Key addPrefix , Key removePrefix <nl> ACTOR static Future < Void > _executeApplyRangeFileToDB ( Database cx , Reference < Rest <nl> / / printf ( " LogFile [ key : % s , value : % s , version : % ld , op : NoOp ] \ n " , k . printable ( ) . c_str ( ) , v . printable ( ) . c_str ( ) , logFile . version ) ; <nl> / / printf ( " LogFile [ KEY : % s , VALUE : % s , VERSION : % ld , op : NoOp ] \ n " , getHexString ( k ) . c_str ( ) , getHexString ( v ) . c_str ( ) , logFile . version ) ; <nl> / / printBackupMutationRefValueHex ( v , " | \ t " ) ; <nl> - / * <nl> - TraceEvent ( " PrintMutationLogFile_MX " ) . detail ( " Key " , getHexString ( k ) ) . detail ( " Value " , getHexString ( v ) ) <nl> - . detail ( " Version " , logFile . version ) . detail ( " Op " , " NoOps " ) ; <nl> - <nl> - printf ( " | | Register backup mutation : file : % s , data : % d \ n " , logFile . fileName . c_str ( ) , i ) ; <nl> - registerBackupMutation ( data [ i ] . value , logFile . version ) ; <nl> - * / <nl> + / / <nl> + / / TraceEvent ( " PrintMutationLogFile_MX " ) . detail ( " Key " , getHexString ( k ) ) . detail ( " Value " , getHexString ( v ) ) <nl> + / / . detail ( " Version " , logFile . version ) . detail ( " Op " , " NoOps " ) ; <nl> + / / <nl> + / / printf ( " | | Register backup mutation : file : % s , data : % d \ n " , logFile . fileName . c_str ( ) , i ) ; <nl> + / / registerBackupMutation ( data [ i ] . value , logFile . version ) ; <nl> + / / <nl> / / printf ( " [ DEBUG ] | | Concatenate backup mutation : fileInfo : % s , data : % d \ n " , logFile . toString ( ) . c_str ( ) , i ) ; <nl> concatenateBackupMutation ( data [ i ] . value , data [ i ] . key ) ; <nl> / / / / TODO : Decode the value to get the mutation type . Use NoOp to distinguish from range kv for now . <nl> ACTOR static Future < Void > _executeApplyRangeFileToDB ( Database cx , Reference < Rest <nl> } <nl> <nl> } <nl> + * / <nl> <nl> <nl> + / * <nl> <nl> ACTOR static Future < Void > prepareRestore ( Database cx , Reference < ReadYourWritesTransaction > tr , Key tagName , Key backupURL , <nl> Version restoreVersion , Key addPrefix , Key removePrefix , KeyRange restoreRange , bool lockDB , UID uid , <nl> ACTOR static Future < Void > prepareRestore ( Database cx , Reference < ReadYourWritesTr <nl> <nl> return Void ( ) ; <nl> } <nl> + * / <nl> <nl> / / ACTOR static Future < Void > _executeMX ( Database cx , Reference < Task > task , UID uid , RestoreRequest request ) is rename to this function <nl> + / * <nl> ACTOR static Future < Void > extractBackupData ( Database cx , Reference < RestoreConfig > restore_input , UID uid , RestoreRequest request ) { <nl> state Reference < ReadYourWritesTransaction > tr ( new ReadYourWritesTransaction ( cx ) ) ; <nl> state Reference < RestoreConfig > restore = restore_input ; <nl> ACTOR static Future < Void > prepareRestore ( Database cx , Reference < ReadYourWritesTr <nl> <nl> return Void ( ) ; <nl> } <nl> + * / <nl> + <nl> <nl> ACTOR static Future < Version > restoreMX ( RestoreCommandInterface interf , Reference < RestoreData > restoreData , Database cx , RestoreRequest request ) { <nl> state Key tagName = request . tagName ; <nl> ACTOR static Future < Version > restoreMX ( RestoreCommandInterface interf , Reference <nl> wait ( collectBackupFiles ( restoreData , cx , request ) ) ; <nl> printBackupFilesInfo ( restoreData ) ; <nl> <nl> - wait ( distributeWorkload ( interf , restoreData , cx , request ) ) ; <nl> + wait ( distributeWorkload ( interf , restoreData , cx , request , restoreConfig ) ) ; <nl> + <nl> + <nl> <nl> / * <nl> / / prepareRestore will set the restoreConfig based on the other input parameters <nl> ACTOR static Future < Version > restoreMX ( RestoreCommandInterface interf , Reference <nl> / / MX : Now execute the restore : Step 1 get the restore files ( range and mutation log ) name <nl> / / At the end of extractBackupData , we apply the mutation to DB <nl> / / wait ( extractBackupData ( cx , restoreConfig , randomUid , request ) ) ; <nl> - wait ( extractRestoreFileToMutations ( cx , restoreData - > files , request , restoreConfig , randomUid ) ) ; <nl> - wait ( sanityCheckRestoreOps ( cx , randomUid ) ) ; <nl> - wait ( applyRestoreOpsToDB ( cx ) ) ; <nl> + / / wait ( extractRestoreFileToMutations ( cx , restoreData - > files , request , restoreConfig , randomUid ) ) ; <nl> + / / wait ( sanityCheckRestoreOps ( restoreData , cx , randomUid ) ) ; <nl> + / / wait ( applyRestoreOpsToDB ( restoreData , cx ) ) ; <nl> <nl> printf ( " Finish my restore now ! \ n " ) ; <nl> <nl> struct cmpForKVOps { <nl> } ; <nl> <nl> <nl> - / / Helper class for reading restore data from a buffer and throwing the right errors . <nl> - struct StringRefReaderMX { <nl> - StringRefReaderMX ( StringRef s = StringRef ( ) , Error e = Error ( ) ) : rptr ( s . begin ( ) ) , end ( s . end ( ) ) , failure_error ( e ) { } <nl> - <nl> - / / Return remainder of data as a StringRef <nl> - StringRef remainder ( ) { <nl> - return StringRef ( rptr , end - rptr ) ; <nl> - } <nl> - <nl> - / / Return a pointer to len bytes at the current read position and advance read pos <nl> - / / Consume a little - Endian data . Since we only run on little - Endian machine , the data on storage is little Endian <nl> - const uint8_t * consume ( unsigned int len ) { <nl> - if ( rptr = = end & & len ! = 0 ) <nl> - throw end_of_stream ( ) ; <nl> - const uint8_t * p = rptr ; <nl> - rptr + = len ; <nl> - if ( rptr > end ) <nl> - throw failure_error ; <nl> - return p ; <nl> - } <nl> - <nl> - / / Return a T from the current read position and advance read pos <nl> - template < typename T > const T consume ( ) { <nl> - return * ( const T * ) consume ( sizeof ( T ) ) ; <nl> - } <nl> - <nl> - / / Functions for consuming big endian ( network byte order ) integers . <nl> - / / Consumes a big endian number , swaps it to little endian , and returns it . <nl> - const int32_t consumeNetworkInt32 ( ) { return ( int32_t ) bigEndian32 ( ( uint32_t ) consume < int32_t > ( ) ) ; } <nl> - const uint32_t consumeNetworkUInt32 ( ) { return bigEndian32 ( consume < uint32_t > ( ) ) ; } <nl> - <nl> - const int64_t consumeNetworkInt64 ( ) { return ( int64_t ) bigEndian64 ( ( uint32_t ) consume < int64_t > ( ) ) ; } <nl> - const uint64_t consumeNetworkUInt64 ( ) { return bigEndian64 ( consume < uint64_t > ( ) ) ; } <nl> - <nl> - bool eof ( ) { return rptr = = end ; } <nl> - <nl> - const uint8_t * rptr , * end ; <nl> - Error failure_error ; <nl> - } ; <nl> <nl> / / mmmmmm - Helper functions <nl> std : : string getHexString ( StringRef input ) { <nl> void printBackupLogKeyHex ( Standalone < StringRef > key_input , std : : string prefix ) { <nl> printf ( " mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - \ n " ) ; <nl> } <nl> <nl> - void printKVOps ( ) { <nl> + void printKVOps ( Reference < RestoreData > rd ) { <nl> std : : string typeStr = " MSet " ; <nl> - TraceEvent ( " PrintKVOPs " ) . detail ( " MapSize " , kvOps . size ( ) ) ; <nl> - printf ( " PrintKVOPs num_of_version : % d \ n " , kvOps . size ( ) ) ; <nl> - for ( auto it = kvOps . begin ( ) ; it ! = kvOps . end ( ) ; + + it ) { <nl> + TraceEvent ( " PrintKVOPs " ) . detail ( " MapSize " , rd - > kvOps . size ( ) ) ; <nl> + printf ( " PrintKVOPs num_of_version : % d \ n " , rd - > kvOps . size ( ) ) ; <nl> + for ( auto it = rd - > kvOps . begin ( ) ; it ! = rd - > kvOps . end ( ) ; + + it ) { <nl> TraceEvent ( " PrintKVOPs \ t " ) . detail ( " Version " , it - > first ) . detail ( " OpNum " , it - > second . size ( ) ) ; <nl> printf ( " PrintKVOPs Version : % 08lx num_of_ops : % d \ n " , it - > first , it - > second . size ( ) ) ; <nl> for ( auto m = it - > second . begin ( ) ; m ! = it - > second . end ( ) ; + + m ) { <nl> void printKVOps ( ) { <nl> } <nl> <nl> / / Sanity check if KVOps is sorted <nl> - bool isKVOpsSorted ( ) { <nl> + bool isKVOpsSorted ( Reference < RestoreData > rd ) { <nl> bool ret = true ; <nl> - auto prev = kvOps . begin ( ) ; <nl> - for ( auto it = kvOps . begin ( ) ; it ! = kvOps . end ( ) ; + + it ) { <nl> + auto prev = rd - > kvOps . begin ( ) ; <nl> + for ( auto it = rd - > kvOps . begin ( ) ; it ! = rd - > kvOps . end ( ) ; + + it ) { <nl> if ( prev - > first > it - > first ) { <nl> ret = false ; <nl> break ; <nl> bool isKVOpsSorted ( ) { <nl> return ret ; <nl> } <nl> <nl> - bool allOpsAreKnown ( ) { <nl> + bool allOpsAreKnown ( Reference < RestoreData > rd ) { <nl> bool ret = true ; <nl> - for ( auto it = kvOps . begin ( ) ; it ! = kvOps . end ( ) ; + + it ) { <nl> + for ( auto it = rd - > kvOps . begin ( ) ; it ! = rd - > kvOps . end ( ) ; + + it ) { <nl> for ( auto m = it - > second . begin ( ) ; m ! = it - > second . end ( ) ; + + m ) { <nl> if ( m - > type = = MutationRef : : SetValue | | m - > type = = MutationRef : : ClearRange ) <nl> continue ; <nl> bool allOpsAreKnown ( ) { <nl> <nl> <nl> / / version_input is the file version <nl> - void registerBackupMutation ( Standalone < StringRef > val_input , Version file_version ) { <nl> + void registerBackupMutation ( Reference < RestoreData > rd , Standalone < StringRef > val_input , Version file_version ) { <nl> std : : string prefix = " | | \ t " ; <nl> std : : stringstream ss ; <nl> const int version_size = 12 ; <nl> void registerBackupMutation ( Standalone < StringRef > val_input , Version file_versio <nl> uint32_t val_length_decode = reader . consume < uint32_t > ( ) ; <nl> count_size + = 4 ; <nl> <nl> - if ( kvOps . find ( file_version ) = = kvOps . end ( ) ) { <nl> + if ( rd - > kvOps . find ( file_version ) = = rd - > kvOps . end ( ) ) { <nl> / / kvOps . insert ( std : : make_pair ( rangeFile . version , Standalone < VectorRef < MutationRef > > ( VectorRef < MutationRef > ( ) ) ) ) ; <nl> - kvOps . insert ( std : : make_pair ( file_version , VectorRef < MutationRef > ( ) ) ) ; <nl> + rd - > kvOps . insert ( std : : make_pair ( file_version , VectorRef < MutationRef > ( ) ) ) ; <nl> } <nl> <nl> printf ( " mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - Register Backup Mutation into KVOPs version : % 08lx \ n " , file_version ) ; <nl> void registerBackupMutation ( Standalone < StringRef > val_input , Version file_versio <nl> count_size + = 4 * 3 + kLen + vLen ; <nl> <nl> MutationRef m ( ( MutationRef : : Type ) type , KeyRef ( k , kLen ) , KeyRef ( v , vLen ) ) ; / / ASSUME : all operation in range file is set . <nl> - kvOps [ file_version ] . push_back_deep ( kvOps [ file_version ] . arena ( ) , m ) ; <nl> + rd - > kvOps [ file_version ] . push_back_deep ( rd - > kvOps [ file_version ] . arena ( ) , m ) ; <nl> <nl> / / if ( kLen < 0 | | kLen > val . size ( ) | | vLen < 0 | | vLen > val . size ( ) ) { <nl> / / printf ( " % s [ PARSE ERROR ] ! ! ! ! kLen : % d ( 0x % 04x ) vLen : % d ( 0x % 04x ) \ n " , prefix . c_str ( ) , kLen , kLen , vLen , vLen ) ; <nl> void registerBackupMutation ( Standalone < StringRef > val_input , Version file_versio <nl> / / printf ( " mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - \ n " ) ; <nl> } <nl> <nl> + <nl> + / / TO BE DELETED <nl> / / key_input format : [ logRangeMutation . first ] [ hash_value_of_commit_version : 1B ] [ bigEndian64 ( commitVersion ) ] [ bigEndian32 ( part ) ] <nl> + / * <nl> void concatenateBackupMutation ( Standalone < StringRef > val_input , Standalone < StringRef > key_input ) { <nl> std : : string prefix = " | | \ t " ; <nl> std : : stringstream ss ; <nl> void concatenateBackupMutation ( Standalone < StringRef > val_input , Standalone < Strin <nl> mutationPartMap [ id ] = part ; <nl> } <nl> } <nl> + * / <nl> + <nl> + / / key_input format : [ logRangeMutation . first ] [ hash_value_of_commit_version : 1B ] [ bigEndian64 ( commitVersion ) ] [ bigEndian32 ( part ) ] <nl> + bool concatenateBackupMutationForLogFile ( Reference < RestoreData > rd , Standalone < StringRef > val_input , Standalone < StringRef > key_input ) { <nl> + std : : string prefix = " | | \ t " ; <nl> + std : : stringstream ss ; <nl> + const int version_size = 12 ; <nl> + const int header_size = 12 ; <nl> + StringRef val = val_input . contents ( ) ; <nl> + StringRefReaderMX reader ( val , restore_corrupted_data ( ) ) ; <nl> + StringRefReaderMX readerKey ( key_input , restore_corrupted_data ( ) ) ; / / read key_input ! <nl> + int logRangeMutationFirstLength = key_input . size ( ) - 1 - 8 - 4 ; <nl> + bool concatenated = false ; <nl> + <nl> + if ( logRangeMutationFirstLength < 0 ) { <nl> + printf ( " [ ERROR ] ! ! ! logRangeMutationFirstLength : % d < 0 , key_input . size : % d \ n " , logRangeMutationFirstLength , key_input . size ( ) ) ; <nl> + } <nl> + <nl> + if ( debug_verbose ) { <nl> + printf ( " [ DEBUG ] Process key_input : % s \ n " , getHexKey ( key_input , logRangeMutationFirstLength ) . c_str ( ) ) ; <nl> + } <nl> + <nl> + / / PARSE key <nl> + Standalone < StringRef > id_old = key_input . substr ( 0 , key_input . size ( ) - 4 ) ; / / Used to sanity check the decoding of key is correct <nl> + Standalone < StringRef > partStr = key_input . substr ( key_input . size ( ) - 4 , 4 ) ; / / part <nl> + StringRefReaderMX readerPart ( partStr , restore_corrupted_data ( ) ) ; <nl> + uint32_t part_direct = readerPart . consumeNetworkUInt32 ( ) ; / / Consume a bigEndian value <nl> + if ( debug_verbose ) { <nl> + printf ( " [ DEBUG ] Process prefix : % s and partStr : % s part_direct : % 08x fromm key_input : % s , size : % d \ n " , <nl> + getHexKey ( id_old , logRangeMutationFirstLength ) . c_str ( ) , <nl> + getHexString ( partStr ) . c_str ( ) , <nl> + part_direct , <nl> + getHexKey ( key_input , logRangeMutationFirstLength ) . c_str ( ) , <nl> + key_input . size ( ) ) ; <nl> + } <nl> + <nl> + StringRef longRangeMutationFirst ; <nl> + <nl> + if ( logRangeMutationFirstLength > 0 ) { <nl> + printf ( " readerKey consumes % dB \ n " , logRangeMutationFirstLength ) ; <nl> + longRangeMutationFirst = StringRef ( readerKey . consume ( logRangeMutationFirstLength ) , logRangeMutationFirstLength ) ; <nl> + } <nl> + <nl> + uint8_t hashValue = readerKey . consume < uint8_t > ( ) ; <nl> + uint64_t commitVersion = readerKey . consumeNetworkUInt64 ( ) ; / / Consume big Endian value encoded in log file , commitVersion is in littleEndian <nl> + uint64_t commitVersionBE = bigEndian64 ( commitVersion ) ; <nl> + uint32_t part = readerKey . consumeNetworkUInt32 ( ) ; / / Consume big Endian value encoded in log file <nl> + uint32_t partBE = bigEndian32 ( part ) ; <nl> + Standalone < StringRef > id2 = longRangeMutationFirst . withSuffix ( StringRef ( & hashValue , 1 ) ) . withSuffix ( StringRef ( ( uint8_t * ) & commitVersion , 8 ) ) ; <nl> + <nl> + / / Use commitVersion as id <nl> + Standalone < StringRef > id = StringRef ( ( uint8_t * ) & commitVersion , 8 ) ; <nl> + <nl> + if ( debug_verbose ) { <nl> + printf ( " [ DEBUG ] key_input_size : % d longRangeMutationFirst : % s hashValue : % 02x commitVersion : % 016lx ( BigEndian : % 016lx ) part : % 08x ( BigEndian : % 08x ) , part_direct : % 08x mutationMap . size : % d \ n " , <nl> + key_input . size ( ) , longRangeMutationFirst . printable ( ) . c_str ( ) , hashValue , <nl> + commitVersion , commitVersionBE , <nl> + part , partBE , <nl> + part_direct , rd - > mutationMap . size ( ) ) ; <nl> + } <nl> + <nl> + if ( rd - > mutationMap . find ( id ) = = rd - > mutationMap . end ( ) ) { <nl> + rd - > mutationMap . insert ( std : : make_pair ( id , val_input ) ) ; <nl> + if ( part_direct ! = 0 ) { <nl> + printf ( " [ ERROR ] ! ! ! part : % d ! = 0 for key_input : % s \ n " , part , getHexString ( key_input ) . c_str ( ) ) ; <nl> + } <nl> + rd - > mutationPartMap . insert ( std : : make_pair ( id , part ) ) ; <nl> + } else { / / concatenate the val string <nl> + printf ( " [ INFO ] Concatenate the log ' s val string at version : % ld \ n " , id . toString ( ) . c_str ( ) ) ; <nl> + rd - > mutationMap [ id ] = rd - > mutationMap [ id ] . contents ( ) . withSuffix ( val_input . contents ( ) ) ; / / Assign the new Areana to the map ' s value <nl> + if ( part_direct ! = ( rd - > mutationPartMap [ id ] + 1 ) ) { <nl> + printf ( " [ ERROR ] ! ! ! current part id : % d new part_direct : % d is not the next integer of key_input : % s \ n " , rd - > mutationPartMap [ id ] , part_direct , getHexString ( key_input ) . c_str ( ) ) ; <nl> + } <nl> + if ( part_direct ! = part ) { <nl> + printf ( " part_direct : % 08x ! = part : % 08x \ n " , part_direct , part ) ; <nl> + } <nl> + rd - > mutationPartMap [ id ] = part ; <nl> + concatenated = true ; <nl> + } <nl> + <nl> + return concatenated ; <nl> + } <nl> + <nl> + <nl> + / / TO BE DELETED <nl> + / * <nl> <nl> void registerBackupMutationForAll ( Version empty ) { <nl> std : : string prefix = " | | \ t " ; <nl> void registerBackupMutationForAll ( Version empty ) { <nl> printf ( " [ INFO ] All mutation log files produces % d mutation operations \ n " , kvCount ) ; <nl> <nl> } <nl> + * / <nl> + <nl> + <nl> + / / TODO : WiP : send to applier the mutations <nl> + ACTOR Future < Void > registerMutationsToApplier ( Reference < RestoreData > rd ) { <nl> + printf ( " [ INFO ] [ Loader ] Node : % s rd - > masterApplier : % s , hasApplierInterface : % d \ n " , <nl> + rd - > getNodeID ( ) . c_str ( ) , rd - > masterApplier . toString ( ) . c_str ( ) , <nl> + rd - > workers_interface . find ( rd - > masterApplier ) ! = rd - > workers_interface . end ( ) ) ; <nl> + state RestoreCommandInterface applierCmdInterf = rd - > workers_interface [ rd - > masterApplier ] ; <nl> + state int packMutationNum = 0 ; <nl> + state int packMutationThreshold = 1 ; <nl> + state int kvCount = 0 ; <nl> + state std : : vector < Future < RestoreCommandReply > > cmdReplies ; <nl> + <nl> + state std : : map < Version , Standalone < VectorRef < MutationRef > > > : : iterator kvOp ; <nl> + for ( kvOp = rd - > kvOps . begin ( ) ; kvOp ! = rd - > kvOps . end ( ) ; kvOp + + ) { <nl> + state uint64_t commitVersion = kvOp - > first ; <nl> + state int mIndex ; <nl> + state MutationRef kvm ; <nl> + for ( mIndex = 0 ; mIndex < kvOp - > second . size ( ) ; mIndex + + ) { <nl> + kvm = kvOp - > second [ mIndex ] ; <nl> + / / Send the mutation to applier <nl> + cmdReplies . push_back ( applierCmdInterf . cmd . getReply ( RestoreCommand ( RestoreCommandEnum : : Loader_Send_Mutations_To_Applier , rd - > masterApplier , commitVersion , kvm ) ) ) ; <nl> + <nl> + packMutationNum + + ; <nl> + kvCount + + ; <nl> + if ( packMutationNum > = packMutationThreshold ) { <nl> + ASSERT ( packMutationNum = = packMutationThreshold ) ; <nl> + / / printf ( " [ INFO ] [ Loader ] Waits for applier to receive % d mutations \ n " , cmdReplies . size ( ) ) ; <nl> + std : : vector < RestoreCommandReply > reps = wait ( getAll ( cmdReplies ) ) ; <nl> + cmdReplies . clear ( ) ; <nl> + packMutationNum = 0 ; <nl> + } <nl> + } <nl> + <nl> + } <nl> + <nl> + if ( ! cmdReplies . empty ( ) ) { <nl> + std : : vector < RestoreCommandReply > reps = wait ( getAll ( cmdReplies ) ) ; <nl> + cmdReplies . clear ( ) ; <nl> + } <nl> + printf ( " [ INFO ] [ Loader ] Node : % s produces % d mutation operations \ n " , rd - > getNodeID ( ) . c_str ( ) , kvCount ) ; <nl> + <nl> + return Void ( ) ; <nl> + } <nl> + <nl> <nl> + ACTOR Future < Void > notifyApplierToApplyMutations ( Reference < RestoreData > rd ) { <nl> + printf ( " [ INFO ] [ Loader ] Node : % s rd - > masterApplier : % s , hasApplierInterface : % d \ n " , <nl> + rd - > getNodeID ( ) . c_str ( ) , rd - > masterApplier . toString ( ) . c_str ( ) , <nl> + rd - > workers_interface . find ( rd - > masterApplier ) ! = rd - > workers_interface . end ( ) ) ; <nl> + state RestoreCommandInterface applierCmdInterf = rd - > workers_interface [ rd - > masterApplier ] ; <nl> + state int packMutationNum = 0 ; <nl> + state int packMutationThreshold = 1 ; <nl> + state int kvCount = 0 ; <nl> + state std : : vector < Future < RestoreCommandReply > > cmdReplies ; <nl> <nl> + cmdReplies . push_back ( applierCmdInterf . cmd . getReply ( RestoreCommand ( RestoreCommandEnum : : Loader_Notify_Appler_To_Apply_Mutation , rd - > masterApplier ) ) ) ; <nl> + std : : vector < RestoreCommandReply > reps = wait ( getAll ( cmdReplies ) ) ; <nl> <nl> + printf ( " [ INFO ] [ Loader ] Node : % s finish Loader_Notify_Appler_To_Apply_Mutation cmd \ n " , rd - > getNodeID ( ) . c_str ( ) ) ; <nl> + <nl> + return Void ( ) ; <nl> + } <nl> <nl> <nl> <nl> mmm a / fdbserver / RestoreInterface . h <nl> ppp b / fdbserver / RestoreInterface . h <nl> <nl> <nl> # include < sstream > <nl> # include " fdbclient / FDBTypes . h " <nl> + # include " fdbclient / CommitTransaction . h " <nl> / / # include " fdbclient / NativeAPI . h " / / MX : Cannot have NativeAPI . h in this . h <nl> # include " fdbrpc / fdbrpc . h " <nl> # include " fdbserver / CoordinationInterface . h " <nl> struct RestoreCommandInterface { <nl> <nl> enum class RestoreCommandEnum { Set_Role = 0 , Set_Role_Done , Assign_Applier_KeyRange = 2 , Assign_Applier_KeyRange_Done , <nl> Assign_Loader_Range_File = 4 , Assign_Loader_Log_File = 5 , Assign_Loader_File_Done = 6 , <nl> - Loader_Send_Mutations_To_Applier = 7 , Loader_Send_Mutations_To_Applier_Done = 8 } ; <nl> + Loader_Send_Mutations_To_Applier = 7 , Loader_Send_Mutations_To_Applier_Done = 8 , <nl> + Apply_Mutation_To_DB = 9 , Apply_Mutation_To_DB_Skip = 10 , <nl> + Loader_Notify_Appler_To_Apply_Mutation = 11 } ; <nl> BINARY_SERIALIZABLE ( RestoreCommandEnum ) ; <nl> struct RestoreCommand { <nl> RestoreCommandEnum cmd ; / / 0 : set role , - 1 : end of the command stream <nl> int64_t cmdIndex ; / / monotonically increase index ( for loading commands ) <nl> UID id ; / / Node id that will receive the command <nl> + UID masterApplier ; <nl> RestoreRole role ; / / role of the command ; <nl> KeyRange keyRange ; <nl> + uint64_t commitVersion ; <nl> + MutationRef mutation ; <nl> + <nl> <nl> struct LoadingParam { <nl> Key url ; <nl> struct RestoreCommand { <nl> std : : string filename ; <nl> int64_t offset ; <nl> int64_t length ; <nl> + int64_t blockSize ; <nl> KeyRange restoreRange ; <nl> Key addPrefix ; <nl> Key removePrefix ; <nl> + Key mutationLogPrefix ; <nl> <nl> template < class Ar > <nl> void serialize ( Ar & ar ) { <nl> - ar & url & version & filename & offset & length & restoreRange & addPrefix & removePrefix ; <nl> + ar & url & version & filename & offset & length & blockSize & restoreRange & addPrefix & removePrefix & mutationLogPrefix ; <nl> } <nl> <nl> std : : string toString ( ) { <nl> std : : stringstream str ; <nl> str < < " url : " < < url . toString ( ) < < " version : " < < version <nl> - < < " filename : " < < filename < < " offset : " < < offset < < " length : " < < length <nl> + < < " filename : " < < filename < < " offset : " < < offset < < " length : " < < length < < " blockSize : " < < blockSize <nl> < < " restoreRange : " < < restoreRange . toString ( ) <nl> < < " addPrefix : " < < addPrefix . toString ( ) < < " removePrefix : " < < removePrefix . toString ( ) ; <nl> return str . str ( ) ; <nl> struct RestoreCommand { <nl> explicit RestoreCommand ( RestoreCommandEnum cmd , UID id ) : cmd ( cmd ) , id ( id ) { } ; <nl> explicit RestoreCommand ( RestoreCommandEnum cmd , UID id , int64_t cmdIndex ) : cmd ( cmd ) , id ( id ) , cmdIndex ( cmdIndex ) { } ; <nl> explicit RestoreCommand ( RestoreCommandEnum cmd , UID id , RestoreRole role ) : cmd ( cmd ) , id ( id ) , role ( role ) { } <nl> + explicit RestoreCommand ( RestoreCommandEnum cmd , UID id , RestoreRole role , UID masterApplier ) : cmd ( cmd ) , id ( id ) , role ( role ) , masterApplier ( masterApplier ) { } / / Temporary when we use masterApplier to apply mutations <nl> explicit RestoreCommand ( RestoreCommandEnum cmd , UID id , KeyRange keyRange ) : cmd ( cmd ) , id ( id ) , keyRange ( keyRange ) { } ; <nl> explicit RestoreCommand ( RestoreCommandEnum cmd , UID id , int64_t cmdIndex , LoadingParam loadingParam ) : cmd ( cmd ) , id ( id ) , cmdIndex ( cmdIndex ) , loadingParam ( loadingParam ) { } ; <nl> + / / For loader send mutation to applier <nl> + explicit RestoreCommand ( RestoreCommandEnum cmd , UID id , uint64_t commitVersion , struct MutationRef mutation ) : cmd ( cmd ) , id ( id ) , commitVersion ( commitVersion ) , mutation ( mutation ) { } ; <nl> <nl> template < class Ar > <nl> void serialize ( Ar & ar ) { <nl> - ar & cmd & cmdIndex & id & role & keyRange & loadingParam & reply ; <nl> + ar & cmd & cmdIndex & id & masterApplier & role & keyRange & commitVersion & mutation & loadingParam & reply ; <nl> } <nl> } ; <nl> typedef RestoreCommand : : LoadingParam LoadingParam ; <nl>
FastRestore : Parallel loader , single applier done
apple/foundationdb
98a2a2a8bab90d596f6cc601776e1787b422cbed
2019-01-10T22:05:14Z
mmm a / tensorflow / compiler / tf2tensorrt / convert / convert_nodes_test . cc <nl> ppp b / tensorflow / compiler / tf2tensorrt / convert / convert_nodes_test . cc <nl> INSTANTIATE_TEST_CASE_P ( <nl> <nl> / / Builds and runs the converted network . Checks output tensor shape . Tests <nl> / / output values using a matcher . <nl> - template < DataType dtype > <nl> + template < DataType input_dtype , DataType output_dtype > <nl> void BuildAndRunConvertedNetwork ( const string & name , OpConverterTest * test , <nl> const TestParamBase & p , <nl> const std : : vector < float > & input_vec , <nl> void BuildAndRunConvertedNetwork ( const string & name , OpConverterTest * test , <nl> / / runtime errors . <nl> return ; <nl> } <nl> - typedef typename EnumToDataType < dtype > : : Type T ; <nl> + typedef typename EnumToDataType < input_dtype > : : Type Tin ; <nl> TensorShape shape ; <nl> TF_EXPECT_OK ( TensorShapeUtils : : MakeShape ( p . input_dims , & shape ) ) ; <nl> const DataVec input_data { <nl> - { " input " , test - > AsTensor < T > ( CastTestVector < float , T > ( input_vec ) , shape ) } } ; <nl> - DataVec output_data { { name , test - > ConstructTensor < T > ( 6 ) } } ; <nl> + { " input " , <nl> + test - > AsTensor < Tin > ( CastTestVector < float , Tin > ( input_vec ) , shape ) } } ; <nl> + typedef typename EnumToDataType < output_dtype > : : Type Tout ; <nl> + DataVec output_data { { name , test - > ConstructTensor < Tout > ( 6 ) } } ; <nl> test - > BuildAndRun ( input_data , & output_data ) ; <nl> / / Check the shape of the actual output tensor <nl> TF_EXPECT_OK ( TensorShapeUtils : : MakeShape ( p . expected_output_dims , & shape ) ) ; <nl> void BuildAndRunConvertedNetwork ( const string & name , OpConverterTest * test , <nl> < < " Expected shape : " < < shape . DebugString ( ) < < " , actual shape " <nl> < < output_data [ 0 ] . tensor . shape ( ) . DebugString ( ) ; <nl> / / Cast the output to float and compare to expected output <nl> - auto out_span = GetSpanForData < T > ( output_data [ 0 ] ) ; <nl> + auto out_span = GetSpanForData < Tout > ( output_data [ 0 ] ) ; <nl> std : : vector < float > casted_output ( out_span . begin ( ) , out_span . end ( ) ) ; <nl> EXPECT_THAT ( casted_output , matcher ) ; <nl> } <nl> void InstantiateBuildAndRun ( DataType tf_dtype , const string & name , <nl> const std : : vector < float > & input_vec , <nl> const Matcher < std : : vector < float > > & matcher ) { <nl> if ( tf_dtype = = DT_FLOAT ) { <nl> - BuildAndRunConvertedNetwork < DT_FLOAT > ( name , test , p , input_vec , matcher ) ; <nl> + BuildAndRunConvertedNetwork < DT_FLOAT , DT_FLOAT > ( name , test , p , input_vec , <nl> + matcher ) ; <nl> } else if ( tf_dtype = = DT_HALF ) { <nl> - BuildAndRunConvertedNetwork < DT_HALF > ( name , test , p , input_vec , matcher ) ; <nl> + BuildAndRunConvertedNetwork < DT_HALF , DT_HALF > ( name , test , p , input_vec , <nl> + matcher ) ; <nl> } else if ( tf_dtype = = DT_INT32 ) { <nl> - BuildAndRunConvertedNetwork < DT_INT32 > ( name , test , p , input_vec , matcher ) ; <nl> + BuildAndRunConvertedNetwork < DT_INT32 , DT_INT32 > ( name , test , p , input_vec , <nl> + matcher ) ; <nl> } else { <nl> FAIL ( ) < < " Test not supported for " < < tf_dtype ; <nl> } <nl> } <nl> <nl> + void InstantiateBuildAndRun ( DataType input_tf_dtype , DataType output_tf_dtype , <nl> + const string & name , OpConverterTest * test , <nl> + const TestParamBase & p , <nl> + const std : : vector < float > & input_vec , <nl> + const Matcher < std : : vector < float > > & matcher ) { <nl> + if ( input_tf_dtype = = output_tf_dtype ) { <nl> + InstantiateBuildAndRun ( input_tf_dtype , name , test , p , input_vec , matcher ) ; <nl> + } else if ( input_tf_dtype = = DT_HALF & & output_tf_dtype ) { <nl> + BuildAndRunConvertedNetwork < DT_HALF , DT_FLOAT > ( name , test , p , input_vec , <nl> + matcher ) ; <nl> + } else { <nl> + FAIL ( ) < < " Test not supported for input " < < input_tf_dtype < < " output " <nl> + < < output_tf_dtype ; <nl> + } <nl> + } <nl> + <nl> template < typename T > <nl> void CopyTensorElements ( const Tensor & tensor , protobuf : : RepeatedField < T > * out ) { <nl> out - > Clear ( ) ; <nl>
[ TF : TRT ] Enhance InstantiateBuildAndRun to support the case where the input
tensorflow/tensorflow
f40a063d84df3f4e0ed2a2fc78d8b79f203a03b4
2020-05-18T14:49:55Z
mmm a / build / Dockerfile <nl> ppp b / build / Dockerfile <nl> RUN cd / tmp & & curl - L https : / / www . openssl . org / source / openssl - 1 . 1 . 1d . tar . gz - o o <nl> ln - sv / usr / local / lib64 / lib * . so . 1 . 1 / usr / lib64 / & & \ <nl> cd / tmp / & & rm - rf / tmp / openssl - 1 . 1 . 1d / tmp / openssl . tar . gz <nl> <nl> + # install llvm <nl> + WORKDIR / tmp <nl> + RUN cd / tmp & & curl - L https : / / github . com / llvm / llvm - project / releases / download / llvmorg - 10 . 0 . 0 / llvm - project - 10 . 0 . 0 . tar . xz - o llvm . tar . xz & & \ <nl> + echo " 6287a85f4a6aeb07dbffe27847117fe311ada48005f2b00241b523fe7b60716e llvm . tar . xz " > llvm - sha . txt & & \ <nl> + sha256sum - c llvm - sha . txt & & tar xf llvm . tar . xz - - no - same - owner & & \ <nl> + mkdir / tmp / llvm - project - 10 . 0 . 0 / build & & cd / tmp / llvm - project - 10 . 0 . 0 / build & & \ <nl> + scl enable devtoolset - 8 rh - python36 - - cmake - G Ninja - DLLVM_ENABLE_PROJECTS = ' clang ; clang - tools - extra ; libcxx ; libcxxabi ; libunwind ; lldb ; compiler - rt ; lld ' - DCMAKE_INSTALL_PREFIX = / usr / local - DCMAKE_BUILD_TYPE = Release . . / llvm & & \ <nl> + scl enable devtoolset - 8 rh - python36 - - ninja install & & \ <nl> + cd / & & rm - rf / tmp / llvm - project - 10 . 0 . 0 <nl> + <nl> LABEL version = 0 . 1 . 12 <nl> ENV DOCKER_IMAGEVER = 0 . 1 . 12 <nl> ENV JAVA_HOME = / usr / lib / jvm / java - 1 . 8 . 0 <nl>
Add LLVM to docker file
apple/foundationdb
20a2fe2785308d8d87f4a31c4ceae65a97386492
2020-04-09T21:20:52Z
mmm a / dbms / src / Dictionaries / HTTPDictionarySource . cpp <nl> ppp b / dbms / src / Dictionaries / HTTPDictionarySource . cpp <nl> HTTPDictionarySource : : HTTPDictionarySource ( <nl> this - > header_entries . emplace_back ( std : : make_tuple ( header_key , header_value ) ) ; <nl> } <nl> } <nl> - <nl> } <nl> <nl> HTTPDictionarySource : : HTTPDictionarySource ( const HTTPDictionarySource & other ) <nl> mmm a / dbms / src / IO / ReadWriteBufferFromHTTP . h <nl> ppp b / dbms / src / IO / ReadWriteBufferFromHTTP . h <nl> namespace detail <nl> if ( ! credentials . getUsername ( ) . empty ( ) ) <nl> credentials . authenticate ( request ) ; <nl> <nl> - LOG_TRACE ( ( & Logger : : get ( " ReadWriteBufferFromHTTP " ) ) , " Sending request to " < < uri . toString ( ) ) ; <nl> + LOG_TRACE ( ( & Logger : : get ( " ReadWriteBufferFromHTTP " ) ) , " Sending request to " < < uri . toString ( ) ) ; <nl> <nl> auto sess = session - > getSession ( ) ; <nl> <nl> mmm a / docs / en / query_language / dicts / external_dicts_dict_sources . md <nl> ppp b / docs / en / query_language / dicts / external_dicts_dict_sources . md <nl> Setting fields : <nl> - ` key ` – Identifiant name used for the header send on the request . <nl> - ` value ` – Value set for a specific identifiant name . <nl> <nl> + <nl> # # ODBC { # dicts - external_dicts_dict_sources - odbc } <nl> <nl> You can use this method to connect any database that has an ODBC driver . <nl>
cosmetic
ClickHouse/ClickHouse
367a0dcdb48f6e6d00f112a7e6507842a7ce69f2
2019-09-25T09:46:48Z
mmm a / src / library_gl . js <nl> ppp b / src / library_gl . js <nl> var LibraryGL = { <nl> glBindBuffer ( target , buffer ) ; <nl> if ( target = = Module . ctx . ARRAY_BUFFER ) { <nl> GL . currArrayBuffer = buffer ; <nl> - if ( GLEmulation . currentVao ) GLEmulation . currentVao . arrayBuffer = buffer ; <nl> + if ( GLEmulation . currentVao ) { <nl> + assert ( GLEmulation . currentVao . arrayBuffer = = buffer | | GLEmulation . currentVao . arrayBuffer = = 0 | | buffer = = 0 , ' TODO : support for multiple array buffers in vao ' ) ; <nl> + GLEmulation . currentVao . arrayBuffer = buffer ; <nl> + } <nl> } else if ( target = = Module . ctx . ELEMENT_ARRAY_BUFFER ) { <nl> GL . currElementArrayBuffer = buffer ; <nl> if ( GLEmulation . currentVao ) GLEmulation . currentVao . elementArrayBuffer = buffer ; <nl>
TODO : multiple array buffers in vao ( for each vertex attrib pointer separately )
emscripten-core/emscripten
7993ab4d6b5ef1eafcc913c2ae1ba4b0d641d1f9
2013-02-20T22:03:31Z
mmm a / Marlin / src / config / default / Configuration . h <nl> ppp b / Marlin / src / config / default / Configuration . h <nl> <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Bed Leveling = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> - / / @ section bedlevel <nl> + / / @ section calibrate <nl> <nl> / * * <nl> * Choose one of the options below to enable G29 Bed Leveling . The parameters <nl> <nl> # define HOMING_FEEDRATE_XY ( 50 * 60 ) <nl> # define HOMING_FEEDRATE_Z ( 4 * 60 ) <nl> <nl> + / / @ section calibrate <nl> + <nl> + / * * <nl> + * Bed Skew Compensation <nl> + * <nl> + * This feature corrects for misalignment in the XYZ axes . <nl> + * <nl> + * Take the following steps to get the bed skew in the XY plane : <nl> + * 1 . Print a test square ( e . g . , https : / / www . thingiverse . com / thing : 2563185 ) <nl> + * 2 . For XY_DIAG_AC measure the diagonal A to C <nl> + * 3 . For XY_DIAG_BD measure the diagonal B to D <nl> + * 4 . For XY_SIDE_AD measure the edge A to D <nl> + * <nl> + * Marlin automatically computes skew factors from these measurements . <nl> + * Skew factors may also be computed and set manually : <nl> + * <nl> + * - Compute AB : SQRT ( 2 * AC * AC + 2 * BD * BD - 4 * AD * AD ) / 2 <nl> + * - XY_SKEW_FACTOR : TAN ( PI / 2 - ACOS ( ( AC * AC - AB * AB - AD * AD ) / ( 2 * AB * AD ) ) ) <nl> + * <nl> + * If desired , follow the same procedure for XZ and YZ . <nl> + * Use these diagrams for reference : <nl> + * <nl> + * Y Z Z <nl> + * ^ Bmmmmmm - C ^ Bmmmmmm - C ^ Bmmmmmm - C <nl> + * | / / | / / | / / <nl> + * | / / | / / | / / <nl> + * | Ammmmmm - D | Ammmmmm - D | Ammmmmm - D <nl> + * + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > Y <nl> + * XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR <nl> + * / <nl> + / / # define SKEW_CORRECTION <nl> + <nl> + # if ENABLED ( SKEW_CORRECTION ) <nl> + / / Input all length measurements here : <nl> + # define XY_DIAG_AC 282 . 8427124746 <nl> + # define XY_DIAG_BD 282 . 8427124746 <nl> + # define XY_SIDE_AD 200 <nl> + <nl> + / / Or , set the default skew factors directly here <nl> + / / to override the above measurements : <nl> + # define XY_SKEW_FACTOR 0 . 0 <nl> + <nl> + / / # define SKEW_CORRECTION_FOR_Z <nl> + # if ENABLED ( SKEW_CORRECTION_FOR_Z ) <nl> + # define XZ_DIAG_AC 282 . 8427124746 <nl> + # define XZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_DIAG_AC 282 . 8427124746 <nl> + # define YZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_SIDE_AD 200 <nl> + # define XZ_SKEW_FACTOR 0 . 0 <nl> + # define YZ_SKEW_FACTOR 0 . 0 <nl> + # endif <nl> + <nl> + / / Enable this option for M852 to set skew at runtime <nl> + / / # define SKEW_CORRECTION_GCODE <nl> + # endif <nl> + <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Additional Features = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> mmm a / Marlin / src / config / examples / AlephObjects / TAZ4 / Configuration . h <nl> ppp b / Marlin / src / config / examples / AlephObjects / TAZ4 / Configuration . h <nl> <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Bed Leveling = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> - / / @ section bedlevel <nl> + / / @ section calibrate <nl> <nl> / * * <nl> * Choose one of the options below to enable G29 Bed Leveling . The parameters <nl> <nl> # define HOMING_FEEDRATE_XY ( 50 * 60 ) <nl> # define HOMING_FEEDRATE_Z ( 8 * 60 ) <nl> <nl> + / / @ section calibrate <nl> + <nl> + / * * <nl> + * Bed Skew Compensation <nl> + * <nl> + * This feature corrects for misalignment in the XYZ axes . <nl> + * <nl> + * Take the following steps to get the bed skew in the XY plane : <nl> + * 1 . Print a test square ( e . g . , https : / / www . thingiverse . com / thing : 2563185 ) <nl> + * 2 . For XY_DIAG_AC measure the diagonal A to C <nl> + * 3 . For XY_DIAG_BD measure the diagonal B to D <nl> + * 4 . For XY_SIDE_AD measure the edge A to D <nl> + * <nl> + * Marlin automatically computes skew factors from these measurements . <nl> + * Skew factors may also be computed and set manually : <nl> + * <nl> + * - Compute AB : SQRT ( 2 * AC * AC + 2 * BD * BD - 4 * AD * AD ) / 2 <nl> + * - XY_SKEW_FACTOR : TAN ( PI / 2 - ACOS ( ( AC * AC - AB * AB - AD * AD ) / ( 2 * AB * AD ) ) ) <nl> + * <nl> + * If desired , follow the same procedure for XZ and YZ . <nl> + * Use these diagrams for reference : <nl> + * <nl> + * Y Z Z <nl> + * ^ Bmmmmmm - C ^ Bmmmmmm - C ^ Bmmmmmm - C <nl> + * | / / | / / | / / <nl> + * | / / | / / | / / <nl> + * | Ammmmmm - D | Ammmmmm - D | Ammmmmm - D <nl> + * + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > Y <nl> + * XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR <nl> + * / <nl> + / / # define SKEW_CORRECTION <nl> + <nl> + # if ENABLED ( SKEW_CORRECTION ) <nl> + / / Input all length measurements here : <nl> + # define XY_DIAG_AC 282 . 8427124746 <nl> + # define XY_DIAG_BD 282 . 8427124746 <nl> + # define XY_SIDE_AD 200 <nl> + <nl> + / / Or , set the default skew factors directly here <nl> + / / to override the above measurements : <nl> + # define XY_SKEW_FACTOR 0 . 0 <nl> + <nl> + / / # define SKEW_CORRECTION_FOR_Z <nl> + # if ENABLED ( SKEW_CORRECTION_FOR_Z ) <nl> + # define XZ_DIAG_AC 282 . 8427124746 <nl> + # define XZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_DIAG_AC 282 . 8427124746 <nl> + # define YZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_SIDE_AD 200 <nl> + # define XZ_SKEW_FACTOR 0 . 0 <nl> + # define YZ_SKEW_FACTOR 0 . 0 <nl> + # endif <nl> + <nl> + / / Enable this option for M852 to set skew at runtime <nl> + / / # define SKEW_CORRECTION_GCODE <nl> + # endif <nl> + <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Additional Features = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> mmm a / Marlin / src / config / examples / AliExpress / CL - 260 / Configuration . h <nl> ppp b / Marlin / src / config / examples / AliExpress / CL - 260 / Configuration . h <nl> <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Bed Leveling = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> - / / @ section bedlevel <nl> + / / @ section calibrate <nl> <nl> / * * <nl> * Choose one of the options below to enable G29 Bed Leveling . The parameters <nl> <nl> # define HOMING_FEEDRATE_XY ( 50 * 60 ) <nl> # define HOMING_FEEDRATE_Z ( 4 * 60 ) <nl> <nl> + / / @ section calibrate <nl> + <nl> + / * * <nl> + * Bed Skew Compensation <nl> + * <nl> + * This feature corrects for misalignment in the XYZ axes . <nl> + * <nl> + * Take the following steps to get the bed skew in the XY plane : <nl> + * 1 . Print a test square ( e . g . , https : / / www . thingiverse . com / thing : 2563185 ) <nl> + * 2 . For XY_DIAG_AC measure the diagonal A to C <nl> + * 3 . For XY_DIAG_BD measure the diagonal B to D <nl> + * 4 . For XY_SIDE_AD measure the edge A to D <nl> + * <nl> + * Marlin automatically computes skew factors from these measurements . <nl> + * Skew factors may also be computed and set manually : <nl> + * <nl> + * - Compute AB : SQRT ( 2 * AC * AC + 2 * BD * BD - 4 * AD * AD ) / 2 <nl> + * - XY_SKEW_FACTOR : TAN ( PI / 2 - ACOS ( ( AC * AC - AB * AB - AD * AD ) / ( 2 * AB * AD ) ) ) <nl> + * <nl> + * If desired , follow the same procedure for XZ and YZ . <nl> + * Use these diagrams for reference : <nl> + * <nl> + * Y Z Z <nl> + * ^ Bmmmmmm - C ^ Bmmmmmm - C ^ Bmmmmmm - C <nl> + * | / / | / / | / / <nl> + * | / / | / / | / / <nl> + * | Ammmmmm - D | Ammmmmm - D | Ammmmmm - D <nl> + * + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > Y <nl> + * XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR <nl> + * / <nl> + / / # define SKEW_CORRECTION <nl> + <nl> + # if ENABLED ( SKEW_CORRECTION ) <nl> + / / Input all length measurements here : <nl> + # define XY_DIAG_AC 282 . 8427124746 <nl> + # define XY_DIAG_BD 282 . 8427124746 <nl> + # define XY_SIDE_AD 200 <nl> + <nl> + / / Or , set the default skew factors directly here <nl> + / / to override the above measurements : <nl> + # define XY_SKEW_FACTOR 0 . 0 <nl> + <nl> + / / # define SKEW_CORRECTION_FOR_Z <nl> + # if ENABLED ( SKEW_CORRECTION_FOR_Z ) <nl> + # define XZ_DIAG_AC 282 . 8427124746 <nl> + # define XZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_DIAG_AC 282 . 8427124746 <nl> + # define YZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_SIDE_AD 200 <nl> + # define XZ_SKEW_FACTOR 0 . 0 <nl> + # define YZ_SKEW_FACTOR 0 . 0 <nl> + # endif <nl> + <nl> + / / Enable this option for M852 to set skew at runtime <nl> + / / # define SKEW_CORRECTION_GCODE <nl> + # endif <nl> + <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Additional Features = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> mmm a / Marlin / src / config / examples / Anet / A6 / Configuration . h <nl> ppp b / Marlin / src / config / examples / Anet / A6 / Configuration . h <nl> <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Bed Leveling = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> - / / @ section bedlevel <nl> + / / @ section calibrate <nl> <nl> / * * <nl> * Choose one of the options below to enable G29 Bed Leveling . The parameters <nl> <nl> # define HOMING_FEEDRATE_XY ( 50 * 60 ) <nl> # define HOMING_FEEDRATE_Z ( 4 * 60 ) <nl> <nl> + / / @ section calibrate <nl> + <nl> + / * * <nl> + * Bed Skew Compensation <nl> + * <nl> + * This feature corrects for misalignment in the XYZ axes . <nl> + * <nl> + * Take the following steps to get the bed skew in the XY plane : <nl> + * 1 . Print a test square ( e . g . , https : / / www . thingiverse . com / thing : 2563185 ) <nl> + * 2 . For XY_DIAG_AC measure the diagonal A to C <nl> + * 3 . For XY_DIAG_BD measure the diagonal B to D <nl> + * 4 . For XY_SIDE_AD measure the edge A to D <nl> + * <nl> + * Marlin automatically computes skew factors from these measurements . <nl> + * Skew factors may also be computed and set manually : <nl> + * <nl> + * - Compute AB : SQRT ( 2 * AC * AC + 2 * BD * BD - 4 * AD * AD ) / 2 <nl> + * - XY_SKEW_FACTOR : TAN ( PI / 2 - ACOS ( ( AC * AC - AB * AB - AD * AD ) / ( 2 * AB * AD ) ) ) <nl> + * <nl> + * If desired , follow the same procedure for XZ and YZ . <nl> + * Use these diagrams for reference : <nl> + * <nl> + * Y Z Z <nl> + * ^ Bmmmmmm - C ^ Bmmmmmm - C ^ Bmmmmmm - C <nl> + * | / / | / / | / / <nl> + * | / / | / / | / / <nl> + * | Ammmmmm - D | Ammmmmm - D | Ammmmmm - D <nl> + * + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > Y <nl> + * XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR <nl> + * / <nl> + / / # define SKEW_CORRECTION <nl> + <nl> + # if ENABLED ( SKEW_CORRECTION ) <nl> + / / Input all length measurements here : <nl> + # define XY_DIAG_AC 282 . 8427124746 <nl> + # define XY_DIAG_BD 282 . 8427124746 <nl> + # define XY_SIDE_AD 200 <nl> + <nl> + / / Or , set the default skew factors directly here <nl> + / / to override the above measurements : <nl> + # define XY_SKEW_FACTOR 0 . 0 <nl> + <nl> + / / # define SKEW_CORRECTION_FOR_Z <nl> + # if ENABLED ( SKEW_CORRECTION_FOR_Z ) <nl> + # define XZ_DIAG_AC 282 . 8427124746 <nl> + # define XZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_DIAG_AC 282 . 8427124746 <nl> + # define YZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_SIDE_AD 200 <nl> + # define XZ_SKEW_FACTOR 0 . 0 <nl> + # define YZ_SKEW_FACTOR 0 . 0 <nl> + # endif <nl> + <nl> + / / Enable this option for M852 to set skew at runtime <nl> + / / # define SKEW_CORRECTION_GCODE <nl> + # endif <nl> + <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Additional Features = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> mmm a / Marlin / src / config / examples / Anet / A8 / Configuration . h <nl> ppp b / Marlin / src / config / examples / Anet / A8 / Configuration . h <nl> <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Bed Leveling = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> - / / @ section bedlevel <nl> + / / @ section calibrate <nl> <nl> / * * <nl> * Choose one of the options below to enable G29 Bed Leveling . The parameters <nl> <nl> # define HOMING_FEEDRATE_XY ( 100 * 60 ) <nl> # define HOMING_FEEDRATE_Z ( 4 * 60 ) <nl> <nl> + / / @ section calibrate <nl> + <nl> + / * * <nl> + * Bed Skew Compensation <nl> + * <nl> + * This feature corrects for misalignment in the XYZ axes . <nl> + * <nl> + * Take the following steps to get the bed skew in the XY plane : <nl> + * 1 . Print a test square ( e . g . , https : / / www . thingiverse . com / thing : 2563185 ) <nl> + * 2 . For XY_DIAG_AC measure the diagonal A to C <nl> + * 3 . For XY_DIAG_BD measure the diagonal B to D <nl> + * 4 . For XY_SIDE_AD measure the edge A to D <nl> + * <nl> + * Marlin automatically computes skew factors from these measurements . <nl> + * Skew factors may also be computed and set manually : <nl> + * <nl> + * - Compute AB : SQRT ( 2 * AC * AC + 2 * BD * BD - 4 * AD * AD ) / 2 <nl> + * - XY_SKEW_FACTOR : TAN ( PI / 2 - ACOS ( ( AC * AC - AB * AB - AD * AD ) / ( 2 * AB * AD ) ) ) <nl> + * <nl> + * If desired , follow the same procedure for XZ and YZ . <nl> + * Use these diagrams for reference : <nl> + * <nl> + * Y Z Z <nl> + * ^ Bmmmmmm - C ^ Bmmmmmm - C ^ Bmmmmmm - C <nl> + * | / / | / / | / / <nl> + * | / / | / / | / / <nl> + * | Ammmmmm - D | Ammmmmm - D | Ammmmmm - D <nl> + * + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > Y <nl> + * XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR <nl> + * / <nl> + / / # define SKEW_CORRECTION <nl> + <nl> + # if ENABLED ( SKEW_CORRECTION ) <nl> + / / Input all length measurements here : <nl> + # define XY_DIAG_AC 282 . 8427124746 <nl> + # define XY_DIAG_BD 282 . 8427124746 <nl> + # define XY_SIDE_AD 200 <nl> + <nl> + / / Or , set the default skew factors directly here <nl> + / / to override the above measurements : <nl> + # define XY_SKEW_FACTOR 0 . 0 <nl> + <nl> + / / # define SKEW_CORRECTION_FOR_Z <nl> + # if ENABLED ( SKEW_CORRECTION_FOR_Z ) <nl> + # define XZ_DIAG_AC 282 . 8427124746 <nl> + # define XZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_DIAG_AC 282 . 8427124746 <nl> + # define YZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_SIDE_AD 200 <nl> + # define XZ_SKEW_FACTOR 0 . 0 <nl> + # define YZ_SKEW_FACTOR 0 . 0 <nl> + # endif <nl> + <nl> + / / Enable this option for M852 to set skew at runtime <nl> + / / # define SKEW_CORRECTION_GCODE <nl> + # endif <nl> + <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Additional Features = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> mmm a / Marlin / src / config / examples / Azteeg / X5GT / Configuration . h <nl> ppp b / Marlin / src / config / examples / Azteeg / X5GT / Configuration . h <nl> <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Bed Leveling = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> - / / @ section bedlevel <nl> + / / @ section calibrate <nl> <nl> / * * <nl> * Choose one of the options below to enable G29 Bed Leveling . The parameters <nl> <nl> # define HOMING_FEEDRATE_XY ( 50 * 60 ) <nl> # define HOMING_FEEDRATE_Z ( 4 * 60 ) <nl> <nl> + / / @ section calibrate <nl> + <nl> + / * * <nl> + * Bed Skew Compensation <nl> + * <nl> + * This feature corrects for misalignment in the XYZ axes . <nl> + * <nl> + * Take the following steps to get the bed skew in the XY plane : <nl> + * 1 . Print a test square ( e . g . , https : / / www . thingiverse . com / thing : 2563185 ) <nl> + * 2 . For XY_DIAG_AC measure the diagonal A to C <nl> + * 3 . For XY_DIAG_BD measure the diagonal B to D <nl> + * 4 . For XY_SIDE_AD measure the edge A to D <nl> + * <nl> + * Marlin automatically computes skew factors from these measurements . <nl> + * Skew factors may also be computed and set manually : <nl> + * <nl> + * - Compute AB : SQRT ( 2 * AC * AC + 2 * BD * BD - 4 * AD * AD ) / 2 <nl> + * - XY_SKEW_FACTOR : TAN ( PI / 2 - ACOS ( ( AC * AC - AB * AB - AD * AD ) / ( 2 * AB * AD ) ) ) <nl> + * <nl> + * If desired , follow the same procedure for XZ and YZ . <nl> + * Use these diagrams for reference : <nl> + * <nl> + * Y Z Z <nl> + * ^ Bmmmmmm - C ^ Bmmmmmm - C ^ Bmmmmmm - C <nl> + * | / / | / / | / / <nl> + * | / / | / / | / / <nl> + * | Ammmmmm - D | Ammmmmm - D | Ammmmmm - D <nl> + * + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > Y <nl> + * XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR <nl> + * / <nl> + / / # define SKEW_CORRECTION <nl> + <nl> + # if ENABLED ( SKEW_CORRECTION ) <nl> + / / Input all length measurements here : <nl> + # define XY_DIAG_AC 282 . 8427124746 <nl> + # define XY_DIAG_BD 282 . 8427124746 <nl> + # define XY_SIDE_AD 200 <nl> + <nl> + / / Or , set the default skew factors directly here <nl> + / / to override the above measurements : <nl> + # define XY_SKEW_FACTOR 0 . 0 <nl> + <nl> + / / # define SKEW_CORRECTION_FOR_Z <nl> + # if ENABLED ( SKEW_CORRECTION_FOR_Z ) <nl> + # define XZ_DIAG_AC 282 . 8427124746 <nl> + # define XZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_DIAG_AC 282 . 8427124746 <nl> + # define YZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_SIDE_AD 200 <nl> + # define XZ_SKEW_FACTOR 0 . 0 <nl> + # define YZ_SKEW_FACTOR 0 . 0 <nl> + # endif <nl> + <nl> + / / Enable this option for M852 to set skew at runtime <nl> + / / # define SKEW_CORRECTION_GCODE <nl> + # endif <nl> + <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Additional Features = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> mmm a / Marlin / src / config / examples / BQ / Hephestos / Configuration . h <nl> ppp b / Marlin / src / config / examples / BQ / Hephestos / Configuration . h <nl> <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Bed Leveling = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> - / / @ section bedlevel <nl> + / / @ section calibrate <nl> <nl> / * * <nl> * Choose one of the options below to enable G29 Bed Leveling . The parameters <nl> <nl> # define HOMING_FEEDRATE_XY 2000 <nl> # define HOMING_FEEDRATE_Z 150 <nl> <nl> + / / @ section calibrate <nl> + <nl> + / * * <nl> + * Bed Skew Compensation <nl> + * <nl> + * This feature corrects for misalignment in the XYZ axes . <nl> + * <nl> + * Take the following steps to get the bed skew in the XY plane : <nl> + * 1 . Print a test square ( e . g . , https : / / www . thingiverse . com / thing : 2563185 ) <nl> + * 2 . For XY_DIAG_AC measure the diagonal A to C <nl> + * 3 . For XY_DIAG_BD measure the diagonal B to D <nl> + * 4 . For XY_SIDE_AD measure the edge A to D <nl> + * <nl> + * Marlin automatically computes skew factors from these measurements . <nl> + * Skew factors may also be computed and set manually : <nl> + * <nl> + * - Compute AB : SQRT ( 2 * AC * AC + 2 * BD * BD - 4 * AD * AD ) / 2 <nl> + * - XY_SKEW_FACTOR : TAN ( PI / 2 - ACOS ( ( AC * AC - AB * AB - AD * AD ) / ( 2 * AB * AD ) ) ) <nl> + * <nl> + * If desired , follow the same procedure for XZ and YZ . <nl> + * Use these diagrams for reference : <nl> + * <nl> + * Y Z Z <nl> + * ^ Bmmmmmm - C ^ Bmmmmmm - C ^ Bmmmmmm - C <nl> + * | / / | / / | / / <nl> + * | / / | / / | / / <nl> + * | Ammmmmm - D | Ammmmmm - D | Ammmmmm - D <nl> + * + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > Y <nl> + * XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR <nl> + * / <nl> + / / # define SKEW_CORRECTION <nl> + <nl> + # if ENABLED ( SKEW_CORRECTION ) <nl> + / / Input all length measurements here : <nl> + # define XY_DIAG_AC 282 . 8427124746 <nl> + # define XY_DIAG_BD 282 . 8427124746 <nl> + # define XY_SIDE_AD 200 <nl> + <nl> + / / Or , set the default skew factors directly here <nl> + / / to override the above measurements : <nl> + # define XY_SKEW_FACTOR 0 . 0 <nl> + <nl> + / / # define SKEW_CORRECTION_FOR_Z <nl> + # if ENABLED ( SKEW_CORRECTION_FOR_Z ) <nl> + # define XZ_DIAG_AC 282 . 8427124746 <nl> + # define XZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_DIAG_AC 282 . 8427124746 <nl> + # define YZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_SIDE_AD 200 <nl> + # define XZ_SKEW_FACTOR 0 . 0 <nl> + # define YZ_SKEW_FACTOR 0 . 0 <nl> + # endif <nl> + <nl> + / / Enable this option for M852 to set skew at runtime <nl> + / / # define SKEW_CORRECTION_GCODE <nl> + # endif <nl> + <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Additional Features = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> mmm a / Marlin / src / config / examples / BQ / Hephestos_2 / Configuration . h <nl> ppp b / Marlin / src / config / examples / BQ / Hephestos_2 / Configuration . h <nl> <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Bed Leveling = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> - / / @ section bedlevel <nl> + / / @ section calibrate <nl> <nl> / * * <nl> * Choose one of the options below to enable G29 Bed Leveling . The parameters <nl> <nl> # define HOMING_FEEDRATE_XY ( 60 * 60 ) <nl> # define HOMING_FEEDRATE_Z 120 <nl> <nl> + / / @ section calibrate <nl> + <nl> + / * * <nl> + * Bed Skew Compensation <nl> + * <nl> + * This feature corrects for misalignment in the XYZ axes . <nl> + * <nl> + * Take the following steps to get the bed skew in the XY plane : <nl> + * 1 . Print a test square ( e . g . , https : / / www . thingiverse . com / thing : 2563185 ) <nl> + * 2 . For XY_DIAG_AC measure the diagonal A to C <nl> + * 3 . For XY_DIAG_BD measure the diagonal B to D <nl> + * 4 . For XY_SIDE_AD measure the edge A to D <nl> + * <nl> + * Marlin automatically computes skew factors from these measurements . <nl> + * Skew factors may also be computed and set manually : <nl> + * <nl> + * - Compute AB : SQRT ( 2 * AC * AC + 2 * BD * BD - 4 * AD * AD ) / 2 <nl> + * - XY_SKEW_FACTOR : TAN ( PI / 2 - ACOS ( ( AC * AC - AB * AB - AD * AD ) / ( 2 * AB * AD ) ) ) <nl> + * <nl> + * If desired , follow the same procedure for XZ and YZ . <nl> + * Use these diagrams for reference : <nl> + * <nl> + * Y Z Z <nl> + * ^ Bmmmmmm - C ^ Bmmmmmm - C ^ Bmmmmmm - C <nl> + * | / / | / / | / / <nl> + * | / / | / / | / / <nl> + * | Ammmmmm - D | Ammmmmm - D | Ammmmmm - D <nl> + * + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > Y <nl> + * XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR <nl> + * / <nl> + / / # define SKEW_CORRECTION <nl> + <nl> + # if ENABLED ( SKEW_CORRECTION ) <nl> + / / Input all length measurements here : <nl> + # define XY_DIAG_AC 282 . 8427124746 <nl> + # define XY_DIAG_BD 282 . 8427124746 <nl> + # define XY_SIDE_AD 200 <nl> + <nl> + / / Or , set the default skew factors directly here <nl> + / / to override the above measurements : <nl> + # define XY_SKEW_FACTOR 0 . 0 <nl> + <nl> + / / # define SKEW_CORRECTION_FOR_Z <nl> + # if ENABLED ( SKEW_CORRECTION_FOR_Z ) <nl> + # define XZ_DIAG_AC 282 . 8427124746 <nl> + # define XZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_DIAG_AC 282 . 8427124746 <nl> + # define YZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_SIDE_AD 200 <nl> + # define XZ_SKEW_FACTOR 0 . 0 <nl> + # define YZ_SKEW_FACTOR 0 . 0 <nl> + # endif <nl> + <nl> + / / Enable this option for M852 to set skew at runtime <nl> + / / # define SKEW_CORRECTION_GCODE <nl> + # endif <nl> + <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Additional Features = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> mmm a / Marlin / src / config / examples / BQ / WITBOX / Configuration . h <nl> ppp b / Marlin / src / config / examples / BQ / WITBOX / Configuration . h <nl> <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Bed Leveling = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> - / / @ section bedlevel <nl> + / / @ section calibrate <nl> <nl> / * * <nl> * Choose one of the options below to enable G29 Bed Leveling . The parameters <nl> <nl> # define HOMING_FEEDRATE_XY ( 120 * 60 ) <nl> # define HOMING_FEEDRATE_Z 432 <nl> <nl> + / / @ section calibrate <nl> + <nl> + / * * <nl> + * Bed Skew Compensation <nl> + * <nl> + * This feature corrects for misalignment in the XYZ axes . <nl> + * <nl> + * Take the following steps to get the bed skew in the XY plane : <nl> + * 1 . Print a test square ( e . g . , https : / / www . thingiverse . com / thing : 2563185 ) <nl> + * 2 . For XY_DIAG_AC measure the diagonal A to C <nl> + * 3 . For XY_DIAG_BD measure the diagonal B to D <nl> + * 4 . For XY_SIDE_AD measure the edge A to D <nl> + * <nl> + * Marlin automatically computes skew factors from these measurements . <nl> + * Skew factors may also be computed and set manually : <nl> + * <nl> + * - Compute AB : SQRT ( 2 * AC * AC + 2 * BD * BD - 4 * AD * AD ) / 2 <nl> + * - XY_SKEW_FACTOR : TAN ( PI / 2 - ACOS ( ( AC * AC - AB * AB - AD * AD ) / ( 2 * AB * AD ) ) ) <nl> + * <nl> + * If desired , follow the same procedure for XZ and YZ . <nl> + * Use these diagrams for reference : <nl> + * <nl> + * Y Z Z <nl> + * ^ Bmmmmmm - C ^ Bmmmmmm - C ^ Bmmmmmm - C <nl> + * | / / | / / | / / <nl> + * | / / | / / | / / <nl> + * | Ammmmmm - D | Ammmmmm - D | Ammmmmm - D <nl> + * + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > Y <nl> + * XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR <nl> + * / <nl> + / / # define SKEW_CORRECTION <nl> + <nl> + # if ENABLED ( SKEW_CORRECTION ) <nl> + / / Input all length measurements here : <nl> + # define XY_DIAG_AC 282 . 8427124746 <nl> + # define XY_DIAG_BD 282 . 8427124746 <nl> + # define XY_SIDE_AD 200 <nl> + <nl> + / / Or , set the default skew factors directly here <nl> + / / to override the above measurements : <nl> + # define XY_SKEW_FACTOR 0 . 0 <nl> + <nl> + / / # define SKEW_CORRECTION_FOR_Z <nl> + # if ENABLED ( SKEW_CORRECTION_FOR_Z ) <nl> + # define XZ_DIAG_AC 282 . 8427124746 <nl> + # define XZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_DIAG_AC 282 . 8427124746 <nl> + # define YZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_SIDE_AD 200 <nl> + # define XZ_SKEW_FACTOR 0 . 0 <nl> + # define YZ_SKEW_FACTOR 0 . 0 <nl> + # endif <nl> + <nl> + / / Enable this option for M852 to set skew at runtime <nl> + / / # define SKEW_CORRECTION_GCODE <nl> + # endif <nl> + <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Additional Features = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> mmm a / Marlin / src / config / examples / Cartesio / Configuration . h <nl> ppp b / Marlin / src / config / examples / Cartesio / Configuration . h <nl> <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Bed Leveling = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> - / / @ section bedlevel <nl> + / / @ section calibrate <nl> <nl> / * * <nl> * Choose one of the options below to enable G29 Bed Leveling . The parameters <nl> <nl> # define HOMING_FEEDRATE_XY ( 50 * 60 ) <nl> # define HOMING_FEEDRATE_Z ( 10 * 60 ) <nl> <nl> + / / @ section calibrate <nl> + <nl> + / * * <nl> + * Bed Skew Compensation <nl> + * <nl> + * This feature corrects for misalignment in the XYZ axes . <nl> + * <nl> + * Take the following steps to get the bed skew in the XY plane : <nl> + * 1 . Print a test square ( e . g . , https : / / www . thingiverse . com / thing : 2563185 ) <nl> + * 2 . For XY_DIAG_AC measure the diagonal A to C <nl> + * 3 . For XY_DIAG_BD measure the diagonal B to D <nl> + * 4 . For XY_SIDE_AD measure the edge A to D <nl> + * <nl> + * Marlin automatically computes skew factors from these measurements . <nl> + * Skew factors may also be computed and set manually : <nl> + * <nl> + * - Compute AB : SQRT ( 2 * AC * AC + 2 * BD * BD - 4 * AD * AD ) / 2 <nl> + * - XY_SKEW_FACTOR : TAN ( PI / 2 - ACOS ( ( AC * AC - AB * AB - AD * AD ) / ( 2 * AB * AD ) ) ) <nl> + * <nl> + * If desired , follow the same procedure for XZ and YZ . <nl> + * Use these diagrams for reference : <nl> + * <nl> + * Y Z Z <nl> + * ^ Bmmmmmm - C ^ Bmmmmmm - C ^ Bmmmmmm - C <nl> + * | / / | / / | / / <nl> + * | / / | / / | / / <nl> + * | Ammmmmm - D | Ammmmmm - D | Ammmmmm - D <nl> + * + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > Y <nl> + * XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR <nl> + * / <nl> + / / # define SKEW_CORRECTION <nl> + <nl> + # if ENABLED ( SKEW_CORRECTION ) <nl> + / / Input all length measurements here : <nl> + # define XY_DIAG_AC 282 . 8427124746 <nl> + # define XY_DIAG_BD 282 . 8427124746 <nl> + # define XY_SIDE_AD 200 <nl> + <nl> + / / Or , set the default skew factors directly here <nl> + / / to override the above measurements : <nl> + # define XY_SKEW_FACTOR 0 . 0 <nl> + <nl> + / / # define SKEW_CORRECTION_FOR_Z <nl> + # if ENABLED ( SKEW_CORRECTION_FOR_Z ) <nl> + # define XZ_DIAG_AC 282 . 8427124746 <nl> + # define XZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_DIAG_AC 282 . 8427124746 <nl> + # define YZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_SIDE_AD 200 <nl> + # define XZ_SKEW_FACTOR 0 . 0 <nl> + # define YZ_SKEW_FACTOR 0 . 0 <nl> + # endif <nl> + <nl> + / / Enable this option for M852 to set skew at runtime <nl> + / / # define SKEW_CORRECTION_GCODE <nl> + # endif <nl> + <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Additional Features = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> mmm a / Marlin / src / config / examples / Creality / CR - 10 / Configuration . h <nl> ppp b / Marlin / src / config / examples / Creality / CR - 10 / Configuration . h <nl> <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Bed Leveling = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> - / / @ section bedlevel <nl> + / / @ section calibrate <nl> <nl> / * * <nl> * Choose one of the options below to enable G29 Bed Leveling . The parameters <nl> <nl> # define HOMING_FEEDRATE_XY ( 50 * 60 ) <nl> # define HOMING_FEEDRATE_Z ( 4 * 60 ) <nl> <nl> + / / @ section calibrate <nl> + <nl> + / * * <nl> + * Bed Skew Compensation <nl> + * <nl> + * This feature corrects for misalignment in the XYZ axes . <nl> + * <nl> + * Take the following steps to get the bed skew in the XY plane : <nl> + * 1 . Print a test square ( e . g . , https : / / www . thingiverse . com / thing : 2563185 ) <nl> + * 2 . For XY_DIAG_AC measure the diagonal A to C <nl> + * 3 . For XY_DIAG_BD measure the diagonal B to D <nl> + * 4 . For XY_SIDE_AD measure the edge A to D <nl> + * <nl> + * Marlin automatically computes skew factors from these measurements . <nl> + * Skew factors may also be computed and set manually : <nl> + * <nl> + * - Compute AB : SQRT ( 2 * AC * AC + 2 * BD * BD - 4 * AD * AD ) / 2 <nl> + * - XY_SKEW_FACTOR : TAN ( PI / 2 - ACOS ( ( AC * AC - AB * AB - AD * AD ) / ( 2 * AB * AD ) ) ) <nl> + * <nl> + * If desired , follow the same procedure for XZ and YZ . <nl> + * Use these diagrams for reference : <nl> + * <nl> + * Y Z Z <nl> + * ^ Bmmmmmm - C ^ Bmmmmmm - C ^ Bmmmmmm - C <nl> + * | / / | / / | / / <nl> + * | / / | / / | / / <nl> + * | Ammmmmm - D | Ammmmmm - D | Ammmmmm - D <nl> + * + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > Y <nl> + * XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR <nl> + * / <nl> + / / # define SKEW_CORRECTION <nl> + <nl> + # if ENABLED ( SKEW_CORRECTION ) <nl> + / / Input all length measurements here : <nl> + # define XY_DIAG_AC 282 . 8427124746 <nl> + # define XY_DIAG_BD 282 . 8427124746 <nl> + # define XY_SIDE_AD 200 <nl> + <nl> + / / Or , set the default skew factors directly here <nl> + / / to override the above measurements : <nl> + # define XY_SKEW_FACTOR 0 . 0 <nl> + <nl> + / / # define SKEW_CORRECTION_FOR_Z <nl> + # if ENABLED ( SKEW_CORRECTION_FOR_Z ) <nl> + # define XZ_DIAG_AC 282 . 8427124746 <nl> + # define XZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_DIAG_AC 282 . 8427124746 <nl> + # define YZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_SIDE_AD 200 <nl> + # define XZ_SKEW_FACTOR 0 . 0 <nl> + # define YZ_SKEW_FACTOR 0 . 0 <nl> + # endif <nl> + <nl> + / / Enable this option for M852 to set skew at runtime <nl> + / / # define SKEW_CORRECTION_GCODE <nl> + # endif <nl> + <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Additional Features = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> mmm a / Marlin / src / config / examples / Felix / Configuration . h <nl> ppp b / Marlin / src / config / examples / Felix / Configuration . h <nl> <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Bed Leveling = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> - / / @ section bedlevel <nl> + / / @ section calibrate <nl> <nl> / * * <nl> * Choose one of the options below to enable G29 Bed Leveling . The parameters <nl> <nl> # define HOMING_FEEDRATE_XY ( 50 * 60 ) <nl> # define HOMING_FEEDRATE_Z ( 4 * 60 ) <nl> <nl> + / / @ section calibrate <nl> + <nl> + / * * <nl> + * Bed Skew Compensation <nl> + * <nl> + * This feature corrects for misalignment in the XYZ axes . <nl> + * <nl> + * Take the following steps to get the bed skew in the XY plane : <nl> + * 1 . Print a test square ( e . g . , https : / / www . thingiverse . com / thing : 2563185 ) <nl> + * 2 . For XY_DIAG_AC measure the diagonal A to C <nl> + * 3 . For XY_DIAG_BD measure the diagonal B to D <nl> + * 4 . For XY_SIDE_AD measure the edge A to D <nl> + * <nl> + * Marlin automatically computes skew factors from these measurements . <nl> + * Skew factors may also be computed and set manually : <nl> + * <nl> + * - Compute AB : SQRT ( 2 * AC * AC + 2 * BD * BD - 4 * AD * AD ) / 2 <nl> + * - XY_SKEW_FACTOR : TAN ( PI / 2 - ACOS ( ( AC * AC - AB * AB - AD * AD ) / ( 2 * AB * AD ) ) ) <nl> + * <nl> + * If desired , follow the same procedure for XZ and YZ . <nl> + * Use these diagrams for reference : <nl> + * <nl> + * Y Z Z <nl> + * ^ Bmmmmmm - C ^ Bmmmmmm - C ^ Bmmmmmm - C <nl> + * | / / | / / | / / <nl> + * | / / | / / | / / <nl> + * | Ammmmmm - D | Ammmmmm - D | Ammmmmm - D <nl> + * + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > Y <nl> + * XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR <nl> + * / <nl> + / / # define SKEW_CORRECTION <nl> + <nl> + # if ENABLED ( SKEW_CORRECTION ) <nl> + / / Input all length measurements here : <nl> + # define XY_DIAG_AC 282 . 8427124746 <nl> + # define XY_DIAG_BD 282 . 8427124746 <nl> + # define XY_SIDE_AD 200 <nl> + <nl> + / / Or , set the default skew factors directly here <nl> + / / to override the above measurements : <nl> + # define XY_SKEW_FACTOR 0 . 0 <nl> + <nl> + / / # define SKEW_CORRECTION_FOR_Z <nl> + # if ENABLED ( SKEW_CORRECTION_FOR_Z ) <nl> + # define XZ_DIAG_AC 282 . 8427124746 <nl> + # define XZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_DIAG_AC 282 . 8427124746 <nl> + # define YZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_SIDE_AD 200 <nl> + # define XZ_SKEW_FACTOR 0 . 0 <nl> + # define YZ_SKEW_FACTOR 0 . 0 <nl> + # endif <nl> + <nl> + / / Enable this option for M852 to set skew at runtime <nl> + / / # define SKEW_CORRECTION_GCODE <nl> + # endif <nl> + <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Additional Features = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> mmm a / Marlin / src / config / examples / Felix / DUAL / Configuration . h <nl> ppp b / Marlin / src / config / examples / Felix / DUAL / Configuration . h <nl> <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Bed Leveling = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> - / / @ section bedlevel <nl> + / / @ section calibrate <nl> <nl> / * * <nl> * Choose one of the options below to enable G29 Bed Leveling . The parameters <nl> <nl> # define HOMING_FEEDRATE_XY ( 50 * 60 ) <nl> # define HOMING_FEEDRATE_Z ( 4 * 60 ) <nl> <nl> + / / @ section calibrate <nl> + <nl> + / * * <nl> + * Bed Skew Compensation <nl> + * <nl> + * This feature corrects for misalignment in the XYZ axes . <nl> + * <nl> + * Take the following steps to get the bed skew in the XY plane : <nl> + * 1 . Print a test square ( e . g . , https : / / www . thingiverse . com / thing : 2563185 ) <nl> + * 2 . For XY_DIAG_AC measure the diagonal A to C <nl> + * 3 . For XY_DIAG_BD measure the diagonal B to D <nl> + * 4 . For XY_SIDE_AD measure the edge A to D <nl> + * <nl> + * Marlin automatically computes skew factors from these measurements . <nl> + * Skew factors may also be computed and set manually : <nl> + * <nl> + * - Compute AB : SQRT ( 2 * AC * AC + 2 * BD * BD - 4 * AD * AD ) / 2 <nl> + * - XY_SKEW_FACTOR : TAN ( PI / 2 - ACOS ( ( AC * AC - AB * AB - AD * AD ) / ( 2 * AB * AD ) ) ) <nl> + * <nl> + * If desired , follow the same procedure for XZ and YZ . <nl> + * Use these diagrams for reference : <nl> + * <nl> + * Y Z Z <nl> + * ^ Bmmmmmm - C ^ Bmmmmmm - C ^ Bmmmmmm - C <nl> + * | / / | / / | / / <nl> + * | / / | / / | / / <nl> + * | Ammmmmm - D | Ammmmmm - D | Ammmmmm - D <nl> + * + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > Y <nl> + * XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR <nl> + * / <nl> + / / # define SKEW_CORRECTION <nl> + <nl> + # if ENABLED ( SKEW_CORRECTION ) <nl> + / / Input all length measurements here : <nl> + # define XY_DIAG_AC 282 . 8427124746 <nl> + # define XY_DIAG_BD 282 . 8427124746 <nl> + # define XY_SIDE_AD 200 <nl> + <nl> + / / Or , set the default skew factors directly here <nl> + / / to override the above measurements : <nl> + # define XY_SKEW_FACTOR 0 . 0 <nl> + <nl> + / / # define SKEW_CORRECTION_FOR_Z <nl> + # if ENABLED ( SKEW_CORRECTION_FOR_Z ) <nl> + # define XZ_DIAG_AC 282 . 8427124746 <nl> + # define XZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_DIAG_AC 282 . 8427124746 <nl> + # define YZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_SIDE_AD 200 <nl> + # define XZ_SKEW_FACTOR 0 . 0 <nl> + # define YZ_SKEW_FACTOR 0 . 0 <nl> + # endif <nl> + <nl> + / / Enable this option for M852 to set skew at runtime <nl> + / / # define SKEW_CORRECTION_GCODE <nl> + # endif <nl> + <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Additional Features = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> mmm a / Marlin / src / config / examples / FolgerTech / i3 - 2020 / Configuration . h <nl> ppp b / Marlin / src / config / examples / FolgerTech / i3 - 2020 / Configuration . h <nl> <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Bed Leveling = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> - / / @ section bedlevel <nl> + / / @ section calibrate <nl> <nl> / * * <nl> * Choose one of the options below to enable G29 Bed Leveling . The parameters <nl> <nl> # define HOMING_FEEDRATE_XY ( 40 * 60 ) <nl> # define HOMING_FEEDRATE_Z ( 55 ) <nl> <nl> + / / @ section calibrate <nl> + <nl> + / * * <nl> + * Bed Skew Compensation <nl> + * <nl> + * This feature corrects for misalignment in the XYZ axes . <nl> + * <nl> + * Take the following steps to get the bed skew in the XY plane : <nl> + * 1 . Print a test square ( e . g . , https : / / www . thingiverse . com / thing : 2563185 ) <nl> + * 2 . For XY_DIAG_AC measure the diagonal A to C <nl> + * 3 . For XY_DIAG_BD measure the diagonal B to D <nl> + * 4 . For XY_SIDE_AD measure the edge A to D <nl> + * <nl> + * Marlin automatically computes skew factors from these measurements . <nl> + * Skew factors may also be computed and set manually : <nl> + * <nl> + * - Compute AB : SQRT ( 2 * AC * AC + 2 * BD * BD - 4 * AD * AD ) / 2 <nl> + * - XY_SKEW_FACTOR : TAN ( PI / 2 - ACOS ( ( AC * AC - AB * AB - AD * AD ) / ( 2 * AB * AD ) ) ) <nl> + * <nl> + * If desired , follow the same procedure for XZ and YZ . <nl> + * Use these diagrams for reference : <nl> + * <nl> + * Y Z Z <nl> + * ^ Bmmmmmm - C ^ Bmmmmmm - C ^ Bmmmmmm - C <nl> + * | / / | / / | / / <nl> + * | / / | / / | / / <nl> + * | Ammmmmm - D | Ammmmmm - D | Ammmmmm - D <nl> + * + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > Y <nl> + * XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR <nl> + * / <nl> + / / # define SKEW_CORRECTION <nl> + <nl> + # if ENABLED ( SKEW_CORRECTION ) <nl> + / / Input all length measurements here : <nl> + # define XY_DIAG_AC 282 . 8427124746 <nl> + # define XY_DIAG_BD 282 . 8427124746 <nl> + # define XY_SIDE_AD 200 <nl> + <nl> + / / Or , set the default skew factors directly here <nl> + / / to override the above measurements : <nl> + # define XY_SKEW_FACTOR 0 . 0 <nl> + <nl> + / / # define SKEW_CORRECTION_FOR_Z <nl> + # if ENABLED ( SKEW_CORRECTION_FOR_Z ) <nl> + # define XZ_DIAG_AC 282 . 8427124746 <nl> + # define XZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_DIAG_AC 282 . 8427124746 <nl> + # define YZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_SIDE_AD 200 <nl> + # define XZ_SKEW_FACTOR 0 . 0 <nl> + # define YZ_SKEW_FACTOR 0 . 0 <nl> + # endif <nl> + <nl> + / / Enable this option for M852 to set skew at runtime <nl> + / / # define SKEW_CORRECTION_GCODE <nl> + # endif <nl> + <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Additional Features = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> mmm a / Marlin / src / config / examples / Geeetech / GT2560 / Configuration . h <nl> ppp b / Marlin / src / config / examples / Geeetech / GT2560 / Configuration . h <nl> <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Bed Leveling = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> - / / @ section bedlevel <nl> + / / @ section calibrate <nl> <nl> / * * <nl> * Choose one of the options below to enable G29 Bed Leveling . The parameters <nl> <nl> # define HOMING_FEEDRATE_XY ( 50 * 60 ) <nl> # define HOMING_FEEDRATE_Z ( 4 * 60 ) <nl> <nl> + / / @ section calibrate <nl> + <nl> + / * * <nl> + * Bed Skew Compensation <nl> + * <nl> + * This feature corrects for misalignment in the XYZ axes . <nl> + * <nl> + * Take the following steps to get the bed skew in the XY plane : <nl> + * 1 . Print a test square ( e . g . , https : / / www . thingiverse . com / thing : 2563185 ) <nl> + * 2 . For XY_DIAG_AC measure the diagonal A to C <nl> + * 3 . For XY_DIAG_BD measure the diagonal B to D <nl> + * 4 . For XY_SIDE_AD measure the edge A to D <nl> + * <nl> + * Marlin automatically computes skew factors from these measurements . <nl> + * Skew factors may also be computed and set manually : <nl> + * <nl> + * - Compute AB : SQRT ( 2 * AC * AC + 2 * BD * BD - 4 * AD * AD ) / 2 <nl> + * - XY_SKEW_FACTOR : TAN ( PI / 2 - ACOS ( ( AC * AC - AB * AB - AD * AD ) / ( 2 * AB * AD ) ) ) <nl> + * <nl> + * If desired , follow the same procedure for XZ and YZ . <nl> + * Use these diagrams for reference : <nl> + * <nl> + * Y Z Z <nl> + * ^ Bmmmmmm - C ^ Bmmmmmm - C ^ Bmmmmmm - C <nl> + * | / / | / / | / / <nl> + * | / / | / / | / / <nl> + * | Ammmmmm - D | Ammmmmm - D | Ammmmmm - D <nl> + * + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > Y <nl> + * XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR <nl> + * / <nl> + / / # define SKEW_CORRECTION <nl> + <nl> + # if ENABLED ( SKEW_CORRECTION ) <nl> + / / Input all length measurements here : <nl> + # define XY_DIAG_AC 282 . 8427124746 <nl> + # define XY_DIAG_BD 282 . 8427124746 <nl> + # define XY_SIDE_AD 200 <nl> + <nl> + / / Or , set the default skew factors directly here <nl> + / / to override the above measurements : <nl> + # define XY_SKEW_FACTOR 0 . 0 <nl> + <nl> + / / # define SKEW_CORRECTION_FOR_Z <nl> + # if ENABLED ( SKEW_CORRECTION_FOR_Z ) <nl> + # define XZ_DIAG_AC 282 . 8427124746 <nl> + # define XZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_DIAG_AC 282 . 8427124746 <nl> + # define YZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_SIDE_AD 200 <nl> + # define XZ_SKEW_FACTOR 0 . 0 <nl> + # define YZ_SKEW_FACTOR 0 . 0 <nl> + # endif <nl> + <nl> + / / Enable this option for M852 to set skew at runtime <nl> + / / # define SKEW_CORRECTION_GCODE <nl> + # endif <nl> + <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Additional Features = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> mmm a / Marlin / src / config / examples / Geeetech / I3_Pro_X - GT2560 / Configuration . h <nl> ppp b / Marlin / src / config / examples / Geeetech / I3_Pro_X - GT2560 / Configuration . h <nl> <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Bed Leveling = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> - / / @ section bedlevel <nl> + / / @ section calibrate <nl> <nl> / * * <nl> * Choose one of the options below to enable G29 Bed Leveling . The parameters <nl> <nl> # define HOMING_FEEDRATE_XY ( 50 * 60 ) <nl> # define HOMING_FEEDRATE_Z ( 4 * 60 ) <nl> <nl> + / / @ section calibrate <nl> + <nl> + / * * <nl> + * Bed Skew Compensation <nl> + * <nl> + * This feature corrects for misalignment in the XYZ axes . <nl> + * <nl> + * Take the following steps to get the bed skew in the XY plane : <nl> + * 1 . Print a test square ( e . g . , https : / / www . thingiverse . com / thing : 2563185 ) <nl> + * 2 . For XY_DIAG_AC measure the diagonal A to C <nl> + * 3 . For XY_DIAG_BD measure the diagonal B to D <nl> + * 4 . For XY_SIDE_AD measure the edge A to D <nl> + * <nl> + * Marlin automatically computes skew factors from these measurements . <nl> + * Skew factors may also be computed and set manually : <nl> + * <nl> + * - Compute AB : SQRT ( 2 * AC * AC + 2 * BD * BD - 4 * AD * AD ) / 2 <nl> + * - XY_SKEW_FACTOR : TAN ( PI / 2 - ACOS ( ( AC * AC - AB * AB - AD * AD ) / ( 2 * AB * AD ) ) ) <nl> + * <nl> + * If desired , follow the same procedure for XZ and YZ . <nl> + * Use these diagrams for reference : <nl> + * <nl> + * Y Z Z <nl> + * ^ Bmmmmmm - C ^ Bmmmmmm - C ^ Bmmmmmm - C <nl> + * | / / | / / | / / <nl> + * | / / | / / | / / <nl> + * | Ammmmmm - D | Ammmmmm - D | Ammmmmm - D <nl> + * + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > Y <nl> + * XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR <nl> + * / <nl> + / / # define SKEW_CORRECTION <nl> + <nl> + # if ENABLED ( SKEW_CORRECTION ) <nl> + / / Input all length measurements here : <nl> + # define XY_DIAG_AC 282 . 8427124746 <nl> + # define XY_DIAG_BD 282 . 8427124746 <nl> + # define XY_SIDE_AD 200 <nl> + <nl> + / / Or , set the default skew factors directly here <nl> + / / to override the above measurements : <nl> + # define XY_SKEW_FACTOR 0 . 0 <nl> + <nl> + / / # define SKEW_CORRECTION_FOR_Z <nl> + # if ENABLED ( SKEW_CORRECTION_FOR_Z ) <nl> + # define XZ_DIAG_AC 282 . 8427124746 <nl> + # define XZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_DIAG_AC 282 . 8427124746 <nl> + # define YZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_SIDE_AD 200 <nl> + # define XZ_SKEW_FACTOR 0 . 0 <nl> + # define YZ_SKEW_FACTOR 0 . 0 <nl> + # endif <nl> + <nl> + / / Enable this option for M852 to set skew at runtime <nl> + / / # define SKEW_CORRECTION_GCODE <nl> + # endif <nl> + <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Additional Features = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> mmm a / Marlin / src / config / examples / Infitary / i3 - M508 / Configuration . h <nl> ppp b / Marlin / src / config / examples / Infitary / i3 - M508 / Configuration . h <nl> <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Bed Leveling = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> - / / @ section bedlevel <nl> + / / @ section calibrate <nl> <nl> / * * <nl> * Choose one of the options below to enable G29 Bed Leveling . The parameters <nl> <nl> # define HOMING_FEEDRATE_XY ( 50 * 60 ) <nl> # define HOMING_FEEDRATE_Z ( 4 * 60 ) <nl> <nl> + / / @ section calibrate <nl> + <nl> + / * * <nl> + * Bed Skew Compensation <nl> + * <nl> + * This feature corrects for misalignment in the XYZ axes . <nl> + * <nl> + * Take the following steps to get the bed skew in the XY plane : <nl> + * 1 . Print a test square ( e . g . , https : / / www . thingiverse . com / thing : 2563185 ) <nl> + * 2 . For XY_DIAG_AC measure the diagonal A to C <nl> + * 3 . For XY_DIAG_BD measure the diagonal B to D <nl> + * 4 . For XY_SIDE_AD measure the edge A to D <nl> + * <nl> + * Marlin automatically computes skew factors from these measurements . <nl> + * Skew factors may also be computed and set manually : <nl> + * <nl> + * - Compute AB : SQRT ( 2 * AC * AC + 2 * BD * BD - 4 * AD * AD ) / 2 <nl> + * - XY_SKEW_FACTOR : TAN ( PI / 2 - ACOS ( ( AC * AC - AB * AB - AD * AD ) / ( 2 * AB * AD ) ) ) <nl> + * <nl> + * If desired , follow the same procedure for XZ and YZ . <nl> + * Use these diagrams for reference : <nl> + * <nl> + * Y Z Z <nl> + * ^ Bmmmmmm - C ^ Bmmmmmm - C ^ Bmmmmmm - C <nl> + * | / / | / / | / / <nl> + * | / / | / / | / / <nl> + * | Ammmmmm - D | Ammmmmm - D | Ammmmmm - D <nl> + * + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > Y <nl> + * XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR <nl> + * / <nl> + / / # define SKEW_CORRECTION <nl> + <nl> + # if ENABLED ( SKEW_CORRECTION ) <nl> + / / Input all length measurements here : <nl> + # define XY_DIAG_AC 282 . 8427124746 <nl> + # define XY_DIAG_BD 282 . 8427124746 <nl> + # define XY_SIDE_AD 200 <nl> + <nl> + / / Or , set the default skew factors directly here <nl> + / / to override the above measurements : <nl> + # define XY_SKEW_FACTOR 0 . 0 <nl> + <nl> + / / # define SKEW_CORRECTION_FOR_Z <nl> + # if ENABLED ( SKEW_CORRECTION_FOR_Z ) <nl> + # define XZ_DIAG_AC 282 . 8427124746 <nl> + # define XZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_DIAG_AC 282 . 8427124746 <nl> + # define YZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_SIDE_AD 200 <nl> + # define XZ_SKEW_FACTOR 0 . 0 <nl> + # define YZ_SKEW_FACTOR 0 . 0 <nl> + # endif <nl> + <nl> + / / Enable this option for M852 to set skew at runtime <nl> + / / # define SKEW_CORRECTION_GCODE <nl> + # endif <nl> + <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Additional Features = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> mmm a / Marlin / src / config / examples / Malyan / M150 / Configuration . h <nl> ppp b / Marlin / src / config / examples / Malyan / M150 / Configuration . h <nl> <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Bed Leveling = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> - / / @ section bedlevel <nl> + / / @ section calibrate <nl> <nl> / * * <nl> * Choose one of the options below to enable G29 Bed Leveling . The parameters <nl> <nl> # define HOMING_FEEDRATE_XY ( 50 * 60 ) <nl> # define HOMING_FEEDRATE_Z ( 4 * 60 ) <nl> <nl> + / / @ section calibrate <nl> + <nl> + / * * <nl> + * Bed Skew Compensation <nl> + * <nl> + * This feature corrects for misalignment in the XYZ axes . <nl> + * <nl> + * Take the following steps to get the bed skew in the XY plane : <nl> + * 1 . Print a test square ( e . g . , https : / / www . thingiverse . com / thing : 2563185 ) <nl> + * 2 . For XY_DIAG_AC measure the diagonal A to C <nl> + * 3 . For XY_DIAG_BD measure the diagonal B to D <nl> + * 4 . For XY_SIDE_AD measure the edge A to D <nl> + * <nl> + * Marlin automatically computes skew factors from these measurements . <nl> + * Skew factors may also be computed and set manually : <nl> + * <nl> + * - Compute AB : SQRT ( 2 * AC * AC + 2 * BD * BD - 4 * AD * AD ) / 2 <nl> + * - XY_SKEW_FACTOR : TAN ( PI / 2 - ACOS ( ( AC * AC - AB * AB - AD * AD ) / ( 2 * AB * AD ) ) ) <nl> + * <nl> + * If desired , follow the same procedure for XZ and YZ . <nl> + * Use these diagrams for reference : <nl> + * <nl> + * Y Z Z <nl> + * ^ Bmmmmmm - C ^ Bmmmmmm - C ^ Bmmmmmm - C <nl> + * | / / | / / | / / <nl> + * | / / | / / | / / <nl> + * | Ammmmmm - D | Ammmmmm - D | Ammmmmm - D <nl> + * + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > Y <nl> + * XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR <nl> + * / <nl> + / / # define SKEW_CORRECTION <nl> + <nl> + # if ENABLED ( SKEW_CORRECTION ) <nl> + / / Input all length measurements here : <nl> + # define XY_DIAG_AC 282 . 8427124746 <nl> + # define XY_DIAG_BD 282 . 8427124746 <nl> + # define XY_SIDE_AD 200 <nl> + <nl> + / / Or , set the default skew factors directly here <nl> + / / to override the above measurements : <nl> + # define XY_SKEW_FACTOR 0 . 0 <nl> + <nl> + / / # define SKEW_CORRECTION_FOR_Z <nl> + # if ENABLED ( SKEW_CORRECTION_FOR_Z ) <nl> + # define XZ_DIAG_AC 282 . 8427124746 <nl> + # define XZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_DIAG_AC 282 . 8427124746 <nl> + # define YZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_SIDE_AD 200 <nl> + # define XZ_SKEW_FACTOR 0 . 0 <nl> + # define YZ_SKEW_FACTOR 0 . 0 <nl> + # endif <nl> + <nl> + / / Enable this option for M852 to set skew at runtime <nl> + / / # define SKEW_CORRECTION_GCODE <nl> + # endif <nl> + <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Additional Features = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> mmm a / Marlin / src / config / examples / Micromake / C1 / basic / Configuration . h <nl> ppp b / Marlin / src / config / examples / Micromake / C1 / basic / Configuration . h <nl> <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Bed Leveling = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> - / / @ section bedlevel <nl> + / / @ section calibrate <nl> <nl> / * * <nl> * Choose one of the options below to enable G29 Bed Leveling . The parameters <nl> <nl> # define HOMING_FEEDRATE_XY ( 50 * 60 ) <nl> # define HOMING_FEEDRATE_Z ( 4 * 60 ) <nl> <nl> + / / @ section calibrate <nl> + <nl> + / * * <nl> + * Bed Skew Compensation <nl> + * <nl> + * This feature corrects for misalignment in the XYZ axes . <nl> + * <nl> + * Take the following steps to get the bed skew in the XY plane : <nl> + * 1 . Print a test square ( e . g . , https : / / www . thingiverse . com / thing : 2563185 ) <nl> + * 2 . For XY_DIAG_AC measure the diagonal A to C <nl> + * 3 . For XY_DIAG_BD measure the diagonal B to D <nl> + * 4 . For XY_SIDE_AD measure the edge A to D <nl> + * <nl> + * Marlin automatically computes skew factors from these measurements . <nl> + * Skew factors may also be computed and set manually : <nl> + * <nl> + * - Compute AB : SQRT ( 2 * AC * AC + 2 * BD * BD - 4 * AD * AD ) / 2 <nl> + * - XY_SKEW_FACTOR : TAN ( PI / 2 - ACOS ( ( AC * AC - AB * AB - AD * AD ) / ( 2 * AB * AD ) ) ) <nl> + * <nl> + * If desired , follow the same procedure for XZ and YZ . <nl> + * Use these diagrams for reference : <nl> + * <nl> + * Y Z Z <nl> + * ^ Bmmmmmm - C ^ Bmmmmmm - C ^ Bmmmmmm - C <nl> + * | / / | / / | / / <nl> + * | / / | / / | / / <nl> + * | Ammmmmm - D | Ammmmmm - D | Ammmmmm - D <nl> + * + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > Y <nl> + * XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR <nl> + * / <nl> + / / # define SKEW_CORRECTION <nl> + <nl> + # if ENABLED ( SKEW_CORRECTION ) <nl> + / / Input all length measurements here : <nl> + # define XY_DIAG_AC 282 . 8427124746 <nl> + # define XY_DIAG_BD 282 . 8427124746 <nl> + # define XY_SIDE_AD 200 <nl> + <nl> + / / Or , set the default skew factors directly here <nl> + / / to override the above measurements : <nl> + # define XY_SKEW_FACTOR 0 . 0 <nl> + <nl> + / / # define SKEW_CORRECTION_FOR_Z <nl> + # if ENABLED ( SKEW_CORRECTION_FOR_Z ) <nl> + # define XZ_DIAG_AC 282 . 8427124746 <nl> + # define XZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_DIAG_AC 282 . 8427124746 <nl> + # define YZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_SIDE_AD 200 <nl> + # define XZ_SKEW_FACTOR 0 . 0 <nl> + # define YZ_SKEW_FACTOR 0 . 0 <nl> + # endif <nl> + <nl> + / / Enable this option for M852 to set skew at runtime <nl> + / / # define SKEW_CORRECTION_GCODE <nl> + # endif <nl> + <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Additional Features = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> mmm a / Marlin / src / config / examples / Micromake / C1 / enhanced / Configuration . h <nl> ppp b / Marlin / src / config / examples / Micromake / C1 / enhanced / Configuration . h <nl> <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Bed Leveling = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> - / / @ section bedlevel <nl> + / / @ section calibrate <nl> <nl> / * * <nl> * Choose one of the options below to enable G29 Bed Leveling . The parameters <nl> <nl> # define HOMING_FEEDRATE_XY ( 50 * 60 ) <nl> # define HOMING_FEEDRATE_Z ( 4 * 60 ) <nl> <nl> + / / @ section calibrate <nl> + <nl> + / * * <nl> + * Bed Skew Compensation <nl> + * <nl> + * This feature corrects for misalignment in the XYZ axes . <nl> + * <nl> + * Take the following steps to get the bed skew in the XY plane : <nl> + * 1 . Print a test square ( e . g . , https : / / www . thingiverse . com / thing : 2563185 ) <nl> + * 2 . For XY_DIAG_AC measure the diagonal A to C <nl> + * 3 . For XY_DIAG_BD measure the diagonal B to D <nl> + * 4 . For XY_SIDE_AD measure the edge A to D <nl> + * <nl> + * Marlin automatically computes skew factors from these measurements . <nl> + * Skew factors may also be computed and set manually : <nl> + * <nl> + * - Compute AB : SQRT ( 2 * AC * AC + 2 * BD * BD - 4 * AD * AD ) / 2 <nl> + * - XY_SKEW_FACTOR : TAN ( PI / 2 - ACOS ( ( AC * AC - AB * AB - AD * AD ) / ( 2 * AB * AD ) ) ) <nl> + * <nl> + * If desired , follow the same procedure for XZ and YZ . <nl> + * Use these diagrams for reference : <nl> + * <nl> + * Y Z Z <nl> + * ^ Bmmmmmm - C ^ Bmmmmmm - C ^ Bmmmmmm - C <nl> + * | / / | / / | / / <nl> + * | / / | / / | / / <nl> + * | Ammmmmm - D | Ammmmmm - D | Ammmmmm - D <nl> + * + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > Y <nl> + * XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR <nl> + * / <nl> + / / # define SKEW_CORRECTION <nl> + <nl> + # if ENABLED ( SKEW_CORRECTION ) <nl> + / / Input all length measurements here : <nl> + # define XY_DIAG_AC 282 . 8427124746 <nl> + # define XY_DIAG_BD 282 . 8427124746 <nl> + # define XY_SIDE_AD 200 <nl> + <nl> + / / Or , set the default skew factors directly here <nl> + / / to override the above measurements : <nl> + # define XY_SKEW_FACTOR 0 . 0 <nl> + <nl> + / / # define SKEW_CORRECTION_FOR_Z <nl> + # if ENABLED ( SKEW_CORRECTION_FOR_Z ) <nl> + # define XZ_DIAG_AC 282 . 8427124746 <nl> + # define XZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_DIAG_AC 282 . 8427124746 <nl> + # define YZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_SIDE_AD 200 <nl> + # define XZ_SKEW_FACTOR 0 . 0 <nl> + # define YZ_SKEW_FACTOR 0 . 0 <nl> + # endif <nl> + <nl> + / / Enable this option for M852 to set skew at runtime <nl> + / / # define SKEW_CORRECTION_GCODE <nl> + # endif <nl> + <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Additional Features = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> mmm a / Marlin / src / config / examples / Mks / Sbase / Configuration . h <nl> ppp b / Marlin / src / config / examples / Mks / Sbase / Configuration . h <nl> <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Bed Leveling = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> - / / @ section bedlevel <nl> + / / @ section calibrate <nl> <nl> / * * <nl> * Choose one of the options below to enable G29 Bed Leveling . The parameters <nl> <nl> # define HOMING_FEEDRATE_XY ( 50 * 60 ) <nl> # define HOMING_FEEDRATE_Z ( 4 * 60 ) <nl> <nl> + / / @ section calibrate <nl> + <nl> + / * * <nl> + * Bed Skew Compensation <nl> + * <nl> + * This feature corrects for misalignment in the XYZ axes . <nl> + * <nl> + * Take the following steps to get the bed skew in the XY plane : <nl> + * 1 . Print a test square ( e . g . , https : / / www . thingiverse . com / thing : 2563185 ) <nl> + * 2 . For XY_DIAG_AC measure the diagonal A to C <nl> + * 3 . For XY_DIAG_BD measure the diagonal B to D <nl> + * 4 . For XY_SIDE_AD measure the edge A to D <nl> + * <nl> + * Marlin automatically computes skew factors from these measurements . <nl> + * Skew factors may also be computed and set manually : <nl> + * <nl> + * - Compute AB : SQRT ( 2 * AC * AC + 2 * BD * BD - 4 * AD * AD ) / 2 <nl> + * - XY_SKEW_FACTOR : TAN ( PI / 2 - ACOS ( ( AC * AC - AB * AB - AD * AD ) / ( 2 * AB * AD ) ) ) <nl> + * <nl> + * If desired , follow the same procedure for XZ and YZ . <nl> + * Use these diagrams for reference : <nl> + * <nl> + * Y Z Z <nl> + * ^ Bmmmmmm - C ^ Bmmmmmm - C ^ Bmmmmmm - C <nl> + * | / / | / / | / / <nl> + * | / / | / / | / / <nl> + * | Ammmmmm - D | Ammmmmm - D | Ammmmmm - D <nl> + * + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > Y <nl> + * XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR <nl> + * / <nl> + / / # define SKEW_CORRECTION <nl> + <nl> + # if ENABLED ( SKEW_CORRECTION ) <nl> + / / Input all length measurements here : <nl> + # define XY_DIAG_AC 282 . 8427124746 <nl> + # define XY_DIAG_BD 282 . 8427124746 <nl> + # define XY_SIDE_AD 200 <nl> + <nl> + / / Or , set the default skew factors directly here <nl> + / / to override the above measurements : <nl> + # define XY_SKEW_FACTOR 0 . 0 <nl> + <nl> + / / # define SKEW_CORRECTION_FOR_Z <nl> + # if ENABLED ( SKEW_CORRECTION_FOR_Z ) <nl> + # define XZ_DIAG_AC 282 . 8427124746 <nl> + # define XZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_DIAG_AC 282 . 8427124746 <nl> + # define YZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_SIDE_AD 200 <nl> + # define XZ_SKEW_FACTOR 0 . 0 <nl> + # define YZ_SKEW_FACTOR 0 . 0 <nl> + # endif <nl> + <nl> + / / Enable this option for M852 to set skew at runtime <nl> + / / # define SKEW_CORRECTION_GCODE <nl> + # endif <nl> + <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Additional Features = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> mmm a / Marlin / src / config / examples / RepRapWorld / Megatronics / Configuration . h <nl> ppp b / Marlin / src / config / examples / RepRapWorld / Megatronics / Configuration . h <nl> <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Bed Leveling = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> - / / @ section bedlevel <nl> + / / @ section calibrate <nl> <nl> / * * <nl> * Choose one of the options below to enable G29 Bed Leveling . The parameters <nl> <nl> # define HOMING_FEEDRATE_XY ( 50 * 60 ) <nl> # define HOMING_FEEDRATE_Z ( 4 * 60 ) <nl> <nl> + / / @ section calibrate <nl> + <nl> + / * * <nl> + * Bed Skew Compensation <nl> + * <nl> + * This feature corrects for misalignment in the XYZ axes . <nl> + * <nl> + * Take the following steps to get the bed skew in the XY plane : <nl> + * 1 . Print a test square ( e . g . , https : / / www . thingiverse . com / thing : 2563185 ) <nl> + * 2 . For XY_DIAG_AC measure the diagonal A to C <nl> + * 3 . For XY_DIAG_BD measure the diagonal B to D <nl> + * 4 . For XY_SIDE_AD measure the edge A to D <nl> + * <nl> + * Marlin automatically computes skew factors from these measurements . <nl> + * Skew factors may also be computed and set manually : <nl> + * <nl> + * - Compute AB : SQRT ( 2 * AC * AC + 2 * BD * BD - 4 * AD * AD ) / 2 <nl> + * - XY_SKEW_FACTOR : TAN ( PI / 2 - ACOS ( ( AC * AC - AB * AB - AD * AD ) / ( 2 * AB * AD ) ) ) <nl> + * <nl> + * If desired , follow the same procedure for XZ and YZ . <nl> + * Use these diagrams for reference : <nl> + * <nl> + * Y Z Z <nl> + * ^ Bmmmmmm - C ^ Bmmmmmm - C ^ Bmmmmmm - C <nl> + * | / / | / / | / / <nl> + * | / / | / / | / / <nl> + * | Ammmmmm - D | Ammmmmm - D | Ammmmmm - D <nl> + * + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > Y <nl> + * XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR <nl> + * / <nl> + / / # define SKEW_CORRECTION <nl> + <nl> + # if ENABLED ( SKEW_CORRECTION ) <nl> + / / Input all length measurements here : <nl> + # define XY_DIAG_AC 282 . 8427124746 <nl> + # define XY_DIAG_BD 282 . 8427124746 <nl> + # define XY_SIDE_AD 200 <nl> + <nl> + / / Or , set the default skew factors directly here <nl> + / / to override the above measurements : <nl> + # define XY_SKEW_FACTOR 0 . 0 <nl> + <nl> + / / # define SKEW_CORRECTION_FOR_Z <nl> + # if ENABLED ( SKEW_CORRECTION_FOR_Z ) <nl> + # define XZ_DIAG_AC 282 . 8427124746 <nl> + # define XZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_DIAG_AC 282 . 8427124746 <nl> + # define YZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_SIDE_AD 200 <nl> + # define XZ_SKEW_FACTOR 0 . 0 <nl> + # define YZ_SKEW_FACTOR 0 . 0 <nl> + # endif <nl> + <nl> + / / Enable this option for M852 to set skew at runtime <nl> + / / # define SKEW_CORRECTION_GCODE <nl> + # endif <nl> + <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Additional Features = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> mmm a / Marlin / src / config / examples / RigidBot / Configuration . h <nl> ppp b / Marlin / src / config / examples / RigidBot / Configuration . h <nl> <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Bed Leveling = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> - / / @ section bedlevel <nl> + / / @ section calibrate <nl> <nl> / * * <nl> * Choose one of the options below to enable G29 Bed Leveling . The parameters <nl> <nl> # define HOMING_FEEDRATE_XY ( 50 * 60 ) <nl> # define HOMING_FEEDRATE_Z ( 15 * 60 ) <nl> <nl> + / / @ section calibrate <nl> + <nl> + / * * <nl> + * Bed Skew Compensation <nl> + * <nl> + * This feature corrects for misalignment in the XYZ axes . <nl> + * <nl> + * Take the following steps to get the bed skew in the XY plane : <nl> + * 1 . Print a test square ( e . g . , https : / / www . thingiverse . com / thing : 2563185 ) <nl> + * 2 . For XY_DIAG_AC measure the diagonal A to C <nl> + * 3 . For XY_DIAG_BD measure the diagonal B to D <nl> + * 4 . For XY_SIDE_AD measure the edge A to D <nl> + * <nl> + * Marlin automatically computes skew factors from these measurements . <nl> + * Skew factors may also be computed and set manually : <nl> + * <nl> + * - Compute AB : SQRT ( 2 * AC * AC + 2 * BD * BD - 4 * AD * AD ) / 2 <nl> + * - XY_SKEW_FACTOR : TAN ( PI / 2 - ACOS ( ( AC * AC - AB * AB - AD * AD ) / ( 2 * AB * AD ) ) ) <nl> + * <nl> + * If desired , follow the same procedure for XZ and YZ . <nl> + * Use these diagrams for reference : <nl> + * <nl> + * Y Z Z <nl> + * ^ Bmmmmmm - C ^ Bmmmmmm - C ^ Bmmmmmm - C <nl> + * | / / | / / | / / <nl> + * | / / | / / | / / <nl> + * | Ammmmmm - D | Ammmmmm - D | Ammmmmm - D <nl> + * + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > Y <nl> + * XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR <nl> + * / <nl> + / / # define SKEW_CORRECTION <nl> + <nl> + # if ENABLED ( SKEW_CORRECTION ) <nl> + / / Input all length measurements here : <nl> + # define XY_DIAG_AC 282 . 8427124746 <nl> + # define XY_DIAG_BD 282 . 8427124746 <nl> + # define XY_SIDE_AD 200 <nl> + <nl> + / / Or , set the default skew factors directly here <nl> + / / to override the above measurements : <nl> + # define XY_SKEW_FACTOR 0 . 0 <nl> + <nl> + / / # define SKEW_CORRECTION_FOR_Z <nl> + # if ENABLED ( SKEW_CORRECTION_FOR_Z ) <nl> + # define XZ_DIAG_AC 282 . 8427124746 <nl> + # define XZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_DIAG_AC 282 . 8427124746 <nl> + # define YZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_SIDE_AD 200 <nl> + # define XZ_SKEW_FACTOR 0 . 0 <nl> + # define YZ_SKEW_FACTOR 0 . 0 <nl> + # endif <nl> + <nl> + / / Enable this option for M852 to set skew at runtime <nl> + / / # define SKEW_CORRECTION_GCODE <nl> + # endif <nl> + <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Additional Features = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> mmm a / Marlin / src / config / examples / SCARA / Configuration . h <nl> ppp b / Marlin / src / config / examples / SCARA / Configuration . h <nl> <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Bed Leveling = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> - / / @ section bedlevel <nl> + / / @ section calibrate <nl> <nl> / * * <nl> * Choose one of the options below to enable G29 Bed Leveling . The parameters <nl> <nl> # define HOMING_FEEDRATE_XY ( 40 * 60 ) <nl> # define HOMING_FEEDRATE_Z ( 10 * 60 ) <nl> <nl> + / / @ section calibrate <nl> + <nl> + / * * <nl> + * Bed Skew Compensation <nl> + * <nl> + * This feature corrects for misalignment in the XYZ axes . <nl> + * <nl> + * Take the following steps to get the bed skew in the XY plane : <nl> + * 1 . Print a test square ( e . g . , https : / / www . thingiverse . com / thing : 2563185 ) <nl> + * 2 . For XY_DIAG_AC measure the diagonal A to C <nl> + * 3 . For XY_DIAG_BD measure the diagonal B to D <nl> + * 4 . For XY_SIDE_AD measure the edge A to D <nl> + * <nl> + * Marlin automatically computes skew factors from these measurements . <nl> + * Skew factors may also be computed and set manually : <nl> + * <nl> + * - Compute AB : SQRT ( 2 * AC * AC + 2 * BD * BD - 4 * AD * AD ) / 2 <nl> + * - XY_SKEW_FACTOR : TAN ( PI / 2 - ACOS ( ( AC * AC - AB * AB - AD * AD ) / ( 2 * AB * AD ) ) ) <nl> + * <nl> + * If desired , follow the same procedure for XZ and YZ . <nl> + * Use these diagrams for reference : <nl> + * <nl> + * Y Z Z <nl> + * ^ Bmmmmmm - C ^ Bmmmmmm - C ^ Bmmmmmm - C <nl> + * | / / | / / | / / <nl> + * | / / | / / | / / <nl> + * | Ammmmmm - D | Ammmmmm - D | Ammmmmm - D <nl> + * + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > Y <nl> + * XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR <nl> + * / <nl> + / / # define SKEW_CORRECTION <nl> + <nl> + # if ENABLED ( SKEW_CORRECTION ) <nl> + / / Input all length measurements here : <nl> + # define XY_DIAG_AC 282 . 8427124746 <nl> + # define XY_DIAG_BD 282 . 8427124746 <nl> + # define XY_SIDE_AD 200 <nl> + <nl> + / / Or , set the default skew factors directly here <nl> + / / to override the above measurements : <nl> + # define XY_SKEW_FACTOR 0 . 0 <nl> + <nl> + / / # define SKEW_CORRECTION_FOR_Z <nl> + # if ENABLED ( SKEW_CORRECTION_FOR_Z ) <nl> + # define XZ_DIAG_AC 282 . 8427124746 <nl> + # define XZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_DIAG_AC 282 . 8427124746 <nl> + # define YZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_SIDE_AD 200 <nl> + # define XZ_SKEW_FACTOR 0 . 0 <nl> + # define YZ_SKEW_FACTOR 0 . 0 <nl> + # endif <nl> + <nl> + / / Enable this option for M852 to set skew at runtime <nl> + / / # define SKEW_CORRECTION_GCODE <nl> + # endif <nl> + <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Additional Features = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> mmm a / Marlin / src / config / examples / STM32F10 / Configuration . h <nl> ppp b / Marlin / src / config / examples / STM32F10 / Configuration . h <nl> <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Bed Leveling = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> - / / @ section bedlevel <nl> + / / @ section calibrate <nl> <nl> / * * <nl> * Choose one of the options below to enable G29 Bed Leveling . The parameters <nl> <nl> # define HOMING_FEEDRATE_XY ( 50 * 60 ) <nl> # define HOMING_FEEDRATE_Z ( 4 * 60 ) <nl> <nl> + / / @ section calibrate <nl> + <nl> + / * * <nl> + * Bed Skew Compensation <nl> + * <nl> + * This feature corrects for misalignment in the XYZ axes . <nl> + * <nl> + * Take the following steps to get the bed skew in the XY plane : <nl> + * 1 . Print a test square ( e . g . , https : / / www . thingiverse . com / thing : 2563185 ) <nl> + * 2 . For XY_DIAG_AC measure the diagonal A to C <nl> + * 3 . For XY_DIAG_BD measure the diagonal B to D <nl> + * 4 . For XY_SIDE_AD measure the edge A to D <nl> + * <nl> + * Marlin automatically computes skew factors from these measurements . <nl> + * Skew factors may also be computed and set manually : <nl> + * <nl> + * - Compute AB : SQRT ( 2 * AC * AC + 2 * BD * BD - 4 * AD * AD ) / 2 <nl> + * - XY_SKEW_FACTOR : TAN ( PI / 2 - ACOS ( ( AC * AC - AB * AB - AD * AD ) / ( 2 * AB * AD ) ) ) <nl> + * <nl> + * If desired , follow the same procedure for XZ and YZ . <nl> + * Use these diagrams for reference : <nl> + * <nl> + * Y Z Z <nl> + * ^ Bmmmmmm - C ^ Bmmmmmm - C ^ Bmmmmmm - C <nl> + * | / / | / / | / / <nl> + * | / / | / / | / / <nl> + * | Ammmmmm - D | Ammmmmm - D | Ammmmmm - D <nl> + * + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > Y <nl> + * XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR <nl> + * / <nl> + / / # define SKEW_CORRECTION <nl> + <nl> + # if ENABLED ( SKEW_CORRECTION ) <nl> + / / Input all length measurements here : <nl> + # define XY_DIAG_AC 282 . 8427124746 <nl> + # define XY_DIAG_BD 282 . 8427124746 <nl> + # define XY_SIDE_AD 200 <nl> + <nl> + / / Or , set the default skew factors directly here <nl> + / / to override the above measurements : <nl> + # define XY_SKEW_FACTOR 0 . 0 <nl> + <nl> + / / # define SKEW_CORRECTION_FOR_Z <nl> + # if ENABLED ( SKEW_CORRECTION_FOR_Z ) <nl> + # define XZ_DIAG_AC 282 . 8427124746 <nl> + # define XZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_DIAG_AC 282 . 8427124746 <nl> + # define YZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_SIDE_AD 200 <nl> + # define XZ_SKEW_FACTOR 0 . 0 <nl> + # define YZ_SKEW_FACTOR 0 . 0 <nl> + # endif <nl> + <nl> + / / Enable this option for M852 to set skew at runtime <nl> + / / # define SKEW_CORRECTION_GCODE <nl> + # endif <nl> + <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Additional Features = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> mmm a / Marlin / src / config / examples / Sanguinololu / Configuration . h <nl> ppp b / Marlin / src / config / examples / Sanguinololu / Configuration . h <nl> <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Bed Leveling = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> - / / @ section bedlevel <nl> + / / @ section calibrate <nl> <nl> / * * <nl> * Choose one of the options below to enable G29 Bed Leveling . The parameters <nl> <nl> # define HOMING_FEEDRATE_XY ( 50 * 60 ) <nl> # define HOMING_FEEDRATE_Z ( 6 * 60 ) <nl> <nl> + / / @ section calibrate <nl> + <nl> + / * * <nl> + * Bed Skew Compensation <nl> + * <nl> + * This feature corrects for misalignment in the XYZ axes . <nl> + * <nl> + * Take the following steps to get the bed skew in the XY plane : <nl> + * 1 . Print a test square ( e . g . , https : / / www . thingiverse . com / thing : 2563185 ) <nl> + * 2 . For XY_DIAG_AC measure the diagonal A to C <nl> + * 3 . For XY_DIAG_BD measure the diagonal B to D <nl> + * 4 . For XY_SIDE_AD measure the edge A to D <nl> + * <nl> + * Marlin automatically computes skew factors from these measurements . <nl> + * Skew factors may also be computed and set manually : <nl> + * <nl> + * - Compute AB : SQRT ( 2 * AC * AC + 2 * BD * BD - 4 * AD * AD ) / 2 <nl> + * - XY_SKEW_FACTOR : TAN ( PI / 2 - ACOS ( ( AC * AC - AB * AB - AD * AD ) / ( 2 * AB * AD ) ) ) <nl> + * <nl> + * If desired , follow the same procedure for XZ and YZ . <nl> + * Use these diagrams for reference : <nl> + * <nl> + * Y Z Z <nl> + * ^ Bmmmmmm - C ^ Bmmmmmm - C ^ Bmmmmmm - C <nl> + * | / / | / / | / / <nl> + * | / / | / / | / / <nl> + * | Ammmmmm - D | Ammmmmm - D | Ammmmmm - D <nl> + * + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > Y <nl> + * XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR <nl> + * / <nl> + / / # define SKEW_CORRECTION <nl> + <nl> + # if ENABLED ( SKEW_CORRECTION ) <nl> + / / Input all length measurements here : <nl> + # define XY_DIAG_AC 282 . 8427124746 <nl> + # define XY_DIAG_BD 282 . 8427124746 <nl> + # define XY_SIDE_AD 200 <nl> + <nl> + / / Or , set the default skew factors directly here <nl> + / / to override the above measurements : <nl> + # define XY_SKEW_FACTOR 0 . 0 <nl> + <nl> + / / # define SKEW_CORRECTION_FOR_Z <nl> + # if ENABLED ( SKEW_CORRECTION_FOR_Z ) <nl> + # define XZ_DIAG_AC 282 . 8427124746 <nl> + # define XZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_DIAG_AC 282 . 8427124746 <nl> + # define YZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_SIDE_AD 200 <nl> + # define XZ_SKEW_FACTOR 0 . 0 <nl> + # define YZ_SKEW_FACTOR 0 . 0 <nl> + # endif <nl> + <nl> + / / Enable this option for M852 to set skew at runtime <nl> + / / # define SKEW_CORRECTION_GCODE <nl> + # endif <nl> + <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Additional Features = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> mmm a / Marlin / src / config / examples / TinyBoy2 / Configuration . h <nl> ppp b / Marlin / src / config / examples / TinyBoy2 / Configuration . h <nl> <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Bed Leveling = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> - / / @ section bedlevel <nl> + / / @ section calibrate <nl> <nl> / * * <nl> * Choose one of the options below to enable G29 Bed Leveling . The parameters <nl> <nl> # define HOMING_FEEDRATE_XY ( 40 * 60 ) <nl> # define HOMING_FEEDRATE_Z ( 3 * 60 ) <nl> <nl> + / / @ section calibrate <nl> + <nl> + / * * <nl> + * Bed Skew Compensation <nl> + * <nl> + * This feature corrects for misalignment in the XYZ axes . <nl> + * <nl> + * Take the following steps to get the bed skew in the XY plane : <nl> + * 1 . Print a test square ( e . g . , https : / / www . thingiverse . com / thing : 2563185 ) <nl> + * 2 . For XY_DIAG_AC measure the diagonal A to C <nl> + * 3 . For XY_DIAG_BD measure the diagonal B to D <nl> + * 4 . For XY_SIDE_AD measure the edge A to D <nl> + * <nl> + * Marlin automatically computes skew factors from these measurements . <nl> + * Skew factors may also be computed and set manually : <nl> + * <nl> + * - Compute AB : SQRT ( 2 * AC * AC + 2 * BD * BD - 4 * AD * AD ) / 2 <nl> + * - XY_SKEW_FACTOR : TAN ( PI / 2 - ACOS ( ( AC * AC - AB * AB - AD * AD ) / ( 2 * AB * AD ) ) ) <nl> + * <nl> + * If desired , follow the same procedure for XZ and YZ . <nl> + * Use these diagrams for reference : <nl> + * <nl> + * Y Z Z <nl> + * ^ Bmmmmmm - C ^ Bmmmmmm - C ^ Bmmmmmm - C <nl> + * | / / | / / | / / <nl> + * | / / | / / | / / <nl> + * | Ammmmmm - D | Ammmmmm - D | Ammmmmm - D <nl> + * + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > Y <nl> + * XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR <nl> + * / <nl> + / / # define SKEW_CORRECTION <nl> + <nl> + # if ENABLED ( SKEW_CORRECTION ) <nl> + / / Input all length measurements here : <nl> + # define XY_DIAG_AC 282 . 8427124746 <nl> + # define XY_DIAG_BD 282 . 8427124746 <nl> + # define XY_SIDE_AD 200 <nl> + <nl> + / / Or , set the default skew factors directly here <nl> + / / to override the above measurements : <nl> + # define XY_SKEW_FACTOR 0 . 0 <nl> + <nl> + / / # define SKEW_CORRECTION_FOR_Z <nl> + # if ENABLED ( SKEW_CORRECTION_FOR_Z ) <nl> + # define XZ_DIAG_AC 282 . 8427124746 <nl> + # define XZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_DIAG_AC 282 . 8427124746 <nl> + # define YZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_SIDE_AD 200 <nl> + # define XZ_SKEW_FACTOR 0 . 0 <nl> + # define YZ_SKEW_FACTOR 0 . 0 <nl> + # endif <nl> + <nl> + / / Enable this option for M852 to set skew at runtime <nl> + / / # define SKEW_CORRECTION_GCODE <nl> + # endif <nl> + <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Additional Features = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> mmm a / Marlin / src / config / examples / UltiMachine / Archim2 / Configuration . h <nl> ppp b / Marlin / src / config / examples / UltiMachine / Archim2 / Configuration . h <nl> <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Bed Leveling = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> - / / @ section bedlevel <nl> + / / @ section calibrate <nl> <nl> / * * <nl> * Choose one of the options below to enable G29 Bed Leveling . The parameters <nl> <nl> # define HOMING_FEEDRATE_XY ( 50 * 60 ) <nl> # define HOMING_FEEDRATE_Z ( 4 * 60 ) <nl> <nl> + / / @ section calibrate <nl> + <nl> + / * * <nl> + * Bed Skew Compensation <nl> + * <nl> + * This feature corrects for misalignment in the XYZ axes . <nl> + * <nl> + * Take the following steps to get the bed skew in the XY plane : <nl> + * 1 . Print a test square ( e . g . , https : / / www . thingiverse . com / thing : 2563185 ) <nl> + * 2 . For XY_DIAG_AC measure the diagonal A to C <nl> + * 3 . For XY_DIAG_BD measure the diagonal B to D <nl> + * 4 . For XY_SIDE_AD measure the edge A to D <nl> + * <nl> + * Marlin automatically computes skew factors from these measurements . <nl> + * Skew factors may also be computed and set manually : <nl> + * <nl> + * - Compute AB : SQRT ( 2 * AC * AC + 2 * BD * BD - 4 * AD * AD ) / 2 <nl> + * - XY_SKEW_FACTOR : TAN ( PI / 2 - ACOS ( ( AC * AC - AB * AB - AD * AD ) / ( 2 * AB * AD ) ) ) <nl> + * <nl> + * If desired , follow the same procedure for XZ and YZ . <nl> + * Use these diagrams for reference : <nl> + * <nl> + * Y Z Z <nl> + * ^ Bmmmmmm - C ^ Bmmmmmm - C ^ Bmmmmmm - C <nl> + * | / / | / / | / / <nl> + * | / / | / / | / / <nl> + * | Ammmmmm - D | Ammmmmm - D | Ammmmmm - D <nl> + * + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > Y <nl> + * XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR <nl> + * / <nl> + / / # define SKEW_CORRECTION <nl> + <nl> + # if ENABLED ( SKEW_CORRECTION ) <nl> + / / Input all length measurements here : <nl> + # define XY_DIAG_AC 282 . 8427124746 <nl> + # define XY_DIAG_BD 282 . 8427124746 <nl> + # define XY_SIDE_AD 200 <nl> + <nl> + / / Or , set the default skew factors directly here <nl> + / / to override the above measurements : <nl> + # define XY_SKEW_FACTOR 0 . 0 <nl> + <nl> + / / # define SKEW_CORRECTION_FOR_Z <nl> + # if ENABLED ( SKEW_CORRECTION_FOR_Z ) <nl> + # define XZ_DIAG_AC 282 . 8427124746 <nl> + # define XZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_DIAG_AC 282 . 8427124746 <nl> + # define YZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_SIDE_AD 200 <nl> + # define XZ_SKEW_FACTOR 0 . 0 <nl> + # define YZ_SKEW_FACTOR 0 . 0 <nl> + # endif <nl> + <nl> + / / Enable this option for M852 to set skew at runtime <nl> + / / # define SKEW_CORRECTION_GCODE <nl> + # endif <nl> + <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Additional Features = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> mmm a / Marlin / src / config / examples / Velleman / K8200 / Configuration . h <nl> ppp b / Marlin / src / config / examples / Velleman / K8200 / Configuration . h <nl> <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Bed Leveling = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> - / / @ section bedlevel <nl> + / / @ section calibrate <nl> <nl> / * * <nl> * Choose one of the options below to enable G29 Bed Leveling . The parameters <nl> <nl> # define HOMING_FEEDRATE_XY ( 50 * 60 ) <nl> # define HOMING_FEEDRATE_Z ( 4 * 60 ) <nl> <nl> + / / @ section calibrate <nl> + <nl> + / * * <nl> + * Bed Skew Compensation <nl> + * <nl> + * This feature corrects for misalignment in the XYZ axes . <nl> + * <nl> + * Take the following steps to get the bed skew in the XY plane : <nl> + * 1 . Print a test square ( e . g . , https : / / www . thingiverse . com / thing : 2563185 ) <nl> + * 2 . For XY_DIAG_AC measure the diagonal A to C <nl> + * 3 . For XY_DIAG_BD measure the diagonal B to D <nl> + * 4 . For XY_SIDE_AD measure the edge A to D <nl> + * <nl> + * Marlin automatically computes skew factors from these measurements . <nl> + * Skew factors may also be computed and set manually : <nl> + * <nl> + * - Compute AB : SQRT ( 2 * AC * AC + 2 * BD * BD - 4 * AD * AD ) / 2 <nl> + * - XY_SKEW_FACTOR : TAN ( PI / 2 - ACOS ( ( AC * AC - AB * AB - AD * AD ) / ( 2 * AB * AD ) ) ) <nl> + * <nl> + * If desired , follow the same procedure for XZ and YZ . <nl> + * Use these diagrams for reference : <nl> + * <nl> + * Y Z Z <nl> + * ^ Bmmmmmm - C ^ Bmmmmmm - C ^ Bmmmmmm - C <nl> + * | / / | / / | / / <nl> + * | / / | / / | / / <nl> + * | Ammmmmm - D | Ammmmmm - D | Ammmmmm - D <nl> + * + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > Y <nl> + * XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR <nl> + * / <nl> + / / # define SKEW_CORRECTION <nl> + <nl> + # if ENABLED ( SKEW_CORRECTION ) <nl> + / / Input all length measurements here : <nl> + # define XY_DIAG_AC 282 . 8427124746 <nl> + # define XY_DIAG_BD 282 . 8427124746 <nl> + # define XY_SIDE_AD 200 <nl> + <nl> + / / Or , set the default skew factors directly here <nl> + / / to override the above measurements : <nl> + # define XY_SKEW_FACTOR 0 . 0 <nl> + <nl> + / / # define SKEW_CORRECTION_FOR_Z <nl> + # if ENABLED ( SKEW_CORRECTION_FOR_Z ) <nl> + # define XZ_DIAG_AC 282 . 8427124746 <nl> + # define XZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_DIAG_AC 282 . 8427124746 <nl> + # define YZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_SIDE_AD 200 <nl> + # define XZ_SKEW_FACTOR 0 . 0 <nl> + # define YZ_SKEW_FACTOR 0 . 0 <nl> + # endif <nl> + <nl> + / / Enable this option for M852 to set skew at runtime <nl> + / / # define SKEW_CORRECTION_GCODE <nl> + # endif <nl> + <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Additional Features = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> mmm a / Marlin / src / config / examples / Velleman / K8400 / Configuration . h <nl> ppp b / Marlin / src / config / examples / Velleman / K8400 / Configuration . h <nl> <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Bed Leveling = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> - / / @ section bedlevel <nl> + / / @ section calibrate <nl> <nl> / * * <nl> * Choose one of the options below to enable G29 Bed Leveling . The parameters <nl> <nl> # define HOMING_FEEDRATE_XY ( 50 * 60 ) <nl> # define HOMING_FEEDRATE_Z ( 8 * 60 ) <nl> <nl> + / / @ section calibrate <nl> + <nl> + / * * <nl> + * Bed Skew Compensation <nl> + * <nl> + * This feature corrects for misalignment in the XYZ axes . <nl> + * <nl> + * Take the following steps to get the bed skew in the XY plane : <nl> + * 1 . Print a test square ( e . g . , https : / / www . thingiverse . com / thing : 2563185 ) <nl> + * 2 . For XY_DIAG_AC measure the diagonal A to C <nl> + * 3 . For XY_DIAG_BD measure the diagonal B to D <nl> + * 4 . For XY_SIDE_AD measure the edge A to D <nl> + * <nl> + * Marlin automatically computes skew factors from these measurements . <nl> + * Skew factors may also be computed and set manually : <nl> + * <nl> + * - Compute AB : SQRT ( 2 * AC * AC + 2 * BD * BD - 4 * AD * AD ) / 2 <nl> + * - XY_SKEW_FACTOR : TAN ( PI / 2 - ACOS ( ( AC * AC - AB * AB - AD * AD ) / ( 2 * AB * AD ) ) ) <nl> + * <nl> + * If desired , follow the same procedure for XZ and YZ . <nl> + * Use these diagrams for reference : <nl> + * <nl> + * Y Z Z <nl> + * ^ Bmmmmmm - C ^ Bmmmmmm - C ^ Bmmmmmm - C <nl> + * | / / | / / | / / <nl> + * | / / | / / | / / <nl> + * | Ammmmmm - D | Ammmmmm - D | Ammmmmm - D <nl> + * + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > Y <nl> + * XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR <nl> + * / <nl> + / / # define SKEW_CORRECTION <nl> + <nl> + # if ENABLED ( SKEW_CORRECTION ) <nl> + / / Input all length measurements here : <nl> + # define XY_DIAG_AC 282 . 8427124746 <nl> + # define XY_DIAG_BD 282 . 8427124746 <nl> + # define XY_SIDE_AD 200 <nl> + <nl> + / / Or , set the default skew factors directly here <nl> + / / to override the above measurements : <nl> + # define XY_SKEW_FACTOR 0 . 0 <nl> + <nl> + / / # define SKEW_CORRECTION_FOR_Z <nl> + # if ENABLED ( SKEW_CORRECTION_FOR_Z ) <nl> + # define XZ_DIAG_AC 282 . 8427124746 <nl> + # define XZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_DIAG_AC 282 . 8427124746 <nl> + # define YZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_SIDE_AD 200 <nl> + # define XZ_SKEW_FACTOR 0 . 0 <nl> + # define YZ_SKEW_FACTOR 0 . 0 <nl> + # endif <nl> + <nl> + / / Enable this option for M852 to set skew at runtime <nl> + / / # define SKEW_CORRECTION_GCODE <nl> + # endif <nl> + <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Additional Features = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> mmm a / Marlin / src / config / examples / Velleman / K8400 / Dual - head / Configuration . h <nl> ppp b / Marlin / src / config / examples / Velleman / K8400 / Dual - head / Configuration . h <nl> <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Bed Leveling = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> - / / @ section bedlevel <nl> + / / @ section calibrate <nl> <nl> / * * <nl> * Choose one of the options below to enable G29 Bed Leveling . The parameters <nl> <nl> # define HOMING_FEEDRATE_XY ( 50 * 60 ) <nl> # define HOMING_FEEDRATE_Z ( 8 * 60 ) <nl> <nl> + / / @ section calibrate <nl> + <nl> + / * * <nl> + * Bed Skew Compensation <nl> + * <nl> + * This feature corrects for misalignment in the XYZ axes . <nl> + * <nl> + * Take the following steps to get the bed skew in the XY plane : <nl> + * 1 . Print a test square ( e . g . , https : / / www . thingiverse . com / thing : 2563185 ) <nl> + * 2 . For XY_DIAG_AC measure the diagonal A to C <nl> + * 3 . For XY_DIAG_BD measure the diagonal B to D <nl> + * 4 . For XY_SIDE_AD measure the edge A to D <nl> + * <nl> + * Marlin automatically computes skew factors from these measurements . <nl> + * Skew factors may also be computed and set manually : <nl> + * <nl> + * - Compute AB : SQRT ( 2 * AC * AC + 2 * BD * BD - 4 * AD * AD ) / 2 <nl> + * - XY_SKEW_FACTOR : TAN ( PI / 2 - ACOS ( ( AC * AC - AB * AB - AD * AD ) / ( 2 * AB * AD ) ) ) <nl> + * <nl> + * If desired , follow the same procedure for XZ and YZ . <nl> + * Use these diagrams for reference : <nl> + * <nl> + * Y Z Z <nl> + * ^ Bmmmmmm - C ^ Bmmmmmm - C ^ Bmmmmmm - C <nl> + * | / / | / / | / / <nl> + * | / / | / / | / / <nl> + * | Ammmmmm - D | Ammmmmm - D | Ammmmmm - D <nl> + * + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > Y <nl> + * XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR <nl> + * / <nl> + / / # define SKEW_CORRECTION <nl> + <nl> + # if ENABLED ( SKEW_CORRECTION ) <nl> + / / Input all length measurements here : <nl> + # define XY_DIAG_AC 282 . 8427124746 <nl> + # define XY_DIAG_BD 282 . 8427124746 <nl> + # define XY_SIDE_AD 200 <nl> + <nl> + / / Or , set the default skew factors directly here <nl> + / / to override the above measurements : <nl> + # define XY_SKEW_FACTOR 0 . 0 <nl> + <nl> + / / # define SKEW_CORRECTION_FOR_Z <nl> + # if ENABLED ( SKEW_CORRECTION_FOR_Z ) <nl> + # define XZ_DIAG_AC 282 . 8427124746 <nl> + # define XZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_DIAG_AC 282 . 8427124746 <nl> + # define YZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_SIDE_AD 200 <nl> + # define XZ_SKEW_FACTOR 0 . 0 <nl> + # define YZ_SKEW_FACTOR 0 . 0 <nl> + # endif <nl> + <nl> + / / Enable this option for M852 to set skew at runtime <nl> + / / # define SKEW_CORRECTION_GCODE <nl> + # endif <nl> + <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Additional Features = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> mmm a / Marlin / src / config / examples / adafruit / ST7565 / Configuration . h <nl> ppp b / Marlin / src / config / examples / adafruit / ST7565 / Configuration . h <nl> <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Bed Leveling = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> - / / @ section bedlevel <nl> + / / @ section calibrate <nl> <nl> / * * <nl> * Choose one of the options below to enable G29 Bed Leveling . The parameters <nl> <nl> # define HOMING_FEEDRATE_XY ( 50 * 60 ) <nl> # define HOMING_FEEDRATE_Z ( 4 * 60 ) <nl> <nl> + / / @ section calibrate <nl> + <nl> + / * * <nl> + * Bed Skew Compensation <nl> + * <nl> + * This feature corrects for misalignment in the XYZ axes . <nl> + * <nl> + * Take the following steps to get the bed skew in the XY plane : <nl> + * 1 . Print a test square ( e . g . , https : / / www . thingiverse . com / thing : 2563185 ) <nl> + * 2 . For XY_DIAG_AC measure the diagonal A to C <nl> + * 3 . For XY_DIAG_BD measure the diagonal B to D <nl> + * 4 . For XY_SIDE_AD measure the edge A to D <nl> + * <nl> + * Marlin automatically computes skew factors from these measurements . <nl> + * Skew factors may also be computed and set manually : <nl> + * <nl> + * - Compute AB : SQRT ( 2 * AC * AC + 2 * BD * BD - 4 * AD * AD ) / 2 <nl> + * - XY_SKEW_FACTOR : TAN ( PI / 2 - ACOS ( ( AC * AC - AB * AB - AD * AD ) / ( 2 * AB * AD ) ) ) <nl> + * <nl> + * If desired , follow the same procedure for XZ and YZ . <nl> + * Use these diagrams for reference : <nl> + * <nl> + * Y Z Z <nl> + * ^ Bmmmmmm - C ^ Bmmmmmm - C ^ Bmmmmmm - C <nl> + * | / / | / / | / / <nl> + * | / / | / / | / / <nl> + * | Ammmmmm - D | Ammmmmm - D | Ammmmmm - D <nl> + * + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > Y <nl> + * XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR <nl> + * / <nl> + / / # define SKEW_CORRECTION <nl> + <nl> + # if ENABLED ( SKEW_CORRECTION ) <nl> + / / Input all length measurements here : <nl> + # define XY_DIAG_AC 282 . 8427124746 <nl> + # define XY_DIAG_BD 282 . 8427124746 <nl> + # define XY_SIDE_AD 200 <nl> + <nl> + / / Or , set the default skew factors directly here <nl> + / / to override the above measurements : <nl> + # define XY_SKEW_FACTOR 0 . 0 <nl> + <nl> + / / # define SKEW_CORRECTION_FOR_Z <nl> + # if ENABLED ( SKEW_CORRECTION_FOR_Z ) <nl> + # define XZ_DIAG_AC 282 . 8427124746 <nl> + # define XZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_DIAG_AC 282 . 8427124746 <nl> + # define YZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_SIDE_AD 200 <nl> + # define XZ_SKEW_FACTOR 0 . 0 <nl> + # define YZ_SKEW_FACTOR 0 . 0 <nl> + # endif <nl> + <nl> + / / Enable this option for M852 to set skew at runtime <nl> + / / # define SKEW_CORRECTION_GCODE <nl> + # endif <nl> + <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Additional Features = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> mmm a / Marlin / src / config / examples / delta / FLSUN / auto_calibrate / Configuration . h <nl> ppp b / Marlin / src / config / examples / delta / FLSUN / auto_calibrate / Configuration . h <nl> <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Bed Leveling = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> - / / @ section bedlevel <nl> + / / @ section calibrate <nl> <nl> / * * <nl> * Choose one of the options below to enable G29 Bed Leveling . The parameters <nl> <nl> / / Delta only homes to Z <nl> # define HOMING_FEEDRATE_Z ( 100 * 60 ) <nl> <nl> + / / @ section calibrate <nl> + <nl> + / * * <nl> + * Bed Skew Compensation <nl> + * <nl> + * This feature corrects for misalignment in the XYZ axes . <nl> + * <nl> + * Take the following steps to get the bed skew in the XY plane : <nl> + * 1 . Print a test square ( e . g . , https : / / www . thingiverse . com / thing : 2563185 ) <nl> + * 2 . For XY_DIAG_AC measure the diagonal A to C <nl> + * 3 . For XY_DIAG_BD measure the diagonal B to D <nl> + * 4 . For XY_SIDE_AD measure the edge A to D <nl> + * <nl> + * Marlin automatically computes skew factors from these measurements . <nl> + * Skew factors may also be computed and set manually : <nl> + * <nl> + * - Compute AB : SQRT ( 2 * AC * AC + 2 * BD * BD - 4 * AD * AD ) / 2 <nl> + * - XY_SKEW_FACTOR : TAN ( PI / 2 - ACOS ( ( AC * AC - AB * AB - AD * AD ) / ( 2 * AB * AD ) ) ) <nl> + * <nl> + * If desired , follow the same procedure for XZ and YZ . <nl> + * Use these diagrams for reference : <nl> + * <nl> + * Y Z Z <nl> + * ^ Bmmmmmm - C ^ Bmmmmmm - C ^ Bmmmmmm - C <nl> + * | / / | / / | / / <nl> + * | / / | / / | / / <nl> + * | Ammmmmm - D | Ammmmmm - D | Ammmmmm - D <nl> + * + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > Y <nl> + * XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR <nl> + * / <nl> + / / # define SKEW_CORRECTION <nl> + <nl> + # if ENABLED ( SKEW_CORRECTION ) <nl> + / / Input all length measurements here : <nl> + # define XY_DIAG_AC 282 . 8427124746 <nl> + # define XY_DIAG_BD 282 . 8427124746 <nl> + # define XY_SIDE_AD 200 <nl> + <nl> + / / Or , set the default skew factors directly here <nl> + / / to override the above measurements : <nl> + # define XY_SKEW_FACTOR 0 . 0 <nl> + <nl> + / / # define SKEW_CORRECTION_FOR_Z <nl> + # if ENABLED ( SKEW_CORRECTION_FOR_Z ) <nl> + # define XZ_DIAG_AC 282 . 8427124746 <nl> + # define XZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_DIAG_AC 282 . 8427124746 <nl> + # define YZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_SIDE_AD 200 <nl> + # define XZ_SKEW_FACTOR 0 . 0 <nl> + # define YZ_SKEW_FACTOR 0 . 0 <nl> + # endif <nl> + <nl> + / / Enable this option for M852 to set skew at runtime <nl> + / / # define SKEW_CORRECTION_GCODE <nl> + # endif <nl> + <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Additional Features = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> mmm a / Marlin / src / config / examples / delta / FLSUN / kossel_mini / Configuration . h <nl> ppp b / Marlin / src / config / examples / delta / FLSUN / kossel_mini / Configuration . h <nl> <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Bed Leveling = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> - / / @ section bedlevel <nl> + / / @ section calibrate <nl> <nl> / * * <nl> * Choose one of the options below to enable G29 Bed Leveling . The parameters <nl> <nl> / / Delta only homes to Z <nl> # define HOMING_FEEDRATE_Z ( 45 * 60 ) <nl> <nl> + / / @ section calibrate <nl> + <nl> + / * * <nl> + * Bed Skew Compensation <nl> + * <nl> + * This feature corrects for misalignment in the XYZ axes . <nl> + * <nl> + * Take the following steps to get the bed skew in the XY plane : <nl> + * 1 . Print a test square ( e . g . , https : / / www . thingiverse . com / thing : 2563185 ) <nl> + * 2 . For XY_DIAG_AC measure the diagonal A to C <nl> + * 3 . For XY_DIAG_BD measure the diagonal B to D <nl> + * 4 . For XY_SIDE_AD measure the edge A to D <nl> + * <nl> + * Marlin automatically computes skew factors from these measurements . <nl> + * Skew factors may also be computed and set manually : <nl> + * <nl> + * - Compute AB : SQRT ( 2 * AC * AC + 2 * BD * BD - 4 * AD * AD ) / 2 <nl> + * - XY_SKEW_FACTOR : TAN ( PI / 2 - ACOS ( ( AC * AC - AB * AB - AD * AD ) / ( 2 * AB * AD ) ) ) <nl> + * <nl> + * If desired , follow the same procedure for XZ and YZ . <nl> + * Use these diagrams for reference : <nl> + * <nl> + * Y Z Z <nl> + * ^ Bmmmmmm - C ^ Bmmmmmm - C ^ Bmmmmmm - C <nl> + * | / / | / / | / / <nl> + * | / / | / / | / / <nl> + * | Ammmmmm - D | Ammmmmm - D | Ammmmmm - D <nl> + * + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > Y <nl> + * XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR <nl> + * / <nl> + / / # define SKEW_CORRECTION <nl> + <nl> + # if ENABLED ( SKEW_CORRECTION ) <nl> + / / Input all length measurements here : <nl> + # define XY_DIAG_AC 282 . 8427124746 <nl> + # define XY_DIAG_BD 282 . 8427124746 <nl> + # define XY_SIDE_AD 200 <nl> + <nl> + / / Or , set the default skew factors directly here <nl> + / / to override the above measurements : <nl> + # define XY_SKEW_FACTOR 0 . 0 <nl> + <nl> + / / # define SKEW_CORRECTION_FOR_Z <nl> + # if ENABLED ( SKEW_CORRECTION_FOR_Z ) <nl> + # define XZ_DIAG_AC 282 . 8427124746 <nl> + # define XZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_DIAG_AC 282 . 8427124746 <nl> + # define YZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_SIDE_AD 200 <nl> + # define XZ_SKEW_FACTOR 0 . 0 <nl> + # define YZ_SKEW_FACTOR 0 . 0 <nl> + # endif <nl> + <nl> + / / Enable this option for M852 to set skew at runtime <nl> + / / # define SKEW_CORRECTION_GCODE <nl> + # endif <nl> + <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Additional Features = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> mmm a / Marlin / src / config / examples / delta / generic / Configuration . h <nl> ppp b / Marlin / src / config / examples / delta / generic / Configuration . h <nl> <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Bed Leveling = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> - / / @ section bedlevel <nl> + / / @ section calibrate <nl> <nl> / * * <nl> * Choose one of the options below to enable G29 Bed Leveling . The parameters <nl> <nl> / / Delta only homes to Z <nl> # define HOMING_FEEDRATE_Z ( 200 * 60 ) <nl> <nl> + / / @ section calibrate <nl> + <nl> + / * * <nl> + * Bed Skew Compensation <nl> + * <nl> + * This feature corrects for misalignment in the XYZ axes . <nl> + * <nl> + * Take the following steps to get the bed skew in the XY plane : <nl> + * 1 . Print a test square ( e . g . , https : / / www . thingiverse . com / thing : 2563185 ) <nl> + * 2 . For XY_DIAG_AC measure the diagonal A to C <nl> + * 3 . For XY_DIAG_BD measure the diagonal B to D <nl> + * 4 . For XY_SIDE_AD measure the edge A to D <nl> + * <nl> + * Marlin automatically computes skew factors from these measurements . <nl> + * Skew factors may also be computed and set manually : <nl> + * <nl> + * - Compute AB : SQRT ( 2 * AC * AC + 2 * BD * BD - 4 * AD * AD ) / 2 <nl> + * - XY_SKEW_FACTOR : TAN ( PI / 2 - ACOS ( ( AC * AC - AB * AB - AD * AD ) / ( 2 * AB * AD ) ) ) <nl> + * <nl> + * If desired , follow the same procedure for XZ and YZ . <nl> + * Use these diagrams for reference : <nl> + * <nl> + * Y Z Z <nl> + * ^ Bmmmmmm - C ^ Bmmmmmm - C ^ Bmmmmmm - C <nl> + * | / / | / / | / / <nl> + * | / / | / / | / / <nl> + * | Ammmmmm - D | Ammmmmm - D | Ammmmmm - D <nl> + * + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > Y <nl> + * XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR <nl> + * / <nl> + / / # define SKEW_CORRECTION <nl> + <nl> + # if ENABLED ( SKEW_CORRECTION ) <nl> + / / Input all length measurements here : <nl> + # define XY_DIAG_AC 282 . 8427124746 <nl> + # define XY_DIAG_BD 282 . 8427124746 <nl> + # define XY_SIDE_AD 200 <nl> + <nl> + / / Or , set the default skew factors directly here <nl> + / / to override the above measurements : <nl> + # define XY_SKEW_FACTOR 0 . 0 <nl> + <nl> + / / # define SKEW_CORRECTION_FOR_Z <nl> + # if ENABLED ( SKEW_CORRECTION_FOR_Z ) <nl> + # define XZ_DIAG_AC 282 . 8427124746 <nl> + # define XZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_DIAG_AC 282 . 8427124746 <nl> + # define YZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_SIDE_AD 200 <nl> + # define XZ_SKEW_FACTOR 0 . 0 <nl> + # define YZ_SKEW_FACTOR 0 . 0 <nl> + # endif <nl> + <nl> + / / Enable this option for M852 to set skew at runtime <nl> + / / # define SKEW_CORRECTION_GCODE <nl> + # endif <nl> + <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Additional Features = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> mmm a / Marlin / src / config / examples / delta / kossel_mini / Configuration . h <nl> ppp b / Marlin / src / config / examples / delta / kossel_mini / Configuration . h <nl> <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Bed Leveling = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> - / / @ section bedlevel <nl> + / / @ section calibrate <nl> <nl> / * * <nl> * Choose one of the options below to enable G29 Bed Leveling . The parameters <nl> <nl> / / Delta only homes to Z <nl> # define HOMING_FEEDRATE_Z ( 200 * 60 ) <nl> <nl> + / / @ section calibrate <nl> + <nl> + / * * <nl> + * Bed Skew Compensation <nl> + * <nl> + * This feature corrects for misalignment in the XYZ axes . <nl> + * <nl> + * Take the following steps to get the bed skew in the XY plane : <nl> + * 1 . Print a test square ( e . g . , https : / / www . thingiverse . com / thing : 2563185 ) <nl> + * 2 . For XY_DIAG_AC measure the diagonal A to C <nl> + * 3 . For XY_DIAG_BD measure the diagonal B to D <nl> + * 4 . For XY_SIDE_AD measure the edge A to D <nl> + * <nl> + * Marlin automatically computes skew factors from these measurements . <nl> + * Skew factors may also be computed and set manually : <nl> + * <nl> + * - Compute AB : SQRT ( 2 * AC * AC + 2 * BD * BD - 4 * AD * AD ) / 2 <nl> + * - XY_SKEW_FACTOR : TAN ( PI / 2 - ACOS ( ( AC * AC - AB * AB - AD * AD ) / ( 2 * AB * AD ) ) ) <nl> + * <nl> + * If desired , follow the same procedure for XZ and YZ . <nl> + * Use these diagrams for reference : <nl> + * <nl> + * Y Z Z <nl> + * ^ Bmmmmmm - C ^ Bmmmmmm - C ^ Bmmmmmm - C <nl> + * | / / | / / | / / <nl> + * | / / | / / | / / <nl> + * | Ammmmmm - D | Ammmmmm - D | Ammmmmm - D <nl> + * + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > Y <nl> + * XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR <nl> + * / <nl> + / / # define SKEW_CORRECTION <nl> + <nl> + # if ENABLED ( SKEW_CORRECTION ) <nl> + / / Input all length measurements here : <nl> + # define XY_DIAG_AC 282 . 8427124746 <nl> + # define XY_DIAG_BD 282 . 8427124746 <nl> + # define XY_SIDE_AD 200 <nl> + <nl> + / / Or , set the default skew factors directly here <nl> + / / to override the above measurements : <nl> + # define XY_SKEW_FACTOR 0 . 0 <nl> + <nl> + / / # define SKEW_CORRECTION_FOR_Z <nl> + # if ENABLED ( SKEW_CORRECTION_FOR_Z ) <nl> + # define XZ_DIAG_AC 282 . 8427124746 <nl> + # define XZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_DIAG_AC 282 . 8427124746 <nl> + # define YZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_SIDE_AD 200 <nl> + # define XZ_SKEW_FACTOR 0 . 0 <nl> + # define YZ_SKEW_FACTOR 0 . 0 <nl> + # endif <nl> + <nl> + / / Enable this option for M852 to set skew at runtime <nl> + / / # define SKEW_CORRECTION_GCODE <nl> + # endif <nl> + <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Additional Features = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> mmm a / Marlin / src / config / examples / delta / kossel_pro / Configuration . h <nl> ppp b / Marlin / src / config / examples / delta / kossel_pro / Configuration . h <nl> <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Bed Leveling = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> - / / @ section bedlevel <nl> + / / @ section calibrate <nl> <nl> / * * <nl> * Choose one of the options below to enable G29 Bed Leveling . The parameters <nl> <nl> / / Delta only homes to Z <nl> # define HOMING_FEEDRATE_Z ( 200 * 60 ) <nl> <nl> + / / @ section calibrate <nl> + <nl> + / * * <nl> + * Bed Skew Compensation <nl> + * <nl> + * This feature corrects for misalignment in the XYZ axes . <nl> + * <nl> + * Take the following steps to get the bed skew in the XY plane : <nl> + * 1 . Print a test square ( e . g . , https : / / www . thingiverse . com / thing : 2563185 ) <nl> + * 2 . For XY_DIAG_AC measure the diagonal A to C <nl> + * 3 . For XY_DIAG_BD measure the diagonal B to D <nl> + * 4 . For XY_SIDE_AD measure the edge A to D <nl> + * <nl> + * Marlin automatically computes skew factors from these measurements . <nl> + * Skew factors may also be computed and set manually : <nl> + * <nl> + * - Compute AB : SQRT ( 2 * AC * AC + 2 * BD * BD - 4 * AD * AD ) / 2 <nl> + * - XY_SKEW_FACTOR : TAN ( PI / 2 - ACOS ( ( AC * AC - AB * AB - AD * AD ) / ( 2 * AB * AD ) ) ) <nl> + * <nl> + * If desired , follow the same procedure for XZ and YZ . <nl> + * Use these diagrams for reference : <nl> + * <nl> + * Y Z Z <nl> + * ^ Bmmmmmm - C ^ Bmmmmmm - C ^ Bmmmmmm - C <nl> + * | / / | / / | / / <nl> + * | / / | / / | / / <nl> + * | Ammmmmm - D | Ammmmmm - D | Ammmmmm - D <nl> + * + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > Y <nl> + * XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR <nl> + * / <nl> + / / # define SKEW_CORRECTION <nl> + <nl> + # if ENABLED ( SKEW_CORRECTION ) <nl> + / / Input all length measurements here : <nl> + # define XY_DIAG_AC 282 . 8427124746 <nl> + # define XY_DIAG_BD 282 . 8427124746 <nl> + # define XY_SIDE_AD 200 <nl> + <nl> + / / Or , set the default skew factors directly here <nl> + / / to override the above measurements : <nl> + # define XY_SKEW_FACTOR 0 . 0 <nl> + <nl> + / / # define SKEW_CORRECTION_FOR_Z <nl> + # if ENABLED ( SKEW_CORRECTION_FOR_Z ) <nl> + # define XZ_DIAG_AC 282 . 8427124746 <nl> + # define XZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_DIAG_AC 282 . 8427124746 <nl> + # define YZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_SIDE_AD 200 <nl> + # define XZ_SKEW_FACTOR 0 . 0 <nl> + # define YZ_SKEW_FACTOR 0 . 0 <nl> + # endif <nl> + <nl> + / / Enable this option for M852 to set skew at runtime <nl> + / / # define SKEW_CORRECTION_GCODE <nl> + # endif <nl> + <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Additional Features = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> mmm a / Marlin / src / config / examples / delta / kossel_xl / Configuration . h <nl> ppp b / Marlin / src / config / examples / delta / kossel_xl / Configuration . h <nl> <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Bed Leveling = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> - / / @ section bedlevel <nl> + / / @ section calibrate <nl> <nl> / * * <nl> * Choose one of the options below to enable G29 Bed Leveling . The parameters <nl> <nl> / / Delta only homes to Z <nl> # define HOMING_FEEDRATE_Z ( 60 * 60 ) <nl> <nl> + / / @ section calibrate <nl> + <nl> + / * * <nl> + * Bed Skew Compensation <nl> + * <nl> + * This feature corrects for misalignment in the XYZ axes . <nl> + * <nl> + * Take the following steps to get the bed skew in the XY plane : <nl> + * 1 . Print a test square ( e . g . , https : / / www . thingiverse . com / thing : 2563185 ) <nl> + * 2 . For XY_DIAG_AC measure the diagonal A to C <nl> + * 3 . For XY_DIAG_BD measure the diagonal B to D <nl> + * 4 . For XY_SIDE_AD measure the edge A to D <nl> + * <nl> + * Marlin automatically computes skew factors from these measurements . <nl> + * Skew factors may also be computed and set manually : <nl> + * <nl> + * - Compute AB : SQRT ( 2 * AC * AC + 2 * BD * BD - 4 * AD * AD ) / 2 <nl> + * - XY_SKEW_FACTOR : TAN ( PI / 2 - ACOS ( ( AC * AC - AB * AB - AD * AD ) / ( 2 * AB * AD ) ) ) <nl> + * <nl> + * If desired , follow the same procedure for XZ and YZ . <nl> + * Use these diagrams for reference : <nl> + * <nl> + * Y Z Z <nl> + * ^ Bmmmmmm - C ^ Bmmmmmm - C ^ Bmmmmmm - C <nl> + * | / / | / / | / / <nl> + * | / / | / / | / / <nl> + * | Ammmmmm - D | Ammmmmm - D | Ammmmmm - D <nl> + * + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > Y <nl> + * XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR <nl> + * / <nl> + / / # define SKEW_CORRECTION <nl> + <nl> + # if ENABLED ( SKEW_CORRECTION ) <nl> + / / Input all length measurements here : <nl> + # define XY_DIAG_AC 282 . 8427124746 <nl> + # define XY_DIAG_BD 282 . 8427124746 <nl> + # define XY_SIDE_AD 200 <nl> + <nl> + / / Or , set the default skew factors directly here <nl> + / / to override the above measurements : <nl> + # define XY_SKEW_FACTOR 0 . 0 <nl> + <nl> + / / # define SKEW_CORRECTION_FOR_Z <nl> + # if ENABLED ( SKEW_CORRECTION_FOR_Z ) <nl> + # define XZ_DIAG_AC 282 . 8427124746 <nl> + # define XZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_DIAG_AC 282 . 8427124746 <nl> + # define YZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_SIDE_AD 200 <nl> + # define XZ_SKEW_FACTOR 0 . 0 <nl> + # define YZ_SKEW_FACTOR 0 . 0 <nl> + # endif <nl> + <nl> + / / Enable this option for M852 to set skew at runtime <nl> + / / # define SKEW_CORRECTION_GCODE <nl> + # endif <nl> + <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Additional Features = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> mmm a / Marlin / src / config / examples / gCreate / gMax1 . 5 + / Configuration . h <nl> ppp b / Marlin / src / config / examples / gCreate / gMax1 . 5 + / Configuration . h <nl> <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Bed Leveling = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> - / / @ section bedlevel <nl> + / / @ section calibrate <nl> <nl> / * * <nl> * Choose one of the options below to enable G29 Bed Leveling . The parameters <nl> <nl> # define HOMING_FEEDRATE_XY ( 60 * 60 ) <nl> # define HOMING_FEEDRATE_Z ( 14 * 60 ) <nl> <nl> + / / @ section calibrate <nl> + <nl> + / * * <nl> + * Bed Skew Compensation <nl> + * <nl> + * This feature corrects for misalignment in the XYZ axes . <nl> + * <nl> + * Take the following steps to get the bed skew in the XY plane : <nl> + * 1 . Print a test square ( e . g . , https : / / www . thingiverse . com / thing : 2563185 ) <nl> + * 2 . For XY_DIAG_AC measure the diagonal A to C <nl> + * 3 . For XY_DIAG_BD measure the diagonal B to D <nl> + * 4 . For XY_SIDE_AD measure the edge A to D <nl> + * <nl> + * Marlin automatically computes skew factors from these measurements . <nl> + * Skew factors may also be computed and set manually : <nl> + * <nl> + * - Compute AB : SQRT ( 2 * AC * AC + 2 * BD * BD - 4 * AD * AD ) / 2 <nl> + * - XY_SKEW_FACTOR : TAN ( PI / 2 - ACOS ( ( AC * AC - AB * AB - AD * AD ) / ( 2 * AB * AD ) ) ) <nl> + * <nl> + * If desired , follow the same procedure for XZ and YZ . <nl> + * Use these diagrams for reference : <nl> + * <nl> + * Y Z Z <nl> + * ^ Bmmmmmm - C ^ Bmmmmmm - C ^ Bmmmmmm - C <nl> + * | / / | / / | / / <nl> + * | / / | / / | / / <nl> + * | Ammmmmm - D | Ammmmmm - D | Ammmmmm - D <nl> + * + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > Y <nl> + * XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR <nl> + * / <nl> + / / # define SKEW_CORRECTION <nl> + <nl> + # if ENABLED ( SKEW_CORRECTION ) <nl> + / / Input all length measurements here : <nl> + # define XY_DIAG_AC 282 . 8427124746 <nl> + # define XY_DIAG_BD 282 . 8427124746 <nl> + # define XY_SIDE_AD 200 <nl> + <nl> + / / Or , set the default skew factors directly here <nl> + / / to override the above measurements : <nl> + # define XY_SKEW_FACTOR 0 . 0 <nl> + <nl> + / / # define SKEW_CORRECTION_FOR_Z <nl> + # if ENABLED ( SKEW_CORRECTION_FOR_Z ) <nl> + # define XZ_DIAG_AC 282 . 8427124746 <nl> + # define XZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_DIAG_AC 282 . 8427124746 <nl> + # define YZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_SIDE_AD 200 <nl> + # define XZ_SKEW_FACTOR 0 . 0 <nl> + # define YZ_SKEW_FACTOR 0 . 0 <nl> + # endif <nl> + <nl> + / / Enable this option for M852 to set skew at runtime <nl> + / / # define SKEW_CORRECTION_GCODE <nl> + # endif <nl> + <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Additional Features = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> mmm a / Marlin / src / config / examples / makibox / Configuration . h <nl> ppp b / Marlin / src / config / examples / makibox / Configuration . h <nl> <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Bed Leveling = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> - / / @ section bedlevel <nl> + / / @ section calibrate <nl> <nl> / * * <nl> * Choose one of the options below to enable G29 Bed Leveling . The parameters <nl> <nl> # define HOMING_FEEDRATE_XY 1500 <nl> # define HOMING_FEEDRATE_Z ( 2 * 60 ) <nl> <nl> + / / @ section calibrate <nl> + <nl> + / * * <nl> + * Bed Skew Compensation <nl> + * <nl> + * This feature corrects for misalignment in the XYZ axes . <nl> + * <nl> + * Take the following steps to get the bed skew in the XY plane : <nl> + * 1 . Print a test square ( e . g . , https : / / www . thingiverse . com / thing : 2563185 ) <nl> + * 2 . For XY_DIAG_AC measure the diagonal A to C <nl> + * 3 . For XY_DIAG_BD measure the diagonal B to D <nl> + * 4 . For XY_SIDE_AD measure the edge A to D <nl> + * <nl> + * Marlin automatically computes skew factors from these measurements . <nl> + * Skew factors may also be computed and set manually : <nl> + * <nl> + * - Compute AB : SQRT ( 2 * AC * AC + 2 * BD * BD - 4 * AD * AD ) / 2 <nl> + * - XY_SKEW_FACTOR : TAN ( PI / 2 - ACOS ( ( AC * AC - AB * AB - AD * AD ) / ( 2 * AB * AD ) ) ) <nl> + * <nl> + * If desired , follow the same procedure for XZ and YZ . <nl> + * Use these diagrams for reference : <nl> + * <nl> + * Y Z Z <nl> + * ^ Bmmmmmm - C ^ Bmmmmmm - C ^ Bmmmmmm - C <nl> + * | / / | / / | / / <nl> + * | / / | / / | / / <nl> + * | Ammmmmm - D | Ammmmmm - D | Ammmmmm - D <nl> + * + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > Y <nl> + * XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR <nl> + * / <nl> + / / # define SKEW_CORRECTION <nl> + <nl> + # if ENABLED ( SKEW_CORRECTION ) <nl> + / / Input all length measurements here : <nl> + # define XY_DIAG_AC 282 . 8427124746 <nl> + # define XY_DIAG_BD 282 . 8427124746 <nl> + # define XY_SIDE_AD 200 <nl> + <nl> + / / Or , set the default skew factors directly here <nl> + / / to override the above measurements : <nl> + # define XY_SKEW_FACTOR 0 . 0 <nl> + <nl> + / / # define SKEW_CORRECTION_FOR_Z <nl> + # if ENABLED ( SKEW_CORRECTION_FOR_Z ) <nl> + # define XZ_DIAG_AC 282 . 8427124746 <nl> + # define XZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_DIAG_AC 282 . 8427124746 <nl> + # define YZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_SIDE_AD 200 <nl> + # define XZ_SKEW_FACTOR 0 . 0 <nl> + # define YZ_SKEW_FACTOR 0 . 0 <nl> + # endif <nl> + <nl> + / / Enable this option for M852 to set skew at runtime <nl> + / / # define SKEW_CORRECTION_GCODE <nl> + # endif <nl> + <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Additional Features = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> mmm a / Marlin / src / config / examples / tvrrug / Round2 / Configuration . h <nl> ppp b / Marlin / src / config / examples / tvrrug / Round2 / Configuration . h <nl> <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Bed Leveling = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> - / / @ section bedlevel <nl> + / / @ section calibrate <nl> <nl> / * * <nl> * Choose one of the options below to enable G29 Bed Leveling . The parameters <nl> <nl> # define HOMING_FEEDRATE_XY ( 50 * 60 ) <nl> # define HOMING_FEEDRATE_Z ( 4 * 60 ) <nl> <nl> + / / @ section calibrate <nl> + <nl> + / * * <nl> + * Bed Skew Compensation <nl> + * <nl> + * This feature corrects for misalignment in the XYZ axes . <nl> + * <nl> + * Take the following steps to get the bed skew in the XY plane : <nl> + * 1 . Print a test square ( e . g . , https : / / www . thingiverse . com / thing : 2563185 ) <nl> + * 2 . For XY_DIAG_AC measure the diagonal A to C <nl> + * 3 . For XY_DIAG_BD measure the diagonal B to D <nl> + * 4 . For XY_SIDE_AD measure the edge A to D <nl> + * <nl> + * Marlin automatically computes skew factors from these measurements . <nl> + * Skew factors may also be computed and set manually : <nl> + * <nl> + * - Compute AB : SQRT ( 2 * AC * AC + 2 * BD * BD - 4 * AD * AD ) / 2 <nl> + * - XY_SKEW_FACTOR : TAN ( PI / 2 - ACOS ( ( AC * AC - AB * AB - AD * AD ) / ( 2 * AB * AD ) ) ) <nl> + * <nl> + * If desired , follow the same procedure for XZ and YZ . <nl> + * Use these diagrams for reference : <nl> + * <nl> + * Y Z Z <nl> + * ^ Bmmmmmm - C ^ Bmmmmmm - C ^ Bmmmmmm - C <nl> + * | / / | / / | / / <nl> + * | / / | / / | / / <nl> + * | Ammmmmm - D | Ammmmmm - D | Ammmmmm - D <nl> + * + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > Y <nl> + * XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR <nl> + * / <nl> + / / # define SKEW_CORRECTION <nl> + <nl> + # if ENABLED ( SKEW_CORRECTION ) <nl> + / / Input all length measurements here : <nl> + # define XY_DIAG_AC 282 . 8427124746 <nl> + # define XY_DIAG_BD 282 . 8427124746 <nl> + # define XY_SIDE_AD 200 <nl> + <nl> + / / Or , set the default skew factors directly here <nl> + / / to override the above measurements : <nl> + # define XY_SKEW_FACTOR 0 . 0 <nl> + <nl> + / / # define SKEW_CORRECTION_FOR_Z <nl> + # if ENABLED ( SKEW_CORRECTION_FOR_Z ) <nl> + # define XZ_DIAG_AC 282 . 8427124746 <nl> + # define XZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_DIAG_AC 282 . 8427124746 <nl> + # define YZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_SIDE_AD 200 <nl> + # define XZ_SKEW_FACTOR 0 . 0 <nl> + # define YZ_SKEW_FACTOR 0 . 0 <nl> + # endif <nl> + <nl> + / / Enable this option for M852 to set skew at runtime <nl> + / / # define SKEW_CORRECTION_GCODE <nl> + # endif <nl> + <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Additional Features = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> mmm a / Marlin / src / config / examples / wt150 / Configuration . h <nl> ppp b / Marlin / src / config / examples / wt150 / Configuration . h <nl> <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Bed Leveling = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> - / / @ section bedlevel <nl> + / / @ section calibrate <nl> <nl> / * * <nl> * Choose one of the options below to enable G29 Bed Leveling . The parameters <nl> <nl> # define HOMING_FEEDRATE_XY ( 50 * 60 ) <nl> # define HOMING_FEEDRATE_Z ( 4 * 60 ) <nl> <nl> + / / @ section calibrate <nl> + <nl> + / * * <nl> + * Bed Skew Compensation <nl> + * <nl> + * This feature corrects for misalignment in the XYZ axes . <nl> + * <nl> + * Take the following steps to get the bed skew in the XY plane : <nl> + * 1 . Print a test square ( e . g . , https : / / www . thingiverse . com / thing : 2563185 ) <nl> + * 2 . For XY_DIAG_AC measure the diagonal A to C <nl> + * 3 . For XY_DIAG_BD measure the diagonal B to D <nl> + * 4 . For XY_SIDE_AD measure the edge A to D <nl> + * <nl> + * Marlin automatically computes skew factors from these measurements . <nl> + * Skew factors may also be computed and set manually : <nl> + * <nl> + * - Compute AB : SQRT ( 2 * AC * AC + 2 * BD * BD - 4 * AD * AD ) / 2 <nl> + * - XY_SKEW_FACTOR : TAN ( PI / 2 - ACOS ( ( AC * AC - AB * AB - AD * AD ) / ( 2 * AB * AD ) ) ) <nl> + * <nl> + * If desired , follow the same procedure for XZ and YZ . <nl> + * Use these diagrams for reference : <nl> + * <nl> + * Y Z Z <nl> + * ^ Bmmmmmm - C ^ Bmmmmmm - C ^ Bmmmmmm - C <nl> + * | / / | / / | / / <nl> + * | / / | / / | / / <nl> + * | Ammmmmm - D | Ammmmmm - D | Ammmmmm - D <nl> + * + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > X + mmmmmmmmmmmm - - > Y <nl> + * XY_SKEW_FACTOR XZ_SKEW_FACTOR YZ_SKEW_FACTOR <nl> + * / <nl> + / / # define SKEW_CORRECTION <nl> + <nl> + # if ENABLED ( SKEW_CORRECTION ) <nl> + / / Input all length measurements here : <nl> + # define XY_DIAG_AC 282 . 8427124746 <nl> + # define XY_DIAG_BD 282 . 8427124746 <nl> + # define XY_SIDE_AD 200 <nl> + <nl> + / / Or , set the default skew factors directly here <nl> + / / to override the above measurements : <nl> + # define XY_SKEW_FACTOR 0 . 0 <nl> + <nl> + / / # define SKEW_CORRECTION_FOR_Z <nl> + # if ENABLED ( SKEW_CORRECTION_FOR_Z ) <nl> + # define XZ_DIAG_AC 282 . 8427124746 <nl> + # define XZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_DIAG_AC 282 . 8427124746 <nl> + # define YZ_DIAG_BD 282 . 8427124746 <nl> + # define YZ_SIDE_AD 200 <nl> + # define XZ_SKEW_FACTOR 0 . 0 <nl> + # define YZ_SKEW_FACTOR 0 . 0 <nl> + # endif <nl> + <nl> + / / Enable this option for M852 to set skew at runtime <nl> + / / # define SKEW_CORRECTION_GCODE <nl> + # endif <nl> + <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = Additional Features = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl> / / = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = <nl>
Add SKEW_CORRECTION to example configs
MarlinFirmware/Marlin
082ab8fcabdafb362149ac2cd384e2de20d8d475
2017-12-02T01:22:27Z
mmm a / tensorflow / compiler / tests / depthwise_conv_op_test . py <nl> ppp b / tensorflow / compiler / tests / depthwise_conv_op_test . py <nl> <nl> from tensorflow . python . framework import constant_op <nl> from tensorflow . python . framework import ops <nl> from tensorflow . python . ops import array_ops <nl> + from tensorflow . python . ops import nn_impl <nl> from tensorflow . python . ops import nn_ops <nl> import tensorflow . python . ops . nn_grad # pylint : disable = unused - import <nl> from tensorflow . python . platform import test <nl> def ConfigsToTest ( ) : <nl> yield i , f , o , s , p <nl> <nl> <nl> + def ConfigsWithDilationsToTest ( ) : <nl> + " " " Iterator for different convolution shapes , strides and paddings . <nl> + <nl> + Yields : <nl> + Tuple ( input_size , filter_size , out_size , stride , dilation , padding ) , the <nl> + depthwise <nl> + convolution parameters . <nl> + " " " <nl> + input_sizes = [ [ 4 , 6 , 6 , 48 ] , [ 4 , 8 , 8 , 84 ] , [ 4 , 36 , 36 , 2 ] , [ 4 , 148 , 148 , 2 ] , <nl> + [ 3 , 300 , 300 , 3 ] ] <nl> + filter_sizes = [ [ 1 , 1 , 48 , 2 ] , [ 1 , 3 , 84 , 1 ] , [ 5 , 5 , 2 , 1 ] , [ 4 , 4 , 2 , 8 ] , <nl> + [ 2 , 2 , 3 , 8 ] ] <nl> + out_sizes = [ [ 4 , 6 , 6 , 96 ] , [ 4 , 8 , 8 , 84 ] , [ 4 , 36 , 36 , 2 ] , [ 4 , 74 , 74 , 16 ] , <nl> + [ 3 , 296 , 296 , 24 ] ] <nl> + strides = [ 1 , 1 , 2 , 2 , 1 ] <nl> + dilations = [ 2 , 2 , 4 , 2 , 4 ] <nl> + # pylint : disable = invalid - name <nl> + VALID = " VALID " <nl> + SAME = " SAME " <nl> + # pylint : enable = invalid - name <nl> + paddings = [ SAME , SAME , SAME , SAME , VALID ] <nl> + for i , f , o , s , d , p in zip ( input_sizes , filter_sizes , out_sizes , strides , <nl> + dilations , paddings ) : <nl> + yield i , f , o , s , d , p <nl> + <nl> + <nl> def CheckGradConfigsToTest ( ) : <nl> " " " Iterator for different convolution shapes , strides and paddings . <nl> <nl> def testConv2D2x2Filter ( self ) : <nl> padding = " VALID " , <nl> expected = expected_output ) <nl> <nl> + # This is testing that depthwise_conv2d with dilation produces <nl> + # the same results between CPU and TPU . It also tests that NCHW <nl> + # and NWHC formats agree . <nl> + def _VerifyValuesWithDilation ( self , <nl> + tensor_in_sizes , <nl> + filter_in_sizes , <nl> + stride , <nl> + dilation , <nl> + padding , <nl> + data_type , <nl> + data_format = " NHWC " ) : <nl> + " " " Verifies the output values of the convolution function . <nl> + <nl> + Args : <nl> + tensor_in_sizes : Input tensor dimensions in [ batch , input_rows , <nl> + input_cols , input_depth ] . <nl> + filter_in_sizes : Filter tensor dimensions in [ filter_rows , filter_cols , <nl> + input_depth , depth_multiplier ] . <nl> + stride : Stride . <nl> + dilation : Dilation . <nl> + padding : Padding type . <nl> + data_type : The data type to use . <nl> + data_format : The data_format of the input . " NHWC " or " NCHW " . <nl> + " " " <nl> + total_size_1 = 1 <nl> + total_size_2 = 1 <nl> + for s in tensor_in_sizes : <nl> + total_size_1 * = s <nl> + for s in filter_in_sizes : <nl> + total_size_2 * = s <nl> + # Initializes the input and filter tensor with numbers incrementing from 1 . <nl> + x1 = np . array ( [ f * 1 . 0 for f in range ( 1 , total_size_1 + 1 ) ] , <nl> + dtype = data_type ) . reshape ( tensor_in_sizes ) <nl> + x2 = np . array ( [ f * 1 . 0 for f in range ( 1 , total_size_2 + 1 ) ] , <nl> + dtype = data_type ) . reshape ( filter_in_sizes ) <nl> + with self . session ( ) as sess : <nl> + if data_type = = np . float32 : <nl> + # TODO ( b / 64210055 ) : Tolerance for TPU is high . <nl> + tolerance = 1e - 2 <nl> + else : <nl> + self . assertEqual ( data_type , np . float64 ) <nl> + tolerance = 1e - 8 <nl> + <nl> + t1 = array_ops . placeholder ( shape = tensor_in_sizes , dtype = data_type ) <nl> + t2 = array_ops . placeholder ( shape = filter_in_sizes , dtype = data_type ) <nl> + <nl> + native_t1 = t1 <nl> + strides = [ 1 , stride , stride , 1 ] <nl> + dilations = [ dilation , dilation ] <nl> + if data_format = = " NCHW " : <nl> + # Transpose from NWHC input to NCHW <nl> + # Ex . [ 4 , 5 , 5 , 48 ] to [ 4 , 48 , 5 , 5 ] <nl> + native_t1 = array_ops . transpose ( t1 , [ 0 , 3 , 1 , 2 ] ) <nl> + strides = [ 1 , 1 , stride , stride ] <nl> + <nl> + with self . test_scope ( ) : <nl> + conv_native = nn_impl . depthwise_conv2d ( <nl> + native_t1 , <nl> + t2 , <nl> + strides = strides , <nl> + rate = dilations , <nl> + data_format = data_format , <nl> + padding = padding ) <nl> + <nl> + if data_format = = " NCHW " : <nl> + # Transpose back from NCHW to NHWC <nl> + conv_native = array_ops . transpose ( conv_native , [ 0 , 2 , 3 , 1 ] ) <nl> + <nl> + with ops . device ( " CPU " ) : <nl> + # CPU only support NHWC format <nl> + strides = [ 1 , stride , stride , 1 ] <nl> + conv_interface = nn_impl . depthwise_conv2d ( <nl> + t1 , t2 , strides = strides , rate = dilations , padding = padding ) <nl> + <nl> + native_result = sess . run ( conv_native , { t1 : x1 , t2 : x2 } ) <nl> + interface_result = sess . run ( conv_interface , { t1 : x1 , t2 : x2 } ) <nl> + <nl> + print ( " data_type : " , data_type , " max diff = " , <nl> + np . amax ( np . absolute ( native_result - interface_result ) ) ) <nl> + self . assertAllClose ( <nl> + np . ravel ( native_result ) , np . ravel ( interface_result ) , rtol = tolerance ) <nl> + <nl> + def testDilationDepthwiseConv2DWith ( self ) : <nl> + for index , ( input_size , filter_size , _ , stride , dilation , <nl> + padding ) in enumerate ( ConfigsWithDilationsToTest ( ) ) : <nl> + print ( " Testing DilationDepthwiseConv2D , " , index , " th config : " , input_size , <nl> + " * " , filter_size , " stride : " , stride , " dilation : " , dilation , <nl> + " padding : " , padding ) <nl> + for data_type in self . float_types : <nl> + # TODO ( phawkins ) : the reference implementation only supports float32 . <nl> + if data_type = = np . float32 : <nl> + self . _VerifyValuesWithDilation ( input_size , filter_size , stride , <nl> + dilation , padding , data_type ) <nl> + <nl> + def testDilationDepthwiseConv2DWithFormat ( self ) : <nl> + for index , ( input_size , filter_size , _ , stride , dilation , <nl> + padding ) in enumerate ( ConfigsWithDilationsToTest ( ) ) : <nl> + print ( " Testing DilationDepthwiseConv2DFormat , " , index , " th config : " , <nl> + input_size , " * " , filter_size , " stride : " , stride , " dilation : " , <nl> + dilation , " padding : " , padding ) <nl> + for data_type in self . float_types : <nl> + # TODO ( phawkins ) : the reference implementation only supports float32 . <nl> + if data_type = = np . float32 : <nl> + self . _VerifyValuesWithDilation ( <nl> + input_size , <nl> + filter_size , <nl> + stride , <nl> + dilation , <nl> + padding , <nl> + data_type , <nl> + data_format = " NCHW " ) <nl> + <nl> def _CompareBackpropInput ( self , input_sizes , filter_sizes , output_sizes , <nl> stride , padding ) : <nl> x1 = np . random . rand ( * filter_sizes ) . astype ( np . float32 ) <nl> def testDepthwiseConv2DFilterGradFormatNCHWCompare ( self ) : <nl> padding , <nl> data_format = " NCHW " ) <nl> <nl> + def _CompareBackpropInputWithDilation ( self , input_sizes , filter_sizes , <nl> + output_sizes , stride , dilation , <nl> + padding ) : <nl> + x1 = np . random . rand ( * filter_sizes ) . astype ( np . float32 ) <nl> + x2 = np . random . rand ( * output_sizes ) . astype ( np . float32 ) <nl> + <nl> + def _GetVal ( use_xla ) : <nl> + with self . session ( ) : <nl> + t1 = array_ops . placeholder ( np . float32 , shape = filter_sizes ) <nl> + t2 = array_ops . placeholder ( np . float32 , shape = output_sizes ) <nl> + if use_xla : <nl> + with self . test_scope ( ) : <nl> + t0 = constant_op . constant ( input_sizes , shape = [ len ( input_sizes ) ] ) <nl> + backprop = nn_ops . depthwise_conv2d_native_backprop_input ( <nl> + t0 , <nl> + t1 , <nl> + t2 , <nl> + strides = [ 1 , stride , stride , 1 ] , <nl> + dilations = [ 1 , dilation , dilation , 1 ] , <nl> + padding = padding ) <nl> + else : <nl> + # TODO ( wangtao ) : figure out gradient with stride > 1 . <nl> + # depthwise_conv2d_native_backprop_input on CPU doesn ' t support <nl> + # dilation . <nl> + t3 = array_ops . space_to_batch ( <nl> + t2 , block_size = dilation , paddings = [ [ 0 , 0 ] , [ 0 , 0 ] ] ) <nl> + input_sizes_transform = [ <nl> + input_sizes [ 0 ] * dilation * dilation , input_sizes [ 1 ] / / dilation , <nl> + input_sizes [ 2 ] / / dilation , input_sizes [ 3 ] <nl> + ] <nl> + t0 = constant_op . constant ( <nl> + input_sizes_transform , shape = [ len ( input_sizes ) ] ) <nl> + backprop_naive = nn_ops . depthwise_conv2d_native_backprop_input ( <nl> + t0 , t1 , t3 , strides = [ 1 , stride , stride , 1 ] , padding = padding ) <nl> + backprop = array_ops . batch_to_space ( <nl> + backprop_naive , [ [ 0 , 0 ] , [ 0 , 0 ] ] , block_size = dilation ) <nl> + <nl> + ret = backprop . eval ( { t1 : x1 , t2 : x2 } ) <nl> + self . assertShapeEqual ( ret , backprop ) <nl> + return ret <nl> + <nl> + gpu_value = _GetVal ( use_xla = True ) <nl> + cpu_value = _GetVal ( use_xla = False ) <nl> + <nl> + # TODO ( b / 64210055 ) : Tolerance for TPU is high . <nl> + self . assertAllClose ( cpu_value , gpu_value , rtol = 1e - 2 , atol = 1e - 3 ) <nl> + <nl> + def testDilationDepthwiseConv2DInputGradWithCompare ( self ) : <nl> + for index , ( input_size , filter_size , output_size , stride , dilation , <nl> + padding ) in enumerate ( ConfigsWithDilationsToTest ( ) ) : <nl> + print ( " Testing DilationDepthwiseConv2DInputGradWithDilationCompare , " , <nl> + index , " th config : " , input_size , " * " , filter_size , " stride : " , <nl> + stride , " dilation : " , dilation , " padding : " , padding ) <nl> + # TODO ( wangtao ) : implement CPU grad computation with stride > 1 . <nl> + if stride = = 1 : <nl> + self . _CompareBackpropInputWithDilation ( input_size , filter_size , <nl> + output_size , stride , dilation , <nl> + padding ) <nl> + <nl> + def _CompareBackpropFilterWithDilation ( self , <nl> + input_sizes , <nl> + filter_sizes , <nl> + output_sizes , <nl> + stride , <nl> + dilation , <nl> + padding , <nl> + data_format = " NHWC " ) : <nl> + x0 = np . random . rand ( * input_sizes ) . astype ( np . float32 ) <nl> + x2 = np . random . rand ( * output_sizes ) . astype ( np . float32 ) <nl> + <nl> + def _GetVal ( use_xla ) : <nl> + with self . session ( ) : <nl> + t0 = array_ops . placeholder ( np . float32 , shape = input_sizes ) <nl> + t1 = constant_op . constant ( filter_sizes , shape = [ len ( filter_sizes ) ] ) <nl> + t2 = array_ops . placeholder ( np . float32 , shape = output_sizes ) <nl> + native_t0 = t0 <nl> + native_t2 = t2 <nl> + strides = [ 1 , stride , stride , 1 ] <nl> + dilations = [ 1 , dilation , dilation , 1 ] <nl> + <nl> + if use_xla : <nl> + if data_format = = " NCHW " : <nl> + # Transpose from NWHC input to NCHW <nl> + # Ex . [ 4 , 5 , 5 , 48 ] to [ 4 , 48 , 5 , 5 ] <nl> + native_t0 = array_ops . transpose ( t0 , [ 0 , 3 , 1 , 2 ] ) <nl> + native_t2 = array_ops . transpose ( t2 , [ 0 , 3 , 1 , 2 ] ) <nl> + strides = [ 1 , 1 , stride , stride ] <nl> + dilations = [ 1 , 1 , dilation , dilation ] <nl> + with self . test_scope ( ) : <nl> + backprop = nn_ops . depthwise_conv2d_native_backprop_filter ( <nl> + native_t0 , <nl> + t1 , <nl> + native_t2 , <nl> + strides = strides , <nl> + padding = padding , <nl> + dilations = dilations , <nl> + data_format = data_format ) <nl> + else : <nl> + # For CPU , the format NCHW is not supported . Therefore we always use <nl> + # NHWC here . <nl> + # depthwise_conv2d_native_backprop_filter on CPU doesn ' t support <nl> + # dilation . <nl> + native_t3 = array_ops . space_to_batch ( <nl> + native_t2 , block_size = dilation , paddings = [ [ 0 , 0 ] , [ 0 , 0 ] ] ) <nl> + native_t0_transform = array_ops . space_to_batch ( <nl> + native_t0 , block_size = dilation , paddings = [ [ 0 , 0 ] , [ 0 , 0 ] ] ) <nl> + backprop = nn_ops . depthwise_conv2d_native_backprop_filter ( <nl> + native_t0_transform , <nl> + t1 , <nl> + native_t3 , <nl> + strides = strides , <nl> + padding = padding ) <nl> + ret = backprop . eval ( { t0 : x0 , t2 : x2 } ) <nl> + self . assertShapeEqual ( ret , backprop ) <nl> + return ret <nl> + <nl> + gpu_value = _GetVal ( use_xla = True ) <nl> + cpu_value = _GetVal ( use_xla = False ) <nl> + # TODO ( b / 64210055 ) : Tolerance for TPU is high . <nl> + self . assertAllClose ( cpu_value , gpu_value , rtol = 1e - 3 , atol = 1e - 4 ) <nl> + <nl> + def testDilationDepthwiseConv2DFilterGradCompare ( self ) : <nl> + for index , ( input_size , filter_size , output_size , stride , dilation , <nl> + padding ) in enumerate ( ConfigsWithDilationsToTest ( ) ) : <nl> + print ( " Testing DilationDepthwiseConv2DFilterGradCompare , " , index , <nl> + " th config : " , input_size , " * " , filter_size , " producing output " , <nl> + output_size , " stride : " , stride , " dilation : " , dilation , " padding : " , <nl> + padding ) <nl> + if stride = = 1 : <nl> + # TODO ( wangtao ) : implement CPU grad computation with stride > 1 . <nl> + self . _CompareBackpropFilterWithDilation ( input_size , filter_size , <nl> + output_size , stride , dilation , <nl> + padding ) <nl> + <nl> if __name__ = = " __main__ " : <nl> test . main ( ) <nl> mmm a / tensorflow / core / kernels / conv_grad_filter_ops . cc <nl> ppp b / tensorflow / core / kernels / conv_grad_filter_ops . cc <nl> class Conv2DCustomBackpropFilterOp : public OpKernel { <nl> errors : : InvalidArgument ( <nl> " Current implementation does not yet support " <nl> " dilations in the batch and depth dimensions . " ) ) ; <nl> - / / TODO ( yangzihao ) : Add a CPU implementation for dilated convolution . <nl> - OP_REQUIRES ( context , ( dilations_ [ 1 ] = = 1 & & dilations_ [ 2 ] = = 1 ) , <nl> - errors : : InvalidArgument ( <nl> - " Current libxsmm and customized CPU implementations do " <nl> - " not yet support dilation rates larger than 1 . " ) ) ; <nl> + if ( std : : is_same < Device , CPUDevice > : : value | | <nl> + std : : is_same < Device , GPUDevice > : : value ) { <nl> + / / TODO ( yangzihao ) : Add a CPU implementation for dilated convolution . <nl> + OP_REQUIRES ( context , ( dilations_ [ 1 ] = = 1 & & dilations_ [ 2 ] = = 1 ) , <nl> + errors : : InvalidArgument ( <nl> + " Current libxsmm and customized CPU implementations do " <nl> + " not yet support dilation rates larger than 1 . " ) ) ; <nl> + dilations_ = { 1 , 1 , 1 , 1 } ; <nl> + } <nl> } <nl> <nl> void Compute ( OpKernelContext * context ) override { <nl> class Conv2DCustomBackpropFilterOp : public OpKernel { <nl> context , <nl> ConvBackpropComputeDimensionsV2 ( <nl> " Conv2DCustomBackpropFilter " , / * num_spatial_dims = * / 2 , input . shape ( ) , <nl> - filter_shape , out_backprop . shape ( ) , / * dilations = * / { 1 , 1 , 1 , 1 } , <nl> - strides_ , padding_ , explicit_paddings_ , data_format_ , & dims ) ) ; <nl> + filter_shape , out_backprop . shape ( ) , dilations_ , strides_ , padding_ , <nl> + explicit_paddings_ , data_format_ , & dims ) ) ; <nl> <nl> Tensor * filter_backprop ; <nl> OP_REQUIRES_OK ( context , <nl> mmm a / tensorflow / python / ops / nn_grad . py <nl> ppp b / tensorflow / python / ops / nn_grad . py <nl> def _DepthwiseConv2dNativeGrad ( op , grad ) : <nl> array_ops . shape ( op . inputs [ 0 ] ) , <nl> op . inputs [ 1 ] , <nl> grad , <nl> - op . get_attr ( " strides " ) , <nl> - op . get_attr ( " padding " ) , <nl> + dilations = op . get_attr ( " dilations " ) , <nl> + strides = op . get_attr ( " strides " ) , <nl> + padding = op . get_attr ( " padding " ) , <nl> data_format = op . get_attr ( " data_format " ) ) , <nl> nn_ops . depthwise_conv2d_native_backprop_filter ( <nl> op . inputs [ 0 ] , <nl> array_ops . shape ( op . inputs [ 1 ] ) , <nl> grad , <nl> - op . get_attr ( " strides " ) , <nl> - op . get_attr ( " padding " ) , <nl> + dilations = op . get_attr ( " dilations " ) , <nl> + strides = op . get_attr ( " strides " ) , <nl> + padding = op . get_attr ( " padding " ) , <nl> data_format = op . get_attr ( " data_format " ) ) <nl> ] <nl> <nl> mmm a / tensorflow / python / ops / nn_impl . py <nl> ppp b / tensorflow / python / ops / nn_impl . py <nl> def zero_fraction ( value , name = None ) : <nl> return array_ops . identity ( zero_fraction_float32 , " fraction " ) <nl> <nl> <nl> + # copybara : strip_begin <nl> + # TODO ( b / 138808492 ) : Remove code inside copybara <nl> + # to make TPU code and CPU code consistent . <nl> + def _enclosing_tpu_context ( ) : <nl> + # pylint : disable = protected - access <nl> + context = ops . get_default_graph ( ) . _get_control_flow_context ( ) <nl> + # pylint : enable = protected - access <nl> + while context is not None and not isinstance ( <nl> + context , control_flow_ops . XLAControlFlowContext ) : <nl> + context = context . outer_context <nl> + return context <nl> + <nl> + <nl> + # copybara : strip_end <nl> + <nl> + <nl> # pylint : disable = redefined - builtin <nl> @ tf_export ( v1 = [ " nn . depthwise_conv2d " ] ) <nl> def depthwise_conv2d ( input , <nl> def depthwise_conv2d ( input , <nl> if rate is None : <nl> rate = [ 1 , 1 ] <nl> <nl> + # copybara : strip_begin <nl> + # TODO ( b / 138808492 ) : Remove code inside copybara <nl> + # to make TPU code and CPU code consistent . <nl> + # Use depthwise_conv2d_native if executing on TPU . <nl> + if _enclosing_tpu_context ( ) is not None : <nl> + if data_format = = " NCHW " : <nl> + dilations = [ 1 , 1 , rate [ 0 ] , rate [ 1 ] ] <nl> + else : <nl> + dilations = [ 1 , rate [ 0 ] , rate [ 1 ] , 1 ] <nl> + return nn_ops . depthwise_conv2d_native ( <nl> + input = input , <nl> + filter = filter , <nl> + strides = strides , <nl> + padding = padding , <nl> + data_format = data_format , <nl> + dilations = dilations , <nl> + name = name ) <nl> + # copybara : strip_end <nl> + <nl> def op ( input_converted , _ , padding ) : <nl> return nn_ops . depthwise_conv2d_native ( <nl> input = input_converted , <nl> mmm a / tensorflow / python / ops / nn_ops . py <nl> ppp b / tensorflow / python / ops / nn_ops . py <nl> <nl> from tensorflow . python . framework import tensor_util <nl> from tensorflow . python . ops import array_ops <nl> from tensorflow . python . ops import check_ops <nl> + from tensorflow . python . ops import control_flow_ops <nl> from tensorflow . python . ops import gen_nn_ops <nl> from tensorflow . python . ops import math_ops <nl> from tensorflow . python . ops import random_ops <nl> def convolution_v2 ( <nl> " filter " , " filters " ) <nl> <nl> <nl> + # copybara : strip_begin <nl> + # TODO ( b / 138808492 ) : Remove code inside copybara <nl> + # to make TPU code and CPU code consistent . <nl> + def _enclosing_tpu_context ( ) : <nl> + # pylint : disable = protected - access <nl> + run_context = ops . get_default_graph ( ) . _get_control_flow_context ( ) <nl> + # pylint : enable = protected - access <nl> + while run_context is not None and not isinstance ( <nl> + run_context , control_flow_ops . XLAControlFlowContext ) : <nl> + run_context = run_context . outer_context <nl> + return run_context <nl> + <nl> + <nl> + # copybara : strip_end <nl> + <nl> + <nl> def convolution_internal ( <nl> input , # pylint : disable = redefined - builtin <nl> filters , <nl> def convolution_internal ( <nl> <nl> conv_ops = { 1 : conv1d , 2 : gen_nn_ops . conv2d , 3 : gen_nn_ops . conv3d } <nl> <nl> - if all ( i = = 1 for i in dilations ) : <nl> - # fast path if no dilation as gradient only supported on GPU for dilations <nl> + # copybara : strip_begin <nl> + # TODO ( b / 138808492 ) : Remove code inside copybara <nl> + # to make TPU code and CPU code consistent . <nl> + if _enclosing_tpu_context ( ) is not None or all ( i = = 1 for i in dilations ) : <nl> + # fast path for TPU or if no dilation as gradient only supported on GPU <nl> + # for dilations <nl> + # copybara : strip_end <nl> + # copybara : insert if all ( i = = 1 for i in dilations ) : <nl> op = conv_ops [ n ] <nl> return op ( <nl> input , <nl> def __init__ ( self , <nl> self . filter_shape = filter_shape <nl> self . data_format = data_format <nl> self . strides = strides <nl> + self . padding = padding <nl> self . name = name <nl> + self . dilation_rate = dilation_rate <nl> self . conv_op = _WithSpaceToBatch ( <nl> input_shape , <nl> dilation_rate = dilation_rate , <nl> def _build_op ( self , _ , padding ) : <nl> name = self . name ) <nl> <nl> def __call__ ( self , inp , filter ) : # pylint : disable = redefined - builtin <nl> - return self . conv_op ( inp , filter ) <nl> + # copybara : strip_begin <nl> + # TODO ( b / 138808492 ) : Remove code inside copybara <nl> + # to make TPU code and CPU code consistent . <nl> + # TPU convolution supports dilations greater than 1 . <nl> + if _enclosing_tpu_context ( ) is not None : <nl> + return convolution_internal ( <nl> + inp , <nl> + filter , <nl> + strides = self . strides , <nl> + padding = self . padding , <nl> + data_format = self . data_format , <nl> + dilations = self . dilation_rate , <nl> + name = self . name ) <nl> + else : <nl> + return self . conv_op ( inp , filter ) <nl> + # copybara : strip_end <nl> + # copybara : insert return self . conv_op ( inp , filter ) <nl> <nl> <nl> @ tf_export ( v1 = [ " nn . pool " ] ) <nl>
[ TF : NN : CONVOLUTION ] Don ' t call space to batch in depthwise convolution on TPU .
tensorflow/tensorflow
20506ddda860b79ff4a5e00fdcb0242f8498f60c
2019-08-02T04:01:40Z
mmm a / xbmc / utils / LangCodeExpander . cpp <nl> ppp b / xbmc / utils / LangCodeExpander . cpp <nl> const std : : array < ISO639 , 189 > LanguageCodes = { { <nl> } } ; <nl> <nl> / / Based on ISO 3166 <nl> - const std : : array < ISO3166_1 , 245 > RegionCodes = <nl> - { { <nl> - { " af " , " afg " } , <nl> - { " ax " , " ala " } , <nl> - { " al " , " alb " } , <nl> - { " dz " , " dza " } , <nl> - { " as " , " asm " } , <nl> - { " ad " , " and " } , <nl> - { " ao " , " ago " } , <nl> - { " ai " , " aia " } , <nl> - { " aq " , " ata " } , <nl> - { " ag " , " atg " } , <nl> - { " ar " , " arg " } , <nl> - { " am " , " arm " } , <nl> - { " aw " , " abw " } , <nl> - { " au " , " aus " } , <nl> - { " at " , " aut " } , <nl> - { " az " , " aze " } , <nl> - { " bs " , " bhs " } , <nl> - { " bh " , " bhr " } , <nl> - { " bd " , " bgd " } , <nl> - { " bb " , " brb " } , <nl> - { " by " , " blr " } , <nl> - { " be " , " bel " } , <nl> - { " bz " , " blz " } , <nl> - { " bj " , " ben " } , <nl> - { " bm " , " bmu " } , <nl> - { " bt " , " btn " } , <nl> - { " bo " , " bol " } , <nl> - { " ba " , " bih " } , <nl> - { " bw " , " bwa " } , <nl> - { " bv " , " bvt " } , <nl> - { " br " , " bra " } , <nl> - { " io " , " iot " } , <nl> - { " bn " , " brn " } , <nl> - { " bg " , " bgr " } , <nl> - { " bf " , " bfa " } , <nl> - { " bi " , " bdi " } , <nl> - { " kh " , " khm " } , <nl> - { " cm " , " cmr " } , <nl> - { " ca " , " can " } , <nl> - { " cv " , " cpv " } , <nl> - { " ky " , " cym " } , <nl> - { " cf " , " caf " } , <nl> - { " td " , " tcd " } , <nl> - { " cl " , " chl " } , <nl> - { " cn " , " chn " } , <nl> - { " cx " , " cxr " } , <nl> - { " co " , " col " } , <nl> - { " km " , " com " } , <nl> - { " cg " , " cog " } , <nl> - { " cd " , " cod " } , <nl> - { " ck " , " cok " } , <nl> - { " cr " , " cri " } , <nl> - { " ci " , " civ " } , <nl> - { " hr " , " hrv " } , <nl> - { " cu " , " cub " } , <nl> - { " cy " , " cyp " } , <nl> - { " cz " , " cze " } , <nl> - { " dk " , " dnk " } , <nl> - { " dj " , " dji " } , <nl> - { " dm " , " dma " } , <nl> - { " do " , " dom " } , <nl> - { " ec " , " ecu " } , <nl> - { " eg " , " egy " } , <nl> - { " sv " , " slv " } , <nl> - { " gq " , " gnq " } , <nl> - { " er " , " eri " } , <nl> - { " ee " , " est " } , <nl> - { " et " , " eth " } , <nl> - { " fk " , " flk " } , <nl> - { " fo " , " fro " } , <nl> - { " fj " , " fji " } , <nl> - { " fi " , " fin " } , <nl> - { " fr " , " fra " } , <nl> - { " gf " , " guf " } , <nl> - { " pf " , " pyf " } , <nl> - { " tf " , " atf " } , <nl> - { " ga " , " gab " } , <nl> - { " gm " , " gmb " } , <nl> - { " ge " , " geo " } , <nl> - { " de " , " deu " } , <nl> - { " gh " , " gha " } , <nl> - { " gi " , " gib " } , <nl> - { " gr " , " grc " } , <nl> - { " gl " , " grl " } , <nl> - { " gd " , " grd " } , <nl> - { " gp " , " glp " } , <nl> - { " gu " , " gum " } , <nl> - { " gt " , " gtm " } , <nl> - { " gg " , " ggy " } , <nl> - { " gn " , " gin " } , <nl> - { " gw " , " gnb " } , <nl> - { " gy " , " guy " } , <nl> - { " ht " , " hti " } , <nl> - { " hm " , " hmd " } , <nl> - { " va " , " vat " } , <nl> - { " hn " , " hnd " } , <nl> - { " hk " , " hkg " } , <nl> - { " hu " , " hun " } , <nl> - { " is " , " isl " } , <nl> - { " in " , " ind " } , <nl> - { " id " , " idn " } , <nl> - { " ir " , " irn " } , <nl> - { " iq " , " irq " } , <nl> - { " ie " , " irl " } , <nl> - { " im " , " imn " } , <nl> - { " il " , " isr " } , <nl> - { " it " , " ita " } , <nl> - { " jm " , " jam " } , <nl> - { " jp " , " jpn " } , <nl> - { " je " , " jey " } , <nl> - { " jo " , " jor " } , <nl> - { " kz " , " kaz " } , <nl> - { " ke " , " ken " } , <nl> - { " ki " , " kir " } , <nl> - { " kp " , " prk " } , <nl> - { " kr " , " kor " } , <nl> - { " kw " , " kwt " } , <nl> - { " kg " , " kgz " } , <nl> - { " la " , " lao " } , <nl> - { " lv " , " lva " } , <nl> - { " lb " , " lbn " } , <nl> - { " ls " , " lso " } , <nl> - { " lr " , " lbr " } , <nl> - { " ly " , " lby " } , <nl> - { " li " , " lie " } , <nl> - { " lt " , " ltu " } , <nl> - { " lu " , " lux " } , <nl> - { " mo " , " mac " } , <nl> - { " mk " , " mkd " } , <nl> - { " mg " , " mdg " } , <nl> - { " mw " , " mwi " } , <nl> - { " my " , " mys " } , <nl> - { " mv " , " mdv " } , <nl> - { " ml " , " mli " } , <nl> - { " mt " , " mlt " } , <nl> - { " mh " , " mhl " } , <nl> - { " mq " , " mtq " } , <nl> - { " mr " , " mrt " } , <nl> - { " mu " , " mus " } , <nl> - { " yt " , " myt " } , <nl> - { " mx " , " mex " } , <nl> - { " fm " , " fsm " } , <nl> - { " md " , " mda " } , <nl> - { " mc " , " mco " } , <nl> - { " mn " , " mng " } , <nl> - { " me " , " mne " } , <nl> - { " ms " , " msr " } , <nl> - { " ma " , " mar " } , <nl> - { " mz " , " moz " } , <nl> - { " mm " , " mmr " } , <nl> - { " na " , " nam " } , <nl> - { " nr " , " nru " } , <nl> - { " np " , " npl " } , <nl> - { " nl " , " nld " } , <nl> - { " an " , " ant " } , <nl> - { " nc " , " ncl " } , <nl> - { " nz " , " nzl " } , <nl> - { " ni " , " nic " } , <nl> - { " ne " , " ner " } , <nl> - { " ng " , " nga " } , <nl> - { " nu " , " niu " } , <nl> - { " nf " , " nfk " } , <nl> - { " mp " , " mnp " } , <nl> - { " no " , " nor " } , <nl> - { " om " , " omn " } , <nl> - { " pk " , " pak " } , <nl> - { " pw " , " plw " } , <nl> - { " ps " , " pse " } , <nl> - { " pa " , " pan " } , <nl> - { " pg " , " png " } , <nl> - { " py " , " pry " } , <nl> - { " pe " , " per " } , <nl> - { " ph " , " phl " } , <nl> - { " pn " , " pcn " } , <nl> - { " pl " , " pol " } , <nl> - { " pt " , " prt " } , <nl> - { " pr " , " pri " } , <nl> - { " qa " , " qat " } , <nl> - { " re " , " reu " } , <nl> - { " ro " , " rou " } , <nl> - { " ru " , " rus " } , <nl> - { " rw " , " rwa " } , <nl> - { " bl " , " blm " } , <nl> - { " sh " , " shn " } , <nl> - { " kn " , " kna " } , <nl> - { " lc " , " lca " } , <nl> - { " mf " , " maf " } , <nl> - { " pm " , " spm " } , <nl> - { " vc " , " vct " } , <nl> - { " ws " , " wsm " } , <nl> - { " sm " , " smr " } , <nl> - { " st " , " stp " } , <nl> - { " sa " , " sau " } , <nl> - { " sn " , " sen " } , <nl> - { " rs " , " srb " } , <nl> - { " sc " , " syc " } , <nl> - { " sl " , " sle " } , <nl> - { " sg " , " sgp " } , <nl> - { " sk " , " svk " } , <nl> - { " si " , " svn " } , <nl> - { " sb " , " slb " } , <nl> - { " so " , " som " } , <nl> - { " za " , " zaf " } , <nl> - { " gs " , " sgs " } , <nl> - { " es " , " esp " } , <nl> - { " lk " , " lka " } , <nl> - { " sd " , " sdn " } , <nl> - { " sr " , " sur " } , <nl> - { " sj " , " sjm " } , <nl> - { " sz " , " swz " } , <nl> - { " se " , " swe " } , <nl> - { " ch " , " che " } , <nl> - { " sy " , " syr " } , <nl> - { " tw " , " twn " } , <nl> - { " tj " , " tjk " } , <nl> - { " tz " , " tza " } , <nl> - { " th " , " tha " } , <nl> - { " tl " , " tls " } , <nl> - { " tg " , " tgo " } , <nl> - { " tk " , " tkl " } , <nl> - { " to " , " ton " } , <nl> - { " tt " , " tto " } , <nl> - { " tn " , " tun " } , <nl> - { " tr " , " tur " } , <nl> - { " tm " , " tkm " } , <nl> - { " tc " , " tca " } , <nl> - { " tv " , " tuv " } , <nl> - { " ug " , " uga " } , <nl> - { " ua " , " ukr " } , <nl> - { " ae " , " are " } , <nl> - { " gb " , " gbr " } , <nl> - { " us " , " usa " } , <nl> - { " um " , " umi " } , <nl> - { " uy " , " ury " } , <nl> - { " uz " , " uzb " } , <nl> - { " vu " , " vut " } , <nl> - { " ve " , " ven " } , <nl> - { " vn " , " vnm " } , <nl> - { " vg " , " vgb " } , <nl> - { " vi " , " vir " } , <nl> - { " wf " , " wlf " } , <nl> - { " eh " , " esh " } , <nl> - { " ye " , " yem " } , <nl> - { " zm " , " zmb " } , <nl> - { " zw " , " zwe " } <nl> - } } ; <nl> + / / clang - format off <nl> + const std : : array < ISO3166_1 , 245 > RegionCodes = { { <nl> + { " af " , " afg " } , <nl> + { " ax " , " ala " } , <nl> + { " al " , " alb " } , <nl> + { " dz " , " dza " } , <nl> + { " as " , " asm " } , <nl> + { " ad " , " and " } , <nl> + { " ao " , " ago " } , <nl> + { " ai " , " aia " } , <nl> + { " aq " , " ata " } , <nl> + { " ag " , " atg " } , <nl> + { " ar " , " arg " } , <nl> + { " am " , " arm " } , <nl> + { " aw " , " abw " } , <nl> + { " au " , " aus " } , <nl> + { " at " , " aut " } , <nl> + { " az " , " aze " } , <nl> + { " bs " , " bhs " } , <nl> + { " bh " , " bhr " } , <nl> + { " bd " , " bgd " } , <nl> + { " bb " , " brb " } , <nl> + { " by " , " blr " } , <nl> + { " be " , " bel " } , <nl> + { " bz " , " blz " } , <nl> + { " bj " , " ben " } , <nl> + { " bm " , " bmu " } , <nl> + { " bt " , " btn " } , <nl> + { " bo " , " bol " } , <nl> + { " ba " , " bih " } , <nl> + { " bw " , " bwa " } , <nl> + { " bv " , " bvt " } , <nl> + { " br " , " bra " } , <nl> + { " io " , " iot " } , <nl> + { " bn " , " brn " } , <nl> + { " bg " , " bgr " } , <nl> + { " bf " , " bfa " } , <nl> + { " bi " , " bdi " } , <nl> + { " kh " , " khm " } , <nl> + { " cm " , " cmr " } , <nl> + { " ca " , " can " } , <nl> + { " cv " , " cpv " } , <nl> + { " ky " , " cym " } , <nl> + { " cf " , " caf " } , <nl> + { " td " , " tcd " } , <nl> + { " cl " , " chl " } , <nl> + { " cn " , " chn " } , <nl> + { " cx " , " cxr " } , <nl> + { " co " , " col " } , <nl> + { " km " , " com " } , <nl> + { " cg " , " cog " } , <nl> + { " cd " , " cod " } , <nl> + { " ck " , " cok " } , <nl> + { " cr " , " cri " } , <nl> + { " ci " , " civ " } , <nl> + { " hr " , " hrv " } , <nl> + { " cu " , " cub " } , <nl> + { " cy " , " cyp " } , <nl> + { " cz " , " cze " } , <nl> + { " dk " , " dnk " } , <nl> + { " dj " , " dji " } , <nl> + { " dm " , " dma " } , <nl> + { " do " , " dom " } , <nl> + { " ec " , " ecu " } , <nl> + { " eg " , " egy " } , <nl> + { " sv " , " slv " } , <nl> + { " gq " , " gnq " } , <nl> + { " er " , " eri " } , <nl> + { " ee " , " est " } , <nl> + { " et " , " eth " } , <nl> + { " fk " , " flk " } , <nl> + { " fo " , " fro " } , <nl> + { " fj " , " fji " } , <nl> + { " fi " , " fin " } , <nl> + { " fr " , " fra " } , <nl> + { " gf " , " guf " } , <nl> + { " pf " , " pyf " } , <nl> + { " tf " , " atf " } , <nl> + { " ga " , " gab " } , <nl> + { " gm " , " gmb " } , <nl> + { " ge " , " geo " } , <nl> + { " de " , " deu " } , <nl> + { " gh " , " gha " } , <nl> + { " gi " , " gib " } , <nl> + { " gr " , " grc " } , <nl> + { " gl " , " grl " } , <nl> + { " gd " , " grd " } , <nl> + { " gp " , " glp " } , <nl> + { " gu " , " gum " } , <nl> + { " gt " , " gtm " } , <nl> + { " gg " , " ggy " } , <nl> + { " gn " , " gin " } , <nl> + { " gw " , " gnb " } , <nl> + { " gy " , " guy " } , <nl> + { " ht " , " hti " } , <nl> + { " hm " , " hmd " } , <nl> + { " va " , " vat " } , <nl> + { " hn " , " hnd " } , <nl> + { " hk " , " hkg " } , <nl> + { " hu " , " hun " } , <nl> + { " is " , " isl " } , <nl> + { " in " , " ind " } , <nl> + { " id " , " idn " } , <nl> + { " ir " , " irn " } , <nl> + { " iq " , " irq " } , <nl> + { " ie " , " irl " } , <nl> + { " im " , " imn " } , <nl> + { " il " , " isr " } , <nl> + { " it " , " ita " } , <nl> + { " jm " , " jam " } , <nl> + { " jp " , " jpn " } , <nl> + { " je " , " jey " } , <nl> + { " jo " , " jor " } , <nl> + { " kz " , " kaz " } , <nl> + { " ke " , " ken " } , <nl> + { " ki " , " kir " } , <nl> + { " kp " , " prk " } , <nl> + { " kr " , " kor " } , <nl> + { " kw " , " kwt " } , <nl> + { " kg " , " kgz " } , <nl> + { " la " , " lao " } , <nl> + { " lv " , " lva " } , <nl> + { " lb " , " lbn " } , <nl> + { " ls " , " lso " } , <nl> + { " lr " , " lbr " } , <nl> + { " ly " , " lby " } , <nl> + { " li " , " lie " } , <nl> + { " lt " , " ltu " } , <nl> + { " lu " , " lux " } , <nl> + { " mo " , " mac " } , <nl> + { " mk " , " mkd " } , <nl> + { " mg " , " mdg " } , <nl> + { " mw " , " mwi " } , <nl> + { " my " , " mys " } , <nl> + { " mv " , " mdv " } , <nl> + { " ml " , " mli " } , <nl> + { " mt " , " mlt " } , <nl> + { " mh " , " mhl " } , <nl> + { " mq " , " mtq " } , <nl> + { " mr " , " mrt " } , <nl> + { " mu " , " mus " } , <nl> + { " yt " , " myt " } , <nl> + { " mx " , " mex " } , <nl> + { " fm " , " fsm " } , <nl> + { " md " , " mda " } , <nl> + { " mc " , " mco " } , <nl> + { " mn " , " mng " } , <nl> + { " me " , " mne " } , <nl> + { " ms " , " msr " } , <nl> + { " ma " , " mar " } , <nl> + { " mz " , " moz " } , <nl> + { " mm " , " mmr " } , <nl> + { " na " , " nam " } , <nl> + { " nr " , " nru " } , <nl> + { " np " , " npl " } , <nl> + { " nl " , " nld " } , <nl> + { " an " , " ant " } , <nl> + { " nc " , " ncl " } , <nl> + { " nz " , " nzl " } , <nl> + { " ni " , " nic " } , <nl> + { " ne " , " ner " } , <nl> + { " ng " , " nga " } , <nl> + { " nu " , " niu " } , <nl> + { " nf " , " nfk " } , <nl> + { " mp " , " mnp " } , <nl> + { " no " , " nor " } , <nl> + { " om " , " omn " } , <nl> + { " pk " , " pak " } , <nl> + { " pw " , " plw " } , <nl> + { " ps " , " pse " } , <nl> + { " pa " , " pan " } , <nl> + { " pg " , " png " } , <nl> + { " py " , " pry " } , <nl> + { " pe " , " per " } , <nl> + { " ph " , " phl " } , <nl> + { " pn " , " pcn " } , <nl> + { " pl " , " pol " } , <nl> + { " pt " , " prt " } , <nl> + { " pr " , " pri " } , <nl> + { " qa " , " qat " } , <nl> + { " re " , " reu " } , <nl> + { " ro " , " rou " } , <nl> + { " ru " , " rus " } , <nl> + { " rw " , " rwa " } , <nl> + { " bl " , " blm " } , <nl> + { " sh " , " shn " } , <nl> + { " kn " , " kna " } , <nl> + { " lc " , " lca " } , <nl> + { " mf " , " maf " } , <nl> + { " pm " , " spm " } , <nl> + { " vc " , " vct " } , <nl> + { " ws " , " wsm " } , <nl> + { " sm " , " smr " } , <nl> + { " st " , " stp " } , <nl> + { " sa " , " sau " } , <nl> + { " sn " , " sen " } , <nl> + { " rs " , " srb " } , <nl> + { " sc " , " syc " } , <nl> + { " sl " , " sle " } , <nl> + { " sg " , " sgp " } , <nl> + { " sk " , " svk " } , <nl> + { " si " , " svn " } , <nl> + { " sb " , " slb " } , <nl> + { " so " , " som " } , <nl> + { " za " , " zaf " } , <nl> + { " gs " , " sgs " } , <nl> + { " es " , " esp " } , <nl> + { " lk " , " lka " } , <nl> + { " sd " , " sdn " } , <nl> + { " sr " , " sur " } , <nl> + { " sj " , " sjm " } , <nl> + { " sz " , " swz " } , <nl> + { " se " , " swe " } , <nl> + { " ch " , " che " } , <nl> + { " sy " , " syr " } , <nl> + { " tw " , " twn " } , <nl> + { " tj " , " tjk " } , <nl> + { " tz " , " tza " } , <nl> + { " th " , " tha " } , <nl> + { " tl " , " tls " } , <nl> + { " tg " , " tgo " } , <nl> + { " tk " , " tkl " } , <nl> + { " to " , " ton " } , <nl> + { " tt " , " tto " } , <nl> + { " tn " , " tun " } , <nl> + { " tr " , " tur " } , <nl> + { " tm " , " tkm " } , <nl> + { " tc " , " tca " } , <nl> + { " tv " , " tuv " } , <nl> + { " ug " , " uga " } , <nl> + { " ua " , " ukr " } , <nl> + { " ae " , " are " } , <nl> + { " gb " , " gbr " } , <nl> + { " us " , " usa " } , <nl> + { " um " , " umi " } , <nl> + { " uy " , " ury " } , <nl> + { " uz " , " uzb " } , <nl> + { " vu " , " vut " } , <nl> + { " ve " , " ven " } , <nl> + { " vn " , " vnm " } , <nl> + { " vg " , " vgb " } , <nl> + { " vi " , " vir " } , <nl> + { " wf " , " wlf " } , <nl> + { " eh " , " esh " } , <nl> + { " ye " , " yem " } , <nl> + { " zm " , " zmb " } , <nl> + { " zw " , " zwe " } <nl> + } } ; <nl> + / / clang - format on <nl>
[ cosmetics ] clang - format on array ( ISO3166 )
xbmc/xbmc
2f163e9aa1e0da23def6b7309115cb09e149c17a
2020-04-10T16:08:33Z
mmm a / lib / Rest / GeneralResponse . cpp <nl> ppp b / lib / Rest / GeneralResponse . cpp <nl> rest : : ResponseCode GeneralResponse : : responseCode ( int code ) { <nl> return ResponseCode : : SERVICE_UNAVAILABLE ; <nl> <nl> case TRI_ERROR_CLUSTER_UNSUPPORTED : <nl> + case TRI_ERROR_NOT_IMPLEMENTED : <nl> + case TRI_ERROR_NOT_YET_IMPLEMENTED : <nl> return ResponseCode : : NOT_IMPLEMENTED ; <nl> <nl> default : <nl>
changed HTTP return code
arangodb/arangodb
27aa7eeea5889ff5fdd3b971317c42135e11f0e7
2017-05-04T20:01:35Z
mmm a / include / envoy / config / grpc_mux . h <nl> ppp b / include / envoy / config / grpc_mux . h <nl> class GrpcMux { <nl> * / <nl> virtual void resume ( const std : : string & type_url ) PURE ; <nl> <nl> + / / TODO ( fredlas ) PR # 8478 will remove this . <nl> + / * * <nl> + * Whether this GrpcMux is delta . <nl> + * @ return bool whether this GrpcMux is delta . <nl> + * / <nl> + virtual bool isDelta ( ) const PURE ; <nl> + <nl> / / For delta <nl> virtual Watch * addOrUpdateWatch ( const std : : string & type_url , Watch * watch , <nl> const std : : set < std : : string > & resources , <nl> mmm a / include / envoy / config / subscription_factory . h <nl> ppp b / include / envoy / config / subscription_factory . h <nl> class SubscriptionFactory { <nl> virtual SubscriptionPtr <nl> subscriptionFromConfigSource ( const envoy : : api : : v2 : : core : : ConfigSource & config , <nl> absl : : string_view type_url , Stats : : Scope & scope , <nl> - SubscriptionCallbacks & callbacks , bool is_delta ) PURE ; <nl> + SubscriptionCallbacks & callbacks ) PURE ; <nl> } ; <nl> <nl> } / / namespace Config <nl> mmm a / include / envoy / router / route_config_provider_manager . h <nl> ppp b / include / envoy / router / route_config_provider_manager . h <nl> class RouteConfigProviderManager { <nl> virtual RouteConfigProviderPtr createRdsRouteConfigProvider ( <nl> const envoy : : config : : filter : : network : : http_connection_manager : : v2 : : Rds & rds , <nl> Server : : Configuration : : FactoryContext & factory_context , const std : : string & stat_prefix , <nl> - Init : : Manager & init_manager , bool is_delta ) PURE ; <nl> + Init : : Manager & init_manager ) PURE ; <nl> <nl> / * * <nl> * Get a RouteConfigSharedPtr for a statically defined route . Ownership is as described for <nl> mmm a / include / envoy / server / listener_manager . h <nl> ppp b / include / envoy / server / listener_manager . h <nl> class ListenerComponentFactory { <nl> * @ return an LDS API provider . <nl> * @ param lds_config supplies the management server configuration . <nl> * / <nl> - virtual LdsApiPtr createLdsApi ( const envoy : : api : : v2 : : core : : ConfigSource & lds_config , <nl> - bool is_delta ) PURE ; <nl> + virtual LdsApiPtr createLdsApi ( const envoy : : api : : v2 : : core : : ConfigSource & lds_config ) PURE ; <nl> <nl> / * * <nl> * Creates a socket . <nl> class ListenerManager { <nl> * pieces of the server existing . <nl> * @ param lds_config supplies the management server configuration . <nl> * / <nl> - virtual void createLdsApi ( const envoy : : api : : v2 : : core : : ConfigSource & lds_config , <nl> - bool is_delta ) PURE ; <nl> + virtual void createLdsApi ( const envoy : : api : : v2 : : core : : ConfigSource & lds_config ) PURE ; <nl> <nl> / * * <nl> * @ return std : : vector < std : : reference_wrapper < Network : : ListenerConfig > > a list of the currently <nl> mmm a / include / envoy / upstream / cluster_manager . h <nl> ppp b / include / envoy / upstream / cluster_manager . h <nl> class ClusterManager { <nl> virtual Config : : SubscriptionFactory & subscriptionFactory ( ) PURE ; <nl> <nl> virtual std : : size_t warmingClusterCount ( ) const PURE ; <nl> - <nl> - virtual bool xdsIsDelta ( ) const PURE ; <nl> } ; <nl> <nl> using ClusterManagerPtr = std : : unique_ptr < ClusterManager > ; <nl> class ClusterManagerFactory { <nl> / * * <nl> * Create a CDS API provider from configuration proto . <nl> * / <nl> - virtual CdsApiPtr createCds ( const envoy : : api : : v2 : : core : : ConfigSource & cds_config , bool is_delta , <nl> + virtual CdsApiPtr createCds ( const envoy : : api : : v2 : : core : : ConfigSource & cds_config , <nl> ClusterManager & cm ) PURE ; <nl> <nl> / * * <nl> mmm a / source / common / config / grpc_mux_impl . h <nl> ppp b / source / common / config / grpc_mux_impl . h <nl> class GrpcMuxImpl : public GrpcMux , <nl> GrpcMuxCallbacks & callbacks ) override ; <nl> <nl> / / GrpcMux <nl> + / / TODO ( fredlas ) PR # 8478 will remove this . <nl> + bool isDelta ( ) const override { return false ; } <nl> void pause ( const std : : string & type_url ) override ; <nl> void resume ( const std : : string & type_url ) override ; <nl> bool paused ( const std : : string & type_url ) const override ; <nl> class NullGrpcMuxImpl : public GrpcMux , GrpcStreamCallbacks < envoy : : api : : v2 : : Disc <nl> GrpcMuxCallbacks & ) override { <nl> throw EnvoyException ( " ADS must be configured to support an ADS config source " ) ; <nl> } <nl> + / / TODO ( fredlas ) PR # 8478 will remove this . <nl> + bool isDelta ( ) const override { return false ; } <nl> void pause ( const std : : string & ) override { } <nl> void resume ( const std : : string & ) override { } <nl> bool paused ( const std : : string & ) const override { return false ; } <nl> mmm a / source / common / config / new_grpc_mux_impl . h <nl> ppp b / source / common / config / new_grpc_mux_impl . h <nl> class NewGrpcMuxImpl : public GrpcMux , <nl> std : : chrono : : milliseconds init_fetch_timeout ) override ; <nl> void removeWatch ( const std : : string & type_url , Watch * watch ) override ; <nl> <nl> + / / TODO ( fredlas ) PR # 8478 will remove this . <nl> + bool isDelta ( ) const override { return true ; } <nl> + <nl> void pause ( const std : : string & type_url ) override ; <nl> void resume ( const std : : string & type_url ) override ; <nl> bool paused ( const std : : string & type_url ) const override ; <nl> mmm a / source / common / config / subscription_factory_impl . cc <nl> ppp b / source / common / config / subscription_factory_impl . cc <nl> SubscriptionFactoryImpl : : SubscriptionFactoryImpl ( <nl> <nl> SubscriptionPtr SubscriptionFactoryImpl : : subscriptionFromConfigSource ( <nl> const envoy : : api : : v2 : : core : : ConfigSource & config , absl : : string_view type_url , <nl> - Stats : : Scope & scope , SubscriptionCallbacks & callbacks , bool is_delta ) { <nl> + Stats : : Scope & scope , SubscriptionCallbacks & callbacks ) { <nl> Config : : Utility : : checkLocalInfo ( type_url , local_info_ ) ; <nl> std : : unique_ptr < Subscription > result ; <nl> SubscriptionStats stats = Utility : : generateStats ( scope ) ; <nl> SubscriptionPtr SubscriptionFactoryImpl : : subscriptionFromConfigSource ( <nl> break ; <nl> } <nl> case envoy : : api : : v2 : : core : : ConfigSource : : kAds : { <nl> - if ( is_delta ) { <nl> + if ( cm_ . adsMux ( ) - > isDelta ( ) ) { <nl> result = std : : make_unique < DeltaSubscriptionImpl > ( <nl> cm_ . adsMux ( ) , type_url , callbacks , stats , <nl> Utility : : configSourceInitialFetchTimeout ( config ) , true ) ; <nl> mmm a / source / common / config / subscription_factory_impl . h <nl> ppp b / source / common / config / subscription_factory_impl . h <nl> class SubscriptionFactoryImpl : public SubscriptionFactory { <nl> Upstream : : ClusterManager & cm , Runtime : : RandomGenerator & random , <nl> ProtobufMessage : : ValidationVisitor & validation_visitor , Api : : Api & api ) ; <nl> <nl> - / / TODO ( fredlas ) remove is_delta once delta and SotW are unified <nl> / / Config : : SubscriptionFactory <nl> SubscriptionPtr subscriptionFromConfigSource ( const envoy : : api : : v2 : : core : : ConfigSource & config , <nl> absl : : string_view type_url , Stats : : Scope & scope , <nl> - SubscriptionCallbacks & callbacks , <nl> - bool is_delta ) override ; <nl> + SubscriptionCallbacks & callbacks ) override ; <nl> <nl> private : <nl> const LocalInfo : : LocalInfo & local_info_ ; <nl> mmm a / source / common / router / rds_impl . cc <nl> ppp b / source / common / router / rds_impl . cc <nl> RouteConfigProviderPtr RouteConfigProviderUtil : : create ( <nl> const envoy : : config : : filter : : network : : http_connection_manager : : v2 : : HttpConnectionManager & <nl> config , <nl> Server : : Configuration : : FactoryContext & factory_context , const std : : string & stat_prefix , <nl> - RouteConfigProviderManager & route_config_provider_manager , bool is_delta ) { <nl> + RouteConfigProviderManager & route_config_provider_manager ) { <nl> switch ( config . route_specifier_case ( ) ) { <nl> case envoy : : config : : filter : : network : : http_connection_manager : : v2 : : HttpConnectionManager : : <nl> kRouteConfig : <nl> RouteConfigProviderPtr RouteConfigProviderUtil : : create ( <nl> factory_context ) ; <nl> case envoy : : config : : filter : : network : : http_connection_manager : : v2 : : HttpConnectionManager : : kRds : <nl> return route_config_provider_manager . createRdsRouteConfigProvider ( <nl> - config . rds ( ) , factory_context , stat_prefix , factory_context . initManager ( ) , is_delta ) ; <nl> + config . rds ( ) , factory_context , stat_prefix , factory_context . initManager ( ) ) ; <nl> default : <nl> NOT_REACHED_GCOVR_EXCL_LINE ; <nl> } <nl> RdsRouteConfigSubscription : : RdsRouteConfigSubscription ( <nl> const uint64_t manager_identifier , Server : : Configuration : : ServerFactoryContext & factory_context , <nl> ProtobufMessage : : ValidationVisitor & validator , Init : : Manager & init_manager , <nl> const std : : string & stat_prefix , <nl> - Envoy : : Router : : RouteConfigProviderManagerImpl & route_config_provider_manager , bool is_delta ) <nl> + Envoy : : Router : : RouteConfigProviderManagerImpl & route_config_provider_manager ) <nl> : route_config_name_ ( rds . route_config_name ( ) ) , factory_context_ ( factory_context ) , <nl> validator_ ( validator ) , init_manager_ ( init_manager ) , <nl> init_target_ ( fmt : : format ( " RdsRouteConfigSubscription { } " , route_config_name_ ) , <nl> RdsRouteConfigSubscription : : RdsRouteConfigSubscription ( <nl> factory_context . clusterManager ( ) . subscriptionFactory ( ) . subscriptionFromConfigSource ( <nl> rds . config_source ( ) , <nl> Grpc : : Common : : typeUrl ( envoy : : api : : v2 : : RouteConfiguration ( ) . GetDescriptor ( ) - > full_name ( ) ) , <nl> - * scope_ , * this , is_delta ) ; <nl> + * scope_ , * this ) ; <nl> config_update_info_ = <nl> std : : make_unique < RouteConfigUpdateReceiverImpl > ( factory_context . timeSource ( ) , validator_ ) ; <nl> } <nl> RouteConfigProviderManagerImpl : : RouteConfigProviderManagerImpl ( Server : : Admin & ad <nl> Router : : RouteConfigProviderPtr RouteConfigProviderManagerImpl : : createRdsRouteConfigProvider ( <nl> const envoy : : config : : filter : : network : : http_connection_manager : : v2 : : Rds & rds , <nl> Server : : Configuration : : FactoryContext & factory_context , const std : : string & stat_prefix , <nl> - Init : : Manager & init_manager , bool is_delta ) { <nl> + Init : : Manager & init_manager ) { <nl> / / RdsRouteConfigSubscriptions are unique based on their serialized RDS config . <nl> const uint64_t manager_identifier = MessageUtil : : hash ( rds ) ; <nl> auto & server_factory_context = factory_context . getServerFactoryContext ( ) ; <nl> Router : : RouteConfigProviderPtr RouteConfigProviderManagerImpl : : createRdsRouteCon <nl> / / of simplicity . <nl> subscription . reset ( new RdsRouteConfigSubscription ( <nl> rds , manager_identifier , server_factory_context , factory_context . messageValidationVisitor ( ) , <nl> - init_manager , stat_prefix , * this , is_delta ) ) ; <nl> + init_manager , stat_prefix , * this ) ) ; <nl> init_manager . add ( subscription - > init_target_ ) ; <nl> route_config_subscriptions_ . insert ( { manager_identifier , subscription } ) ; <nl> } else { <nl> mmm a / source / common / router / rds_impl . h <nl> ppp b / source / common / router / rds_impl . h <nl> class RouteConfigProviderUtil { <nl> create ( const envoy : : config : : filter : : network : : http_connection_manager : : v2 : : HttpConnectionManager & <nl> config , <nl> Server : : Configuration : : FactoryContext & factory_context , const std : : string & stat_prefix , <nl> - RouteConfigProviderManager & route_config_provider_manager , bool is_delta ) ; <nl> + RouteConfigProviderManager & route_config_provider_manager ) ; <nl> } ; <nl> <nl> class RouteConfigProviderManagerImpl ; <nl> class RdsRouteConfigSubscription : Envoy : : Config : : SubscriptionCallbacks , <nl> const uint64_t manager_identifier , <nl> Server : : Configuration : : ServerFactoryContext & factory_context , <nl> ProtobufMessage : : ValidationVisitor & validator , Init : : Manager & init_manager , <nl> - const std : : string & stat_prefix , RouteConfigProviderManagerImpl & route_config_provider_manager , <nl> - bool is_delta ) ; <nl> + const std : : string & stat_prefix , <nl> + RouteConfigProviderManagerImpl & route_config_provider_manager ) ; <nl> <nl> bool validateUpdateSize ( int num_resources ) ; <nl> <nl> class RouteConfigProviderManagerImpl : public RouteConfigProviderManager , <nl> RouteConfigProviderPtr createRdsRouteConfigProvider ( <nl> const envoy : : config : : filter : : network : : http_connection_manager : : v2 : : Rds & rds , <nl> Server : : Configuration : : FactoryContext & factory_context , const std : : string & stat_prefix , <nl> - Init : : Manager & init_manager , bool is_delta ) override ; <nl> + Init : : Manager & init_manager ) override ; <nl> <nl> RouteConfigProviderPtr <nl> createStaticRouteConfigProvider ( const envoy : : api : : v2 : : RouteConfiguration & route_config , <nl> mmm a / source / common / router / scoped_rds . cc <nl> ppp b / source / common / router / scoped_rds . cc <nl> ScopedRdsConfigSubscription : : ScopedRdsConfigSubscription ( <nl> scoped_rds . scoped_rds_config_source ( ) , <nl> Grpc : : Common : : typeUrl ( <nl> envoy : : api : : v2 : : ScopedRouteConfiguration ( ) . GetDescriptor ( ) - > full_name ( ) ) , <nl> - * scope_ , * this , true ) ; <nl> + * scope_ , * this ) ; <nl> <nl> initialize ( [ scope_key_builder ] ( ) - > Envoy : : Config : : ConfigProvider : : ConfigConstSharedPtr { <nl> return std : : make_shared < ScopedConfigImpl > ( <nl> ScopedRdsConfigSubscription : : RdsRouteConfigProviderHelper : : RdsRouteConfigProvide <nl> route_provider_ ( static_cast < RdsRouteConfigProviderImpl * > ( <nl> parent_ . route_config_provider_manager_ <nl> . createRdsRouteConfigProvider ( rds , parent_ . factory_context_ , parent_ . stat_prefix_ , <nl> - init_manager , true ) <nl> + init_manager ) <nl> . release ( ) ) ) , <nl> rds_update_callback_handle_ ( route_provider_ - > subscription ( ) . addUpdateCallback ( [ this ] ( ) { <nl> / / Subscribe to RDS update . <nl> mmm a / source / common / router / vhds . cc <nl> ppp b / source / common / router / vhds . cc <nl> VhdsSubscription : : VhdsSubscription ( RouteConfigUpdatePtr & config_update_info , <nl> factory_context . clusterManager ( ) . subscriptionFactory ( ) . subscriptionFromConfigSource ( <nl> config_update_info_ - > routeConfiguration ( ) . vhds ( ) . config_source ( ) , <nl> Grpc : : Common : : typeUrl ( envoy : : api : : v2 : : route : : VirtualHost ( ) . GetDescriptor ( ) - > full_name ( ) ) , <nl> - * scope_ , * this , / * is_delta = * / true ) ; <nl> + * scope_ , * this ) ; <nl> } <nl> <nl> void VhdsSubscription : : onConfigUpdateFailed ( Envoy : : Config : : ConfigUpdateFailureReason reason , <nl> mmm a / source / common / runtime / runtime_impl . cc <nl> ppp b / source / common / runtime / runtime_impl . cc <nl> void RtdsSubscription : : start ( ) { <nl> subscription_ = parent_ . cm_ - > subscriptionFactory ( ) . subscriptionFromConfigSource ( <nl> config_source_ , <nl> Grpc : : Common : : typeUrl ( envoy : : service : : discovery : : v2 : : Runtime ( ) . GetDescriptor ( ) - > full_name ( ) ) , <nl> - store_ , * this , / * is_delta = * / false ) ; <nl> + store_ , * this ) ; <nl> subscription_ - > start ( { resource_name_ } ) ; <nl> } <nl> <nl> mmm a / source / common / secret / sds_api . cc <nl> ppp b / source / common / secret / sds_api . cc <nl> void SdsApi : : initialize ( ) { <nl> subscription_ = subscription_factory_ . subscriptionFromConfigSource ( <nl> sds_config_ , <nl> Grpc : : Common : : typeUrl ( envoy : : api : : v2 : : auth : : Secret ( ) . GetDescriptor ( ) - > full_name ( ) ) , stats_ , <nl> - * this , / * is_delta = * / false ) ; <nl> + * this ) ; <nl> subscription_ - > start ( { sds_config_name_ } ) ; <nl> } <nl> <nl> mmm a / source / common / upstream / cds_api_impl . cc <nl> ppp b / source / common / upstream / cds_api_impl . cc <nl> <nl> namespace Envoy { <nl> namespace Upstream { <nl> <nl> - / / TODO ( fredlas ) the is_delta argument can be removed upon delta + SotW ADS Envoy code unification . It <nl> - / / is only actually needed to choose the grpc_method , which is irrelevant if ADS is used . <nl> - CdsApiPtr CdsApiImpl : : create ( const envoy : : api : : v2 : : core : : ConfigSource & cds_config , bool is_delta , <nl> + CdsApiPtr CdsApiImpl : : create ( const envoy : : api : : v2 : : core : : ConfigSource & cds_config , <nl> ClusterManager & cm , Stats : : Scope & scope , <nl> ProtobufMessage : : ValidationVisitor & validation_visitor ) { <nl> - return CdsApiPtr { new CdsApiImpl ( cds_config , is_delta , cm , scope , validation_visitor ) } ; <nl> + return CdsApiPtr { new CdsApiImpl ( cds_config , cm , scope , validation_visitor ) } ; <nl> } <nl> <nl> - CdsApiImpl : : CdsApiImpl ( const envoy : : api : : v2 : : core : : ConfigSource & cds_config , bool is_delta , <nl> - ClusterManager & cm , Stats : : Scope & scope , <nl> - ProtobufMessage : : ValidationVisitor & validation_visitor ) <nl> + CdsApiImpl : : CdsApiImpl ( const envoy : : api : : v2 : : core : : ConfigSource & cds_config , ClusterManager & cm , <nl> + Stats : : Scope & scope , ProtobufMessage : : ValidationVisitor & validation_visitor ) <nl> : cm_ ( cm ) , scope_ ( scope . createScope ( " cluster_manager . cds . " ) ) , <nl> validation_visitor_ ( validation_visitor ) { <nl> subscription_ = cm_ . subscriptionFactory ( ) . subscriptionFromConfigSource ( <nl> cds_config , Grpc : : Common : : typeUrl ( envoy : : api : : v2 : : Cluster ( ) . GetDescriptor ( ) - > full_name ( ) ) , <nl> - * scope_ , * this , is_delta ) ; <nl> + * scope_ , * this ) ; <nl> } <nl> <nl> void CdsApiImpl : : onConfigUpdate ( const Protobuf : : RepeatedPtrField < ProtobufWkt : : Any > & resources , <nl> mmm a / source / common / upstream / cds_api_impl . h <nl> ppp b / source / common / upstream / cds_api_impl . h <nl> class CdsApiImpl : public CdsApi , <nl> Config : : SubscriptionCallbacks , <nl> Logger : : Loggable < Logger : : Id : : upstream > { <nl> public : <nl> - static CdsApiPtr create ( const envoy : : api : : v2 : : core : : ConfigSource & cds_config , bool is_delta , <nl> - ClusterManager & cm , Stats : : Scope & scope , <nl> + static CdsApiPtr create ( const envoy : : api : : v2 : : core : : ConfigSource & cds_config , ClusterManager & cm , <nl> + Stats : : Scope & scope , <nl> ProtobufMessage : : ValidationVisitor & validation_visitor ) ; <nl> <nl> / / Upstream : : CdsApi <nl> class CdsApiImpl : public CdsApi , <nl> return MessageUtil : : anyConvert < envoy : : api : : v2 : : Cluster > ( resource ) . name ( ) ; <nl> } <nl> <nl> - CdsApiImpl ( const envoy : : api : : v2 : : core : : ConfigSource & cds_config , bool is_delta , <nl> - ClusterManager & cm , Stats : : Scope & scope , <nl> - ProtobufMessage : : ValidationVisitor & validation_visitor ) ; <nl> + CdsApiImpl ( const envoy : : api : : v2 : : core : : ConfigSource & cds_config , ClusterManager & cm , <nl> + Stats : : Scope & scope , ProtobufMessage : : ValidationVisitor & validation_visitor ) ; <nl> void runInitializeCallbackIfAny ( ) ; <nl> <nl> ClusterManager & cm_ ; <nl> mmm a / source / common / upstream / cluster_manager_impl . cc <nl> ppp b / source / common / upstream / cluster_manager_impl . cc <nl> ClusterManagerImpl : : ClusterManagerImpl ( <nl> } <nl> } <nl> <nl> - / / TODO ( fredlas ) HACK to support <nl> - / / loadCluster - > clusterFromProto - > ClusterFactoryImplBase : : create - > EdsClusterFactory : : createClusterImpl ( ) , <nl> - / / which wants to call xdsIsDelta ( ) on us . So , we need to get our xds_is_delta_ defined before <nl> - / / then . Once SotW and delta are unified , that is_delta bool will be gone from everywhere , and the <nl> - / / xds_is_delta_ variable can be removed . <nl> const auto & dyn_resources = bootstrap . dynamic_resources ( ) ; <nl> - if ( dyn_resources . has_ads_config ( ) ) { <nl> - xds_is_delta_ = <nl> - dyn_resources . ads_config ( ) . api_type ( ) = = envoy : : api : : v2 : : core : : ApiConfigSource : : DELTA_GRPC ; <nl> - } else if ( dyn_resources . has_cds_config ( ) ) { <nl> - const auto & cds_config = dyn_resources . cds_config ( ) ; <nl> - xds_is_delta_ = <nl> - cds_config . api_config_source ( ) . api_type ( ) = = <nl> - envoy : : api : : v2 : : core : : ApiConfigSource : : DELTA_GRPC | | <nl> - ( dyn_resources . has_ads_config ( ) & & dyn_resources . ads_config ( ) . api_type ( ) = = <nl> - envoy : : api : : v2 : : core : : ApiConfigSource : : DELTA_GRPC ) ; <nl> - } else if ( dyn_resources . has_lds_config ( ) ) { <nl> - const auto & lds_config = dyn_resources . lds_config ( ) ; <nl> - xds_is_delta_ = <nl> - lds_config . api_config_source ( ) . api_type ( ) = = <nl> - envoy : : api : : v2 : : core : : ApiConfigSource : : DELTA_GRPC | | <nl> - ( dyn_resources . has_ads_config ( ) & & dyn_resources . ads_config ( ) . api_type ( ) = = <nl> - envoy : : api : : v2 : : core : : ApiConfigSource : : DELTA_GRPC ) ; <nl> - } else { <nl> - xds_is_delta_ = false ; <nl> - } <nl> <nl> / / Cluster loading happens in two phases : first all the primary clusters are loaded , and then all <nl> / / the secondary clusters are loaded . As it currently stands all non - EDS clusters are primary and <nl> ClusterManagerImpl : : ClusterManagerImpl ( <nl> <nl> / / We can now potentially create the CDS API once the backing cluster exists . <nl> if ( dyn_resources . has_cds_config ( ) ) { <nl> - cds_api_ = factory_ . createCds ( dyn_resources . cds_config ( ) , xds_is_delta_ , * this ) ; <nl> + cds_api_ = factory_ . createCds ( dyn_resources . cds_config ( ) , * this ) ; <nl> init_helper_ . setCds ( cds_api_ . get ( ) ) ; <nl> } else { <nl> init_helper_ . setCds ( nullptr ) ; <nl> std : : pair < ClusterSharedPtr , ThreadAwareLoadBalancerPtr > ProdClusterManagerFactor <nl> } <nl> <nl> CdsApiPtr ProdClusterManagerFactory : : createCds ( const envoy : : api : : v2 : : core : : ConfigSource & cds_config , <nl> - bool is_delta , ClusterManager & cm ) { <nl> + ClusterManager & cm ) { <nl> / / TODO ( htuch ) : Differentiate static vs . dynamic validation visitors . <nl> - return CdsApiImpl : : create ( cds_config , is_delta , cm , stats_ , <nl> - validation_context_ . dynamicValidationVisitor ( ) ) ; <nl> + return CdsApiImpl : : create ( cds_config , cm , stats_ , validation_context_ . dynamicValidationVisitor ( ) ) ; <nl> } <nl> <nl> } / / namespace Upstream <nl> mmm a / source / common / upstream / cluster_manager_impl . h <nl> ppp b / source / common / upstream / cluster_manager_impl . h <nl> class ProdClusterManagerFactory : public ClusterManagerFactory { <nl> std : : pair < ClusterSharedPtr , ThreadAwareLoadBalancerPtr > <nl> clusterFromProto ( const envoy : : api : : v2 : : Cluster & cluster , ClusterManager & cm , <nl> Outlier : : EventLoggerSharedPtr outlier_event_logger , bool added_via_api ) override ; <nl> - CdsApiPtr createCds ( const envoy : : api : : v2 : : core : : ConfigSource & cds_config , bool is_delta , <nl> + CdsApiPtr createCds ( const envoy : : api : : v2 : : core : : ConfigSource & cds_config , <nl> ClusterManager & cm ) override ; <nl> Secret : : SecretManager & secretManager ( ) override { return secret_manager_ ; } <nl> <nl> class ClusterManagerImpl : public ClusterManager , Logger : : Loggable < Logger : : Id : : u <nl> <nl> std : : size_t warmingClusterCount ( ) const override { return warming_clusters_ . size ( ) ; } <nl> <nl> - / / TODO ( fredlas ) remove once SotW and delta are unified . <nl> - bool xdsIsDelta ( ) const override { return xds_is_delta_ ; } <nl> - <nl> protected : <nl> virtual void postThreadLocalDrainConnections ( const Cluster & cluster , <nl> const HostVector & hosts_removed ) ; <nl> class ClusterManagerImpl : public ClusterManager , Logger : : Loggable < Logger : : Id : : u <nl> ClusterUpdatesMap updates_map_ ; <nl> Event : : Dispatcher & dispatcher_ ; <nl> Http : : Context & http_context_ ; <nl> - bool xds_is_delta_ { } ; <nl> Config : : SubscriptionFactoryImpl subscription_factory_ ; <nl> } ; <nl> <nl> mmm a / source / common / upstream / eds . cc <nl> ppp b / source / common / upstream / eds . cc <nl> namespace Upstream { <nl> EdsClusterImpl : : EdsClusterImpl ( <nl> const envoy : : api : : v2 : : Cluster & cluster , Runtime : : Loader & runtime , <nl> Server : : Configuration : : TransportSocketFactoryContext & factory_context , <nl> - Stats : : ScopePtr & & stats_scope , bool added_via_api , bool is_delta ) <nl> + Stats : : ScopePtr & & stats_scope , bool added_via_api ) <nl> : BaseDynamicClusterImpl ( cluster , runtime , factory_context , std : : move ( stats_scope ) , <nl> added_via_api ) , <nl> cm_ ( factory_context . clusterManager ( ) ) , local_info_ ( factory_context . localInfo ( ) ) , <nl> EdsClusterImpl : : EdsClusterImpl ( <nl> eds_config , <nl> Grpc : : Common : : typeUrl ( <nl> envoy : : api : : v2 : : ClusterLoadAssignment ( ) . GetDescriptor ( ) - > full_name ( ) ) , <nl> - info_ - > statsScope ( ) , * this , is_delta ) ; <nl> + info_ - > statsScope ( ) , * this ) ; <nl> } <nl> <nl> void EdsClusterImpl : : startPreInit ( ) { subscription_ - > start ( { cluster_name_ } ) ; } <nl> EdsClusterFactory : : createClusterImpl ( <nl> <nl> return std : : make_pair ( <nl> std : : make_unique < EdsClusterImpl > ( cluster , context . runtime ( ) , socket_factory_context , <nl> - std : : move ( stats_scope ) , context . addedViaApi ( ) , <nl> - context . clusterManager ( ) . xdsIsDelta ( ) ) , <nl> + std : : move ( stats_scope ) , context . addedViaApi ( ) ) , <nl> nullptr ) ; <nl> } <nl> <nl> mmm a / source / common / upstream / eds . h <nl> ppp b / source / common / upstream / eds . h <nl> class EdsClusterImpl : public BaseDynamicClusterImpl , Config : : SubscriptionCallba <nl> public : <nl> EdsClusterImpl ( const envoy : : api : : v2 : : Cluster & cluster , Runtime : : Loader & runtime , <nl> Server : : Configuration : : TransportSocketFactoryContext & factory_context , <nl> - Stats : : ScopePtr & & stats_scope , bool added_via_api , bool is_delta ) ; <nl> + Stats : : ScopePtr & & stats_scope , bool added_via_api ) ; <nl> <nl> / / Upstream : : Cluster <nl> InitializePhase initializePhase ( ) const override { return InitializePhase : : Secondary ; } <nl> mmm a / source / extensions / filters / network / http_connection_manager / config . cc <nl> ppp b / source / extensions / filters / network / http_connection_manager / config . cc <nl> HttpConnectionManagerConfig : : HttpConnectionManagerConfig ( <nl> case envoy : : config : : filter : : network : : http_connection_manager : : v2 : : HttpConnectionManager : : <nl> kRouteConfig : <nl> route_config_provider_ = Router : : RouteConfigProviderUtil : : create ( <nl> - config , context_ , stats_prefix_ , route_config_provider_manager_ , <nl> - context_ . clusterManager ( ) . xdsIsDelta ( ) ) ; <nl> + config , context_ , stats_prefix_ , route_config_provider_manager_ ) ; <nl> break ; <nl> case envoy : : config : : filter : : network : : http_connection_manager : : v2 : : HttpConnectionManager : : <nl> kScopedRoutes : <nl> mmm a / source / server / config_validation / cluster_manager . cc <nl> ppp b / source / server / config_validation / cluster_manager . cc <nl> ClusterManagerPtr ValidationClusterManagerFactory : : clusterManagerFromProto ( <nl> <nl> CdsApiPtr <nl> ValidationClusterManagerFactory : : createCds ( const envoy : : api : : v2 : : core : : ConfigSource & cds_config , <nl> - bool is_delta , ClusterManager & cm ) { <nl> + ClusterManager & cm ) { <nl> / / Create the CdsApiImpl . . . <nl> - ProdClusterManagerFactory : : createCds ( cds_config , is_delta , cm ) ; <nl> + ProdClusterManagerFactory : : createCds ( cds_config , cm ) ; <nl> / / . . . and then throw it away , so that we don ' t actually connect to it . <nl> return nullptr ; <nl> } <nl> mmm a / source / server / config_validation / cluster_manager . h <nl> ppp b / source / server / config_validation / cluster_manager . h <nl> class ValidationClusterManagerFactory : public ProdClusterManagerFactory { <nl> <nl> / / Delegates to ProdClusterManagerFactory : : createCds , but discards the result and returns nullptr <nl> / / unconditionally . <nl> - CdsApiPtr createCds ( const envoy : : api : : v2 : : core : : ConfigSource & cds_config , bool is_delta , <nl> + CdsApiPtr createCds ( const envoy : : api : : v2 : : core : : ConfigSource & cds_config , <nl> ClusterManager & cm ) override ; <nl> <nl> private : <nl> mmm a / source / server / config_validation / server . h <nl> ppp b / source / server / config_validation / server . h <nl> class ValidationInstance final : Logger : : Loggable < Logger : : Id : : main > , <nl> Configuration : : ServerFactoryContext & serverFactoryContext ( ) override { return server_context_ ; } <nl> <nl> / / Server : : ListenerComponentFactory <nl> - LdsApiPtr createLdsApi ( const envoy : : api : : v2 : : core : : ConfigSource & lds_config , <nl> - bool is_delta ) override { <nl> - return std : : make_unique < LdsApiImpl > ( <nl> - lds_config , clusterManager ( ) , initManager ( ) , stats ( ) , listenerManager ( ) , <nl> - messageValidationContext ( ) . dynamicValidationVisitor ( ) , is_delta ) ; <nl> + LdsApiPtr createLdsApi ( const envoy : : api : : v2 : : core : : ConfigSource & lds_config ) override { <nl> + return std : : make_unique < LdsApiImpl > ( lds_config , clusterManager ( ) , initManager ( ) , stats ( ) , <nl> + listenerManager ( ) , <nl> + messageValidationContext ( ) . dynamicValidationVisitor ( ) ) ; <nl> } <nl> std : : vector < Network : : FilterFactoryCb > createNetworkFilterFactoryList ( <nl> const Protobuf : : RepeatedPtrField < envoy : : api : : v2 : : listener : : Filter > & filters , <nl> mmm a / source / server / lds_api . cc <nl> ppp b / source / server / lds_api . cc <nl> namespace Server { <nl> LdsApiImpl : : LdsApiImpl ( const envoy : : api : : v2 : : core : : ConfigSource & lds_config , <nl> Upstream : : ClusterManager & cm , Init : : Manager & init_manager , <nl> Stats : : Scope & scope , ListenerManager & lm , <nl> - ProtobufMessage : : ValidationVisitor & validation_visitor , bool is_delta ) <nl> + ProtobufMessage : : ValidationVisitor & validation_visitor ) <nl> : listener_manager_ ( lm ) , scope_ ( scope . createScope ( " listener_manager . lds . " ) ) , cm_ ( cm ) , <nl> init_target_ ( " LDS " , [ this ] ( ) { subscription_ - > start ( { } ) ; } ) , <nl> validation_visitor_ ( validation_visitor ) { <nl> subscription_ = cm . subscriptionFactory ( ) . subscriptionFromConfigSource ( <nl> lds_config , Grpc : : Common : : typeUrl ( envoy : : api : : v2 : : Listener ( ) . GetDescriptor ( ) - > full_name ( ) ) , <nl> - * scope_ , * this , is_delta ) ; <nl> + * scope_ , * this ) ; <nl> init_manager . add ( init_target_ ) ; <nl> } <nl> <nl> mmm a / source / server / lds_api . h <nl> ppp b / source / server / lds_api . h <nl> class LdsApiImpl : public LdsApi , <nl> public : <nl> LdsApiImpl ( const envoy : : api : : v2 : : core : : ConfigSource & lds_config , Upstream : : ClusterManager & cm , <nl> Init : : Manager & init_manager , Stats : : Scope & scope , ListenerManager & lm , <nl> - ProtobufMessage : : ValidationVisitor & validation_visitor , bool is_delta ) ; <nl> + ProtobufMessage : : ValidationVisitor & validation_visitor ) ; <nl> <nl> / / Server : : LdsApi <nl> std : : string versionInfo ( ) const override { return system_version_info_ ; } <nl> mmm a / source / server / listener_manager_impl . h <nl> ppp b / source / server / listener_manager_impl . h <nl> class ProdListenerComponentFactory : public ListenerComponentFactory , <nl> Configuration : : ListenerFactoryContext & context ) ; <nl> <nl> / / Server : : ListenerComponentFactory <nl> - LdsApiPtr createLdsApi ( const envoy : : api : : v2 : : core : : ConfigSource & lds_config , <nl> - bool is_delta ) override { <nl> + LdsApiPtr createLdsApi ( const envoy : : api : : v2 : : core : : ConfigSource & lds_config ) override { <nl> return std : : make_unique < LdsApiImpl > ( <nl> lds_config , server_ . clusterManager ( ) , server_ . initManager ( ) , server_ . stats ( ) , <nl> - server_ . listenerManager ( ) , server_ . messageValidationContext ( ) . dynamicValidationVisitor ( ) , <nl> - is_delta ) ; <nl> + server_ . listenerManager ( ) , server_ . messageValidationContext ( ) . dynamicValidationVisitor ( ) ) ; <nl> } <nl> std : : vector < Network : : FilterFactoryCb > createNetworkFilterFactoryList ( <nl> const Protobuf : : RepeatedPtrField < envoy : : api : : v2 : : listener : : Filter > & filters , <nl> class ListenerManagerImpl : public ListenerManager , Logger : : Loggable < Logger : : Id : <nl> / / Server : : ListenerManager <nl> bool addOrUpdateListener ( const envoy : : api : : v2 : : Listener & config , const std : : string & version_info , <nl> bool added_via_api ) override ; <nl> - void createLdsApi ( const envoy : : api : : v2 : : core : : ConfigSource & lds_config , bool is_delta ) override { <nl> + void createLdsApi ( const envoy : : api : : v2 : : core : : ConfigSource & lds_config ) override { <nl> ASSERT ( lds_api_ = = nullptr ) ; <nl> - lds_api_ = factory_ . createLdsApi ( lds_config , is_delta ) ; <nl> + lds_api_ = factory_ . createLdsApi ( lds_config ) ; <nl> } <nl> std : : vector < std : : reference_wrapper < Network : : ListenerConfig > > listeners ( ) override ; <nl> uint64_t numConnections ( ) override ; <nl> mmm a / source / server / server . cc <nl> ppp b / source / server / server . cc <nl> void InstanceImpl : : initialize ( const Options & options , <nl> / / Instruct the listener manager to create the LDS provider if needed . This must be done later <nl> / / because various items do not yet exist when the listener manager is created . <nl> if ( bootstrap_ . dynamic_resources ( ) . has_lds_config ( ) ) { <nl> - const bool is_delta = <nl> - bootstrap_ . dynamic_resources ( ) . lds_config ( ) . api_config_source ( ) . api_type ( ) = = <nl> - envoy : : api : : v2 : : core : : ApiConfigSource : : DELTA_GRPC | | <nl> - ( bootstrap_ . dynamic_resources ( ) . has_ads_config ( ) & & <nl> - bootstrap_ . dynamic_resources ( ) . ads_config ( ) . api_type ( ) = = <nl> - envoy : : api : : v2 : : core : : ApiConfigSource : : DELTA_GRPC ) ; <nl> - listener_manager_ - > createLdsApi ( bootstrap_ . dynamic_resources ( ) . lds_config ( ) , is_delta ) ; <nl> + listener_manager_ - > createLdsApi ( bootstrap_ . dynamic_resources ( ) . lds_config ( ) ) ; <nl> } <nl> <nl> / / We have to defer RTDS initialization until after the cluster manager is <nl> mmm a / test / common / config / grpc_mux_impl_test . cc <nl> ppp b / test / common / config / grpc_mux_impl_test . cc <nl> class GrpcMuxImplTest : public GrpcMuxImplTestBase { <nl> Event : : SimulatedTimeSystem time_system_ ; <nl> } ; <nl> <nl> + / / TODO ( fredlas ) # 8478 will delete this . <nl> + TEST_F ( GrpcMuxImplTest , JustForCoverageTodoDelete ) { <nl> + setup ( ) ; <nl> + NullGrpcMuxImpl fake ; <nl> + EXPECT_FALSE ( grpc_mux_ - > isDelta ( ) ) ; <nl> + EXPECT_FALSE ( fake . isDelta ( ) ) ; <nl> + } <nl> + <nl> / / Validate behavior when multiple type URL watches are maintained , watches are created / destroyed <nl> / / ( via RAII ) . <nl> TEST_F ( GrpcMuxImplTest , MultipleTypeUrlStreams ) { <nl> mmm a / test / common / config / new_grpc_mux_impl_test . cc <nl> ppp b / test / common / config / new_grpc_mux_impl_test . cc <nl> class NewGrpcMuxImplTest : public NewGrpcMuxImplTestBase { <nl> Event : : SimulatedTimeSystem time_system_ ; <nl> } ; <nl> <nl> + / / TODO ( fredlas ) # 8478 will delete this . <nl> + TEST_F ( NewGrpcMuxImplTest , JustForCoverageTodoDelete ) { <nl> + setup ( ) ; <nl> + EXPECT_TRUE ( grpc_mux_ - > isDelta ( ) ) ; <nl> + } <nl> + <nl> / / Test that we simply ignore a message for an unknown type_url , with no ill effects . <nl> TEST_F ( NewGrpcMuxImplTest , DiscoveryResponseNonexistentSub ) { <nl> setup ( ) ; <nl> mmm a / test / common / config / subscription_factory_impl_test . cc <nl> ppp b / test / common / config / subscription_factory_impl_test . cc <nl> class SubscriptionFactoryTest : public testing : : Test { <nl> return SubscriptionFactoryImpl ( local_info_ , dispatcher_ , cm_ , random_ , validation_visitor_ , <nl> * api_ ) <nl> . subscriptionFromConfigSource ( config , Config : : TypeUrl : : get ( ) . ClusterLoadAssignment , <nl> - stats_store_ , callbacks_ , false ) ; <nl> + stats_store_ , callbacks_ ) ; <nl> } <nl> <nl> Upstream : : MockClusterManager cm_ ; <nl> mmm a / test / common / router / rds_impl_test . cc <nl> ppp b / test / common / router / rds_impl_test . cc <nl> stat_prefix : foo <nl> EXPECT_CALL ( outer_init_manager_ , add ( _ ) ) ; <nl> rds_ = RouteConfigProviderUtil : : create ( parseHttpConnectionManagerFromYaml ( config_yaml ) , <nl> mock_factory_context_ , " foo . " , <nl> - * route_config_provider_manager_ , false ) ; <nl> + * route_config_provider_manager_ ) ; <nl> rds_callbacks_ = server_factory_context_ . cluster_manager_ . subscription_factory_ . callbacks_ ; <nl> EXPECT_CALL ( * server_factory_context_ . cluster_manager_ . subscription_factory_ . subscription_ , <nl> start ( _ ) ) ; <nl> stat_prefix : foo <nl> <nl> EXPECT_THROW ( RouteConfigProviderUtil : : create ( parseHttpConnectionManagerFromYaml ( config_yaml ) , <nl> mock_factory_context_ , " foo . " , <nl> - * route_config_provider_manager_ , false ) , <nl> + * route_config_provider_manager_ ) , <nl> EnvoyException ) ; <nl> } <nl> <nl> class RouteConfigProviderManagerImplTest : public RdsTestBase { <nl> rds_ . set_route_config_name ( " foo_route_config " ) ; <nl> rds_ . mutable_config_source ( ) - > set_path ( " foo_path " ) ; <nl> provider_ = route_config_provider_manager_ - > createRdsRouteConfigProvider ( <nl> - rds_ , mock_factory_context_ , " foo_prefix . " , outer_init_manager_ , false ) ; <nl> + rds_ , mock_factory_context_ , " foo_prefix . " , outer_init_manager_ ) ; <nl> rds_callbacks_ = server_factory_context_ . cluster_manager_ . subscription_factory_ . callbacks_ ; <nl> } <nl> <nl> name : foo_route_config <nl> route_configs , " 1 " ) ; <nl> <nl> RouteConfigProviderPtr provider2 = route_config_provider_manager_ - > createRdsRouteConfigProvider ( <nl> - rds_ , mock_factory_context_ , " foo_prefix " , outer_init_manager_ , false ) ; <nl> + rds_ , mock_factory_context_ , " foo_prefix " , outer_init_manager_ ) ; <nl> <nl> / / provider2 should have route config immediately after create <nl> EXPECT_TRUE ( provider2 - > configInfo ( ) . has_value ( ) ) ; <nl> name : foo_route_config <nl> rds2 . set_route_config_name ( " foo_route_config " ) ; <nl> rds2 . mutable_config_source ( ) - > set_path ( " bar_path " ) ; <nl> RouteConfigProviderPtr provider3 = route_config_provider_manager_ - > createRdsRouteConfigProvider ( <nl> - rds2 , mock_factory_context_ , " foo_prefix " , mock_factory_context_ . initManager ( ) , false ) ; <nl> + rds2 , mock_factory_context_ , " foo_prefix " , mock_factory_context_ . initManager ( ) ) ; <nl> EXPECT_NE ( provider3 , provider_ ) ; <nl> server_factory_context_ . cluster_manager_ . subscription_factory_ . callbacks_ - > onConfigUpdate ( <nl> route_configs , " provider3 " ) ; <nl> mmm a / test / common / router / scoped_rds_test . cc <nl> ppp b / test / common / router / scoped_rds_test . cc <nl> class ScopedRdsTest : public ScopedRoutesTestBase { <nl> <nl> / / srds subscription <nl> EXPECT_CALL ( factory_context_ . cluster_manager_ . subscription_factory_ , <nl> - subscriptionFromConfigSource ( _ , _ , _ , _ , _ ) ) <nl> + subscriptionFromConfigSource ( _ , _ , _ , _ ) ) <nl> . Times ( AnyNumber ( ) ) ; <nl> / / rds subscription <nl> EXPECT_CALL ( server_factory_context_ . cluster_manager_ . subscription_factory_ , <nl> class ScopedRdsTest : public ScopedRoutesTestBase { <nl> _ , <nl> Eq ( Grpc : : Common : : typeUrl ( <nl> envoy : : api : : v2 : : RouteConfiguration ( ) . GetDescriptor ( ) - > full_name ( ) ) ) , <nl> - _ , _ , _ ) ) <nl> + _ , _ ) ) <nl> . Times ( AnyNumber ( ) ) <nl> . WillRepeatedly ( Invoke ( [ this ] ( const envoy : : api : : v2 : : core : : ConfigSource & , absl : : string_view , <nl> Stats : : Scope & , <nl> - Envoy : : Config : : SubscriptionCallbacks & callbacks , bool ) { <nl> + Envoy : : Config : : SubscriptionCallbacks & callbacks ) { <nl> auto ret = std : : make_unique < NiceMock < Envoy : : Config : : MockSubscription > > ( ) ; <nl> rds_subscription_by_config_subscription_ [ ret . get ( ) ] = & callbacks ; <nl> EXPECT_CALL ( * ret , start ( _ ) ) <nl> mmm a / test / common / runtime / runtime_impl_test . cc <nl> ppp b / test / common / runtime / runtime_impl_test . cc <nl> class RtdsLoaderImplTest : public LoaderImplTest { <nl> EXPECT_CALL ( init_manager_ , add ( _ ) ) . WillRepeatedly ( Invoke ( [ this ] ( const Init : : Target & target ) { <nl> init_target_handles_ . emplace_back ( target . createHandle ( " test " ) ) ; <nl> } ) ) ; <nl> - ON_CALL ( cm_ . subscription_factory_ , subscriptionFromConfigSource ( _ , _ , _ , _ , _ ) ) <nl> + ON_CALL ( cm_ . subscription_factory_ , subscriptionFromConfigSource ( _ , _ , _ , _ ) ) <nl> . WillByDefault ( testing : : Invoke ( <nl> [ this ] ( const envoy : : api : : v2 : : core : : ConfigSource & , absl : : string_view , Stats : : Scope & , <nl> - Config : : SubscriptionCallbacks & callbacks , bool ) - > Config : : SubscriptionPtr { <nl> + Config : : SubscriptionCallbacks & callbacks ) - > Config : : SubscriptionPtr { <nl> auto ret = std : : make_unique < testing : : NiceMock < Config : : MockSubscription > > ( ) ; <nl> rtds_subscriptions_ . push_back ( ret . get ( ) ) ; <nl> rtds_callbacks_ . push_back ( & callbacks ) ; <nl> mmm a / test / common / upstream / cds_api_impl_test . cc <nl> ppp b / test / common / upstream / cds_api_impl_test . cc <nl> MATCHER_P ( WithName , expectedName , " " ) { return arg . name ( ) = = expectedName ; } <nl> <nl> class CdsApiImplTest : public testing : : Test { <nl> protected : <nl> - void setup ( bool is_delta = false ) { <nl> + void setup ( ) { <nl> envoy : : api : : v2 : : core : : ConfigSource cds_config ; <nl> - cds_ = CdsApiImpl : : create ( cds_config , is_delta , cm_ , store_ , validation_visitor_ ) ; <nl> + cds_ = CdsApiImpl : : create ( cds_config , cm_ , store_ , validation_visitor_ ) ; <nl> cds_ - > setInitializedCb ( [ this ] ( ) - > void { initialized_ . ready ( ) ; } ) ; <nl> <nl> EXPECT_CALL ( * cm_ . subscription_factory_ . subscription_ , start ( _ ) ) ; <nl> TEST_F ( CdsApiImplTest , ConfigUpdateWith2ValidClusters ) { <nl> TEST_F ( CdsApiImplTest , DeltaConfigUpdate ) { <nl> { <nl> InSequence s ; <nl> - setup ( true ) ; <nl> + setup ( ) ; <nl> } <nl> EXPECT_CALL ( initialized_ , ready ( ) ) ; <nl> <nl> mmm a / test / common / upstream / cluster_manager_impl_test . cc <nl> ppp b / test / common / upstream / cluster_manager_impl_test . cc <nl> class TestClusterManagerFactory : public ClusterManagerFactory { <nl> return std : : make_pair ( result . first , ThreadAwareLoadBalancerPtr ( result . second ) ) ; <nl> } <nl> <nl> - CdsApiPtr createCds ( const envoy : : api : : v2 : : core : : ConfigSource & , bool , ClusterManager & ) override { <nl> + CdsApiPtr createCds ( const envoy : : api : : v2 : : core : : ConfigSource & , ClusterManager & ) override { <nl> return CdsApiPtr { createCds_ ( ) } ; <nl> } <nl> <nl> mmm a / test / common / upstream / eds_test . cc <nl> ppp b / test / common / upstream / eds_test . cc <nl> class EdsTest : public testing : : Test { <nl> Envoy : : Server : : Configuration : : TransportSocketFactoryContextImpl factory_context ( <nl> admin_ , ssl_context_manager_ , * scope , cm_ , local_info_ , dispatcher_ , random_ , stats_ , <nl> singleton_manager_ , tls_ , validation_visitor_ , * api_ ) ; <nl> - cluster_ . reset ( new EdsClusterImpl ( eds_cluster_ , runtime_ , factory_context , std : : move ( scope ) , <nl> - false , false ) ) ; <nl> + cluster_ . reset ( <nl> + new EdsClusterImpl ( eds_cluster_ , runtime_ , factory_context , std : : move ( scope ) , false ) ) ; <nl> EXPECT_EQ ( Cluster : : InitializePhase : : Secondary , cluster_ - > initializePhase ( ) ) ; <nl> eds_callbacks_ = cm_ . subscription_factory_ . callbacks_ ; <nl> } <nl> mmm a / test / mocks / config / mocks . cc <nl> ppp b / test / mocks / config / mocks . cc <nl> namespace Envoy { <nl> namespace Config { <nl> <nl> MockSubscriptionFactory : : MockSubscriptionFactory ( ) { <nl> - ON_CALL ( * this , subscriptionFromConfigSource ( _ , _ , _ , _ , _ ) ) <nl> - . WillByDefault ( testing : : Invoke ( <nl> - [ this ] ( const envoy : : api : : v2 : : core : : ConfigSource & , absl : : string_view , Stats : : Scope & , <nl> - SubscriptionCallbacks & callbacks , bool ) - > SubscriptionPtr { <nl> - auto ret = std : : make_unique < testing : : NiceMock < MockSubscription > > ( ) ; <nl> - subscription_ = ret . get ( ) ; <nl> - callbacks_ = & callbacks ; <nl> - return ret ; <nl> - } ) ) ; <nl> + ON_CALL ( * this , subscriptionFromConfigSource ( _ , _ , _ , _ ) ) <nl> + . WillByDefault ( testing : : Invoke ( [ this ] ( const envoy : : api : : v2 : : core : : ConfigSource & , <nl> + absl : : string_view , Stats : : Scope & , <nl> + SubscriptionCallbacks & callbacks ) - > SubscriptionPtr { <nl> + auto ret = std : : make_unique < testing : : NiceMock < MockSubscription > > ( ) ; <nl> + subscription_ = ret . get ( ) ; <nl> + callbacks_ = & callbacks ; <nl> + return ret ; <nl> + } ) ) ; <nl> ON_CALL ( * this , messageValidationVisitor ( ) ) <nl> . WillByDefault ( testing : : ReturnRef ( ProtobufMessage : : getStrictValidationVisitor ( ) ) ) ; <nl> } <nl> mmm a / test / mocks / config / mocks . h <nl> ppp b / test / mocks / config / mocks . h <nl> class MockSubscriptionFactory : public SubscriptionFactory { <nl> MockSubscriptionFactory ( ) ; <nl> ~ MockSubscriptionFactory ( ) override ; <nl> <nl> - MOCK_METHOD5 ( subscriptionFromConfigSource , <nl> + MOCK_METHOD4 ( subscriptionFromConfigSource , <nl> SubscriptionPtr ( const envoy : : api : : v2 : : core : : ConfigSource & config , <nl> absl : : string_view type_url , Stats : : Scope & scope , <nl> - SubscriptionCallbacks & callbacks , bool is_delta ) ) ; <nl> + SubscriptionCallbacks & callbacks ) ) ; <nl> MOCK_METHOD0 ( messageValidationVisitor , ProtobufMessage : : ValidationVisitor & ( ) ) ; <nl> <nl> MockSubscription * subscription_ { } ; <nl> mmm a / test / mocks / router / mocks . h <nl> ppp b / test / mocks / router / mocks . h <nl> class MockRouteConfigProviderManager : public RouteConfigProviderManager { <nl> MockRouteConfigProviderManager ( ) ; <nl> ~ MockRouteConfigProviderManager ( ) override ; <nl> <nl> - MOCK_METHOD5 ( createRdsRouteConfigProvider , <nl> + MOCK_METHOD4 ( createRdsRouteConfigProvider , <nl> RouteConfigProviderPtr ( <nl> const envoy : : config : : filter : : network : : http_connection_manager : : v2 : : Rds & rds , <nl> Server : : Configuration : : FactoryContext & factory_context , <nl> - const std : : string & stat_prefix , Init : : Manager & init_manager , bool is_delta ) ) ; <nl> + const std : : string & stat_prefix , Init : : Manager & init_manager ) ) ; <nl> MOCK_METHOD2 ( createStaticRouteConfigProvider , <nl> RouteConfigProviderPtr ( const envoy : : api : : v2 : : RouteConfiguration & route_config , <nl> Server : : Configuration : : FactoryContext & factory_context ) ) ; <nl> mmm a / test / mocks / server / mocks . h <nl> ppp b / test / mocks / server / mocks . h <nl> class MockListenerComponentFactory : public ListenerComponentFactory { <nl> DrainManagerPtr createDrainManager ( envoy : : api : : v2 : : Listener : : DrainType drain_type ) override { <nl> return DrainManagerPtr { createDrainManager_ ( drain_type ) } ; <nl> } <nl> - LdsApiPtr createLdsApi ( const envoy : : api : : v2 : : core : : ConfigSource & lds_config , <nl> - bool is_delta ) override { <nl> - return LdsApiPtr { createLdsApi_ ( lds_config , is_delta ) } ; <nl> + LdsApiPtr createLdsApi ( const envoy : : api : : v2 : : core : : ConfigSource & lds_config ) override { <nl> + return LdsApiPtr { createLdsApi_ ( lds_config ) } ; <nl> } <nl> <nl> - MOCK_METHOD2 ( createLdsApi_ , <nl> - LdsApi * ( const envoy : : api : : v2 : : core : : ConfigSource & lds_config , bool is_delta ) ) ; <nl> + MOCK_METHOD1 ( createLdsApi_ , LdsApi * ( const envoy : : api : : v2 : : core : : ConfigSource & lds_config ) ) ; <nl> MOCK_METHOD2 ( createNetworkFilterFactoryList , <nl> std : : vector < Network : : FilterFactoryCb > ( <nl> const Protobuf : : RepeatedPtrField < envoy : : api : : v2 : : listener : : Filter > & filters , <nl> class MockListenerManager : public ListenerManager { <nl> <nl> MOCK_METHOD3 ( addOrUpdateListener , bool ( const envoy : : api : : v2 : : Listener & config , <nl> const std : : string & version_info , bool modifiable ) ) ; <nl> - MOCK_METHOD2 ( createLdsApi , <nl> - void ( const envoy : : api : : v2 : : core : : ConfigSource & lds_config , bool is_delta ) ) ; <nl> + MOCK_METHOD1 ( createLdsApi , void ( const envoy : : api : : v2 : : core : : ConfigSource & lds_config ) ) ; <nl> MOCK_METHOD0 ( listeners , std : : vector < std : : reference_wrapper < Network : : ListenerConfig > > ( ) ) ; <nl> MOCK_METHOD0 ( numConnections , uint64_t ( ) ) ; <nl> MOCK_METHOD1 ( removeListener , bool ( const std : : string & listener_name ) ) ; <nl> mmm a / test / mocks / upstream / mocks . h <nl> ppp b / test / mocks / upstream / mocks . h <nl> class MockClusterManagerFactory : public ClusterManagerFactory { <nl> const envoy : : api : : v2 : : Cluster & cluster , ClusterManager & cm , <nl> Outlier : : EventLoggerSharedPtr outlier_event_logger , bool added_via_api ) ) ; <nl> <nl> - MOCK_METHOD3 ( createCds , CdsApiPtr ( const envoy : : api : : v2 : : core : : ConfigSource & cds_config , <nl> - bool is_delta , ClusterManager & cm ) ) ; <nl> + MOCK_METHOD2 ( createCds , <nl> + CdsApiPtr ( const envoy : : api : : v2 : : core : : ConfigSource & cds_config , ClusterManager & cm ) ) ; <nl> <nl> private : <nl> NiceMock < Secret : : MockSecretManager > secret_manager_ ; <nl> class MockClusterManager : public ClusterManager { <nl> MOCK_METHOD1 ( addThreadLocalClusterUpdateCallbacks_ , <nl> ClusterUpdateCallbacksHandle * ( ClusterUpdateCallbacks & callbacks ) ) ; <nl> MOCK_CONST_METHOD0 ( warmingClusterCount , std : : size_t ( ) ) ; <nl> - MOCK_CONST_METHOD0 ( xdsIsDelta , bool ( ) ) ; <nl> MOCK_METHOD0 ( subscriptionFactory , Config : : SubscriptionFactory & ( ) ) ; <nl> <nl> NiceMock < Http : : ConnectionPool : : MockInstance > conn_pool_ ; <nl> mmm a / test / server / lds_api_test . cc <nl> ppp b / test / server / lds_api_test . cc <nl> class LdsApiTest : public testing : : Test { <nl> envoy : : api : : v2 : : core : : ConfigSource lds_config ; <nl> EXPECT_CALL ( init_manager_ , add ( _ ) ) ; <nl> lds_ = std : : make_unique < LdsApiImpl > ( lds_config , cluster_manager_ , init_manager_ , store_ , <nl> - listener_manager_ , validation_visitor_ , false ) ; <nl> + listener_manager_ , validation_visitor_ ) ; <nl> EXPECT_CALL ( * cluster_manager_ . subscription_factory_ . subscription_ , start ( _ ) ) ; <nl> init_target_handle_ - > initialize ( init_watcher_ ) ; <nl> lds_callbacks_ = cluster_manager_ . subscription_factory_ . callbacks_ ; <nl> mmm a / test / server / listener_manager_impl_test . cc <nl> ppp b / test / server / listener_manager_impl_test . cc <nl> TEST_F ( ListenerManagerImplTest , AddOrUpdateListener ) { <nl> InSequence s ; <nl> <nl> auto * lds_api = new MockLdsApi ( ) ; <nl> - EXPECT_CALL ( listener_factory_ , createLdsApi_ ( _ , _ ) ) . WillOnce ( Return ( lds_api ) ) ; <nl> + EXPECT_CALL ( listener_factory_ , createLdsApi_ ( _ ) ) . WillOnce ( Return ( lds_api ) ) ; <nl> envoy : : api : : v2 : : core : : ConfigSource lds_config ; <nl> - manager_ - > createLdsApi ( lds_config , false ) ; <nl> + manager_ - > createLdsApi ( lds_config ) ; <nl> <nl> EXPECT_CALL ( * lds_api , versionInfo ( ) ) . WillOnce ( Return ( " " ) ) ; <nl> checkConfigDump ( R " EOF ( <nl>
config : improve temporary delta xDS choosing mechanism ( )
envoyproxy/envoy
b261cd5c6b0485912cf7e22231a88183e4a0b724
2019-10-22T03:34:59Z
mmm a / js / apps / system / aardvark / frontend / js / modules / org / arangodb / general - graph . js <nl> ppp b / js / apps / system / aardvark / frontend / js / modules / org / arangodb / general - graph . js <nl> <nl> module . define ( " org / arangodb / general - graph " , function ( exports , module ) { <nl> / * jslint indent : 2 , nomen : true , maxlen : 120 , sloppy : true , vars : true , white : true , plusplus : true * / <nl> - / * global require , exports , Graph , arguments * / <nl> + / * global require , exports , Graph , ArangoClusterComm , arguments * / <nl> <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> / / / @ brief Graph functionality <nl> var Graph = function ( graphName , edgeDefinitions , vertexCollections , edgeCollecti <nl> if ( ! orphanCollections ) { <nl> orphanCollections = [ ] ; <nl> } <nl> + <nl> + / / we can call the " fast " version of some edge functions if we are <nl> + / / running server - side and are not a coordinator <nl> + var useBuiltIn = ( typeof ArangoClusterComm = = = " object " ) ; <nl> + if ( useBuiltIn & & require ( " org / arangodb / cluster " ) . isCoordinator ( ) ) { <nl> + useBuiltIn = false ; <nl> + } <nl> + <nl> var self = this ; <nl> / / Create Hidden Properties <nl> + createHiddenProperty ( this , " __useBuiltIn " , useBuiltIn ) ; <nl> createHiddenProperty ( this , " __name " , graphName ) ; <nl> createHiddenProperty ( this , " __vertexCollections " , vertexCollections ) ; <nl> createHiddenProperty ( this , " __edgeCollections " , edgeCollections ) ; <nl> var Graph = function ( graphName , edgeDefinitions , vertexCollections , edgeCollecti <nl> createHiddenProperty ( this , " __rev " , revision ) ; <nl> createHiddenProperty ( this , " __orphanCollections " , orphanCollections ) ; <nl> updateBindCollections ( self ) ; <nl> - <nl> } ; <nl> <nl> - <nl> - <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> / / / @ startDocuBlock JSF_general_graph_graph <nl> / / / @ brief Get a graph <nl> Graph . prototype . _EDGES = function ( vertexId ) { <nl> err . errorMessage = arangodb . errors . ERROR_GRAPH_NOT_FOUND . message + " : " + vertexId ; <nl> throw err ; <nl> } <nl> - var collection = vertexId . split ( " / " ) [ 0 ] ; <nl> - if ( ! db . _collection ( collection ) ) { <nl> - err = new ArangoError ( ) ; <nl> - err . errorNum = arangodb . errors . ERROR_GRAPH_VERTEX_COL_DOES_NOT_EXIST . code ; <nl> - err . errorMessage = arangodb . errors . ERROR_GRAPH_VERTEX_COL_DOES_NOT_EXIST . message + " : " + collection ; <nl> - throw err ; <nl> - } <nl> - <nl> - var edgeCollections = this . _edgeCollections ( ) ; <nl> - var result = [ ] ; <nl> <nl> - edgeCollections . forEach ( <nl> - function ( edgeCollection ) { <nl> - result = result . concat ( edgeCollection . edges ( vertexId ) ) ; <nl> + var result = [ ] , c ; <nl> + for ( c in this . __edgeCollections ) { <nl> + if ( this . __edgeCollections . hasOwnProperty ( c ) ) { <nl> + if ( this . __useBuiltIn ) { <nl> + result = result . concat ( this . __edgeCollections [ c ] . EDGES ( vertexId ) ) ; <nl> + } <nl> + else { <nl> + result = result . concat ( this . __edgeCollections [ c ] . edges ( vertexId ) ) ; <nl> + } <nl> } <nl> - ) ; <nl> + } <nl> return result ; <nl> } ; <nl> <nl> Graph . prototype . _INEDGES = function ( vertexId ) { <nl> err . errorMessage = arangodb . errors . ERROR_GRAPH_NOT_FOUND . message + " : " + vertexId ; <nl> throw err ; <nl> } <nl> - var collection = vertexId . split ( " / " ) [ 0 ] ; <nl> - if ( ! db . _collection ( collection ) ) { <nl> - err = new ArangoError ( ) ; <nl> - err . errorNum = arangodb . errors . ERROR_GRAPH_VERTEX_COL_DOES_NOT_EXIST . code ; <nl> - err . errorMessage = arangodb . errors . ERROR_GRAPH_VERTEX_COL_DOES_NOT_EXIST . message + " : " + collection ; <nl> - throw err ; <nl> - } <nl> - <nl> - var edgeCollections = this . _edgeCollections ( ) ; <nl> - var result = [ ] ; <nl> - <nl> <nl> - edgeCollections . forEach ( <nl> - function ( edgeCollection ) { <nl> - result = result . concat ( edgeCollection . inEdges ( vertexId ) ) ; <nl> + var result = [ ] , c ; <nl> + for ( c in this . __edgeCollections ) { <nl> + if ( this . __edgeCollections . hasOwnProperty ( c ) ) { <nl> + if ( this . __useBuiltIn ) { <nl> + result = result . concat ( this . __edgeCollections [ c ] . INEDGES ( vertexId ) ) ; <nl> + } <nl> + else { <nl> + result = result . concat ( this . __edgeCollections [ c ] . inEdges ( vertexId ) ) ; <nl> + } <nl> } <nl> - ) ; <nl> + } <nl> return result ; <nl> } ; <nl> <nl> Graph . prototype . _OUTEDGES = function ( vertexId ) { <nl> err . errorMessage = arangodb . errors . ERROR_GRAPH_NOT_FOUND . message + " : " + vertexId ; <nl> throw err ; <nl> } <nl> - var collection = vertexId . split ( " / " ) [ 0 ] ; <nl> - if ( ! db . _collection ( collection ) ) { <nl> - err = new ArangoError ( ) ; <nl> - err . errorNum = arangodb . errors . ERROR_GRAPH_VERTEX_COL_DOES_NOT_EXIST . code ; <nl> - err . errorMessage = arangodb . errors . ERROR_GRAPH_VERTEX_COL_DOES_NOT_EXIST . message + " : " + collection ; <nl> - throw err ; <nl> - } <nl> - <nl> - var edgeCollections = this . _edgeCollections ( ) ; <nl> - var result = [ ] ; <nl> - <nl> <nl> - edgeCollections . forEach ( <nl> - function ( edgeCollection ) { <nl> - result = result . concat ( edgeCollection . outEdges ( vertexId ) ) ; <nl> + var result = [ ] , c ; <nl> + for ( c in this . __edgeCollections ) { <nl> + if ( this . __edgeCollections . hasOwnProperty ( c ) ) { <nl> + if ( this . __useBuiltIn ) { <nl> + result = result . concat ( this . __edgeCollections [ c ] . OUTEDGES ( vertexId ) ) ; <nl> + } <nl> + else { <nl> + result = result . concat ( this . __edgeCollections [ c ] . outEdges ( vertexId ) ) ; <nl> + } <nl> } <nl> - ) ; <nl> + } <nl> return result ; <nl> } ; <nl> <nl> Graph . prototype . _extendEdgeDefinitions = function ( edgeDefinition ) { <nl> / / check if edgeCollection not already used <nl> var eC = edgeDefinition . collection ; <nl> / / . . . in same graph <nl> - if ( this . __edgeCollections [ eC ] ! = = undefined ) { <nl> + if ( this . __edgeCollections [ eC ] ! = = undefined ) { <nl> err = new ArangoError ( ) ; <nl> err . errorNum = arangodb . errors . ERROR_GRAPH_COLLECTION_MULTI_USE . code ; <nl> err . errorMessage = arangodb . errors . ERROR_GRAPH_COLLECTION_MULTI_USE . message ; <nl> mmm a / js / apps / system / aardvark / frontend / js / modules / org / arangodb / graph / traversal . js <nl> ppp b / js / apps / system / aardvark / frontend / js / modules / org / arangodb / graph / traversal . js <nl> <nl> module . define ( " org / arangodb / graph / traversal " , function ( exports , module ) { <nl> / * jslint indent : 2 , nomen : true , maxlen : 100 , sloppy : true , vars : true , white : true , plusplus : true , continue : true * / <nl> - / * global require , exports * / <nl> + / * global require , exports , ArangoClusterComm * / <nl> <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> / / / @ brief Traversal " classes " <nl> var ArangoError = arangodb . ArangoError ; <nl> var db = arangodb . db ; <nl> <nl> var ArangoTraverser ; <nl> - <nl> + <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl> / / - - SECTION - - helper functions <nl> / / mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - <nl> function collectionDatasourceFactory ( edgeCollection ) { <nl> c = db . _collection ( c ) ; <nl> } <nl> <nl> + / / we can call the " fast " version of some edge functions if we are <nl> + / / running server - side and are not a coordinator <nl> + var useBuiltIn = ( typeof ArangoClusterComm = = = " object " ) ; <nl> + if ( useBuiltIn & & require ( " org / arangodb / cluster " ) . isCoordinator ( ) ) { <nl> + useBuiltIn = false ; <nl> + } <nl> + <nl> return { <nl> edgeCollection : c , <nl> + useBuiltIn : useBuiltIn , <nl> <nl> getVertexId : function ( vertex ) { <nl> return vertex . _id ; <nl> function collectionDatasourceFactory ( edgeCollection ) { <nl> return edge . _id ; <nl> } , <nl> <nl> + getEdgeFrom : function ( edge ) { <nl> + return edge . _from ; <nl> + } , <nl> + <nl> + getEdgeTo : function ( edge ) { <nl> + return edge . _to ; <nl> + } , <nl> + <nl> getLabel : function ( edge ) { <nl> return edge . $ label ; <nl> } , <nl> <nl> getAllEdges : function ( vertex ) { <nl> + if ( this . useBuiltIn ) { <nl> + return this . edgeCollection . EDGES ( vertex . _id ) ; <nl> + } <nl> return this . edgeCollection . edges ( vertex . _id ) ; <nl> } , <nl> <nl> getInEdges : function ( vertex ) { <nl> + if ( this . useBuiltIn ) { <nl> + return this . edgeCollection . INEDGES ( vertex . _id ) ; <nl> + } <nl> return this . edgeCollection . inEdges ( vertex . _id ) ; <nl> } , <nl> <nl> getOutEdges : function ( vertex ) { <nl> + if ( this . useBuiltIn ) { <nl> + return this . edgeCollection . OUTEDGES ( vertex . _id ) ; <nl> + } <nl> return this . edgeCollection . outEdges ( vertex . _id ) ; <nl> } <nl> } ; <nl> } <nl> <nl> - <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> / / / @ brief general graph datasource <nl> / / / <nl> function generalGraphDatasourceFactory ( graph ) { <nl> getEdgeId : function ( edge ) { <nl> return edge . _id ; <nl> } , <nl> + <nl> + getEdgeFrom : function ( edge ) { <nl> + return edge . _from ; <nl> + } , <nl> + <nl> + getEdgeTo : function ( edge ) { <nl> + return edge . _to ; <nl> + } , <nl> <nl> getLabel : function ( edge ) { <nl> return edge . $ label ; <nl> function generalGraphDatasourceFactory ( graph ) { <nl> } ; <nl> } <nl> <nl> - <nl> - <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> / / / @ brief default Graph datasource <nl> / / / <nl> function graphDatasourceFactory ( name ) { <nl> getEdgeId : function ( edge ) { <nl> return edge . getId ( ) ; <nl> } , <nl> + <nl> + getEdgeFrom : function ( edge ) { <nl> + return edge . _properties . _from ; <nl> + } , <nl> + <nl> + getEdgeTo : function ( edge ) { <nl> + return edge . _properties . _to ; <nl> + } , <nl> <nl> getLabel : function ( edge ) { <nl> return edge . getLabel ( ) ; <nl> function outboundExpander ( config , vertex , path ) { <nl> <nl> outEdges . forEach ( function ( edge ) { <nl> try { <nl> - var v = datasource . getInVertex ( edge ) ; <nl> + var v ; <nl> + if ( config . buildVertices ) { <nl> + v = datasource . getInVertex ( edge ) ; <nl> + } <nl> + else { <nl> + / / optimization to save vertex lookups <nl> + v = { _id : datasource . getEdgeTo ( edge ) } ; <nl> + v . _key = v . _id . split ( " / " ) [ 1 ] ; <nl> + } <nl> <nl> if ( ! config . expandFilter | | config . expandFilter ( config , v , edge , path ) ) { <nl> connections . push ( { edge : edge , vertex : v } ) ; <nl> function outboundExpander ( config , vertex , path ) { <nl> function inboundExpander ( config , vertex , path ) { <nl> var datasource = config . datasource ; <nl> var connections = [ ] ; <nl> + <nl> var inEdges = datasource . getInEdges ( vertex ) ; <nl> <nl> if ( inEdges . length > 1 & & config . sort ) { <nl> function inboundExpander ( config , vertex , path ) { <nl> <nl> inEdges . forEach ( function ( edge ) { <nl> try { <nl> - var v = datasource . getOutVertex ( edge ) ; <nl> - <nl> + var v ; <nl> + if ( config . buildVertices ) { <nl> + v = datasource . getOutVertex ( edge ) ; <nl> + } <nl> + else { <nl> + / / optimization to save vertex lookups <nl> + v = { _id : datasource . getEdgeFrom ( edge ) } ; <nl> + v . _key = v . _id . split ( " / " ) [ 1 ] ; <nl> + } <nl> + <nl> if ( ! config . expandFilter | | config . expandFilter ( config , v , edge , path ) ) { <nl> connections . push ( { edge : edge , vertex : v } ) ; <nl> } <nl> function inboundExpander ( config , vertex , path ) { <nl> / / continue even in the face of non - existing documents <nl> } <nl> } ) ; <nl> - <nl> + <nl> return connections ; <nl> } <nl> <nl> function anyExpander ( config , vertex , path ) { <nl> <nl> edges . forEach ( function ( edge ) { <nl> try { <nl> - var v = datasource . getPeerVertex ( edge , vertex ) ; <nl> + var v ; <nl> + if ( config . buildVertices ) { <nl> + v = datasource . getPeerVertex ( edge , vertex ) ; <nl> + } <nl> + else { <nl> + / / optimization to save vertex lookups <nl> + v = { } ; <nl> + if ( datasource . getEdgeFrom ( edge ) = = = vertex . _id ) { <nl> + v . _id = datasource . getEdgeTo ( edge ) ; <nl> + v . _key = v . _id . split ( " / " ) [ 1 ] ; <nl> + } <nl> + else if ( datasource . getEdgeTo ( edge ) = = = vertex . _id ) { <nl> + v . _id = datasource . getEdgeFrom ( edge ) ; <nl> + v . _key = v . _id . split ( " / " ) [ 1 ] ; <nl> + } <nl> + } <nl> <nl> if ( ! config . expandFilter | | config . expandFilter ( config , v , edge , path ) ) { <nl> connections . push ( { edge : edge , vertex : v } ) ; <nl> function trackingVisitor ( config , result , vertex , path ) { <nl> } <nl> } <nl> <nl> + / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> + / / / @ brief a visitor that counts the number of nodes visited <nl> + / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> + <nl> + function countingVisitor ( config , result , vertex , path ) { <nl> + if ( ! result ) { <nl> + return ; <nl> + } <nl> + <nl> + if ( result . hasOwnProperty ( ' count ' ) ) { <nl> + + + result . count ; <nl> + } <nl> + else { <nl> + result . count = 1 ; <nl> + } <nl> + } <nl> + <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> / / / @ } <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> function visitAllFilter ( ) { <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> <nl> function maxDepthFilter ( config , vertex , path ) { <nl> - if ( path . vertices . length > config . maxDepth ) { <nl> + if ( path & & path . vertices & & path . vertices . length > config . maxDepth ) { <nl> return ArangoTraverser . PRUNE ; <nl> } <nl> } <nl> function maxDepthFilter ( config , vertex , path ) { <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> <nl> function minDepthFilter ( config , vertex , path ) { <nl> - if ( path . vertices . length < = config . minDepth ) { <nl> + if ( path & & path . vertices & & path . vertices . length < = config . minDepth ) { <nl> return ArangoTraverser . EXCLUDE ; <nl> } <nl> } <nl> function breadthFirstSearch ( ) { <nl> } <nl> <nl> var filterResult = parseFilterResult ( config . filter ( config , vertex , path ) ) ; <nl> + <nl> if ( config . order = = = ArangoTraverser . PRE_ORDER & & filterResult . visit ) { <nl> / / preorder <nl> config . visitor ( config , result , vertex , path ) ; <nl> function depthFirstSearch ( ) { <nl> var path = { edges : [ ] , vertices : [ ] } ; <nl> var visited = { edges : { } , vertices : { } } ; <nl> var reverse = checkReverse ( config ) ; <nl> + var uniqueness = config . uniqueness ; <nl> + var haveUniqueness = ( ( uniqueness . vertices ! = = ArangoTraverser . UNIQUE_NONE ) | | <nl> + ( uniqueness . edges ! = = ArangoTraverser . UNIQUE_NONE ) ) ; <nl> <nl> while ( toVisit . length > 0 ) { <nl> if ( visitCounter + + > maxIterations ) { <nl> function depthFirstSearch ( ) { <nl> if ( current . visit = = = null | | current . visit = = = undefined ) { <nl> current . visit = false ; <nl> <nl> - / / first apply uniqueness check <nl> - if ( config . uniqueness . vertices = = = ArangoTraverser . UNIQUE_PATH ) { <nl> - visited . vertices = this . getPathItems ( config . datasource . getVertexId , path . vertices ) ; <nl> - } <nl> + if ( haveUniqueness ) { <nl> + / / first apply uniqueness check <nl> + if ( uniqueness . vertices = = = ArangoTraverser . UNIQUE_PATH ) { <nl> + visited . vertices = this . getPathItems ( config . datasource . getVertexId , path . vertices ) ; <nl> + } <nl> <nl> - if ( config . uniqueness . edges = = = ArangoTraverser . UNIQUE_PATH ) { <nl> - visited . edges = this . getPathItems ( config . datasource . getEdgeId , path . edges ) ; <nl> - } <nl> + if ( uniqueness . edges = = = ArangoTraverser . UNIQUE_PATH ) { <nl> + visited . edges = this . getPathItems ( config . datasource . getEdgeId , path . edges ) ; <nl> + } <nl> <nl> - if ( ! checkUniqueness ( config , visited , vertex , edge ) ) { <nl> - / / skip element if not unique <nl> - toVisit . pop ( ) ; <nl> - continue ; <nl> + if ( ! checkUniqueness ( config , visited , vertex , edge ) ) { <nl> + / / skip element if not unique <nl> + toVisit . pop ( ) ; <nl> + continue ; <nl> + } <nl> } <nl> <nl> / / push the current element onto the path stack <nl> function dijkstraSearch ( ) { <nl> var weight = 1 ; <nl> if ( config . distance ) { <nl> weight = config . distance ( config , currentNode . vertex , neighbor . vertex , edge ) ; <nl> - } else if ( config . weight ) { <nl> + } <nl> + else if ( config . weight ) { <nl> if ( typeof edge [ config . weight ] = = = " number " ) { <nl> weight = edge [ config . weight ] ; <nl> - } else if ( config . defaultWeight ) { <nl> + } <nl> + else if ( config . defaultWeight ) { <nl> weight = config . defaultWeight ; <nl> - } else { <nl> + } <nl> + else { <nl> weight = Infinity ; <nl> } <nl> } <nl> ArangoTraverser = function ( config ) { <nl> edges : ArangoTraverser . UNIQUE_PATH <nl> } , <nl> visitor : trackingVisitor , <nl> - filter : visitAllFilter , <nl> + filter : null , <nl> expander : outboundExpander , <nl> datasource : null , <nl> maxIterations : 10000 , <nl> minDepth : 0 , <nl> - maxDepth : 256 <nl> + maxDepth : 256 , <nl> + buildVertices : true <nl> } , d ; <nl> <nl> var err ; <nl> ArangoTraverser = function ( config ) { <nl> <nl> / / prepare an array of filters <nl> var filters = [ ] ; <nl> - if ( config . minDepth ! = = undefined & & config . minDepth > = 0 ) { <nl> + if ( config . minDepth ! = = undefined & & <nl> + config . minDepth ! = = null & & <nl> + config . minDepth > 0 ) { <nl> filters . push ( minDepthFilter ) ; <nl> } <nl> - if ( config . maxDepth ! = = undefined & & config . maxDepth > 0 ) { <nl> + if ( config . maxDepth ! = = undefined & & <nl> + config . maxDepth ! = = null & & <nl> + config . maxDepth > 0 ) { <nl> filters . push ( maxDepthFilter ) ; <nl> } <nl> <nl> if ( ! Array . isArray ( config . filter ) ) { <nl> - config . filter = [ config . filter ] ; <nl> + if ( typeof config . filter = = = " function " ) { <nl> + config . filter = [ config . filter ] ; <nl> + } <nl> + else { <nl> + config . filter = [ ] ; <nl> + } <nl> } <nl> <nl> config . filter . forEach ( function ( f ) { <nl> ArangoTraverser = function ( config ) { <nl> <nl> filters . push ( f ) ; <nl> } ) ; <nl> - <nl> - if ( filters . length = = = 0 ) { <nl> - filters . push ( visitAllFilter ) ; <nl> + <nl> + if ( filters . length > 1 ) { <nl> + / / more than one filter . combine their results <nl> + config . filter = function ( config , vertex , path ) { <nl> + return combineFilters ( filters , config , vertex , path ) ; <nl> + } ; <nl> + } <nl> + else if ( filters . length = = = 1 ) { <nl> + / / exactly one filter <nl> + config . filter = filters [ 0 ] ; <nl> + } <nl> + else { <nl> + config . filter = visitAllFilter ; <nl> } <nl> - <nl> - config . filter = function ( config , vertex , path ) { <nl> - return combineFilters ( filters , config , vertex , path ) ; <nl> - } ; <nl> <nl> if ( typeof config . expander ! = = " function " ) { <nl> config . expander = validate ( config . expander , { <nl> exports . expandInEdgesWithLabels = expandInEdgesWithLabels ; <nl> exports . expandEdgesWithLabels = expandEdgesWithLabels ; <nl> <nl> exports . trackingVisitor = trackingVisitor ; <nl> + exports . countingVisitor = countingVisitor ; <nl> <nl> exports . visitAllFilter = visitAllFilter ; <nl> exports . maxDepthFilter = maxDepthFilter ; <nl>
added derived files
arangodb/arangodb
b55889936777c87f8f1b16160db4da939e77637e
2014-08-27T16:57:26Z
mmm a / include / grpc + + / impl / codegen / rpc_service_method . h <nl> ppp b / include / grpc + + / impl / codegen / rpc_service_method . h <nl> <nl> # include < memory > <nl> # include < vector > <nl> <nl> + # include < grpc / impl / codegen / byte_buffer . h > <nl> # include < grpc + + / impl / codegen / config . h > <nl> # include < grpc + + / impl / codegen / rpc_method . h > <nl> # include < grpc + + / impl / codegen / status . h > <nl> mmm a / include / grpc + + / impl / codegen / server_interface . h <nl> ppp b / include / grpc + + / impl / codegen / server_interface . h <nl> <nl> # ifndef GRPCXX_IMPL_CODEGEN_SERVER_INTERFACE_H <nl> # define GRPCXX_IMPL_CODEGEN_SERVER_INTERFACE_H <nl> <nl> + # include < grpc / impl / codegen / grpc_types . h > <nl> # include < grpc + + / impl / codegen / call_hook . h > <nl> # include < grpc + + / impl / codegen / completion_queue_tag . h > <nl> # include < grpc + + / impl / codegen / rpc_service_method . h > <nl>
Added missing codegen includes
grpc/grpc
ab5da5ef7a6940ebf81e6fb43508af4c202cda91
2016-02-10T04:31:37Z
mmm a / Makefile <nl> ppp b / Makefile <nl> HAS_SYSTEM_ZLIB = false <nl> HAS_SYSTEM_PROTOBUF = false <nl> endif <nl> <nl> - HAS_PROTOC = $ ( shell $ ( PROTOC_CMD ) & & echo true | | echo false ) <nl> + HAS_PROTOC = $ ( shell $ ( PROTOC_CMD ) > / dev / null & & echo true | | echo false ) <nl> ifeq ( $ ( HAS_PROTOC ) , true ) <nl> HAS_VALID_PROTOC = $ ( shell $ ( PROTOC_CHECK_CMD ) 2 > / dev / null & & echo true | | echo false ) <nl> else <nl> install - certs : etc / roots . pem <nl> $ ( Q ) $ ( INSTALL ) etc / roots . pem $ ( prefix ) / share / grpc / roots . pem <nl> <nl> verify - install : <nl> - ifeq ( $ ( SYSTEM_OK ) , true ) <nl> + ifeq ( $ ( INSTALL_OK ) , true ) <nl> @ echo " Your system looks ready to go . " <nl> @ echo <nl> else <nl> mmm a / src / node / examples / pubsub / pubsub_demo . js <nl> ppp b / src / node / examples / pubsub / pubsub_demo . js <nl> <nl> - / / Copyright 2015 , Google Inc . <nl> - / / All rights reserved . <nl> - / / <nl> - / / Redistribution and use in source and binary forms , with or without <nl> - / / modification , are permitted provided that the following conditions are <nl> - / / met : <nl> - / / <nl> - / / * Redistributions of source code must retain the above copyright <nl> - / / notice , this list of conditions and the following disclaimer . <nl> - / / * Redistributions in binary form must reproduce the above <nl> - / / copyright notice , this list of conditions and the following disclaimer <nl> - / / in the documentation and / or other materials provided with the <nl> - / / distribution . <nl> - / / * Neither the name of Google Inc . nor the names of its <nl> - / / contributors may be used to endorse or promote products derived from <nl> - / / this software without specific prior written permission . <nl> - / / <nl> - / / THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS <nl> - / / " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT <nl> - / / LIMITED TO , THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR <nl> - / / A PARTICULAR PURPOSE ARE DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT <nl> - / / OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , <nl> - / / SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT <nl> - / / LIMITED TO , PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES ; LOSS OF USE , <nl> - / / DATA , OR PROFITS ; OR BUSINESS INTERRUPTION ) HOWEVER CAUSED AND ON ANY <nl> - / / THEORY OF LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT <nl> - / / ( INCLUDING NEGLIGENCE OR OTHERWISE ) ARISING IN ANY WAY OUT OF THE USE <nl> - / / OF THIS SOFTWARE , EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE . <nl> + / * <nl> + * <nl> + * Copyright 2015 , Google Inc . <nl> + * All rights reserved . <nl> + * <nl> + * Redistribution and use in source and binary forms , with or without <nl> + * modification , are permitted provided that the following conditions are <nl> + * met : <nl> + * <nl> + * * Redistributions of source code must retain the above copyright <nl> + * notice , this list of conditions and the following disclaimer . <nl> + * * Redistributions in binary form must reproduce the above <nl> + * copyright notice , this list of conditions and the following disclaimer <nl> + * in the documentation and / or other materials provided with the <nl> + * distribution . <nl> + * * Neither the name of Google Inc . nor the names of its <nl> + * contributors may be used to endorse or promote products derived from <nl> + * this software without specific prior written permission . <nl> + * <nl> + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS <nl> + * " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT <nl> + * LIMITED TO , THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR <nl> + * A PARTICULAR PURPOSE ARE DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT <nl> + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , <nl> + * SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT <nl> + * LIMITED TO , PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES ; LOSS OF USE , <nl> + * DATA , OR PROFITS ; OR BUSINESS INTERRUPTION ) HOWEVER CAUSED AND ON ANY <nl> + * THEORY OF LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT <nl> + * ( INCLUDING NEGLIGENCE OR OTHERWISE ) ARISING IN ANY WAY OUT OF THE USE <nl> + * OF THIS SOFTWARE , EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE . <nl> + * <nl> + * / <nl> + <nl> + ' use strict ' ; <nl> <nl> var async = require ( ' async ' ) ; <nl> var fs = require ( ' fs ' ) ; <nl> function main ( callback ) { <nl> <nl> if ( require . main = = = module ) { <nl> main ( function ( err ) { <nl> - if ( err ) throw err ; <nl> + if ( err ) { <nl> + throw err ; <nl> + } <nl> } ) ; <nl> } <nl> <nl> mmm a / src / node / examples / route_guide_client . js <nl> ppp b / src / node / examples / route_guide_client . js <nl> <nl> - / / Copyright 2015 , Google Inc . <nl> - / / All rights reserved . <nl> - / / <nl> - / / Redistribution and use in source and binary forms , with or without <nl> - / / modification , are permitted provided that the following conditions are <nl> - / / met : <nl> - / / <nl> - / / * Redistributions of source code must retain the above copyright <nl> - / / notice , this list of conditions and the following disclaimer . <nl> - / / * Redistributions in binary form must reproduce the above <nl> - / / copyright notice , this list of conditions and the following disclaimer <nl> - / / in the documentation and / or other materials provided with the <nl> - / / distribution . <nl> - / / * Neither the name of Google Inc . nor the names of its <nl> - / / contributors may be used to endorse or promote products derived from <nl> - / / this software without specific prior written permission . <nl> - / / <nl> - / / THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS <nl> - / / " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT <nl> - / / LIMITED TO , THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR <nl> - / / A PARTICULAR PURPOSE ARE DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT <nl> - / / OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , <nl> - / / SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT <nl> - / / LIMITED TO , PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES ; LOSS OF USE , <nl> - / / DATA , OR PROFITS ; OR BUSINESS INTERRUPTION ) HOWEVER CAUSED AND ON ANY <nl> - / / THEORY OF LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT <nl> - / / ( INCLUDING NEGLIGENCE OR OTHERWISE ) ARISING IN ANY WAY OUT OF THE USE <nl> - / / OF THIS SOFTWARE , EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE . <nl> + / * <nl> + * <nl> + * Copyright 2015 , Google Inc . <nl> + * All rights reserved . <nl> + * <nl> + * Redistribution and use in source and binary forms , with or without <nl> + * modification , are permitted provided that the following conditions are <nl> + * met : <nl> + * <nl> + * * Redistributions of source code must retain the above copyright <nl> + * notice , this list of conditions and the following disclaimer . <nl> + * * Redistributions in binary form must reproduce the above <nl> + * copyright notice , this list of conditions and the following disclaimer <nl> + * in the documentation and / or other materials provided with the <nl> + * distribution . <nl> + * * Neither the name of Google Inc . nor the names of its <nl> + * contributors may be used to endorse or promote products derived from <nl> + * this software without specific prior written permission . <nl> + * <nl> + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS <nl> + * " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT <nl> + * LIMITED TO , THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR <nl> + * A PARTICULAR PURPOSE ARE DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT <nl> + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , <nl> + * SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT <nl> + * LIMITED TO , PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES ; LOSS OF USE , <nl> + * DATA , OR PROFITS ; OR BUSINESS INTERRUPTION ) HOWEVER CAUSED AND ON ANY <nl> + * THEORY OF LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT <nl> + * ( INCLUDING NEGLIGENCE OR OTHERWISE ) ARISING IN ANY WAY OUT OF THE USE <nl> + * OF THIS SOFTWARE , EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE . <nl> + * <nl> + * / <nl> + <nl> + ' use strict ' ; <nl> <nl> var async = require ( ' async ' ) ; <nl> var fs = require ( ' fs ' ) ; <nl> function runRecordRoute ( callback ) { <nl> string : ' db_path ' <nl> } ) ; <nl> fs . readFile ( path . resolve ( argv . db_path ) , function ( err , data ) { <nl> - if ( err ) callback ( err ) ; <nl> + if ( err ) { <nl> + callback ( err ) ; <nl> + } <nl> var feature_list = JSON . parse ( data ) ; <nl> <nl> var num_points = 10 ; <nl> mmm a / src / node / examples / route_guide_server . js <nl> ppp b / src / node / examples / route_guide_server . js <nl> <nl> - / / Copyright 2015 , Google Inc . <nl> - / / All rights reserved . <nl> - / / <nl> - / / Redistribution and use in source and binary forms , with or without <nl> - / / modification , are permitted provided that the following conditions are <nl> - / / met : <nl> - / / <nl> - / / * Redistributions of source code must retain the above copyright <nl> - / / notice , this list of conditions and the following disclaimer . <nl> - / / * Redistributions in binary form must reproduce the above <nl> - / / copyright notice , this list of conditions and the following disclaimer <nl> - / / in the documentation and / or other materials provided with the <nl> - / / distribution . <nl> - / / * Neither the name of Google Inc . nor the names of its <nl> - / / contributors may be used to endorse or promote products derived from <nl> - / / this software without specific prior written permission . <nl> - / / <nl> - / / THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS <nl> - / / " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT <nl> - / / LIMITED TO , THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR <nl> - / / A PARTICULAR PURPOSE ARE DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT <nl> - / / OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , <nl> - / / SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT <nl> - / / LIMITED TO , PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES ; LOSS OF USE , <nl> - / / DATA , OR PROFITS ; OR BUSINESS INTERRUPTION ) HOWEVER CAUSED AND ON ANY <nl> - / / THEORY OF LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT <nl> - / / ( INCLUDING NEGLIGENCE OR OTHERWISE ) ARISING IN ANY WAY OUT OF THE USE <nl> - / / OF THIS SOFTWARE , EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE . <nl> + / * <nl> + * <nl> + * Copyright 2015 , Google Inc . <nl> + * All rights reserved . <nl> + * <nl> + * Redistribution and use in source and binary forms , with or without <nl> + * modification , are permitted provided that the following conditions are <nl> + * met : <nl> + * <nl> + * * Redistributions of source code must retain the above copyright <nl> + * notice , this list of conditions and the following disclaimer . <nl> + * * Redistributions in binary form must reproduce the above <nl> + * copyright notice , this list of conditions and the following disclaimer <nl> + * in the documentation and / or other materials provided with the <nl> + * distribution . <nl> + * * Neither the name of Google Inc . nor the names of its <nl> + * contributors may be used to endorse or promote products derived from <nl> + * this software without specific prior written permission . <nl> + * <nl> + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS <nl> + * " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT <nl> + * LIMITED TO , THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR <nl> + * A PARTICULAR PURPOSE ARE DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT <nl> + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , <nl> + * SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT <nl> + * LIMITED TO , PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES ; LOSS OF USE , <nl> + * DATA , OR PROFITS ; OR BUSINESS INTERRUPTION ) HOWEVER CAUSED AND ON ANY <nl> + * THEORY OF LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT <nl> + * ( INCLUDING NEGLIGENCE OR OTHERWISE ) ARISING IN ANY WAY OUT OF THE USE <nl> + * OF THIS SOFTWARE , EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE . <nl> + * <nl> + * / <nl> + <nl> + ' use strict ' ; <nl> <nl> var fs = require ( ' fs ' ) ; <nl> var parseArgs = require ( ' minimist ' ) ; <nl> function recordRoute ( call , callback ) { <nl> } <nl> / * For each point after the first , add the incremental distance from the <nl> * previous point to the total distance value * / <nl> - if ( previous ! = null ) { <nl> + if ( previous ! = = null ) { <nl> distance + = getDistance ( previous , point ) ; <nl> } <nl> previous = point ; <nl> function recordRoute ( call , callback ) { <nl> point_count : point_count , <nl> feature_count : feature_count , <nl> / / Cast the distance to an integer <nl> - distance : distance | 0 , <nl> + distance : Math . floor ( distance ) , <nl> / / End the timer <nl> elapsed_time : process . hrtime ( start_time ) [ 0 ] <nl> } ) ; <nl> if ( require . main = = = module ) { <nl> string : ' db_path ' <nl> } ) ; <nl> fs . readFile ( path . resolve ( argv . db_path ) , function ( err , data ) { <nl> - if ( err ) throw err ; <nl> + if ( err ) { <nl> + throw err ; <nl> + } <nl> feature_list = JSON . parse ( data ) ; <nl> routeServer . listen ( ) ; <nl> } ) ; <nl> mmm a / templates / Makefile . template <nl> ppp b / templates / Makefile . template <nl> HAS_SYSTEM_ZLIB = false <nl> HAS_SYSTEM_PROTOBUF = false <nl> endif <nl> <nl> - HAS_PROTOC = $ ( shell $ ( PROTOC_CMD ) & & echo true | | echo false ) <nl> + HAS_PROTOC = $ ( shell $ ( PROTOC_CMD ) > / dev / null & & echo true | | echo false ) <nl> ifeq ( $ ( HAS_PROTOC ) , true ) <nl> HAS_VALID_PROTOC = $ ( shell $ ( PROTOC_CHECK_CMD ) 2 > / dev / null & & echo true | | echo false ) <nl> else <nl> install - certs : etc / roots . pem <nl> $ ( Q ) $ ( INSTALL ) etc / roots . pem $ ( prefix ) / share / grpc / roots . pem <nl> <nl> verify - install : <nl> - ifeq ( $ ( SYSTEM_OK ) , true ) <nl> + ifeq ( $ ( INSTALL_OK ) , true ) <nl> @ echo " Your system looks ready to go . " <nl> @ echo <nl> else <nl>
Merge github . com : grpc / grpc into credit
grpc/grpc
9f80dc31fb3f80713d93df8243a58073cd73d1e9
2015-02-24T21:22:10Z
mmm a / contrib / clojure - package / src / dev / generator . clj <nl> ppp b / contrib / clojure - package / src / dev / generator . clj <nl> <nl> <nl> <nl> ( defn clojure - case <nl> + " Transforms a scala string ( function name ) to clojure case " <nl> [ string ] <nl> ( - > string <nl> ( clojure . string / replace # " ( \ s + ) ( [ A - Z ] [ a - z ] + ) " " $ 1 - $ 2 " ) <nl> <nl> count <nl> pos ? ) ) <nl> <nl> - <nl> ( defn increment - param - name [ pname ] <nl> ( if - let [ num - str ( re - find # " - \ d " pname ) ] <nl> - ( str <nl> + ( str <nl> ( first ( clojure . string / split pname # " - " ) ) <nl> " - " <nl> ( inc ( Integer / parseInt ( last ( clojure . string / split num - str # " - " ) ) ) ) ) <nl> <nl> ( . write w fstr ) ) <nl> ( . write w " \ n " ) ) ) ) <nl> <nl> + ( defn remove - prefix <nl> + [ prefix s ] <nl> + ( let [ regex ( re - pattern ( str prefix " ( . * ) " ) ) <nl> + replacement " $ 1 " ] <nl> + ( clojure . string / replace s regex replacement ) ) ) <nl> + <nl> + ( defn in - namespace - random ? [ op - name ] <nl> + ( or ( clojure . string / includes ? op - name " random_ " ) <nl> + ( clojure . string / includes ? op - name " sample_ " ) ) ) <nl> + <nl> + ( defn op - name - > namespace - type [ op - name ] <nl> + ( cond <nl> + ( # { " uniform " " normal " } op - name ) : deprecated <nl> + ( clojure . string / includes ? op - name " random_ " ) : random <nl> + ( clojure . string / includes ? op - name " sample_ " ) : random <nl> + : else : core ) ) <nl> + <nl> ; ; ; ; ; ; ; Common operations <nl> <nl> ( def libinfo ( Base / _LIB ) ) <nl> + <nl> ( def op - names <nl> ( let [ l ( $ ListBuffer / empty ) ] <nl> - ( do ( . mxListAllOpNames libinfo l ) <nl> - ( remove # ( or ( = " Custom " % ) <nl> - ( re - matches # " ^ _ . * " % ) ) <nl> - ( util / buffer - > vec l ) ) ) ) ) <nl> + ( . mxListAllOpNames libinfo l ) <nl> + ( - > > l <nl> + ( util / buffer - > vec ) <nl> + ( remove # ( or ( = " Custom " % ) ( re - matches # " ^ _ . * " % ) ) ) ) ) ) <nl> <nl> ( defn - parse - arg - type [ s ] <nl> ( let [ [ _ var - arg - type _ set - arg - type arg - spec _ type - req _ default - val ] ( re - find # " ( ( [ \ w - \ [ \ ] \ s ] + ) | \ { ( [ ^ } ] + ) \ } ) \ s * ( \ ( [ ^ ) ] + \ ) ) ? ( , \ s * ( optional | required ) ( , \ s * default = ( . * ) ) ? ) ? " s ) ] <nl> <nl> ` ( ~ ' defn ~ function - name <nl> ~ @ ( remove nil ? ( gen - symbol - function - arity op - name op - values function - name ) ) ) ) ) ) <nl> <nl> - <nl> - <nl> ( def symbol - gen - ns " ( ns org . apache . clojure - mxnet . symbol <nl> ( : refer - clojure : exclude [ * - + > > = < < = / cast concat identity flatten load max <nl> min repeat reverse set sort take to - array empty sin <nl> <nl> <nl> ( defn generate - symbol - file [ ] <nl> ( println " Generating symbol file " ) <nl> - ( write - to - file all - symbol - functions symbol - gen - ns " src / org / apache / clojure_mxnet / gen / symbol . clj " ) ) <nl> + ( write - to - file all - symbol - functions <nl> + symbol - gen - ns <nl> + " src / org / apache / clojure_mxnet / gen / symbol . clj " ) ) <nl> <nl> ; ; ; ; ; ; ; NDArray <nl> <nl> <nl> count <nl> pos ? ) ) <nl> <nl> - <nl> ( def ndarray - public - to - hand - gen <nl> ( filter is - ndarray - hand - gen ? ndarray - public - no - default ) ) <nl> ( def ndarray - public - to - gen <nl> ( get - public - to - gen - methods ndarray - public - to - hand - gen <nl> ndarray - public - no - default ) ) <nl> <nl> - <nl> ( count ndarray - public - to - hand - gen ) ; = > 15 <nl> ( count ndarray - public - to - gen ) ; = > 486 <nl> <nl> ( - > > ndarray - public - to - hand - gen ( map : name ) ( into # { } ) ) <nl> <nl> - <nl> - <nl> ( defn gen - ndarray - function - arity [ op - name op - values ] <nl> ( for [ [ param - count info ] op - values ] <nl> ( let [ targets ( - > > ( mapv : parameter - types info ) <nl> <nl> ( def all - ndarray - functions <nl> ( gen - ndarray - functions ndarray - public - to - gen ) ) <nl> <nl> - ( def ndarray - gen - ns " ( ns org . apache . clojure - mxnet . ndarray <nl> + ( def ndarray - gen - ns <nl> + " ( ns org . apache . clojure - mxnet . ndarray <nl> ( : refer - clojure : exclude [ * - + > > = < < = / cast concat flatten identity load max <nl> min repeat reverse set sort take to - array empty shuffle <nl> ref ] ) <nl> <nl> <nl> ; ; ; ; ; ; ; SymbolAPI <nl> <nl> + ( defn fn - name - > random - fn - name <nl> + [ fn - name ] <nl> + ( cond <nl> + ( clojure . string / starts - with ? fn - name " - random - " ) <nl> + ( remove - prefix " - random - " fn - name ) <nl> + <nl> + ( clojure . string / starts - with ? fn - name " - sample - " ) <nl> + ( str ( remove - prefix " - sample - " fn - name ) " - like " ) <nl> + <nl> + : else fn - name ) ) <nl> + <nl> ( defn symbol - api - coerce - param <nl> [ { : keys [ name sym type optional ? ] } ] <nl> ( let [ coerced - param ( case type <nl> <nl> ( ~ ( symbol ( str " SymbolAPI / " op - name ) ) <nl> ~ @ coerced - params ) ) ) ) ) <nl> <nl> - ( defn gen - symbol - api - function [ op - name ] <nl> - ( let [ { : keys [ fn - name fn - description args ] } ( gen - op - info op - name ) <nl> - params ( mapv ( fn [ { : keys [ name type optional ? ] : as opts } ] <nl> - ( assoc opts <nl> - : sym ( symbol name ) <nl> - : optional ? ( or optional ? <nl> - ( = " NDArray - or - Symbol " type ) ) ) ) <nl> - ( conj args <nl> - { : name " name " <nl> - : type " String " <nl> - : optional ? true <nl> - : description " Name of the symbol " } <nl> - { : name " attr " <nl> - : type " Map [ String , String ] " <nl> - : optional ? true <nl> - : description " Attributes of the symbol " } ) ) <nl> - doc ( clojure . string / join <nl> - " \ n \ n " <nl> - ( - > ( gen - symbol - api - doc fn - description params ) <nl> - ( clojure . string / split # " \ n " ) ) ) <nl> - default - call ( gen - symbol - api - default - arity op - name params ) ] <nl> - ` ( ~ ' defn ~ ( symbol fn - name ) <nl> - ~ doc <nl> - ~ @ default - call ) ) ) <nl> - <nl> - ( def all - symbol - api - functions <nl> - ( mapv gen - symbol - api - function op - names ) ) <nl> - <nl> - ( def symbol - api - gen - ns " ( ns <nl> - ^ { : doc \ " Experimental \ " } <nl> - org . apache . clojure - mxnet . symbol - api <nl> - ( : refer - clojure : exclude [ * - + > > = < < = / cast concat identity flatten load max <nl> - min repeat reverse set sort take to - array empty sin <nl> - get apply shuffle ref ] ) <nl> - ( : require [ org . apache . clojure - mxnet . util : as util ] <nl> - [ org . apache . clojure - mxnet . shape : as mx - shape ] ) <nl> - ( : import ( org . apache . mxnet SymbolAPI ) ) ) " ) <nl> + ( defn symbol - api - gen - ns <nl> + [ random - namespace ? ] <nl> + ( str <nl> + " ( ns \ n " <nl> + " ^ { : doc \ " Experimental \ " } \ n " <nl> + ( if random - namespace ? <nl> + " org . apache . clojure - mxnet . symbol - random - api \ n " <nl> + " org . apache . clojure - mxnet . symbol - api \ n " ) <nl> + " ( : refer - clojure : exclude [ * - + > > = < < = / cast concat identity flatten load max \ n " <nl> + " min repeat reverse set sort take to - array empty sin \ n " <nl> + " get apply shuffle ref ] ) \ n " <nl> + " ( : require [ org . apache . clojure - mxnet . util : as util ] \ n " <nl> + " [ org . apache . clojure - mxnet . shape : as mx - shape ] ) \ n " <nl> + " ( : import ( org . apache . mxnet SymbolAPI ) ) ) " ) ) <nl> + <nl> + ( defn make - gen - symbol - api - function <nl> + [ { : keys [ fn - name - > fn - name ] : or { fn - name - > fn - name identity } } ] <nl> + ( fn [ op - name ] <nl> + ( let [ { : keys [ fn - name fn - description args ] } <nl> + ( - > op - name ( gen - op - info ) ( update : fn - name fn - name - > fn - name ) ) <nl> + params ( mapv ( fn [ { : keys [ name type optional ? ] : as opts } ] <nl> + ( assoc opts <nl> + : sym ( symbol name ) <nl> + : optional ? ( or optional ? <nl> + ( = " NDArray - or - Symbol " type ) ) ) ) <nl> + ( conj args <nl> + { : name " name " <nl> + : type " String " <nl> + : optional ? true <nl> + : description " Name of the symbol " } <nl> + { : name " attr " <nl> + : type " Map [ String , String ] " <nl> + : optional ? true <nl> + : description " Attributes of the symbol " } ) ) <nl> + doc ( clojure . string / join <nl> + " \ n \ n " <nl> + ( - > ( gen - symbol - api - doc fn - description params ) <nl> + ( clojure . string / split # " \ n " ) ) ) <nl> + default - call ( gen - symbol - api - default - arity op - name params ) ] <nl> + ` ( ~ ' defn ~ ( symbol fn - name ) <nl> + ~ doc <nl> + ~ @ default - call ) ) ) ) <nl> + <nl> + ( def gen - symbol - api - function <nl> + ( make - gen - symbol - api - function { } ) ) <nl> + <nl> + ( def gen - symbol - random - api - function <nl> + ( make - gen - symbol - api - function { : fn - name - > fn - name fn - name - > random - fn - name } ) ) <nl> + <nl> + ( defn all - symbol - api - functions [ op - names ] <nl> + ( - > > op - names <nl> + ( filter # ( = : core ( op - name - > namespace - type % ) ) ) <nl> + ( mapv gen - symbol - api - function ) ) ) <nl> + <nl> + ( count ( all - symbol - api - functions op - names ) ) ; 215 <nl> <nl> - ( defn generate - symbol - api - file [ ] <nl> + ( defn all - symbol - random - api - functions [ op - names ] <nl> + ( - > > op - names <nl> + ( filter # ( = : random ( op - name - > namespace - type % ) ) ) <nl> + ( mapv gen - symbol - random - api - function ) ) ) <nl> + <nl> + ( count ( all - symbol - random - api - functions op - names ) ) ; 16 <nl> + <nl> + ( defn generate - symbol - api - file [ op - names ] <nl> ( println " Generating symbol - api file " ) <nl> - ( write - to - file all - symbol - api - functions symbol - api - gen - ns " src / org / apache / clojure_mxnet / gen / symbol_api . clj " ) ) <nl> + ( write - to - file ( all - symbol - api - functions op - names ) <nl> + ( symbol - api - gen - ns false ) <nl> + " src / org / apache / clojure_mxnet / gen / symbol_api . clj " ) ) <nl> + <nl> + ( defn generate - symbol - random - api - file [ op - names ] <nl> + ( println " Generating symbol - random - api file " ) <nl> + ( write - to - file ( all - symbol - random - api - functions op - names ) <nl> + ( symbol - api - gen - ns true ) <nl> + " src / org / apache / clojure_mxnet / gen / symbol_random_api . clj " ) ) <nl> <nl> ; ; ; ; ; ; ; NDArrayAPI <nl> <nl> <nl> ` ( ~ ( mapv : sym req - params ) <nl> ( ~ ( symbol fn - name ) ~ req - args ) ) ) ) <nl> <nl> - ( defn gen - ndarray - api - function [ op - name ] <nl> - ( let [ { : keys [ fn - name fn - description args ] } ( gen - op - info op - name ) <nl> - params ( mapv ( fn [ { : keys [ name ] : as opts } ] <nl> - ( assoc opts : sym ( symbol name ) ) ) <nl> - ( conj args { : name " out " <nl> - : type " NDArray - or - Symbol " <nl> - : optional ? true <nl> - : description " Output array . " } ) ) <nl> - doc ( clojure . string / join <nl> - " \ n \ n " <nl> - ( - > ( gen - ndarray - api - doc fn - description params ) <nl> - ( clojure . string / split # " \ n " ) ) ) <nl> - opt - params ( filter : optional ? params ) <nl> - req - params ( remove : optional ? params ) <nl> - req - call ( gen - ndarray - api - required - arity fn - name req - params ) <nl> - default - call ( gen - ndarray - api - default - arity op - name params ) ] <nl> - ( if ( = 1 ( count req - params ) ) <nl> - ` ( ~ ' defn ~ ( symbol fn - name ) <nl> - ~ doc <nl> - ~ @ default - call ) <nl> - ` ( ~ ' defn ~ ( symbol fn - name ) <nl> - ~ doc <nl> - ~ req - call <nl> - ~ default - call ) ) ) ) <nl> - <nl> - ( def all - ndarray - api - functions <nl> - ( mapv gen - ndarray - api - function op - names ) ) <nl> - <nl> - ( def ndarray - api - gen - ns " ( ns <nl> - ^ { : doc \ " Experimental \ " } <nl> - org . apache . clojure - mxnet . ndarray - api <nl> - ( : refer - clojure : exclude [ * - + > > = < < = / cast concat flatten identity load max <nl> - min repeat reverse set sort take to - array empty shuffle <nl> - ref ] ) <nl> - ( : require [ org . apache . clojure - mxnet . shape : as mx - shape ] <nl> - [ org . apache . clojure - mxnet . util : as util ] ) <nl> - ( : import ( org . apache . mxnet NDArrayAPI ) ) ) " ) <nl> - <nl> - <nl> - ( defn generate - ndarray - api - file [ ] <nl> + ( defn make - gen - ndarray - api - function <nl> + [ { : keys [ fn - name - > fn - name ] : or { fn - name - > fn - name identity } } ] <nl> + ( fn [ op - name ] <nl> + ( let [ { : keys [ fn - name fn - description args ] } <nl> + ( - > op - name ( gen - op - info ) ( update : fn - name fn - name - > fn - name ) ) <nl> + params ( mapv ( fn [ { : keys [ name ] : as opts } ] <nl> + ( assoc opts : sym ( symbol name ) ) ) <nl> + ( conj args { : name " out " <nl> + : type " NDArray - or - Symbol " <nl> + : optional ? true <nl> + : description " Output array . " } ) ) <nl> + doc ( clojure . string / join <nl> + " \ n \ n " <nl> + ( - > ( gen - ndarray - api - doc fn - description params ) <nl> + ( clojure . string / split # " \ n " ) ) ) <nl> + opt - params ( filter : optional ? params ) <nl> + req - params ( remove : optional ? params ) <nl> + req - call ( gen - ndarray - api - required - arity fn - name req - params ) <nl> + default - call ( gen - ndarray - api - default - arity op - name params ) ] <nl> + ( if ( = 1 ( count req - params ) ) <nl> + ` ( ~ ' defn ~ ( symbol fn - name ) <nl> + ~ doc <nl> + ~ @ default - call ) <nl> + ` ( ~ ' defn ~ ( symbol fn - name ) <nl> + ~ doc <nl> + ~ req - call <nl> + ~ default - call ) ) ) ) ) <nl> + <nl> + ( def gen - ndarray - api - function <nl> + ( make - gen - ndarray - api - function { } ) ) <nl> + <nl> + ( def gen - ndarray - random - api - function <nl> + ( make - gen - ndarray - api - function { : fn - name - > fn - name fn - name - > random - fn - name } ) ) <nl> + <nl> + ( defn all - ndarray - api - functions [ op - names ] <nl> + ( - > > op - names <nl> + ( filter # ( = : core ( op - name - > namespace - type % ) ) ) <nl> + ( mapv gen - ndarray - api - function ) ) ) <nl> + <nl> + ( count ( all - ndarray - api - functions op - names ) ) ; 213 <nl> + <nl> + ( defn all - ndarray - random - api - functions [ op - names ] <nl> + ( - > > op - names <nl> + ( filter # ( = : random ( op - name - > namespace - type % ) ) ) <nl> + ( mapv gen - ndarray - random - api - function ) ) ) <nl> + <nl> + ( count ( all - ndarray - random - api - functions op - names ) ) ; 16 <nl> + <nl> + ( defn ndarray - api - gen - ns [ random - namespace ? ] <nl> + ( str <nl> + " ( ns \ n " <nl> + " ^ { : doc \ " Experimental \ " } \ n " <nl> + ( if random - namespace ? <nl> + " org . apache . clojure - mxnet . ndarray - random - api \ n " <nl> + " org . apache . clojure - mxnet . ndarray - api \ n " ) <nl> + " ( : refer - clojure : exclude [ * - + > > = < < = / cast concat flatten identity load max \ n " <nl> + " min repeat reverse set sort take to - array empty shuffle \ n " <nl> + " ref ] ) \ n " <nl> + " ( : require [ org . apache . clojure - mxnet . shape : as mx - shape ] \ n " <nl> + " [ org . apache . clojure - mxnet . util : as util ] ) \ n " <nl> + " ( : import ( org . apache . mxnet NDArrayAPI ) ) ) " ) ) <nl> + <nl> + ( defn generate - ndarray - api - file [ op - names ] <nl> ( println " Generating ndarray - api file " ) <nl> - ( write - to - file all - ndarray - api - functions <nl> - ndarray - api - gen - ns <nl> + ( write - to - file ( all - ndarray - api - functions op - names ) <nl> + ( ndarray - api - gen - ns false ) <nl> " src / org / apache / clojure_mxnet / gen / ndarray_api . clj " ) ) <nl> <nl> + ( defn generate - ndarray - random - api - file [ op - names ] <nl> + ( println " Generating ndarray - random - api file " ) <nl> + ( write - to - file ( all - ndarray - random - api - functions op - names ) <nl> + ( ndarray - api - gen - ns true ) <nl> + " src / org / apache / clojure_mxnet / gen / ndarray_random_api . clj " ) ) <nl> + <nl> + <nl> ; ; ; autogen the files <nl> ( do <nl> ( generate - ndarray - file ) <nl> - ( generate - ndarray - api - file ) <nl> + <nl> + ; ; NDArrayAPI <nl> + ( generate - ndarray - api - file op - names ) <nl> + ( generate - ndarray - random - api - file op - names ) <nl> + <nl> ( generate - symbol - file ) <nl> - ( generate - symbol - api - file ) ) <nl> + <nl> + ; ; SymbolAPI <nl> + ( generate - symbol - api - file op - names ) <nl> + ( generate - symbol - random - api - file op - names ) ) <nl> <nl> <nl> ( comment <nl> <nl> <nl> ( gen - symbol - api - function " Activation " ) <nl> <nl> + ( gen - ndarray - random - api - function " random_randint " ) <nl> + <nl> + ( gen - ndarray - random - api - function " sample_normal " ) <nl> + <nl> + ( gen - symbol - random - api - function " random_poisson " ) <nl> + <nl> ; ; This generates a file with the bulk of the nd - array functions <nl> ( generate - ndarray - file ) <nl> <nl> ; ; This generates a file with the bulk of the symbol functions <nl> - ( generate - symbol - file ) ) <nl> + ( generate - symbol - file ) ) <nl> mmm a / contrib / clojure - package / src / org / apache / clojure_mxnet / ndarray_api . clj <nl> ppp b / contrib / clojure - package / src / org / apache / clojure_mxnet / ndarray_api . clj <nl> <nl> <nl> ( ns org . apache . clojure - mxnet . ndarray - api <nl> " Experimental NDArray API " <nl> - ( : refer - clojure : exclude [ * - + > > = < < = / cast concat flatten identity load max <nl> - min repeat reverse set sort take to - array empty shuffle <nl> - ref ] ) <nl> - <nl> + ( : refer - clojure <nl> + : exclude [ * - + > > = < < = / cast concat flatten identity load max <nl> + min repeat reverse set sort take to - array empty shuffle <nl> + ref ] ) <nl> ( : require [ org . apache . clojure - mxnet . base : as base ] <nl> [ org . apache . clojure - mxnet . context : as mx - context ] <nl> [ org . apache . clojure - mxnet . shape : as mx - shape ] <nl> new file mode 100644 <nl> index 00000000000 . . 1f45b6d4d64 <nl> mmm / dev / null <nl> ppp b / contrib / clojure - package / src / org / apache / clojure_mxnet / ndarray_random_api . clj <nl> <nl> + ; ; Licensed to the Apache Software Foundation ( ASF ) under one or more <nl> + ; ; contributor license agreements . See the NOTICE file distributed with <nl> + ; ; this work for additional information regarding copyright ownership . <nl> + ; ; The ASF licenses this file to You under the Apache License , Version 2 . 0 <nl> + ; ; ( the " License " ) ; you may not use this file except in compliance with <nl> + ; ; the License . You may obtain a copy of the License at <nl> + ; ; <nl> + ; ; http : / / www . apache . org / licenses / LICENSE - 2 . 0 <nl> + ; ; <nl> + ; ; Unless required by applicable law or agreed to in writing , software <nl> + ; ; distributed under the License is distributed on an " AS IS " BASIS , <nl> + ; ; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND , either express or implied . <nl> + ; ; See the License for the specific language governing permissions and <nl> + ; ; limitations under the License . <nl> + ; ; <nl> + <nl> + ( ns org . apache . clojure - mxnet . ndarray - random - api <nl> + " Experimental NDArray Random API " <nl> + ( : require [ org . apache . clojure - mxnet . base : as base ] <nl> + [ org . apache . clojure - mxnet . context : as mx - context ] <nl> + [ org . apache . clojure - mxnet . shape : as mx - shape ] <nl> + [ org . apache . clojure - mxnet . util : as util ] <nl> + [ clojure . reflect : as r ] <nl> + [ t6 . from - scala . core : refer [ $ ] : as $ ] ) <nl> + ( : import ( org . apache . mxnet NDArrayAPI ) ) ) <nl> + <nl> + ; ; loads the generated functions into the namespace <nl> + ( do ( clojure . core / load " gen / ndarray_random_api " ) ) <nl> new file mode 100644 <nl> index 00000000000 . . 76f6fdefc33 <nl> mmm / dev / null <nl> ppp b / contrib / clojure - package / src / org / apache / clojure_mxnet / symbol_random_api . clj <nl> <nl> + ; ; Licensed to the Apache Software Foundation ( ASF ) under one or more <nl> + ; ; contributor license agreements . See the NOTICE file distributed with <nl> + ; ; this work for additional information regarding copyright ownership . <nl> + ; ; The ASF licenses this file to You under the Apache License , Version 2 . 0 <nl> + ; ; ( the " License " ) ; you may not use this file except in compliance with <nl> + ; ; the License . You may obtain a copy of the License at <nl> + ; ; <nl> + ; ; http : / / www . apache . org / licenses / LICENSE - 2 . 0 <nl> + ; ; <nl> + ; ; Unless required by applicable law or agreed to in writing , software <nl> + ; ; distributed under the License is distributed on an " AS IS " BASIS , <nl> + ; ; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND , either express or implied . <nl> + ; ; See the License for the specific language governing permissions and <nl> + ; ; limitations under the License . <nl> + ; ; <nl> + <nl> + ( ns org . apache . clojure - mxnet . symbol - random - api <nl> + " Experimental Symbol Random API " <nl> + ( : refer - clojure : exclude [ * - + > > = < < = / cast concat identity flatten load max <nl> + min repeat reverse set sort take to - array empty sin <nl> + get apply shuffle ref ] ) <nl> + ( : require [ org . apache . clojure - mxnet . base : as base ] <nl> + [ org . apache . clojure - mxnet . context : as mx - context ] <nl> + [ org . apache . clojure - mxnet . executor : as ex ] <nl> + [ org . apache . clojure - mxnet . shape : as mx - shape ] <nl> + [ org . apache . clojure - mxnet . util : as util ] <nl> + [ t6 . from - scala . core : refer [ $ ] : as $ ] <nl> + [ org . apache . clojure - mxnet . ndarray : as ndarray ] ) <nl> + ( : import ( org . apache . mxnet SymbolAPI ) ) ) <nl> + <nl> + ; ; loads the generated functions into the namespace <nl> + ( do ( clojure . core / load " gen / symbol_random_api " ) ) <nl> mmm a / contrib / clojure - package / test / dev / generator_test . clj <nl> ppp b / contrib / clojure - package / test / dev / generator_test . clj <nl> <nl> ( is ( = " foo - bar " ( gen / clojure - case " Foo_Bar " ) ) ) <nl> ( is ( = " div + " ( gen / clojure - case " / + " ) ) ) ) <nl> <nl> + ( deftest fn - name - > random - fn - name <nl> + ( is ( = " poisson " ( gen / fn - name - > random - fn - name " - random - poisson " ) ) ) <nl> + ( is ( = " poisson - like " ( gen / fn - name - > random - fn - name " - sample - poisson " ) ) ) ) <nl> + <nl> + ( deftest remove - prefix <nl> + ( is ( = " randint " ( gen / remove - prefix " - random - " " - random - randint " ) ) ) <nl> + ( is ( = " exponential " ( gen / remove - prefix " - sample - " " - sample - exponential " ) ) ) ) <nl> + <nl> + ( deftest in - namespace - random ? <nl> + ( is ( gen / in - namespace - random ? " random_randint " ) ) <nl> + ( is ( gen / in - namespace - random ? " sample_poisson " ) ) <nl> + ( is ( not ( gen / in - namespace - random ? " rnn " ) ) ) <nl> + ( is ( not ( gen / in - namespace - random ? " activation " ) ) ) ) <nl> + <nl> ( defn ndarray - reflect - info [ name ] <nl> ( - > > gen / ndarray - public - no - default <nl> ( filter # ( = name ( str ( : name % ) ) ) ) <nl> <nl> ( deftest test - write - to - file <nl> ( testing " symbol - api " <nl> ( let [ fname " test / test - symbol - api . clj " <nl> - _ ( gen / write - to - file [ ( first gen / all - symbol - api - functions ) <nl> - ( second gen / all - symbol - api - functions ) ] <nl> - gen / symbol - api - gen - ns <nl> + fns ( gen / all - symbol - api - functions gen / op - names ) <nl> + _ ( gen / write - to - file [ ( first fns ) ( second fns ) ] <nl> + ( gen / symbol - api - gen - ns false ) <nl> fname ) <nl> good - contents ( slurp " test / good - test - symbol - api . clj " ) <nl> contents ( slurp fname ) ] <nl> ( is ( = good - contents contents ) ) ) ) <nl> <nl> + ( testing " symbol - random - api " <nl> + ( let [ fname " test / test - symbol - random - api . clj " <nl> + fns ( gen / all - symbol - random - api - functions gen / op - names ) <nl> + _ ( gen / write - to - file [ ( first fns ) ( second fns ) ] <nl> + ( gen / symbol - api - gen - ns true ) <nl> + fname ) <nl> + good - contents ( slurp " test / good - test - symbol - random - api . clj " ) <nl> + contents ( slurp fname ) ] <nl> + ( is ( = good - contents contents ) ) ) ) <nl> + <nl> + <nl> ( testing " symbol " <nl> ( let [ fname " test / test - symbol . clj " <nl> _ ( gen / write - to - file [ ( first gen / all - symbol - functions ) ] <nl> <nl> <nl> ( testing " ndarray - api " <nl> ( let [ fname " test / test - ndarray - api . clj " <nl> - _ ( gen / write - to - file [ ( first gen / all - ndarray - api - functions ) <nl> - ( second gen / all - ndarray - api - functions ) ] <nl> - gen / ndarray - api - gen - ns <nl> + fns ( gen / all - ndarray - api - functions gen / op - names ) <nl> + _ ( gen / write - to - file [ ( first fns ) ( second fns ) ] <nl> + ( gen / ndarray - api - gen - ns false ) <nl> fname ) <nl> good - contents ( slurp " test / good - test - ndarray - api . clj " ) <nl> contents ( slurp fname ) ] <nl> ( is ( = good - contents contents ) ) ) ) <nl> <nl> + ( testing " ndarray - random - api " <nl> + ( let [ fname " test / test - ndarray - random - api . clj " <nl> + fns ( gen / all - ndarray - random - api - functions gen / op - names ) <nl> + _ ( gen / write - to - file [ ( first fns ) ( second fns ) ] <nl> + ( gen / ndarray - api - gen - ns true ) <nl> + fname ) <nl> + good - contents ( slurp " test / good - test - ndarray - random - api . clj " ) <nl> + contents ( slurp fname ) ] <nl> + ( is ( = good - contents contents ) ) ) ) <nl> + <nl> ( testing " ndarray " <nl> ( let [ fname " test / test - ndarray . clj " <nl> _ ( gen / write - to - file [ ( first gen / all - ndarray - functions ) ] <nl> new file mode 100644 <nl> index 00000000000 . . 230e1033c00 <nl> mmm / dev / null <nl> ppp b / contrib / clojure - package / test / good - test - ndarray - random - api . clj <nl> <nl> + ( ns <nl> + ^ { : doc " Experimental " } <nl> + org . apache . clojure - mxnet . ndarray - random - api <nl> + ( : refer - clojure : exclude [ * - + > > = < < = / cast concat flatten identity load max <nl> + min repeat reverse set sort take to - array empty shuffle <nl> + ref ] ) <nl> + ( : require [ org . apache . clojure - mxnet . shape : as mx - shape ] <nl> + [ org . apache . clojure - mxnet . util : as util ] ) <nl> + ( : import ( org . apache . mxnet NDArrayAPI ) ) ) <nl> + <nl> + ; ; Do not edit - this is auto - generated <nl> + <nl> + ; ; Licensed to the Apache Software Foundation ( ASF ) under one or more <nl> + ; ; contributor license agreements . See the NOTICE file distributed with <nl> + ; ; this work for additional information regarding copyright ownership . <nl> + ; ; The ASF licenses this file to You under the Apache License , Version 2 . 0 <nl> + ; ; ( the " License " ) ; you may not use this file except in compliance with <nl> + ; ; the License . You may obtain a copy of the License at <nl> + ; ; <nl> + ; ; http : / / www . apache . org / licenses / LICENSE - 2 . 0 <nl> + ; ; <nl> + ; ; Unless required by applicable law or agreed to in writing , software <nl> + ; ; distributed under the License is distributed on an " AS IS " BASIS , <nl> + ; ; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND , either express or implied . <nl> + ; ; See the License for the specific language governing permissions and <nl> + ; ; limitations under the License . <nl> + ; ; <nl> + <nl> + <nl> + <nl> + <nl> + ( defn <nl> + exponential <nl> + " Draw random samples from an exponential distribution . <nl> + <nl> + Samples are distributed according to an exponential distribution parametrized by * lambda * ( rate ) . <nl> + <nl> + Example : : <nl> + <nl> + exponential ( lam = 4 , shape = ( 2 , 2 ) ) = [ [ 0 . 0097189 , 0 . 08999364 ] , <nl> + [ 0 . 04146638 , 0 . 31715935 ] ] <nl> + <nl> + <nl> + Defined in src / operator / random / sample_op . cc : L137 <nl> + <nl> + ` lam ` : Lambda parameter ( rate ) of the exponential distribution . ( optional ) <nl> + ` shape ` : Shape of the output . ( optional ) <nl> + ` ctx ` : Context of output , in format [ cpu | gpu | cpu_pinned ] ( n ) . Only used for imperative calls . ( optional ) <nl> + ` dtype ` : DType of the output in case this can ' t be inferred . Defaults to float32 if not defined ( dtype = None ) . ( optional ) <nl> + ` out ` : Output array . ( optional ) " <nl> + ( [ ] ( exponential { } ) ) <nl> + ( [ { : keys [ lam shape ctx dtype out ] , <nl> + : or { lam nil , shape nil , ctx nil , dtype nil , out nil } , <nl> + : as opts } ] <nl> + ( util / coerce - return <nl> + ( NDArrayAPI / random_exponential <nl> + ( util / - > option lam ) <nl> + ( util / - > option ( clojure . core / when shape ( mx - shape / - > shape shape ) ) ) <nl> + ( util / - > option ctx ) <nl> + ( util / - > option dtype ) <nl> + ( util / - > option out ) ) ) ) ) <nl> + <nl> + ( defn <nl> + gamma <nl> + " Draw random samples from a gamma distribution . <nl> + <nl> + Samples are distributed according to a gamma distribution parametrized by * alpha * ( shape ) and * beta * ( scale ) . <nl> + <nl> + Example : : <nl> + <nl> + gamma ( alpha = 9 , beta = 0 . 5 , shape = ( 2 , 2 ) ) = [ [ 7 . 10486984 , 3 . 37695289 ] , <nl> + [ 3 . 91697288 , 3 . 65933681 ] ] <nl> + <nl> + <nl> + Defined in src / operator / random / sample_op . cc : L125 <nl> + <nl> + ` alpha ` : Alpha parameter ( shape ) of the gamma distribution . ( optional ) <nl> + ` beta ` : Beta parameter ( scale ) of the gamma distribution . ( optional ) <nl> + ` shape ` : Shape of the output . ( optional ) <nl> + ` ctx ` : Context of output , in format [ cpu | gpu | cpu_pinned ] ( n ) . Only used for imperative calls . ( optional ) <nl> + ` dtype ` : DType of the output in case this can ' t be inferred . Defaults to float32 if not defined ( dtype = None ) . ( optional ) <nl> + ` out ` : Output array . ( optional ) " <nl> + ( [ ] ( gamma { } ) ) <nl> + ( [ { : keys [ alpha beta shape ctx dtype out ] , <nl> + : or { alpha nil , beta nil , shape nil , ctx nil , dtype nil , out nil } , <nl> + : as opts } ] <nl> + ( util / coerce - return <nl> + ( NDArrayAPI / random_gamma <nl> + ( util / - > option alpha ) <nl> + ( util / - > option beta ) <nl> + ( util / - > option ( clojure . core / when shape ( mx - shape / - > shape shape ) ) ) <nl> + ( util / - > option ctx ) <nl> + ( util / - > option dtype ) <nl> + ( util / - > option out ) ) ) ) ) <nl> + <nl> new file mode 100644 <nl> index 00000000000 . . 7202d2e27d1 <nl> mmm / dev / null <nl> ppp b / contrib / clojure - package / test / good - test - symbol - random - api . clj <nl> <nl> + ( ns <nl> + ^ { : doc " Experimental " } <nl> + org . apache . clojure - mxnet . symbol - random - api <nl> + ( : refer - clojure : exclude [ * - + > > = < < = / cast concat identity flatten load max <nl> + min repeat reverse set sort take to - array empty sin <nl> + get apply shuffle ref ] ) <nl> + ( : require [ org . apache . clojure - mxnet . util : as util ] <nl> + [ org . apache . clojure - mxnet . shape : as mx - shape ] ) <nl> + ( : import ( org . apache . mxnet SymbolAPI ) ) ) <nl> + <nl> + ; ; Do not edit - this is auto - generated <nl> + <nl> + ; ; Licensed to the Apache Software Foundation ( ASF ) under one or more <nl> + ; ; contributor license agreements . See the NOTICE file distributed with <nl> + ; ; this work for additional information regarding copyright ownership . <nl> + ; ; The ASF licenses this file to You under the Apache License , Version 2 . 0 <nl> + ; ; ( the " License " ) ; you may not use this file except in compliance with <nl> + ; ; the License . You may obtain a copy of the License at <nl> + ; ; <nl> + ; ; http : / / www . apache . org / licenses / LICENSE - 2 . 0 <nl> + ; ; <nl> + ; ; Unless required by applicable law or agreed to in writing , software <nl> + ; ; distributed under the License is distributed on an " AS IS " BASIS , <nl> + ; ; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND , either express or implied . <nl> + ; ; See the License for the specific language governing permissions and <nl> + ; ; limitations under the License . <nl> + ; ; <nl> + <nl> + <nl> + <nl> + <nl> + ( defn <nl> + exponential <nl> + " Draw random samples from an exponential distribution . <nl> + <nl> + Samples are distributed according to an exponential distribution parametrized by * lambda * ( rate ) . <nl> + <nl> + Example : : <nl> + <nl> + exponential ( lam = 4 , shape = ( 2 , 2 ) ) = [ [ 0 . 0097189 , 0 . 08999364 ] , <nl> + [ 0 . 04146638 , 0 . 31715935 ] ] <nl> + <nl> + <nl> + Defined in src / operator / random / sample_op . cc : L137 <nl> + <nl> + ` lam ` : Lambda parameter ( rate ) of the exponential distribution . ( optional ) <nl> + ` shape ` : Shape of the output . ( optional ) <nl> + ` ctx ` : Context of output , in format [ cpu | gpu | cpu_pinned ] ( n ) . Only used for imperative calls . ( optional ) <nl> + ` dtype ` : DType of the output in case this can ' t be inferred . Defaults to float32 if not defined ( dtype = None ) . ( optional ) <nl> + ` name ` : Name of the symbol ( optional ) <nl> + ` attr ` : Attributes of the symbol ( optional ) " <nl> + [ { : keys [ lam shape ctx dtype name attr ] , <nl> + : or { lam nil , shape nil , ctx nil , dtype nil , name nil , attr nil } , <nl> + : as opts } ] <nl> + ( util / coerce - return <nl> + ( SymbolAPI / random_exponential <nl> + ( util / - > option lam ) <nl> + ( util / - > option ( clojure . core / when shape ( mx - shape / - > shape shape ) ) ) <nl> + ( util / - > option ctx ) <nl> + ( util / - > option dtype ) <nl> + name <nl> + ( clojure . core / when <nl> + attr <nl> + ( clojure . core / - > > <nl> + attr <nl> + ( clojure . core / mapv <nl> + ( clojure . core / fn [ [ k v ] ] [ k ( clojure . core / str v ) ] ) ) <nl> + ( clojure . core / into { } ) <nl> + util / convert - map ) ) ) ) ) <nl> + <nl> + ( defn <nl> + gamma <nl> + " Draw random samples from a gamma distribution . <nl> + <nl> + Samples are distributed according to a gamma distribution parametrized by * alpha * ( shape ) and * beta * ( scale ) . <nl> + <nl> + Example : : <nl> + <nl> + gamma ( alpha = 9 , beta = 0 . 5 , shape = ( 2 , 2 ) ) = [ [ 7 . 10486984 , 3 . 37695289 ] , <nl> + [ 3 . 91697288 , 3 . 65933681 ] ] <nl> + <nl> + <nl> + Defined in src / operator / random / sample_op . cc : L125 <nl> + <nl> + ` alpha ` : Alpha parameter ( shape ) of the gamma distribution . ( optional ) <nl> + ` beta ` : Beta parameter ( scale ) of the gamma distribution . ( optional ) <nl> + ` shape ` : Shape of the output . ( optional ) <nl> + ` ctx ` : Context of output , in format [ cpu | gpu | cpu_pinned ] ( n ) . Only used for imperative calls . ( optional ) <nl> + ` dtype ` : DType of the output in case this can ' t be inferred . Defaults to float32 if not defined ( dtype = None ) . ( optional ) <nl> + ` name ` : Name of the symbol ( optional ) <nl> + ` attr ` : Attributes of the symbol ( optional ) " <nl> + [ { : keys [ alpha beta shape ctx dtype name attr ] , <nl> + : or <nl> + { alpha nil , <nl> + beta nil , <nl> + shape nil , <nl> + ctx nil , <nl> + dtype nil , <nl> + name nil , <nl> + attr nil } , <nl> + : as opts } ] <nl> + ( util / coerce - return <nl> + ( SymbolAPI / random_gamma <nl> + ( util / - > option alpha ) <nl> + ( util / - > option beta ) <nl> + ( util / - > option ( clojure . core / when shape ( mx - shape / - > shape shape ) ) ) <nl> + ( util / - > option ctx ) <nl> + ( util / - > option dtype ) <nl> + name <nl> + ( clojure . core / when <nl> + attr <nl> + ( clojure . core / - > > <nl> + attr <nl> + ( clojure . core / mapv <nl> + ( clojure . core / fn [ [ k v ] ] [ k ( clojure . core / str v ) ] ) ) <nl> + ( clojure . core / into { } ) <nl> + util / convert - map ) ) ) ) ) <nl> + <nl> new file mode 100644 <nl> index 00000000000 . . 230e1033c00 <nl> mmm / dev / null <nl> ppp b / contrib / clojure - package / test / test - ndarray - random - api . clj <nl> <nl> + ( ns <nl> + ^ { : doc " Experimental " } <nl> + org . apache . clojure - mxnet . ndarray - random - api <nl> + ( : refer - clojure : exclude [ * - + > > = < < = / cast concat flatten identity load max <nl> + min repeat reverse set sort take to - array empty shuffle <nl> + ref ] ) <nl> + ( : require [ org . apache . clojure - mxnet . shape : as mx - shape ] <nl> + [ org . apache . clojure - mxnet . util : as util ] ) <nl> + ( : import ( org . apache . mxnet NDArrayAPI ) ) ) <nl> + <nl> + ; ; Do not edit - this is auto - generated <nl> + <nl> + ; ; Licensed to the Apache Software Foundation ( ASF ) under one or more <nl> + ; ; contributor license agreements . See the NOTICE file distributed with <nl> + ; ; this work for additional information regarding copyright ownership . <nl> + ; ; The ASF licenses this file to You under the Apache License , Version 2 . 0 <nl> + ; ; ( the " License " ) ; you may not use this file except in compliance with <nl> + ; ; the License . You may obtain a copy of the License at <nl> + ; ; <nl> + ; ; http : / / www . apache . org / licenses / LICENSE - 2 . 0 <nl> + ; ; <nl> + ; ; Unless required by applicable law or agreed to in writing , software <nl> + ; ; distributed under the License is distributed on an " AS IS " BASIS , <nl> + ; ; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND , either express or implied . <nl> + ; ; See the License for the specific language governing permissions and <nl> + ; ; limitations under the License . <nl> + ; ; <nl> + <nl> + <nl> + <nl> + <nl> + ( defn <nl> + exponential <nl> + " Draw random samples from an exponential distribution . <nl> + <nl> + Samples are distributed according to an exponential distribution parametrized by * lambda * ( rate ) . <nl> + <nl> + Example : : <nl> + <nl> + exponential ( lam = 4 , shape = ( 2 , 2 ) ) = [ [ 0 . 0097189 , 0 . 08999364 ] , <nl> + [ 0 . 04146638 , 0 . 31715935 ] ] <nl> + <nl> + <nl> + Defined in src / operator / random / sample_op . cc : L137 <nl> + <nl> + ` lam ` : Lambda parameter ( rate ) of the exponential distribution . ( optional ) <nl> + ` shape ` : Shape of the output . ( optional ) <nl> + ` ctx ` : Context of output , in format [ cpu | gpu | cpu_pinned ] ( n ) . Only used for imperative calls . ( optional ) <nl> + ` dtype ` : DType of the output in case this can ' t be inferred . Defaults to float32 if not defined ( dtype = None ) . ( optional ) <nl> + ` out ` : Output array . ( optional ) " <nl> + ( [ ] ( exponential { } ) ) <nl> + ( [ { : keys [ lam shape ctx dtype out ] , <nl> + : or { lam nil , shape nil , ctx nil , dtype nil , out nil } , <nl> + : as opts } ] <nl> + ( util / coerce - return <nl> + ( NDArrayAPI / random_exponential <nl> + ( util / - > option lam ) <nl> + ( util / - > option ( clojure . core / when shape ( mx - shape / - > shape shape ) ) ) <nl> + ( util / - > option ctx ) <nl> + ( util / - > option dtype ) <nl> + ( util / - > option out ) ) ) ) ) <nl> + <nl> + ( defn <nl> + gamma <nl> + " Draw random samples from a gamma distribution . <nl> + <nl> + Samples are distributed according to a gamma distribution parametrized by * alpha * ( shape ) and * beta * ( scale ) . <nl> + <nl> + Example : : <nl> + <nl> + gamma ( alpha = 9 , beta = 0 . 5 , shape = ( 2 , 2 ) ) = [ [ 7 . 10486984 , 3 . 37695289 ] , <nl> + [ 3 . 91697288 , 3 . 65933681 ] ] <nl> + <nl> + <nl> + Defined in src / operator / random / sample_op . cc : L125 <nl> + <nl> + ` alpha ` : Alpha parameter ( shape ) of the gamma distribution . ( optional ) <nl> + ` beta ` : Beta parameter ( scale ) of the gamma distribution . ( optional ) <nl> + ` shape ` : Shape of the output . ( optional ) <nl> + ` ctx ` : Context of output , in format [ cpu | gpu | cpu_pinned ] ( n ) . Only used for imperative calls . ( optional ) <nl> + ` dtype ` : DType of the output in case this can ' t be inferred . Defaults to float32 if not defined ( dtype = None ) . ( optional ) <nl> + ` out ` : Output array . ( optional ) " <nl> + ( [ ] ( gamma { } ) ) <nl> + ( [ { : keys [ alpha beta shape ctx dtype out ] , <nl> + : or { alpha nil , beta nil , shape nil , ctx nil , dtype nil , out nil } , <nl> + : as opts } ] <nl> + ( util / coerce - return <nl> + ( NDArrayAPI / random_gamma <nl> + ( util / - > option alpha ) <nl> + ( util / - > option beta ) <nl> + ( util / - > option ( clojure . core / when shape ( mx - shape / - > shape shape ) ) ) <nl> + ( util / - > option ctx ) <nl> + ( util / - > option dtype ) <nl> + ( util / - > option out ) ) ) ) ) <nl> + <nl> new file mode 100644 <nl> index 00000000000 . . 7202d2e27d1 <nl> mmm / dev / null <nl> ppp b / contrib / clojure - package / test / test - symbol - random - api . clj <nl> <nl> + ( ns <nl> + ^ { : doc " Experimental " } <nl> + org . apache . clojure - mxnet . symbol - random - api <nl> + ( : refer - clojure : exclude [ * - + > > = < < = / cast concat identity flatten load max <nl> + min repeat reverse set sort take to - array empty sin <nl> + get apply shuffle ref ] ) <nl> + ( : require [ org . apache . clojure - mxnet . util : as util ] <nl> + [ org . apache . clojure - mxnet . shape : as mx - shape ] ) <nl> + ( : import ( org . apache . mxnet SymbolAPI ) ) ) <nl> + <nl> + ; ; Do not edit - this is auto - generated <nl> + <nl> + ; ; Licensed to the Apache Software Foundation ( ASF ) under one or more <nl> + ; ; contributor license agreements . See the NOTICE file distributed with <nl> + ; ; this work for additional information regarding copyright ownership . <nl> + ; ; The ASF licenses this file to You under the Apache License , Version 2 . 0 <nl> + ; ; ( the " License " ) ; you may not use this file except in compliance with <nl> + ; ; the License . You may obtain a copy of the License at <nl> + ; ; <nl> + ; ; http : / / www . apache . org / licenses / LICENSE - 2 . 0 <nl> + ; ; <nl> + ; ; Unless required by applicable law or agreed to in writing , software <nl> + ; ; distributed under the License is distributed on an " AS IS " BASIS , <nl> + ; ; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND , either express or implied . <nl> + ; ; See the License for the specific language governing permissions and <nl> + ; ; limitations under the License . <nl> + ; ; <nl> + <nl> + <nl> + <nl> + <nl> + ( defn <nl> + exponential <nl> + " Draw random samples from an exponential distribution . <nl> + <nl> + Samples are distributed according to an exponential distribution parametrized by * lambda * ( rate ) . <nl> + <nl> + Example : : <nl> + <nl> + exponential ( lam = 4 , shape = ( 2 , 2 ) ) = [ [ 0 . 0097189 , 0 . 08999364 ] , <nl> + [ 0 . 04146638 , 0 . 31715935 ] ] <nl> + <nl> + <nl> + Defined in src / operator / random / sample_op . cc : L137 <nl> + <nl> + ` lam ` : Lambda parameter ( rate ) of the exponential distribution . ( optional ) <nl> + ` shape ` : Shape of the output . ( optional ) <nl> + ` ctx ` : Context of output , in format [ cpu | gpu | cpu_pinned ] ( n ) . Only used for imperative calls . ( optional ) <nl> + ` dtype ` : DType of the output in case this can ' t be inferred . Defaults to float32 if not defined ( dtype = None ) . ( optional ) <nl> + ` name ` : Name of the symbol ( optional ) <nl> + ` attr ` : Attributes of the symbol ( optional ) " <nl> + [ { : keys [ lam shape ctx dtype name attr ] , <nl> + : or { lam nil , shape nil , ctx nil , dtype nil , name nil , attr nil } , <nl> + : as opts } ] <nl> + ( util / coerce - return <nl> + ( SymbolAPI / random_exponential <nl> + ( util / - > option lam ) <nl> + ( util / - > option ( clojure . core / when shape ( mx - shape / - > shape shape ) ) ) <nl> + ( util / - > option ctx ) <nl> + ( util / - > option dtype ) <nl> + name <nl> + ( clojure . core / when <nl> + attr <nl> + ( clojure . core / - > > <nl> + attr <nl> + ( clojure . core / mapv <nl> + ( clojure . core / fn [ [ k v ] ] [ k ( clojure . core / str v ) ] ) ) <nl> + ( clojure . core / into { } ) <nl> + util / convert - map ) ) ) ) ) <nl> + <nl> + ( defn <nl> + gamma <nl> + " Draw random samples from a gamma distribution . <nl> + <nl> + Samples are distributed according to a gamma distribution parametrized by * alpha * ( shape ) and * beta * ( scale ) . <nl> + <nl> + Example : : <nl> + <nl> + gamma ( alpha = 9 , beta = 0 . 5 , shape = ( 2 , 2 ) ) = [ [ 7 . 10486984 , 3 . 37695289 ] , <nl> + [ 3 . 91697288 , 3 . 65933681 ] ] <nl> + <nl> + <nl> + Defined in src / operator / random / sample_op . cc : L125 <nl> + <nl> + ` alpha ` : Alpha parameter ( shape ) of the gamma distribution . ( optional ) <nl> + ` beta ` : Beta parameter ( scale ) of the gamma distribution . ( optional ) <nl> + ` shape ` : Shape of the output . ( optional ) <nl> + ` ctx ` : Context of output , in format [ cpu | gpu | cpu_pinned ] ( n ) . Only used for imperative calls . ( optional ) <nl> + ` dtype ` : DType of the output in case this can ' t be inferred . Defaults to float32 if not defined ( dtype = None ) . ( optional ) <nl> + ` name ` : Name of the symbol ( optional ) <nl> + ` attr ` : Attributes of the symbol ( optional ) " <nl> + [ { : keys [ alpha beta shape ctx dtype name attr ] , <nl> + : or <nl> + { alpha nil , <nl> + beta nil , <nl> + shape nil , <nl> + ctx nil , <nl> + dtype nil , <nl> + name nil , <nl> + attr nil } , <nl> + : as opts } ] <nl> + ( util / coerce - return <nl> + ( SymbolAPI / random_gamma <nl> + ( util / - > option alpha ) <nl> + ( util / - > option beta ) <nl> + ( util / - > option ( clojure . core / when shape ( mx - shape / - > shape shape ) ) ) <nl> + ( util / - > option ctx ) <nl> + ( util / - > option dtype ) <nl> + name <nl> + ( clojure . core / when <nl> + attr <nl> + ( clojure . core / - > > <nl> + attr <nl> + ( clojure . core / mapv <nl> + ( clojure . core / fn [ [ k v ] ] [ k ( clojure . core / str v ) ] ) ) <nl> + ( clojure . core / into { } ) <nl> + util / convert - map ) ) ) ) ) <nl> + <nl>
[ clojure ] [ generator ] ndarray / symbol api random merged ( )
apache/incubator-mxnet
5dd9fa27d8bdd2a8677b7c275a494d17082c0e1c
2019-04-26T17:30:41Z
mmm a / build_cmder . rb <nl> ppp b / build_cmder . rb <nl> def get_file project , query <nl> end <nl> end <nl> <nl> + def find_on_path exe <nl> + path = ENV [ ' PATH ' ] . split ( File : : PATH_SEPARATOR ) <nl> + for dir in path <nl> + if File . exists ? ( File . join ( dir , exe ) ) <nl> + return true <nl> + end <nl> + end <nl> + <nl> + return false <nl> + end <nl> + <nl> puts ' <nl> ______ _ _ _ _ _ <nl> | ___ \ ( _ ) | | ( _ ) | | <nl> def get_file project , query <nl> | ___ / <nl> ' <nl> <nl> + unless find_on_path ( ' 7z . exe ' ) <nl> + puts ' 7z . exe not found . Ensure 7 - zip is installed and on the PATH . ' <nl> + exit ( 1 ) <nl> + end <nl> + <nl> puts ' Cleanup ' <nl> <nl> if Dir . exists ? ( ' vendor ' ) <nl>
Check for 7 - zip before build
cmderdev/cmder
6126437762bad703dd06066b09810e6045ac5fba
2013-11-29T16:48:32Z
mmm a / tensorflow / core / distributed_runtime / eager / eager_service_impl . cc <nl> ppp b / tensorflow / core / distributed_runtime / eager / eager_service_impl . cc <nl> tensorflow : : Status EagerServiceImpl : : GetServerContext ( <nl> * server_context = nullptr ; <nl> return errors : : InvalidArgument ( strings : : Printf ( <nl> " Unable to find a context_id matching the specified one " <nl> - " ( % lld ) . Perhaps the worker was restarted , or the context was GC ' d ? " , <nl> + " ( % llu ) . Perhaps the worker was restarted , or the context was GC ' d ? " , <nl> context_id ) ) ; <nl> } <nl> <nl>
Fix context_id format string in error message ( unsigned long long ) .
tensorflow/tensorflow
ba2a0f17abc11d8078c8f8cd808cca9b7e259f70
2019-08-28T17:48:13Z
mmm a / include / swift / Basic / LangOptions . h <nl> ppp b / include / swift / Basic / LangOptions . h <nl> namespace swift { <nl> / / / Enable experimental # assert feature . <nl> bool EnableExperimentalStaticAssert = false ; <nl> <nl> - / / / Staging flag for treating inout parameters as Thread Sanitizer <nl> - / / / accesses . <nl> - bool DisableTsanInoutInstrumentation = false ; <nl> - <nl> / / / Should we check the target OSs of serialized modules to see that they ' re <nl> / / / new enough ? <nl> bool EnableTargetOSChecking = true ; <nl> mmm a / include / swift / Option / FrontendOptions . td <nl> ppp b / include / swift / Option / FrontendOptions . td <nl> def disable_availability_checking : Flag < [ " - " ] , <nl> " disable - availability - checking " > , <nl> HelpText < " Disable checking for potentially unavailable APIs " > ; <nl> <nl> - def disable_tsan_inout_instrumentation : Flag < [ " - " ] , <nl> - " disable - tsan - inout - instrumentation " > , <nl> - HelpText < " Disable treatment of inout parameters as Thread Sanitizer accesses " > ; <nl> - <nl> def report_errors_to_debugger : Flag < [ " - " ] , " report - errors - to - debugger " > , <nl> HelpText < " Deprecated , will be removed in future versions . " > ; <nl> <nl> mmm a / lib / Frontend / CompilerInvocation . cpp <nl> ppp b / lib / Frontend / CompilerInvocation . cpp <nl> static bool ParseLangArgs ( LangOptions & Opts , ArgList & Args , <nl> Opts . DisableAvailabilityChecking | = <nl> Args . hasArg ( OPT_disable_availability_checking ) ; <nl> <nl> - Opts . DisableTsanInoutInstrumentation | = <nl> - Args . hasArg ( OPT_disable_tsan_inout_instrumentation ) ; <nl> - <nl> if ( FrontendOpts . InputKind = = InputFileKind : : SIL ) <nl> Opts . DisableAvailabilityChecking = true ; <nl> <nl> mmm a / lib / SILGen / SILGenLValue . cpp <nl> ppp b / lib / SILGen / SILGenLValue . cpp <nl> static ManagedValue drillIntoComponent ( SILGenFunction & SGF , <nl> bool isRValue = component . isRValue ( ) ; <nl> ManagedValue addr = std : : move ( component ) . project ( SGF , loc , base ) ; <nl> <nl> - if ( ! SGF . getASTContext ( ) . LangOpts . DisableTsanInoutInstrumentation & & <nl> - ( SGF . getModule ( ) . getOptions ( ) . Sanitizers & SanitizerKind : : Thread ) & & <nl> + if ( ( SGF . getModule ( ) . getOptions ( ) . Sanitizers & SanitizerKind : : Thread ) & & <nl> tsanKind = = TSanKind : : InoutAccess & & ! isRValue ) { <nl> emitTsanInoutAccess ( SGF , loc , addr ) ; <nl> } <nl>
Remove dead flag disable - tsan - inout - instrumentation
apple/swift
43da5c97440fc117f6fc22533188884c273634dd
2019-10-15T04:42:33Z
mmm a / modules / planning / common / planning_gflags . cc <nl> ppp b / modules / planning / common / planning_gflags . cc <nl> DEFINE_string ( scenario_traffic_light_unprotected_right_turn_config_file , <nl> " scenario / traffic_light_unprotected_right_turn_config . pb . txt " , <nl> " scenario_traffic_light_unprotected_right_turn config file " ) ; <nl> <nl> - DEFINE_bool ( enable_scenario_dispatcher , true , <nl> + DEFINE_bool ( enable_scenario_dispatcher , false , <nl> " enable dispatcher inside scenario manager to select scenario " ) ; <nl> <nl> DEFINE_bool ( enable_scenario_side_pass , true , <nl>
planning : disable scenario dispatcher .
ApolloAuto/apollo
5c1ca7c4d3d91c95836cc086b64f6b14f20ff2ee
2019-02-13T17:47:23Z
mmm a / third_party / mlir / BUILD <nl> ppp b / third_party / mlir / BUILD <nl> cc_library ( <nl> " : Support " , <nl> " : TransformUtils " , <nl> " : Transforms " , <nl> + " : VectorOps " , <nl> " @ llvm / / : core " , <nl> " @ llvm / / : support " , <nl> ] , <nl> mmm a / third_party / mlir / include / mlir / Dialect / Linalg / IR / LinalgLibraryOps . td <nl> ppp b / third_party / mlir / include / mlir / Dialect / Linalg / IR / LinalgLibraryOps . td <nl> def GenericOp : GenericOpBase < " generic " > { <nl> The external library is assumed to be dynamically linked and no strong <nl> compile - time guarantees are provided . In the absence of such a library <nl> call , linalg . generic will always lower to loops . <nl> - - iterator_types : an ArrayAttr they type of the enclosing loops ; Each element of <nl> - the list represents and iterator of one of the following types : <nl> - parallel , reduction , window <nl> + - iterator_types : an ArrayAttr specifying the type of the enclosing loops . <nl> + Each element of the list represents and iterator of one of the following <nl> + types : <nl> + parallel , reduction , window <nl> - n_views : a pair of I64Attr representing the number of input ( readonly ) <nl> and output ( readwrite ) views . <nl> <nl> mmm a / third_party / mlir / include / mlir / Dialect / Linalg / Transforms / LinalgTransformPatterns . td <nl> ppp b / third_party / mlir / include / mlir / Dialect / Linalg / Transforms / LinalgTransformPatterns . td <nl> def HasNoLinalgTransformMarker : CPred < [ { <nl> } ] > ; <nl> <nl> class HasLinalgTransformMarker < string str > : CPred < [ { <nl> + $ 0 . getAttrOfType < StringAttr > ( <nl> + LinalgTransforms : : kLinalgTransformMarker ) & & <nl> $ 0 . getAttrOfType < StringAttr > ( <nl> LinalgTransforms : : kLinalgTransformMarker ) . getValue ( ) = = " } ] # str # [ { " } ] > ; <nl> <nl> class LinalgOpToAffineLoops < string OpType > : NativeCodeCall < <nl> " if ( failed ( linalgOpToAffineLoops < " # OpType # " > ( $ _builder , $ 0 ) ) ) " # <nl> " return matchFailure ( ) ; " > ; <nl> <nl> + / / = = = mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - = = = / / <nl> + / / Linalg to vector contraction patterns . <nl> + / / = = = mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - = = = / / <nl> + class LinalgOpToVectorContraction < string OpType > : NativeCodeCall < <nl> + " if ( failed ( vectorizeGenericOp ( $ _builder , $ 0 ) ) ) " # <nl> + " return matchFailure ( ) ; " > ; <nl> + <nl> # endif / / LINALG_TRANSFORMS <nl> mmm a / third_party / mlir / include / mlir / Dialect / Linalg / Transforms / LinalgTransforms . h <nl> ppp b / third_party / mlir / include / mlir / Dialect / Linalg / Transforms / LinalgTransforms . h <nl> LogicalResult linalgOpToLoops ( PatternRewriter & rewriter , Operation * op ) ; <nl> template < typename ConcreteOp > <nl> LogicalResult linalgOpToAffineLoops ( PatternRewriter & rewriter , Operation * op ) ; <nl> <nl> + / / Rewrite a linalg . generic into a suitable vector . contraction op . <nl> + LogicalResult vectorizeGenericOp ( PatternRewriter & rewriter , Operation * op ) ; <nl> + <nl> } / / namespace linalg <nl> } / / namespace mlir <nl> <nl> mmm a / third_party / mlir / include / mlir / Dialect / VectorOps / VectorOps . td <nl> ppp b / third_party / mlir / include / mlir / Dialect / VectorOps / VectorOps . td <nl> def Vector_ContractionOp : <nl> % 5 = vector . contract # contraction_trait % 0 , % 1 , % 2 , % lhs_mask , % rhs_mask <nl> : vector < 7x8x16x15xf32 > , vector < 8x16x7x5xf32 > into vector < 8x15x8x5xf32 > <nl> } ] ; <nl> + let builders = [ OpBuilder < <nl> + " Builder * builder , OperationState & result , Value * lhs , Value * rhs , " <nl> + " Value * acc , ArrayAttr indexingMaps , ArrayAttr iteratorTypes " > ] ; <nl> let extraClassDeclaration = [ { <nl> + static constexpr StringLiteral getIndexingMapsAttrName ( ) { <nl> + return " indexing_maps " ; <nl> + } <nl> + static constexpr StringLiteral getIteratorTypesAttrName ( ) { <nl> + return " iterator_types " ; <nl> + } <nl> VectorType getLhsType ( ) { <nl> return lhs ( ) - > getType ( ) . cast < VectorType > ( ) ; <nl> } <nl> def Vector_ContractionOp : <nl> VectorType getResultType ( ) { <nl> return getResult ( ) - > getType ( ) . cast < VectorType > ( ) ; <nl> } <nl> - SmallVector < StringRef , 2 > getTraitAttrNames ( ) ; <nl> + ArrayRef < StringRef > getTraitAttrNames ( ) ; <nl> SmallVector < AffineMap , 4 > getIndexingMaps ( ) ; <nl> static StringRef getReductionIteratorTypeName ( ) { <nl> return " reduction " ; <nl> mmm a / third_party / mlir / lib / Dialect / Linalg / CMakeLists . txt <nl> ppp b / third_party / mlir / lib / Dialect / Linalg / CMakeLists . txt <nl> add_dependencies ( MLIRLinalg <nl> MLIRLinalgTransformPatternsIncGen <nl> MLIRStandardOps <nl> MLIRStandardToLLVM <nl> + MLIRVectorOps <nl> ) <nl> mmm a / third_party / mlir / lib / Dialect / Linalg / Transforms / LinalgTransforms . cpp <nl> ppp b / third_party / mlir / lib / Dialect / Linalg / Transforms / LinalgTransforms . cpp <nl> <nl> # include " mlir / Dialect / Linalg / Analysis / DependenceAnalysis . h " <nl> # include " mlir / Dialect / Linalg / IR / LinalgOps . h " <nl> # include " mlir / Dialect / Linalg / Utils / Utils . h " <nl> + # include " mlir / Dialect / VectorOps / VectorOps . h " <nl> + # include " mlir / IR / AffineExpr . h " <nl> + # include " mlir / IR / Matchers . h " <nl> # include " mlir / IR / PatternMatch . h " <nl> # include " mlir / Pass / Pass . h " <nl> + # include " llvm / Support / Debug . h " <nl> + # include " llvm / Support / raw_ostream . h " <nl> + # include < type_traits > <nl> + <nl> + # define DEBUG_TYPE " linalg - transforms " <nl> <nl> using namespace mlir ; <nl> using namespace mlir : : linalg ; <nl> <nl> + using llvm : : dbgs ; <nl> + <nl> / / Marker used as attribute name in generated Linalg rewriting transformations . <nl> const StringLiteral mlir : : linalg : : LinalgTransforms : : kLinalgTransformMarker = <nl> " __internal_linalg_transform__ " ; <nl> bool mlir : : linalg : : detail : : isProducedByOpOfTypeImpl ( <nl> } <nl> return false ; <nl> } <nl> + <nl> + static bool hasMultiplyAddBody ( linalg : : GenericOp op ) { <nl> + auto & r = op . region ( ) ; <nl> + if ( r . empty ( ) ) <nl> + return false ; <nl> + if ( r . getBlocks ( ) . size ( ) ! = 1 ) <nl> + return false ; <nl> + auto & ops = r . front ( ) . getOperations ( ) ; <nl> + if ( ops . size ( ) ! = 3 ) <nl> + return false ; <nl> + <nl> + using mlir : : matchers : : m_Val ; <nl> + auto a = m_Val ( r . front ( ) . getArgument ( 0 ) ) ; <nl> + auto b = m_Val ( r . front ( ) . getArgument ( 1 ) ) ; <nl> + auto c = m_Val ( r . front ( ) . getArgument ( 2 ) ) ; <nl> + / / TODO ( ntv ) Update this detection once we have matcher support for <nl> + / / specifying that any permutation of operands matches . <nl> + auto pattern1 = m_Op < YieldOp > ( m_Op < AddFOp > ( m_Op < MulFOp > ( a , b ) , c ) ) ; <nl> + auto pattern2 = m_Op < YieldOp > ( m_Op < AddFOp > ( c , m_Op < MulFOp > ( a , b ) ) ) ; <nl> + auto pattern3 = m_Op < YieldOp > ( m_Op < AddFOp > ( m_Op < MulFOp > ( b , a ) , c ) ) ; <nl> + auto pattern4 = m_Op < YieldOp > ( m_Op < AddFOp > ( c , m_Op < MulFOp > ( b , a ) ) ) ; <nl> + return pattern1 . match ( & ops . back ( ) ) | | pattern2 . match ( & ops . back ( ) ) | | <nl> + pattern3 . match ( & ops . back ( ) ) | | pattern4 . match ( & ops . back ( ) ) ; <nl> + } <nl> + <nl> + / / TODO ( ntv ) should be Tablegen ' d from a single source that generates the op <nl> + / / itself . <nl> + static bool isMatmul ( linalg : : GenericOp genericOp ) { <nl> + auto * ctx = genericOp . getContext ( ) ; <nl> + auto m = getAffineDimExpr ( 0 , ctx ) ; <nl> + auto n = getAffineDimExpr ( 1 , ctx ) ; <nl> + auto k = getAffineDimExpr ( 2 , ctx ) ; <nl> + auto mapA = AffineMapAttr : : get ( AffineMap : : get ( 3 , 0 , { m , k } ) ) ; <nl> + auto mapB = AffineMapAttr : : get ( AffineMap : : get ( 3 , 0 , { k , n } ) ) ; <nl> + auto mapC = AffineMapAttr : : get ( AffineMap : : get ( 3 , 0 , { m , n } ) ) ; <nl> + auto maps = ArrayAttr : : get ( { mapA , mapB , mapC } , ctx ) ; <nl> + return genericOp . getNumInputs ( ) = = 2 & & genericOp . getNumOutputs ( ) = = 1 & & <nl> + genericOp . indexing_maps ( ) = = maps & & hasMultiplyAddBody ( genericOp ) ; <nl> + } <nl> + <nl> + LogicalResult mlir : : linalg : : vectorizeGenericOp ( PatternRewriter & rewriter , <nl> + Operation * op ) { <nl> + LLVM_DEBUG ( dbgs ( ) < < " \ n [ " DEBUG_TYPE <nl> + " ] : Rewrite linalg op as vector . contract : " <nl> + < < * op < < " : \ n " ) ; <nl> + <nl> + / / TODO ( ntv ) : This is in fact much more general than just vectorization for <nl> + / / matmul ops . <nl> + auto genericOp = dyn_cast < linalg : : GenericOp > ( op ) ; <nl> + if ( ! genericOp | | ! isMatmul ( genericOp ) ) <nl> + return failure ( ) ; <nl> + <nl> + / / TODO ( ntv ) : non - identity layout . <nl> + auto isStaticMemRefWithIdentityLayout = [ ] ( Value * v ) { <nl> + auto m = v - > getType ( ) . dyn_cast < MemRefType > ( ) ; <nl> + if ( ! m | | ! m . hasStaticShape ( ) | | ! m . getAffineMaps ( ) . empty ( ) ) <nl> + return false ; <nl> + return true ; <nl> + } ; <nl> + if ( ! llvm : : all_of ( genericOp . getInputsAndOutputs ( ) , <nl> + isStaticMemRefWithIdentityLayout ) ) <nl> + return failure ( ) ; <nl> + <nl> + edsc : : ScopedContext scope ( rewriter , op - > getLoc ( ) ) ; <nl> + using edsc : : intrinsics : : std_load ; <nl> + using edsc : : intrinsics : : std_store ; <nl> + using vector_contract = edsc : : intrinsics : : ValueBuilder < vector : : ContractionOp > ; <nl> + using vector_type_cast = edsc : : intrinsics : : ValueBuilder < vector : : TypeCastOp > ; <nl> + auto vA = std_load ( vector_type_cast ( genericOp . getInput ( 0 ) ) ) ; <nl> + auto vB = std_load ( vector_type_cast ( genericOp . getInput ( 1 ) ) ) ; <nl> + auto vectorMemRefC = vector_type_cast ( genericOp . getOutput ( 0 ) ) ; <nl> + auto vC = std_load ( vectorMemRefC ) ; <nl> + auto vRes = vector_contract ( vA , vB , vC , genericOp . indexing_maps ( ) , <nl> + genericOp . iterator_types ( ) ) ; <nl> + std_store ( vRes , vectorMemRefC ) ; <nl> + return success ( ) ; <nl> + } <nl> mmm a / third_party / mlir / lib / Dialect / VectorOps / VectorOps . cpp <nl> ppp b / third_party / mlir / lib / Dialect / VectorOps / VectorOps . cpp <nl> mlir : : vector : : VectorOpsDialect : : VectorOpsDialect ( MLIRContext * context ) <nl> / / ContractionOp <nl> / / = = = mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - = = = / / <nl> <nl> + void vector : : ContractionOp : : build ( Builder * builder , OperationState & result , <nl> + Value * lhs , Value * rhs , Value * acc , <nl> + ArrayAttr indexingMaps , <nl> + ArrayAttr iteratorTypes ) { <nl> + result . addOperands ( { lhs , rhs , acc } ) ; <nl> + result . addTypes ( acc - > getType ( ) ) ; <nl> + result . addAttribute ( getIndexingMapsAttrName ( ) , indexingMaps ) ; <nl> + result . addAttribute ( getIteratorTypesAttrName ( ) , iteratorTypes ) ; <nl> + } <nl> + <nl> static ParseResult parseContractionOp ( OpAsmParser & parser , <nl> OperationState & result ) { <nl> OpAsmParser : : OperandType lhsInfo ; <nl> static LogicalResult verify ( ContractionOp op ) { <nl> return success ( ) ; <nl> } <nl> <nl> - SmallVector < StringRef , 2 > ContractionOp : : getTraitAttrNames ( ) { <nl> - return SmallVector < StringRef , 2 > { " indexing_maps " , " iterator_types " } ; <nl> + ArrayRef < StringRef > ContractionOp : : getTraitAttrNames ( ) { <nl> + static constexpr StringRef names [ 2 ] = { getIndexingMapsAttrName ( ) , <nl> + getIteratorTypesAttrName ( ) } ; <nl> + return ArrayRef < StringRef > ( names ) ; <nl> } <nl> <nl> static int64_t getResultIndex ( AffineMap map , AffineExpr targetExpr ) { <nl> mmm a / third_party / mlir / test / lib / DeclarativeTransforms / TestLinalgTransformPatterns . td <nl> ppp b / third_party / mlir / test / lib / DeclarativeTransforms / TestLinalgTransformPatterns . td <nl> def : Pattern < ( DotOp : $ op $ a , $ b , $ c ) , <nl> [ ( LinalgOpToLoops < " DotOp " > $ op ) ] , <nl> [ ( Constraint < HasLinalgTransformMarker < " REG " > > $ op ) ] > ; <nl> <nl> + / / = = = mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - = = = / / <nl> + / / Linalg to vector contraction patterns . <nl> + / / = = = mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - = = = / / <nl> + def : Pattern < ( GenericOp : $ op $ _1 , $ _2 , $ _3 , $ _4 , $ _5 , $ _6 , $ _7 ) , <nl> + [ ( LinalgOpToVectorContraction < " GenericOp " > $ op ) ] , <nl> + [ ( Constraint < HasLinalgTransformMarker < " _marked_matmul_ " > > $ op ) ] > ; <nl> + <nl> # endif / / TEST_LINALG_TRANSFORMS_PATTERNS <nl>
[ StructuredOps ] [ Linalg ] Add a primitive pattern to rewrite the linalg . generic form of matmul to vector form .
tensorflow/tensorflow
edacb2c9c490f141587967eb8772e36a7ec507b1
2019-12-09T17:19:36Z
mmm a / Marlin / Configuration . h <nl> ppp b / Marlin / Configuration . h <nl> <nl> / / 8 is 100k 0603 SMD Vishay NTCS0603E3104FXT ( 4 . 7k pullup ) <nl> / / 9 is 100k GE Sensing AL03006 - 58 . 2K - 97 - G1 ( 4 . 7k pullup ) <nl> / / 10 is 100k RS thermistor 198 - 961 ( 4 . 7k pullup ) <nl> + / / 11 is 100k beta 3950 1 % thermistor ( 4 . 7k pullup ) <nl> / / 20 is the PT100 circuit found in the Ultimainboard V2 . x <nl> / / 60 is 100k Maker ' s Tool Works Kapton Bed Thermistor beta = 3950 <nl> / / <nl> mmm a / Marlin / thermistortables . h <nl> ppp b / Marlin / thermistortables . h <nl> const short temptable_10 [ ] [ 2 ] PROGMEM = { <nl> { 1016 * OVERSAMPLENR , 0 } <nl> } ; <nl> # endif <nl> - <nl> - # if ( THERMISTORHEATER_0 = = 20 ) | | ( THERMISTORHEATER_1 = = 20 ) | | ( THERMISTORHEATER_2 = = 20 ) | | ( THERMISTORBED = = 20 ) / / PT100 with INA826 amp on Ultimaker v2 . 0 electronics <nl> - / * The PT100 in the Ultimaker v2 . 0 electronics has a high sample value for a high temperature . <nl> - This does not match the normal thermistor behaviour so we need to set the following defines * / <nl> - # if ( THERMISTORHEATER_0 = = 20 ) <nl> - # define HEATER_0_RAW_HI_TEMP 16383 <nl> - # define HEATER_0_RAW_LO_TEMP 0 <nl> - # endif <nl> - # if ( THERMISTORHEATER_1 = = 20 ) <nl> - # define HEATER_1_RAW_HI_TEMP 16383 <nl> - # define HEATER_1_RAW_LO_TEMP 0 <nl> - # endif <nl> - # if ( THERMISTORHEATER_2 = = 20 ) <nl> - # define HEATER_2_RAW_HI_TEMP 16383 <nl> - # define HEATER_2_RAW_LO_TEMP 0 <nl> - # endif <nl> - # if ( THERMISTORBED = = 20 ) <nl> - # define HEATER_BED_RAW_HI_TEMP 16383 <nl> - # define HEATER_BED_RAW_LO_TEMP 0 <nl> - # endif <nl> - const short temptable_20 [ ] [ 2 ] PROGMEM = { <nl> - { 0 * OVERSAMPLENR , 0 } , <nl> - { 227 * OVERSAMPLENR , 1 } , <nl> - { 236 * OVERSAMPLENR , 10 } , <nl> - { 245 * OVERSAMPLENR , 20 } , <nl> - { 253 * OVERSAMPLENR , 30 } , <nl> - { 262 * OVERSAMPLENR , 40 } , <nl> - { 270 * OVERSAMPLENR , 50 } , <nl> - { 279 * OVERSAMPLENR , 60 } , <nl> - { 287 * OVERSAMPLENR , 70 } , <nl> - { 295 * OVERSAMPLENR , 80 } , <nl> - { 304 * OVERSAMPLENR , 90 } , <nl> - { 312 * OVERSAMPLENR , 100 } , <nl> - { 320 * OVERSAMPLENR , 110 } , <nl> - { 329 * OVERSAMPLENR , 120 } , <nl> - { 337 * OVERSAMPLENR , 130 } , <nl> - { 345 * OVERSAMPLENR , 140 } , <nl> - { 353 * OVERSAMPLENR , 150 } , <nl> - { 361 * OVERSAMPLENR , 160 } , <nl> - { 369 * OVERSAMPLENR , 170 } , <nl> - { 377 * OVERSAMPLENR , 180 } , <nl> - { 385 * OVERSAMPLENR , 190 } , <nl> - { 393 * OVERSAMPLENR , 200 } , <nl> - { 401 * OVERSAMPLENR , 210 } , <nl> - { 409 * OVERSAMPLENR , 220 } , <nl> - { 417 * OVERSAMPLENR , 230 } , <nl> - { 424 * OVERSAMPLENR , 240 } , <nl> - { 432 * OVERSAMPLENR , 250 } , <nl> - { 440 * OVERSAMPLENR , 260 } , <nl> - { 447 * OVERSAMPLENR , 270 } , <nl> - { 455 * OVERSAMPLENR , 280 } , <nl> - { 463 * OVERSAMPLENR , 290 } , <nl> - { 470 * OVERSAMPLENR , 300 } , <nl> - { 478 * OVERSAMPLENR , 310 } , <nl> - { 485 * OVERSAMPLENR , 320 } , <nl> - { 493 * OVERSAMPLENR , 330 } , <nl> - { 500 * OVERSAMPLENR , 340 } , <nl> - { 507 * OVERSAMPLENR , 350 } , <nl> - { 515 * OVERSAMPLENR , 360 } , <nl> - { 522 * OVERSAMPLENR , 370 } , <nl> - { 529 * OVERSAMPLENR , 380 } , <nl> - { 537 * OVERSAMPLENR , 390 } , <nl> - { 544 * OVERSAMPLENR , 400 } , <nl> - { 614 * OVERSAMPLENR , 500 } , <nl> - { 681 * OVERSAMPLENR , 600 } , <nl> - { 744 * OVERSAMPLENR , 700 } , <nl> - { 805 * OVERSAMPLENR , 800 } , <nl> - { 862 * OVERSAMPLENR , 900 } , <nl> - { 917 * OVERSAMPLENR , 1000 } , <nl> - { 968 * OVERSAMPLENR , 1100 } <nl> - } ; <nl> - # endif <nl> + # if ( THERMISTORHEATER_0 = = 11 ) | | ( THERMISTORHEATER_1 = = 11 ) | | ( THERMISTORHEATER_2 = = 11 ) | | ( THERMISTORBED = = 11 ) / / QU - BD silicone bed QWG - 104F - 3950 thermistor <nl> + const short temptable_8 [ ] [ 2 ] PROGMEM = { <nl> + { 1 * OVERSAMPLENR , 938 } , <nl> + { 31 * OVERSAMPLENR , 314 } , <nl> + { 41 * OVERSAMPLENR , 290 } , <nl> + { 51 * OVERSAMPLENR , 272 } , <nl> + { 61 * OVERSAMPLENR , 258 } , <nl> + { 71 * OVERSAMPLENR , 247 } , <nl> + { 81 * OVERSAMPLENR , 237 } , <nl> + { 91 * OVERSAMPLENR , 229 } , <nl> + { 101 * OVERSAMPLENR , 221 } , <nl> + { 111 * OVERSAMPLENR , 215 } , <nl> + { 121 * OVERSAMPLENR , 209 } , <nl> + { 131 * OVERSAMPLENR , 204 } , <nl> + { 141 * OVERSAMPLENR , 199 } , <nl> + { 151 * OVERSAMPLENR , 195 } , <nl> + { 161 * OVERSAMPLENR , 190 } , <nl> + { 171 * OVERSAMPLENR , 187 } , <nl> + { 181 * OVERSAMPLENR , 183 } , <nl> + { 191 * OVERSAMPLENR , 179 } , <nl> + { 201 * OVERSAMPLENR , 176 } , <nl> + { 221 * OVERSAMPLENR , 170 } , <nl> + { 241 * OVERSAMPLENR , 165 } , <nl> + { 261 * OVERSAMPLENR , 160 } , <nl> + { 281 * OVERSAMPLENR , 155 } , <nl> + { 301 * OVERSAMPLENR , 150 } , <nl> + { 331 * OVERSAMPLENR , 144 } , <nl> + { 361 * OVERSAMPLENR , 139 } , <nl> + { 391 * OVERSAMPLENR , 133 } , <nl> + { 421 * OVERSAMPLENR , 128 } , <nl> + { 451 * OVERSAMPLENR , 123 } , <nl> + { 491 * OVERSAMPLENR , 117 } , <nl> + { 531 * OVERSAMPLENR , 111 } , <nl> + { 571 * OVERSAMPLENR , 105 } , <nl> + { 611 * OVERSAMPLENR , 100 } , <nl> + { 641 * OVERSAMPLENR , 95 } , <nl> + { 681 * OVERSAMPLENR , 90 } , <nl> + { 711 * OVERSAMPLENR , 85 } , <nl> + { 751 * OVERSAMPLENR , 79 } , <nl> + { 791 * OVERSAMPLENR , 72 } , <nl> + { 811 * OVERSAMPLENR , 69 } , <nl> + { 831 * OVERSAMPLENR , 65 } , <nl> + { 871 * OVERSAMPLENR , 57 } , <nl> + { 881 * OVERSAMPLENR , 55 } , <nl> + { 901 * OVERSAMPLENR , 51 } , <nl> + { 921 * OVERSAMPLENR , 45 } , <nl> + { 941 * OVERSAMPLENR , 39 } , <nl> + { 971 * OVERSAMPLENR , 28 } , <nl> + { 981 * OVERSAMPLENR , 23 } , <nl> + { 991 * OVERSAMPLENR , 17 } , <nl> + { 1001 * OVERSAMPLENR , 9 } , <nl> + { 1021 * OVERSAMPLENR , - 27 } <nl> + } ; <nl> + # endif <nl> + <nl> + # if ( THERMISTORHEATER_0 = = 20 ) | | ( THERMISTORHEATER_1 = = 20 ) | | ( THERMISTORHEATER_2 = = 20 ) | | ( THERMISTORBED = = 20 ) / / PT100 with INA826 amp on Ultimaker v2 . 0 electronics <nl> + / * The PT100 in the Ultimaker v2 . 0 electronics has a high sample value for a high temperature . <nl> + This does not match the normal thermistor behaviour so we need to set the following defines * / <nl> + # if ( THERMISTORHEATER_0 = = 20 ) <nl> + # define HEATER_0_RAW_HI_TEMP 16383 <nl> + # define HEATER_0_RAW_LO_TEMP 0 <nl> + # endif <nl> + # if ( THERMISTORHEATER_1 = = 20 ) <nl> + # define HEATER_1_RAW_HI_TEMP 16383 <nl> + # define HEATER_1_RAW_LO_TEMP 0 <nl> + # endif <nl> + # if ( THERMISTORHEATER_2 = = 20 ) <nl> + # define HEATER_2_RAW_HI_TEMP 16383 <nl> + # define HEATER_2_RAW_LO_TEMP 0 <nl> + # endif <nl> + # if ( THERMISTORBED = = 20 ) <nl> + # define HEATER_BED_RAW_HI_TEMP 16383 <nl> + # define HEATER_BED_RAW_LO_TEMP 0 <nl> + # endif <nl> + const short temptable_20 [ ] [ 2 ] PROGMEM = { <nl> + { 0 * OVERSAMPLENR , 0 } , <nl> + { 227 * OVERSAMPLENR , 1 } , <nl> + { 236 * OVERSAMPLENR , 10 } , <nl> + { 245 * OVERSAMPLENR , 20 } , <nl> + { 253 * OVERSAMPLENR , 30 } , <nl> + { 262 * OVERSAMPLENR , 40 } , <nl> + { 270 * OVERSAMPLENR , 50 } , <nl> + { 279 * OVERSAMPLENR , 60 } , <nl> + { 287 * OVERSAMPLENR , 70 } , <nl> + { 295 * OVERSAMPLENR , 80 } , <nl> + { 304 * OVERSAMPLENR , 90 } , <nl> + { 312 * OVERSAMPLENR , 100 } , <nl> + { 320 * OVERSAMPLENR , 110 } , <nl> + { 329 * OVERSAMPLENR , 120 } , <nl> + { 337 * OVERSAMPLENR , 130 } , <nl> + { 345 * OVERSAMPLENR , 140 } , <nl> + { 353 * OVERSAMPLENR , 150 } , <nl> + { 361 * OVERSAMPLENR , 160 } , <nl> + { 369 * OVERSAMPLENR , 170 } , <nl> + { 377 * OVERSAMPLENR , 180 } , <nl> + { 385 * OVERSAMPLENR , 190 } , <nl> + { 393 * OVERSAMPLENR , 200 } , <nl> + { 401 * OVERSAMPLENR , 210 } , <nl> + { 409 * OVERSAMPLENR , 220 } , <nl> + { 417 * OVERSAMPLENR , 230 } , <nl> + { 424 * OVERSAMPLENR , 240 } , <nl> + { 432 * OVERSAMPLENR , 250 } , <nl> + { 440 * OVERSAMPLENR , 260 } , <nl> + { 447 * OVERSAMPLENR , 270 } , <nl> + { 455 * OVERSAMPLENR , 280 } , <nl> + { 463 * OVERSAMPLENR , 290 } , <nl> + { 470 * OVERSAMPLENR , 300 } , <nl> + { 478 * OVERSAMPLENR , 310 } , <nl> + { 485 * OVERSAMPLENR , 320 } , <nl> + { 493 * OVERSAMPLENR , 330 } , <nl> + { 500 * OVERSAMPLENR , 340 } , <nl> + { 507 * OVERSAMPLENR , 350 } , <nl> + { 515 * OVERSAMPLENR , 360 } , <nl> + { 522 * OVERSAMPLENR , 370 } , <nl> + { 529 * OVERSAMPLENR , 380 } , <nl> + { 537 * OVERSAMPLENR , 390 } , <nl> + { 544 * OVERSAMPLENR , 400 } , <nl> + { 614 * OVERSAMPLENR , 500 } , <nl> + { 681 * OVERSAMPLENR , 600 } , <nl> + { 744 * OVERSAMPLENR , 700 } , <nl> + { 805 * OVERSAMPLENR , 800 } , <nl> + { 862 * OVERSAMPLENR , 900 } , <nl> + { 917 * OVERSAMPLENR , 1000 } , <nl> + { 968 * OVERSAMPLENR , 1100 } <nl> + } ; <nl> + # endif <nl> <nl> # if ( THERMISTORHEATER_0 = = 51 ) | | ( THERMISTORHEATER_1 = = 51 ) | | ( THERMISTORHEATER_2 = = 51 ) | | ( THERMISTORBED = = 51 ) <nl> / / 100k EPCOS ( WITH 1kohm RESISTOR FOR PULLUP , R9 ON SANGUINOLOLU ! NOT FOR 4 . 7kohm PULLUP ! THIS IS NOT NORMAL ! ) <nl>
This table is made for thermistor 3950 ( can be found on ebay for cheap )
MarlinFirmware/Marlin
3161740df9b952f627fd9ad1e132e7eaf723fc0e
2014-04-13T15:03:20Z
mmm a / DEPS <nl> ppp b / DEPS <nl> deps = { <nl> " v8 / test / test262 / data " : <nl> Var ( " git_url " ) + " / external / github . com / tc39 / test262 . git " + " @ " + " 57d3e2216fa86ad63b6c0a54914ba9dcbff96003 " , <nl> " v8 / tools / clang " : <nl> - Var ( " git_url " ) + " / chromium / src / tools / clang . git " + " @ " + " a00149535c011c08b6e8cc583a1f10f38d3cdaf9 " , <nl> + Var ( " git_url " ) + " / chromium / src / tools / clang . git " + " @ " + " f5219dd53ee7a87a07085ce03083456231ba0c27 " , <nl> } <nl> <nl> deps_os = { <nl>
Update V8 DEPS .
v8/v8
99ebb5bab4263e8fe4048f554c8e68a1f188b984
2016-03-23T03:24:00Z
mmm a / db / queryoptimizer . cpp <nl> ppp b / db / queryoptimizer . cpp <nl> namespace mongo { <nl> optimal_ = true ; <nl> if ( exactIndexedQueryCount = = fbs . nNontrivialBounds ( ) & & <nl> orderFieldsUnindexed . size ( ) = = 0 & & <nl> - exactIndexedQueryCount = = index - > keyPattern ( ) . nFields ( ) ) { <nl> + exactIndexedQueryCount = = index - > keyPattern ( ) . nFields ( ) & & <nl> + exactIndexedQueryCount = = fbs . query ( ) . nFields ( ) ) { <nl> exactKeyMatch_ = true ; <nl> } <nl> if ( startKey_ . isEmpty ( ) ) <nl> mmm a / dbtests / queryoptimizertests . cpp <nl> ppp b / dbtests / queryoptimizertests . cpp <nl> namespace QueryOptimizerTests { <nl> } <nl> } ; <nl> <nl> + class MoreKeyMatch : public Base { <nl> + public : <nl> + void run ( ) { <nl> + QueryPlan p ( FBS ( BSON ( " a " < < " r " < < " b " < < NE < < " q " ) ) , BSON ( " a " < < 1 ) , INDEX ( " a " < < 1 ) ) ; <nl> + ASSERT ( ! p . exactKeyMatch ( ) ) ; <nl> + } <nl> + } ; <nl> + <nl> class ExactKeyQueryTypes : public Base { <nl> public : <nl> void run ( ) { <nl> namespace QueryOptimizerTests { <nl> add < QueryPlanTests : : Optimal > ( ) ; <nl> add < QueryPlanTests : : MoreOptimal > ( ) ; <nl> add < QueryPlanTests : : KeyMatch > ( ) ; <nl> + add < QueryPlanTests : : MoreKeyMatch > ( ) ; <nl> add < QueryPlanTests : : ExactKeyQueryTypes > ( ) ; <nl> add < QueryPlanTests : : Unhelpful > ( ) ; <nl> add < QueryPlanSetTests : : NoIndexes > ( ) ; <nl> mmm a / jstests / count . js <nl> ppp b / jstests / count . js <nl> t . save ( { a : true , b : false } ) ; <nl> t . ensureIndex ( { b : 1 , a : 1 , c : 1 } ) ; <nl> assert . eq ( 1 , t . find ( { a : true , b : false } ) . count ( ) ) ; <nl> assert . eq ( 1 , t . find ( { b : false , a : true } ) . count ( ) ) ; <nl> + <nl>
include query fields generating trivial bounds in exact key match check
mongodb/mongo
5700a5040d524d1a1930747b2940cef1d7562bcb
2009-05-13T22:09:25Z
mmm a / js / server / modules / org / arangodb / foxx / request_context . js <nl> ppp b / js / server / modules / org / arangodb / foxx / request_context . js <nl> function validateOrThrow ( raw , schema , allowInvalid ) { <nl> } <nl> var result = joi . validate ( raw , schema ) ; <nl> if ( result . error & & ! allowInvalid ) { <nl> - throw new BadRequest ( result . error . message ) ; <nl> + throw new BadRequest ( result . error . message . replace ( / ^ " value " / , ' Request body ' ) ) ; <nl> } <nl> return result . value ; <nl> } <nl> extend ( RequestContext . prototype , { <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> / / / @ startDocuBlock JSF_foxx_RequestContext_notes <nl> / / / <nl> - / / / ` FoxxController # notes ( description ) ` <nl> + / / / ` FoxxController # notes ( . . . description ) ` <nl> / / / <nl> / / / Set the notes for this route in the documentation <nl> / / / @ endDocuBlock <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> <nl> - notes : function ( notes ) { <nl> + notes : function ( ) { <nl> + var notes = Array . prototype . join . call ( arguments , ' \ n ' ) ; <nl> this . docs . addNotes ( notes ) ; <nl> return this ; <nl> } , <nl> mmm a / js / server / modules / org / arangodb / foxx / templates / controller . js . tmpl <nl> ppp b / js / server / modules / org / arangodb / foxx / templates / controller . js . tmpl <nl> var Foxx = require ( ' org / arangodb / foxx ' ) ; <nl> var ArangoError = require ( ' org / arangodb ' ) . ArangoError ; <nl> var < % = repository % > = require ( ' < % = repositoryPath % > ' ) ; <nl> var < % = model % > = require ( ' < % = modelPath % > ' ) ; <nl> + var controller = new Foxx . Controller ( applicationContext ) ; <nl> <nl> var < % = modelInstance % > IdSchema = joi . string ( ) . required ( ) <nl> . description ( ' The id of the < % = modelInstance % > ' ) <nl> . meta ( { allowMultiple : false } ) ; <nl> <nl> - var controller = new Foxx . Controller ( applicationContext ) ; <nl> - <nl> var < % = repositoryInstance % > = new < % = repository % > ( <nl> applicationContext . collection ( ' < % = collectionName % > ' ) , <nl> { model : < % = model % > } <nl> ) ; <nl> <nl> - / * * Lists of all < % = collectionName % > . <nl> - * <nl> - * This function simply returns the list of all < % = model % > . <nl> - * / <nl> + <nl> controller . get ( ' / ' , function ( req , res ) { <nl> res . json ( _ . map ( < % = repositoryInstance % > . all ( ) , function ( model ) { <nl> return model . forClient ( ) ; <nl> } ) ) ; <nl> - } ) ; <nl> + } ) <nl> + . summary ( ' Lists of all < % = collectionName % > . ' ) <nl> + . notes ( ' This function simply returns the list of all < % = model % > . ' ) ; <nl> + <nl> <nl> - / * * Creates a new < % = modelInstance % > . <nl> - * <nl> - * Creates a new < % = modelInstance % > . The information has to be in the <nl> - * requestBody . <nl> - * / <nl> controller . post ( ' / ' , function ( req , res ) { <nl> var < % = modelInstance % > = req . parameters . < % = modelInstance % > ; <nl> res . json ( < % = repositoryInstance % > . save ( < % = modelInstance % > ) . forClient ( ) ) ; <nl> } ) <nl> + . summary ( ' Creates a new < % = modelInstance % > . ' ) <nl> + . notes ( <nl> + ' Creates a new < % = modelInstance % > . ' , <nl> + ' The information has to be in the requestBody . ' <nl> + ) <nl> . bodyParam ( ' < % = modelInstance % > ' , { <nl> description : ' The < % = modelInstance % > you want to create ' , <nl> type : < % = model % > <nl> } ) ; <nl> <nl> - / * * Reads a < % = modelInstance % > . <nl> - * <nl> - * Reads a < % = modelInstance % > . <nl> - * / <nl> + <nl> controller . get ( ' / : id ' , function ( req , res ) { <nl> var id = req . urlParameters . id ; <nl> res . json ( < % = repositoryInstance % > . byId ( id ) . forClient ( ) ) ; <nl> } ) <nl> + . summary ( ' Reads a < % = modelInstance % > . ' ) <nl> . pathParam ( ' id ' , < % = modelInstance % > IdSchema ) <nl> . errorResponse ( ArangoError , 404 , ' The < % = modelInstance % > could not be found ' ) ; <nl> <nl> - / * * Replaces a < % = modelInstance % > . <nl> - * <nl> - * Changes a < % = modelInstance % > . The information has to be in the <nl> - * requestBody . <nl> - * / <nl> + <nl> controller . put ( ' / : id ' , function ( req , res ) { <nl> var id = req . urlParameters . id ; <nl> var < % = modelInstance % > = req . parameters . < % = modelInstance % > ; <nl> - res . json ( < % = repositoryInstance % > . replaceById ( id , < % = modelInstance % > ) . forClient ( ) ) ; <nl> + res . json ( < % = repositoryInstance % > . replaceById ( id , < % = modelInstance % > ) ) ; <nl> } ) <nl> + . summary ( ' Replaces a < % = modelInstance % > . ' ) <nl> + . notes ( <nl> + ' Changes a < % = modelInstance % > . ' , <nl> + ' The information has to be in the requestBody . ' <nl> + ) <nl> . pathParam ( ' id ' , < % = modelInstance % > IdSchema ) <nl> . bodyParam ( ' < % = modelInstance % > ' , { <nl> description : ' The < % = modelInstance % > you want your old one to be replaced with ' , <nl> controller . put ( ' / : id ' , function ( req , res ) { <nl> } ) <nl> . errorResponse ( ArangoError , 404 , ' The < % = modelInstance % > could not be found ' ) ; <nl> <nl> - / * * Updates a < % = modelInstance % > . <nl> - * <nl> - * Changes a < % = modelInstance % > . The information has to be in the <nl> - * requestBody . <nl> - * / <nl> + <nl> controller . patch ( ' / : id ' , function ( req , res ) { <nl> var id = req . urlParameters . id ; <nl> var patchData = req . parameters . patch ; <nl> - res . json ( < % = repositoryInstance % > . updateById ( id , patchData ) . forClient ( ) ) ; <nl> + res . json ( < % = repositoryInstance % > . updateById ( id , patchData ) ) ; <nl> } ) <nl> + . summary ( ' Updates a < % = modelInstance % > . ' ) <nl> + . notes ( <nl> + ' Changes a < % = modelInstance % > . ' , <nl> + ' The information has to be in the requestBody . ' <nl> + ) <nl> . pathParam ( ' id ' , < % = modelInstance % > IdSchema ) <nl> . bodyParam ( ' patch ' , { <nl> description : ' The patch data you want your < % = modelInstance % > to be updated with ' , <nl> controller . patch ( ' / : id ' , function ( req , res ) { <nl> } ) <nl> . errorResponse ( ArangoError , 404 , ' The < % = modelInstance % > could not be found ' ) ; <nl> <nl> - / * * Removes a < % = modelInstance % > . <nl> - * <nl> - * Removes a < % = modelInstance % > . <nl> - * / <nl> + <nl> controller . delete ( ' / : id ' , function ( req , res ) { <nl> var id = req . urlParameters . id ; <nl> < % = repositoryInstance % > . removeById ( id ) ; <nl> res . json ( { success : true } ) ; <nl> } ) <nl> + . summary ( ' Removes a < % = modelInstance % > . ' ) <nl> . pathParam ( ' id ' , < % = modelInstance % > IdSchema ) <nl> . errorResponse ( ArangoError , 404 , ' The < % = modelInstance % > could not be found ' ) ; <nl> mmm a / js / server / modules / org / arangodb / foxx / templates / setup . js . tmpl <nl> ppp b / js / server / modules / org / arangodb / foxx / templates / setup . js . tmpl <nl> <nl> ' use strict ' ; <nl> - var console = require ( " console " ) ; <nl> var db = require ( " org / arangodb " ) . db ; <nl> <nl> function createCollection ( name ) { <nl> mmm a / js / server / modules / org / arangodb / foxx / templates / teardown . js . tmpl <nl> ppp b / js / server / modules / org / arangodb / foxx / templates / teardown . js . tmpl <nl> <nl> ' use strict ' ; <nl> - var console = require ( " console " ) ; <nl> var db = require ( " org / arangodb " ) . db ; <nl> <nl> function dropCollection ( name ) { <nl>
Misc Foxx fixes .
arangodb/arangodb
67c43abf0c59d5bcf9dfc3b952ea810c8cafac5d
2015-06-17T15:07:17Z
mmm a / samples / Cpp / TestCpp / Classes / ExtensionsTest / CocoStudioArmatureTest / ArmatureScene . cpp <nl> ppp b / samples / Cpp / TestCpp / Classes / ExtensionsTest / CocoStudioArmatureTest / ArmatureScene . cpp <nl> void TestColliderDetector : : onEnter ( ) <nl> addChild ( armature2 ) ; <nl> <nl> # if ENABLE_PHYSICS_BOX2D_DETECT | | ENABLE_PHYSICS_CHIPMUNK_DETECT <nl> - bullet = PhysicsSprite : : createWithSpriteFrameName ( " 25 . png " ) ; <nl> + bullet = cocos2d : : extension : : PhysicsSprite : : createWithSpriteFrameName ( " 25 . png " ) ; <nl> # elif ENABLE_PHYSICS_SAVE_CALCULATED_VERTEX <nl> bullet = Sprite : : createWithSpriteFrameName ( " 25 . png " ) ; <nl> # endif <nl>
fixed create PhysicsSprite
cocos2d/cocos2d-x
7e96701ef05a2545c78e250010705d0043079652
2013-12-06T06:25:08Z
mmm a / stdlib / public / core / Sequence . swift <nl> ppp b / stdlib / public / core / Sequence . swift <nl> <nl> / / / } <nl> / / / } <nl> / / / print ( longestAnimal ) <nl> - / / / / / Prints " Butterfly " <nl> + / / / / / Prints Optional ( " Butterfly " ) <nl> / / / <nl> / / / Using Multiple Iterators <nl> / / / = = = = = = = = = = = = = = = = = = = = = = = = <nl>
Merge remote - tracking branch ' origin / master ' into master - next
apple/swift
17c52da9b298a574bb37c724ef80688aa1a23e10
2020-06-22T19:58:33Z
mmm a / include / rocksdb / env . h <nl> ppp b / include / rocksdb / env . h <nl> const size_t kDefaultPageSize = 4 * 1024 ; <nl> / / Options while opening a file to read / write <nl> struct EnvOptions { <nl> <nl> - / / construct with default Options <nl> + / / Construct with default Options <nl> EnvOptions ( ) ; <nl> <nl> - / / construct from Options <nl> + / / Construct from Options <nl> explicit EnvOptions ( const DBOptions & options ) ; <nl> <nl> / / If true , then use mmap to read data <nl> struct EnvOptions { <nl> / / WAL writes <nl> bool fallocate_with_keep_size = true ; <nl> <nl> - / / See DBOPtions doc <nl> + / / See DBOptions doc <nl> size_t compaction_readahead_size ; <nl> <nl> - / / See DBOPtions doc <nl> + / / See DBOptions doc <nl> size_t random_access_max_buffer_size ; <nl> <nl> / / See DBOptions doc <nl> mmm a / include / rocksdb / sst_file_writer . h <nl> ppp b / include / rocksdb / sst_file_writer . h <nl> <nl> # ifndef ROCKSDB_LITE <nl> <nl> # pragma once <nl> + <nl> + # include < memory > <nl> # include < string > <nl> + <nl> # include " rocksdb / env . h " <nl> # include " rocksdb / options . h " <nl> # include " rocksdb / table_properties . h " <nl> namespace rocksdb { <nl> class Comparator ; <nl> <nl> / / ExternalSstFileInfo include information about sst files created <nl> - / / using SstFileWriter <nl> + / / using SstFileWriter . <nl> struct ExternalSstFileInfo { <nl> ExternalSstFileInfo ( ) { } <nl> ExternalSstFileInfo ( const std : : string & _file_path , <nl> struct ExternalSstFileInfo { <nl> } ; <nl> <nl> / / SstFileWriter is used to create sst files that can be added to database later <nl> - / / All keys in files generated by SstFileWriter will have sequence number = 0 <nl> + / / All keys in files generated by SstFileWriter will have sequence number = 0 . <nl> class SstFileWriter { <nl> public : <nl> / / User can pass ` column_family ` to specify that the the generated file will <nl> / / be ingested into this column_family , note that passing nullptr means that <nl> / / the column_family is unknown . <nl> / / If invalidate_page_cache is set to true , SstFileWriter will give the OS a <nl> - / / hint that this file pages is not needed everytime we write 1MB to the file <nl> + / / hint that this file pages is not needed everytime we write 1MB to the file . <nl> + / / To use the rate limiter an io_priority smaller than IO_TOTAL can be passed . <nl> SstFileWriter ( const EnvOptions & env_options , const Options & options , <nl> ColumnFamilyHandle * column_family = nullptr , <nl> - bool invalidate_page_cache = true ) <nl> + bool invalidate_page_cache = true , <nl> + Env : : IOPriority io_priority = Env : : IOPriority : : IO_TOTAL ) <nl> : SstFileWriter ( env_options , options , options . comparator , column_family , <nl> - invalidate_page_cache ) { } <nl> + invalidate_page_cache , io_priority ) { } <nl> <nl> / / Deprecated API <nl> SstFileWriter ( const EnvOptions & env_options , const Options & options , <nl> const Comparator * user_comparator , <nl> ColumnFamilyHandle * column_family = nullptr , <nl> - bool invalidate_page_cache = true ) ; <nl> + bool invalidate_page_cache = true , <nl> + Env : : IOPriority io_priority = Env : : IOPriority : : IO_TOTAL ) ; <nl> <nl> ~ SstFileWriter ( ) ; <nl> <nl> class SstFileWriter { <nl> / / Finalize writing to sst file and close file . <nl> / / <nl> / / An optional ExternalSstFileInfo pointer can be passed to the function <nl> - / / which will be populated with information about the created sst file <nl> + / / which will be populated with information about the created sst file . <nl> Status Finish ( ExternalSstFileInfo * file_info = nullptr ) ; <nl> <nl> / / Return the current file size . <nl> class SstFileWriter { <nl> void InvalidatePageCache ( bool closing ) ; <nl> <nl> struct Rep ; <nl> - Rep * rep_ ; <nl> + std : : unique_ptr < Rep > rep_ ; <nl> } ; <nl> } / / namespace rocksdb <nl> <nl> mmm a / table / sst_file_writer . cc <nl> ppp b / table / sst_file_writer . cc <nl> const size_t kFadviseTrigger = 1024 * 1024 ; / / 1MB <nl> <nl> struct SstFileWriter : : Rep { <nl> Rep ( const EnvOptions & _env_options , const Options & options , <nl> - const Comparator * _user_comparator , ColumnFamilyHandle * _cfh , <nl> - bool _invalidate_page_cache ) <nl> + Env : : IOPriority _io_priority , const Comparator * _user_comparator , <nl> + ColumnFamilyHandle * _cfh , bool _invalidate_page_cache ) <nl> : env_options ( _env_options ) , <nl> ioptions ( options ) , <nl> mutable_cf_options ( options ) , <nl> + io_priority ( _io_priority ) , <nl> internal_comparator ( _user_comparator ) , <nl> cfh ( _cfh ) , <nl> invalidate_page_cache ( _invalidate_page_cache ) , <nl> struct SstFileWriter : : Rep { <nl> EnvOptions env_options ; <nl> ImmutableCFOptions ioptions ; <nl> MutableCFOptions mutable_cf_options ; <nl> + Env : : IOPriority io_priority ; <nl> InternalKeyComparator internal_comparator ; <nl> ExternalSstFileInfo file_info ; <nl> InternalKey ikey ; <nl> std : : string column_family_name ; <nl> ColumnFamilyHandle * cfh ; <nl> / / If true , We will give the OS a hint that this file pages is not needed <nl> - / / everytime we write 1MB to the file <nl> + / / everytime we write 1MB to the file . <nl> bool invalidate_page_cache ; <nl> - / / the size of the file during the last time we called Fadvise to remove <nl> + / / The size of the file during the last time we called Fadvise to remove <nl> / / cached pages from page cache . <nl> uint64_t last_fadvise_size ; <nl> } ; <nl> SstFileWriter : : SstFileWriter ( const EnvOptions & env_options , <nl> const Options & options , <nl> const Comparator * user_comparator , <nl> ColumnFamilyHandle * column_family , <nl> - bool invalidate_page_cache ) <nl> - : rep_ ( new Rep ( env_options , options , user_comparator , column_family , <nl> - invalidate_page_cache ) ) { <nl> + bool invalidate_page_cache , <nl> + Env : : IOPriority io_priority ) <nl> + : rep_ ( new Rep ( env_options , options , io_priority , user_comparator , <nl> + column_family , invalidate_page_cache ) ) { <nl> rep_ - > file_info . file_size = 0 ; <nl> } <nl> <nl> SstFileWriter : : ~ SstFileWriter ( ) { <nl> / / abandon the builder . <nl> rep_ - > builder - > Abandon ( ) ; <nl> } <nl> - <nl> - delete rep_ ; <nl> } <nl> <nl> Status SstFileWriter : : Open ( const std : : string & file_path ) { <nl> - Rep * r = rep_ ; <nl> + Rep * r = rep_ . get ( ) ; <nl> Status s ; <nl> std : : unique_ptr < WritableFile > sst_file ; <nl> s = r - > ioptions . env - > NewWritableFile ( file_path , & sst_file , r - > env_options ) ; <nl> Status SstFileWriter : : Open ( const std : : string & file_path ) { <nl> return s ; <nl> } <nl> <nl> + sst_file - > SetIOPriority ( r - > io_priority ) ; <nl> + <nl> CompressionType compression_type ; <nl> if ( r - > ioptions . bottommost_compression ! = kDisableCompressionOption ) { <nl> compression_type = r - > ioptions . bottommost_compression ; <nl> Status SstFileWriter : : Open ( const std : : string & file_path ) { <nl> } <nl> <nl> Status SstFileWriter : : Add ( const Slice & user_key , const Slice & value ) { <nl> - Rep * r = rep_ ; <nl> + Rep * r = rep_ . get ( ) ; <nl> if ( ! r - > builder ) { <nl> return Status : : InvalidArgument ( " File is not opened " ) ; <nl> } <nl> Status SstFileWriter : : Add ( const Slice & user_key , const Slice & value ) { <nl> ValueType : : kTypeValue / * Put * / ) ; <nl> r - > builder - > Add ( r - > ikey . Encode ( ) , value ) ; <nl> <nl> - / / update file info <nl> + / / Update file info <nl> r - > file_info . num_entries + + ; <nl> r - > file_info . largest_key . assign ( user_key . data ( ) , user_key . size ( ) ) ; <nl> r - > file_info . file_size = r - > builder - > FileSize ( ) ; <nl> Status SstFileWriter : : Add ( const Slice & user_key , const Slice & value ) { <nl> } <nl> <nl> Status SstFileWriter : : Finish ( ExternalSstFileInfo * file_info ) { <nl> - Rep * r = rep_ ; <nl> + Rep * r = rep_ . get ( ) ; <nl> if ( ! r - > builder ) { <nl> return Status : : InvalidArgument ( " File is not opened " ) ; <nl> } <nl> Status SstFileWriter : : Finish ( ExternalSstFileInfo * file_info ) { <nl> } <nl> <nl> void SstFileWriter : : InvalidatePageCache ( bool closing ) { <nl> - Rep * r = rep_ ; <nl> + Rep * r = rep_ . get ( ) ; <nl> if ( r - > invalidate_page_cache = = false ) { <nl> / / Fadvise disabled <nl> return ; <nl>
Allow SstFileWriter to use the rate limiter
facebook/rocksdb
69ec8356b2bd1550fcb4ac53f65564624691764d
2017-05-23T18:42:09Z
mmm a / src / citra / config . cpp <nl> ppp b / src / citra / config . cpp <nl> static const std : : array < int , Settings : : NativeInput : : NUM_INPUTS > defaults = { <nl> <nl> / / indirectly mapped keys <nl> SDL_SCANCODE_UP , SDL_SCANCODE_DOWN , SDL_SCANCODE_LEFT , SDL_SCANCODE_RIGHT , <nl> + SDL_SCANCODE_D , <nl> } ; <nl> <nl> void Config : : ReadValues ( ) { <nl> void Config : : ReadValues ( ) { <nl> Settings : : values . input_mappings [ Settings : : NativeInput : : All [ i ] ] = <nl> sdl2_config - > GetInteger ( " Controls " , Settings : : NativeInput : : Mapping [ i ] , defaults [ i ] ) ; <nl> } <nl> + Settings : : values . pad_circle_modifier_scale = ( float ) sdl2_config - > GetReal ( " Controls " , " pad_circle_modifier_scale " , 0 . 5 ) ; <nl> <nl> / / Core <nl> Settings : : values . frame_skip = sdl2_config - > GetInteger ( " Core " , " frame_skip " , 0 ) ; <nl> mmm a / src / citra / default_ini . h <nl> ppp b / src / citra / default_ini . h <nl> pad_circle_up = <nl> pad_circle_down = <nl> pad_circle_left = <nl> pad_circle_right = <nl> + pad_circle_modifier = <nl> + <nl> + # The applied modifier scale to circle pad . <nl> + # Must be in range of 0 . 0 - 1 . 0 . Defaults to 0 . 5 <nl> + pad_circle_modifier_scale = <nl> <nl> [ Core ] <nl> # The applied frameskip amount . Must be a power of two . <nl> mmm a / src / citra_qt / config . cpp <nl> ppp b / src / citra_qt / config . cpp <nl> static const std : : array < QVariant , Settings : : NativeInput : : NUM_INPUTS > defaults = <nl> <nl> / / indirectly mapped keys <nl> Qt : : Key_Up , Qt : : Key_Down , Qt : : Key_Left , Qt : : Key_Right , <nl> + Qt : : Key_D , <nl> } ; <nl> <nl> void Config : : ReadValues ( ) { <nl> void Config : : ReadValues ( ) { <nl> Settings : : values . input_mappings [ Settings : : NativeInput : : All [ i ] ] = <nl> qt_config - > value ( QString : : fromStdString ( Settings : : NativeInput : : Mapping [ i ] ) , defaults [ i ] ) . toInt ( ) ; <nl> } <nl> + Settings : : values . pad_circle_modifier_scale = qt_config - > value ( " pad_circle_modifier_scale " , 0 . 5 ) . toFloat ( ) ; <nl> qt_config - > endGroup ( ) ; <nl> <nl> qt_config - > beginGroup ( " Core " ) ; <nl> void Config : : SaveValues ( ) { <nl> qt_config - > setValue ( QString : : fromStdString ( Settings : : NativeInput : : Mapping [ i ] ) , <nl> Settings : : values . input_mappings [ Settings : : NativeInput : : All [ i ] ] ) ; <nl> } <nl> + qt_config - > setValue ( " pad_circle_modifier_scale " , ( double ) Settings : : values . pad_circle_modifier_scale ) ; <nl> qt_config - > endGroup ( ) ; <nl> <nl> qt_config - > beginGroup ( " Core " ) ; <nl> mmm a / src / common / key_map . cpp <nl> ppp b / src / common / key_map . cpp <nl> const std : : array < KeyTarget , Settings : : NativeInput : : NUM_INPUTS > mapping_targets = <nl> IndirectTarget : : CIRCLE_PAD_DOWN , <nl> IndirectTarget : : CIRCLE_PAD_LEFT , <nl> IndirectTarget : : CIRCLE_PAD_RIGHT , <nl> + IndirectTarget : : CIRCLE_PAD_MODIFIER , <nl> } } ; <nl> <nl> static std : : map < HostDeviceKey , KeyTarget > key_map ; <nl> static int next_device_id = 0 ; <nl> <nl> - static bool circle_pad_up = false , circle_pad_down = false , circle_pad_left = false , circle_pad_right = false ; <nl> + static bool circle_pad_up = false ; <nl> + static bool circle_pad_down = false ; <nl> + static bool circle_pad_left = false ; <nl> + static bool circle_pad_right = false ; <nl> + static bool circle_pad_modifier = false ; <nl> <nl> static void UpdateCirclePad ( EmuWindow & emu_window ) { <nl> constexpr float SQRT_HALF = 0 . 707106781 ; <nl> static void UpdateCirclePad ( EmuWindow & emu_window ) { <nl> + + y ; <nl> if ( circle_pad_down ) <nl> - - y ; <nl> - / / TODO : apply modifier here <nl> - emu_window . CirclePadUpdated ( x * ( y = = 0 ? 1 . 0 : SQRT_HALF ) , y * ( x = = 0 ? 1 . 0 : SQRT_HALF ) ) ; <nl> + <nl> + float modifier = circle_pad_modifier ? Settings : : values . pad_circle_modifier_scale : 1 . 0 ; <nl> + emu_window . CirclePadUpdated ( x * modifier * ( y = = 0 ? 1 . 0 : SQRT_HALF ) , y * modifier * ( x = = 0 ? 1 . 0 : SQRT_HALF ) ) ; <nl> } <nl> <nl> int NewDeviceId ( ) { <nl> void PressKey ( EmuWindow & emu_window , HostDeviceKey key ) { <nl> circle_pad_right = true ; <nl> UpdateCirclePad ( emu_window ) ; <nl> break ; <nl> + case IndirectTarget : : CIRCLE_PAD_MODIFIER : <nl> + circle_pad_modifier = true ; <nl> + UpdateCirclePad ( emu_window ) ; <nl> + break ; <nl> } <nl> } <nl> } <nl> void ReleaseKey ( EmuWindow & emu_window , HostDeviceKey key ) { <nl> circle_pad_right = false ; <nl> UpdateCirclePad ( emu_window ) ; <nl> break ; <nl> + case IndirectTarget : : CIRCLE_PAD_MODIFIER : <nl> + circle_pad_modifier = false ; <nl> + UpdateCirclePad ( emu_window ) ; <nl> + break ; <nl> } <nl> } <nl> } <nl> mmm a / src / common / key_map . h <nl> ppp b / src / common / key_map . h <nl> class EmuWindow ; <nl> namespace KeyMap { <nl> <nl> enum class IndirectTarget { <nl> - CIRCLE_PAD_UP , CIRCLE_PAD_DOWN , CIRCLE_PAD_LEFT , CIRCLE_PAD_RIGHT , <nl> + CIRCLE_PAD_UP , <nl> + CIRCLE_PAD_DOWN , <nl> + CIRCLE_PAD_LEFT , <nl> + CIRCLE_PAD_RIGHT , <nl> + CIRCLE_PAD_MODIFIER , <nl> } ; <nl> <nl> / * * <nl> mmm a / src / core / settings . h <nl> ppp b / src / core / settings . h <nl> enum Values { <nl> <nl> / / indirectly mapped keys <nl> CIRCLE_UP , CIRCLE_DOWN , CIRCLE_LEFT , CIRCLE_RIGHT , <nl> + CIRCLE_MODIFIER , <nl> <nl> NUM_INPUTS <nl> } ; <nl> static const std : : array < const char * , NUM_INPUTS > Mapping = { { <nl> " pad_cup " , " pad_cdown " , " pad_cleft " , " pad_cright " , <nl> <nl> / / indirectly mapped keys <nl> - " pad_circle_up " , " pad_circle_down " , " pad_circle_left " , " pad_circle_right " <nl> + " pad_circle_up " , " pad_circle_down " , " pad_circle_left " , " pad_circle_right " , <nl> + " pad_circle_modifier " , <nl> } } ; <nl> static const std : : array < Values , NUM_INPUTS > All = { { <nl> A , B , X , Y , <nl> static const std : : array < Values , NUM_INPUTS > All = { { <nl> DUP , DDOWN , DLEFT , DRIGHT , <nl> CUP , CDOWN , CLEFT , CRIGHT , <nl> CIRCLE_UP , CIRCLE_DOWN , CIRCLE_LEFT , CIRCLE_RIGHT , <nl> + CIRCLE_MODIFIER , <nl> } } ; <nl> } <nl> <nl> static const std : : array < Values , NUM_INPUTS > All = { { <nl> struct Values { <nl> / / Controls <nl> std : : array < int , NativeInput : : NUM_INPUTS > input_mappings ; <nl> + float pad_circle_modifier_scale ; <nl> <nl> / / Core <nl> int frame_skip ; <nl>
implement circle pad modifier
yuzu-emu/yuzu
416faa20d1156ac4e8646710e9c1f9565c0ed14b
2016-05-15T10:24:22Z
mmm a / src / buffer_cache / mirrored / mirrored . cc <nl> ppp b / src / buffer_cache / mirrored / mirrored . cc <nl> void mc_buf_t : : acquire_block ( mc_inner_buf_t : : version_id_t version_to_access ) { <nl> case rwi_read : { <nl> if ( snapshotted ) { <nl> rassert ( version_to_access = = mc_inner_buf_t : : faux_version_id | | inner_buf - > version_id < = version_to_access ) ; <nl> - / / FIXME : need to decrement in deconstructor ! <nl> + + inner_buf - > snap_refcount ; <nl> } <nl> data = inner_buf - > data ; <nl>
Removed the FIXME about decrementing in deconstructor .
rethinkdb/rethinkdb
6de59535602eb258bb9cdd78aa1c67d90aa07ff8
2011-08-31T00:13:48Z
mmm a / src / log . cc <nl> ppp b / src / log . cc <nl> Logger : : ~ Logger ( ) { <nl> delete log_ ; <nl> } <nl> <nl> - void Logger : : AddCodeEventListener ( CodeEventListener * listener ) { <nl> + void Logger : : addCodeEventListener ( CodeEventListener * listener ) { <nl> bool result = isolate_ - > code_event_dispatcher ( ) - > AddListener ( listener ) ; <nl> - CHECK ( result ) ; <nl> + USE ( result ) ; <nl> + DCHECK ( result ) ; <nl> } <nl> <nl> - void Logger : : RemoveCodeEventListener ( CodeEventListener * listener ) { <nl> + void Logger : : removeCodeEventListener ( CodeEventListener * listener ) { <nl> isolate_ - > code_event_dispatcher ( ) - > RemoveListener ( listener ) ; <nl> } <nl> <nl> void Logger : : StopProfiler ( ) { <nl> if ( profiler_ ! = nullptr ) { <nl> profiler_ - > Pause ( ) ; <nl> is_logging_ = false ; <nl> - RemoveCodeEventListener ( this ) ; <nl> + removeCodeEventListener ( this ) ; <nl> } <nl> } <nl> <nl> bool Logger : : SetUp ( Isolate * isolate ) { <nl> <nl> if ( FLAG_perf_basic_prof ) { <nl> perf_basic_logger_ = new PerfBasicLogger ( ) ; <nl> - AddCodeEventListener ( perf_basic_logger_ ) ; <nl> + addCodeEventListener ( perf_basic_logger_ ) ; <nl> } <nl> <nl> if ( FLAG_perf_prof ) { <nl> perf_jit_logger_ = new PerfJitLogger ( ) ; <nl> - AddCodeEventListener ( perf_jit_logger_ ) ; <nl> + addCodeEventListener ( perf_jit_logger_ ) ; <nl> } <nl> <nl> if ( FLAG_ll_prof ) { <nl> ll_logger_ = new LowLevelLogger ( log_file_name . str ( ) . c_str ( ) ) ; <nl> - AddCodeEventListener ( ll_logger_ ) ; <nl> + addCodeEventListener ( ll_logger_ ) ; <nl> } <nl> <nl> ticker_ = new Ticker ( isolate , FLAG_prof_sampling_interval ) ; <nl> bool Logger : : SetUp ( Isolate * isolate ) { <nl> profiler_ - > Engage ( ) ; <nl> } <nl> <nl> + profiler_listener_ . reset ( ) ; <nl> + <nl> if ( is_logging_ ) { <nl> - AddCodeEventListener ( this ) ; <nl> + addCodeEventListener ( this ) ; <nl> } <nl> <nl> return true ; <nl> bool Logger : : SetUp ( Isolate * isolate ) { <nl> void Logger : : SetCodeEventHandler ( uint32_t options , <nl> JitCodeEventHandler event_handler ) { <nl> if ( jit_logger_ ) { <nl> - RemoveCodeEventListener ( jit_logger_ ) ; <nl> - delete jit_logger_ ; <nl> - jit_logger_ = nullptr ; <nl> + removeCodeEventListener ( jit_logger_ ) ; <nl> + delete jit_logger_ ; <nl> + jit_logger_ = nullptr ; <nl> } <nl> <nl> if ( event_handler ) { <nl> jit_logger_ = new JitLogger ( event_handler ) ; <nl> - AddCodeEventListener ( jit_logger_ ) ; <nl> + addCodeEventListener ( jit_logger_ ) ; <nl> if ( options & kJitCodeEventEnumExisting ) { <nl> HandleScope scope ( isolate_ ) ; <nl> LogCodeObjects ( ) ; <nl> void Logger : : SetCodeEventHandler ( uint32_t options , <nl> } <nl> } <nl> <nl> - ProfilerListener * Logger : : EnsureProfilerListener ( ) { <nl> - CHECK ( is_initialized_ ) ; <nl> - if ( ! profiler_listener_ ) <nl> + void Logger : : SetUpProfilerListener ( ) { <nl> + if ( ! is_initialized_ ) return ; <nl> + if ( profiler_listener_ . get ( ) = = nullptr ) { <nl> profiler_listener_ . reset ( new ProfilerListener ( isolate_ ) ) ; <nl> - return profiler_listener_ . get ( ) ; <nl> + } <nl> + addCodeEventListener ( profiler_listener_ . get ( ) ) ; <nl> + } <nl> + <nl> + void Logger : : TearDownProfilerListener ( ) { <nl> + if ( profiler_listener_ - > HasObservers ( ) ) return ; <nl> + removeCodeEventListener ( profiler_listener_ . get ( ) ) ; <nl> } <nl> <nl> sampler : : Sampler * Logger : : sampler ( ) { <nl> FILE * Logger : : TearDown ( ) { <nl> ticker_ = nullptr ; <nl> <nl> if ( perf_basic_logger_ ) { <nl> - RemoveCodeEventListener ( perf_basic_logger_ ) ; <nl> + removeCodeEventListener ( perf_basic_logger_ ) ; <nl> delete perf_basic_logger_ ; <nl> perf_basic_logger_ = nullptr ; <nl> } <nl> <nl> if ( perf_jit_logger_ ) { <nl> - RemoveCodeEventListener ( perf_jit_logger_ ) ; <nl> + removeCodeEventListener ( perf_jit_logger_ ) ; <nl> delete perf_jit_logger_ ; <nl> perf_jit_logger_ = nullptr ; <nl> } <nl> <nl> if ( ll_logger_ ) { <nl> - RemoveCodeEventListener ( ll_logger_ ) ; <nl> + removeCodeEventListener ( ll_logger_ ) ; <nl> delete ll_logger_ ; <nl> ll_logger_ = nullptr ; <nl> } <nl> <nl> if ( jit_logger_ ) { <nl> - RemoveCodeEventListener ( jit_logger_ ) ; <nl> + removeCodeEventListener ( jit_logger_ ) ; <nl> delete jit_logger_ ; <nl> jit_logger_ = nullptr ; <nl> } <nl> <nl> if ( profiler_listener_ . get ( ) ! = nullptr ) { <nl> - RemoveCodeEventListener ( profiler_listener_ . get ( ) ) ; <nl> + removeCodeEventListener ( profiler_listener_ . get ( ) ) ; <nl> } <nl> <nl> return log_ - > Close ( ) ; <nl> mmm a / src / log . h <nl> ppp b / src / log . h <nl> class Logger : public CodeEventListener { <nl> void SetCodeEventHandler ( uint32_t options , <nl> JitCodeEventHandler event_handler ) ; <nl> <nl> + / / Sets up ProfilerListener . <nl> + void SetUpProfilerListener ( ) ; <nl> + <nl> + / / Tear down ProfilerListener if it has no observers . <nl> + void TearDownProfilerListener ( ) ; <nl> + <nl> sampler : : Sampler * sampler ( ) ; <nl> <nl> - ProfilerListener * EnsureProfilerListener ( ) ; <nl> + ProfilerListener * profiler_listener ( ) { return profiler_listener_ . get ( ) ; } <nl> <nl> / / Frees resources acquired in SetUp . <nl> / / When a temporary file is used for the log , returns its stream descriptor , <nl> class Logger : public CodeEventListener { <nl> void ApiEntryCall ( const char * name ) ; <nl> <nl> / / = = = = Events logged by - - log - code . = = = = <nl> - void AddCodeEventListener ( CodeEventListener * listener ) ; <nl> - void RemoveCodeEventListener ( CodeEventListener * listener ) ; <nl> + void addCodeEventListener ( CodeEventListener * listener ) ; <nl> + void removeCodeEventListener ( CodeEventListener * listener ) ; <nl> <nl> / / Emits a code event for a callback function . <nl> void CallbackEvent ( Name * name , Address entry_point ) ; <nl> mmm a / src / profiler / cpu - profiler . cc <nl> ppp b / src / profiler / cpu - profiler . cc <nl> void CpuProfiler : : StartProcessorIfNotStarted ( ) { <nl> processor_ . reset ( new ProfilerEventsProcessor ( isolate_ , generator_ . get ( ) , <nl> sampling_interval_ ) ) ; <nl> CreateEntriesForRuntimeCallStats ( ) ; <nl> - logger - > EnsureProfilerListener ( ) - > AddObserver ( this ) ; <nl> + logger - > SetUpProfilerListener ( ) ; <nl> + ProfilerListener * profiler_listener = logger - > profiler_listener ( ) ; <nl> + profiler_listener - > AddObserver ( this ) ; <nl> is_profiling_ = true ; <nl> isolate_ - > set_is_profiling ( true ) ; <nl> / / Enumerate stuff we already have in the heap . <nl> void CpuProfiler : : StopProcessor ( ) { <nl> Logger * logger = isolate_ - > logger ( ) ; <nl> is_profiling_ = false ; <nl> isolate_ - > set_is_profiling ( false ) ; <nl> - logger - > EnsureProfilerListener ( ) - > RemoveObserver ( this ) ; <nl> + ProfilerListener * profiler_listener = logger - > profiler_listener ( ) ; <nl> + profiler_listener - > RemoveObserver ( this ) ; <nl> processor_ - > StopSynchronously ( ) ; <nl> + logger - > TearDownProfilerListener ( ) ; <nl> processor_ . reset ( ) ; <nl> generator_ . reset ( ) ; <nl> logger - > is_logging_ = saved_is_logging_ ; <nl> mmm a / src / profiler / profiler - listener . cc <nl> ppp b / src / profiler / profiler - listener . cc <nl> namespace v8 { <nl> namespace internal { <nl> <nl> ProfilerListener : : ProfilerListener ( Isolate * isolate ) <nl> - : isolate_ ( isolate ) , function_and_resource_names_ ( isolate - > heap ( ) ) { } <nl> + : function_and_resource_names_ ( isolate - > heap ( ) ) { } <nl> <nl> ProfilerListener : : ~ ProfilerListener ( ) = default ; <nl> <nl> CodeEntry * ProfilerListener : : NewCodeEntry ( <nl> <nl> void ProfilerListener : : AddObserver ( CodeEventObserver * observer ) { <nl> base : : LockGuard < base : : Mutex > guard ( & mutex_ ) ; <nl> - if ( std : : find ( observers_ . begin ( ) , observers_ . end ( ) , observer ) ! = <nl> - observers_ . end ( ) ) { <nl> - return ; <nl> - } <nl> if ( observers_ . empty ( ) ) { <nl> code_entries_ . clear ( ) ; <nl> - isolate_ - > logger ( ) - > AddCodeEventListener ( this ) ; <nl> } <nl> - observers_ . push_back ( observer ) ; <nl> + if ( std : : find ( observers_ . begin ( ) , observers_ . end ( ) , observer ) = = <nl> + observers_ . end ( ) ) { <nl> + observers_ . push_back ( observer ) ; <nl> + } <nl> } <nl> <nl> void ProfilerListener : : RemoveObserver ( CodeEventObserver * observer ) { <nl> base : : LockGuard < base : : Mutex > guard ( & mutex_ ) ; <nl> auto it = std : : find ( observers_ . begin ( ) , observers_ . end ( ) , observer ) ; <nl> - if ( it ! = observers_ . end ( ) ) { <nl> - observers_ . erase ( it ) ; <nl> - } <nl> - if ( observers_ . empty ( ) ) { <nl> - isolate_ - > logger ( ) - > RemoveCodeEventListener ( this ) ; <nl> - } <nl> + if ( it = = observers_ . end ( ) ) return ; <nl> + observers_ . erase ( it ) ; <nl> } <nl> <nl> } / / namespace internal <nl> mmm a / src / profiler / profiler - listener . h <nl> ppp b / src / profiler / profiler - listener . h <nl> class ProfilerListener : public CodeEventListener { <nl> } <nl> } <nl> <nl> - Isolate * isolate_ ; <nl> StringsStorage function_and_resource_names_ ; <nl> std : : vector < std : : unique_ptr < CodeEntry > > code_entries_ ; <nl> std : : vector < CodeEventObserver * > observers_ ; <nl> mmm a / src / snapshot / serializer . h <nl> ppp b / src / snapshot / serializer . h <nl> namespace internal { <nl> class CodeAddressMap : public CodeEventLogger { <nl> public : <nl> explicit CodeAddressMap ( Isolate * isolate ) : isolate_ ( isolate ) { <nl> - isolate - > logger ( ) - > AddCodeEventListener ( this ) ; <nl> + isolate - > logger ( ) - > addCodeEventListener ( this ) ; <nl> } <nl> <nl> ~ CodeAddressMap ( ) override { <nl> - isolate_ - > logger ( ) - > RemoveCodeEventListener ( this ) ; <nl> + isolate_ - > logger ( ) - > removeCodeEventListener ( this ) ; <nl> } <nl> <nl> void CodeMoveEvent ( AbstractCode * from , Address to ) override { <nl> mmm a / test / cctest / test - cpu - profiler . cc <nl> ppp b / test / cctest / test - cpu - profiler . cc <nl> TEST ( CodeEvents ) { <nl> profiles - > StartProfiling ( " " , false ) ; <nl> processor - > Start ( ) ; <nl> ProfilerListener profiler_listener ( isolate ) ; <nl> + isolate - > code_event_dispatcher ( ) - > AddListener ( & profiler_listener ) ; <nl> profiler_listener . AddObserver ( & profiler ) ; <nl> <nl> / / Enqueue code creation events . <nl> TEST ( CodeEvents ) { <nl> EnqueueTickSampleEvent ( processor , aaa_code - > address ( ) ) ; <nl> <nl> profiler_listener . RemoveObserver ( & profiler ) ; <nl> + isolate - > code_event_dispatcher ( ) - > RemoveListener ( & profiler_listener ) ; <nl> processor - > StopSynchronously ( ) ; <nl> <nl> / / Check the state of profile generator . <nl> TEST ( TickEvents ) { <nl> profiles - > StartProfiling ( " " , false ) ; <nl> processor - > Start ( ) ; <nl> ProfilerListener profiler_listener ( isolate ) ; <nl> + isolate - > code_event_dispatcher ( ) - > AddListener ( & profiler_listener ) ; <nl> profiler_listener . AddObserver ( & profiler ) ; <nl> <nl> profiler_listener . CodeCreateEvent ( i : : Logger : : BUILTIN_TAG , frame1_code , " bbb " ) ; <nl> TEST ( TickEvents ) { <nl> frame1_code - > raw_instruction_end ( ) - 1 ) ; <nl> <nl> profiler_listener . RemoveObserver ( & profiler ) ; <nl> + isolate - > code_event_dispatcher ( ) - > RemoveListener ( & profiler_listener ) ; <nl> processor - > StopSynchronously ( ) ; <nl> CpuProfile * profile = profiles - > StopProfiling ( " " ) ; <nl> CHECK ( profile ) ; <nl> TEST ( TickEvents ) { <nl> const std : : vector < ProfileNode * > * top_down_ddd_children = <nl> top_down_stub_children - > back ( ) - > children ( ) ; <nl> CHECK ( top_down_ddd_children - > empty ( ) ) ; <nl> + <nl> + isolate - > code_event_dispatcher ( ) - > RemoveListener ( & profiler_listener ) ; <nl> } <nl> <nl> / / http : / / crbug / 51594 <nl> TEST ( Issue1398 ) { <nl> profiles - > StartProfiling ( " " , false ) ; <nl> processor - > Start ( ) ; <nl> ProfilerListener profiler_listener ( isolate ) ; <nl> + isolate - > code_event_dispatcher ( ) - > AddListener ( & profiler_listener ) ; <nl> profiler_listener . AddObserver ( & profiler ) ; <nl> <nl> profiler_listener . CodeCreateEvent ( i : : Logger : : BUILTIN_TAG , code , " bbb " ) ; <nl> TEST ( Issue1398 ) { <nl> processor - > FinishTickSample ( ) ; <nl> <nl> profiler_listener . RemoveObserver ( & profiler ) ; <nl> + isolate - > code_event_dispatcher ( ) - > RemoveListener ( & profiler_listener ) ; <nl> processor - > StopSynchronously ( ) ; <nl> CpuProfile * profile = profiles - > StopProfiling ( " " ) ; <nl> CHECK ( profile ) ; <nl> static void TickLines ( bool optimize ) { <nl> profiles - > StartProfiling ( " " , false ) ; <nl> processor - > Start ( ) ; <nl> ProfilerListener profiler_listener ( isolate ) ; <nl> + isolate - > code_event_dispatcher ( ) - > AddListener ( & profiler_listener ) ; <nl> profiler_listener . AddObserver ( & profiler ) ; <nl> <nl> / / Enqueue code creation events . <nl> static void TickLines ( bool optimize ) { <nl> EnqueueTickSampleEvent ( processor , code_address ) ; <nl> <nl> profiler_listener . RemoveObserver ( & profiler ) ; <nl> + isolate - > code_event_dispatcher ( ) - > RemoveListener ( & profiler_listener ) ; <nl> processor - > StopSynchronously ( ) ; <nl> <nl> CpuProfile * profile = profiles - > StopProfiling ( " " ) ; <nl> TEST ( CodeEntriesMemoryLeak ) { <nl> profile - > Delete ( ) ; <nl> } <nl> ProfilerListener * profiler_listener = <nl> - CcTest : : i_isolate ( ) - > logger ( ) - > EnsureProfilerListener ( ) ; <nl> + CcTest : : i_isolate ( ) - > logger ( ) - > profiler_listener ( ) ; <nl> <nl> CHECK_GE ( 10000ul , profiler_listener - > entries_count_for_test ( ) ) ; <nl> } <nl> TEST ( SourcePositionTable ) { <nl> CHECK_EQ ( 3 , info - > GetSourceLineNumber ( std : : numeric_limits < int > : : max ( ) ) ) ; <nl> } <nl> <nl> - TEST ( MultipleProfilers ) { <nl> - std : : unique_ptr < CpuProfiler > profiler1 ( new CpuProfiler ( CcTest : : i_isolate ( ) ) ) ; <nl> - std : : unique_ptr < CpuProfiler > profiler2 ( new CpuProfiler ( CcTest : : i_isolate ( ) ) ) ; <nl> - profiler1 - > StartProfiling ( " 1 " ) ; <nl> - profiler2 - > StartProfiling ( " 2 " ) ; <nl> - profiler1 - > StopProfiling ( " 1 " ) ; <nl> - profiler2 - > StopProfiling ( " 2 " ) ; <nl> - } <nl> - <nl> } / / namespace test_cpu_profiler <nl> } / / namespace internal <nl> } / / namespace v8 <nl> mmm a / test / cctest / test - log . cc <nl> ppp b / test / cctest / test - log . cc <nl> TEST ( Issue539892 ) { <nl> <nl> { <nl> ScopedLoggerInitializer logger ( saved_log , saved_prof , isolate ) ; <nl> - logger . logger ( ) - > AddCodeEventListener ( & code_event_logger ) ; <nl> + logger . logger ( ) - > addCodeEventListener ( & code_event_logger ) ; <nl> <nl> / / Function with a really large name . <nl> const char * source_text = <nl>
Revert " [ profiler ] Ensure there ' s a single ProfilerListener per isolate . "
v8/v8
f459a424df6a84610648515c88720a574fff7b54
2018-04-17T20:13:41Z
mmm a / xbmc / addons / AddonInstaller . cpp <nl> ppp b / xbmc / addons / AddonInstaller . cpp <nl> bool CAddonInstallJob : : DoWork ( ) <nl> CStdString installFrom ; <nl> if ( ! repoPtr | | repoPtr - > Props ( ) . libname . IsEmpty ( ) ) <nl> { <nl> - / / Addons are installed by downloading the . zip package on the server to the local <nl> - / / packages folder , then extracting from the local . zip package into the addons folder <nl> - / / Both these functions are achieved by " copying " using the vfs . <nl> + / / Addons are installed by downloading the . zip package on the server to the local <nl> + / / packages folder , then extracting from the local . zip package into the addons folder <nl> + / / Both these functions are achieved by " copying " using the vfs . <nl> <nl> - CStdString dest = " special : / / home / addons / packages / " ; <nl> - CStdString package = URIUtils : : AddFileToFolder ( " special : / / home / addons / packages / " , <nl> - URIUtils : : GetFileName ( m_addon - > Path ( ) ) ) ; <nl> + CStdString dest = " special : / / home / addons / packages / " ; <nl> + CStdString package = URIUtils : : AddFileToFolder ( " special : / / home / addons / packages / " , <nl> + URIUtils : : GetFileName ( m_addon - > Path ( ) ) ) ; <nl> <nl> - if ( URIUtils : : HasSlashAtEnd ( m_addon - > Path ( ) ) ) <nl> - { / / passed in a folder - all we need do is copy it across <nl> - installFrom = m_addon - > Path ( ) ; <nl> - } <nl> - else <nl> - { <nl> - / / zip passed in - download + extract <nl> - CStdString path ( m_addon - > Path ( ) ) ; <nl> - if ( ! m_referer . IsEmpty ( ) & & URIUtils : : IsInternetStream ( path ) ) <nl> - { <nl> - CURL url ( path ) ; <nl> - url . SetProtocolOptions ( m_referer ) ; <nl> - path = url . Get ( ) ; <nl> + if ( URIUtils : : HasSlashAtEnd ( m_addon - > Path ( ) ) ) <nl> + { / / passed in a folder - all we need do is copy it across <nl> + installFrom = m_addon - > Path ( ) ; <nl> } <nl> - if ( ! CFile : : Exists ( package ) & & ! DownloadPackage ( path , dest ) ) <nl> + else <nl> { <nl> - CFile : : Delete ( package ) ; <nl> - return false ; <nl> - } <nl> + / / zip passed in - download + extract <nl> + CStdString path ( m_addon - > Path ( ) ) ; <nl> + if ( ! m_referer . IsEmpty ( ) & & URIUtils : : IsInternetStream ( path ) ) <nl> + { <nl> + CURL url ( path ) ; <nl> + url . SetProtocolOptions ( m_referer ) ; <nl> + path = url . Get ( ) ; <nl> + } <nl> + if ( ! CFile : : Exists ( package ) & & ! DownloadPackage ( path , dest ) ) <nl> + { <nl> + CFile : : Delete ( package ) ; <nl> + return false ; <nl> + } <nl> <nl> - / / at this point we have the package - check that it is valid <nl> - if ( ! CFile : : Exists ( package ) | | ! CheckHash ( package ) ) <nl> - { <nl> - CFile : : Delete ( package ) ; <nl> - return false ; <nl> - } <nl> + / / at this point we have the package - check that it is valid <nl> + if ( ! CFile : : Exists ( package ) | | ! CheckHash ( package ) ) <nl> + { <nl> + CFile : : Delete ( package ) ; <nl> + return false ; <nl> + } <nl> <nl> - / / check the archive as well - should have just a single folder in the root <nl> - CStdString archive ; <nl> - URIUtils : : CreateArchivePath ( archive , " zip " , package , " " ) ; <nl> + / / check the archive as well - should have just a single folder in the root <nl> + CStdString archive ; <nl> + URIUtils : : CreateArchivePath ( archive , " zip " , package , " " ) ; <nl> <nl> - CFileItemList archivedFiles ; <nl> - CDirectory : : GetDirectory ( archive , archivedFiles ) ; <nl> + CFileItemList archivedFiles ; <nl> + CDirectory : : GetDirectory ( archive , archivedFiles ) ; <nl> <nl> - if ( archivedFiles . Size ( ) ! = 1 | | ! archivedFiles [ 0 ] - > m_bIsFolder ) <nl> - { / / invalid package <nl> - CFile : : Delete ( package ) ; <nl> - return false ; <nl> + if ( archivedFiles . Size ( ) ! = 1 | | ! archivedFiles [ 0 ] - > m_bIsFolder ) <nl> + { / / invalid package <nl> + CFile : : Delete ( package ) ; <nl> + return false ; <nl> + } <nl> + installFrom = archivedFiles [ 0 ] - > GetPath ( ) ; <nl> } <nl> - installFrom = archivedFiles [ 0 ] - > GetPath ( ) ; <nl> - } <nl> repoPtr . reset ( ) ; <nl> } <nl> <nl> bool CAddonInstallJob : : Install ( const CStdString & installFrom , const AddonPtr & re <nl> } <nl> else <nl> { <nl> - CStdString addonFolder ( installFrom ) ; <nl> - URIUtils : : RemoveSlashAtEnd ( addonFolder ) ; <nl> - addonFolder = URIUtils : : AddFileToFolder ( " special : / / home / addons / " , <nl> - URIUtils : : GetFileName ( addonFolder ) ) ; <nl> - <nl> - CFileItemList install ; <nl> - install . Add ( CFileItemPtr ( new CFileItem ( installFrom , true ) ) ) ; <nl> - install [ 0 ] - > Select ( true ) ; <nl> - CFileOperationJob job ( CFileOperationJob : : ActionReplace , install , " special : / / home / addons / " ) ; <nl> + CStdString addonFolder ( installFrom ) ; <nl> + URIUtils : : RemoveSlashAtEnd ( addonFolder ) ; <nl> + addonFolder = URIUtils : : AddFileToFolder ( " special : / / home / addons / " , <nl> + URIUtils : : GetFileName ( addonFolder ) ) ; <nl> <nl> - AddonPtr addon ; <nl> - if ( ! job . DoWork ( ) | | ! CAddonMgr : : Get ( ) . LoadAddonDescription ( addonFolder , addon ) ) <nl> - { / / failed extraction or failed to load addon description <nl> - CStdString addonID = URIUtils : : GetFileName ( addonFolder ) ; <nl> - ReportInstallError ( addonID , addonID ) ; <nl> - CLog : : Log ( LOGERROR , " Could not read addon description of % s " , addonID . c_str ( ) ) ; <nl> - DeleteAddon ( addonFolder ) ; <nl> - return false ; <nl> - } <nl> + CFileItemList install ; <nl> + install . Add ( CFileItemPtr ( new CFileItem ( installFrom , true ) ) ) ; <nl> + install [ 0 ] - > Select ( true ) ; <nl> + CFileOperationJob job ( CFileOperationJob : : ActionReplace , install , " special : / / home / addons / " ) ; <nl> <nl> - / / resolve dependencies <nl> - CAddonMgr : : Get ( ) . FindAddons ( ) ; / / needed as GetDeps ( ) grabs directly from c - pluff via the addon manager <nl> - ADDONDEPS deps = addon - > GetDeps ( ) ; <nl> - CStdString referer ; <nl> - referer . Format ( " Referer = % s - % s . zip " , addon - > ID ( ) . c_str ( ) , addon - > Version ( ) . c_str ( ) ) ; <nl> - for ( ADDONDEPS : : iterator it = deps . begin ( ) ; it ! = deps . end ( ) ; + + it ) <nl> - { <nl> - if ( it - > first . Equals ( " xbmc . metadata " ) ) <nl> - continue ; <nl> + AddonPtr addon ; <nl> + if ( ! job . DoWork ( ) | | ! CAddonMgr : : Get ( ) . LoadAddonDescription ( addonFolder , addon ) ) <nl> + { / / failed extraction or failed to load addon description <nl> + CStdString addonID = URIUtils : : GetFileName ( addonFolder ) ; <nl> + ReportInstallError ( addonID , addonID ) ; <nl> + CLog : : Log ( LOGERROR , " Could not read addon description of % s " , addonID . c_str ( ) ) ; <nl> + DeleteAddon ( addonFolder ) ; <nl> + return false ; <nl> + } <nl> <nl> - const CStdString & addonID = it - > first ; <nl> - const AddonVersion & version = it - > second . first ; <nl> - bool optional = it - > second . second ; <nl> - AddonPtr dependency ; <nl> - bool haveAddon = CAddonMgr : : Get ( ) . GetAddon ( addonID , dependency ) ; <nl> - if ( ( haveAddon & & ! dependency - > MeetsVersion ( version ) ) | | ( ! haveAddon & & ! optional ) ) <nl> - { / / we have it but our version isn ' t good enough , or we don ' t have it and we need it <nl> - bool force = ( dependency ! = NULL ) ; <nl> - / / dependency is already queued up for install - : : Install will fail <nl> - / / instead we wait until the Job has finished . note that we <nl> - / / recall install on purpose in case prior installation failed <nl> - if ( CAddonInstaller : : Get ( ) . HasJob ( addonID ) ) <nl> - { <nl> - while ( CAddonInstaller : : Get ( ) . HasJob ( addonID ) ) <nl> - Sleep ( 50 ) ; <nl> - force = false ; <nl> - } <nl> - / / don ' t have the addon or the addon isn ' t new enough - grab it ( no new job for these ) <nl> - if ( ! CAddonInstaller : : Get ( ) . Install ( addonID , force , referer , false ) ) <nl> - { <nl> - DeleteAddon ( addonFolder ) ; <nl> - return false ; <nl> + / / resolve dependencies <nl> + CAddonMgr : : Get ( ) . FindAddons ( ) ; / / needed as GetDeps ( ) grabs directly from c - pluff via the addon manager <nl> + ADDONDEPS deps = addon - > GetDeps ( ) ; <nl> + CStdString referer ; <nl> + referer . Format ( " Referer = % s - % s . zip " , addon - > ID ( ) . c_str ( ) , addon - > Version ( ) . c_str ( ) ) ; <nl> + for ( ADDONDEPS : : iterator it = deps . begin ( ) ; it ! = deps . end ( ) ; + + it ) <nl> + { <nl> + if ( it - > first . Equals ( " xbmc . metadata " ) ) <nl> + continue ; <nl> + <nl> + const CStdString & addonID = it - > first ; <nl> + const AddonVersion & version = it - > second . first ; <nl> + bool optional = it - > second . second ; <nl> + AddonPtr dependency ; <nl> + bool haveAddon = CAddonMgr : : Get ( ) . GetAddon ( addonID , dependency ) ; <nl> + if ( ( haveAddon & & ! dependency - > MeetsVersion ( version ) ) | | ( ! haveAddon & & ! optional ) ) <nl> + { / / we have it but our version isn ' t good enough , or we don ' t have it and we need it <nl> + bool force = ( dependency ! = NULL ) ; <nl> + / / dependency is already queued up for install - : : Install will fail <nl> + / / instead we wait until the Job has finished . note that we <nl> + / / recall install on purpose in case prior installation failed <nl> + if ( CAddonInstaller : : Get ( ) . HasJob ( addonID ) ) <nl> + { <nl> + while ( CAddonInstaller : : Get ( ) . HasJob ( addonID ) ) <nl> + Sleep ( 50 ) ; <nl> + force = false ; <nl> + } <nl> + / / don ' t have the addon or the addon isn ' t new enough - grab it ( no new job for these ) <nl> + if ( ! CAddonInstaller : : Get ( ) . Install ( addonID , force , referer , false ) ) <nl> + { <nl> + DeleteAddon ( addonFolder ) ; <nl> + return false ; <nl> + } <nl> } <nl> } <nl> } <nl> - } <nl> return true ; <nl> } <nl> <nl> bool CAddonUnInstallJob : : DoWork ( ) <nl> } <nl> else <nl> { <nl> - if ( ! CAddonInstallJob : : DeleteAddon ( m_addon - > Path ( ) ) ) <nl> - return false ; <nl> + if ( ! CAddonInstallJob : : DeleteAddon ( m_addon - > Path ( ) ) ) <nl> + return false ; <nl> } <nl> <nl> OnPostUnInstall ( ) ; <nl>
reindent
xbmc/xbmc
d7f649e95f70e629b685f41befb3305b80254a6b
2013-06-03T09:43:12Z
mmm a / emscripten . py <nl> ppp b / emscripten . py <nl> def create_asm_consts_wasm ( forwarded_json , metadata ) : <nl> if all_sigs : <nl> # emit the signature - reading helper function only if we have any EM_ASM <nl> # functions in the module <nl> + check = ' ' <nl> + if shared . Settings . ASSERTIONS : <nl> + check = ' else abort ( " unexpected char in asm const signature " + ch ) ; ' <nl> asm_const_funcs . append ( r ' ' ' <nl> - function readAsmConstArgs ( sig_ptr , buf ) { <nl> - var args = [ ] ; <nl> - var sig = AsciiToString ( sig_ptr ) ; <nl> - function align_to ( ptr , align ) { <nl> - return ( ptr + align - 1 ) & ~ ( align - 1 ) ; <nl> - } <nl> - for ( var i = 0 ; i < sig . length ; i + + ) { <nl> - var c = sig [ i ] ; <nl> - if ( c = = ' d ' | | c = = ' f ' ) { <nl> - buf = align_to ( buf , 8 ) ; <nl> + / / Avoid creating a new array <nl> + var _readAsmConstArgsArray = [ ] ; <nl> + <nl> + function readAsmConstArgs ( sigPtr , buf ) { <nl> + var args = _readAsmConstArgsArray ; <nl> + args . length = 0 ; <nl> + while ( 1 ) { <nl> + var ch = HEAPU8 [ sigPtr + + ] ; <nl> + if ( ! ch ) return args ; <nl> + if ( ch = = = ' d ' . charCodeAt ( 0 ) | | ch = = = ' f ' . charCodeAt ( 0 ) ) { <nl> + buf = alignMemory ( buf , 8 ) ; <nl> args . push ( HEAPF64 [ ( buf > > 3 ) ] ) ; <nl> buf + = 8 ; <nl> - } else if ( c = = ' i ' ) { <nl> - buf = align_to ( buf , 4 ) ; <nl> + } else if ( ch = = = ' i ' . charCodeAt ( 0 ) ) { <nl> + buf = alignMemory ( buf , 4 ) ; <nl> args . push ( HEAP32 [ ( buf > > 2 ) ] ) ; <nl> buf + = 4 ; <nl> - } <nl> + } % s <nl> } <nl> - return args ; <nl> } <nl> - ' ' ' ) <nl> + ' ' ' % check ) <nl> <nl> for sig , call_type in set ( all_sigs ) : <nl> const_name = ' _emscripten_asm_const_ ' + call_type + sig <nl> def create_asm_consts_wasm ( forwarded_json , metadata ) : <nl> proxy_debug_print ( sync_proxy ) + <nl> ' return _emscripten_proxy_to_main_thread_js ( - 1 - code , ' + <nl> str ( int ( sync_proxy ) ) + <nl> - ' , code , sig_ptr , argbuf ) ; } ' ) <nl> + ' , code , sigPtr , argbuf ) ; } ' ) <nl> <nl> asm_const_funcs . append ( r ' ' ' <nl> - function % s ( code , sig_ptr , argbuf ) { % s <nl> - var args = readAsmConstArgs ( sig_ptr , argbuf ) ; <nl> + function % s ( code , sigPtr , argbuf ) { % s <nl> + var args = readAsmConstArgs ( sigPtr , argbuf ) ; <nl> return ASM_CONSTS [ code ] . apply ( null , args ) ; <nl> } ' ' ' % ( const_name , preamble ) ) <nl> return asm_consts , asm_const_funcs <nl>
Avoid GC allocation in readAsmConstArgs ( )
emscripten-core/emscripten
102a76837300ea9fac2f94f94a5f8937b85d952f
2019-10-22T20:19:59Z
mmm a / setup_caffe2 . py <nl> ppp b / setup_caffe2 . py <nl> def run ( self ) : <nl> ' - DBUILD_TEST = OFF ' , <nl> ' - DBUILD_BENCHMARK = OFF ' , <nl> ' - DBUILD_BINARY = OFF ' , <nl> + ' - DCMAKE_EXPORT_COMPILE_COMMANDS = ON ' , <nl> ] <nl> if NINJA : <nl> cmake_args . extend ( [ ' - G ' , ' Ninja ' ] ) <nl>
[ Caffe2 ] Export clang compilation datatbase in setuptools build ( )
pytorch/pytorch
74fa304b3102f77cea797b8fd7d6a2cceb1cbd42
2018-06-22T23:19:43Z
mmm a / contracts / eoslib / memory . hpp <nl> ppp b / contracts / eoslib / memory . hpp <nl> namespace eos { <nl> * @ { <nl> * / <nl> <nl> - class memory <nl> + class memory_manager <nl> { <nl> - friend void * malloc ( uint32_t size ) ; <nl> - friend void * realloc ( void * ptr , uint32_t size ) ; <nl> - friend void free ( void * ptr ) ; <nl> - <nl> + friend void * malloc ( uint32_t size ) ; <nl> + friend void * realloc ( void * ptr , uint32_t size ) ; <nl> + friend void free ( void * ptr ) ; <nl> public : <nl> - memory ( ) <nl> - : _offset ( 0 ) <nl> + memory_manager ( ) <nl> + : _current_heap ( 0 ) <nl> { <nl> - memset ( _initial_heap , 0 , sizeof ( _initial_heap ) ) ; <nl> } <nl> <nl> private : <nl> void * malloc ( uint32_t size ) <nl> { <nl> - if ( _offset + size + SIZE_MARKER > INITIAL_HEAP_SIZE | | size = = 0 ) <nl> - return nullptr ; <nl> + / / first pass of loop never has to initialize the slot in _available_heap <nl> + uint32_t needs_init = 0 ; <nl> + char * buffer = nullptr ; <nl> + uint32_t current_heap = _current_heap ; <nl> + for ( ; current_heap < HEAPS_SIZE ; + + current_heap ) <nl> + { <nl> + memory & current = _available_heaps [ current_heap ] ; <nl> + if ( ! current . is_init ( ) ) <nl> + { <nl> + char * new_heap = nullptr ; <nl> + if ( current_heap = = 0 ) <nl> + { <nl> + memset ( _initial_heap , 0 , sizeof ( _initial_heap ) ) ; <nl> + current . init ( _initial_heap , INITIAL_HEAP_SIZE ) ; <nl> + } <nl> + else <nl> + { <nl> + / / REMOVE logic , just using to test out multiple heap logic till memory can be allocated <nl> + char * const new_heap = & _initial_heap [ INITIAL_HEAP_SIZE + NEW_HEAP_SIZE * ( current_heap - 1 ) ] ; <nl> + _available_heaps [ current_heap ] . init ( new_heap , NEW_HEAP_SIZE ) ; <nl> + } <nl> + } <nl> + buffer = current . malloc ( size ) ; <nl> + if ( buffer ! = nullptr ) <nl> + break ; <nl> + } <nl> + <nl> + / / only update the current_heap if memory was allocated <nl> + if ( buffer ! = nullptr ) <nl> + { <nl> + _current_heap = current_heap ; <nl> + } <nl> <nl> - buffer_ptr new_buff ( & _initial_heap [ _offset + SIZE_MARKER ] , size ) ; <nl> - _offset + = size + SIZE_MARKER ; <nl> - return new_buff . ptr ( ) ; <nl> + return buffer ; <nl> } <nl> <nl> void * realloc ( void * ptr , uint32_t size ) <nl> { <nl> + char * realloc_ptr = nullptr ; <nl> uint32_t orig_ptr_size = 0 ; <nl> - const char * const END_OF_BUFFER = _initial_heap + INITIAL_HEAP_SIZE ; <nl> - char * const char_ptr = static_cast < char * > ( ptr ) ; <nl> if ( ptr ! = nullptr ) <nl> { <nl> - buffer_ptr orig_buffer ( ptr ) ; <nl> - if ( orig_buffer . size_ptr ( ) > = _initial_heap & & ptr < END_OF_BUFFER ) <nl> + char * const char_ptr = static_cast < char * > ( ptr ) ; <nl> + for ( memory * realloc_heap = _available_heaps ; realloc_heap < _available_heaps + HEAPS_SIZE & & realloc_heap - > is_init ( ) ; + + realloc_heap ) <nl> { <nl> - orig_ptr_size = orig_buffer . size ( ) ; <nl> - / / is the passed in pointer valid <nl> - char * const orig_buffer_end = orig_buffer . end ( ) ; <nl> - if ( orig_buffer_end < END_OF_BUFFER ) <nl> - { <nl> - / / is there enough memory to allocate new buffer <nl> - if ( ptr > = END_OF_BUFFER - size ) <nl> - { <nl> - / / not handling in current implementation <nl> - return nullptr ; <nl> - } <nl> - <nl> - const int32_t diff = size - orig_ptr_size ; <nl> - if ( diff < 0 ) <nl> - { <nl> - memset ( orig_buffer_end + diff , 0 , - diff ) ; <nl> - / / if ptr was the last allocated buffer , we can contract <nl> - if ( orig_buffer_end = = & _initial_heap [ _offset ] ) <nl> - { <nl> - _offset + = diff ; <nl> - } <nl> - / / else current implementation doesn ' t worry about freeing excess memory <nl> - <nl> - return ptr ; <nl> - } <nl> - / / if ptr was the last allocated buffer , we can expand <nl> - else if ( orig_buffer_end = = & _initial_heap [ _offset ] ) <nl> - { <nl> - orig_buffer . size ( size ) ; <nl> - _offset + = diff ; <nl> - <nl> - return ptr ; <nl> - } <nl> - else if ( diff = = 0 ) <nl> - return ptr ; <nl> - } <nl> - else <nl> + if ( realloc_heap - > is_in_heap ( char_ptr ) ) <nl> { <nl> - orig_ptr_size = 0 ; <nl> + realloc_ptr = realloc_heap - > realloc_in_place ( char_ptr , size , & orig_ptr_size ) ; <nl> + <nl> + if ( realloc_ptr ! = nullptr ) <nl> + return realloc_ptr ; <nl> + else <nl> + break ; <nl> } <nl> } <nl> } <nl> namespace eos { <nl> / / currently no - op <nl> } <nl> <nl> - class buffer_ptr <nl> + class memory <nl> { <nl> public : <nl> - buffer_ptr ( void * ptr ) <nl> - : _ptr ( static_cast < char * > ( ptr ) ) <nl> - , _size ( * ( uint32_t * ) ( static_cast < char * > ( ptr ) - SIZE_MARKER ) ) <nl> + memory ( ) <nl> + : _heap_size ( 0 ) <nl> + , _heap ( nullptr ) <nl> + , _offset ( 0 ) <nl> { <nl> } <nl> <nl> - buffer_ptr ( void * ptr , uint32_t buff_size ) <nl> - : _ptr ( static_cast < char * > ( ptr ) ) <nl> + void init ( char * const mem_heap , uint32_t size ) <nl> { <nl> - size ( buff_size ) ; <nl> + _heap_size = size ; <nl> + _heap = mem_heap ; <nl> + _offset = 0 ; <nl> + memset ( _heap , 0 , _heap_size ) ; <nl> } <nl> <nl> - const void * size_ptr ( ) <nl> + uint32_t is_init ( ) const <nl> { <nl> - return _ptr - SIZE_MARKER ; <nl> + return _heap ! = nullptr ; <nl> } <nl> <nl> - uint32_t size ( ) <nl> + uint32_t is_in_heap ( const char * const ptr ) const <nl> { <nl> - return _size ; <nl> + const char * const END_OF_BUFFER = _heap + _heap_size ; <nl> + const char * const FIRST_PTR_OF_BUFFER = _heap + SIZE_MARKER ; <nl> + return ptr > = FIRST_PTR_OF_BUFFER & & ptr < END_OF_BUFFER ; <nl> } <nl> <nl> - void size ( uint32_t val ) <nl> + uint32_t is_capacity_remaining ( ) const <nl> { <nl> - * reinterpret_cast < uint32_t * > ( _ptr - SIZE_MARKER ) = val ; <nl> - _size = val ; <nl> + return _offset + SIZE_MARKER < _heap_size ; <nl> } <nl> <nl> - char * end ( ) <nl> + char * malloc ( uint32_t size ) <nl> { <nl> - return _ptr + _size ; <nl> + if ( _offset + size + SIZE_MARKER > _heap_size | | size = = 0 ) <nl> + { <nl> + return nullptr ; <nl> + } <nl> + <nl> + buffer_ptr new_buff ( & _heap [ _offset + SIZE_MARKER ] , size ) ; <nl> + _offset + = size + SIZE_MARKER ; <nl> + return new_buff . ptr ( ) ; <nl> + } <nl> + <nl> + char * realloc_in_place ( char * const ptr , uint32_t size , uint32_t * orig_ptr_size ) <nl> + { <nl> + const char * const END_OF_BUFFER = _heap + _heap_size ; <nl> + <nl> + buffer_ptr orig_buffer ( ptr ) ; <nl> + * orig_ptr_size = orig_buffer . size ( ) ; <nl> + / / is the passed in pointer valid <nl> + char * const orig_buffer_end = orig_buffer . end ( ) ; <nl> + if ( orig_buffer_end > END_OF_BUFFER ) <nl> + { <nl> + * orig_ptr_size = 0 ; <nl> + return nullptr ; <nl> + } <nl> + <nl> + if ( ptr > END_OF_BUFFER - size ) <nl> + { <nl> + / / cannot resize in place <nl> + return nullptr ; <nl> + } <nl> + <nl> + const int32_t diff = size - * orig_ptr_size ; <nl> + if ( diff < 0 ) <nl> + { <nl> + memset ( orig_buffer_end + diff , 0 , - diff ) ; <nl> + / / if ptr was the last allocated buffer , we can contract <nl> + if ( orig_buffer_end = = & _heap [ _offset ] ) <nl> + { <nl> + _offset + = diff ; <nl> + } <nl> + / / else current implementation doesn ' t worry about freeing excess memory <nl> + <nl> + return ptr ; <nl> + } <nl> + / / if ptr was the last allocated buffer , we can expand <nl> + else if ( orig_buffer_end = = & _heap [ _offset ] ) <nl> + { <nl> + orig_buffer . size ( size ) ; <nl> + _offset + = diff ; <nl> + <nl> + return ptr ; <nl> + } <nl> + else if ( diff = = 0 ) <nl> + { <nl> + return ptr ; <nl> + } <nl> + <nl> + / / could not resize in place <nl> + return nullptr ; <nl> } <nl> <nl> - char * ptr ( ) <nl> + void free ( char * ) <nl> { <nl> - return _ptr ; <nl> + / / currently no - op <nl> } <nl> + <nl> private : <nl> + class buffer_ptr <nl> + { <nl> + public : <nl> + buffer_ptr ( void * ptr ) <nl> + : _ptr ( static_cast < char * > ( ptr ) ) <nl> + , _size ( * ( uint32_t * ) ( static_cast < char * > ( ptr ) - SIZE_MARKER ) ) <nl> + { <nl> + } <nl> + <nl> + buffer_ptr ( void * ptr , uint32_t buff_size ) <nl> + : _ptr ( static_cast < char * > ( ptr ) ) <nl> + { <nl> + size ( buff_size ) ; <nl> + } <nl> + <nl> + const void * size_ptr ( ) <nl> + { <nl> + return _ptr - SIZE_MARKER ; <nl> + } <nl> + <nl> + uint32_t size ( ) <nl> + { <nl> + return _size ; <nl> + } <nl> + <nl> + void size ( uint32_t val ) <nl> + { <nl> + * reinterpret_cast < uint32_t * > ( _ptr - SIZE_MARKER ) = val ; <nl> + _size = val ; <nl> + } <nl> + <nl> + char * end ( ) <nl> + { <nl> + return _ptr + _size ; <nl> + } <nl> + <nl> + char * ptr ( ) <nl> + { <nl> + return _ptr ; <nl> + } <nl> + private : <nl> + <nl> + char * const _ptr ; <nl> + uint32_t _size ; <nl> + } ; <nl> <nl> - char * const _ptr ; <nl> - uint32_t _size ; <nl> + uint32_t _heap_size ; <nl> + char * _heap ; <nl> + uint32_t _offset ; <nl> } ; <nl> <nl> static const uint32_t SIZE_MARKER = sizeof ( uint32_t ) ; <nl> static const uint32_t INITIAL_HEAP_SIZE = 8192 ; / / 32768 ; <nl> - char _initial_heap [ INITIAL_HEAP_SIZE ] ; <nl> - uint32_t _offset ; <nl> + static const uint32_t NEW_HEAP_SIZE = 1024 ; / / should be 65536 <nl> + static const uint32_t HEAPS_SIZE = 4 ; / / _initial_heap plus 3 pages ( 64K each ) <nl> + / / should be just INITIAL_HEAP_SIZE , adding extra space for testing multiple buffers <nl> + char _initial_heap [ INITIAL_HEAP_SIZE + NEW_HEAP_SIZE * ( HEAPS_SIZE - 1 ) ] ; <nl> + memory _available_heaps [ HEAPS_SIZE ] ; <nl> + uint32_t _current_heap ; <nl> } memory_heap ; <nl> <nl> / * * <nl>
Refactored existing handling of malloc and realloc to add new pages of memory . Currently , memory pages are fabricated .
EOSIO/eos
53e47e256552ef1d2c875b885be750d3ddca432b
2017-09-23T19:32:42Z
mmm a / docs / SIL . rst <nl> ppp b / docs / SIL . rst <nl> Functions <nl> : : <nl> <nl> decl : : = sil - function <nl> - sil - function : : = ' sil ' sil - linkage ? sil - function - name ' : ' sil - type <nl> + sil - function : : = ' sil ' sil - linkage ? sil - function - attribute + <nl> + sil - function - name ' : ' sil - type <nl> ' { ' sil - basic - block + ' } ' <nl> sil - function - name : : = ' @ ' [ A - Za - z_0 - 9 ] + <nl> <nl> The ` ` sil ` ` syntax declares the function ' s name and SIL type , and <nl> defines the body of the function inside braces . The declared type must <nl> be a function type , which may be generic . <nl> <nl> + <nl> + Function Attributes <nl> + ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` <nl> + : : <nl> + <nl> + sil - function - attribute : : = ' [ canonical ] ' <nl> + <nl> + The function is in canonical SIL even if the module is still in raw SIL . <nl> + : : <nl> + <nl> + sil - function - attribute : : = ' [ ossa ] ' <nl> + <nl> + The function is in OSSA ( ownership SSA ) form . <nl> + : : <nl> + <nl> + sil - function - attribute : : = ' [ transparent ] ' <nl> + <nl> + Transparent functions are always inlined and don ' t keep their source <nl> + information when inlined . <nl> + : : <nl> + <nl> + sil - function - attribute : : = ' [ ' sil - function - thunk ' ] ' <nl> + sil - function - thunk : : = ' thunk ' <nl> + sil - function - thunk : : = ' signature_optimized_thunk ' <nl> + sil - function - thunk : : = ' reabstraction_thunk ' <nl> + <nl> + The function is a compiler generated thunk . <nl> + : : <nl> + <nl> + sil - function - attribute : : = ' [ dynamically_replacable ] ' <nl> + <nl> + The function can be replaced at runtime with a different implementation . <nl> + Optimizations must not assume anything about such a function , even if the SIL <nl> + of the function body is available . <nl> + : : <nl> + <nl> + sil - function - attribute : : = ' [ dynamic_replacement_for ' identifier ' ] ' <nl> + sil - function - attribute : : = ' [ objc_replacement_for ' identifier ' ] ' <nl> + <nl> + Specifies for which function this function is a replacement . <nl> + : : <nl> + <nl> + sil - function - attribute : : = ' [ exact_self_class ] ' <nl> + <nl> + The function is a designated initializers , where it is known that the static <nl> + type being allocated is the type of the class that defines the designated <nl> + initializer . <nl> + : : <nl> + <nl> + sil - function - attribute : : = ' [ without_actually_escaping ] ' <nl> + <nl> + The function is a thunk for closures which are not actually escaping . <nl> + : : <nl> + <nl> + sil - function - attribute : : = ' [ ' sil - function - purpose ' ] ' <nl> + sil - function - purpose : : = ' global_init ' <nl> + <nl> + The implied semantics are : <nl> + <nl> + - side - effects can occur any time before the first invocation . <nl> + - all calls to the same ` ` global_init ` ` function have the same side - effects . <nl> + - any operation that may observe the initializer ' s side - effects must be <nl> + preceded by a call to the initializer . <nl> + <nl> + This is currently true if the function is an addressor that was lazily <nl> + generated from a global variable access . Note that the initialization <nl> + function itself does not need this attribute . It is private and only <nl> + called within the addressor . <nl> + : : <nl> + <nl> + sil - function - attribute : : = ' [ weak_imported ] ' <nl> + <nl> + Cross - module references to this function should always use weak linking . <nl> + : : <nl> + <nl> + sil - function - attribute : : = ' [ available ' sil - version - tuple ' ] ' <nl> + sil - version - tuple : : = [ 0 - 9 ] + ( ' . ' [ 0 - 9 ] + ) * <nl> + <nl> + The minimal OS - version where the function is available . <nl> + : : <nl> + <nl> + sil - function - attribute : : = ' [ ' sil - function - inlining ' ] ' <nl> + sil - function - inlining : : = ' never ' <nl> + <nl> + The function is never inlined . <nl> + : : <nl> + <nl> + sil - function - inlining : : = ' always ' <nl> + <nl> + The function is always inlined , even in a ` ` Onone ` ` build . <nl> + : : <nl> + <nl> + sil - function - attribute : : = ' [ ' sil - function - optimization ' ] ' <nl> + sil - function - inlining : : = ' Onone ' <nl> + sil - function - inlining : : = ' Ospeed ' <nl> + sil - function - inlining : : = ' Osize ' <nl> + <nl> + The function is optimized according to this attribute , overriding the setting <nl> + from the command line . <nl> + : : <nl> + <nl> + sil - function - attribute : : = ' [ ' sil - function - effects ' ] ' <nl> + sil - function - effects : : = ' readonly ' <nl> + sil - function - effects : : = ' readnone ' <nl> + sil - function - effects : : = ' readwrite ' <nl> + sil - function - effects : : = ' releasenone ' <nl> + <nl> + The specified memory effects of the function . <nl> + : : <nl> + <nl> + sil - function - attribute : : = ' [ _semantics " ' [ A - Za - z . _0 - 9 ] + ' " ] ' <nl> + <nl> + The specified high - level semantics of the function . The optimizer can use this <nl> + information to perform high - level optimizations before such functions are <nl> + inlined . For example , ` ` Array ` ` operations are annotated with semantic <nl> + attributes to let the optimizer perform redundant bounds check elimination and <nl> + similar optimizations . <nl> + : : <nl> + <nl> + sil - function - attribute : : = ' [ _specialize " ' [ A - Za - z . _0 - 9 ] + ' " ] ' <nl> + <nl> + Specifies for which types specialized code should be generated . <nl> + : : <nl> + <nl> + sil - function - attribute : : = ' [ clang " ' identifier ' " ] ' <nl> + <nl> + The clang node owner . <nl> + <nl> Basic Blocks <nl> ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ <nl> : : <nl>
docs : document SILFunction attributes in SIL . rst
apple/swift
cc0afcb838453c95e9ecd517142792bb2cc3398f
2020-03-12T13:00:05Z
mmm a / src / qt / bitcoin . cpp <nl> ppp b / src / qt / bitcoin . cpp <nl> static void RegisterMetaTypes ( ) <nl> <nl> qRegisterMetaType < std : : function < void ( ) > > ( " std : : function < void ( ) > " ) ; <nl> qRegisterMetaType < QMessageBox : : Icon > ( " QMessageBox : : Icon " ) ; <nl> + qRegisterMetaType < interfaces : : BlockAndHeaderTipInfo > ( " interfaces : : BlockAndHeaderTipInfo " ) ; <nl> } <nl> <nl> static QString GetLangTerritory ( ) <nl> void BitcoinCore : : initialize ( ) <nl> { <nl> qDebug ( ) < < __func__ < < " : Running initialization in thread " ; <nl> util : : ThreadRename ( " qt - init " ) ; <nl> - bool rv = m_node . appInitMain ( ) ; <nl> - Q_EMIT initializeResult ( rv ) ; <nl> + interfaces : : BlockAndHeaderTipInfo tip_info ; <nl> + bool rv = m_node . appInitMain ( & tip_info ) ; <nl> + Q_EMIT initializeResult ( rv , tip_info ) ; <nl> } catch ( const std : : exception & e ) { <nl> handleRunawayException ( & e ) ; <nl> } catch ( . . . ) { <nl> void BitcoinApplication : : requestShutdown ( ) <nl> Q_EMIT requestedShutdown ( ) ; <nl> } <nl> <nl> - void BitcoinApplication : : initializeResult ( bool success ) <nl> + void BitcoinApplication : : initializeResult ( bool success , interfaces : : BlockAndHeaderTipInfo tip_info ) <nl> { <nl> qDebug ( ) < < __func__ < < " : Initialization result : " < < success ; <nl> / / Set exit result . <nl> void BitcoinApplication : : initializeResult ( bool success ) <nl> / / Log this only after AppInitMain finishes , as then logging setup is guaranteed complete <nl> qInfo ( ) < < " Platform customization : " < < platformStyle - > getName ( ) ; <nl> clientModel = new ClientModel ( m_node , optionsModel ) ; <nl> - window - > setClientModel ( clientModel ) ; <nl> + window - > setClientModel ( clientModel , & tip_info ) ; <nl> # ifdef ENABLE_WALLET <nl> if ( WalletModel : : isWalletEnabled ( ) ) { <nl> m_wallet_controller = new WalletController ( * clientModel , platformStyle , this ) ; <nl> mmm a / src / qt / bitcoin . h <nl> ppp b / src / qt / bitcoin . h <nl> <nl> # include < QApplication > <nl> # include < memory > <nl> <nl> + # include < interfaces / node . h > <nl> + <nl> class BitcoinGUI ; <nl> class ClientModel ; <nl> class NetworkStyle ; <nl> class PlatformStyle ; <nl> class WalletController ; <nl> class WalletModel ; <nl> <nl> - namespace interfaces { <nl> - class Handler ; <nl> - class Node ; <nl> - } / / namespace interfaces <nl> <nl> / * * Class encapsulating Bitcoin Core startup and shutdown . <nl> * Allows running startup and shutdown in a different thread from the UI thread . <nl> public Q_SLOTS : <nl> void shutdown ( ) ; <nl> <nl> Q_SIGNALS : <nl> - void initializeResult ( bool success ) ; <nl> + void initializeResult ( bool success , interfaces : : BlockAndHeaderTipInfo tip_info ) ; <nl> void shutdownResult ( ) ; <nl> void runawayException ( const QString & message ) ; <nl> <nl> class BitcoinApplication : public QApplication <nl> void setupPlatformStyle ( ) ; <nl> <nl> public Q_SLOTS : <nl> - void initializeResult ( bool success ) ; <nl> + void initializeResult ( bool success , interfaces : : BlockAndHeaderTipInfo tip_info ) ; <nl> void shutdownResult ( ) ; <nl> / / / Handle runaway exceptions . Shows a message box with the problem and quits the program . <nl> void handleRunawayException ( const QString & message ) ; <nl> mmm a / src / qt / bitcoingui . cpp <nl> ppp b / src / qt / bitcoingui . cpp <nl> void BitcoinGUI : : createToolBars ( ) <nl> } <nl> } <nl> <nl> - void BitcoinGUI : : setClientModel ( ClientModel * _clientModel ) <nl> + void BitcoinGUI : : setClientModel ( ClientModel * _clientModel , interfaces : : BlockAndHeaderTipInfo * tip_info ) <nl> { <nl> this - > clientModel = _clientModel ; <nl> if ( _clientModel ) <nl> void BitcoinGUI : : setClientModel ( ClientModel * _clientModel ) <nl> connect ( _clientModel , & ClientModel : : numConnectionsChanged , this , & BitcoinGUI : : setNumConnections ) ; <nl> connect ( _clientModel , & ClientModel : : networkActiveChanged , this , & BitcoinGUI : : setNetworkActive ) ; <nl> <nl> - modalOverlay - > setKnownBestHeight ( _clientModel - > getHeaderTipHeight ( ) , QDateTime : : fromTime_t ( _clientModel - > getHeaderTipTime ( ) ) ) ; <nl> - setNumBlocks ( m_node . getNumBlocks ( ) , QDateTime : : fromTime_t ( m_node . getLastBlockTime ( ) ) , m_node . getVerificationProgress ( ) , false , SynchronizationState : : INIT_DOWNLOAD ) ; <nl> + modalOverlay - > setKnownBestHeight ( tip_info - > header_height , QDateTime : : fromTime_t ( tip_info - > header_time ) ) ; <nl> + setNumBlocks ( tip_info - > block_height , QDateTime : : fromTime_t ( tip_info - > block_time ) , tip_info - > verification_progress , false , SynchronizationState : : INIT_DOWNLOAD ) ; <nl> connect ( _clientModel , & ClientModel : : numBlocksChanged , this , & BitcoinGUI : : setNumBlocks ) ; <nl> <nl> / / Receive and report messages from client model <nl> void BitcoinGUI : : setClientModel ( ClientModel * _clientModel ) <nl> / / Show progress dialog <nl> connect ( _clientModel , & ClientModel : : showProgress , this , & BitcoinGUI : : showProgress ) ; <nl> <nl> - rpcConsole - > setClientModel ( _clientModel ) ; <nl> + rpcConsole - > setClientModel ( _clientModel , tip_info - > block_height , tip_info - > block_time , tip_info - > verification_progress ) ; <nl> <nl> updateProxyIcon ( ) ; <nl> <nl> mmm a / src / qt / bitcoingui . h <nl> ppp b / src / qt / bitcoingui . h <nl> enum class SynchronizationState ; <nl> namespace interfaces { <nl> class Handler ; <nl> class Node ; <nl> + struct BlockAndHeaderTipInfo ; <nl> } <nl> <nl> QT_BEGIN_NAMESPACE <nl> class BitcoinGUI : public QMainWindow <nl> / * * Set the client model . <nl> The client model represents the part of the core that communicates with the P2P network , and is wallet - agnostic . <nl> * / <nl> - void setClientModel ( ClientModel * clientModel ) ; <nl> + void setClientModel ( ClientModel * clientModel = nullptr , interfaces : : BlockAndHeaderTipInfo * tip_info = nullptr ) ; <nl> # ifdef ENABLE_WALLET <nl> void setWalletController ( WalletController * wallet_controller ) ; <nl> # endif <nl> mmm a / src / qt / test / apptests . cpp <nl> ppp b / src / qt / test / apptests . cpp <nl> void AppTests : : appTests ( ) <nl> return GetDataDir ( ) / " blocks " ; <nl> } ( ) ) ; <nl> <nl> + qRegisterMetaType < interfaces : : BlockAndHeaderTipInfo > ( " interfaces : : BlockAndHeaderTipInfo " ) ; <nl> m_app . parameterSetup ( ) ; <nl> m_app . createOptionsModel ( true / * reset settings * / ) ; <nl> QScopedPointer < const NetworkStyle > style ( NetworkStyle : : instantiate ( Params ( ) . NetworkIDString ( ) ) ) ; <nl>
Reduce cs_main lock accumulation during GUI startup
bitcoin/bitcoin
386ec192a57b76492125d691ceda1b4aa832312e
2020-08-12T14:44:09Z
mmm a / src / mongo / util / net / ssl_manager . cpp <nl> ppp b / src / mongo / util / net / ssl_manager . cpp <nl> namespace mongo { <nl> } <nl> <nl> int SSLManager : : password_cb ( char * buf , int num , int rwflag , void * userdata ) { <nl> + / / Unless OpenSSL misbehaves , num should always be positive <nl> + fassert ( 17306 , num > 0 ) ; <nl> SSLManager * sm = static_cast < SSLManager * > ( userdata ) ; <nl> - std : : string pass = sm - > _password ; <nl> - strcpy ( buf , pass . c_str ( ) ) ; <nl> - return ( pass . size ( ) ) ; <nl> + const size_t copied = sm - > _password . copy ( buf , num - 1 ) ; <nl> + buf [ copied ] = ' \ 0 ' ; <nl> + return copied ; <nl> } <nl> <nl> int SSLManager : : verify_cb ( int ok , X509_STORE_CTX * ctx ) { <nl>
SERVER - 12110 Safe buffer handling in SSL pw callback
mongodb/mongo
b7a23c83481055a5daaec8e5686096fa7edadbb2
2013-12-19T16:23:18Z
mmm a / FDBLibTLS / FDBLibTLSSession . cpp <nl> ppp b / FDBLibTLS / FDBLibTLSSession . cpp <nl> std : : tuple < bool , std : : string > FDBLibTLSSession : : check_verify ( Reference < FDBLibTLSV <nl> / / Verify the certificate . <nl> if ( ( store_ctx = X509_STORE_CTX_new ( ) ) = = NULL ) { <nl> TraceEvent ( SevError , " FDBLibTLSOutOfMemory " , uid ) ; <nl> - reason = " FDBLibTLSOutOfMemory " ; <nl> + reason = " Out of memory " ; <nl> goto err ; <nl> } <nl> if ( ! X509_STORE_CTX_init ( store_ctx , NULL , sk_X509_value ( certs , 0 ) , certs ) ) { <nl> - reason = " FDBLibTLSStoreCtxInit " ; <nl> + reason = " Store ctx init " ; <nl> goto err ; <nl> } <nl> X509_STORE_CTX_trusted_stack ( store_ctx , policy - > roots ) ; <nl> std : : tuple < bool , std : : string > FDBLibTLSSession : : check_verify ( Reference < FDBLibTLSV <nl> X509_VERIFY_PARAM_set_flags ( X509_STORE_CTX_get0_param ( store_ctx ) , X509_V_FLAG_NO_CHECK_TIME ) ; <nl> if ( X509_verify_cert ( store_ctx ) < = 0 ) { <nl> const char * errstr = X509_verify_cert_error_string ( X509_STORE_CTX_get_error ( store_ctx ) ) ; <nl> - reason = " FDBLibTLSVerifyCert VerifyError " + std : : string ( errstr ) ; <nl> + reason = " Verify cert error : " + std : : string ( errstr ) ; <nl> goto err ; <nl> } <nl> <nl> / / Check subject criteria . <nl> cert = sk_X509_value ( store_ctx - > chain , 0 ) ; <nl> if ( ( subject = X509_get_subject_name ( cert ) ) = = NULL ) { <nl> - reason = " FDBLibTLSCertSubjectError " ; <nl> + reason = " Cert subject error " ; <nl> goto err ; <nl> } <nl> for ( auto & pair : verify - > subject_criteria ) { <nl> if ( ! match_criteria ( cert , subject , pair . first , pair . second . criteria , pair . second . match_type , pair . second . location ) ) { <nl> - reason = " FDBLibTLSCertSubjectMatchFailure " ; <nl> + reason = " Cert subject match failure " ; <nl> goto err ; <nl> } <nl> } <nl> <nl> / / Check issuer criteria . <nl> if ( ( issuer = X509_get_issuer_name ( cert ) ) = = NULL ) { <nl> - reason = " FDBLibTLSCertIssuerError " ; <nl> + reason = " Cert issuer error " ; <nl> goto err ; <nl> } <nl> for ( auto & pair : verify - > issuer_criteria ) { <nl> if ( ! match_criteria ( cert , issuer , pair . first , pair . second . criteria , pair . second . match_type , pair . second . location ) ) { <nl> - reason = " FDBLibTLSCertIssuerMatchFailure " ; <nl> + reason = " Cert issuer match failure " ; <nl> goto err ; <nl> } <nl> } <nl> std : : tuple < bool , std : : string > FDBLibTLSSession : : check_verify ( Reference < FDBLibTLSV <nl> / / Check root criteria - this is the subject of the final certificate in the stack . <nl> cert = sk_X509_value ( store_ctx - > chain , sk_X509_num ( store_ctx - > chain ) - 1 ) ; <nl> if ( ( subject = X509_get_subject_name ( cert ) ) = = NULL ) { <nl> - reason = " FDBLibTLSRootSubjectError " ; <nl> + reason = " Root subject error " ; <nl> goto err ; <nl> } <nl> for ( auto & pair : verify - > root_criteria ) { <nl> if ( ! match_criteria ( cert , subject , pair . first , pair . second . criteria , pair . second . match_type , pair . second . location ) ) { <nl> - reason = " FDBLibTLSRootSubjectMatchFailure " ; <nl> + reason = " Root subject match failure " ; <nl> goto err ; <nl> } <nl> } <nl> bool FDBLibTLSSession : : verify_peer ( ) { <nl> if ( ! rc ) { <nl> / / log the various failure reasons <nl> for ( std : : string reason : verify_failure_reasons ) { <nl> - TraceEvent ( reason . c_str ( ) , uid ) . suppressFor ( 1 . 0 ) ; <nl> + TraceEvent ( " FDBLibTLSVerifyFailure " , uid ) . detail ( " Reason " , reason ) . suppressFor ( 1 . 0 ) ; <nl> } <nl> } <nl> <nl>
Merge pull request from ajbeamon / fix - invalid - trace - type
apple/foundationdb
6bcefcbf869c1a6a439ea4d4f53c5995c4485fd5
2019-05-13T02:03:43Z
mmm a / utils / build - script - impl <nl> ppp b / utils / build - script - impl <nl> for host in " $ { ALL_HOSTS [ @ ] } " ; do <nl> # Exclude shell scripts and static archives . <nl> ( cd " $ { INSTALL_SYMROOT } " & & <nl> find . / " $ { CURRENT_PREFIX } " - perm - 0111 - type f - print | \ <nl> - grep - v crashlog . py | \ <nl> - grep - v symbolication . py | \ <nl> + grep - v ' . py $ ' | \ <nl> grep - v ' . a $ ' | \ <nl> xargs - n 1 - P $ { BUILD_JOBS } $ ( xcrun_find_tool dsymutil ) ) <nl> <nl>
Merge remote - tracking branch ' origin / master ' into master - rebranch
apple/swift
00788e519c871dd0053e37e79472da50ec61d064
2019-08-14T22:44:18Z
mmm a / hphp / runtime / ext / icu / icu . cpp <nl> ppp b / hphp / runtime / ext / icu / icu . cpp <nl> <nl> # include " hphp / runtime / base / ini - setting . h " <nl> # include " hphp / runtime / base / request - local . h " <nl> # include " hphp / runtime / base / request - event - handler . h " <nl> + # include " hphp / util / string - vsnprintf . h " <nl> # include " hphp / runtime / ext / ext_datetime . h " <nl> <nl> # include < unicode / uloc . h > <nl> void IntlError : : setError ( UErrorCode code , const char * format , . . . ) { <nl> if ( format ) { <nl> va_list args ; <nl> va_start ( args , format ) ; <nl> - char message [ 1024 ] ; <nl> - int message_len = vsnprintf ( message , sizeof ( message ) , format , args ) ; <nl> - m_errorMessage = std : : string ( message , message_len ) ; <nl> + string_vsnprintf ( m_errorMessage , format , args ) ; <nl> va_end ( args ) ; <nl> } <nl> <nl> new file mode 100644 <nl> index 00000000000 . . cc3884f3f8b <nl> mmm / dev / null <nl> ppp b / hphp / test / slow / ext_icu / error_segfault . php <nl> <nl> + < ? php <nl> + var_dump ( Transliterator : : create ( str_repeat ( " x " , 20000 ) ) ) ; <nl> + var_dump ( intl_get_error_message ( ) ) ; <nl> new file mode 100644 <nl> index 00000000000 . . e57eb202e71 <nl> mmm / dev / null <nl> ppp b / hphp / test / slow / ext_icu / error_segfault . php . expect <nl> <nl> + NULL <nl> + string ( 20081 ) " transliterator_create : unable to open ICU transliterator with id " xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx " : U_INVALID_ID " <nl>
Fix potential segfault in ICUs error handling
facebook/hhvm
8f13660801e030b252029db4d2eee67d5cc9a253
2014-07-25T06:30:21Z
mmm a / swoole_buffer . c <nl> ppp b / swoole_buffer . c <nl> void swoole_buffer_init ( int module_number ) <nl> SWOOLE_SET_CLASS_SERIALIZABLE ( swoole_buffer , zend_class_serialize_deny , zend_class_unserialize_deny ) ; <nl> SWOOLE_SET_CLASS_CLONEABLE ( swoole_buffer , zend_class_clone_deny ) ; <nl> SWOOLE_SET_CLASS_UNSET_PROPERTY_HANDLER ( swoole_buffer , zend_class_unset_property_deny ) ; <nl> + <nl> + zend_declare_property_long ( swoole_buffer_ce_ptr , ZEND_STRL ( " capacity " ) , SW_STRING_BUFFER_DEFAULT , ZEND_ACC_PUBLIC ) ; <nl> + zend_declare_property_long ( swoole_buffer_ce_ptr , ZEND_STRL ( " length " ) , 0 , ZEND_ACC_PUBLIC ) ; <nl> } <nl> <nl> static void swoole_buffer_recycle ( swString * buffer ) <nl>
Fix Swoole \ Buffer declaration .
swoole/swoole-src
2f663192b9679b5aab87f3388ce17817270ee874
2019-03-13T07:53:00Z
mmm a / . github / workflows / persubmit . yml <nl> ppp b / . github / workflows / persubmit . yml <nl> jobs : <nl> ti diagnose <nl> ti test - vr2 - t2 <nl> <nl> - build_and_test_cuda : <nl> - name : Build and Test ( CUDA ) <nl> + build_and_test_gpu : <nl> + name : Build and Test ( CUDA and OpenGL ) <nl> if : $ { { ! contains ( github . event . pull_request . labels . * . name , ' skip ci ' ) & & github . event . sender . login ! = ' taichi - gardener ' } } <nl> runs - on : [ zhen ] <nl> steps : <nl> jobs : <nl> export PYTHON = / usr / bin / python3 . 7 <nl> $ PYTHON misc / ci_setup . py ci <nl> env : <nl> - CI_SETUP_CMAKE_ARGS : - DTI_WITH_OPENGL : BOOL = OFF - DTI_WITH_CC : BOOL = $ { { matrix . with_cc } } <nl> + CI_SETUP_CMAKE_ARGS : - DTI_WITH_OPENGL : BOOL = ON - DTI_WITH_CC : BOOL = OFF <nl> <nl> - name : Test <nl> run : | <nl> jobs : <nl> export PATH = $ TAICHI_REPO_DIR / bin : $ PATH <nl> export PATH = / home / github / taichi - llvm / bin / : $ PATH <nl> export PYTHONPATH = $ TAICHI_REPO_DIR / python <nl> + export DISPLAY = : 2 <nl> + glewinfo <nl> $ PYTHON examples / laplace . py <nl> ti diagnose <nl> ti test - vr2 - t2 <nl>
[ workflow ] Test OpenGL using GitHub actions ( )
taichi-dev/taichi
15ac644489f47ab5a2fb9d7e02c75e43457cc2b8
2020-11-11T20:21:15Z
mmm a / src / webui / www / private / scripts / dynamicTable . js <nl> ppp b / src / webui / www / private / scripts / dynamicTable . js <nl> const TorrentsTable = new Class ( { <nl> else return 0 ; <nl> } ; <nl> <nl> - / / name , category <nl> + / / name , category , tags <nl> this . columns [ ' name ' ] . updateTd = function ( td , row ) { <nl> const name = escapeHtml ( this . getRowValue ( row ) ) <nl> td . set ( ' html ' , name ) ; <nl> td . set ( ' title ' , name ) ; <nl> } ; <nl> this . columns [ ' category ' ] . updateTd = this . columns [ ' name ' ] . updateTd ; <nl> + this . columns [ ' tags ' ] . updateTd = this . columns [ ' name ' ] . updateTd ; <nl> + <nl> + this . columns [ ' name ' ] . compareRows = function ( row1 , row2 ) { <nl> + const row1Val = this . getRowValue ( row1 ) ; <nl> + const row2Val = this . getRowValue ( row2 ) ; <nl> + return row1Val . localeCompare ( row2Val , undefined , { numeric : true , sensitivity : ' base ' } ) ; <nl> + } ; <nl> + this . columns [ ' category ' ] . compareRows = this . columns [ ' name ' ] . compareRows ; <nl> + this . columns [ ' tags ' ] . compareRows = this . columns [ ' name ' ] . compareRows ; <nl> <nl> / / size <nl> this . columns [ ' size ' ] . updateTd = function ( td , row ) { <nl> const TorrentsTable = new Class ( { <nl> td . set ( ' title ' , string ) ; <nl> } ; <nl> <nl> - / / tags <nl> - this . columns [ ' tags ' ] . updateTd = this . columns [ ' name ' ] . updateTd ; <nl> - <nl> / / added on <nl> this . columns [ ' added_on ' ] . updateTd = function ( td , row ) { <nl> const date = new Date ( this . getRowValue ( row ) * 1000 ) . toLocaleString ( ) ; <nl>
Sort torrent names case - insensitively in webui
qbittorrent/qBittorrent
2ded6dc63646370715e6f62ee256d5ea5e385f1e
2019-08-06T13:13:36Z
mmm a / trunk / conf / full . conf <nl> ppp b / trunk / conf / full . conf <nl> vhost with - hls . srs . com { <nl> # h264 , vn <nl> # default : h264 <nl> hls_vcodec h264 ; <nl> - # whether cleanup the old ts files . <nl> + # whether cleanup the old expired ts files . <nl> # default : on <nl> hls_cleanup on ; <nl> + # the timeout in seconds to dispose the hls , <nl> + # dispose is to remove all hls files , m3u8 and ts files . <nl> + # when timeout or server terminate , dispose hls . <nl> + # default : 300 <nl> + hls_dispose 300 ; <nl> # the max size to notify hls , <nl> # to read max bytes from ts of specified cdn network , <nl> # @ remark only used when on_hls_notify is config . <nl> mmm a / trunk / src / app / srs_app_config . cpp <nl> ppp b / trunk / src / app / srs_app_config . cpp <nl> int SrsConfig : : check_config ( ) <nl> string m = conf - > at ( j ) - > name . c_str ( ) ; <nl> if ( m ! = " enabled " & & m ! = " hls_entry_prefix " & & m ! = " hls_path " & & m ! = " hls_fragment " & & m ! = " hls_window " & & m ! = " hls_on_error " <nl> & & m ! = " hls_storage " & & m ! = " hls_mount " & & m ! = " hls_td_ratio " & & m ! = " hls_aof_ratio " & & m ! = " hls_acodec " & & m ! = " hls_vcodec " <nl> - & & m ! = " hls_m3u8_file " & & m ! = " hls_ts_file " & & m ! = " hls_ts_floor " & & m ! = " hls_cleanup " & & m ! = " hls_nb_notify " & & m ! = " hls_wait_keyframe " <nl> + & & m ! = " hls_m3u8_file " & & m ! = " hls_ts_file " & & m ! = " hls_ts_floor " & & m ! = " hls_cleanup " & & m ! = " hls_nb_notify " <nl> + & & m ! = " hls_wait_keyframe " & & m ! = " hls_dispose " <nl> ) { <nl> ret = ERROR_SYSTEM_CONFIG_INVALID ; <nl> srs_error ( " unsupported vhost hls directive % s , ret = % d " , m . c_str ( ) , ret ) ; <nl> bool SrsConfig : : get_hls_cleanup ( string vhost ) <nl> return SRS_CONF_PERFER_TRUE ( conf - > arg0 ( ) ) ; <nl> } <nl> <nl> + int SrsConfig : : get_hls_dispose ( string vhost ) <nl> + { <nl> + SrsConfDirective * conf = get_hls ( vhost ) ; <nl> + <nl> + int DEFAULT = 300 ; <nl> + <nl> + if ( ! conf ) { <nl> + return DEFAULT ; <nl> + } <nl> + <nl> + conf = conf - > get ( " hls_dispose " ) ; <nl> + if ( ! conf | | conf - > arg0 ( ) . empty ( ) ) { <nl> + return DEFAULT ; <nl> + } <nl> + <nl> + return : : atoi ( conf - > arg0 ( ) . c_str ( ) ) ; <nl> + } <nl> + <nl> bool SrsConfig : : get_hls_wait_keyframe ( string vhost ) <nl> { <nl> SrsConfDirective * hls = get_hls ( 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> * whether cleanup the old ts files . <nl> * / <nl> virtual bool get_hls_cleanup ( std : : string vhost ) ; <nl> + / * * <nl> + * the timeout to dispose the hls . <nl> + * / <nl> + virtual int get_hls_dispose ( std : : string vhost ) ; <nl> / * * <nl> * whether reap the ts when got keyframe . <nl> * / <nl> mmm a / trunk / src / app / srs_app_hls . cpp <nl> ppp b / trunk / src / app / srs_app_hls . cpp <nl> SrsHls : : ~ SrsHls ( ) <nl> srs_freep ( pprint ) ; <nl> } <nl> <nl> + void SrsHls : : dispose ( ) <nl> + { <nl> + } <nl> + <nl> + int SrsHls : : cycle ( ) <nl> + { <nl> + int ret = ERROR_SUCCESS ; <nl> + <nl> + srs_info ( " hls cycle for source % d " , source - > source_id ( ) ) ; <nl> + <nl> + return ret ; <nl> + } <nl> + <nl> int SrsHls : : initialize ( SrsSource * s , ISrsHlsHandler * h ) <nl> { <nl> int ret = ERROR_SUCCESS ; <nl> mmm a / trunk / src / app / srs_app_hls . hpp <nl> ppp b / trunk / src / app / srs_app_hls . hpp <nl> class SrsHls <nl> public : <nl> SrsHls ( ) ; <nl> virtual ~ SrsHls ( ) ; <nl> + public : <nl> + virtual void dispose ( ) ; <nl> + virtual int cycle ( ) ; <nl> public : <nl> / * * <nl> * initialize the hls by handler and source . <nl> mmm a / trunk / src / app / srs_app_server . cpp <nl> ppp b / trunk / src / app / srs_app_server . cpp <nl> void SrsServer : : dispose ( ) <nl> <nl> # ifdef SRS_AUTO_INGEST <nl> ingester - > dispose ( ) ; <nl> - srs_trace ( " gracefully cleanup ingesters " ) ; <nl> + srs_trace ( " gracefully dispose ingesters " ) ; <nl> # endif <nl> <nl> + SrsSource : : dispose_all ( ) ; <nl> + srs_trace ( " gracefully dispose sources " ) ; <nl> + <nl> srs_trace ( " terminate server " ) ; <nl> } <nl> <nl> int SrsServer : : do_cycle ( ) <nl> srs_trace ( " reload config success . " ) ; <nl> } <nl> <nl> + / / notice the stream sources to cycle . <nl> + if ( ( ret = SrsSource : : cycle_all ( ) ) ! = ERROR_SUCCESS ) { <nl> + return ret ; <nl> + } <nl> + <nl> / / update the cache time <nl> if ( ( i % SRS_SYS_TIME_RESOLUTION_MS_TIMES ) = = 0 ) { <nl> srs_info ( " update current time cache . " ) ; <nl> mmm a / trunk / src / app / srs_app_source . cpp <nl> ppp b / trunk / src / app / srs_app_source . cpp <nl> SrsSource * SrsSource : : fetch ( std : : string vhost , std : : string app , std : : string stre <nl> return source ; <nl> } <nl> <nl> + void SrsSource : : dispose_all ( ) <nl> + { <nl> + std : : map < std : : string , SrsSource * > : : iterator it ; <nl> + for ( it = pool . begin ( ) ; it ! = pool . end ( ) ; + + it ) { <nl> + SrsSource * source = it - > second ; <nl> + source - > dispose ( ) ; <nl> + } <nl> + return ; <nl> + } <nl> + <nl> + int SrsSource : : cycle_all ( ) <nl> + { <nl> + int ret = ERROR_SUCCESS ; <nl> + <nl> + / / TODO : FIXME : support remove dead source for a long time . <nl> + std : : map < std : : string , SrsSource * > : : iterator it ; <nl> + for ( it = pool . begin ( ) ; it ! = pool . end ( ) ; + + it ) { <nl> + SrsSource * source = it - > second ; <nl> + if ( ( ret = source - > cycle ( ) ) ! = ERROR_SUCCESS ) { <nl> + return ret ; <nl> + } <nl> + } <nl> + <nl> + return ret ; <nl> + } <nl> + <nl> void SrsSource : : destroy ( ) <nl> { <nl> std : : map < std : : string , SrsSource * > : : iterator it ; <nl> SrsSource : : ~ SrsSource ( ) <nl> srs_freep ( _req ) ; <nl> } <nl> <nl> + void SrsSource : : dispose ( ) <nl> + { <nl> + # ifdef SRS_AUTO_HLS <nl> + hls - > dispose ( ) ; <nl> + # endif <nl> + } <nl> + <nl> + int SrsSource : : cycle ( ) <nl> + { <nl> + int ret = ERROR_SUCCESS ; <nl> + <nl> + # ifdef SRS_AUTO_HLS <nl> + if ( ( ret = hls - > cycle ( ) ) ! = ERROR_SUCCESS ) { <nl> + return ret ; <nl> + } <nl> + # endif <nl> + <nl> + return ret ; <nl> + } <nl> + <nl> int SrsSource : : initialize ( SrsRequest * r , ISrsSourceHandler * h , ISrsHlsHandler * hh ) <nl> { <nl> int ret = ERROR_SUCCESS ; <nl> mmm a / trunk / src / app / srs_app_source . hpp <nl> ppp b / trunk / src / app / srs_app_source . hpp <nl> class SrsSource : public ISrsReloadHandler <nl> * get the exists source by stream info ( vhost , app , stream ) , NULL when not exists . <nl> * / <nl> static SrsSource * fetch ( std : : string vhost , std : : string app , std : : string stream ) ; <nl> + / * * <nl> + * dispose and cycle all sources . <nl> + * / <nl> + static void dispose_all ( ) ; <nl> + static int cycle_all ( ) ; <nl> / * * <nl> * when system exit , destroy the sources , <nl> * for gmc to analysis mem leaks . <nl> class SrsSource : public ISrsReloadHandler <nl> public : <nl> SrsSource ( ) ; <nl> virtual ~ SrsSource ( ) ; <nl> + public : <nl> + virtual void dispose ( ) ; <nl> + virtual int cycle ( ) ; <nl> / / initialize , get and setter . <nl> public : <nl> / * * <nl>
for , server cycle to enable the hls to cleanup . do dispose
ossrs/srs
d611bb6b45312e4c92acfea462e1f7206b446d9a
2015-05-30T02:48:02Z
mmm a / lib / SILAnalysis / AliasAnalysis . cpp <nl> ppp b / lib / SILAnalysis / AliasAnalysis . cpp <nl> static bool aggregateContainsRecord ( NominalTypeDecl * Aggregate , Type Record , SIL <nl> return false ; <nl> } <nl> <nl> - / / / \ brief return True if the TBAA rules for \ p T1 and \ p T2 dictate that typed <nl> - / / / access to these types is undefined . False means that types may alias . <nl> - static bool typesForbidAliasing ( SILType T1 , SILType T2 , SILModule & Mod ) { <nl> + / / / \ brief return True if the types \ p T1 and \ p T2 may alias . <nl> + / / / See the TBAA section in the SIL reference manual . <nl> + static bool typesMayAlias ( SILType T1 , SILType T2 , SILModule & Mod ) { <nl> if ( T1 = = T2 ) <nl> - return false ; <nl> + return true ; <nl> <nl> / / We only operate on address types . <nl> if ( ! T1 . isAddress ( ) | | ! T2 . isAddress ( ) ) <nl> - return false ; <nl> + return true ; <nl> <nl> CanType CT1 = T1 . getSwiftRValueType ( ) ; <nl> CanType CT2 = T2 . getSwiftRValueType ( ) ; <nl> static bool typesForbidAliasing ( SILType T1 , SILType T2 , SILModule & Mod ) { <nl> <nl> / / Raw pointers may alias anything . <nl> if ( IsRawPtr1 | | IsRawPtr2 ) <nl> - return false ; <nl> + return true ; <nl> <nl> / / If the types have unbound generic arguments then we don ' t know the possible <nl> / / range of the type . A type such as $ Array < Int > may alias $ Array < T > . <nl> / / Right now we are conservative and we assume that $ UnsafePointer < T > and $ Int <nl> / / may alias . <nl> if ( hasUnboundGenericTypes ( CT1 ) | | hasUnboundGenericTypes ( CT2 ) ) <nl> - return false ; <nl> + return true ; <nl> <nl> / / Builtin . ObjectPointer is the root of the class hierarchy may alias classes . <nl> if ( ( IsObjPtr1 & & AsClass2 ) | | <nl> ( IsObjPtr2 & & AsClass1 ) ) <nl> - return false ; <nl> + return true ; <nl> <nl> / / If one type is an aggregate and it contains the other type then <nl> / / the record reference may alias the aggregate reference . <nl> if ( ( AsNominal1 & & aggregateContainsRecord ( AsNominal1 , CT2 , Mod ) ) | | <nl> ( AsNominal2 & & aggregateContainsRecord ( AsNominal2 , CT1 , Mod ) ) ) <nl> - return false ; <nl> + return true ; <nl> <nl> / / Structs don ' t alias non - structs . <nl> if ( AsStruct1 | | AsStruct2 ) <nl> - return true ; <nl> + return false ; <nl> <nl> / / Enums don ' t alias non - enums . <nl> if ( AsEnum1 | | AsEnum2 ) <nl> - return true ; <nl> + return false ; <nl> <nl> / / Classes don ' t alias non - classes . At the moment we don ' t follow the <nl> / / class hierarchy so we can ' t tell if two classes inherit from one another . <nl> if ( ( AsClass1 & & ! AsClass2 ) | | <nl> ( AsClass2 & & ! AsClass1 ) ) <nl> - return true ; <nl> + return false ; <nl> <nl> / / MayAlias . <nl> - return false ; <nl> + return true ; <nl> } <nl> <nl> / / = = = mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - = = = / / <nl> AliasAnalysis : : AliasResult AliasAnalysis : : alias ( SILValue V1 , SILValue V2 ) { <nl> DEBUG ( llvm : : dbgs ( ) < < " ALIAS ANALYSIS : \ n V1 : " < < * V1 . getDef ( ) <nl> < < " V2 : " < < * V2 . getDef ( ) ) ; <nl> <nl> - if ( typesForbidAliasing ( V1 . getType ( ) , V2 . getType ( ) , * Mod ) ) <nl> + if ( ! typesMayAlias ( V1 . getType ( ) , V2 . getType ( ) , * Mod ) ) <nl> return AliasResult : : NoAlias ; <nl> <nl> / / Strip off any casts on V1 , V2 . <nl>
Reverse the boolean logic of the function to make it more readable . NFC .
apple/swift
722c5f881793b49a949e78c750400de163d05c2d
2014-03-26T05:51:23Z
mmm a / hphp / hack / src / hh_single_type_check . ml <nl> ppp b / hphp / hack / src / hh_single_type_check . ml <nl> let print_global_inference_envs ctx ~ verbosity gienvs = <nl> let merge_global_inference_envs_opt ctx gienvs = <nl> if TypecheckerOptions . global_inference ctx . Provider_context . tcopt then <nl> let open Typing_global_inference in <nl> - let env = Typing_env . empty ctx Relative_path . default None in <nl> - let state_errors = StateErrors . mk_empty ( ) in <nl> let ( env , state_errors ) = <nl> - StateConstraintGraph . merge_subgraphs ( env , state_errors ) gienvs <nl> + StateConstraintGraph . merge_subgraphs <nl> + ~ tcopt : ctx . Provider_context . tcopt <nl> + gienvs <nl> in <nl> ( * we are not going to print type variables without any bounds * ) <nl> let env = { env with inference_env = Inf . compress env . inference_env } in <nl> mmm a / hphp / hack / src / server / serverGlobalInference . ml <nl> ppp b / hphp / hack / src / server / serverGlobalInference . ml <nl> module Mode_merge = struct <nl> > > = fun ( input , output ) - > <nl> let subgraphs = Disk . readdir input in <nl> Hh_logger . log " GI : Merging % d files " ( Array . length subgraphs ) ; <nl> - let env = <nl> - Typing_env . empty <nl> - ( Provider_context . empty_for_tool <nl> - ~ tcopt : GlobalOptions . default <nl> - ~ backend : Provider_backend . Shared_memory ) <nl> - ( Relative_path . from_root " " ) <nl> - ~ droot : None <nl> + let subgraphs = <nl> + List . map ( Array . to_list subgraphs ) ~ f : ( Filename . concat input ) <nl> in <nl> - let genv = env . genv in <nl> - let progress_i = ref 0 in <nl> - let log_progress fn = <nl> - Hh_logger . log <nl> - " GI : Merging % d / % d : % s " <nl> - ( ! progress_i + 1 ) <nl> - ( Array . length subgraphs ) <nl> - fn ; <nl> - progress_i : = ! progress_i + 1 ; <nl> - fn <nl> - in <nl> - ( * Merging happens here * ) <nl> - let ( env , errors ) = <nl> - Array . foldi <nl> - ~ f : ( fun _ ( env , errors ) subgraph_file - > <nl> - Filename . concat input subgraph_file <nl> - | > log_progress <nl> - | > StateSubConstraintGraphs . load <nl> - | > StateConstraintGraph . merge_subgraphs ( env , errors ) ) <nl> - ~ init : ( env , StateErrors . mk_empty ( ) ) <nl> - subgraphs <nl> - in <nl> - let env = { env with genv } in <nl> + let subgraphs = List . map subgraphs ~ f : StateSubConstraintGraphs . load in <nl> + let subgraphs = List . concat subgraphs in <nl> + let ( env , errors ) = StateConstraintGraph . merge_subgraphs subgraphs in <nl> Hh_logger . log " GI : Saving to % s " output ; <nl> StateConstraintGraph . save output ( env , errors ) ; <nl> Ok ( ) <nl> mmm a / hphp / hack / src / typing / typing_global_inference . ml <nl> ppp b / hphp / hack / src / typing / typing_global_inference . ml <nl> module StateConstraintGraph = struct <nl> let merge_subgraph ( env , errors ) ( ( pos , subgraph ) : Inf . t_global_with_pos ) = <nl> Typing_log . GI . log_merging_subgraph env pos ; <nl> let vars = Inf . get_vars_g subgraph in <nl> - let env = <nl> - List . fold vars ~ init : env ~ f : ( Env . initialize_tyvar_as_in ~ as_in : subgraph ) <nl> - in <nl> List . fold vars ~ init : ( env , errors ) ~ f : ( fun ( env , errors ) v - > <nl> merge_var ( env , errors ) ( pos , subgraph ) v ) <nl> <nl> - let merge_subgraphs ( env , errors ) subgraphs = <nl> + let merge_subgraphs ? ( tcopt = GlobalOptions . default ) subgraphs = <nl> + ( * Collect each global tyvar and map it to a global environment in <nl> + * which it lives . Give preference to the global environment which also <nl> + * has positional information for this type variable * ) <nl> + let initial_tyvar_sources : ( Pos . t * Inf . t_global ) IMap . t = <nl> + List . fold subgraphs ~ init : IMap . empty ~ f : ( fun m ( _ , genv ) - > <nl> + List . fold ( Inf . get_vars_g genv ) ~ init : m ~ f : ( fun m var - > <nl> + IMap . update <nl> + var <nl> + ( function <nl> + | Some ( pos , genv ) when not ( Pos . equal pos Pos . none ) - > <nl> + Some ( pos , genv ) <nl> + | None <nl> + | Some ( _ , _ ) - > <nl> + Some ( Inf . get_tyvar_pos_exn_g genv var , genv ) ) <nl> + m ) ) <nl> + in <nl> + ( * copy each initial variable to the new environment * ) <nl> + let env = <nl> + Typing_env . empty <nl> + ( Provider_context . empty_for_worker ~ tcopt ) <nl> + Relative_path . default <nl> + ~ droot : None <nl> + in <nl> + let errors = StateErrors . mk_empty ( ) in <nl> + let env = <nl> + IMap . fold <nl> + ( fun var ( _ , genv ) env - > <nl> + Env . initialize_tyvar_as_in ~ as_in : genv env var ) <nl> + initial_tyvar_sources <nl> + env <nl> + in <nl> List . fold ~ f : merge_subgraph ~ init : ( env , errors ) subgraphs <nl> end <nl> <nl> mmm a / hphp / hack / src / typing / typing_global_inference . mli <nl> ppp b / hphp / hack / src / typing / typing_global_inference . mli <nl> module StateConstraintGraph : sig <nl> <nl> val save : string - > t - > unit <nl> <nl> - val merge_subgraphs : t - > StateSubConstraintGraphs . t - > t <nl> + val merge_subgraphs : <nl> + ? tcopt : TypecheckerOptions . t - > StateSubConstraintGraphs . t - > t <nl> end <nl> <nl> module StateSolvedGraph : sig <nl> mmm a / hphp / hack / src / typing / typing_inference_env . ml <nl> ppp b / hphp / hack / src / typing / typing_inference_env . ml <nl> let copy_tyvar_from_genv_to_env v ~ to_ : ( env : t ) ~ from : ( genv : t_global ) = <nl> let tvinfo = <nl> get_tyvar_info_exn_g genv v | > global_tyvar_info_to_dummy_tyvar_info <nl> in <nl> - let v ' = <nl> + let rec get_tmp v = <nl> if has_var env v then <nl> - Ident . tmp ( ) <nl> + get_tmp ( Ident . tmp ( ) ) <nl> else <nl> v <nl> in <nl> + let v ' = get_tmp v in <nl> let env = set_tyvar_info env v ' tvinfo in <nl> ( env , v ' ) <nl> <nl>
Pre - initialize global variables before merging
facebook/hhvm
e30de584be3116289fde12382b2f30bb34cb913d
2020-02-13T16:32:02Z
mmm a / jstests / replsets / reconstruct_prepared_transactions_initial_sync_index_build . js <nl> ppp b / jstests / replsets / reconstruct_prepared_transactions_initial_sync_index_build . js <nl> <nl> * of initial sync . Additionally , we will test that a background index build blocks this particular <nl> * situation until the index build is finished . <nl> * <nl> + * TODO ( SERVER - 44042 ) : Remove two_phase_index_builds_unsupported tag . <nl> * @ tags : [ <nl> * uses_transactions , <nl> * uses_prepare_transaction , <nl> + * two_phase_index_builds_unsupported , <nl> * ] <nl> * / <nl> <nl> jsTestLog ( " Resuming initial sync " ) ; <nl> assert . commandWorked ( secondary . adminCommand ( <nl> { configureFailPoint : " initialSyncHangDuringCollectionClone " , mode : " off " } ) ) ; <nl> <nl> - const enableTwoPhaseIndexBuild = <nl> - assert . commandWorked ( primary . adminCommand ( { getParameter : 1 , enableTwoPhaseIndexBuild : 1 } ) ) <nl> - . enableTwoPhaseIndexBuild ; <nl> - if ( ! enableTwoPhaseIndexBuild ) { <nl> - / / Wait for log message . <nl> - assert . soon ( <nl> - ( ) = > <nl> - rawMongoProgramOutput ( ) . indexOf ( <nl> - " blocking replication until index builds are finished on test . reconstruct_prepared_transactions_initial_sync_index_build , due to prepared transaction " ) > = <nl> - 0 , <nl> - " replication not hanging " ) ; <nl> - } <nl> + / / Wait for log message . <nl> + assert . soon ( <nl> + ( ) = > <nl> + rawMongoProgramOutput ( ) . indexOf ( <nl> + " blocking replication until index builds are finished on test . reconstruct_prepared_transactions_initial_sync_index_build , due to prepared transaction " ) > = <nl> + 0 , <nl> + " replication not hanging " ) ; <nl> <nl> / / Unblock index build . <nl> assert . commandWorked ( <nl>
Revert " SERVER - 44042 Enable reconstruct_prepared_transactions_initial_sync_index_build . js when two phase index builds are enabled "
mongodb/mongo
27b29ec51fecc0ebdd79e22fb688e662c99c8079
2019-10-26T11:53:43Z
mmm a / src / dbg / formatfunctions . cpp <nl> ppp b / src / dbg / formatfunctions . cpp <nl> <nl> # include " memory . h " <nl> # include " exception . h " <nl> # include " ntdll / ntdll . h " <nl> + # include " disasm_fast . h " <nl> <nl> std : : unordered_map < String , FormatFunctions : : Function > FormatFunctions : : mFunctions ; <nl> <nl> static FORMATRESULT formatErrorMsg ( HMODULE DLL , const String & errName , DWORD co <nl> } <nl> } <nl> <nl> + template < class Char , size_t DefaultSize = 0 > <nl> + static FORMATRESULT memoryFormatter ( char * dest , size_t destCount , int argc , char * argv [ ] , duint addr , const std : : function < String ( std : : vector < Char > & ) > & format ) <nl> + { <nl> + duint size = DefaultSize ; <nl> + if ( argc > 1 & & ! valfromstring ( argv [ 1 ] , & size ) ) <nl> + { <nl> + strcpy_s ( dest , destCount , GuiTranslateText ( QT_TRANSLATE_NOOP ( " DBG " , " Invalid argument . . . " ) ) ) ; <nl> + return FORMAT_ERROR_MESSAGE ; <nl> + } <nl> + if ( size = = 0 ) <nl> + { <nl> + strcpy_s ( dest , destCount , GuiTranslateText ( QT_TRANSLATE_NOOP ( " DBG " , " Not enough arguments . . . " ) ) ) ; <nl> + return FORMAT_ERROR_MESSAGE ; <nl> + } <nl> + if ( size > 1024 * 1024 * 10 ) / / 10MB max <nl> + { <nl> + strcpy_s ( dest , destCount , GuiTranslateText ( QT_TRANSLATE_NOOP ( " DBG " , " Too much data ( 10MB max ) . . . " ) ) ) ; <nl> + return FORMAT_ERROR_MESSAGE ; <nl> + } <nl> + std : : vector < Char > data ( size ) ; <nl> + if ( ! MemRead ( addr , data . data ( ) , size * sizeof ( Char ) ) ) <nl> + { <nl> + strcpy_s ( dest , destCount , GuiTranslateText ( QT_TRANSLATE_NOOP ( " DBG " , " Failed to read memory . . . " ) ) ) ; <nl> + return FORMAT_ERROR_MESSAGE ; <nl> + } <nl> + auto result = format ( data ) ; <nl> + if ( result . size ( ) > destCount ) <nl> + return FORMAT_BUFFER_TOO_SMALL ; <nl> + strcpy_s ( dest , destCount , result . c_str ( ) ) ; <nl> + return FORMAT_SUCCESS ; <nl> + } <nl> + <nl> + static FORMATRESULT formatcpy_s ( char * dest , size_t destCount , const char * source ) <nl> + { <nl> + switch ( strncpy_s ( dest , destCount , source , _TRUNCATE ) ) <nl> + { <nl> + case 0 : <nl> + return FORMAT_SUCCESS ; <nl> + case ERANGE : <nl> + case STRUNCATE : <nl> + return FORMAT_BUFFER_TOO_SMALL ; <nl> + default : <nl> + return FORMAT_ERROR ; <nl> + } <nl> + } <nl> + <nl> void FormatFunctions : : Init ( ) <nl> { <nl> Register ( " mem " , [ ] ( char * dest , size_t destCount , int argc , char * argv [ ] , duint addr , void * userdata ) <nl> { <nl> - duint size ; <nl> - if ( argc < 2 | | ! valfromstring ( argv [ 1 ] , & size ) ) <nl> + return memoryFormatter < unsigned char > ( dest , destCount , argc , argv , addr , [ ] ( std : : vector < unsigned char > & data ) <nl> { <nl> - strcpy_s ( dest , destCount , GuiTranslateText ( QT_TRANSLATE_NOOP ( " DBG " , " Invalid argument . . . " ) ) ) ; <nl> - return FORMAT_ERROR_MESSAGE ; <nl> - } <nl> - if ( size > 1024 * 1024 * 10 ) / / 10MB max <nl> + return StringUtils : : ToHex ( data . data ( ) , data . size ( ) ) ; <nl> + } ) ; <nl> + } ) ; <nl> + <nl> + Register ( " ascii " , [ ] ( char * dest , size_t destCount , int argc , char * argv [ ] , duint addr , void * userdata ) <nl> + { <nl> + return memoryFormatter < unsigned char , 512 > ( dest , destCount , argc , argv , addr , [ ] ( std : : vector < unsigned char > & data ) <nl> { <nl> - strcpy_s ( dest , destCount , GuiTranslateText ( QT_TRANSLATE_NOOP ( " DBG " , " Too much data ( 10MB max ) . . . " ) ) ) ; <nl> - return FORMAT_ERROR_MESSAGE ; <nl> - } <nl> - std : : vector < unsigned char > data ( size ) ; <nl> - if ( ! MemRead ( addr , data . data ( ) , data . size ( ) ) ) <nl> + String result ; <nl> + result . reserve ( data . size ( ) ) ; <nl> + for ( auto & ch : data ) <nl> + { <nl> + if ( isprint ( ch ) ) <nl> + result . push_back ( char ( ch ) ) ; <nl> + else <nl> + result . push_back ( ' ? ' ) ; <nl> + } <nl> + return result ; <nl> + } ) ; <nl> + } ) ; <nl> + <nl> + Register ( " ansi " , [ ] ( char * dest , size_t destCount , int argc , char * argv [ ] , duint addr , void * userdata ) <nl> + { <nl> + return memoryFormatter < char , 512 > ( dest , destCount , argc , argv , addr , [ ] ( std : : vector < char > & data ) <nl> { <nl> - strcpy_s ( dest , destCount , GuiTranslateText ( QT_TRANSLATE_NOOP ( " DBG " , " Failed to read memory . . . " ) ) ) ; <nl> - return FORMAT_ERROR_MESSAGE ; <nl> - } <nl> - auto result = StringUtils : : ToHex ( data . data ( ) , data . size ( ) ) ; <nl> - if ( result . size ( ) > destCount ) <nl> - return FORMAT_BUFFER_TOO_SMALL ; <nl> - strcpy_s ( dest , destCount , result . c_str ( ) ) ; <nl> - return FORMAT_SUCCESS ; <nl> + if ( data . empty ( ) | | data . back ( ) ! = ' \ 0 ' ) <nl> + data . push_back ( ' \ 0 ' ) ; <nl> + return StringUtils : : LocalCpToUtf8 ( data . data ( ) ) ; <nl> + } ) ; <nl> + } ) ; <nl> + <nl> + Register ( " utf8 " , [ ] ( char * dest , size_t destCount , int argc , char * argv [ ] , duint addr , void * userdata ) <nl> + { <nl> + return memoryFormatter < char , 512 > ( dest , destCount , argc , argv , addr , [ ] ( std : : vector < char > & data ) <nl> + { <nl> + if ( data . empty ( ) | | data . back ( ) ! = ' \ 0 ' ) <nl> + data . push_back ( ' \ 0 ' ) ; <nl> + return String ( data . data ( ) ) ; <nl> + } ) ; <nl> + } ) ; <nl> + <nl> + Register ( " utf16 " , [ ] ( char * dest , size_t destCount , int argc , char * argv [ ] , duint addr , void * userdata ) <nl> + { <nl> + return memoryFormatter < wchar_t , 512 > ( dest , destCount , argc , argv , addr , [ ] ( std : : vector < wchar_t > & data ) <nl> + { <nl> + if ( data . empty ( ) | | data . back ( ) ! = L ' \ 0 ' ) <nl> + data . push_back ( L ' \ 0 ' ) ; <nl> + return StringUtils : : Utf16ToUtf8 ( data . data ( ) ) ; <nl> + } ) ; <nl> } ) ; <nl> <nl> Register ( " winerror " , [ ] ( char * dest , size_t destCount , int argc , char * argv [ ] , duint code , void * userdata ) <nl> void FormatFunctions : : Init ( ) <nl> if ( errName . size ( ) = = 0 ) <nl> errName = StringUtils : : sprintf ( " % 08X " , DWORD ( code ) ) ; <nl> <nl> - return formatErrorMsg ( GetModuleHandleW ( L " kernel32 . dll " ) , errName , code , dest , destCount ) ; <nl> + return formatErrorMsg ( GetModuleHandleW ( L " kernel32 . dll " ) , errName , DWORD ( code ) , dest , destCount ) ; <nl> } ) ; <nl> <nl> Register ( " ntstatus " , [ ] ( char * dest , size_t destCount , int argc , char * argv [ ] , duint code , void * userdata ) <nl> void FormatFunctions : : Init ( ) <nl> if ( errName . size ( ) = = 0 ) <nl> errName = StringUtils : : sprintf ( " % 08X " , DWORD ( code ) ) ; <nl> <nl> - return formatErrorMsg ( GetModuleHandleW ( L " ntdll . dll " ) , errName , code , dest , destCount ) ; <nl> + return formatErrorMsg ( GetModuleHandleW ( L " ntdll . dll " ) , errName , DWORD ( code ) , dest , destCount ) ; <nl> + } ) ; <nl> + <nl> + Register ( " disasm " , [ ] ( char * dest , size_t destCount , int argc , char * argv [ ] , duint addr , void * userdata ) <nl> + { <nl> + const char * result = nullptr ; <nl> + BASIC_INSTRUCTION_INFO info ; <nl> + if ( ! disasmfast ( addr , & info , true ) ) <nl> + result = " ? ? ? " ; <nl> + else <nl> + result = info . instruction ; <nl> + return formatcpy_s ( dest , destCount , result ) ; <nl> + } ) ; <nl> + <nl> + Register ( " modname " , [ ] ( char * dest , size_t destCount , int argc , char * argv [ ] , duint addr , void * userdata ) <nl> + { <nl> + char mod [ MAX_MODULE_SIZE ] = " " ; <nl> + if ( ! ModNameFromAddr ( addr , mod , true ) ) <nl> + return FORMAT_ERROR ; <nl> + return formatcpy_s ( dest , destCount , mod ) ; <nl> } ) ; <nl> } <nl> <nl>
DBG : add some more helpful format functions
x64dbg/x64dbg
223ea586bb5240439ec554d0c3d61643afbecd37
2019-01-10T22:54:31Z
mmm a / src / mongo / db / s / collection_sharding_state . h <nl> ppp b / src / mongo / db / s / collection_sharding_state . h <nl> class CollectionShardingState { <nl> * is added to permit ( most ) dependent queries on secondaries to complete , too . <nl> * <nl> * Call result . waitStatus ( opCtx ) to wait for the deletion to complete or fail . If that succeeds , <nl> - * call waitForClean to ensure no other deletions are pending for the range . Call <nl> - * result . abandon ( ) , instead , to ignore the outcome . <nl> + * waitForClean can be called to ensure no other deletions are pending for the range . Call <nl> + * result . abandon ( ) , instead of waitStatus , to ignore the outcome . <nl> * / <nl> enum CleanWhen { kNow , kDelayed } ; <nl> auto cleanUpRange ( ChunkRange const & range , CleanWhen ) - > CleanupNotification ; <nl> mmm a / src / mongo / db / s / migration_source_manager . cpp <nl> ppp b / src / mongo / db / s / migration_source_manager . cpp <nl> Status MigrationSourceManager : : commitChunkMetadataOnConfig ( OperationContext * opC <nl> / / Migration succeeded <nl> log ( ) < < " Migration succeeded and updated collection version to " <nl> < < refreshedMetadata - > getCollVersion ( ) ; <nl> - <nl> - / / Schedule clearing out orphaned documents when they are no longer in active use . <nl> - const auto orphans = ChunkRange ( _args . getMinKey ( ) , _args . getMaxKey ( ) ) ; <nl> - auto const now = CollectionShardingState : : kNow , later = CollectionShardingState : : kDelayed ; <nl> - auto whenToClean = _args . getWaitForDelete ( ) ? now : later ; <nl> - <nl> - auto notification = css - > cleanUpRange ( orphans , whenToClean ) ; <nl> - if ( notification . ready ( ) & & ! notification . waitStatus ( opCtx ) . isOK ( ) ) { <nl> - / / if it fails immediately , report that and continue . <nl> - warning ( ) < < " Failed to initiate cleanup of " < < getNss ( ) . ns ( ) < < " orphan range " <nl> - < < redact ( orphans . toString ( ) ) < < " : " <nl> - < < redact ( notification . waitStatus ( opCtx ) . reason ( ) ) ; <nl> - } <nl> - notification . abandon ( ) ; <nl> } else { <nl> AutoGetCollection autoColl ( opCtx , getNss ( ) , MODE_IX , MODE_X ) ; <nl> <nl> mmm a / src / mongo / db / s / move_chunk_command . cpp <nl> ppp b / src / mongo / db / s / move_chunk_command . cpp <nl> <nl> # include " mongo / db / s / migration_source_manager . h " <nl> # include " mongo / db / s / move_timing_helper . h " <nl> # include " mongo / db / s / sharding_state . h " <nl> + # include " mongo / s / catalog_cache . h " <nl> # include " mongo / s / client / shard_registry . h " <nl> # include " mongo / s / grid . h " <nl> # include " mongo / s / migration_secondary_throttle_options . h " <nl> class MoveChunkCommand : public Command { <nl> MONGO_FAIL_POINT_PAUSE_WHILE_SET ( moveChunkHangAtStep6 ) ; <nl> <nl> auto nss = moveChunkRequest . getNss ( ) ; <nl> - auto range = ChunkRange ( moveChunkRequest . getMinKey ( ) , moveChunkRequest . getMaxKey ( ) ) ; <nl> - auto const now = CollectionShardingState : : kNow , later = CollectionShardingState : : kDelayed ; <nl> - auto whenToClean = moveChunkRequest . getWaitForDelete ( ) ? now : later ; <nl> - if ( whenToClean = = now ) { <nl> + const auto range = ChunkRange ( moveChunkRequest . getMinKey ( ) , moveChunkRequest . getMaxKey ( ) ) ; <nl> + <nl> + / / Wait for the metadata update to be persisted before scheduling the range deletion . <nl> + / / <nl> + / / This is necessary to prevent a race on the secondary because both metadata persistence <nl> + / / and range deletion is done asynchronously and we must prevent the data deletion from <nl> + / / being propagated before the metadata update . <nl> + ScopedCollectionMetadata metadata = [ & ] ( ) { <nl> + AutoGetCollection autoColl ( opCtx , nss , MODE_IS ) ; <nl> + return CollectionShardingState : : get ( opCtx , nss ) - > getMetadata ( ) ; <nl> + } ( ) ; <nl> + uassert ( ErrorCodes : : NamespaceNotSharded , <nl> + str : : stream ( ) < < " Chunk move failed because collection ' " < < nss . ns ( ) <nl> + < < " ' is no longer sharded . " , <nl> + metadata ) ; <nl> + uassertStatusOK ( Grid : : get ( opCtx ) - > catalogCache ( ) - > waitForCollectionVersion ( <nl> + opCtx , nss , metadata - > getCollVersion ( ) ) ) ; <nl> + <nl> + / / Now schedule the range deletion clean up . <nl> + CollectionShardingState : : CleanupNotification notification ; <nl> + { <nl> + AutoGetCollection autoColl ( opCtx , nss , MODE_IS ) ; <nl> + <nl> + auto const now = CollectionShardingState : : kNow , <nl> + later = CollectionShardingState : : kDelayed ; <nl> + auto whenToClean = moveChunkRequest . getWaitForDelete ( ) ? now : later ; <nl> + notification = <nl> + CollectionShardingState : : get ( opCtx , nss ) - > cleanUpRange ( range , whenToClean ) ; <nl> + } <nl> + <nl> + / / Check for immediate failure on scheduling range deletion . <nl> + if ( notification . ready ( ) & & ! notification . waitStatus ( opCtx ) . isOK ( ) ) { <nl> + warning ( ) < < " Failed to initiate cleanup of " < < nss . ns ( ) < < " range " <nl> + < < redact ( range . toString ( ) ) <nl> + < < " due to : " < < redact ( notification . waitStatus ( opCtx ) ) ; <nl> + } else if ( moveChunkRequest . getWaitForDelete ( ) ) { <nl> log ( ) < < " Waiting for cleanup of " < < nss . ns ( ) < < " range " < < redact ( range . toString ( ) ) ; <nl> - CollectionShardingState : : waitForClean ( <nl> - opCtx , moveChunkRequest . getNss ( ) , moveChunkRequest . getVersionEpoch ( ) , range ) <nl> - . transitional_ignore ( ) ; <nl> - / / Ensure that wait for write concern for the chunk cleanup will include <nl> - / / the deletes performed by the range deleter thread . <nl> + uassertStatusOK ( notification . waitStatus ( opCtx ) ) ; <nl> + <nl> + / / Ensure that wait for write concern for the chunk cleanup will include the deletes <nl> + / / performed by the range deleter thread . <nl> repl : : ReplClientInfo : : forClient ( opCtx - > getClient ( ) ) . setLastOpToSystemLastOpTime ( opCtx ) ; <nl> } else { <nl> log ( ) < < " Leaving cleanup of " < < nss . ns ( ) < < " range " < < redact ( range . toString ( ) ) <nl> < < " to complete in background " ; <nl> + notification . abandon ( ) ; <nl> } <nl> + <nl> moveTimingHelper . done ( 7 ) ; <nl> MONGO_FAIL_POINT_PAUSE_WHILE_SET ( moveChunkHangAtStep7 ) ; <nl> } <nl> mmm a / src / mongo / db / s / shard_server_catalog_cache_loader . cpp <nl> ppp b / src / mongo / db / s / shard_server_catalog_cache_loader . cpp <nl> void ShardServerCatalogCacheLoader : : notifyOfCollectionVersionUpdate ( OperationCon <nl> _namespaceNotifications . notifyChange ( nss ) ; <nl> } <nl> <nl> + Status ShardServerCatalogCacheLoader : : waitForCollectionVersion ( OperationContext * opCtx , <nl> + const NamespaceString & nss , <nl> + const ChunkVersion & version ) { <nl> + invariant ( ! opCtx - > lockState ( ) - > isLocked ( ) ) ; <nl> + while ( true ) { <nl> + auto scopedNotification = _namespaceNotifications . createNotification ( nss ) ; <nl> + <nl> + auto swRefreshState = getPersistedRefreshFlags ( opCtx , nss ) ; <nl> + if ( ! swRefreshState . isOK ( ) ) { <nl> + return swRefreshState . getStatus ( ) ; <nl> + } <nl> + RefreshState refreshState = swRefreshState . getValue ( ) ; <nl> + <nl> + if ( refreshState . lastRefreshedCollectionVersion . epoch ( ) ! = version . epoch ( ) | | <nl> + refreshState . lastRefreshedCollectionVersion > = version ) { <nl> + return Status : : OK ( ) ; <nl> + } <nl> + <nl> + scopedNotification . get ( opCtx ) ; <nl> + } <nl> + } <nl> + <nl> ShardServerCatalogCacheLoader : : ShardServerCatalogCacheLoader ( <nl> std : : unique_ptr < CatalogCacheLoader > configLoader ) <nl> : _configServerLoader ( std : : move ( configLoader ) ) , _threadPool ( makeDefaultThreadPoolOptions ( ) ) { <nl> mmm a / src / mongo / db / s / shard_server_catalog_cache_loader . h <nl> ppp b / src / mongo / db / s / shard_server_catalog_cache_loader . h <nl> class ShardServerCatalogCacheLoader : public CatalogCacheLoader { <nl> * / <nl> void notifyOfCollectionVersionUpdate ( OperationContext * opCtx , <nl> const NamespaceString & nss , <nl> - const ChunkVersion & version ) ; <nl> + const ChunkVersion & version ) override ; <nl> + <nl> + / * * <nl> + * This function can throw a DBException if the opCtx is interrupted . A lock must not be held <nl> + * when calling this because it would prevent using the latest snapshot and actually seeing the <nl> + * change after it arrives . <nl> + * <nl> + * See CatalogCache : : waitForCollectionVersion for function details : it ' s a passthrough function <nl> + * to give external access to this function , and so it is the interface . <nl> + * / <nl> + Status waitForCollectionVersion ( OperationContext * opCtx , <nl> + const NamespaceString & nss , <nl> + const ChunkVersion & version ) override ; <nl> <nl> / * * <nl> * This must be called serially , never in parallel , including waiting for the returned <nl> mmm a / src / mongo / s / catalog_cache . cpp <nl> ppp b / src / mongo / s / catalog_cache . cpp <nl> void CatalogCache : : notifyOfCollectionVersionUpdate ( OperationContext * opCtx , <nl> _cacheLoader - > notifyOfCollectionVersionUpdate ( opCtx , nss , version ) ; <nl> } <nl> <nl> + Status CatalogCache : : waitForCollectionVersion ( OperationContext * opCtx , <nl> + const NamespaceString & nss , <nl> + const ChunkVersion & version ) { <nl> + return _cacheLoader - > waitForCollectionVersion ( opCtx , nss , version ) ; <nl> + } <nl> + <nl> StatusWith < CachedDatabaseInfo > CatalogCache : : getDatabase ( OperationContext * opCtx , <nl> StringData dbName ) { <nl> try { <nl> mmm a / src / mongo / s / catalog_cache . h <nl> ppp b / src / mongo / s / catalog_cache . h <nl> class CatalogCache { <nl> const NamespaceString & nss , <nl> const ChunkVersion & version ) ; <nl> <nl> + / * * <nl> + * Waits for the persisted collection version to be gte to ' version ' , or an epoch change . Only <nl> + * call this function if you KNOW that a version gte WILL eventually be persisted . <nl> + * <nl> + * This function cannot wait for a version if nothing is persisted because a collection can <nl> + * become unsharded after we start waiting and ' version ' will then never be reached . If ' nss ' <nl> + * has no persisted metadata , even if it will shortly , a NamespaceNotFound error will be <nl> + * returned . <nl> + * <nl> + * A lock must not be held when calling this because it would prevent using the latest snapshot <nl> + * and actually seeing the change after it arrives . <nl> + * This function can throw a DBException if the opCtx is interrupted . <nl> + * This can only be called on a shard ! <nl> + * / <nl> + Status waitForCollectionVersion ( OperationContext * opCtx , <nl> + const NamespaceString & nss , <nl> + const ChunkVersion & version ) ; <nl> + <nl> / * * <nl> * Retrieves the cached metadata for the specified database . The returned value is still owned <nl> * by the cache and should not be kept elsewhere . I . e . , it should only be used as a local <nl> mmm a / src / mongo / s / catalog_cache_loader . h <nl> ppp b / src / mongo / s / catalog_cache_loader . h <nl> class CatalogCacheLoader { <nl> const NamespaceString & nss , <nl> const ChunkVersion & version ) = 0 ; <nl> <nl> + / * * <nl> + * Waits for the persisted collection version to be GTE to ' version ' , or an epoch change . <nl> + * / <nl> + virtual Status waitForCollectionVersion ( OperationContext * opCtx , <nl> + const NamespaceString & nss , <nl> + const ChunkVersion & version ) = 0 ; <nl> + <nl> / * * <nl> * Non - blocking call , which requests the chunks changed since the specified version to be <nl> * fetched from the persistent metadata store and invokes the callback function with the result . <nl> mmm a / src / mongo / s / config_server_catalog_cache_loader . cpp <nl> ppp b / src / mongo / s / config_server_catalog_cache_loader . cpp <nl> void ConfigServerCatalogCacheLoader : : notifyOfCollectionVersionUpdate ( OperationCo <nl> MONGO_UNREACHABLE ; <nl> } <nl> <nl> + Status ConfigServerCatalogCacheLoader : : waitForCollectionVersion ( OperationContext * opCtx , <nl> + const NamespaceString & nss , <nl> + const ChunkVersion & version ) { <nl> + MONGO_UNREACHABLE ; <nl> + } <nl> + <nl> std : : shared_ptr < Notification < void > > ConfigServerCatalogCacheLoader : : getChunksSince ( <nl> const NamespaceString & nss , <nl> ChunkVersion version , <nl> mmm a / src / mongo / s / config_server_catalog_cache_loader . h <nl> ppp b / src / mongo / s / config_server_catalog_cache_loader . h <nl> class ConfigServerCatalogCacheLoader final : public CatalogCacheLoader { <nl> void notifyOfCollectionVersionUpdate ( OperationContext * opCtx , <nl> const NamespaceString & nss , <nl> const ChunkVersion & version ) override ; <nl> + Status waitForCollectionVersion ( OperationContext * opCtx , <nl> + const NamespaceString & nss , <nl> + const ChunkVersion & version ) override ; <nl> <nl> std : : shared_ptr < Notification < void > > getChunksSince ( <nl> const NamespaceString & nss , <nl>
SERVER - 29745 after a successful migration , ensure the metadata update is persisted before range deletion is schedule
mongodb/mongo
344bf6e257e1427bc594bacac3f5983c2bdeaacf
2017-07-07T12:37:22Z
mmm a / utils / update_checkout / update - checkout - config . json <nl> ppp b / utils / update_checkout / update - checkout - config . json <nl> <nl> " ninja " : { <nl> " remote " : { " id " : " ninja - build / ninja " } } , <nl> " icu " : { <nl> - " remote " : { " id " : " unicode - org / icu " } } <nl> + " remote " : { " id " : " unicode - org / icu " } , <nl> + " platforms " : [ " Linux " ] <nl> + } <nl> } , <nl> " default - branch - scheme " : " master " , <nl> " branch - schemes " : { <nl> mmm a / utils / update_checkout / update_checkout / update_checkout . py <nl> ppp b / utils / update_checkout / update_checkout / update_checkout . py <nl> <nl> import argparse <nl> import json <nl> import os <nl> + import platform <nl> import re <nl> import sys <nl> import traceback <nl> def update_single_repository ( args ) : <nl> # If we were asked to reset to the specified branch , do the hard <nl> # reset and return . <nl> if checkout_target and reset_to_remote and not cross_repo : <nl> - shell . run ( [ ' git ' , ' reset ' , ' - - hard ' , <nl> - " origin / % s " % checkout_target ] , echo = True ) <nl> + full_target = full_target_name ( ' origin ' , checkout_target ) <nl> + shell . run ( [ ' git ' , ' reset ' , ' - - hard ' , full_target ] , echo = True ) <nl> return <nl> <nl> # Query whether we have a " detached HEAD " , which will mean that <nl> def validate_config ( config ) : <nl> ' aliases ? ! ' ) <nl> <nl> <nl> + def full_target_name ( repository , target ) : <nl> + tag = shell . capture ( [ " git " , " tag " , " - l " , target ] , echo = True ) . strip ( ) <nl> + if tag = = target : <nl> + return tag <nl> + <nl> + branch = shell . capture ( [ " git " , " branch " , " - - list " , target ] , <nl> + echo = True ) . strip ( ) . replace ( " * " , " " ) <nl> + if branch = = target : <nl> + name = " % s / % s " % ( repository , target ) <nl> + return name <nl> + <nl> + raise RuntimeError ( ' Cannot determine if % s is a branch or a tag ' % target ) <nl> + <nl> + <nl> + def skip_list_for_platform ( config ) : <nl> + # If there is a platforms key only include the repo if the <nl> + # plaform is in the list <nl> + skip_list = [ ] <nl> + platform_name = platform . system ( ) <nl> + <nl> + for repo_name , repo_info in config [ ' repos ' ] . items ( ) : <nl> + if ' platforms ' in repo_info : <nl> + if platform_name not in repo_info [ ' platforms ' ] : <nl> + print ( " Skipping " , repo_name , " on " , platform_name ) <nl> + skip_list . append ( repo_name ) <nl> + else : <nl> + print ( " Including " , repo_name , " on " , platform_name ) <nl> + <nl> + return skip_list <nl> + <nl> + <nl> def main ( ) : <nl> freeze_support ( ) <nl> parser = argparse . ArgumentParser ( <nl> def main ( ) : <nl> if scheme is None : <nl> scheme = config [ ' default - branch - scheme ' ] <nl> <nl> - skip_repo_list = args . skip_repository_list <nl> + skip_repo_list = skip_list_for_platform ( config ) <nl> + skip_repo_list . extend ( args . skip_repository_list ) <nl> clone_results = obtain_all_additional_swift_sources ( args , config , <nl> clone_with_ssh , <nl> scheme , <nl>
update_checkout . py : Add support for tags and optional repositories .
apple/swift
cb32792e76298a46a21d919dc83f21db7ac7bae7
2018-11-02T17:37:12Z
mmm a / docs / tutorial / keyboard - shortcuts . md <nl> ppp b / docs / tutorial / keyboard - shortcuts . md <nl> window . addEventListener ( ' keyup ' , doSomething , true ) <nl> <nl> Note the third parameter ` true ` which means the listener will always receive key presses before other listeners so they can ' t have ` stopPropagation ( ) ` called on them . <nl> <nl> - The [ ` before - input - event ` ] ( web - contents . md # event - before - input - event ) event <nl> + The [ ` before - input - event ` ] ( . . / api / web - contents . md # event - before - input - event ) event <nl> is emitted before dispatching ` keydown ` and ` keyup ` events in the page . It can <nl> be used to catch and handle custom shortcuts that are not visible in the menu . <nl> <nl>
Doc Update : New path for web - contents . md
electron/electron
e9121936e830f5fecfcbc95deda544073abae5fa
2017-12-28T20:22:30Z
mmm a / src / mongo / dbtests / cursortests . cpp <nl> ppp b / src / mongo / dbtests / cursortests . cpp <nl> <nl> <nl> namespace CursorTests { <nl> <nl> - namespace BtreeCursorTests { <nl> + namespace BtreeCursor { <nl> + <nl> + using mongo : : BtreeCursor ; <nl> <nl> / / The ranges expressed in these tests are impossible given our query <nl> / / syntax , so going to do them a hacky way . <nl> namespace CursorTests { <nl> } <nl> } ; <nl> <nl> - } / / namespace BtreeCursorTests <nl> + } / / namespace BtreeCursor <nl> <nl> class All : public Suite { <nl> public : <nl> All ( ) : Suite ( " cursor " ) { } <nl> <nl> void setupTests ( ) { <nl> - add < BtreeCursorTests : : MultiRange > ( ) ; <nl> - add < BtreeCursorTests : : MultiRangeGap > ( ) ; <nl> - add < BtreeCursorTests : : MultiRangeReverse > ( ) ; <nl> - add < BtreeCursorTests : : EqEq > ( ) ; <nl> - add < BtreeCursorTests : : EqRange > ( ) ; <nl> - add < BtreeCursorTests : : EqIn > ( ) ; <nl> - add < BtreeCursorTests : : RangeEq > ( ) ; <nl> - add < BtreeCursorTests : : RangeIn > ( ) ; <nl> - add < BtreeCursorTests : : AbortImplicitScan > ( ) ; <nl> + add < BtreeCursor : : MultiRange > ( ) ; <nl> + add < BtreeCursor : : MultiRangeGap > ( ) ; <nl> + add < BtreeCursor : : MultiRangeReverse > ( ) ; <nl> + add < BtreeCursor : : EqEq > ( ) ; <nl> + add < BtreeCursor : : EqRange > ( ) ; <nl> + add < BtreeCursor : : EqIn > ( ) ; <nl> + add < BtreeCursor : : RangeEq > ( ) ; <nl> + add < BtreeCursor : : RangeIn > ( ) ; <nl> + add < BtreeCursor : : AbortImplicitScan > ( ) ; <nl> } <nl> } myall ; <nl> } / / namespace CursorTests <nl>
Clean cursortests a bit .
mongodb/mongo
6fd439105bc2d94c216f9bc7a8180800ba7572fc
2012-05-05T18:04:05Z
mmm a / tensorflow / python / ops / math_ops . py <nl> ppp b / tensorflow / python / ops / math_ops . py <nl> def _as_indexed_slices_list ( inputs , optimize = True ) : <nl> def add_n ( inputs , name = None ) : <nl> " " " Adds all input tensors element - wise . <nl> <nl> + Converts ` IndexedSlices ` objects into dense tensors prior to adding . <nl> + <nl> Args : <nl> inputs : A list of ` Tensor ` or ` IndexedSlices ` objects , each with same shape <nl> and type . <nl> def add_n ( inputs , name = None ) : <nl> <nl> if len ( inputs ) = = 1 : <nl> if isinstance ( inputs [ 0 ] , ops . IndexedSlices ) : <nl> - values = inputs [ 0 ] . values <nl> + values = ops . convert_to_tensor ( inputs [ 0 ] ) <nl> else : <nl> values = inputs [ 0 ] <nl> if name : <nl> mmm a / tensorflow / python / ops / math_ops_test . py <nl> ppp b / tensorflow / python / ops / math_ops_test . py <nl> def testGrad ( self ) : <nl> [ g . eval ( ) for g in add_n_grad ] ) <nl> <nl> <nl> + def testIndexedSlices ( self ) : <nl> + slc = tf . IndexedSlices ( array_ops . constant ( [ 1 , 2 ] , shape = [ 1 , 2 ] ) , <nl> + array_ops . constant ( [ 2 ] ) , array_ops . constant ( [ 2 , 2 ] ) <nl> + slc_as_dense = np . array ( [ [ 0 , 0 ] , [ 1 , 2 ] ] ) <nl> + with self . test_session ( use_gpu = True ) : <nl> + # add_n currently always converts IndexedSlices to dense <nl> + self . assertAllEqual ( slc_as_dense , math_ops . add_n ( [ slc ] ) . eval ( ) ) <nl> + self . assertAllEqual ( 2 * slc_as_dense , math_ops . add_n ( [ slc , slc ] ) . eval ( ) ) <nl> + <nl> + <nl> + <nl> class DivAndModTest ( test_util . TensorFlowTestCase ) : <nl> # TODO ( aselle ) : Test more types before exposing new division operators . <nl> <nl>
Make add_n ( ) handle a single IndexedSlices argument properly
tensorflow/tensorflow
3f803a9421fddf10a30745fc145d565d9737bd40
2018-09-29T00:18:01Z
mmm a / modules / common / proto / error_code . proto <nl> ppp b / modules / common / proto / error_code . proto <nl> enum ErrorCode { <nl> PERCEPTION_ERROR = 4000 ; <nl> PERCEPTION_ERROR_TF = 4001 ; <nl> PERCEPTION_ERROR_PROCESS = 4002 ; <nl> + <nl> + / / Prediction module error codes start from here . <nl> + PREDICTION_ERROR = 5000 ; <nl> } <nl> <nl> message StatusPb { <nl> mmm a / modules / prediction / container / obstacles / obstacle . cc <nl> ppp b / modules / prediction / container / obstacles / obstacle . cc <nl> namespace apollo { <nl> namespace prediction { <nl> <nl> using apollo : : perception : : PerceptionObstacle ; <nl> + using apollo : : common : : math : : KalmanFilter ; <nl> <nl> std : : mutex Obstacle : : _mutex ; <nl> <nl> Obstacle : : ~ Obstacle ( ) { <nl> / / TODO ( author ) current_lanes_ . clear ( ) ; <nl> } <nl> <nl> + int Obstacle : : id ( ) const { <nl> + std : : lock_guard < std : : mutex > lock ( _mutex ) ; <nl> + return id_ ; <nl> + } <nl> + <nl> + double Obstacle : : timestamp ( ) const { <nl> + std : : lock_guard < std : : mutex > lock ( _mutex ) ; <nl> + if ( feature_history_ . size ( ) > 0 ) { <nl> + return feature_history_ . front ( ) . timestamp ( ) ; <nl> + } else { <nl> + return 0 . 0 ; <nl> + } <nl> + } <nl> + <nl> + const Feature & Obstacle : : feature ( size_t i ) { <nl> + std : : lock_guard < std : : mutex > lock ( _mutex ) ; <nl> + CHECK ( i < feature_history_ . size ( ) ) ; <nl> + return feature_history_ [ i ] ; <nl> + } <nl> + <nl> + Feature * Obstacle : : mutable_feature ( size_t i ) { <nl> + std : : lock_guard < std : : mutex > lock ( _mutex ) ; <nl> + CHECK ( i < feature_history_ . size ( ) ) ; <nl> + return & feature_history_ [ i ] ; <nl> + } <nl> + <nl> + const Feature & Obstacle : : latest_feature ( ) { <nl> + std : : lock_guard < std : : mutex > lock ( _mutex ) ; <nl> + CHECK ( feature_history_ . size ( ) > 0 ) ; <nl> + return feature_history_ . front ( ) ; <nl> + } <nl> + <nl> + Feature * Obstacle : : mutable_latest_feature ( ) { <nl> + std : : lock_guard < std : : mutex > lock ( _mutex ) ; <nl> + <nl> + CHECK ( feature_history_ . size ( ) > 0 ) ; <nl> + return & ( feature_history_ . front ( ) ) ; <nl> + } <nl> + <nl> + size_t Obstacle : : history_size ( ) const { <nl> + std : : lock_guard < std : : mutex > lock ( _mutex ) ; <nl> + return feature_history_ . size ( ) ; <nl> + } <nl> + <nl> + const KalmanFilter < double , 4 , 2 , 0 > & Obstacle : : kf_lane_tracker ( <nl> + const std : : string & lane_id ) { <nl> + CHECK ( kf_lane_tracker_map_ . find ( lane_id ) ! = kf_lane_tracker_map_ . end ( ) ) ; <nl> + return kf_lane_tracker_map_ [ lane_id ] ; <nl> + } <nl> + <nl> void Obstacle : : Insert ( <nl> const apollo : : perception : : PerceptionObstacle & perception_obstacle , <nl> const double timestamp ) { <nl> mmm a / modules / prediction / container / obstacles / obstacle . h <nl> ppp b / modules / prediction / container / obstacles / obstacle . h <nl> class Obstacle { <nl> const apollo : : perception : : PerceptionObstacle & perception_obstacle , <nl> const double timestamp ) ; <nl> <nl> + int id ( ) const ; <nl> + <nl> + double timestamp ( ) const ; <nl> + <nl> + const Feature & feature ( size_t i ) ; <nl> + <nl> + Feature * mutable_feature ( size_t i ) ; <nl> + <nl> + const Feature & latest_feature ( ) ; <nl> + <nl> + Feature * mutable_latest_feature ( ) ; <nl> + <nl> + size_t history_size ( ) const ; <nl> + <nl> + const apollo : : common : : math : : KalmanFilter < double , 4 , 2 , 0 > & kf_lane_tracker ( <nl> + const std : : string & lane_id ) ; <nl> + <nl> + / / TODO ( author ) void SetLaneGraphFeature ( ObstacleClusters * p_cluster ) ; <nl> + <nl> private : <nl> int id_ ; <nl> apollo : : perception : : PerceptionObstacle : : Type type_ ; <nl>
Added predictor framework
ApolloAuto/apollo
494b4c5d3d2ba1cf35567e7ac57e86efca217380
2017-07-13T22:07:10Z
mmm a / tensorflow / python / keras / backend . py <nl> ppp b / tensorflow / python / keras / backend . py <nl> def categorical_crossentropy ( target , output , from_logits = False , axis = - 1 ) : <nl> tf . Tensor ( [ 0 . 10536055 0 . 8046684 0 . 06187541 ] , shape = ( 3 , ) , dtype = float32 ) <nl> > > > loss = tf . keras . backend . categorical_crossentropy ( a , a ) <nl> > > > print ( loss ) <nl> - tf . Tensor ( [ 1 . 1920929e - 07 1 . 1920929e - 07 1 . 1920930e - 07 ] , shape = ( 3 , ) , <nl> + tf . Tensor ( [ 1 . 1920929e - 07 1 . 1920929e - 07 1 . 19 . . . e - 07 ] , shape = ( 3 , ) , <nl> dtype = float32 ) <nl> <nl> " " " <nl>
Add ellipsis because the value is non - deterministic .
tensorflow/tensorflow
4127b653f2ec0878ac97332b3d17895aa58f0a1f
2019-09-11T19:26:27Z
mmm a / NEWS . md <nl> ppp b / NEWS . md <nl> <nl> - ⚡ ️ Improvements <nl> - Improved sending f1 - f12 keys in complex modification ( e . g . , " change command + e to f2 " ) by ignoring media key mappings for these keys . <nl> - Improved uninstaller adding the kernel extension staging area clean up . <nl> + - " Check for updates " has been improved . <nl> + - Updated Sparkle signing to EdDSA ( ed25519 ) from DSA . <nl> + - URL of appcast . xml has been updated . <nl> <nl> # # Karabiner - Elements 12 . 9 . 0 <nl> <nl>
update NEWS
pqrs-org/Karabiner-Elements
7a10f89f67c413b0074ee5f776ed7aeb1654a98b
2020-04-25T12:58:46Z
mmm a / src / mongo / db / query / canonical_query . cpp <nl> ppp b / src / mongo / db / query / canonical_query . cpp <nl> StatusWith < std : : unique_ptr < CanonicalQuery > > CanonicalQuery : : canonicalize ( <nl> const CanonicalQuery & baseQuery , <nl> MatchExpression * root , <nl> const MatchExpressionParser : : WhereCallback & whereCallback ) { <nl> - / / Obtain filter for our LPQ by serializing the new match expression root . <nl> - BSONObjBuilder bob ; <nl> - root - > toBSON ( & bob ) ; <nl> - BSONObj filter = bob . obj ( ) ; <nl> - <nl> - / / Pass empty sort and projection . <nl> + / / TODO : we should be passing the filter corresponding to ' root ' to the LPQ rather than the base <nl> + / / query ' s filter , baseQuery . getParsed ( ) . getFilter ( ) . <nl> BSONObj emptyObj ; <nl> - <nl> auto lpqStatus = LiteParsedQuery : : makeAsOpQuery ( baseQuery . nss ( ) , <nl> 0 , / / ntoskip <nl> 0 , / / ntoreturn <nl> 0 , / / queryOptions <nl> - filter , <nl> + baseQuery . getParsed ( ) . getFilter ( ) , <nl> baseQuery . getParsed ( ) . getProj ( ) , <nl> baseQuery . getParsed ( ) . getSort ( ) , <nl> emptyObj , / / hint <nl> mmm a / src / mongo / db / query / canonical_query_test . cpp <nl> ppp b / src / mongo / db / query / canonical_query_test . cpp <nl> TEST ( CanonicalQueryTest , CanonicalizeFromBaseQuery ) { <nl> MatchExpression * firstClauseExpr = baseCq - > root ( ) - > getChild ( 0 ) ; <nl> auto childCq = assertGet ( CanonicalQuery : : canonicalize ( * baseCq , firstClauseExpr ) ) ; <nl> <nl> - BSONObjBuilder expectedFilterBuilder ; <nl> - firstClauseExpr - > toBSON ( & expectedFilterBuilder ) ; <nl> - BSONObj expectedFilter = expectedFilterBuilder . obj ( ) ; <nl> + / / Descriptive test . The childCq ' s filter should be the relevant $ or clause , rather than the <nl> + / / entire query predicate . <nl> + ASSERT_EQ ( childCq - > getParsed ( ) . getFilter ( ) , baseCq - > getParsed ( ) . getFilter ( ) ) ; <nl> <nl> - ASSERT_EQ ( childCq - > getParsed ( ) . getFilter ( ) , expectedFilter ) ; <nl> ASSERT_EQ ( childCq - > getParsed ( ) . getProj ( ) , baseCq - > getParsed ( ) . getProj ( ) ) ; <nl> ASSERT_EQ ( childCq - > getParsed ( ) . getSort ( ) , baseCq - > getParsed ( ) . getSort ( ) ) ; <nl> ASSERT_TRUE ( childCq - > getParsed ( ) . isExplain ( ) ) ; <nl> mmm a / src / mongo / dbtests / query_stage_subplan . cpp <nl> ppp b / src / mongo / dbtests / query_stage_subplan . cpp <nl> class QueryStageSubplanRewriteToRootedOr : public QueryStageSubplanBase { <nl> / * * <nl> * Test the subplan stage ' s ability to answer a contained $ or query . <nl> * / <nl> - class QueryStageSubplanPlanRootedOr : public QueryStageSubplanBase { <nl> + class QueryStageSubplanPlanContainedOr : public QueryStageSubplanBase { <nl> public : <nl> void run ( ) { <nl> OldClientWriteContext ctx ( & _txn , ns ( ) ) ; <nl> class QueryStageSubplanPlanRootedOr : public QueryStageSubplanBase { <nl> new SubplanStage ( & _txn , collection , & ws , plannerParams , cq . get ( ) ) ) ; <nl> <nl> / / Plan selection should succeed due to falling back on regular planning . <nl> - PlanYieldPolicy yieldPolicy ( NULL , PlanExecutor : : YIELD_MANUAL ) ; <nl> + PlanYieldPolicy yieldPolicy ( nullptr , PlanExecutor : : YIELD_MANUAL ) ; <nl> ASSERT_OK ( subplan - > pickBestPlan ( & yieldPolicy ) ) ; <nl> <nl> / / Work the stage until it produces all results . <nl> class QueryStageSubplanPlanRootedOr : public QueryStageSubplanBase { <nl> } <nl> } ; <nl> <nl> + / * * <nl> + * Test the subplan stage ' s ability to answer a rooted $ or query with a $ ne and a sort . <nl> + * <nl> + * Regression test for SERVER - 19388 . <nl> + * / <nl> + class QueryStageSubplanPlanRootedOrNE : public QueryStageSubplanBase { <nl> + public : <nl> + void run ( ) { <nl> + OldClientWriteContext ctx ( & _txn , ns ( ) ) ; <nl> + addIndex ( BSON ( " a " < < 1 < < " b " < < 1 ) ) ; <nl> + addIndex ( BSON ( " a " < < 1 < < " c " < < 1 ) ) ; <nl> + <nl> + / / Every doc matches . <nl> + insert ( BSON ( " _id " < < 1 < < " a " < < 1 ) ) ; <nl> + insert ( BSON ( " _id " < < 2 < < " a " < < 2 ) ) ; <nl> + insert ( BSON ( " _id " < < 3 < < " a " < < 3 ) ) ; <nl> + insert ( BSON ( " _id " < < 4 ) ) ; <nl> + <nl> + BSONObj query = fromjson ( " { $ or : [ { a : 1 } , { a : { $ ne : 1 } } ] } " ) ; <nl> + BSONObj sort = BSON ( " d " < < 1 ) ; <nl> + BSONObj projection ; <nl> + auto cq = unittest : : assertGet ( CanonicalQuery : : canonicalize ( ns ( ) , query , sort , projection ) ) ; <nl> + <nl> + Collection * collection = ctx . getCollection ( ) ; <nl> + <nl> + QueryPlannerParams plannerParams ; <nl> + fillOutPlannerParams ( & _txn , collection , cq . get ( ) , & plannerParams ) ; <nl> + <nl> + WorkingSet ws ; <nl> + std : : unique_ptr < SubplanStage > subplan ( <nl> + new SubplanStage ( & _txn , collection , & ws , plannerParams , cq . get ( ) ) ) ; <nl> + <nl> + PlanYieldPolicy yieldPolicy ( nullptr , PlanExecutor : : YIELD_MANUAL ) ; <nl> + ASSERT_OK ( subplan - > pickBestPlan ( & yieldPolicy ) ) ; <nl> + <nl> + size_t numResults = 0 ; <nl> + PlanStage : : StageState stageState = PlanStage : : NEED_TIME ; <nl> + while ( stageState ! = PlanStage : : IS_EOF ) { <nl> + WorkingSetID id = WorkingSet : : INVALID_ID ; <nl> + stageState = subplan - > work ( & id ) ; <nl> + ASSERT_NE ( stageState , PlanStage : : DEAD ) ; <nl> + ASSERT_NE ( stageState , PlanStage : : FAILURE ) ; <nl> + if ( stageState = = PlanStage : : ADVANCED ) { <nl> + + + numResults ; <nl> + } <nl> + } <nl> + <nl> + ASSERT_EQ ( numResults , 4U ) ; <nl> + } <nl> + } ; <nl> + <nl> class All : public Suite { <nl> public : <nl> All ( ) : Suite ( " query_stage_subplan " ) { } <nl> class All : public Suite { <nl> add < QueryStageSubplanPlanFromCache > ( ) ; <nl> add < QueryStageSubplanCanUseSubplanning > ( ) ; <nl> add < QueryStageSubplanRewriteToRootedOr > ( ) ; <nl> - add < QueryStageSubplanPlanRootedOr > ( ) ; <nl> + add < QueryStageSubplanPlanContainedOr > ( ) ; <nl> + add < QueryStageSubplanPlanRootedOrNE > ( ) ; <nl> } <nl> } ; <nl> <nl>
SERVER - 19388 fix assertion in $ or planning
mongodb/mongo
3f301ac62ea983d864f9a5ad017876171e2f1104
2015-07-15T01:55:59Z
mmm a / include / nlohmann / detail / output / serializer . hpp <nl> ppp b / include / nlohmann / detail / output / serializer . hpp <nl> class serializer <nl> if ( error_handler = = error_handler_t : : replace ) <nl> { <nl> / / add a replacement character <nl> - string_buffer [ bytes + + ] = ' \ \ ' ; <nl> - string_buffer [ bytes + + ] = ' u ' ; <nl> - string_buffer [ bytes + + ] = ' f ' ; <nl> - string_buffer [ bytes + + ] = ' f ' ; <nl> - string_buffer [ bytes + + ] = ' f ' ; <nl> - string_buffer [ bytes + + ] = ' d ' ; <nl> + if ( ensure_ascii ) <nl> + { <nl> + string_buffer [ bytes + + ] = ' \ \ ' ; <nl> + string_buffer [ bytes + + ] = ' u ' ; <nl> + string_buffer [ bytes + + ] = ' f ' ; <nl> + string_buffer [ bytes + + ] = ' f ' ; <nl> + string_buffer [ bytes + + ] = ' f ' ; <nl> + string_buffer [ bytes + + ] = ' d ' ; <nl> + } <nl> + else <nl> + { <nl> + string_buffer [ bytes + + ] = ' \ xEF ' ; <nl> + string_buffer [ bytes + + ] = ' \ xBF ' ; <nl> + string_buffer [ bytes + + ] = ' \ xBD ' ; <nl> + } <nl> bytes_after_last_accept = bytes ; <nl> } <nl> <nl> class serializer <nl> / / write all accepted bytes <nl> o - > write_characters ( string_buffer . data ( ) , bytes_after_last_accept ) ; <nl> / / add a replacement character <nl> - o - > write_characters ( " \ \ ufffd " , 6 ) ; <nl> + if ( ensure_ascii ) <nl> + { <nl> + o - > write_characters ( " \ \ ufffd " , 6 ) ; <nl> + } <nl> + else <nl> + { <nl> + o - > write_characters ( " \ xEF \ xBF \ xBD " , 3 ) ; <nl> + } <nl> break ; <nl> } <nl> } <nl> mmm a / single_include / nlohmann / json . hpp <nl> ppp b / single_include / nlohmann / json . hpp <nl> class serializer <nl> if ( error_handler = = error_handler_t : : replace ) <nl> { <nl> / / add a replacement character <nl> - string_buffer [ bytes + + ] = ' \ \ ' ; <nl> - string_buffer [ bytes + + ] = ' u ' ; <nl> - string_buffer [ bytes + + ] = ' f ' ; <nl> - string_buffer [ bytes + + ] = ' f ' ; <nl> - string_buffer [ bytes + + ] = ' f ' ; <nl> - string_buffer [ bytes + + ] = ' d ' ; <nl> + if ( ensure_ascii ) <nl> + { <nl> + string_buffer [ bytes + + ] = ' \ \ ' ; <nl> + string_buffer [ bytes + + ] = ' u ' ; <nl> + string_buffer [ bytes + + ] = ' f ' ; <nl> + string_buffer [ bytes + + ] = ' f ' ; <nl> + string_buffer [ bytes + + ] = ' f ' ; <nl> + string_buffer [ bytes + + ] = ' d ' ; <nl> + } <nl> + else <nl> + { <nl> + string_buffer [ bytes + + ] = ' \ xEF ' ; <nl> + string_buffer [ bytes + + ] = ' \ xBF ' ; <nl> + string_buffer [ bytes + + ] = ' \ xBD ' ; <nl> + } <nl> bytes_after_last_accept = bytes ; <nl> } <nl> <nl> class serializer <nl> / / write all accepted bytes <nl> o - > write_characters ( string_buffer . data ( ) , bytes_after_last_accept ) ; <nl> / / add a replacement character <nl> - o - > write_characters ( " \ \ ufffd " , 6 ) ; <nl> + if ( ensure_ascii ) <nl> + { <nl> + o - > write_characters ( " \ \ ufffd " , 6 ) ; <nl> + } <nl> + else <nl> + { <nl> + o - > write_characters ( " \ xEF \ xBF \ xBD " , 3 ) ; <nl> + } <nl> break ; <nl> } <nl> } <nl> mmm a / test / src / unit - unicode . cpp <nl> ppp b / test / src / unit - unicode . cpp <nl> void check_utf8dump ( bool success_expected , int byte1 , int byte2 = - 1 , int byte3 <nl> / / all dumps should agree on the string <nl> CHECK ( s_strict = = s_ignored ) ; <nl> CHECK ( s_strict = = s_replaced ) ; <nl> - <nl> - / / check that ignore / replace string does not contain a replacement character <nl> - CHECK ( s_ignored . find ( " \ \ ufffd " ) = = std : : string : : npos ) ; <nl> - CHECK ( s_replaced . find ( " \ \ ufffd " ) = = std : : string : : npos ) ; <nl> } <nl> else <nl> { <nl> void check_utf8dump ( bool success_expected , int byte1 , int byte2 = - 1 , int byte3 <nl> / / ignore and replace must create different dumps <nl> CHECK ( s_ignored ! = s_replaced ) ; <nl> <nl> - / / check that ignore string does not contain a replacement character <nl> - CHECK ( s_ignored . find ( " \ \ ufffd " ) = = std : : string : : npos ) ; <nl> / / check that replace string contains a replacement character <nl> - CHECK ( s_replaced . find ( " \ \ ufffd " ) ! = std : : string : : npos ) ; <nl> + CHECK ( s_replaced . find ( " \ xEF \ xBF \ xBD " ) ! = std : : string : : npos ) ; <nl> <nl> } <nl> <nl>
: construction : respect ensure_ascii parameter
nlohmann/json
c7af027cbb2edc39bb35ed5881adfac3ac45f14d
2018-10-22T07:18:16Z
mmm a / Telegram / SourceFiles / apiwrap . cpp <nl> ppp b / Telegram / SourceFiles / apiwrap . cpp <nl> void ApiWrap : : gotUserFull ( PeerData * peer , const MTPUserFull & result , mtpRequestI <nl> App : : feedUsers ( MTP_vector < MTPUser > ( 1 , d . vuser ) , false ) ; <nl> App : : feedPhoto ( d . vprofile_photo ) ; <nl> App : : feedUserLink ( MTP_int ( peerToUser ( peer - > id ) ) , d . vlink . c_contacts_link ( ) . vmy_link , d . vlink . c_contacts_link ( ) . vforeign_link , false ) ; <nl> - App : : main ( ) - > gotNotifySetting ( MTP_inputNotifyPeer ( peer - > input ) , d . vnotify_settings ) ; <nl> + if ( App : : main ( ) ) { <nl> + App : : main ( ) - > gotNotifySetting ( MTP_inputNotifyPeer ( peer - > input ) , d . vnotify_settings ) ; <nl> + } <nl> <nl> peer - > asUser ( ) - > setBotInfo ( d . vbot_info ) ; <nl> peer - > asUser ( ) - > blocked = mtpIsTrue ( d . vblocked ) ? UserIsBlocked : UserIsNotBlocked ; <nl> mmm a / Telegram / SourceFiles / dialogswidget . cpp <nl> ppp b / Telegram / SourceFiles / dialogswidget . cpp <nl> void DialogsInner : : selectSkipPage ( int32 pixels , int32 direction ) { <nl> } <nl> <nl> void DialogsInner : : loadPeerPhotos ( int32 yFrom ) { <nl> + if ( ! parentWidget ( ) ) return ; <nl> + <nl> int32 yTo = yFrom + parentWidget ( ) - > height ( ) * 5 ; <nl> MTP : : clearLoaderPriorities ( ) ; <nl> if ( _state = = DefaultState ) { <nl> mmm a / Telegram / SourceFiles / history . cpp <nl> ppp b / Telegram / SourceFiles / history . cpp <nl> HistoryMessageVia : : HistoryMessageVia ( Interfaces * ) <nl> } <nl> <nl> void HistoryMessageVia : : create ( int32 userId ) { <nl> - if ( bot = App : : userLoaded ( peerFromUser ( userId ) ) ) { <nl> + bot = App : : userLoaded ( peerFromUser ( userId ) ) ; <nl> + if ( bot ) { <nl> maxWidth = st : : msgServiceNameFont - > width ( lng_inline_bot_via ( lt_inline_bot , ' @ ' + bot - > username ) ) ; <nl> lnk . reset ( new ViaInlineBotLink ( bot ) ) ; <nl> } <nl> mmm a / Telegram / SourceFiles / historywidget . cpp <nl> ppp b / Telegram / SourceFiles / historywidget . cpp <nl> void HistoryWidget : : drawRecording ( Painter & p ) { <nl> } <nl> <nl> void HistoryWidget : : paintEvent ( QPaintEvent * e ) { <nl> - if ( App : : wnd ( ) & & App : : wnd ( ) - > contentOverlapped ( this , e ) ) return ; <nl> + if ( ! App : : main ( ) | | ( App : : wnd ( ) & & App : : wnd ( ) - > contentOverlapped ( this , e ) ) ) return ; <nl> <nl> Painter p ( this ) ; <nl> QRect r ( e - > rect ( ) ) ; <nl> mmm a / Telegram / SourceFiles / pspecific_mac . cpp <nl> ppp b / Telegram / SourceFiles / pspecific_mac . cpp <nl> QByteArray psPathBookmark ( const QString & path ) { <nl> return objc_pathBookmark ( path ) ; <nl> } <nl> <nl> + bool psLaunchMaps ( const QString & lat , const QString & lon ) { <nl> + return QDesktopServices : : openUrl ( qsl ( " https : / / maps . apple . com / ? q = Point & z = 16 & ll = % 1 , % 2 " ) . arg ( lat ) . arg ( lon ) ) ; <nl> + } <nl> + <nl> QString strNotificationAboutThemeChange ( ) { <nl> const uint32 letters [ ] = { 0xE9005541 , 0x5600DC70 , 0x88001570 , 0xF500D86C , 0x8100E165 , 0xEE005949 , 0x2900526E , 0xAE00FB74 , 0x96000865 , 0x7000CD72 , 0x3B001566 , 0x5F007361 , 0xAE00B663 , 0x74009A65 , 0x29003054 , 0xC6002668 , 0x98003865 , 0xFA00336D , 0xA3007A65 , 0x93001443 , 0xBB007868 , 0xE100E561 , 0x3500366E , 0xC0007A67 , 0x200CA65 , 0xBE00DF64 , 0xE300BB4E , 0x2900D26F , 0xD500D374 , 0xE900E269 , 0x86008F66 , 0xC4006669 , 0x1C00A863 , 0xE600A761 , 0x8E00EE74 , 0xB300B169 , 0xCF00B36F , 0xE600D36E } ; <nl> return strMakeFromLetters ( letters , sizeof ( letters ) / sizeof ( letters [ 0 ] ) ) ; <nl> QString strNeedToRefresh2 ( ) { <nl> const uint32 letters [ ] = { 0x8F001546 , 0xAF007A49 , 0xB8002B5F , 0x1A000B54 , 0xD003E49 , 0xE0003663 , 0x4900796F , 0x500836E , 0x9A00D156 , 0x5E00FF69 , 0x5900C765 , 0x3D00D177 } ; <nl> return strMakeFromLetters ( letters , sizeof ( letters ) / sizeof ( letters [ 0 ] ) ) ; <nl> } <nl> - <nl> - bool psLaunchMaps ( const QString & lat , const QString & lon ) { <nl> - return false ; <nl> - } <nl>
some possible crashes fixed , showing maps app on os x
telegramdesktop/tdesktop
57b771c879499f13eeac0b9f37d0ebe39782e382
2016-02-17T17:14:09Z
mmm a / plugins / producer_plugin / producer_plugin . cpp <nl> ppp b / plugins / producer_plugin / producer_plugin . cpp <nl> void producer_plugin_impl : : produce_block ( ) { <nl> <nl> block_state_ptr new_bs = chain . head_block_state ( ) ; <nl> <nl> - consider_new_watermark ( new_bs - > header . producer , new_bs - > block_num ) ; <nl> - <nl> ilog ( " Produced block $ { id } . . . # $ { n } @ $ { t } signed by $ { p } [ trxs : $ { count } , lib : $ { lib } , confirmed : $ { confs } ] " , <nl> ( " p " , new_bs - > header . producer ) ( " id " , fc : : variant ( new_bs - > id ) . as_string ( ) . substr ( 0 , 16 ) ) <nl> ( " n " , new_bs - > block_num ) ( " t " , new_bs - > header . timestamp ) <nl>
remove redundant consider_new_watermark
EOSIO/eos
dbfe0557355d5884f3db81210b3d7bb88c2e6f00
2019-07-29T22:27:32Z
mmm a / Code / CryEngine / CryPhysicsSystem / CryPhysX / CryPhysX . cpp <nl> ppp b / Code / CryEngine / CryPhysicsSystem / CryPhysX / CryPhysX . cpp <nl> namespace cpx / / CryPhysX helper <nl> m_Cooking ( nullptr ) , <nl> m_Foundation ( nullptr ) , <nl> m_Physics ( nullptr ) , <nl> + m_CpuDispatcher ( nullptr ) , <nl> m_PvdTransport ( nullptr ) , <nl> m_Pvd ( nullptr ) , <nl> m_DebugVisualizationForAllSceneElements ( false ) <nl> namespace cpx / / CryPhysX helper <nl> m_Pvd = PxCreatePvd ( * m_Foundation ) ; <nl> if ( ! m_Pvd ) <nl> { <nl> - fatalError ( " PxProfileZoneManager : : createProfileZoneManager failed ! " ) ; <nl> fatalError ( " PxCreatePvd failed ! " ) ; <nl> } <nl> <nl> namespace cpx / / CryPhysX helper <nl> unsigned int timeout = 10000 ; / / timeout in milliseconds to wait for PVD to respond , <nl> / / consoles and remote PCs need a higher timeout . <nl> m_PvdTransport = PxDefaultPvdSocketTransportCreate ( pvd_host_ip , port , timeout ) ; <nl> - if ( ! m_PvdTransport ) <nl> - fatalError ( " PxDefaultPvdSocketTransportCreate failed ! " ) ; <nl> - <nl> + if ( ! m_PvdTransport ) fatalError ( " PxDefaultPvdSocketTransportCreate failed ! " ) ; <nl> + <nl> / / and now try to connect <nl> m_Pvd - > connect ( * m_PvdTransport , PxPvdInstrumentationFlag : : eALL ) ; <nl> - <nl> - if ( m_Pvd - > isConnected ( ) ) <nl> - { <nl> - Helper : : Log ( " PhysX Visual Debugger Connection - initialized . \ n " ) ; <nl> - m_Scene - > getScenePvdClient ( ) - > setScenePvdFlag ( PxPvdSceneFlag : : eTRANSMIT_CONSTRAINTS , true ) ; <nl> - } <nl> + if ( m_Pvd - > isConnected ( ) ) Helper : : Log ( " PhysX Visual Debugger Connection - initialized . \ n " ) ; <nl> } <nl> # endif <nl> <nl> namespace cpx / / CryPhysX helper <nl> const PxVec3 gravity = PxVec3 ( 0 . 0f , 0 . 0f , - 9 . 81f ) ; <nl> <nl> sceneDesc . gravity = gravity ; <nl> - PxDefaultCpuDispatcher * mCpuDispatcher = PxDefaultCpuDispatcherCreate ( noOfThreads ) ; <nl> - if ( ! mCpuDispatcher ) fatalError ( " PxDefaultCpuDispatcherCreate failed ! " ) ; <nl> - sceneDesc . cpuDispatcher = mCpuDispatcher ; <nl> + m_CpuDispatcher = PxDefaultCpuDispatcherCreate ( noOfThreads ) ; <nl> + if ( ! m_CpuDispatcher ) fatalError ( " PxDefaultCpuDispatcherCreate failed ! " ) ; <nl> + sceneDesc . cpuDispatcher = m_CpuDispatcher ; <nl> sceneDesc . filterShader = CollFilter ; <nl> sceneDesc . broadPhaseType = PxBroadPhaseType : : eMBP ; <nl> sceneDesc . flags | = PxSceneFlag : : eENABLE_CCD ; <nl> namespace cpx / / CryPhysX helper <nl> m_Scene = m_Physics - > createScene ( sceneDesc ) ; <nl> if ( ! m_Scene ) fatalError ( " createScene failed ! " ) ; <nl> <nl> + m_Scene - > getScenePvdClient ( ) - > setScenePvdFlag ( PxPvdSceneFlag : : eTRANSMIT_CONSTRAINTS , true ) ; <nl> + <nl> if ( USE_PHYSX_DEBUGDRAW ) <nl> { <nl> m_Scene - > setVisualizationParameter ( PxVisualizationParameter : : eSCALE , 0 . 0f ) ; <nl> namespace cpx / / CryPhysX helper <nl> CryPhysX : : ~ CryPhysX ( ) <nl> { <nl> / / shutdown PhysX <nl> - if ( m_PvdTransport ) m_PvdTransport - > release ( ) ; <nl> - m_Pvd - > release ( ) ; <nl> PxCloseVehicleSDK ( ) ; <nl> m_Cooking - > release ( ) ; <nl> m_Scene - > release ( ) ; <nl> + m_CpuDispatcher - > release ( ) ; <nl> m_Physics - > release ( ) ; <nl> - if ( m_PvdTransport ) m_PvdTransport - > release ( ) ; <nl> m_Pvd - > release ( ) ; <nl> + if ( m_PvdTransport ) m_PvdTransport - > release ( ) ; <nl> PxCloseExtensions ( ) ; <nl> m_Foundation - > release ( ) ; <nl> } <nl> namespace cpx / / CryPhysX helper <nl> _SceneResetEntities ( m_Scene , PxActorTypeFlag : : eRIGID_DYNAMIC ) ; <nl> } <nl> <nl> + void CryPhysX : : DisconnectPhysicsDebugger ( ) <nl> + { <nl> + if ( m_Pvd - > isConnected ( ) ) m_Pvd - > disconnect ( ) ; <nl> + } <nl> } <nl> <nl> / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / <nl> mmm a / Code / CryEngine / CryPhysicsSystem / CryPhysX / CryPhysX . h <nl> ppp b / Code / CryEngine / CryPhysicsSystem / CryPhysX / CryPhysX . h <nl> namespace cpx / / CryPhysX <nl> void SceneResetDynamicEntities ( ) ; <nl> <nl> void SetDebugVisualizationForAllSceneElements ( bool enable = true ) ; <nl> + void DisconnectPhysicsDebugger ( ) ; <nl> <nl> private : <nl> <nl> float m_dt ; <nl> <nl> physx : : PxPhysics * m_Physics ; <nl> + physx : : PxDefaultCpuDispatcher * m_CpuDispatcher ; <nl> physx : : PxFoundation * m_Foundation ; <nl> physx : : PxScene * m_Scene ; <nl> physx : : PxCooking * m_Cooking ; <nl> mmm a / Code / CryEngine / CryPhysicsSystem / CryPhysX / CryPhysics . cpp <nl> ppp b / Code / CryEngine / CryPhysicsSystem / CryPhysX / CryPhysics . cpp <nl> struct CSystemEventListner_Physics : public ISystemEventListener <nl> break ; <nl> case ESYSTEM_EVENT_3D_POST_RENDERING_END : <nl> break ; <nl> + case ESYSTEM_EVENT_FAST_SHUTDOWN : <nl> + case ESYSTEM_EVENT_FULL_SHUTDOWN : <nl> + cpx : : g_cryPhysX . DisconnectPhysicsDebugger ( ) ; <nl> + break ; <nl> } <nl> } <nl> } ; <nl>
! I integrate from / / ce / main_pullrequests . . .
CRYTEK/CRYENGINE
6a5d4c665338af6ca5032aab52d4c6524e20746d
2018-07-11T16:09:15Z
mmm a / scene / 2d / navigation_polygon . cpp <nl> ppp b / scene / 2d / navigation_polygon . cpp <nl> String NavigationPolygonInstance : : get_configuration_warning ( ) const { <nl> return String ( ) ; <nl> } <nl> <nl> - c = Object : : cast_to < Node2D > ( get_parent ( ) ) ; <nl> + c = Object : : cast_to < Node2D > ( c - > get_parent ( ) ) ; <nl> } <nl> <nl> return TTR ( " NavigationPolygonInstance must be a child or grandchild to a Navigation2D node . It only provides navigation data . " ) ; <nl>
Fixes infinite loop in NavPolygonInstance warnings
godotengine/godot
c42bbe1073960f1e326955fc327cfe50ab4e2407
2017-10-26T11:02:04Z
mmm a / web <nl> ppp b / web <nl> @ @ - 1 + 1 @ @ <nl> - Subproject commit f26bb7a49e7ed37e43496c7edd0937a3c34a47d0 <nl> + Subproject commit f33b9d95a5ecb4f7210f2c99e23f5fbba46fd119 <nl>
Merge pull request from VisualSJ / v3 - updateIndex
cocos2d/cocos2d-x
591f661cd2ee01b723b7a1c4cf8894bcaf18c578
2015-08-12T10:31:06Z
mmm a / src / library_glut . js <nl> ppp b / src / library_glut . js <nl> var LibraryGLUT = { <nl> return keycode ; / / numeric TODO handle shift ? <nl> if ( 65 < = keycode & & keycode < = 90 ) <nl> return event [ ' shiftKey ' ] ? keycode : keycode + 32 ; <nl> + if ( 96 < = keycode & & keycode < = 105 ) <nl> + return keycode - 48 ; / / numpad numbers <nl> if ( 106 < = keycode & & keycode < = 111 ) <nl> return keycode - 106 + 42 ; / / * , + - . / TODO handle shift ? <nl> <nl>
Implementing keycodes for numpad numbered keys .
emscripten-core/emscripten
d0333811ee85131a9bcc8791d9542e38e762cc0e
2014-01-07T10:50:38Z
mmm a / tensorflow / python / ops / array_ops . py <nl> ppp b / tensorflow / python / ops / array_ops . py <nl> def broadcast_static_shape ( shape_x , shape_y ) : <nl> @ tf_export ( " shape " , v1 = [ ] ) <nl> def shape_v2 ( input , out_type = dtypes . int32 , name = None ) : <nl> # pylint : disable = redefined - builtin <nl> + " " " Returns the shape of a tensor . <nl> + <nl> + This operation returns a 1 - D integer tensor representing the shape of ` input ` . <nl> + <nl> + For example : <nl> + <nl> + ` ` ` python <nl> + t = tf . constant ( [ [ [ 1 , 1 , 1 ] , [ 2 , 2 , 2 ] ] , [ [ 3 , 3 , 3 ] , [ 4 , 4 , 4 ] ] ] ) <nl> + tf . shape ( t ) # [ 2 , 2 , 3 ] <nl> + ` ` ` <nl> + <nl> + Args : <nl> + input : A ` Tensor ` or ` SparseTensor ` . <nl> + out_type : ( Optional ) The specified output type of the operation <nl> + ( ` int32 ` or ` int64 ` ) . Defaults to ` tf . int32 ` . <nl> + name : A name for the operation ( optional ) . <nl> + <nl> + Returns : <nl> + A ` Tensor ` of type ` out_type ` . <nl> + " " " <nl> return shape ( input , name , out_type ) <nl> <nl> <nl>
Update tf . shape_v2
tensorflow/tensorflow
156d6a5ba08e14e13e8e1e0be9d2463da36b5ad7
2019-03-28T17:01:45Z
mmm a / docs / SIL . rst <nl> ppp b / docs / SIL . rst <nl> memory object or a reference to a pinned object . Returns 1 if the <nl> strong reference count is 1 or the object has been marked pinned by <nl> strong_pin . <nl> <nl> + is_escaping_closure <nl> + ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` <nl> + <nl> + : : <nl> + sil - instruction : : = ' is_escaping_closure ' sil - operand <nl> + <nl> + % 1 = is_escaping_closure % 0 : $ @ callee_guaranteed ( ) - > ( ) <nl> + / / % 0 must be an escaping swift closure . <nl> + / / % 1 will be of type Builtin . Int1 <nl> + <nl> + Checks whether the context reference is not nil and bigger than one and returns <nl> + true if it is . <nl> + <nl> copy_block <nl> ` ` ` ` ` ` ` ` ` ` <nl> : : <nl> mmm a / include / swift / Runtime / Debug . h <nl> ppp b / include / swift / Runtime / Debug . h <nl> <nl> # define _SWIFT_RUNTIME_DEBUG_HELPERS_ <nl> <nl> # include < llvm / Support / Compiler . h > <nl> + # include < cstdarg > <nl> + # include < cstdio > <nl> # include < stdint . h > <nl> # include " swift / Runtime / Config . h " <nl> # include " swift / Runtime / Unreachable . h " <nl> void _swift_reportToDebugger ( uintptr_t flags , const char * message , <nl> SWIFT_RUNTIME_STDLIB_SPI <nl> bool _swift_reportFatalErrorsToDebugger ; <nl> <nl> + LLVM_ATTRIBUTE_ALWAYS_INLINE <nl> + inline static int swift_asprintf ( char * * strp , const char * fmt , . . . ) { <nl> + va_list args ; <nl> + va_start ( args , fmt ) ; <nl> + # if defined ( _WIN32 ) <nl> + # pragma GCC diagnostic push <nl> + # pragma GCC diagnostic ignored " - Wuninitialized " <nl> + int len = _vscprintf ( fmt , args ) ; <nl> + # pragma GCC diagnostic pop <nl> + if ( len < 0 ) { <nl> + va_end ( args ) ; <nl> + return - 1 ; <nl> + } <nl> + char * buffer = static_cast < char * > ( malloc ( len + 1 ) ) ; <nl> + if ( ! buffer ) { <nl> + va_end ( args ) ; <nl> + return - 1 ; <nl> + } <nl> + int result = vsprintf ( buffer , fmt , args ) ; <nl> + if ( result < 0 ) { <nl> + va_end ( args ) ; <nl> + free ( buffer ) ; <nl> + return - 1 ; <nl> + } <nl> + * strp = buffer ; <nl> + # else <nl> + int result = vasprintf ( strp , fmt , args ) ; <nl> + # endif <nl> + va_end ( args ) ; <nl> + return result ; <nl> + } <nl> + <nl> + <nl> / / namespace swift <nl> } <nl> <nl> mmm a / include / swift / Runtime / HeapObject . h <nl> ppp b / include / swift / Runtime / HeapObject . h <nl> SWIFT_RUNTIME_EXPORT <nl> bool swift_isUniquelyReferencedOrPinned_nonNull_native ( <nl> const struct HeapObject * ) ; <nl> <nl> + / / / Is this native Swift pointer non - null and has a reference count greater than <nl> + / / / one . <nl> + / / / This runtime call will print an error message with file name and location if <nl> + / / / the closure is escaping but it will not abort . <nl> + SWIFT_RUNTIME_EXPORT <nl> + bool swift_isEscapingClosureAtFileLocation ( const struct HeapObject * object , <nl> + const unsigned char * filename , <nl> + int32_t filenameLength , <nl> + int32_t line ) ; <nl> + <nl> / / / Deallocate the given memory . <nl> / / / <nl> / / / It must have been returned by swift_allocObject and the strong reference <nl> mmm a / include / swift / Runtime / RuntimeFunctions . def <nl> ppp b / include / swift / Runtime / RuntimeFunctions . def <nl> FUNCTION ( IsUniquelyReferencedOrPinned_nonNull_native , <nl> ARGS ( RefCountedPtrTy ) , <nl> ATTRS ( NoUnwind , ZExt ) ) <nl> <nl> + / / bool swift_isEscapingClosureAtFileLocation ( const struct HeapObject * object , <nl> + / / const unsigned char * filename , <nl> + / / int32_t filenameLength , <nl> + / / int32_t line ) ; <nl> + FUNCTION ( IsEscapingClosureAtFileLocation , swift_isEscapingClosureAtFileLocation , <nl> + C_CC , <nl> + RETURNS ( Int1Ty ) , <nl> + ARGS ( RefCountedPtrTy , Int8PtrTy , Int32Ty , Int32Ty ) , <nl> + ATTRS ( NoUnwind , ZExt ) ) <nl> + <nl> / / void swift_arrayInitWithCopy ( opaque * , opaque * , size_t , type * ) ; <nl> FUNCTION ( ArrayInitWithCopy , swift_arrayInitWithCopy , C_CC , <nl> RETURNS ( VoidTy ) , <nl> mmm a / include / swift / SIL / SILBuilder . h <nl> ppp b / include / swift / SIL / SILBuilder . h <nl> class SILBuilder { <nl> return insert ( new ( getModule ( ) ) IsUniqueOrPinnedInst ( <nl> getSILDebugLocation ( Loc ) , value , Int1Ty ) ) ; <nl> } <nl> + IsEscapingClosureInst * createIsEscapingClosure ( SILLocation Loc , <nl> + SILValue operand ) { <nl> + auto Int1Ty = SILType : : getBuiltinIntegerType ( 1 , getASTContext ( ) ) ; <nl> + return insert ( new ( getModule ( ) ) IsEscapingClosureInst ( <nl> + getSILDebugLocation ( Loc ) , operand , Int1Ty ) ) ; <nl> + } <nl> <nl> DeallocStackInst * createDeallocStack ( SILLocation Loc , SILValue operand ) { <nl> return insert ( new ( getModule ( ) ) <nl> class SILBuilder { <nl> / / Runtime failure <nl> / / = = = mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - - = = = / / <nl> <nl> - CondFailInst * createCondFail ( SILLocation Loc , SILValue Operand ) { <nl> + CondFailInst * createCondFail ( SILLocation Loc , SILValue Operand , <nl> + bool Inverted = false ) { <nl> + if ( Inverted ) { <nl> + SILType Ty = Operand - > getType ( ) ; <nl> + SILValue True ( createIntegerLiteral ( Loc , Ty , 1 ) ) ; <nl> + Operand = <nl> + createBuiltinBinaryFunction ( Loc , " xor " , Ty , Ty , { Operand , True } ) ; <nl> + } <nl> return insert ( new ( getModule ( ) ) <nl> CondFailInst ( getSILDebugLocation ( Loc ) , Operand ) ) ; <nl> } <nl> mmm a / include / swift / SIL / SILCloner . h <nl> ppp b / include / swift / SIL / SILCloner . h <nl> visitIsUniqueOrPinnedInst ( IsUniqueOrPinnedInst * Inst ) { <nl> getBuilder ( ) . createIsUniqueOrPinned ( getOpLocation ( Inst - > getLoc ( ) ) , <nl> getOpValue ( Inst - > getOperand ( ) ) ) ) ; <nl> } <nl> + template < typename ImplClass > <nl> + void SILCloner < ImplClass > : : visitIsEscapingClosureInst ( <nl> + IsEscapingClosureInst * Inst ) { <nl> + getBuilder ( ) . setCurrentDebugScope ( getOpScope ( Inst - > getDebugScope ( ) ) ) ; <nl> + doPostProcess ( <nl> + Inst , getBuilder ( ) . createIsEscapingClosure ( <nl> + getOpLocation ( Inst - > getLoc ( ) ) , getOpValue ( Inst - > getOperand ( ) ) ) ) ; <nl> + } <nl> <nl> template < typename ImplClass > <nl> void <nl> mmm a / include / swift / SIL / SILInstruction . h <nl> ppp b / include / swift / SIL / SILInstruction . h <nl> class IsUniqueOrPinnedInst <nl> : UnaryInstructionBase ( DebugLoc , Operand , BoolTy ) { } <nl> } ; <nl> <nl> + / / / Given an escaping closure return true iff it has a non - nil context and the <nl> + / / / context has a strong reference count greater than 1 . <nl> + class IsEscapingClosureInst <nl> + : public UnaryInstructionBase < SILInstructionKind : : IsEscapingClosureInst , <nl> + SingleValueInstruction > { <nl> + friend SILBuilder ; <nl> + <nl> + IsEscapingClosureInst ( SILDebugLocation DebugLoc , SILValue Operand , <nl> + SILType BoolTy ) <nl> + : UnaryInstructionBase ( DebugLoc , Operand , BoolTy ) { } <nl> + } ; <nl> + <nl> / / = = = mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - = = = / / <nl> / / DeallocationInsts <nl> / / = = = mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - = = = / / <nl> mmm a / include / swift / SIL / SILNodes . def <nl> ppp b / include / swift / SIL / SILNodes . def <nl> ABSTRACT_VALUE_AND_INST ( SingleValueInstruction , ValueBase , SILInstruction ) <nl> SINGLE_VALUE_INST ( IsUniqueOrPinnedInst , is_unique_or_pinned , <nl> SingleValueInstruction , MayHaveSideEffects , DoesNotRelease ) <nl> <nl> + SINGLE_VALUE_INST ( IsEscapingClosureInst , is_escaping_closure , <nl> + SingleValueInstruction , MayRead , DoesNotRelease ) <nl> + <nl> / / Accessing memory <nl> SINGLE_VALUE_INST ( LoadInst , load , <nl> SingleValueInstruction , MayRead , DoesNotRelease ) <nl> mmm a / lib / IRGen / GenHeap . cpp <nl> ppp b / lib / IRGen / GenHeap . cpp <nl> <nl> <nl> # include " swift / Basic / SourceLoc . h " <nl> # include " swift / ABI / MetadataValues . h " <nl> + # include " swift / AST / ASTContext . h " <nl> # include " swift / AST / GenericEnvironment . h " <nl> # include " swift / AST / IRGenOptions . h " <nl> <nl> emitIsUniqueCall ( llvm : : Value * value , SourceLoc loc , bool isNonNull , <nl> return call ; <nl> } <nl> <nl> + llvm : : Value * IRGenFunction : : emitIsEscapingClosureCall ( llvm : : Value * value , <nl> + SourceLoc sourceLoc ) { <nl> + auto loc = SILLocation : : decode ( sourceLoc , IGM . Context . SourceMgr ) ; <nl> + auto line = llvm : : ConstantInt : : get ( IGM . Int32Ty , loc . Line ) ; <nl> + auto filename = IGM . getAddrOfGlobalString ( loc . Filename ) ; <nl> + auto filenameLength = <nl> + llvm : : ConstantInt : : get ( IGM . Int32Ty , loc . Filename . size ( ) ) ; <nl> + llvm : : CallInst * call = <nl> + Builder . CreateCall ( IGM . getIsEscapingClosureAtFileLocationFn ( ) , <nl> + { value , filename , filenameLength , line } ) ; <nl> + call - > setDoesNotThrow ( ) ; <nl> + return call ; <nl> + } <nl> + <nl> namespace { <nl> / / / Basic layout and common operations for box types . <nl> class BoxTypeInfo : public HeapTypeInfo < BoxTypeInfo > { <nl> mmm a / lib / IRGen / IRGenFunction . h <nl> ppp b / lib / IRGen / IRGenFunction . h <nl> class IRGenFunction { <nl> llvm : : Value * emitIsUniqueCall ( llvm : : Value * value , SourceLoc loc , <nl> bool isNonNull , bool checkPinned ) ; <nl> <nl> + llvm : : Value * emitIsEscapingClosureCall ( llvm : : Value * value , SourceLoc loc ) ; <nl> + <nl> / / mmm Expression emission mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm <nl> public : <nl> void emitFakeExplosion ( const TypeInfo & type , Explosion & explosion ) ; <nl> mmm a / lib / IRGen / IRGenSIL . cpp <nl> ppp b / lib / IRGen / IRGenSIL . cpp <nl> class IRGenSILFunction : <nl> void visitStoreUnownedInst ( StoreUnownedInst * i ) ; <nl> void visitIsUniqueInst ( IsUniqueInst * i ) ; <nl> void visitIsUniqueOrPinnedInst ( IsUniqueOrPinnedInst * i ) ; <nl> + void visitIsEscapingClosureInst ( IsEscapingClosureInst * i ) ; <nl> void visitDeallocStackInst ( DeallocStackInst * i ) ; <nl> void visitDeallocBoxInst ( DeallocBoxInst * i ) ; <nl> void visitDeallocRefInst ( DeallocRefInst * i ) ; <nl> visitIsUniqueOrPinnedInst ( swift : : IsUniqueOrPinnedInst * i ) { <nl> setLoweredExplosion ( i , out ) ; <nl> } <nl> <nl> + void IRGenSILFunction : : visitIsEscapingClosureInst ( <nl> + swift : : IsEscapingClosureInst * i ) { <nl> + assert ( i - > getOperand ( ) - > getType ( ) . is < SILFunctionType > ( ) & & <nl> + i - > getOperand ( ) <nl> + - > getType ( ) <nl> + . getAs < SILFunctionType > ( ) <nl> + - > getExtInfo ( ) <nl> + . hasContext ( ) & & <nl> + " Must have a closure operand " ) ; <nl> + <nl> + Explosion closure = getLoweredExplosion ( i - > getOperand ( ) ) ; <nl> + auto func = closure . claimNext ( ) ; <nl> + ( void ) func ; <nl> + auto context = closure . claimNext ( ) ; <nl> + <nl> + auto result = emitIsEscapingClosureCall ( context , i - > getLoc ( ) . getSourceLoc ( ) ) ; <nl> + Explosion out ; <nl> + out . add ( result ) ; <nl> + setLoweredExplosion ( i , out ) ; <nl> + } <nl> + <nl> void IRGenSILFunction : : emitDebugInfoForAllocStack ( AllocStackInst * i , <nl> const TypeInfo & type , <nl> llvm : : Value * addr ) { <nl> mmm a / lib / ParseSIL / ParseSIL . cpp <nl> ppp b / lib / ParseSIL / ParseSIL . cpp <nl> bool SILParser : : parseSILInstruction ( SILBuilder & B ) { <nl> UNARY_INSTRUCTION ( CopyBlock ) <nl> UNARY_INSTRUCTION ( IsUnique ) <nl> UNARY_INSTRUCTION ( IsUniqueOrPinned ) <nl> + UNARY_INSTRUCTION ( IsEscapingClosure ) <nl> UNARY_INSTRUCTION ( DestroyAddr ) <nl> UNARY_INSTRUCTION ( CopyValue ) <nl> UNARY_INSTRUCTION ( CopyUnownedValue ) <nl> mmm a / lib / SIL / InstructionUtils . cpp <nl> ppp b / lib / SIL / InstructionUtils . cpp <nl> void swift : : visitAccessedAddress ( SILInstruction * I , <nl> case SILInstructionKind : : FixLifetimeInst : <nl> case SILInstructionKind : : InitExistentialValueInst : <nl> case SILInstructionKind : : IsUniqueInst : <nl> + case SILInstructionKind : : IsEscapingClosureInst : <nl> case SILInstructionKind : : IsUniqueOrPinnedInst : <nl> case SILInstructionKind : : KeyPathInst : <nl> case SILInstructionKind : : OpenExistentialBoxInst : <nl> mmm a / lib / SIL / SILInstruction . cpp <nl> ppp b / lib / SIL / SILInstruction . cpp <nl> bool SILInstruction : : mayRelease ( ) const { <nl> bool SILInstruction : : mayReleaseOrReadRefCount ( ) const { <nl> switch ( getKind ( ) ) { <nl> case SILInstructionKind : : IsUniqueInst : <nl> + case SILInstructionKind : : IsEscapingClosureInst : <nl> case SILInstructionKind : : IsUniqueOrPinnedInst : <nl> return true ; <nl> default : <nl> mmm a / lib / SIL / SILOwnershipVerifier . cpp <nl> ppp b / lib / SIL / SILOwnershipVerifier . cpp <nl> NO_OPERAND_INST ( Unwind ) <nl> return { compatibleWithOwnership ( ValueOwnershipKind : : OWNERSHIP ) , \ <nl> UseLifetimeConstraint : : USE_LIFETIME_CONSTRAINT } ; \ <nl> } <nl> + CONSTANT_OWNERSHIP_INST ( Guaranteed , MustBeLive , IsEscapingClosure ) <nl> CONSTANT_OWNERSHIP_INST ( Guaranteed , MustBeLive , RefElementAddr ) <nl> CONSTANT_OWNERSHIP_INST ( Guaranteed , MustBeLive , OpenExistentialValue ) <nl> CONSTANT_OWNERSHIP_INST ( Guaranteed , MustBeLive , OpenExistentialBoxValue ) <nl> mmm a / lib / SIL / SILPrinter . cpp <nl> ppp b / lib / SIL / SILPrinter . cpp <nl> class SILPrinter : public SILInstructionVisitor < SILPrinter > { <nl> void visitIsUniqueOrPinnedInst ( IsUniqueOrPinnedInst * CUI ) { <nl> * this < < getIDAndType ( CUI - > getOperand ( ) ) ; <nl> } <nl> + void visitIsEscapingClosureInst ( IsEscapingClosureInst * CUI ) { <nl> + * this < < getIDAndType ( CUI - > getOperand ( ) ) ; <nl> + } <nl> void visitDeallocStackInst ( DeallocStackInst * DI ) { <nl> * this < < getIDAndType ( DI - > getOperand ( ) ) ; <nl> } <nl> mmm a / lib / SIL / SILVerifier . cpp <nl> ppp b / lib / SIL / SILVerifier . cpp <nl> class SILVerifier : public SILVerifierBase < SILVerifier > { <nl> " final component should match leaf value type of key path type " ) ; <nl> } <nl> <nl> + void checkIsEscapingClosureInst ( IsEscapingClosureInst * IEC ) { <nl> + auto fnType = IEC - > getOperand ( ) - > getType ( ) . getAs < SILFunctionType > ( ) ; <nl> + require ( fnType & & fnType - > getExtInfo ( ) . hasContext ( ) & & <nl> + ! fnType - > isNoEscape ( ) & & <nl> + fnType - > getExtInfo ( ) . getRepresentation ( ) = = <nl> + SILFunctionTypeRepresentation : : Thick , <nl> + " is_escaping_closure must have a thick " <nl> + " function operand " ) ; <nl> + } <nl> + <nl> / / This verifies that the entry block of a SIL function doesn ' t have <nl> / / any predecessors and also verifies the entry point arguments . <nl> void verifyEntryBlock ( SILBasicBlock * entry ) { <nl> mmm a / lib / SIL / ValueOwnershipKindClassifier . cpp <nl> ppp b / lib / SIL / ValueOwnershipKindClassifier . cpp <nl> CONSTANT_OWNERSHIP_INST ( Trivial , InitExistentialMetatype ) <nl> CONSTANT_OWNERSHIP_INST ( Trivial , IntegerLiteral ) <nl> CONSTANT_OWNERSHIP_INST ( Trivial , IsUnique ) <nl> CONSTANT_OWNERSHIP_INST ( Trivial , IsUniqueOrPinned ) <nl> + CONSTANT_OWNERSHIP_INST ( Trivial , IsEscapingClosure ) <nl> CONSTANT_OWNERSHIP_INST ( Trivial , MarkUninitializedBehavior ) <nl> CONSTANT_OWNERSHIP_INST ( Trivial , Metatype ) <nl> CONSTANT_OWNERSHIP_INST ( Trivial , ObjCToThickMetatype ) <nl> mmm a / lib / SILGen / SILGenExpr . cpp <nl> ppp b / lib / SILGen / SILGenExpr . cpp <nl> RValue RValueEmitter : : visitOpenExistentialExpr ( OpenExistentialExpr * E , <nl> } <nl> <nl> RValue RValueEmitter : : visitMakeTemporarilyEscapableExpr ( <nl> - MakeTemporarilyEscapableExpr * E , <nl> - SGFContext C ) { <nl> + MakeTemporarilyEscapableExpr * E , SGFContext C ) { <nl> / / Emit the non - escaping function value . <nl> auto functionValue = <nl> visit ( E - > getNonescapingClosureValue ( ) ) . getAsSingleValue ( SGF , E ) ; <nl> RValue RValueEmitter : : visitMakeTemporarilyEscapableExpr ( <nl> auto escapingFnTy = SGF . getLoweredType ( E - > getOpaqueValue ( ) - > getType ( ) ) ; <nl> <nl> / / Convert it to an escaping function value . <nl> - functionValue = <nl> + auto escapingClosure = <nl> SGF . createWithoutActuallyEscapingClosure ( E , functionValue , escapingFnTy ) ; <nl> <nl> - / / Bind the opaque value to the escaping function . <nl> - SILGenFunction : : OpaqueValueState opaqueValue { <nl> - functionValue , <nl> - / * consumable * / true , <nl> - / * hasBeenConsumed * / false , <nl> - } ; <nl> - SILGenFunction : : OpaqueValueRAII pushOpaqueValue ( SGF , E - > getOpaqueValue ( ) , <nl> - opaqueValue ) ; <nl> + RValue rvalue ; <nl> + auto loc = SILLocation ( E ) ; <nl> + auto borrowedClosure = escapingClosure . borrow ( SGF , loc ) ; <nl> + { <nl> + / / Bind the opaque value to the escaping function . <nl> + SILGenFunction : : OpaqueValueState opaqueValue { <nl> + borrowedClosure , <nl> + / * consumable * / false , <nl> + / * hasBeenConsumed * / false , <nl> + } ; <nl> + SILGenFunction : : OpaqueValueRAII pushOpaqueValue ( SGF , E - > getOpaqueValue ( ) , <nl> + opaqueValue ) ; <nl> <nl> - / / Emit the guarded expression . <nl> - return visit ( E - > getSubExpr ( ) , C ) ; <nl> + / / Emit the guarded expression . <nl> + rvalue = visit ( E - > getSubExpr ( ) , C ) ; <nl> + } <nl> + <nl> + / / Now create the verification of the withoutActuallyEscaping operand . <nl> + / / Either we fail the uniquenes check ( which means the closure has escaped ) <nl> + / / and abort or we continue and destroy the ultimate reference . <nl> + auto isEscaping = <nl> + SGF . B . createIsEscapingClosure ( loc , borrowedClosure . getValue ( ) ) ; <nl> + SGF . B . createCondFail ( loc , isEscaping ) ; <nl> + return rvalue ; <nl> } <nl> <nl> RValue RValueEmitter : : visitOpaqueValueExpr ( OpaqueValueExpr * E , SGFContext C ) { <nl> mmm a / lib / SILGen / SILGenPoly . cpp <nl> ppp b / lib / SILGen / SILGenPoly . cpp <nl> <nl> / / = = = mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - = = = / / <nl> <nl> # include " SILGen . h " <nl> + # include " SILGenFunction . h " <nl> # include " Scope . h " <nl> # include " swift / AST / GenericSignatureBuilder . h " <nl> # include " swift / AST / Decl . h " <nl> static void buildWithoutActuallyEscapingThunkBody ( SILGenFunction & SGF ) { <nl> SGF . B . createReturn ( loc , result ) ; <nl> } <nl> <nl> - ManagedValue SILGenFunction : : createWithoutActuallyEscapingClosure ( <nl> + ManagedValue <nl> + SILGenFunction : : createWithoutActuallyEscapingClosure ( <nl> SILLocation loc , ManagedValue noEscapingFunctionValue , SILType escapingTy ) { <nl> <nl> auto escapingFnTy = escapingTy . castTo < SILFunctionType > ( ) ; <nl> ManagedValue SILGenFunction : : createWithoutActuallyEscapingClosure ( <nl> loc , thunkValue , SILType : : getPrimitiveObjectType ( substFnType ) , subs , <nl> noEscapeValue , <nl> SILType : : getPrimitiveObjectType ( escapingFnTy ) ) ; <nl> - <nl> / / We need to ensure the ' lifetime ' of the trivial values context captures . As <nl> / / long as we rerpresent these captures by the same value the following works . <nl> thunkedFn = B . createMarkDependence ( loc , thunkedFn , noEscapeValue ) ; <nl> mmm a / lib / SILOptimizer / Analysis / ARCAnalysis . cpp <nl> ppp b / lib / SILOptimizer / Analysis / ARCAnalysis . cpp <nl> bool swift : : mayDecrementRefCount ( SILInstruction * User , <nl> } <nl> <nl> bool swift : : mayCheckRefCount ( SILInstruction * User ) { <nl> - return isa < IsUniqueInst > ( User ) | | isa < IsUniqueOrPinnedInst > ( User ) ; <nl> + return isa < IsUniqueInst > ( User ) | | isa < IsUniqueOrPinnedInst > ( User ) | | <nl> + isa < IsEscapingClosureInst > ( User ) ; <nl> } <nl> <nl> / / = = = mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm - = = = / / <nl> mmm a / lib / SILOptimizer / Transforms / RedundantLoadElimination . cpp <nl> ppp b / lib / SILOptimizer / Transforms / RedundantLoadElimination . cpp <nl> static bool isRLEInertInstruction ( SILInstruction * Inst ) { <nl> case SILInstructionKind : : RetainValueInst : <nl> case SILInstructionKind : : DeallocStackInst : <nl> case SILInstructionKind : : CondFailInst : <nl> + case SILInstructionKind : : IsEscapingClosureInst : <nl> case SILInstructionKind : : IsUniqueInst : <nl> case SILInstructionKind : : IsUniqueOrPinnedInst : <nl> case SILInstructionKind : : FixLifetimeInst : <nl> mmm a / lib / SILOptimizer / Transforms / SimplifyCFG . cpp <nl> ppp b / lib / SILOptimizer / Transforms / SimplifyCFG . cpp <nl> static CondFailInst * getUnConditionalFail ( SILBasicBlock * BB , SILValue Cond , <nl> / / / condition . <nl> static void createCondFail ( CondFailInst * Orig , SILValue Cond , bool inverted , <nl> SILBuilder & Builder ) { <nl> - if ( inverted ) { <nl> - auto * True = Builder . createIntegerLiteral ( Orig - > getLoc ( ) , Cond - > getType ( ) , 1 ) ; <nl> - Cond = Builder . createBuiltinBinaryFunction ( Orig - > getLoc ( ) , " xor " , <nl> - Cond - > getType ( ) , Cond - > getType ( ) , <nl> - { Cond , True } ) ; <nl> - } <nl> - Builder . createCondFail ( Orig - > getLoc ( ) , Cond ) ; <nl> + Builder . createCondFail ( Orig - > getLoc ( ) , Cond , inverted ) ; <nl> } <nl> <nl> / / / Inverts the expected value of ' PotentialExpect ' ( if it is an expect <nl> mmm a / lib / SILOptimizer / Utils / SILInliner . cpp <nl> ppp b / lib / SILOptimizer / Utils / SILInliner . cpp <nl> InlineCost swift : : instructionInlineCost ( SILInstruction & I ) { <nl> case SILInstructionKind : : UnmanagedToRefInst : <nl> case SILInstructionKind : : UnownedReleaseInst : <nl> case SILInstructionKind : : UnownedRetainInst : <nl> + case SILInstructionKind : : IsEscapingClosureInst : <nl> case SILInstructionKind : : IsUniqueInst : <nl> case SILInstructionKind : : IsUniqueOrPinnedInst : <nl> case SILInstructionKind : : UnownedToRefInst : <nl> mmm a / lib / Serialization / DeserializeSIL . cpp <nl> ppp b / lib / Serialization / DeserializeSIL . cpp <nl> bool SILDeserializer : : readSILInstruction ( SILFunction * Fn , SILBasicBlock * BB , <nl> REFCOUNTING_INSTRUCTION ( UnownedRelease ) <nl> UNARY_INSTRUCTION ( IsUnique ) <nl> UNARY_INSTRUCTION ( IsUniqueOrPinned ) <nl> + UNARY_INSTRUCTION ( IsEscapingClosure ) <nl> UNARY_INSTRUCTION ( AbortApply ) <nl> UNARY_INSTRUCTION ( EndApply ) <nl> # undef UNARY_INSTRUCTION <nl> mmm a / lib / Serialization / SerializeSIL . cpp <nl> ppp b / lib / Serialization / SerializeSIL . cpp <nl> void SILSerializer : : writeSILInstruction ( const SILInstruction & SI ) { <nl> case SILInstructionKind : : UnownedReleaseInst : <nl> case SILInstructionKind : : IsUniqueInst : <nl> case SILInstructionKind : : IsUniqueOrPinnedInst : <nl> + case SILInstructionKind : : IsEscapingClosureInst : <nl> case SILInstructionKind : : AbortApplyInst : <nl> case SILInstructionKind : : EndApplyInst : <nl> case SILInstructionKind : : ReturnInst : <nl> mmm a / stdlib / public / runtime / SwiftObject . mm <nl> ppp b / stdlib / public / runtime / SwiftObject . mm <nl> <nl> # include " swift / Runtime / ObjCBridge . h " <nl> # include " swift / Strings . h " <nl> # include " . . / SwiftShims / RuntimeShims . h " <nl> + # include " . . / SwiftShims / AssertionReporting . h " <nl> # include " Private . h " <nl> # include " SwiftObject . h " <nl> # include " WeakReference . h " <nl> static bool usesNativeSwiftReferenceCounting_nonNull ( <nl> swift_isUniquelyReferencedOrPinned_nonNull_native ( object ) ; <nl> } <nl> <nl> + / / Given a non - @ objc object reference , return true iff the <nl> + / / object is non - nil and has a strong reference count greather than 1 <nl> + bool swift : : swift_isEscapingClosureAtFileLocation ( const HeapObject * object , <nl> + const unsigned char * filename , <nl> + int32_t filenameLength , <nl> + int32_t line ) { <nl> + bool isEscaping = <nl> + object ! = nullptr & & ! object - > refCounts . isUniquelyReferenced ( ) ; <nl> + <nl> + / / Print a message if the closure escaped . <nl> + if ( isEscaping ) { <nl> + auto * message = " Fatal error : closure argument was escaped in " <nl> + " withoutActuallyEscaping block " ; <nl> + auto messageLength = strlen ( message ) ; <nl> + <nl> + if ( _swift_reportFatalErrorsToDebugger ) <nl> + _swift_reportToDebugger ( RuntimeErrorFlagFatal , message ) ; <nl> + <nl> + char * log ; <nl> + swift_asprintf ( & log , " % . * s : file % . * s , line % " PRIu32 " \ n " , messageLength , <nl> + message , filenameLength , filename , line ) ; <nl> + <nl> + swift_reportError ( RuntimeErrorFlagFatal , log ) ; <nl> + free ( log ) ; <nl> + } <nl> + return isEscaping ; <nl> + } <nl> + <nl> / / / Given a non - nil native swift object reference , return true if <nl> / / / either the object has a strong reference count of 1 or its <nl> / / / pinned flag is set . <nl> mmm a / stdlib / public / stubs / Assert . cpp <nl> ppp b / stdlib / public / stubs / Assert . cpp <nl> using namespace swift ; <nl> <nl> bool swift : : _swift_reportFatalErrorsToDebugger = true ; <nl> <nl> - static int swift_asprintf ( char * * strp , const char * fmt , . . . ) { <nl> - va_list args ; <nl> - va_start ( args , fmt ) ; <nl> - # if defined ( _WIN32 ) <nl> - # pragma GCC diagnostic push <nl> - # pragma GCC diagnostic ignored " - Wuninitialized " <nl> - int len = _vscprintf ( fmt , args ) ; <nl> - # pragma GCC diagnostic pop <nl> - if ( len < 0 ) { <nl> - va_end ( args ) ; <nl> - return - 1 ; <nl> - } <nl> - char * buffer = static_cast < char * > ( malloc ( len + 1 ) ) ; <nl> - if ( ! buffer ) { <nl> - va_end ( args ) ; <nl> - return - 1 ; <nl> - } <nl> - int result = vsprintf ( buffer , fmt , args ) ; <nl> - if ( result < 0 ) { <nl> - va_end ( args ) ; <nl> - free ( buffer ) ; <nl> - return - 1 ; <nl> - } <nl> - * strp = buffer ; <nl> - # else <nl> - int result = vasprintf ( strp , fmt , args ) ; <nl> - # endif <nl> - va_end ( args ) ; <nl> - return result ; <nl> - } <nl> - <nl> static void logPrefixAndMessageToDebugger ( <nl> const unsigned char * prefix , int prefixLength , <nl> const unsigned char * message , int messageLength <nl> new file mode 100644 <nl> index 000000000000 . . 45797a217d6b <nl> mmm / dev / null <nl> ppp b / test / Interpreter / withoutActuallyEscaping . swift <nl> <nl> + / / RUN : % target - run - simple - swift <nl> + / / REQUIRES : executable_test <nl> + <nl> + import StdlibUnittest <nl> + <nl> + var WithoutEscapingSuite = TestSuite ( " WithoutActuallyEscaping " ) <nl> + <nl> + var sink : Any = ( ) <nl> + <nl> + func dontEscape ( f : ( ) - > ( ) ) { <nl> + withoutActuallyEscaping ( f ) { <nl> + $ 0 ( ) <nl> + } <nl> + } <nl> + <nl> + func letEscape ( f : ( ) - > ( ) ) - > ( ) - > ( ) { <nl> + return withoutActuallyEscaping ( f ) { return $ 0 } <nl> + } <nl> + <nl> + var testShouldThrow = false <nl> + <nl> + struct MyError : Error { } <nl> + <nl> + func letEscapeThrowing ( f : ( ) - > ( ) ) throws - > ( ) - > ( ) { <nl> + return try withoutActuallyEscaping ( f ) { <nl> + if testShouldThrow { <nl> + throw MyError ( ) <nl> + } <nl> + return $ 0 <nl> + } <nl> + } <nl> + <nl> + WithoutEscapingSuite . test ( " ExpectNoCrash " ) { <nl> + dontEscape ( f : { print ( " foo " ) } ) <nl> + } <nl> + <nl> + WithoutEscapingSuite . test ( " ExpectDebugCrash " ) { <nl> + / / Optimize versions pass a nil closure context . <nl> + if _isDebugAssertConfiguration ( ) { <nl> + expectCrashLater ( ) <nl> + } <nl> + sink = letEscape ( f : { print ( " foo " ) } ) <nl> + } <nl> + <nl> + struct Context { <nl> + var a = 0 <nl> + var b = 1 <nl> + } <nl> + <nl> + WithoutEscapingSuite . test ( " ExpectCrash " ) { <nl> + expectCrashLater ( ) <nl> + let context = Context ( ) <nl> + sink = letEscape ( f : { print ( " Context : \ ( context . a ) \ ( context . b ) " ) } ) <nl> + } <nl> + <nl> + WithoutEscapingSuite . test ( " ExpectThrowingCrash " ) { <nl> + expectCrashLater ( ) <nl> + let context = Context ( ) <nl> + var testDidThrow = false <nl> + testShouldThrow = false <nl> + do { <nl> + sink = try letEscapeThrowing ( f : { print ( " Context : \ ( context . a ) \ ( context . b ) " ) } ) <nl> + } catch { <nl> + testDidThrow = true <nl> + } <nl> + expectFalse ( testDidThrow ) <nl> + } <nl> + <nl> + WithoutEscapingSuite . test ( " ExpectThrowingNoCrash " ) { <nl> + let context = Context ( ) <nl> + var testDidThrow = false <nl> + testShouldThrow = true <nl> + do { <nl> + sink = try letEscapeThrowing ( f : { print ( " Context : \ ( context . a ) \ ( context . b ) " ) } ) <nl> + } catch { <nl> + testDidThrow = true <nl> + } <nl> + expectTrue ( testDidThrow ) <nl> + } <nl> + <nl> + runAllTests ( ) <nl> mmm a / test / SIL / Parser / basic . sil <nl> ppp b / test / SIL / Parser / basic . sil <nl> bb0 ( % 0 : $ * Builtin . NativeObject ) : <nl> % 1 = is_unique_or_pinned % 0 : $ * Builtin . NativeObject <nl> return % 1 : $ Builtin . Int1 <nl> } <nl> + / / CHECK - LABEL : sil @ is_escaping_closure <nl> + sil @ is_escaping_closure : $ @ convention ( thin ) ( @ guaranteed @ callee_guaranteed ( ) - > ( ) ) - > Builtin . Int1 { <nl> + bb0 ( % 0 : $ @ callee_guaranteed ( ) - > ( ) ) : <nl> + / / CHECK : % 1 = is_escaping_closure % 0 : $ @ callee_guaranteed ( ) - > ( ) <nl> + % 1 = is_escaping_closure % 0 : $ @ callee_guaranteed ( ) - > ( ) <nl> + return % 1 : $ Builtin . Int1 <nl> + } <nl> <nl> / / CHECK - LABEL : sil @ box_type : $ @ convention ( thin ) ( < τ_0_0 > { var τ_0_0 } < Int > , Int ) - > ( ) { <nl> sil @ box_type : $ @ convention ( thin ) ( < τ_0_0 > { var τ_0_0 } < Int > , Int ) - > ( ) { <nl> mmm a / test / SILGen / without_actually_escaping . swift <nl> ppp b / test / SILGen / without_actually_escaping . swift <nl> func letEscape ( f : ( ) - > ( ) ) - > ( ) - > ( ) { <nl> / / TODO : verify that the partial_apply ' s reference count is one at the end of the scope . <nl> / / CHECK : [ [ CLOSURE : % . * ] ] = partial_apply [ callee_guaranteed ] [ [ CVT ] ] ( [ [ ARG ] ] ) : $ @ convention ( thin ) ( @ noescape @ callee_guaranteed ( ) - > ( ) ) - > ( ) <nl> / / CHECK : [ [ MD : % . * ] ] = mark_dependence [ [ CLOSURE ] ] : $ @ callee_guaranteed ( ) - > ( ) on [ [ ARG ] ] : $ @ noescape @ callee_guaranteed ( ) - > ( ) <nl> + / / CHECK : [ [ BORROW : % . * ] ] = begin_borrow [ [ MD ] ] : $ @ callee_guaranteed ( ) - > ( ) <nl> + / / CHECK : [ [ COPY : % . * ] ] = copy_value [ [ BORROW ] ] : $ @ callee_guaranteed ( ) - > ( ) <nl> / / CHECK : [ [ USER : % . * ] ] = function_ref @ $ S25without_actually_escaping9letEscape1fyycyyXE_tFyycyycXEfU_ : $ @ convention ( thin ) ( @ owned @ callee_guaranteed ( ) - > ( ) ) - > @ owned @ callee_guaranteed ( ) - > ( ) <nl> - / / CHECK : [ [ RES : % . * ] ] = apply % 5 ( [ [ MD ] ] ) : $ @ convention ( thin ) ( @ owned @ callee_guaranteed ( ) - > ( ) ) - > @ owned @ callee_guaranteed ( ) - > ( ) <nl> + / / CHECK : [ [ RES : % . * ] ] = apply [ [ USER ] ] ( [ [ COPY ] ] ) : $ @ convention ( thin ) ( @ owned @ callee_guaranteed ( ) - > ( ) ) - > @ owned @ callee_guaranteed ( ) - > ( ) <nl> + / / CHECK : [ [ ESCAPED : % . * ] ] = is_escaping_closure [ [ BORROW ] ] : $ @ callee_guaranteed ( ) - > ( ) <nl> + / / CHECK : cond_fail [ [ ESCAPED ] ] : $ Builtin . Int1 <nl> + / / CHECK : end_borrow [ [ BORROW ] ] from [ [ MD ] ] : $ @ callee_guaranteed ( ) - > ( ) , $ @ callee_guaranteed ( ) - > ( ) <nl> + / / CHECK : destroy_value [ [ MD ] ] <nl> / / CHECK : return [ [ RES ] ] : $ @ callee_guaranteed ( ) - > ( ) <nl> return withoutActuallyEscaping ( f ) { return $ 0 } <nl> } <nl> + <nl> + <nl> + / / CHECK - LABEL : sil hidden @ $ S25without_actually_escaping14letEscapeThrow1fyycyycyKXE_tKF <nl> + / / CHECK : bb0 ( [ [ ARG : % . * ] ] : @ trivial $ @ noescape @ callee_guaranteed ( ) - > ( @ owned @ callee_guaranteed ( ) - > ( ) , @ error Error ) ) : <nl> + / / CHECK : [ [ CVT : % . * ] ] = function_ref @ $ SIeg_s5Error_pIgozo_Ieg_sAA_pIegozo_TR <nl> + / / CHECK : [ [ CLOSURE : % . * ] ] = partial_apply [ callee_guaranteed ] [ [ CVT ] ] ( [ [ ARG ] ] ) <nl> + / / CHECK : [ [ MD : % . * ] ] = mark_dependence [ [ CLOSURE ] ] : { { . * } } on [ [ ARG ] ] <nl> + / / CHECK : [ [ BORROW : % . * ] ] = begin_borrow [ [ MD ] ] <nl> + / / CHECK : [ [ COPY : % . * ] ] = copy_value [ [ BORROW ] ] <nl> + / / CHECK : [ [ USER : % . * ] ] = function_ref @ $ S25without_actually_escaping14letEscapeThrow1fyycyycyKXE_tKFyycyycyKcKXEfU_ <nl> + / / CHECK : try_apply [ [ USER ] ] ( [ [ COPY ] ] ) : { { . * } } , normal bb1 , error bb2 <nl> + / / <nl> + / / CHECK : bb1 ( [ [ RES : % . * ] ] : @ owned $ @ callee_guaranteed ( ) - > ( ) ) : <nl> + / / CHECK : [ [ ESCAPED : % . * ] ] = is_escaping_closure [ [ BORROW ] ] <nl> + / / CHECK : cond_fail [ [ ESCAPED ] ] : $ Builtin . Int1 <nl> + / / CHECK : end_borrow [ [ BORROW ] ] from [ [ MD ] ] <nl> + / / CHECK : destroy_value [ [ MD ] ] <nl> + / / CHECK : return [ [ RES ] ] <nl> + / / <nl> + / / CHECK : bb2 ( [ [ ERR : % . * ] ] : @ owned $ Error ) : <nl> + / / CHECK : end_borrow [ [ BORROW ] ] from [ [ MD ] ] <nl> + / / CHECK : destroy_value [ [ MD ] ] <nl> + / / CHECK : throw [ [ ERR ] ] : $ Error <nl> + / / CHECK : } <nl> + <nl> + func letEscapeThrow ( f : ( ) throws - > ( ) - > ( ) ) throws - > ( ) - > ( ) { <nl> + return try withoutActuallyEscaping ( f ) { return try $ 0 ( ) } <nl> + } <nl> mmm a / utils / sil - mode . el <nl> ppp b / utils / sil - mode . el <nl> <nl> " fix_lifetime " " mark_dependence " <nl> " end_lifetime " <nl> " is_unique " " is_unique_or_pinned " <nl> + " is_escaping_closure " <nl> " copy_block " <nl> " strong_unpin " " strong_pin " " is_unique " " is_unique_or_pinned " ) <nl> ' words ) . font - lock - keyword - face ) <nl> mmm a / utils / vim / syntax / sil . vim <nl> ppp b / utils / vim / syntax / sil . vim <nl> syn keyword swiftKeyword getter setter allocator initializer enumelt destroyer g <nl> syn keyword swiftKeyword alloc_global alloc_stack alloc_ref alloc_ref_dynamic alloc_box alloc_existential_box alloc_value_buffer dealloc_stack dealloc_box dealloc_existential_box dealloc_ref dealloc_partial_ref dealloc_value_buffer skipwhite <nl> syn keyword swiftKeyword debug_value debug_value_addr skipwhite <nl> syn keyword swiftKeyword load load_unowned store assign mark_uninitialized mark_function_escape copy_addr destroy_addr index_addr index_raw_pointer bind_memory to skipwhite <nl> - syn keyword swiftKeyword strong_retain strong_release strong_retain_unowned ref_to_unowned unowned_to_ref unowned_retain unowned_release load_weak store_unowned store_weak fix_lifetime autorelease_value set_deallocating is_unique is_unique_or_pinned strong_pin strong_unpin skipwhite <nl> + syn keyword swiftKeyword strong_retain strong_release strong_retain_unowned ref_to_unowned unowned_to_ref unowned_retain unowned_release load_weak store_unowned store_weak fix_lifetime autorelease_value set_deallocating is_unique is_unique_or_pinned is_escaping_closure strong_pin strong_unpin skipwhite <nl> syn keyword swiftKeyword function_ref integer_literal float_literal string_literal const_string_literal global_addr skipwhite <nl> syn keyword swiftKeyword class_method super_method witness_method objc_method objc_super_method skipwhite <nl> syn keyword swiftKeyword partial_apply builtin skipwhite <nl>
Merge remote - tracking branch ' origin / master ' into master - llvm - swift5 - transition
apple/swift
d18d9d84558ef142d566419da5694bed9871a45e
2018-03-09T17:38:10Z
mmm a / Source / CNTKv2LibraryDll / DistributedLearnerBase . cpp <nl> ppp b / Source / CNTKv2LibraryDll / DistributedLearnerBase . cpp <nl> namespace CNTK <nl> } <nl> <nl> auto dataType = gradientValues . begin ( ) - > first . GetDataType ( ) ; <nl> - info . evalCriterionValue = MakeSharedObject < NDArrayView > ( 0 , dataType , NDShape { } , DeviceDescriptor : : CPUDevice ( ) ) ; <nl> - info . trainingLossValue = MakeSharedObject < NDArrayView > ( 0 , dataType , NDShape { } , DeviceDescriptor : : CPUDevice ( ) ) ; <nl> + info . evalCriterionValue = MakeSharedObject < NDArrayView > ( 0 , dataType , NDShape { } , DeviceDescriptor : : UseDefaultDevice ( ) ) ; <nl> + info . trainingLossValue = MakeSharedObject < NDArrayView > ( 0 , dataType , NDShape { } , DeviceDescriptor : : UseDefaultDevice ( ) ) ; <nl> } <nl> <nl> void DistributedLearnerBase : : ConvertToOrdered ( const std : : unordered_map < Parameter , NDArrayViewPtr > & gradientValues , std : : vector < std : : pair < Parameter , NDArrayViewPtr > > & result , std : : unordered_map < Parameter , NDArrayViewPtr > * convertedGradientValues ) <nl>
Fix distributed training hang with empty minibatch
microsoft/CNTK
9975bfb2d263f68aa5ae94e078963979ac5efe8d
2017-11-17T05:54:29Z