fatomic

package
v0.1.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 8, 2024 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Overview

Package fatomic provides floating-point atomic operations

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddFloat32

func AddFloat32(addr *float32, inc float32) (nval float32)

AddFloat32 adds given increment to a float32 value atomically

func AddFloat64

func AddFloat64(addr *float64, inc float64) (nval float64)

AddFloat64 adds given increment to a float64 value atomically

func CompareAndSwapFloat32

func CompareAndSwapFloat32(addr *float32, old, nw float32) (swapped bool)

CompareAndSwapFloat32 executes the atomic compare-and-swap operation returning true on success, using Uint32 and bit conversions.

func CompareAndSwapFloat64

func CompareAndSwapFloat64(addr *float64, old, nw float64) (swapped bool)

CompareAndSwapFloat64 executes the compare-and-swap operation returning true on success, using Uint64 and bit conversions.

func LoadFloat32

func LoadFloat32(addr *float32) float32

LoadFloat32 executes the atomic Load operation, using Uint32 and bit conversions.

func LoadFloat64

func LoadFloat64(addr *float64) float64

LoadFloat64 executes the atomic Load operation, using Uint64 and bit conversions.

func StoreFloat32

func StoreFloat32(addr *float32, val float32)

StoreFloat32 executes the atomic Store operation, using Uint32 and bit conversions.

func StoreFloat64

func StoreFloat64(addr *float64, val float64)

StoreFloat64 executes the atomic Store operation, using Uint64 and bit conversions.

func SwapFloat32

func SwapFloat32(addr *float32, nw float32) float32

SwapFloat32 executes the atomic Swap operation, using Uint32 and bit conversions.

func SwapFloat64

func SwapFloat64(addr *float64, nw float64) float64

SwapFloat64 executes the atomic Swap operation, using Uint64 and bit conversions.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL