Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
torch-cluster
Commits
e0a293c3
Commit
e0a293c3
authored
Mar 28, 2018
by
rusty1s
Browse files
kernel calls
parent
12346b1b
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
53 additions
and
0 deletions
+53
-0
torch_cluster/kernel/generic/serial.cu
torch_cluster/kernel/generic/serial.cu
+10
-0
torch_cluster/kernel/serial.cu
torch_cluster/kernel/serial.cu
+24
-0
torch_cluster/kernel/serial.h
torch_cluster/kernel/serial.h
+17
-0
torch_cluster/src/generic/serial_cuda.c
torch_cluster/src/generic/serial_cuda.c
+1
-0
torch_cluster/src/serial_cuda.c
torch_cluster/src/serial_cuda.c
+1
-0
No files found.
torch_cluster/kernel/generic/serial.cu
View file @
e0a293c3
#ifndef THC_GENERIC_FILE
#define THC_GENERIC_FILE "generic/serial.cu"
#else
void
cluster_
(
serial
)(
THCState
*
state
,
THCudaLongTensor
*
output
,
THCudaLongTensor
*
row
,
THCudaLongTensor
*
col
,
THCTensor
*
weight
,
THCudaLongTensor
*
degree
)
{
}
#endif
torch_cluster/kernel/serial.cu
View file @
e0a293c3
#include <THC.h>
#include "serial.h"
#define cluster_(NAME) TH_CONCAT_4(cluster_, NAME, _kernel_, Real)
#define thc_(NAME) TH_CONCAT_4(thc_, NAME, _, Real)
void
cluster_serial_kernel
(
THCState
*
state
,
THCudaLongTensor
*
output
,
THCudaLongTensor
*
row
,
THCudaLongTensor
*
col
,
THCudaLongTensor
*
degree
)
{
}
#include "generic/serial.cu"
#include "THCGenerateFloatType.h"
#include "generic/serial.cu"
#include "THCGenerateDoubleType.h"
#include "generic/serial.cu"
#include "THCGenerateByteType.h"
#include "generic/serial.cu"
#include "THCGenerateCharType.h"
#include "generic/serial.cu"
#include "THCGenerateShortType.h"
#include "generic/serial.cu"
#include "THCGenerateIntType.h"
#include "generic/serial.cu"
#include "THCGenerateLongType.h"
torch_cluster/kernel/serial.h
View file @
e0a293c3
#ifdef __cplusplus
extern
"C"
{
#endif
void
cluster_serial_kernel
(
THCState
*
state
,
THCudaLongTensor
*
output
,
THCudaLongTensor
*
row
,
THCudaLongTensor
*
col
,
THCudaLongTensor
*
degree
);
void
cluster_serial_kernel_Float
(
THCState
*
state
,
THCudaLongTensor
*
output
,
THCudaLongTensor
*
row
,
THCudaLongTensor
*
col
,
THCudaTensor
*
weight
,
THCudaLongTensor
*
degree
);
void
cluster_serial_kernel_Double
(
THCState
*
state
,
THCudaLongTensor
*
output
,
THCudaLongTensor
*
row
,
THCudaLongTensor
*
col
,
THCudaDoubleTensor
*
weight
,
THCudaLongTensor
*
degree
);
void
cluster_serial_kernel_Byte
(
THCState
*
state
,
THCudaLongTensor
*
output
,
THCudaLongTensor
*
row
,
THCudaLongTensor
*
col
,
THCudaByteTensor
*
weight
,
THCudaLongTensor
*
degree
);
void
cluster_serial_kernel_Char
(
THCState
*
state
,
THCudaLongTensor
*
output
,
THCudaLongTensor
*
row
,
THCudaLongTensor
*
col
,
THCudaCharTensor
*
weight
,
THCudaLongTensor
*
degree
);
void
cluster_serial_kernel_Short
(
THCState
*
state
,
THCudaLongTensor
*
output
,
THCudaLongTensor
*
row
,
THCudaLongTensor
*
col
,
THCudaShortTensor
*
weight
,
THCudaLongTensor
*
degree
);
void
cluster_serial_kernel_Int
(
THCState
*
state
,
THCudaLongTensor
*
output
,
THCudaLongTensor
*
row
,
THCudaLongTensor
*
col
,
THCudaIntTensor
*
weight
,
THCudaLongTensor
*
degree
);
void
cluster_serial_kernel_Long
(
THCState
*
state
,
THCudaLongTensor
*
output
,
THCudaLongTensor
*
row
,
THCudaLongTensor
*
col
,
THCudaLongTensor
*
weight
,
THCudaLongTensor
*
degree
);
#ifdef __cplusplus
}
#endif
torch_cluster/src/generic/serial_cuda.c
View file @
e0a293c3
...
...
@@ -3,6 +3,7 @@
#else
void
cluster_
(
serial
)(
THCudaLongTensor
*
output
,
THCudaLongTensor
*
row
,
THCudaLongTensor
*
col
,
THCTensor
*
weight
,
THCudaLongTensor
*
degree
)
{
cluster_kernel_
(
serial
)(
state
,
output
,
row
,
col
,
weight
,
degree
);
}
#endif
...
...
torch_cluster/src/serial_cuda.c
View file @
e0a293c3
...
...
@@ -8,6 +8,7 @@
extern
THCState
*
state
;
void
cluster_serial_cuda
(
THCudaLongTensor
*
output
,
THCudaLongTensor
*
row
,
THCudaLongTensor
*
col
,
THCudaLongTensor
*
degree
)
{
cluster_serial_kernel
(
state
,
output
,
row
,
col
,
degree
);
}
#include "generic/serial_cuda.c"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment