Your Neuron class will inherent from NeuronVC and your Synapse class will inherent from SynapaseVC. Then your definitions (class statements) for for Neuron and Synapse would define variables to these Parent Virtual classes. I think you will have to create Parent Virtual classes for ‘synapase’ and ‘neuron’ without the dependency.įor now call these classes ‘SynapseVC’ and ‘NeuronVC’ It has been a while since I programmed in C++ so I don’t know how to get around the problem of dependent definitions. I believe the problem is that your definitions are dependent on each other. …Then in SynapsesH.cu (Line20) declares _outputNuron as a pointer to Neuron, which is not yet defined. …When SynapseH.cu is included, at line 5 it tries to include NeuronH.cu, but since NEURONH_CU is defined nothing is included. When NeuronH.cu compiles it defines (line 2) NEURONH_CU, then includes (line 5) SynapseH.cu. cu files are linked.īut never mind that, the problem starts at the first line of NeuronH.cu. I am new to CUDA & VisualStudio, but I see you including. Wants the Synapse info to put in its Input.ĬUDA_CALLABLE_MEMBER double getSynapseOutput(int NeuronIdx) ĬUDA_CALLABLE_MEMBER double calcError(double* target) The index of the Neuron at the Layer being Calc. Gets the Output Multiplied by the Weights Save the Pointer to the ActivationFunc.ĬUDA_CALLABLE_MEMBER void Neuron::setActvFunc(ActivationFunc* actvFunc) Sets Output & Weighted Output (m_wtdOutput)ĬUDA_CALLABLE_MEMBER void setOutput(double output) ĬUDA_CALLABLE_MEMBER void iniInputSynapse(int numInputSynapse) Int _outputSynapsesLen, _inputSynapsesLen ĬUDA_CALLABLE_MEMBER void createNeuron(int numNeuronsNextLayer) Neuron* _outputNeuron // This is the Line where the Error occured #define CUDA_CALLABLE_MEMBER _host_ _device_ Is it the fact that their are “Neuron” object pointers in SynapseH.cu, along with “Synapse” object pointers in NeuronH.cu?Įrror : identifier “Neuron” is undefined in SynapseH.cu I’m using VS2013, and a CUDA v7.5 Project. It says the Class “Neuron” is undefined in SynapseH.cu, but it is included right at the top. The predefined variable blockDim contains the dimensions of each thread block as specified in the second execution configuration parameter for the kernel launch. These predefined variables are of type dim3, analogous to the execution configuration parameters in host code. I been struggling for hours to figure out what is wrong. CUDA defines the variables blockDim, blockIdx, and threadIdx.
0 Comments
Leave a Reply. |