MCPcopy Create free account
hub / github.com/Xilinx/CHaiDNN / CropForward

Function CropForward

software/common/xi_kernels.cpp:486–500  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

484void CropWrapper(int* inarray, int* outarray, int in_height, int in_width, int out_height, int out_width, int offset, int channels);
485
486void CropForward(int *input, int *output, int *scalars)
487{
488
489 int n_width = AlignSize(scalars[2], 2);
490 //fprintf(stderr, "Start : CropForwardWrapper\n");
491 for(int batch_id = 0; batch_id < XBATCH_SIZE; ++batch_id)
492 {
493 int *crop_in = (int *)(input+(batch_id*scalars[1]*n_width*1));
494 int *crop_out = (int *)(output+(batch_id*scalars[4]*scalars[5]*1));
495 //fprintf(stderr, "cropLayer Start : \n");
496 //# Crop sw-kernel
497 CropWrapper(crop_in, crop_out, scalars[1], scalars[2], scalars[4], scalars[5], scalars[7], 1);
498 //fprintf(stderr, "cropLayer End : \n");
499 }
500}
501
502void XpackWrapper(void *input1, void *input2, void *output1, void *output2, string quant, int *params, float *float_params);
503

Callers 1

normRoutineFunction · 0.85

Calls 1

CropWrapperFunction · 0.85

Tested by

no test coverage detected