SWDEV-470698 - fix formatting, add format check workflow (#657)
This commit is contained in:
1 parent
5840940caa
commit
f7338717ae
1574 files changed
+162903
-199277
No files matched your search
@@ -18,45 +18,26 @@
|
||||
* */
|
||||
|
||||
#include <iostream>
|
||||
#include<hip/hip_runtime.h>
|
||||
#include <hip/hip_runtime.h>
|
||||
#include "LaunchKernel.h"
|
||||
|
||||
extern "C"
|
||||
{
|
||||
extern "C" {
|
||||
|
||||
__global__ void kernel()
|
||||
{
|
||||
__global__ void kernel() {}
|
||||
|
||||
__global__ void kernel1(int* a) { *a = 333; }
|
||||
|
||||
__global__ void kernel2(int* a, int* b) { *a = *b; }
|
||||
|
||||
__global__ void kernel3(int* a, int* b, int* c) { *c = *a + *b; }
|
||||
|
||||
__global__ void kernel4(int* a, char c, short s, int i, struct things t) {
|
||||
*a = c + s + i + t.c + t.s + t.i;
|
||||
}
|
||||
|
||||
__global__ void kernel1(int *a)
|
||||
{
|
||||
*a = 333;
|
||||
}
|
||||
const void* funcTable[] = {(const void*)kernel, (const void*)kernel1, (const void*)kernel2,
|
||||
(const void*)kernel3, (const void*)kernel4};
|
||||
|
||||
__global__ void kernel2(int *a, int*b)
|
||||
{
|
||||
*a = *b;
|
||||
}
|
||||
const void* getKernelFunc(enum func f) { return funcTable[f]; }
|
||||
|
||||
__global__ void kernel3(int *a, int*b, int* c)
|
||||
{
|
||||
*c = *a+*b;
|
||||
}
|
||||
|
||||
__global__ void kernel4(int *a, char c, short s, int i, struct things t)
|
||||
{
|
||||
*a = c + s + i + t.c + t.s + t.i;
|
||||
}
|
||||
|
||||
const void* funcTable[] = {
|
||||
(const void*)kernel,
|
||||
(const void*)kernel1,
|
||||
(const void*)kernel2,
|
||||
(const void*)kernel3,
|
||||
(const void*)kernel4 };
|
||||
|
||||
const void* getKernelFunc(enum func f){
|
||||
return funcTable[f];
|
||||
}
|
||||
|
||||
}//extern "C"
|
||||
} // extern "C"
|
||||
Reference in new issue
Block a user