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-scatter
Commits
4d8ff02a
"examples/vscode:/vscode.git/clone" did not exist on "1d4ad34af04abc2fde96ed1e1ae7995173681bbc"
Commit
4d8ff02a
authored
Dec 28, 2017
by
rusty1s
Browse files
fixed non-symmetric ops
parent
8a3bfe4a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
torch_scatter/kernel/THCAtomics.cuh
torch_scatter/kernel/THCAtomics.cuh
+5
-5
No files found.
torch_scatter/kernel/THCAtomics.cuh
View file @
4d8ff02a
...
@@ -97,7 +97,7 @@ struct TH_CONCAT_3(Atomic, NAME, DecimalImpl)<T, 8> { \
...
@@ -97,7 +97,7 @@ struct TH_CONCAT_3(Atomic, NAME, DecimalImpl)<T, 8> { \
} \
} \
};
};
#define OP(X, Y)
X
+
Y
#define OP(X, Y)
Y
+
X
ATOMIC_
(
Add
)
ATOMIC_
(
Add
)
#undef OP
#undef OP
static
inline
__device__
void
atomicAdd
(
uint8_t
*
address
,
uint8_t
val
)
{
AtomicAddIntegerImpl
<
uint8_t
,
sizeof
(
uint8_t
)
>
()(
address
,
val
);
}
static
inline
__device__
void
atomicAdd
(
uint8_t
*
address
,
uint8_t
val
)
{
AtomicAddIntegerImpl
<
uint8_t
,
sizeof
(
uint8_t
)
>
()(
address
,
val
);
}
...
@@ -113,7 +113,7 @@ static inline __device__ void atomicAdd( double *address, double val) {}
...
@@ -113,7 +113,7 @@ static inline __device__ void atomicAdd( double *address, double val) {}
static
inline
__device__
void
atomicAdd
(
half
*
address
,
half
val
)
{}
static
inline
__device__
void
atomicAdd
(
half
*
address
,
half
val
)
{}
#endif
#endif
#define OP(X, Y)
X
*
Y
#define OP(X, Y)
Y
*
X
ATOMIC_
(
Mul
)
ATOMIC_
(
Mul
)
#undef OP
#undef OP
static
inline
__device__
void
atomicMul
(
uint8_t
*
address
,
uint8_t
val
)
{
AtomicMulIntegerImpl
<
uint8_t
,
sizeof
(
uint8_t
)
>
()(
address
,
val
);
}
static
inline
__device__
void
atomicMul
(
uint8_t
*
address
,
uint8_t
val
)
{
AtomicMulIntegerImpl
<
uint8_t
,
sizeof
(
uint8_t
)
>
()(
address
,
val
);
}
...
@@ -127,7 +127,7 @@ static inline __device__ void atomicMul( double *address, double val) { AtomicM
...
@@ -127,7 +127,7 @@ static inline __device__ void atomicMul( double *address, double val) { AtomicM
static
inline
__device__
void
atomicMul
(
half
*
address
,
half
val
)
{}
static
inline
__device__
void
atomicMul
(
half
*
address
,
half
val
)
{}
#endif
#endif
#define OP(X, Y)
X
/
Y
#define OP(X, Y)
Y
/
X
ATOMIC_
(
Div
)
ATOMIC_
(
Div
)
#undef OP
#undef OP
static
inline
__device__
void
atomicDiv
(
uint8_t
*
address
,
uint8_t
val
)
{
AtomicDivIntegerImpl
<
uint8_t
,
sizeof
(
uint8_t
)
>
()(
address
,
val
);
}
static
inline
__device__
void
atomicDiv
(
uint8_t
*
address
,
uint8_t
val
)
{
AtomicDivIntegerImpl
<
uint8_t
,
sizeof
(
uint8_t
)
>
()(
address
,
val
);
}
...
@@ -141,7 +141,7 @@ static inline __device__ void atomicDiv( double *address, double val) { AtomicD
...
@@ -141,7 +141,7 @@ static inline __device__ void atomicDiv( double *address, double val) { AtomicD
static
inline
__device__
void
atomicDiv
(
half
*
address
,
half
val
)
{}
static
inline
__device__
void
atomicDiv
(
half
*
address
,
half
val
)
{}
#endif
#endif
#define OP(X, Y) max(
X
,
Y
)
#define OP(X, Y) max(
Y
,
X
)
ATOMIC_
(
Max
)
ATOMIC_
(
Max
)
#undef OP
#undef OP
static
inline
__device__
void
atomicMax
(
uint8_t
*
address
,
uint8_t
val
)
{
AtomicMaxIntegerImpl
<
uint8_t
,
sizeof
(
uint8_t
)
>
()(
address
,
val
);
}
static
inline
__device__
void
atomicMax
(
uint8_t
*
address
,
uint8_t
val
)
{
AtomicMaxIntegerImpl
<
uint8_t
,
sizeof
(
uint8_t
)
>
()(
address
,
val
);
}
...
@@ -154,7 +154,7 @@ static inline __device__ void atomicMax( double *address, double val) { AtomicM
...
@@ -154,7 +154,7 @@ static inline __device__ void atomicMax( double *address, double val) { AtomicM
static
inline
__device__
void
atomicMax
(
half
*
address
,
half
val
)
{}
static
inline
__device__
void
atomicMax
(
half
*
address
,
half
val
)
{}
#endif
#endif
#define OP(X, Y) min(
X
,
Y
)
#define OP(X, Y) min(
Y
,
X
)
ATOMIC_
(
Min
)
ATOMIC_
(
Min
)
#undef OP
#undef OP
static
inline
__device__
void
atomicMin
(
uint8_t
*
address
,
uint8_t
val
)
{
AtomicMinIntegerImpl
<
uint8_t
,
sizeof
(
uint8_t
)
>
()(
address
,
val
);
}
static
inline
__device__
void
atomicMin
(
uint8_t
*
address
,
uint8_t
val
)
{
AtomicMinIntegerImpl
<
uint8_t
,
sizeof
(
uint8_t
)
>
()(
address
,
val
);
}
...
...
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