mirror of
https://github.com/NVIDIA/cuda-samples.git
synced 2025-07-02 04:51:59 +08:00
Update code format
This commit is contained in:
parent
718fe6486d
commit
b013387a39
@ -101,7 +101,7 @@ static void childProcess(int id)
|
|||||||
std::vector<char> verification_buffer(DATA_SIZE);
|
std::vector<char> verification_buffer(DATA_SIZE);
|
||||||
pid_t pid;
|
pid_t pid;
|
||||||
char pidString[20] = {0};
|
char pidString[20] = {0};
|
||||||
char lshmName[40] = {0};
|
char lshmName[40] = {0};
|
||||||
|
|
||||||
pid = getppid();
|
pid = getppid();
|
||||||
snprintf(pidString, sizeof(pidString), "%d", pid);
|
snprintf(pidString, sizeof(pidString), "%d", pid);
|
||||||
@ -207,7 +207,7 @@ static void parentProcess(char *app)
|
|||||||
std::vector<Process> processes;
|
std::vector<Process> processes;
|
||||||
pid_t pid;
|
pid_t pid;
|
||||||
char pidString[20] = {0};
|
char pidString[20] = {0};
|
||||||
char lshmName[40] = {0};
|
char lshmName[40] = {0};
|
||||||
|
|
||||||
pid = getpid();
|
pid = getpid();
|
||||||
snprintf(pidString, sizeof(pidString), "%d", pid);
|
snprintf(pidString, sizeof(pidString), "%d", pid);
|
||||||
|
@ -104,7 +104,7 @@ static void childProcess(int id)
|
|||||||
std::vector<void *> ptrs;
|
std::vector<void *> ptrs;
|
||||||
pid_t pid;
|
pid_t pid;
|
||||||
char pidString[20] = {0};
|
char pidString[20] = {0};
|
||||||
char lshmName[40] = {0};
|
char lshmName[40] = {0};
|
||||||
|
|
||||||
std::vector<char> verification_buffer(DATA_SIZE);
|
std::vector<char> verification_buffer(DATA_SIZE);
|
||||||
|
|
||||||
@ -257,7 +257,7 @@ static void parentProcess(char *app)
|
|||||||
cudaMemAllocationHandleType handleType = cudaMemHandleTypeNone;
|
cudaMemAllocationHandleType handleType = cudaMemHandleTypeNone;
|
||||||
pid_t pid;
|
pid_t pid;
|
||||||
char pidString[20] = {0};
|
char pidString[20] = {0};
|
||||||
char lshmName[40] = {0};
|
char lshmName[40] = {0};
|
||||||
|
|
||||||
pid = getpid();
|
pid = getpid();
|
||||||
snprintf(pidString, sizeof(pidString), "%d", pid);
|
snprintf(pidString, sizeof(pidString), "%d", pid);
|
||||||
|
@ -311,8 +311,8 @@ static void childProcess(int devId, int id, char **argv)
|
|||||||
int blocks = 0;
|
int blocks = 0;
|
||||||
int threads = 128;
|
int threads = 128;
|
||||||
pid_t pid;
|
pid_t pid;
|
||||||
char pidString[20] = {0};
|
char pidString[20] = {0};
|
||||||
char lshmName[40] = {0};
|
char lshmName[40] = {0};
|
||||||
|
|
||||||
pid = getppid();
|
pid = getppid();
|
||||||
snprintf(pidString, sizeof(pidString), "%d", pid);
|
snprintf(pidString, sizeof(pidString), "%d", pid);
|
||||||
|
@ -25,8 +25,8 @@
|
|||||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <cuda_runtime.h>
|
|
||||||
#include <cuda.h>
|
#include <cuda.h>
|
||||||
|
#include <cuda_runtime.h>
|
||||||
#include <helper_cuda.h>
|
#include <helper_cuda.h>
|
||||||
#include <helper_image.h>
|
#include <helper_image.h>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
@ -45,8 +45,10 @@
|
|||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// includes
|
// includes for OpenGL
|
||||||
#include <helper_gl.h>
|
#include <helper_gl.h>
|
||||||
|
|
||||||
|
// includes
|
||||||
#include <cuda_gl_interop.h>
|
#include <cuda_gl_interop.h>
|
||||||
#include <cuda_runtime.h>
|
#include <cuda_runtime.h>
|
||||||
#include <cufft.h>
|
#include <cufft.h>
|
||||||
|
@ -86,8 +86,10 @@
|
|||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// includes
|
// includes for OpenGL
|
||||||
#include <helper_gl.h>
|
#include <helper_gl.h>
|
||||||
|
|
||||||
|
// includes
|
||||||
#include <cuda_gl_interop.h>
|
#include <cuda_gl_interop.h>
|
||||||
#include <cuda_runtime.h>
|
#include <cuda_runtime.h>
|
||||||
#include <helper_cuda.h> // includes cuda.h and cuda_runtime_api.h
|
#include <helper_cuda.h> // includes cuda.h and cuda_runtime_api.h
|
||||||
|
@ -27,9 +27,11 @@
|
|||||||
|
|
||||||
#include "render_particles.h"
|
#include "render_particles.h"
|
||||||
|
|
||||||
|
// includes for OpenGL
|
||||||
|
#include <helper_gl.h>
|
||||||
|
|
||||||
#define HELPERGL_EXTERN_GL_FUNC_IMPLEMENTATION
|
#define HELPERGL_EXTERN_GL_FUNC_IMPLEMENTATION
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <helper_gl.h>
|
|
||||||
#include <cuda_gl_interop.h>
|
#include <cuda_gl_interop.h>
|
||||||
#include <cuda_runtime.h>
|
#include <cuda_runtime.h>
|
||||||
#include <helper_cuda.h>
|
#include <helper_cuda.h>
|
||||||
|
@ -31,7 +31,10 @@
|
|||||||
|
|
||||||
#pragma warning(disable : 4312)
|
#pragma warning(disable : 4312)
|
||||||
|
|
||||||
|
// includes for Windows
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
|
// includes for multimedia
|
||||||
#include <mmsystem.h>
|
#include <mmsystem.h>
|
||||||
|
|
||||||
// This header inclues all the necessary D3D11 and CUDA includes
|
// This header inclues all the necessary D3D11 and CUDA includes
|
||||||
|
@ -31,7 +31,10 @@
|
|||||||
|
|
||||||
#pragma warning(disable : 4312)
|
#pragma warning(disable : 4312)
|
||||||
|
|
||||||
|
// includes for Windows
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
|
// includes for multimedia
|
||||||
#include <mmsystem.h>
|
#include <mmsystem.h>
|
||||||
|
|
||||||
// This header inclues all the necessary D3D11 and CUDA includes
|
// This header inclues all the necessary D3D11 and CUDA includes
|
||||||
|
@ -33,7 +33,11 @@
|
|||||||
#include <memory.h>
|
#include <memory.h>
|
||||||
|
|
||||||
#define HELPERGL_EXTERN_GL_FUNC_IMPLEMENTATION
|
#define HELPERGL_EXTERN_GL_FUNC_IMPLEMENTATION
|
||||||
|
|
||||||
|
// includes for OpenGL
|
||||||
#include <helper_gl.h>
|
#include <helper_gl.h>
|
||||||
|
|
||||||
|
// includes
|
||||||
#include <cuda_gl_interop.h>
|
#include <cuda_gl_interop.h>
|
||||||
#include <cuda_runtime.h>
|
#include <cuda_runtime.h>
|
||||||
#include <helper_cuda.h>
|
#include <helper_cuda.h>
|
||||||
|
@ -29,9 +29,13 @@
|
|||||||
This file contains simple wrapper functions that call the CUDA kernels
|
This file contains simple wrapper functions that call the CUDA kernels
|
||||||
*/
|
*/
|
||||||
#define HELPERGL_EXTERN_GL_FUNC_IMPLEMENTATION
|
#define HELPERGL_EXTERN_GL_FUNC_IMPLEMENTATION
|
||||||
|
|
||||||
|
// includes for OpenGL
|
||||||
|
#include <helper_gl.h>
|
||||||
|
|
||||||
|
// includes
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <helper_gl.h>
|
|
||||||
#include <cuda_gl_interop.h>
|
#include <cuda_gl_interop.h>
|
||||||
#include <helper_cuda.h>
|
#include <helper_cuda.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user