44# define dftfeDeviceAPICalls_H
55
66# include < TypeConfig.h>
7- # include < DeviceTypeConfig.h>
7+ # include < DeviceTypeConfig.h>
88namespace dftfe
99{
1010 namespace utils
@@ -13,7 +13,7 @@ namespace dftfe
1313 deviceReset ();
1414
1515 deviceError_t
16- deviceMemGetInfo (size_t * free, size_t * total);
16+ deviceMemGetInfo (size_t * free, size_t * total);
1717
1818 deviceError_t
1919 getDeviceCount (int *count);
@@ -28,7 +28,7 @@ namespace dftfe
2828 deviceMalloc (void **devPtr, size_type size);
2929
3030 deviceError_t
31- deviceMemset (void *devPtr,int value, size_type count);
31+ deviceMemset (void *devPtr, int value, size_type count);
3232
3333 /* *
3434 * @brief
@@ -75,21 +75,36 @@ namespace dftfe
7575 * @param count The memory size in bytes of the array
7676 */
7777 deviceError_t
78- deviceMemcpyD2H_2D (void * dst, size_type dpitch, const void * src, size_type spitch, size_type width, size_type height);
78+ deviceMemcpyD2H_2D (void * dst,
79+ size_type dpitch,
80+ const void *src,
81+ size_type spitch,
82+ size_type width,
83+ size_type height);
7984
8085 /* *
8186 * @brief Copy 2D array from device to device
8287 * @param count The memory size in bytes of the array
8388 */
8489 deviceError_t
85- deviceMemcpyD2D_2D (void * dst, size_type dpitch, const void * src, size_type spitch, size_type width, size_type height);
90+ deviceMemcpyD2D_2D (void * dst,
91+ size_type dpitch,
92+ const void *src,
93+ size_type spitch,
94+ size_type width,
95+ size_type height);
8696
8797 /* *
8898 * @brief Copy 2D array from host to device
8999 * @param count The memory size in bytes of the array
90100 */
91101 deviceError_t
92- deviceMemcpyH2D_2D (void * dst, size_type dpitch, const void * src, size_type spitch, size_type width, size_type height);
102+ deviceMemcpyH2D_2D (void * dst,
103+ size_type dpitch,
104+ const void *src,
105+ size_type spitch,
106+ size_type width,
107+ size_type height);
93108
94109 /* *
95110 * @brief HOST-DEVICE synchronization
@@ -102,43 +117,54 @@ namespace dftfe
102117 * @param count The memory size in bytes of the array
103118 */
104119 deviceError_t
105- deviceMemcpyAsyncD2H (void *dst, const void *src, size_type count,deviceStream_t stream = 0 );
120+ deviceMemcpyAsyncD2H (void * dst,
121+ const void * src,
122+ size_type count,
123+ deviceStream_t stream = 0 );
106124
107125 /* *
108126 * @brief Copy array from device to device
109127 * @param count The memory size in bytes of the array
110128 */
111129 deviceError_t
112- deviceMemcpyAsyncD2D (void *dst, const void *src, size_type count,deviceStream_t stream = 0 );
130+ deviceMemcpyAsyncD2D (void * dst,
131+ const void * src,
132+ size_type count,
133+ deviceStream_t stream = 0 );
113134
114135 /* *
115136 * @brief Copy array from host to device
116137 * @param count The memory size in bytes of the array
117138 */
118139 deviceError_t
119- deviceMemcpyAsyncH2D (void *dst, const void *src, size_type count,deviceStream_t stream = 0 );
140+ deviceMemcpyAsyncH2D (void * dst,
141+ const void * src,
142+ size_type count,
143+ deviceStream_t stream = 0 );
120144
121145
122146 deviceError_t
123- deviceStreamCreate (deviceStream_t* pStream);
147+ deviceStreamCreate (deviceStream_t * pStream);
124148
125149 deviceError_t
126150 deviceStreamDestroy (deviceStream_t stream);
127151
128152 deviceError_t
129- deviceEventCreate (deviceEvent_t* pEvent);
153+ deviceEventCreate (deviceEvent_t * pEvent);
130154
131155 deviceError_t
132- deviceEventDestroy (deviceEvent_t event);
156+ deviceEventDestroy (deviceEvent_t event);
133157
134158 deviceError_t
135- deviceEventRecord (deviceEvent_t event,deviceStream_t stream= 0 );
159+ deviceEventRecord (deviceEvent_t event, deviceStream_t stream = 0 );
136160
137161 deviceError_t
138- deviceEventSynchronize (deviceEvent_t event);
162+ deviceEventSynchronize (deviceEvent_t event);
139163
140164 deviceError_t
141- deviceStreamWaitEvent (deviceStream_t stream,deviceEvent_t event,unsigned int flags=0 );
165+ deviceStreamWaitEvent (deviceStream_t stream,
166+ deviceEvent_t event,
167+ unsigned int flags = 0 );
142168
143169 } // namespace utils
144170} // namespace dftfe
0 commit comments