mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-05-03 01:04:23 +08:00
Fix a couple of typos in the code.
This commit is contained in:
parent
e5f25622e2
commit
7f87cc3a3b
@ -220,7 +220,7 @@ EIGEN_DEVICE_FUNC inline void TensorExecutor<Expression, GpuDevice, false>::run(
|
|||||||
if (needs_assign)
|
if (needs_assign)
|
||||||
{
|
{
|
||||||
const int block_size = device.maxCudaThreadsPerBlock();
|
const int block_size = device.maxCudaThreadsPerBlock();
|
||||||
const int max_blocks = numext::maxi<int>(device.maxBlocks(), device.getNumCudaMultiProcessors() * device.maxCudaThreadsPerMultiProcessor() / block_size);
|
const int max_blocks = numext::mini<int>(device.maxBlocks(), device.getNumCudaMultiProcessors() * device.maxCudaThreadsPerMultiProcessor() / block_size);
|
||||||
const Index size = array_prod(evaluator.dimensions());
|
const Index size = array_prod(evaluator.dimensions());
|
||||||
// Create a least one block to ensure we won't crash if we're called with tensors of size 0.
|
// Create a least one block to ensure we won't crash if we're called with tensors of size 0.
|
||||||
const int num_blocks = numext::maxi<int>(numext::mini<int>(max_blocks, (size + block_size - 1) / block_size), 1);
|
const int num_blocks = numext::maxi<int>(numext::mini<int>(max_blocks, (size + block_size - 1) / block_size), 1);
|
||||||
@ -239,7 +239,7 @@ EIGEN_DEVICE_FUNC inline void TensorExecutor<Expression, GpuDevice, true>::run(c
|
|||||||
if (needs_assign)
|
if (needs_assign)
|
||||||
{
|
{
|
||||||
const int block_size = device.maxCudaThreadsPerBlock();
|
const int block_size = device.maxCudaThreadsPerBlock();
|
||||||
const int max_blocks = numext::maxi<int>(device.maxBlocks(), device.getNumCudaMultiProcessors() * device.maxCudaThreadsPerMultiProcessor() / block_size);
|
const int max_blocks = numext::mini<int>(device.maxBlocks(), device.getNumCudaMultiProcessors() * device.maxCudaThreadsPerMultiProcessor() / block_size);
|
||||||
const Index size = array_prod(evaluator.dimensions());
|
const Index size = array_prod(evaluator.dimensions());
|
||||||
// Create a least one block to ensure we won't crash if we're called with tensors of size 0.
|
// Create a least one block to ensure we won't crash if we're called with tensors of size 0.
|
||||||
const int num_blocks = numext::maxi<int>(numext::mini<int>(max_blocks, (size + block_size - 1) / block_size), 1);
|
const int num_blocks = numext::maxi<int>(numext::mini<int>(max_blocks, (size + block_size - 1) / block_size), 1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user