mirror of
https://github.com/NVIDIA/cuda-samples.git
synced 2025-04-20 22:52:24 +08:00
Asserts
This commit is contained in:
parent
b43cc7a47e
commit
0632897382
|
@ -39,6 +39,8 @@
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
#include "MonteCarloPi.h"
|
#include "MonteCarloPi.h"
|
||||||
#include <helper_cuda.h>
|
#include <helper_cuda.h>
|
||||||
#include <cuda.h>
|
#include <cuda.h>
|
||||||
|
@ -243,6 +245,7 @@ class VulkanCudaPi : public VulkanBaseApp {
|
||||||
|
|
||||||
// (SE) get function ptr
|
// (SE) get function ptr
|
||||||
auto* vkGetBufferDeviceAddressKHR = (PFN_vkGetBufferDeviceAddressKHR)vkGetDeviceProcAddr(m_device, "vkGetBufferDeviceAddressKHR");
|
auto* vkGetBufferDeviceAddressKHR = (PFN_vkGetBufferDeviceAddressKHR)vkGetDeviceProcAddr(m_device, "vkGetBufferDeviceAddressKHR");
|
||||||
|
assert(vkGetBufferDeviceAddressKHR);
|
||||||
std::cout << "DEBUG: vkGetBufferDeviceAddressKHR = " << (void*)vkGetBufferDeviceAddressKHR << std::endl;
|
std::cout << "DEBUG: vkGetBufferDeviceAddressKHR = " << (void*)vkGetBufferDeviceAddressKHR << std::endl;
|
||||||
|
|
||||||
// get BDA
|
// get BDA
|
||||||
|
@ -250,6 +253,7 @@ class VulkanCudaPi : public VulkanBaseApp {
|
||||||
nullptr,
|
nullptr,
|
||||||
m_bdaBuffer};
|
m_bdaBuffer};
|
||||||
auto bda = vkGetBufferDeviceAddressKHR(m_device, &bda_info);
|
auto bda = vkGetBufferDeviceAddressKHR(m_device, &bda_info);
|
||||||
|
assert(bda);
|
||||||
std::cout << "DEBUG: BDA = " << (void*)bda << std::endl;
|
std::cout << "DEBUG: BDA = " << (void*)bda << std::endl;
|
||||||
|
|
||||||
// Create the semaphore vulkan will signal when it's done with the vertex
|
// Create the semaphore vulkan will signal when it's done with the vertex
|
||||||
|
|
Loading…
Reference in New Issue
Block a user