mirror of
https://github.com/NVIDIA/cuda-samples.git
synced 2025-07-02 05:10:31 +08:00
Merge pull request #368 from XSShawnZeng/master
Update the vulkan headers include sequence and the transpose code format check
This commit is contained in:
commit
adacf1cffd
@ -34,8 +34,10 @@
|
|||||||
#include <vulkan/vulkan.h>
|
#include <vulkan/vulkan.h>
|
||||||
#ifdef _WIN64
|
#ifdef _WIN64
|
||||||
#define NOMINMAX
|
#define NOMINMAX
|
||||||
#include <vulkan/vulkan_win32.h>
|
// Add windows.h to the include path
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
// Add vulkan_win32.h to the include path
|
||||||
|
#include <vulkan/vulkan_win32.h>
|
||||||
#endif /* _WIN64 */
|
#endif /* _WIN64 */
|
||||||
|
|
||||||
/* remove _VK_TIMELINE_SEMAPHORE to use binary semaphores */
|
/* remove _VK_TIMELINE_SEMAPHORE to use binary semaphores */
|
||||||
|
@ -34,8 +34,10 @@
|
|||||||
#include <vulkan/vulkan.h>
|
#include <vulkan/vulkan.h>
|
||||||
#ifdef _WIN64
|
#ifdef _WIN64
|
||||||
#define NOMINMAX
|
#define NOMINMAX
|
||||||
#include <vulkan/vulkan_win32.h>
|
// Add windows.h to the include path firstly as dependency for other Windows headers
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
// Add other Windows headers
|
||||||
|
#include <vulkan/vulkan_win32.h>
|
||||||
#endif /* _WIN64 */
|
#endif /* _WIN64 */
|
||||||
|
|
||||||
struct GLFWwindow;
|
struct GLFWwindow;
|
||||||
|
@ -27,10 +27,12 @@
|
|||||||
|
|
||||||
#define GLFW_INCLUDE_VULKAN
|
#define GLFW_INCLUDE_VULKAN
|
||||||
#ifdef _WIN64
|
#ifdef _WIN64
|
||||||
|
// Add windows.h to the include path firstly as dependency for other Windows headers
|
||||||
|
#include <windows.h>
|
||||||
|
// Add other Windows headers
|
||||||
#include <VersionHelpers.h>
|
#include <VersionHelpers.h>
|
||||||
#include <aclapi.h>
|
#include <aclapi.h>
|
||||||
#include <dxgi1_2.h>
|
#include <dxgi1_2.h>
|
||||||
#include <windows.h>
|
|
||||||
#define _USE_MATH_DEFINES
|
#define _USE_MATH_DEFINES
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -597,17 +597,16 @@ int main(int argc, char **argv)
|
|||||||
1,
|
1,
|
||||||
TILE_DIM * BLOCK_ROWS);
|
TILE_DIM * BLOCK_ROWS);
|
||||||
|
|
||||||
// Reset d_odata to zero before starting the next loop iteration to avoid
|
// Reset d_odata to zero before starting the next loop iteration to avoid
|
||||||
// carrying over results from previous kernels. Without this reset, residual
|
// carrying over results from previous kernels. Without this reset, residual
|
||||||
// data from a prior kernel (e.g., 'copy') could make a subsequent
|
// data from a prior kernel (e.g., 'copy') could make a subsequent
|
||||||
// kernel (e.g., 'copySharedMem') appear correct even if it performs no work,
|
// kernel (e.g., 'copySharedMem') appear correct even if it performs no work,
|
||||||
// leading to false positives in compareData.
|
// leading to false positives in compareData.
|
||||||
for (int i = 0; i < (size_x * size_y); ++i) {
|
for (int i = 0; i < (size_x * size_y); ++i) {
|
||||||
h_odata[i] = 0;
|
h_odata[i] = 0;
|
||||||
}
|
}
|
||||||
// copy host data to device
|
// copy host data to device
|
||||||
checkCudaErrors(
|
checkCudaErrors(cudaMemcpy(d_odata, h_odata, mem_size, cudaMemcpyHostToDevice));
|
||||||
cudaMemcpy(d_odata, h_odata, mem_size, cudaMemcpyHostToDevice));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// cleanup
|
// cleanup
|
||||||
|
Loading…
x
Reference in New Issue
Block a user