MCPcopy Create free account
hub / github.com/OriginQ/QPanda-2 / mul

Method mul

Core/VirtualQuantumProcessor/SingleAmplitude/Tensor.cpp:211–221  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

209}
210
211void CPUComplexTensor::mul(ComplexTensor &other, size_t *mask_array)
212{
213 int64_t size = 1ll << m_rank;
214 int threads = get_num_threads(m_rank);
215#pragma omp parallel for num_threads(threads)
216 for (int64_t i = 0; i < size; i++)
217 {
218 auto num = getNum(i, mask_array, getRank(), other.getRank());
219 mulElem(i, other.getElem(num));
220 }
221}
222
223ComputeBackend CPUComplexTensor::getBackend()
224{

Callers 1

mulMethod · 0.45

Calls 4

get_num_threadsFunction · 0.85
getNumFunction · 0.85
getRankMethod · 0.45
getElemMethod · 0.45

Tested by

no test coverage detected