-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathmain.cpp
28 lines (20 loc) · 898 Bytes
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include "reduce.h"
#include "scan.h"
#include <benchmark/benchmark.h>
#include <iostream>
Vortex2D::Renderer::Device* gDevice = nullptr;
int main(int argc, char** argv)
{
Vortex2D::Renderer::Instance instance("VulkanSubgroups", {}, false);
auto physicalDevice = instance.GetPhysicalDevice();
auto properties = physicalDevice.getProperties2<vk::PhysicalDeviceProperties2, vk::PhysicalDeviceSubgroupProperties>();
auto subgroupProperties = properties.get<vk::PhysicalDeviceSubgroupProperties>();
std::cout << "Subgroup size: " << subgroupProperties.subgroupSize << std::endl;
std::cout << "Subgroup supported operations: " << vk::to_string(subgroupProperties.supportedOperations) << std::endl;
Vortex2D::Renderer::Device device(physicalDevice);
gDevice = &device;
CheckReduce();
CheckScan();
benchmark::Initialize(&argc, argv);
benchmark::RunSpecifiedBenchmarks();
}