13 #include "PtwiseProductLayer.hpp" 17 PtwiseProductLayer::PtwiseProductLayer() { initialize_base(); }
19 PtwiseProductLayer::PtwiseProductLayer(
const char *name, HyPerCol *hc) {
24 PtwiseProductLayer::~PtwiseProductLayer() {}
26 int PtwiseProductLayer::initialize_base() {
31 int PtwiseProductLayer::initialize(
const char *name, HyPerCol *hc) {
32 return ANNLayer::initialize(name, hc);
35 Response::Status PtwiseProductLayer::allocateDataStructures() {
36 auto status = ANNLayer::allocateDataStructures();
37 pvAssert(numChannels >= 2);
41 Response::Status PtwiseProductLayer::updateState(
double timef,
double dt) {
43 float *A = clayer->activity->data;
45 int num_channels = getNumChannels();
46 float *gSynHead = GSyn == NULL ? NULL : GSyn[0];
50 int num_neurons = nx * ny * nf;
51 int nbatch = loc->nbatch;
52 updateV_PtwiseProductLayer(nbatch, num_neurons, V, gSynHead);
53 setActivity_HyPerLayer(
65 return Response::SUCCESS;