Home
last modified time | relevance | path

Searched refs:size_t (Results 1 – 25 of 301) sorted by relevance

12345678910>>...13

/petsc/src/sys/ftn-custom/
H A Dzutils.c46 size_t PetscIntAddressToFortran(const PetscInt *base, const PetscInt *addr) in PetscIntAddressToFortran()
48 size_t tmp1 = (size_t)base, tmp2 = 0; in PetscIntAddressToFortran()
49 size_t tmp3 = (size_t)addr; in PetscIntAddressToFortran()
50 size_t itmp2; in PetscIntAddressToFortran()
55 itmp2 = (size_t)tmp2; in PetscIntAddressToFortran()
58 itmp2 = -((size_t)tmp2); in PetscIntAddressToFortran()
63 itmp2 = (size_t)tmp2; in PetscIntAddressToFortran()
66 itmp2 = -((size_t)tmp2); in PetscIntAddressToFortran()
79 PetscInt *PetscIntAddressFromFortran(const PetscInt *base, size_t addr) in PetscIntAddressFromFortran()
94 …ran(PetscObject obj, PetscInt align, PetscScalar *base, PetscScalar *addr, PetscInt N, size_t *res) in PetscScalarAddressToFortran()
[all …]
/petsc/include/
H A Dpetscsys.h227 PETSC_EXTERN MPI_Datatype MPIU_SIZE_T PETSC_ATTRIBUTE_MPI_TYPE_TAG(size_t);
567 …result) PetscMallocA(1, PETSC_TRUE, __LINE__, PETSC_FUNCTION_NAME, __FILE__, ((size_t)m), (result))
622 …scMallocA(1, PETSC_FALSE, __LINE__, PETSC_FUNCTION_NAME, __FILE__, ((size_t)((size_t)m1) * sizeof(…
646 …tscMallocA(1, PETSC_TRUE, __LINE__, PETSC_FUNCTION_NAME, __FILE__, ((size_t)((size_t)m1) * sizeof(…
669 …, __LINE__, PETSC_FUNCTION_NAME, __FILE__, ((size_t)((size_t)m1) * sizeof(**(r1))), (r1), ((size_t
692 …, __LINE__, PETSC_FUNCTION_NAME, __FILE__, ((size_t)((size_t)m1) * sizeof(**(r1))), (r1), ((size_t
718 …ION_NAME, __FILE__, ((size_t)((size_t)m1) * sizeof(**(r1))), (r1), ((size_t)((size_t)m2) * sizeof(…
744 …ION_NAME, __FILE__, ((size_t)((size_t)m1) * sizeof(**(r1))), (r1), ((size_t)((size_t)m2) * sizeof(…
772size_t)((size_t)m1) * sizeof(**(r1))), (r1), ((size_t)((size_t)m2) * sizeof(**(r2))), (r2), ((size…
800size_t)((size_t)m1) * sizeof(**(r1))), (r1), ((size_t)((size_t)m2) * sizeof(**(r2))), (r2), ((size…
[all …]
H A Dpetscstring.h10 PETSC_EXTERN PetscErrorCode PetscMemcmp(const void *, const void *, size_t, PetscBool *);
19 PETSC_EXTERN PetscErrorCode PetscStrreplace(MPI_Comm, const char[], char[], size_t);
100 static inline PetscErrorCode PetscStrlen(const char s[], size_t *len) in PetscStrlen()
145 size_t len; in PetscStrallocpy()
244 static inline PetscErrorCode PetscStrncpy(char s[], const char t[], size_t n) PeNS in PetscStrncpy()
283 static inline PetscErrorCode PetscStrlcat(char s[], const char t[], size_t n) in PetscStrlcat()
285 size_t len; in PetscStrlcat()
325 static inline PetscErrorCode PetscStrncmp(const char a[], const char b[], size_t n, PetscBool *t) in PetscStrncmp()
536 size_t na = 0, nb = 0; in PetscStrendswith()
580 size_t len = 0; in PetscStrbeginswith()
[all …]
H A Dpetscdevice.h71 …cDeviceAllocate_Private(PetscDeviceContext, PetscBool, PetscMemType, size_t, size_t, void **PETSC_…
73 …de PetscDeviceMemcpy(PetscDeviceContext, void *PETSC_RESTRICT, const void *PETSC_RESTRICT, size_t);
74 …XTERN PetscErrorCode PetscDeviceMemset(PetscDeviceContext, void *PETSC_RESTRICT, PetscInt, size_t);
144 …type, n, ptr) PetscDeviceAllocate_Private((dctx), PETSC_FALSE, (mtype), (size_t)(n) * sizeof(**(pt…
178 …mtype, n, ptr) PetscDeviceAllocate_Private((dctx), PETSC_TRUE, (mtype), (size_t)(n) * sizeof(**(pt…
259 #define PetscDeviceArrayCopy(dctx, dest, src, n) PetscDeviceMemcpy((dctx), (dest), (src), (size_t)(…
300 #define PetscDeviceArrayZero(dctx, ptr, n) PetscDeviceMemset((dctx), (ptr), 0, (size_t)(n) * sizeof…
H A Dpetscbt.h11 static inline size_t PetscBTIndex_Internal(PetscCount index) in PetscBTIndex_Internal()
13 return (size_t)index / PETSC_BITS_PER_BYTE; in PetscBTIndex_Internal()
21 static inline size_t PetscBTLength(PetscCount m) in PetscBTLength()
23 return (size_t)m / PETSC_BITS_PER_BYTE + 1; in PetscBTLength()
89 for (size_t j = 0; j < PetscBTLength(m); j++) { in PetscBTCountSet()
/petsc/src/benchmarks/streams/
H A DCUDAVersion.cu42 __global__ void set_array(float *a, float value, size_t len) in set_array()
44 size_t idx = threadIdx.x + blockIdx.x * blockDim.x; in set_array()
51 __global__ void set_array_double(double *a, double value, size_t len) in set_array_double()
53 size_t idx = threadIdx.x + blockIdx.x * blockDim.x; in set_array_double()
60 __global__ void STREAM_Copy(float *a, float *b, size_t len) in STREAM_Copy()
62 size_t idx = threadIdx.x + blockIdx.x * blockDim.x; in STREAM_Copy()
69 __global__ void STREAM_Copy_double(double *a, double *b, size_t len) in STREAM_Copy_double()
71 size_t idx = threadIdx.x + blockIdx.x * blockDim.x; in STREAM_Copy_double()
78 __global__ void STREAM_Copy_Optimized(float *a, float *b, size_t len) in STREAM_Copy_Optimized()
85 size_t idx = threadIdx.x + blockIdx.x * blockDim.x; in STREAM_Copy_Optimized()
[all …]
/petsc/src/binding/petsc4py/src/petsc4py/PETSc/
H A Dpetscmem.pxi2 PetscErrorCode PetscMalloc(size_t, void*)
4 PetscErrorCode PetscMemcpy(void*, void*, size_t)
5 PetscErrorCode PetscMemmove(void*, void*, size_t)
6 PetscErrorCode PetscMemzero(void*, size_t)
7 PetscErrorCode PetscMemcmp(void*, void*, size_t, PetscBool*)
/petsc/src/sys/tests/
H A Dex65.c27 static const size_t num_names = PETSC_STATIC_ARRAY_LENGTH(all_names);
28 static const size_t num_funcs = PETSC_STATIC_ARRAY_LENGTH(all_funcs);
52 …scViewer viewer, PetscFunctionList fl, PetscFunctionList fl_dup, size_t *fl_size, size_t *fl_dup_s… in TestPetscFunctionListFind()
56 for (size_t i = 0; i < num_funcs; ++i) { in TestPetscFunctionListFind()
67 for (size_t i = 0; i < num_funcs; ++i) { in TestPetscFunctionListFind()
80 for (size_t i = 0; i < num_funcs; ++i) { in TestPetscFunctionListFind()
97 for (size_t i = 0; i < num_funcs; ++i) { in TestPetscFunctionListFind()
110 …ewer viewer, PetscFunctionList fl, PetscFunctionList fl_dup, size_t expected_fl_size, size_t expec… in TestPetscFunctionListGet()
119 …PetscCheck((size_t)n == expected_fl_size, PETSC_COMM_SELF, PETSC_ERR_PLIB, "PetscFunctionListGet()… in TestPetscFunctionListGet()
123 …PetscCheck((size_t)n == expected_fl_dup_size, PETSC_COMM_SELF, PETSC_ERR_PLIB, "PetscFunctionListG… in TestPetscFunctionListGet()
[all …]
H A Dex37.c6 PetscErrorCode TestPetscVSNPrintf(char *, size_t, size_t *, const char *, ...);
10 size_t sz, fullLength; in main()
71 PetscErrorCode TestPetscVSNPrintf(char *str, size_t l_str, size_t *fullLength, const char *format, … in TestPetscVSNPrintf()
/petsc/include/petsc/private/cpp/
H A Darray.hpp29 template <typename T, std::size_t NL, std::size_t... IL, std::size_t NR, std::size_t... IR>
43 template <typename T, std::size_t NL, std::size_t NR>
H A Dfunctional.hpp36 template <std::size_t ix>
47 template <std::size_t ix>
57 template <std::size_t ix>
76 template <std::size_t idx>
133 template <typename TupleT, std::size_t... idx> \
/petsc/src/sys/yaml/include/
H A Dyaml.h108 size_t index;
111 size_t line;
114 size_t column;
267 size_t length;
397 size_t length;
515 size_t length;
677 typedef int yaml_read_handler_t(void *data, unsigned char *buffer, size_t size,
678 size_t *size_read);
692 size_t token_number;
788 size_t problem_offset;
[all …]
/petsc/src/sys/memory/cuda/
H A Dmcudahost.cu4 static PetscErrorCode PetscCUDAHostMalloc(size_t a, PetscBool, int, const char[], const char[], voi… in PetscCUDAHostMalloc()
16 static PetscErrorCode PetscCUDAHostRealloc(size_t, int, const char[], const char[], void **) in PetscCUDAHostRealloc() argument
21 static PetscErrorCode (*PetscMallocOld)(size_t, PetscBool, int, const char[], const char[], void **…
22 static PetscErrorCode (*PetscReallocOld)(size_t, int, const char[], const char[], void **);
/petsc/src/mat/tests/
H A DcJSON.c90 size_t position;
141 void *(CJSON_CDECL *allocate)(size_t size);
143 void *(CJSON_CDECL *reallocate)(void *pointer, size_t size);
148 static void *CJSON_CDECL internal_malloc(size_t size) in internal_malloc()
156 static void *CJSON_CDECL internal_realloc(void *pointer, size_t size) in internal_realloc()
173 size_t length = 0; in cJSON_strdup()
243 size_t length;
244 size_t offset;
245size_t depth; /* How deeply nested (in arrays/objects) is the input at the current o…
264 size_t i = 0; in parse_number()
[all …]
/petsc/src/sys/webclient/
H A Dclient.c108size_t request_len, headlen, bodylen, contentlen, pathlen, hostlen, typelen, contenttypelen = 0; in PetscHTTPBuildRequest()
176 …const char header[], const char ctype[], const char body[], SSL *ssl, char buff[], size_t buffsize) in PetscHTTPSRequest()
180 size_t request_len, len; in PetscHTTPSRequest()
190 …PetscCheck(request_len == (size_t)r, PETSC_COMM_SELF, PETSC_ERR_LIB, "Incomplete write to SSL sock… in PetscHTTPSRequest()
203 size_t nlen; in PetscHTTPSRequest()
230 if (nlen - 4 == (size_t)cl) foundbody = PETSC_TRUE; in PetscHTTPSRequest()
264 …const char header[], const char ctype[], const char body[], int sock, char buff[], size_t buffsize) in PetscHTTPRequest()
267 size_t request_len; in PetscHTTPRequest()
329 PetscErrorCode PetscPullJSONValue(const char buff[], const char key[], char value[], size_t valuele… in PetscPullJSONValue()
333 size_t len; in PetscPullJSONValue()
[all …]
H A Dglobus.c10 static PetscErrorCode base64_encode(const unsigned char *data, unsigned char *encoded_data, size_t in base64_encode()
12 static size_t mod_table[] = {0, 2, 1}; in base64_encode()
13 size_t i, j; in base64_encode()
14 size_t input_length, output_length; in base64_encode()
37 …PetscErrorCode base64_decode(const unsigned char *data, unsigned char *decoded_data, size_t length) in base64_decode()
41 size_t i, j; in base64_decode()
42 size_t input_length, output_length; in base64_decode()
98 PetscErrorCode PetscGlobusAuthorize(MPI_Comm comm, char access_token[], size_t tokensize) in PetscGlobusAuthorize()
105 size_t len; in PetscGlobusAuthorize()
161 …ode PetscGlobusGetTransfers(MPI_Comm comm, const char access_token[], char buff[], size_t buffsize) in PetscGlobusGetTransfers()
/petsc/src/dm/impls/swarm/
H A Ddata_bucket.h22 size_t atomic_size;
43 PETSC_INTERN PetscErrorCode DMSwarmDataFieldCreate(const char[], const char[], const size_t, const …
48 …rmDataBucketRegisterField(DMSwarmDataBucket, const char[], const char[], size_t, DMSwarmDataField …
56 PETSC_INTERN PetscErrorCode DMSwarmDataFieldAccessPointOffset(const DMSwarmDataField, const size_t,…
58 PETSC_INTERN PetscErrorCode DMSwarmDataFieldVerifyAccess(const DMSwarmDataField, const size_t);
59 PETSC_INTERN PetscErrorCode DMSwarmDataFieldGetAtomicSize(const DMSwarmDataField, size_t *);
86 PETSC_INTERN PetscErrorCode DMSwarmDataBucketCreatePackedArray(DMSwarmDataBucket, size_t *, void **…
/petsc/src/sys/memory/hip/
H A Dmhiphost.hip.cxx4 PETSC_EXTERN PetscErrorCode PetscHIPHostMalloc(size_t a, PetscBool clear, int lineno, const char fu… in PetscHIPHostMalloc()
16 PETSC_EXTERN PetscErrorCode PetscHIPHostRealloc(size_t a, int lineno, const char function[], const … in PetscHIPHostRealloc()
21 static PetscErrorCode (*PetscMallocOld)(size_t, PetscBool, int, const char[], const char[], void **…
22 static PetscErrorCode (*PetscReallocOld)(size_t, int, const char[], const char[], void **);
/petsc/src/sys/utils/
H A Dsortso.c28 static inline void COPYSWAPPY(char *a, char *b, char *t, size_t size) in COPYSWAPPY()
36 static inline void COPYSWAPPY2(char *al, char *ar, size_t asize, char *bl, char *br, size_t bsize, … in COPYSWAPPY2()
47 static inline void Petsc_memcpy(char *dest, const char *src, size_t size) in Petsc_memcpy()
53 … void Petsc_memcpy2(char *adest, const char *asrc, size_t asize, char *bdest, const char *bsrc, si… in Petsc_memcpy2()
60 static inline void Petsc_memmove(char *dest, const char *src, size_t size) in Petsc_memmove()
66 …void Petsc_memmove2(char *adest, const char *asrc, size_t asize, char *bdest, const char *bsrc, si… in Petsc_memmove2()
73 static inline void COPYSWAPPY(char *a, char *b, char *t, size_t size) in COPYSWAPPY()
82 static inline void COPYSWAPPY2(char *al, char *ar, size_t asize, char *bl, char *br, size_t bsize, … in COPYSWAPPY2()
94 static inline void Petsc_memcpy(char *dest, const char *src, size_t size) in Petsc_memcpy()
101 … void Petsc_memcpy2(char *adest, const char *asrc, size_t asize, char *bdest, const char *bsrc, si… in Petsc_memcpy2()
[all …]
/petsc/src/sys/fileio/
H A Dmprint.c39 PetscErrorCode PetscFormatConvertGetSize(const char format[], size_t *size) in PetscFormatConvertGetSize()
41 size_t sz = 0; in PetscFormatConvertGetSize()
175 PetscErrorCode PetscVSNPrintf(char str[], size_t len, const char format[], size_t *fullLength, va_l… in PetscVSNPrintf()
179 size_t newLength; in PetscVSNPrintf()
199 size_t cnt = 0, ncnt = 0, leng; in PetscVSNPrintf()
232 if (fullLength) *fullLength = 1 + (size_t)flen; in PetscVSNPrintf()
322 size_t fullLength; in PetscVFPrintfDefault()
377 PetscErrorCode PetscSNPrintf(char str[], size_t len, const char format[], ...) in PetscSNPrintf()
379 size_t fullLength; in PetscSNPrintf()
408 PetscErrorCode PetscSNPrintfCount(char str[], size_t len, const char format[], size_t *countused, .… in PetscSNPrintfCount()
[all …]
/petsc/src/sys/memory/
H A Dmhbw.c10 PETSC_EXTERN PetscErrorCode PetscMallocAlign(size_t, PetscBool, int, const char[], const char[], vo…
12 PETSC_EXTERN PetscErrorCode PetscReallocAlign(size_t, int, const char[], const char[], void **);
27 static PetscErrorCode PetscHBWMalloc(size_t a, PetscBool clear, int lineno, const char function[], … in PetscHBWMalloc()
59 static PetscErrorCode PetscHBWRealloc(size_t a, int lineno, const char function[], const char filen… in PetscHBWRealloc()
H A Dmal.c30 PETSC_EXTERN PetscErrorCode PetscMallocAlign(size_t mem, PetscBool clear, int line, const char func… in PetscMallocAlign()
109 PETSC_EXTERN PetscErrorCode PetscReallocAlign(size_t mem, int line, const char func[], const char f… in PetscReallocAlign()
156 if (((size_t)*result) % PETSC_MEMALIGN) { in PetscReallocAlign()
188 PetscErrorCode (*PetscTrMalloc)(size_t, PetscBool, int, const char[], const char[], void **) = Pets…
190 PetscErrorCode (*PetscTrRealloc)(size_t, int, const char[], const char[], void **) = Pets…
213size_t, PetscBool, int, const char[], const char[], void **), PetscErrorCode (*ifree)(void *, int,… in PetscMallocSet() argument
265 static PetscErrorCode (*PetscTrMallocOld)(size_t, PetscBool, int, const char[], const char[], void …
266 static PetscErrorCode (*PetscTrReallocOld)(size_t, int, const char[], const char[], void **) …
385 …PetscBool clear, int lineno, const char *function, const char *filename, size_t bytes0, void *ptr0… in PetscMallocA()
388 size_t bytes[8], sumbytes; in PetscMallocA()
[all …]
H A Dmtr.c13 PETSC_EXTERN PetscErrorCode PetscMallocAlign(size_t, PetscBool, int, const char[], const char[], vo…
15 PETSC_EXTERN PetscErrorCode PetscReallocAlign(size_t, int, const char[], const char[], void **);
22 size_t size, rsize; /* Aligned size and requested size */
49 static size_t TRallocated = 0;
56 static size_t TRMaxMem = 0;
58 static size_t TRMaxMems[MAXTRMAXMEMS];
65 static size_t PetscLogMallocThreshold = 0;
66 static size_t *PetscLogMallocLength;
69 static size_t PetscLogMallocTraceThreshold = 0;
160 static PetscErrorCode PetscTrMallocDefault(size_t a, PetscBool clear, int lineno, const char functi… in PetscTrMallocDefault()
[all …]
/petsc/src/sys/objects/device/interface/
H A Dmemory.cxx35 PETSC_NODISCARD std::size_t operator()(const T *ptr) const noexcept in operator ()()
37 return reinterpret_cast<std::size_t>(ptr); in operator ()()
50 std::size_t size = 0; // size of allocation (bytes)
55 constexpr PointerAttributes(PetscMemType, PetscObjectId, std::size_t) noexcept;
66 …tributes::PointerAttributes(PetscMemType mtype_, PetscObjectId id_, std::size_t size_) noexcept : … in PointerAttributes()
190 …rMemory_Private(const void *PETSC_RESTRICT ptr, PetscMemType mtype, std::size_t size, PetscObjectI… in PetscDeviceRegisterMemory_Private()
255 …ode PetscDeviceRegisterMemory(const void *PETSC_RESTRICT ptr, PetscMemType mtype, std::size_t size) in PetscDeviceRegisterMemory()
325 …etscDeviceContext dctx, PetscBool clear, PetscMemType mtype, std::size_t n, std::size_t alignment,… in PetscDeviceAllocate_Private()
331 const auto is_power_of_2 = [](std::size_t num) { return (num & (num - 1)) == 0; }; in PetscDeviceAllocate_Private()
470 …(PetscDeviceContext dctx, void *PETSC_RESTRICT dest, const void *PETSC_RESTRICT src, std::size_t n) in PetscDeviceMemcpy()
[all …]
/petsc/src/sys/classes/random/impls/curand/
H A Dcurand2.cu10 public thrust::unary_function<thrust::tuple<PetscReal, size_t>, PetscReal>
24 …__host__ __device__ PetscReal operator()(thrust::tuple<PetscReal, size_t> x) { return thrust::get<… in operator ()()
41 PETSC_INTERN PetscErrorCode PetscRandomCurandScale_Private(PetscRandom r, size_t n, PetscReal *val,… in PetscRandomCurandScale_Private()
48 … zibit = thrust::make_zip_iterator(thrust::make_tuple(pval, thrust::counting_iterator<size_t>(0))); in PetscRandomCurandScale_Private()

12345678910>>...13