Внесение изменений в модуль на С++
Здравствуйте, есть код:
// Dynamic link library implementation of NeuroSolutions FullSynapse component #include "NSDLL.h"/*************************************************************//* Macros to access the PE layers and weights in matrix form */#define in(i,j) input[j+i*inCols]#define out(i,j) output[j+i*outCols]#define W(i,j) weights[j+i*inCount]/***********************************//* Forward activation of component */__declspec(dllexport) void performFullSynapse( DLLData *instance, // Pointer to instance data (may be NULL) NSFloat *input, // Pointer to the input layer of processing elements (PEs) int inRows, // Number of rows of PEs in the input layer int inCols, // Number of columns of PEs in the input layer NSFloat *output, // Pointer to the output layer int outRows, // Number of rows of PEs in the output layer int outCols, // Number of columns of PEs in the output layer NSFloat *weights // Pointer to the fully connected matrix of weights ){ int i, j, inCount=inRows*inCols,
outCount=outRows*outCols;
for (i=0; i += W(i,j)*input[j];
}
Необходимо в output поместить результат свёртки 3х3 массива inCount.