Lines Matching defs:sizes
72 "compute copy mapping expected same number of threads and copy sizes");
123 /// Extract `result` from `sizes` with the following constraints:
124 /// 1. sizes[i] % result[i] for all i
126 /// 3. if `currentIndex` is sizes.size() - 1, then threadsPerDim[currentIndex]
127 /// must be sizes[currentIndex].
129 /// mapping a copy of size `sizes`, while being bounded by `totalNumThreads` and
132 /// threadsPerDim[currentIndex .. sizes.end()]
136 // tradeoffs: `sizes` is expected to be of small rank and contain small values.
137 static SmallVector<int64_t> maximizeNumThreads(ArrayRef<int64_t> sizes,
140 assert(static_cast<size_t>(currentIndex) < sizes.size() &&
143 if (static_cast<size_t>(currentIndex) == sizes.size() - 1) {
144 LDBG(indent << "mandated globalBest: " << sizes[currentIndex]);
145 return SmallVector<int64_t>{sizes[currentIndex]};
149 int64_t s = sizes[currentIndex];
152 localThreadsPerDim.reserve(sizes.size());
157 maximizeNumThreads(sizes, currentIndex + 1, maxNumThreads / factor);
182 ArrayRef<int64_t> sizes,
197 inferNumThreadsImpl(totalNumThreads, sizes, localVectorSize);
206 // If we have not yet returned, it means that we have tried all vector sizes
209 return inferNumThreadsImpl(totalNumThreads, sizes, desiredVectorSize);
214 int64_t totalNumThreads, ArrayRef<int64_t> sizes,
216 assert(sizes.back() % desiredVectorSize == 0 &&
225 SmallVector<int64_t> scaledSizes(sizes);