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
ad906e3a
Commit
ad906e3a
authored
Mar 28, 2018
by
rusty1s
Browse files
fixes
parent
55581cd6
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
31 additions
and
19 deletions
+31
-19
torch_cluster/src/generic/grid_cpu.c
torch_cluster/src/generic/grid_cpu.c
+1
-1
torch_cluster/src/generic/serial_cpu.c
torch_cluster/src/generic/serial_cpu.c
+9
-0
torch_cluster/src/grid_cpu.c
torch_cluster/src/grid_cpu.c
+1
-1
torch_cluster/src/grid_cpu.h
torch_cluster/src/grid_cpu.h
+7
-7
torch_cluster/src/serial_cpu.c
torch_cluster/src/serial_cpu.c
+5
-2
torch_cluster/src/serial_cpu.h
torch_cluster/src/serial_cpu.h
+8
-8
No files found.
torch_cluster/src/generic/grid_cpu.c
View file @
ad906e3a
...
...
@@ -2,7 +2,7 @@
#define TH_GENERIC_FILE "generic/grid_cpu.c"
#else
void
grid_
cluster
(
int
C
,
THLongTensor
*
output
,
THTensor
*
position
,
THTensor
*
size
,
THLongTensor
*
count
)
{
void
cluster
_
(
grid
)
(
int
C
,
THLongTensor
*
output
,
THTensor
*
position
,
THTensor
*
size
,
THLongTensor
*
count
)
{
real
*
size_data
=
size
->
storage
->
data
+
size
->
storageOffset
;
int64_t
*
count_data
=
count
->
storage
->
data
+
count
->
storageOffset
;
int64_t
D
,
d
,
i
,
c
,
tmp
;
...
...
torch_cluster/src/generic/serial_cpu.c
View file @
ad906e3a
#ifndef TH_GENERIC_FILE
#define TH_GENERIC_FILE "generic/serial_cpu.c"
#else
void
cluster_
(
serial
)(
THLongTensor
*
output
,
THLongTensor
*
row
,
THLongTensor
*
col
,
THTensor
*
weight
,
THLongTensor
*
degree
)
{
}
#endif
torch_cluster/src/grid_cpu.c
View file @
ad906e3a
#include <TH/TH.h>
#define
grid_
cluster TH_CONCAT_
2(grid_cluster
_, Real)
#define cluster
_(NAME)
TH_CONCAT_
4(cluster_, NAME,
_, Real)
#include "generic/grid_cpu.c"
#include "THGenerateAllTypes.h"
torch_cluster/src/grid_cpu.h
View file @
ad906e3a
void
grid_
cluster_Float
(
int
C
,
THLongTensor
*
output
,
THFloatTensor
*
position
,
THFloatTensor
*
size
,
THLongTensor
*
count
);
void
grid_
cluster_Double
(
int
C
,
THLongTensor
*
output
,
THDoubleTensor
*
position
,
THDoubleTensor
*
size
,
THLongTensor
*
count
);
void
grid_
cluster_Byte
(
int
C
,
THLongTensor
*
output
,
THByteTensor
*
position
,
THByteTensor
*
size
,
THLongTensor
*
count
);
void
grid_
cluster_Char
(
int
C
,
THLongTensor
*
output
,
THCharTensor
*
position
,
THCharTensor
*
size
,
THLongTensor
*
count
);
void
grid_
cluster_Short
(
int
C
,
THLongTensor
*
output
,
THShortTensor
*
position
,
THShortTensor
*
size
,
THLongTensor
*
count
);
void
grid_
cluster_Int
(
int
C
,
THLongTensor
*
output
,
THIntTensor
*
position
,
THIntTensor
*
size
,
THLongTensor
*
count
);
void
grid_
cluster_Long
(
int
C
,
THLongTensor
*
output
,
THLongTensor
*
position
,
THLongTensor
*
size
,
THLongTensor
*
count
);
void
cluster_
grid_
Float
(
int
C
,
THLongTensor
*
output
,
THFloatTensor
*
position
,
THFloatTensor
*
size
,
THLongTensor
*
count
);
void
cluster_
grid_
Double
(
int
C
,
THLongTensor
*
output
,
THDoubleTensor
*
position
,
THDoubleTensor
*
size
,
THLongTensor
*
count
);
void
cluster_
grid_
Byte
(
int
C
,
THLongTensor
*
output
,
THByteTensor
*
position
,
THByteTensor
*
size
,
THLongTensor
*
count
);
void
cluster_
grid_
Char
(
int
C
,
THLongTensor
*
output
,
THCharTensor
*
position
,
THCharTensor
*
size
,
THLongTensor
*
count
);
void
cluster_
grid_
Short
(
int
C
,
THLongTensor
*
output
,
THShortTensor
*
position
,
THShortTensor
*
size
,
THLongTensor
*
count
);
void
cluster_
grid_
Int
(
int
C
,
THLongTensor
*
output
,
THIntTensor
*
position
,
THIntTensor
*
size
,
THLongTensor
*
count
);
void
cluster_
grid_
Long
(
int
C
,
THLongTensor
*
output
,
THLongTensor
*
position
,
THLongTensor
*
size
,
THLongTensor
*
count
);
torch_cluster/src/serial_cpu.c
View file @
ad906e3a
#include <TH/TH.h>
void
serial_cluster
(
THLongTensor
*
output
,
THLongTensor
*
row
,
THLongTensor
*
col
,
THLongTensor
*
degree
)
{
#define cluster_(NAME) TH_CONCAT_4(cluster_, NAME, _, Real)
void
cluster_serial
(
THLongTensor
*
output
,
THLongTensor
*
row
,
THLongTensor
*
col
,
THLongTensor
*
degree
)
{
int64_t
*
output_data
=
output
->
storage
->
data
+
output
->
storageOffset
;
int64_t
*
row_data
=
row
->
storage
->
data
+
row
->
storageOffset
;
int64_t
*
col_data
=
col
->
storage
->
data
+
col
->
storageOffset
;
...
...
@@ -38,4 +40,5 @@ void serial_cluster(THLongTensor *output, THLongTensor *row, THLongTensor *col,
}
}
#include "generic/serial_cpu.c"
#include "THGenerateAllTypes.h"
torch_cluster/src/serial_cpu.h
View file @
ad906e3a
void
serial_
cluster
(
THLongTensor
*
output
,
THLongTensor
*
row
,
THLongTensor
*
col
,
THLongTensor
*
degree
);
void
cluster
_serial
(
THLongTensor
*
output
,
THLongTensor
*
row
,
THLongTensor
*
col
,
THLongTensor
*
degree
);
void
serial_
cluster_Float
(
THLongTensor
*
output
,
THLongTensor
*
row
,
THLongTensor
*
col
,
THFloatTensor
*
weight
,
THLongTensor
*
degree
);
void
serial_
cluster_Double
(
THLongTensor
*
output
,
THLongTensor
*
row
,
THLongTensor
*
col
,
THDoubleTensor
*
weight
,
THLongTensor
*
degree
);
void
serial_
cluster_Byte
(
THLongTensor
*
output
,
THLongTensor
*
row
,
THLongTensor
*
col
,
THByteTensor
*
weight
,
THLongTensor
*
degree
);
void
serial_
cluster_Char
(
THLongTensor
*
output
,
THLongTensor
*
row
,
THLongTensor
*
col
,
THCharTensor
*
weight
,
THLongTensor
*
degree
);
void
serial_
cluster_Short
(
THLongTensor
*
output
,
THLongTensor
*
row
,
THLongTensor
*
col
,
THShortTensor
*
weight
,
THLongTensor
*
degree
);
void
serial_
cluster_Int
(
THLongTensor
*
output
,
THLongTensor
*
row
,
THLongTensor
*
col
,
THIntTensor
*
weight
,
THLongTensor
*
degree
);
void
serial_
cluster_Long
(
THLongTensor
*
output
,
THLongTensor
*
row
,
THLongTensor
*
col
,
THLongTensor
*
weight
,
THLongTensor
*
degree
);
void
cluster
_serial
_Float
(
THLongTensor
*
output
,
THLongTensor
*
row
,
THLongTensor
*
col
,
THFloatTensor
*
weight
,
THLongTensor
*
degree
);
void
cluster
_serial
_Double
(
THLongTensor
*
output
,
THLongTensor
*
row
,
THLongTensor
*
col
,
THDoubleTensor
*
weight
,
THLongTensor
*
degree
);
void
cluster
_serial
_Byte
(
THLongTensor
*
output
,
THLongTensor
*
row
,
THLongTensor
*
col
,
THByteTensor
*
weight
,
THLongTensor
*
degree
);
void
cluster
_serial
_Char
(
THLongTensor
*
output
,
THLongTensor
*
row
,
THLongTensor
*
col
,
THCharTensor
*
weight
,
THLongTensor
*
degree
);
void
cluster
_serial
_Short
(
THLongTensor
*
output
,
THLongTensor
*
row
,
THLongTensor
*
col
,
THShortTensor
*
weight
,
THLongTensor
*
degree
);
void
cluster
_serial
_Int
(
THLongTensor
*
output
,
THLongTensor
*
row
,
THLongTensor
*
col
,
THIntTensor
*
weight
,
THLongTensor
*
degree
);
void
cluster
_serial
_Long
(
THLongTensor
*
output
,
THLongTensor
*
row
,
THLongTensor
*
col
,
THLongTensor
*
weight
,
THLongTensor
*
degree
);
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