Is it possible to use SPM in *.metal files?

Hello.
I compiled a C module to my target "CoreStructures" to use my common C strucures on the CPU and the GPU

module CoreStructures {

header "ParticleGrid.h"

}

Now I would like to use one of C structure defined in "ParticleGrid.h" in my *.metal file, but I do not know is it possible or not, compiler do not see my C module in metal file, while it do see it in my swift file

#include <metal_stdlib>
#include <CoreStructures/ParticleGrid.h> // CoreStructures/ParticleGrid.h' file not found
using namespace metal;

kernel void setParticles() {

// FixedCell x;

}

BUT in swift file it is ok

import CoreStructures

func testCoreC() {

let cell = FixedCell() // OK

}

Sorry for the confusing question

2 Likes