math_v2.hpp Source File

math_v2.hpp Source File#

Composable Kernel: math_v2.hpp Source File
math_v2.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: MIT
2// Copyright (c) 2018-2025, Advanced Micro Devices, Inc. All rights reserved.
3
4#pragma once
5
6#ifndef __HIP_DEVICE_COMPILE__
7#include <cmath>
8#endif
9
11#include "ck/utility/type.hpp"
13
14namespace ck {
15namespace math {
16
17#if CK_WORKAROUND_SWDEV_383542
18extern "C" __device__ float __ocml_native_recip_f32(float);
19#endif
20
21// math functions for the host, some are implemented by calling C++ std functions
22#if !defined(__HIPCC_RTC__) || !defined(CK_CODE_GEN_RTC)
23static inline __host__ float abs(float x) { return std::abs(x); };
24
25static inline __host__ double abs(double x) { return std::abs(x); };
26
27static inline __host__ int8_t abs(int8_t x)
28{
29 int8_t sgn = x >> (8 - 1);
30
31 return (x ^ sgn) - sgn;
32};
33
34static inline __host__ int32_t abs(int32_t x)
35{
36 int32_t sgn = x >> (32 - 1);
37
38 return (x ^ sgn) - sgn;
39};
40
41static inline __host__ half_t abs(half_t x)
42{
44
45 uint16_t abs_xx = xx & 0x7fff;
46
47 half_t abs_x = ck::bit_cast<half_t>(abs_xx);
48
49 return abs_x;
50};
51
52#ifdef CK_EXPERIMENTAL_BIT_INT_EXTENSION_INT4
53static inline __host__ int4_t abs(int4_t x)
54{
55 int4_t sgn = x >> (4 - 1);
56 return (x ^ sgn) - sgn;
57}
58#endif
59
60static inline __host__ bool isnan(float x) { return std::isnan(x); };
61
62static inline __host__ bool isnan(double x) { return std::isnan(x); };
63
64static inline __host__ bool isnan(int8_t x)
65{
66 (void)x;
67 return false;
68};
69
70static inline __host__ bool isnan(int32_t x)
71{
72 (void)x;
73 return false;
74};
75
76static inline __host__ bool isnan(half_t x)
77{
79
80 return (xx & 0x7FFF) > 0x7C00;
81};
82
83static inline __host__ bool isnan(f8_t x) { return ck::fp8_is_nan(x); };
84
85#ifdef CK_EXPERIMENTAL_BIT_INT_EXTENSION_INT4
86static inline __host__ bool isnan(int4_t x)
87{
88 (void)x;
89 return false;
90};
91#endif
92
93static inline __host__ half_t sqrt(half_t x)
94{
95 return static_cast<half_t>(std::sqrt(static_cast<float>(x)));
96};
97
98static inline __host__ float sqrt(float x) { return std::sqrt(x); };
99
100static inline __host__ double sqrt(double x) { return std::sqrt(x); };
101
102template <typename T>
103inline __host__ T tanh(T x)
104{
105 return ck::type_convert<T>(std::tanhf(ck::type_convert<float>(x)));
106};
107
108template <>
109inline __host__ float tanh<float>(float x)
110{
111 return std::tanhf(x);
112};
113
114template <>
115inline __host__ double tanh<double>(double x)
116{
117 return std::tanh(x);
118};
119
120template <typename T>
121inline __host__ T acos(T x)
122{
123 return ck::type_convert<T>(std::acosf(ck::type_convert<float>(x)));
124};
125
126template <>
127inline __host__ float acos<float>(float x)
128{
129 return std::acosf(x);
130};
131
132template <>
133inline __host__ double acos<double>(double x)
134{
135 return std::acos(x);
136};
137
138template <typename T>
139inline __host__ T neg(T x)
140{
142};
143
144template <>
145inline __host__ float neg<float>(float x)
146{
147 return -x;
148};
149
150template <>
151inline __host__ double neg<double>(double x)
152{
153 return -x;
154};
155
156template <>
157inline __host__ int32_t neg<int32_t>(int32_t x)
158{
159 return -x;
160};
161
162template <>
163inline __host__ int8_t neg<int8_t>(int8_t x)
164{
165 return -x;
166};
167
168template <typename T>
169inline __host__ T atan(T x)
170{
171 return ck::type_convert<T>(std::atanf(ck::type_convert<float>(x)));
172};
173
174template <>
175inline __host__ float atan<float>(float x)
176{
177 return std::atanf(x);
178};
179
180template <>
181inline __host__ double atan<double>(double x)
182{
183 return std::atan(x);
184};
185
186template <typename T>
187inline __host__ T sin(T x)
188{
189 return ck::type_convert<T>(std::sinf(ck::type_convert<float>(x)));
190};
191
192template <>
193inline __host__ float sin<float>(float x)
194{
195 return std::sinf(x);
196};
197
198template <>
199inline __host__ double sin<double>(double x)
200{
201 return std::sin(x);
202};
203
204template <typename T>
205inline __host__ T asin(T x)
206{
207 return ck::type_convert<T>(std::asinf(ck::type_convert<float>(x)));
208};
209
210template <>
211inline __host__ float asin<float>(float x)
212{
213 return std::asinf(x);
214};
215
216template <>
217inline __host__ double asin<double>(double x)
218{
219 return std::asin(x);
220};
221
222template <typename T>
223inline __host__ T asinh(T x)
224{
225 return ck::type_convert<T>(std::asinhf(ck::type_convert<float>(x)));
226};
227
228template <>
229inline __host__ float asinh<float>(float x)
230{
231 return std::asinhf(x);
232};
233
234template <>
235inline __host__ double asinh<double>(double x)
236{
237 return std::asinh(x);
238};
239
240template <typename T>
241inline __host__ T cos(T x)
242{
243 return ck::type_convert<T>(std::cosf(ck::type_convert<float>(x)));
244};
245
246template <>
247inline __host__ float cos<float>(float x)
248{
249 return std::cosf(x);
250};
251
252template <>
253inline __host__ double cos<double>(double x)
254{
255 return std::cos(x);
256};
257
258template <typename T>
259inline __host__ T acosh(T x)
260{
261 return ck::type_convert<T>(std::acoshf(ck::type_convert<float>(x)));
262};
263
264template <>
265inline __host__ float acosh<float>(float x)
266{
267 return std::acoshf(x);
268};
269
270template <>
271inline __host__ double acosh<double>(double x)
272{
273 return std::acosh(x);
274};
275
276template <typename T>
277inline __host__ T tan(T x)
278{
279 return ck::type_convert<T>(std::tanf(ck::type_convert<float>(x)));
280};
281
282template <>
283inline __host__ float tan<float>(float x)
284{
285 return std::tanf(x);
286};
287
288template <>
289inline __host__ double tan<double>(double x)
290{
291 return std::tan(x);
292};
293
294template <typename T>
295inline __host__ T atanh(T x)
296{
297 return ck::type_convert<T>(std::atanhf(ck::type_convert<float>(x)));
298};
299
300template <>
301inline __host__ float atanh<float>(float x)
302{
303 return std::atanhf(x);
304};
305
306template <>
307inline __host__ double atanh<double>(double x)
308{
309 return std::atanh(x);
310};
311
312template <typename T>
313inline __host__ T sinh(T x)
314{
315 return ck::type_convert<T>(std::sinhf(ck::type_convert<float>(x)));
316};
317
318template <>
319inline __host__ float sinh<float>(float x)
320{
321 return std::sinhf(x);
322};
323
324template <>
325inline __host__ double sinh<double>(double x)
326{
327 return std::sinh(x);
328};
329
330template <typename T>
331inline __host__ T ceil(T x)
332{
333 return ck::type_convert<T>(std::ceilf(ck::type_convert<float>(x)));
334};
335
336template <>
337inline __host__ float ceil<float>(float x)
338{
339 return std::ceilf(x);
340};
341
342template <>
343inline __host__ double ceil<double>(double x)
344{
345 return std::ceil(x);
346};
347
348template <typename T>
349inline __host__ T cosh(T x)
350{
351 return ck::type_convert<T>(std::coshf(ck::type_convert<float>(x)));
352};
353
354template <>
355inline __host__ float cosh<float>(float x)
356{
357 return std::coshf(x);
358};
359
360template <>
361inline __host__ double cosh<double>(double x)
362{
363 return std::cosh(x);
364};
365
366template <typename T>
367inline __host__ T floor(T x)
368{
369 return ck::type_convert<T>(std::floorf(ck::type_convert<float>(x)));
370};
371
372template <>
373inline __host__ float floor<float>(float x)
374{
375 return std::floorf(x);
376};
377
378template <>
379inline __host__ double floor<double>(double x)
380{
381 return std::floor(x);
382};
383
384template <typename T>
385inline __host__ T rcp(T x)
386{
388};
389
390template <typename T>
391inline __host__ T exp(T x)
392{
393 return ck::type_convert<T>(std::expf(ck::type_convert<float>(x)));
394}
395
396template <>
397inline __host__ float exp<float>(float x)
398{
399 return std::expf(x);
400}
401
402template <>
403inline __host__ double exp<double>(double x)
404{
405 return std::exp(x);
406}
407
408template <typename T>
409inline __host__ T log(T x)
410{
411 return ck::type_convert<T>(std::logf(ck::type_convert<float>(x)));
412}
413
414template <>
415inline __host__ float log<float>(float x)
416{
417 return std::logf(x);
418}
419
420template <>
421inline __host__ double log<double>(double x)
422{
423 return std::log(x);
424}
425
426template <typename T>
427inline __host__ T pow(T x, T gamma)
428{
429 return ck::type_convert<T>(
431}
432
433template <>
434inline __host__ float pow<float>(float x, float gamma)
435{
436 return std::powf(x, gamma);
437}
438
439template <>
440inline __host__ double pow<double>(double x, double gamma)
441{
442 return std::pow(x, gamma);
443}
444
445template <typename T>
446inline __host__ T expm1(T x)
447{
448 return ck::type_convert<T>(std::expm1f(ck::type_convert<float>(x)));
449}
450
451template <>
452inline __host__ float expm1<float>(float x)
453{
454 return std::expm1f(x);
455}
456
457template <>
458inline __host__ double expm1<double>(double x)
459{
460 return std::expm1(x);
461}
462#endif
463// math functions for the HIP kernel, some are implemented by calling hip builtin functions
464
465static inline __device__ float abs(float x) { return ::abs(x); };
466
467static inline __device__ double abs(double x) { return ::abs(x); };
468
469static inline __device__ int8_t abs(int8_t x)
470{
471 int8_t sgn = x >> (8 - 1);
472
473 return (x ^ sgn) - sgn;
474};
475
476static inline __device__ int32_t abs(int32_t x)
477{
478 int32_t sgn = x >> (32 - 1);
479
480 return (x ^ sgn) - sgn;
481};
482
483#ifdef CK_EXPERIMENTAL_BIT_INT_EXTENSION_INT4
484static inline __device__ int4_t abs(int4_t x)
485{
486 int4_t sgn = x >> (4 - 1);
487
488 return (x ^ sgn) - sgn;
489};
490#endif
491
492static inline __device__ half_t abs(half_t x)
493{
495
496 uint16_t abs_xx = xx & 0x7fff;
497
498 half_t abs_x = ck::bit_cast<half_t>(abs_xx);
499
500 return abs_x;
501};
502
503static inline __device__ bool isnan(float x) { return ::isnan(x); };
504
505static inline __device__ bool isnan(double x) { return ::isnan(x); };
506
507static inline __device__ bool isnan(int8_t x)
508{
509 (void)x;
510 return false;
511};
512
513static inline __device__ bool isnan(int32_t x)
514{
515 (void)x;
516 return false;
517};
518
519#ifdef CK_EXPERIMENTAL_BIT_INT_EXTENSION_INT4
520static inline __device__ bool isnan(int4_t x)
521{
522 (void)x;
523 return false;
524};
525#endif
526
527static inline __device__ bool isnan(half_t x)
528{
530
531 return (xx & 0x7FFF) > 0x7C00;
532};
533
534static inline __device__ bool isnan(f8_t x) { return ck::fp8_is_nan(x); };
535
536static inline __device__ half_t sqrt(half_t x)
537{
538 return static_cast<half_t>(__builtin_amdgcn_sqrtf(static_cast<float>(x)));
539};
540
541static inline __device__ float sqrt(float x) { return __builtin_amdgcn_sqrtf(x); };
542
543static inline __device__ double sqrt(double x) { return __builtin_amdgcn_sqrt(x); };
544
545template <typename T>
546inline __device__ T tanh(T x)
547{
549};
550
551template <>
552inline __device__ float tanh<float>(float x)
553{
554 return ::tanhf(x);
555};
556
557template <>
558inline __device__ double tanh<double>(double x)
559{
560 return ::tanh(x);
561};
562
563template <typename T>
564inline __device__ T acos(T x)
565{
567};
568
569template <>
570inline __device__ float acos<float>(float x)
571{
572 return ::acosf(x);
573};
574
575template <>
576inline __device__ double acos<double>(double x)
577{
578 return ::acos(x);
579};
580
581template <typename T>
582inline __device__ T neg(T x)
583{
585};
586
587template <>
588inline __device__ float neg<float>(float x)
589{
590 return -x;
591};
592
593template <>
594inline __device__ double neg<double>(double x)
595{
596 return -x;
597};
598
599template <>
600inline __device__ int32_t neg<int32_t>(int32_t x)
601{
602 return -x;
603};
604
605template <>
606inline __device__ int8_t neg<int8_t>(int8_t x)
607{
608 return -x;
609};
610
611template <>
612inline __device__ half_t neg<half_t>(half_t x)
613{
614 return __hneg(static_cast<__half>(x));
615};
616
617template <typename T>
618inline __device__ T atan(T x)
619{
621};
622
623template <>
624inline __device__ float atan<float>(float x)
625{
626 return ::atanf(x);
627};
628
629template <>
630inline __device__ double atan<double>(double x)
631{
632 return ::atan(x);
633};
634
635template <typename T>
636inline __device__ T sin(T x)
637{
639};
640
641template <>
642inline __device__ float sin<float>(float x)
643{
644 return ::sinf(x);
645};
646
647template <>
648inline __device__ double sin<double>(double x)
649{
650 return ::sin(x);
651};
652
653template <>
654inline __device__ half_t sin<half_t>(half_t x)
655{
656 return hsin(static_cast<__half>(x));
657};
658
659template <typename T>
660inline __device__ T asin(T x)
661{
663};
664
665template <>
666inline __device__ float asin<float>(float x)
667{
668 return ::asinf(x);
669};
670
671template <>
672inline __device__ double asin<double>(double x)
673{
674 return ::asin(x);
675};
676
677template <typename T>
678inline __device__ T asinh(T x)
679{
680 return ck::type_convert<T>(::asinhf(ck::type_convert<float>(x)));
681};
682
683template <>
684inline __device__ float asinh<float>(float x)
685{
686 return ::asinhf(x);
687};
688
689template <>
690inline __device__ double asinh<double>(double x)
691{
692 return ::asinh(x);
693};
694
695template <typename T>
696inline __device__ T acosh(T x)
697{
698 return ck::type_convert<T>(::acoshf(ck::type_convert<float>(x)));
699};
700
701template <>
702inline __device__ float acosh<float>(float x)
703{
704 return ::acoshf(x);
705};
706
707template <>
708inline __device__ double acosh<double>(double x)
709{
710 return ::acosh(x);
711};
712
713template <typename T>
714inline __device__ T tan(T x)
715{
717};
718
719template <>
720inline __device__ float tan<float>(float x)
721{
722 return ::tanf(x);
723};
724
725template <>
726inline __device__ double tan<double>(double x)
727{
728 return ::tan(x);
729};
730
731template <typename T>
732inline __device__ T atanh(T x)
733{
734 return ck::type_convert<T>(::atanhf(ck::type_convert<float>(x)));
735};
736
737template <>
738inline __device__ float atanh<float>(float x)
739{
740 return ::atanhf(x);
741};
742
743template <>
744inline __device__ double atanh<double>(double x)
745{
746 return ::atanh(x);
747};
748
749template <typename T>
750inline __device__ T sinh(T x)
751{
753};
754
755template <>
756inline __device__ float sinh<float>(float x)
757{
758 return ::sinhf(x);
759};
760
761template <>
762inline __device__ double sinh<double>(double x)
763{
764 return ::sinh(x);
765};
766
767template <typename T>
768inline __device__ T ceil(T x)
769{
771};
772
773template <>
774inline __device__ float ceil<float>(float x)
775{
776 return ::ceilf(x);
777};
778
779template <>
780inline __device__ double ceil<double>(double x)
781{
782 return ::ceil(x);
783};
784
785template <>
786inline __device__ half_t ceil<half_t>(half_t x)
787{
788 return hceil(static_cast<__half>(x));
789};
790
791template <typename T>
792inline __device__ T cosh(T x)
793{
795};
796
797template <>
798inline __device__ float cosh<float>(float x)
799{
800 return ::coshf(x);
801};
802
803template <>
804inline __device__ double cosh<double>(double x)
805{
806 return ::cosh(x);
807};
808
809template <typename T>
810inline __device__ T floor(T x)
811{
812 return ck::type_convert<T>(::floorf(ck::type_convert<float>(x)));
813};
814
815template <>
816inline __device__ float floor<float>(float x)
817{
818 return ::floorf(x);
819};
820
821template <>
822inline __device__ double floor<double>(double x)
823{
824 return ::floor(x);
825};
826
827template <>
828inline __device__ half_t floor<half_t>(half_t x)
829{
830 return hfloor(static_cast<__half>(x));
831};
832
833template <typename T>
834inline __device__ T rcp(T x)
835{
836#if !CK_WORKAROUND_SWDEV_383542
837 return __frcp_rn(x);
838#else
839 return __ocml_native_recip_f32(x);
840#endif
841};
842
843template <typename T>
844inline __device__ T exp(T x)
845{
846 return ck::type_convert<T>(__ocml_exp_f32(ck::type_convert<float>(x)));
847};
848
849template <>
850inline __device__ half_t exp<half_t>(half_t x)
851{
852 return hexp(static_cast<__half>(x));
853};
854
855template <>
856inline __device__ float exp<float>(float x)
857{
858 return __ocml_exp_f32(x);
859};
860
861template <>
862inline __device__ double exp<double>(double x)
863{
864 return exp(x);
865};
866
867template <typename T>
868inline __device__ T log(T x)
869{
871};
872
873template <>
874inline __device__ half_t log<half_t>(half_t x)
875{
876 return hlog(static_cast<__half>(x));
877};
878
879template <>
880inline __device__ float log<float>(float x)
881{
882 return __logf(x);
883};
884
885template <>
886inline __device__ double log<double>(double x)
887{
888 return log(x);
889};
890
891template <typename T>
892inline __device__ T pow(T x, T gamma)
893{
895};
896
897template <>
898inline __device__ float pow<float>(float x, float gamma)
899{
900 return powf(x, gamma);
901};
902
903template <>
904inline __device__ double pow<double>(double x, double gamma)
905{
906 return pow(x, gamma);
907};
908
909template <typename T>
910inline __device__ T expm1(T x)
911{
913};
914
915template <>
916inline __device__ float expm1<float>(float x)
917{
918 return expm1f(x);
919};
920
921template <>
922inline __device__ double expm1<double>(double x)
923{
924 return expm1(x);
925};
926
927template <typename T>
928inline __device__ T cos(T x)
929{
931};
932
933template <>
934inline __device__ float cos<float>(float x)
935{
936 return cosf(x);
937};
938
939template <>
940inline __device__ double cos<double>(double x)
941{
942 return cos(x);
943};
944
945} // namespace math
946} // namespace ck
Definition utility/math.hpp:13
__host__ double expm1< double >(double x)
Definition math_v2.hpp:458
__host__ double sinh< double >(double x)
Definition math_v2.hpp:325
__host__ T log(T x)
Definition math_v2.hpp:409
__host__ double neg< double >(double x)
Definition math_v2.hpp:151
__host__ T cosh(T x)
Definition math_v2.hpp:349
__host__ T exp(T x)
Definition math_v2.hpp:391
__host__ int32_t neg< int32_t >(int32_t x)
Definition math_v2.hpp:157
__host__ double atanh< double >(double x)
Definition math_v2.hpp:307
__host__ float log< float >(float x)
Definition math_v2.hpp:415
__host__ double pow< double >(double x, double gamma)
Definition math_v2.hpp:440
__host__ double exp< double >(double x)
Definition math_v2.hpp:403
__host__ T rcp(T x)
Definition math_v2.hpp:385
__host__ double ceil< double >(double x)
Definition math_v2.hpp:343
__host__ T tan(T x)
Definition math_v2.hpp:277
__host__ double sin< double >(double x)
Definition math_v2.hpp:199
__device__ half_t floor< half_t >(half_t x)
Definition math_v2.hpp:828
__host__ float floor< float >(float x)
Definition math_v2.hpp:373
__host__ T sin(T x)
Definition math_v2.hpp:187
__host__ float neg< float >(float x)
Definition math_v2.hpp:145
__host__ double tanh< double >(double x)
Definition math_v2.hpp:115
__host__ T expm1(T x)
Definition math_v2.hpp:446
__device__ half_t log< half_t >(half_t x)
Definition math_v2.hpp:874
__host__ int8_t neg< int8_t >(int8_t x)
Definition math_v2.hpp:163
__host__ float tan< float >(float x)
Definition math_v2.hpp:283
__host__ float sin< float >(float x)
Definition math_v2.hpp:193
__device__ half_t sin< half_t >(half_t x)
Definition math_v2.hpp:654
__host__ T atan(T x)
Definition math_v2.hpp:169
__host__ float ceil< float >(float x)
Definition math_v2.hpp:337
__host__ T acos(T x)
Definition math_v2.hpp:121
__host__ float sinh< float >(float x)
Definition math_v2.hpp:319
__host__ double cos< double >(double x)
Definition math_v2.hpp:253
__host__ double asinh< double >(double x)
Definition math_v2.hpp:235
__host__ float pow< float >(float x, float gamma)
Definition math_v2.hpp:434
__host__ double tan< double >(double x)
Definition math_v2.hpp:289
__host__ T ceil(T x)
Definition math_v2.hpp:331
__host__ T asin(T x)
Definition math_v2.hpp:205
__host__ double acos< double >(double x)
Definition math_v2.hpp:133
__host__ T pow(T x, T gamma)
Definition math_v2.hpp:427
__host__ T neg(T x)
Definition math_v2.hpp:139
__host__ float acos< float >(float x)
Definition math_v2.hpp:127
__device__ half_t neg< half_t >(half_t x)
Definition math_v2.hpp:612
__host__ float cos< float >(float x)
Definition math_v2.hpp:247
__host__ double asin< double >(double x)
Definition math_v2.hpp:217
__host__ float asin< float >(float x)
Definition math_v2.hpp:211
__host__ double atan< double >(double x)
Definition math_v2.hpp:181
__host__ double floor< double >(double x)
Definition math_v2.hpp:379
__host__ double cosh< double >(double x)
Definition math_v2.hpp:361
__host__ T cos(T x)
Definition math_v2.hpp:241
__host__ float expm1< float >(float x)
Definition math_v2.hpp:452
__host__ T floor(T x)
Definition math_v2.hpp:367
__host__ float tanh< float >(float x)
Definition math_v2.hpp:109
__host__ double acosh< double >(double x)
Definition math_v2.hpp:271
__host__ T asinh(T x)
Definition math_v2.hpp:223
__host__ float cosh< float >(float x)
Definition math_v2.hpp:355
__device__ half_t exp< half_t >(half_t x)
Definition math_v2.hpp:850
__host__ T atanh(T x)
Definition math_v2.hpp:295
__host__ T tanh(T x)
Definition math_v2.hpp:103
__host__ float exp< float >(float x)
Definition math_v2.hpp:397
__host__ float asinh< float >(float x)
Definition math_v2.hpp:229
__host__ float acosh< float >(float x)
Definition math_v2.hpp:265
__host__ float atan< float >(float x)
Definition math_v2.hpp:175
__host__ float atanh< float >(float x)
Definition math_v2.hpp:301
__host__ T acosh(T x)
Definition math_v2.hpp:259
__device__ half_t ceil< half_t >(half_t x)
Definition math_v2.hpp:786
__host__ double log< double >(double x)
Definition math_v2.hpp:421
__host__ T sinh(T x)
Definition math_v2.hpp:313
Definition ck.hpp:268
f8_fnuz_t f8_t
Definition amd_ck_fp8.hpp:1762
_Float16 half_t
Definition data_type.hpp:31
__host__ __device__ constexpr Y type_convert(X x)
Definition utility/type_convert.hpp:98
_BitInt(4) int4_t
Definition data_type.hpp:32
__host__ __device__ constexpr Y bit_cast(const X &x)
Definition type.hpp:306
unsigned short uint16_t
Definition stdint.h:125
signed int int32_t
Definition stdint.h:123
signed char int8_t
Definition stdint.h:121