Macaulay2 Engine
Loading...
Searching...
No Matches

◆ to_ring_elem()

void M2::ARingGFFlintBig::to_ring_elem ( ring_elem & result,
const ElementType & a ) const
inline

Definition at line 210 of file aring-gf-flint-big.hpp.

211 {
213 init(*b);
214 copy(*b, a);
215 size_t coeffs_size = sizeof(mp_limb_t)*b->alloc;
216 mp_ptr coeffs = reinterpret_cast<mp_ptr>(getmem_atomic(coeffs_size));
217 memcpy(coeffs,b->coeffs,coeffs_size);
218 flint_free(b->coeffs);
219 b->coeffs = coeffs;
220 result.poly_val = reinterpret_cast<Nterm*>(b);
221 }
void init(ElementType &result) const
void copy(ElementType &result, const ElementType &a) const
char * getmem_atomic(size_t n)
Definition m2-mem.cpp:135
VALGRIND_MAKE_MEM_DEFINED & result(result)
#define getmemstructtype(S)
Definition m2-mem.h:143

References copy(), getmem_atomic(), getmemstructtype, init(), and result().