Can I use the Adam optimizer in C language?

Can I use the Adam optimizer of pytorch or tensorflow library in C language?

Here I want to optimize a function.

I can deliver a function, gradient of that function.

You can use adam in the c++ pytorch api
Some links that might be usefull:

https://caffe2.ai/doxygen-c/html/classtorch_1_1optim_1_1_adam.html