Rename *Indeces variables and parameters to *Indices
The plural of index is indexes or indices, the latter seems to be more common in technical contexts.
This commit is contained in:
parent
e6473a6edc
commit
4968fb8c02
5 changed files with 21 additions and 21 deletions
|
|
@ -218,10 +218,10 @@ Back to `examples list <#simple-examples>`_.
|
|||
// In this case we select device 0, and for queues, one queue from familyIndex 0
|
||||
// and one queue from familyIndex 2
|
||||
uint32_t deviceIndex(0);
|
||||
std::vector<uint32_t> familyIndeces = {0, 2};
|
||||
std::vector<uint32_t> familyIndices = {0, 2};
|
||||
|
||||
// We create a manager with device index, and queues by queue family index
|
||||
kp::Manager mgr(deviceIndex, familyIndeces);
|
||||
kp::Manager mgr(deviceIndex, familyIndices);
|
||||
|
||||
// We need to create explicit sequences with their respective queues
|
||||
// The second parameter is the index in the familyIndex array which is relative
|
||||
|
|
|
|||
|
|
@ -189,10 +189,10 @@ You will want to keep track of the indices you initialize your manager, as you w
|
|||
// In this case we select device 0, and for queues, one queue from familyIndex 0
|
||||
// and one queue from familyIndex 2
|
||||
uint32_t deviceIndex(0);
|
||||
std::vector<uint32_t> familyIndeces = {0, 2};
|
||||
std::vector<uint32_t> familyIndices = {0, 2};
|
||||
|
||||
// We create a manager with device index, and queues by queue family index
|
||||
kp::Manager mgr(deviceIndex, familyIndeces);
|
||||
kp::Manager mgr(deviceIndex, familyIndices);
|
||||
|
||||
We are now able to create sequences with a particular queue.
|
||||
|
||||
|
|
|
|||
|
|
@ -1267,12 +1267,12 @@ class Manager
|
|||
* they would like to create the resources on.
|
||||
*
|
||||
* @param physicalDeviceIndex The index of the physical device to use
|
||||
* @param familyQueueIndeces (Optional) List of queue indices to add for
|
||||
* @param familyQueueIndices (Optional) List of queue indices to add for
|
||||
* explicit allocation
|
||||
* @param totalQueues The total number of compute queues to create.
|
||||
*/
|
||||
Manager(uint32_t physicalDeviceIndex,
|
||||
const std::vector<uint32_t>& familyQueueIndeces = {});
|
||||
const std::vector<uint32_t>& familyQueueIndices = {});
|
||||
|
||||
/**
|
||||
* Manager constructor which allows your own vulkan application to integrate
|
||||
|
|
@ -1509,7 +1509,7 @@ class Manager
|
|||
std::unordered_map<std::string, std::shared_ptr<Sequence>>
|
||||
mManagedSequences;
|
||||
|
||||
std::vector<uint32_t> mComputeQueueFamilyIndeces;
|
||||
std::vector<uint32_t> mComputeQueueFamilyIndices;
|
||||
std::vector<std::shared_ptr<vk::Queue>> mComputeQueues;
|
||||
|
||||
uint32_t mCurrentSequenceIndex = -1;
|
||||
|
|
@ -1523,7 +1523,7 @@ class Manager
|
|||
|
||||
// Create functions
|
||||
void createInstance();
|
||||
void createDevice(const std::vector<uint32_t>& familyQueueIndeces = {});
|
||||
void createDevice(const std::vector<uint32_t>& familyQueueIndices = {});
|
||||
};
|
||||
|
||||
} // End namespace kp
|
||||
|
|
|
|||
|
|
@ -29,12 +29,12 @@ Manager::Manager()
|
|||
{}
|
||||
|
||||
Manager::Manager(uint32_t physicalDeviceIndex,
|
||||
const std::vector<uint32_t>& familyQueueIndeces)
|
||||
const std::vector<uint32_t>& familyQueueIndices)
|
||||
{
|
||||
this->mPhysicalDeviceIndex = physicalDeviceIndex;
|
||||
|
||||
this->createInstance();
|
||||
this->createDevice(familyQueueIndeces);
|
||||
this->createDevice(familyQueueIndices);
|
||||
}
|
||||
|
||||
Manager::Manager(std::shared_ptr<vk::Instance> instance,
|
||||
|
|
@ -119,7 +119,7 @@ Manager::createManagedSequence(std::string sequenceName, uint32_t queueIndex)
|
|||
std::make_shared<Sequence>(this->mPhysicalDevice,
|
||||
this->mDevice,
|
||||
this->mComputeQueues[queueIndex],
|
||||
this->mComputeQueueFamilyIndeces[queueIndex]);
|
||||
this->mComputeQueueFamilyIndices[queueIndex]);
|
||||
sq->init();
|
||||
|
||||
if (sequenceName.empty()) {
|
||||
|
|
@ -220,7 +220,7 @@ Manager::createInstance()
|
|||
}
|
||||
|
||||
void
|
||||
Manager::createDevice(const std::vector<uint32_t>& familyQueueIndeces)
|
||||
Manager::createDevice(const std::vector<uint32_t>& familyQueueIndices)
|
||||
{
|
||||
|
||||
SPDLOG_DEBUG("Kompute Manager creating Device");
|
||||
|
|
@ -251,7 +251,7 @@ Manager::createDevice(const std::vector<uint32_t>& familyQueueIndeces)
|
|||
this->mPhysicalDeviceIndex,
|
||||
physicalDeviceProperties.deviceName);
|
||||
|
||||
if (!familyQueueIndeces.size()) {
|
||||
if (!familyQueueIndices.size()) {
|
||||
// Find compute queue
|
||||
std::vector<vk::QueueFamilyProperties> allQueueFamilyProperties =
|
||||
physicalDevice.getQueueFamilyProperties();
|
||||
|
|
@ -272,14 +272,14 @@ Manager::createDevice(const std::vector<uint32_t>& familyQueueIndeces)
|
|||
throw std::runtime_error("Compute queue is not supported");
|
||||
}
|
||||
|
||||
this->mComputeQueueFamilyIndeces.push_back(computeQueueFamilyIndex);
|
||||
this->mComputeQueueFamilyIndices.push_back(computeQueueFamilyIndex);
|
||||
} else {
|
||||
this->mComputeQueueFamilyIndeces = familyQueueIndeces;
|
||||
this->mComputeQueueFamilyIndices = familyQueueIndices;
|
||||
}
|
||||
|
||||
std::unordered_map<uint32_t, uint32_t> familyQueueCounts;
|
||||
std::unordered_map<uint32_t, std::vector<float>> familyQueuePriorities;
|
||||
for (const auto& value : this->mComputeQueueFamilyIndeces) {
|
||||
for (const auto& value : this->mComputeQueueFamilyIndices) {
|
||||
familyQueueCounts[value]++;
|
||||
familyQueuePriorities[value].push_back(1.0f);
|
||||
}
|
||||
|
|
@ -308,7 +308,7 @@ Manager::createDevice(const std::vector<uint32_t>& familyQueueIndeces)
|
|||
&deviceCreateInfo, nullptr, this->mDevice.get());
|
||||
SPDLOG_DEBUG("Kompute Manager device created");
|
||||
|
||||
for (const uint32_t& familyQueueIndex : this->mComputeQueueFamilyIndeces) {
|
||||
for (const uint32_t& familyQueueIndex : this->mComputeQueueFamilyIndices) {
|
||||
std::shared_ptr<vk::Queue> currQueue = std::make_shared<vk::Queue>();
|
||||
|
||||
this->mDevice->getQueue(familyQueueIndex,
|
||||
|
|
|
|||
|
|
@ -29,12 +29,12 @@ class Manager
|
|||
* they would like to create the resources on.
|
||||
*
|
||||
* @param physicalDeviceIndex The index of the physical device to use
|
||||
* @param familyQueueIndeces (Optional) List of queue indices to add for
|
||||
* @param familyQueueIndices (Optional) List of queue indices to add for
|
||||
* explicit allocation
|
||||
* @param totalQueues The total number of compute queues to create.
|
||||
*/
|
||||
Manager(uint32_t physicalDeviceIndex,
|
||||
const std::vector<uint32_t>& familyQueueIndeces = {});
|
||||
const std::vector<uint32_t>& familyQueueIndices = {});
|
||||
|
||||
/**
|
||||
* Manager constructor which allows your own vulkan application to integrate
|
||||
|
|
@ -271,7 +271,7 @@ class Manager
|
|||
std::unordered_map<std::string, std::shared_ptr<Sequence>>
|
||||
mManagedSequences;
|
||||
|
||||
std::vector<uint32_t> mComputeQueueFamilyIndeces;
|
||||
std::vector<uint32_t> mComputeQueueFamilyIndices;
|
||||
std::vector<std::shared_ptr<vk::Queue>> mComputeQueues;
|
||||
|
||||
uint32_t mCurrentSequenceIndex = -1;
|
||||
|
|
@ -285,7 +285,7 @@ class Manager
|
|||
|
||||
// Create functions
|
||||
void createInstance();
|
||||
void createDevice(const std::vector<uint32_t>& familyQueueIndeces = {});
|
||||
void createDevice(const std::vector<uint32_t>& familyQueueIndices = {});
|
||||
};
|
||||
|
||||
} // End namespace kp
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue