Update code format

This commit is contained in:
shawnz 2025-04-03 11:23:26 +08:00
parent 718fe6486d
commit b013387a39
11 changed files with 31 additions and 11 deletions

View File

@ -101,7 +101,7 @@ static void childProcess(int id)
std::vector<char> verification_buffer(DATA_SIZE);
pid_t pid;
char pidString[20] = {0};
char lshmName[40] = {0};
char lshmName[40] = {0};
pid = getppid();
snprintf(pidString, sizeof(pidString), "%d", pid);
@ -207,7 +207,7 @@ static void parentProcess(char *app)
std::vector<Process> processes;
pid_t pid;
char pidString[20] = {0};
char lshmName[40] = {0};
char lshmName[40] = {0};
pid = getpid();
snprintf(pidString, sizeof(pidString), "%d", pid);

View File

@ -104,7 +104,7 @@ static void childProcess(int id)
std::vector<void *> ptrs;
pid_t pid;
char pidString[20] = {0};
char lshmName[40] = {0};
char lshmName[40] = {0};
std::vector<char> verification_buffer(DATA_SIZE);
@ -257,7 +257,7 @@ static void parentProcess(char *app)
cudaMemAllocationHandleType handleType = cudaMemHandleTypeNone;
pid_t pid;
char pidString[20] = {0};
char lshmName[40] = {0};
char lshmName[40] = {0};
pid = getpid();
snprintf(pidString, sizeof(pidString), "%d", pid);

View File

@ -311,8 +311,8 @@ static void childProcess(int devId, int id, char **argv)
int blocks = 0;
int threads = 128;
pid_t pid;
char pidString[20] = {0};
char lshmName[40] = {0};
char pidString[20] = {0};
char lshmName[40] = {0};
pid = getppid();
snprintf(pidString, sizeof(pidString), "%d", pid);

View File

@ -25,8 +25,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <cuda_runtime.h>
#include <cuda.h>
#include <cuda_runtime.h>
#include <helper_cuda.h>
#include <helper_image.h>
#include <vector>

View File

@ -45,8 +45,10 @@
#include <windows.h>
#endif
// includes
// includes for OpenGL
#include <helper_gl.h>
// includes
#include <cuda_gl_interop.h>
#include <cuda_runtime.h>
#include <cufft.h>

View File

@ -86,8 +86,10 @@
#include <windows.h>
#endif
// includes
// includes for OpenGL
#include <helper_gl.h>
// includes
#include <cuda_gl_interop.h>
#include <cuda_runtime.h>
#include <helper_cuda.h> // includes cuda.h and cuda_runtime_api.h

View File

@ -27,9 +27,11 @@
#include "render_particles.h"
// includes for OpenGL
#include <helper_gl.h>
#define HELPERGL_EXTERN_GL_FUNC_IMPLEMENTATION
#include <assert.h>
#include <helper_gl.h>
#include <cuda_gl_interop.h>
#include <cuda_runtime.h>
#include <helper_cuda.h>

View File

@ -31,7 +31,10 @@
#pragma warning(disable : 4312)
// includes for Windows
#include <windows.h>
// includes for multimedia
#include <mmsystem.h>
// This header inclues all the necessary D3D11 and CUDA includes

View File

@ -31,7 +31,10 @@
#pragma warning(disable : 4312)
// includes for Windows
#include <windows.h>
// includes for multimedia
#include <mmsystem.h>
// This header inclues all the necessary D3D11 and CUDA includes

View File

@ -33,7 +33,11 @@
#include <memory.h>
#define HELPERGL_EXTERN_GL_FUNC_IMPLEMENTATION
// includes for OpenGL
#include <helper_gl.h>
// includes
#include <cuda_gl_interop.h>
#include <cuda_runtime.h>
#include <helper_cuda.h>

View File

@ -29,9 +29,13 @@
This file contains simple wrapper functions that call the CUDA kernels
*/
#define HELPERGL_EXTERN_GL_FUNC_IMPLEMENTATION
// includes for OpenGL
#include <helper_gl.h>
// includes
#include <cstdio>
#include <cstdlib>
#include <helper_gl.h>
#include <cuda_gl_interop.h>
#include <helper_cuda.h>
#include <string.h>