libgrape-lite
A C++ library for parallel graph processing
Loading...
Searching...
No Matches
Namespaces | Functions
atomic_ops.h File Reference
#include <stdint.h>

Namespaces

namespace  grape
 

Functions

template<typename T >
bool grape::atomic_compare_and_swap (T &val, T old_val, T new_val)
 Atomic compare and swap operation. Equavalent to:
 
template<>
bool grape::atomic_compare_and_swap (float &val, float old_val, float new_val)
 
template<>
bool grape::atomic_compare_and_swap (double &val, double old_val, double new_val)
 
template<typename T >
bool grape::atomic_min (T &a, T b)
 Atomic compare and store the minimum value. Equavalent to:
 
template<typename T >
void grape::atomic_add (T &a, T b)
 Atomic add a value. Equavalent to:
 
template<>
void grape::atomic_add (float &a, float b)
 
template<>
void grape::atomic_add (double &a, double b)
 
template<typename T >
void grape::atomic_sub (T &a, T b)
 Atomic sub a value. Equavalent to:
 
template<>
void grape::atomic_sub (float &a, float b)
 
template<>
void grape::atomic_sub (double &a, double b)
 

Detailed Description

Copyright 2020 Alibaba Group Holding Limited.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Some atomic instructions.